Compare commits

..

299 Commits

Author SHA1 Message Date
41e7bac906 released v1.37.0 2023-05-28 23:18:23 +08:00
fe855c04c7 doc: update README.md. 2023-05-28 15:04:50 +00:00
ef6d1d7c76 doc: update CONTRIBUTING.md. 2023-05-28 15:04:49 +00:00
09ece3b274 doc: update docs/nestjs.md 2023-05-28 23:02:54 +08:00
56569c813a doc: update docs/css.md 2023-05-28 23:01:04 +08:00
f9fb17cb5e chore: update config.yml 2023-05-25 12:34:57 +08:00
d632dcac7e chore: update bug-report.yml 2023-05-25 12:26:37 +08:00
6529b5e85f chore: update bug-report.yml 2023-05-25 12:25:23 +08:00
1f8b93dbab chore: update bug-report.yml 2023-05-25 12:23:18 +08:00
22066608fe chore: add bug-report.yml 2023-05-25 12:19:48 +08:00
530e454bf8 chore: update cheatsheet-request.yml 2023-05-25 12:09:58 +08:00
f4b69f9b55 chore: delete cheatsheet-request.md 2023-05-25 12:07:35 +08:00
6b7e4322c9 doc: update cheatsheet-request.yml 2023-05-25 12:06:42 +08:00
3c1c37b4a9 chore: create cheatsheet-request.yml 2023-05-25 12:03:45 +08:00
fd26de4484 doc: update README.md. 2023-05-20 04:10:22 +00:00
b065d03300 doc: update CONTRIBUTING.md. 2023-05-20 04:10:22 +00:00
a732ff3892 doc: update README.md 2023-05-20 12:08:59 +08:00
a3bc1f8d20 doc: docs/emoji.md 2023-05-20 10:52:59 +08:00
36482c5846 doc: update docs/cs.md 2023-05-20 10:17:26 +08:00
862813a0fc doc: Update cs.md 2023-05-20 10:04:50 +08:00
e218c7ec86 doc: Update README.md 2023-05-20 10:00:20 +08:00
9acf9ae5a3 doc: Update README.md (#102) 2023-05-18 15:19:30 +08:00
0beda68e62 doc: update README.md. 2023-05-17 23:53:33 +00:00
f3754732bd doc: update CONTRIBUTING.md. 2023-05-17 23:53:32 +00:00
0bc4e3b09e doc: Update README.md 2023-05-18 07:52:02 +08:00
c83de17d72 doc: update README.md. 2023-05-15 07:55:25 +00:00
4eb3372413 doc: update CONTRIBUTING.md. 2023-05-15 07:55:24 +00:00
511db1fb0b doc: Update README.md (#102) 2023-05-15 15:53:59 +08:00
b724f66b27 doc: update README.md. 2023-05-12 04:09:18 +00:00
d2c11fab72 doc: update CONTRIBUTING.md. 2023-05-12 04:09:17 +00:00
a48806438e doc: update docs/dockerfile.md (#364)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-12 12:08:09 +08:00
ed399a9dc2 doc: update README.md. 2023-05-12 04:07:52 +00:00
a33a60838b doc: update CONTRIBUTING.md. 2023-05-12 04:07:51 +00:00
101fd365be doc: update README.md. 2023-05-12 04:06:33 +00:00
adb708e3ba doc: update CONTRIBUTING.md. 2023-05-12 04:06:33 +00:00
eff2e44e1e doc: docs/dockerfile.md (#366)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-12 12:06:22 +08:00
67bc79e60b doc: update docs/kubernetes.md (#373)
语法错误,正确的语法为
增加
kubectl label nodes <node-name> <label-key>=<label-value> 
删除
kubectl label nodes <node-name> <label-key>-
修改Label的值
kubectl label nodes <node-name> <label-key>=<label-value> --overwrite
2023-05-12 12:05:20 +08:00
1d60e54663 doc: Update README.md (#371) (#102)
Add static resource mirroring address: ref.defense.ink
2023-05-10 20:45:56 +08:00
6f0b8fb175 doc: update README.md. 2023-05-08 09:39:37 +00:00
517a846133 doc: update CONTRIBUTING.md. 2023-05-08 09:39:35 +00:00
f3ebc461d4 doc: Update cs.md (#369) 2023-05-08 17:37:52 +08:00
6f45968e1a doc: Update README.md #102 2023-05-07 22:40:24 +08:00
2f0c809390 doc: update README.md. 2023-05-06 15:10:11 +00:00
2321368d3e doc: update CONTRIBUTING.md. 2023-05-06 15:10:10 +00:00
c65ba9df21 doc: Update README.md (#102) 2023-05-06 23:08:30 +08:00
cb0fe8ef7d doc: Update README.md 2023-05-05 21:45:10 +08:00
60380ceaa4 doc: Update README.md 2023-05-02 01:51:36 +08:00
fd6f325ef6 doc: update README.md. 2023-05-01 17:50:13 +00:00
14ed1d3f44 doc: update CONTRIBUTING.md. 2023-05-01 17:50:12 +00:00
f34851d2d5 doc: Update README.md 2023-05-02 01:48:32 +08:00
1626464167 doc: update README.md. 2023-04-27 12:05:11 +00:00
556b4f8655 doc: update CONTRIBUTING.md. 2023-04-27 12:05:10 +00:00
0915987573 doc: update docs/golang.md (#361) 2023-04-27 20:03:24 +08:00
fa15c32717 doc: update docs/pacman.md (#357) 2023-04-25 22:09:06 +08:00
ac217e7b99 doc: update README.md. 2023-04-25 13:59:31 +00:00
a2542e3e4d doc: update CONTRIBUTING.md. 2023-04-25 13:59:31 +00:00
b530554d1e doc: update docs/java.md (#360)
Co-authored-by: tmen <tmenblog@163.com>
2023-04-25 21:58:09 +08:00
6163e9b4f5 doc: update README.md. 2023-04-25 10:56:54 +00:00
ec3c285fbb doc: update CONTRIBUTING.md. 2023-04-25 10:56:53 +00:00
1aae2c027e doc: update docs/golang.md (#359) 2023-04-25 18:55:28 +08:00
dd53261d3c doc: update README.md. 2023-04-25 09:52:18 +00:00
0d643d4672 doc: update CONTRIBUTING.md. 2023-04-25 09:52:16 +00:00
70c68318ee feat: add docs/pacman.md (#357) 2023-04-25 17:50:28 +08:00
8bde7ad5de doc: Update README.md #102 2023-04-23 00:27:56 +08:00
2e05f1307b doc: Update README.md #102 2023-04-22 19:56:23 +08:00
3b33c3d9bc doc: update docs/html.md 2023-04-22 16:36:30 +08:00
9efd75d657 doc: update docs/html.md 2023-04-22 12:47:23 +08:00
a54aecde30 doc: update docs/css.md 2023-04-22 12:32:22 +08:00
21cc727b16 doc: update README.md. 2023-04-21 01:49:59 +00:00
9c875cf5f6 doc: update CONTRIBUTING.md. 2023-04-21 01:49:58 +00:00
Zhu
1ef8a1484d doc: update flask.md (#350) 2023-04-21 09:48:41 +08:00
c0da5393f5 chore: format docs/cs.md 2023-04-18 10:54:56 +08:00
e7d8b4aac6 doc: update docs/css.md 2023-04-18 10:54:56 +08:00
850fcfae54 doc: update README.md. 2023-04-18 02:40:52 +00:00
8f1d00647c doc: update CONTRIBUTING.md. 2023-04-18 02:40:51 +00:00
486ebb19c1 doc: update cs.md (#346)
* feat(cs.md): Fix logic

* feat(cs.md): Fix show header in logic operator section.

* fix(cs.md): the info from w3school is not correct.

sizeof(bool) == 1, it is 1 byte, but not 1 bit.
2023-04-18 10:39:08 +08:00
588f84f33c doc: update README.md. 2023-04-17 00:42:11 +00:00
298631fd5a doc: update CONTRIBUTING.md. 2023-04-17 00:42:10 +00:00
3ac3043898 feat: add docs/gdb.md #87 (#345) 2023-04-17 08:40:42 +08:00
bd8b551997 doc: update README.md. 2023-04-13 02:51:36 +00:00
a3c44b3088 doc: update CONTRIBUTING.md. 2023-04-13 02:51:35 +00:00
d98e60dc43 chore: update issue template. 2023-04-13 10:50:03 +08:00
34f59d161e doc: update README.md. 2023-04-09 13:19:08 +00:00
ac7e63e247 doc: update CONTRIBUTING.md. 2023-04-09 13:19:07 +00:00
e606837a88 doc: update mongodb.md (#343)
fix some translation issues
2023-04-09 21:17:31 +08:00
6f6526218f doc: Update vim.md fix #342 2023-04-07 10:58:31 +08:00
94f377ecd8 doc: update conda.md (#341) (#83) 2023-04-06 22:24:22 +08:00
55a072222b doc: update README.md. 2023-04-06 13:51:33 +00:00
f88ae30d7f doc: update CONTRIBUTING.md. 2023-04-06 13:51:32 +00:00
5e7bfa54f2 feat: add conda.md (#341) 2023-04-06 21:49:56 +08:00
faf1e52739 doc: update README.md. 2023-04-04 17:00:09 +00:00
17177a29a9 doc: update CONTRIBUTING.md. 2023-04-04 17:00:08 +00:00
801c90c059 doc: 移除不可用镜像站 (#340) 2023-04-05 00:58:54 +08:00
e6f011d607 doc: update docs/flutter.md (#339) 2023-04-03 23:26:23 +08:00
1d607ed3b5 doc: Update README.md #102 2023-04-02 19:53:29 +08:00
e385350aaa doc: Update feds.md 2023-03-31 12:13:52 +08:00
271c92336d doc: update README.md. 2023-03-28 09:16:52 +00:00
ca770c8d7a doc: update CONTRIBUTING.md. 2023-03-28 09:16:51 +00:00
e6dc5d1858 doc: update docs/intelli-j-idea.md (#336)
修改翻译错误1处
2023-03-28 17:15:14 +08:00
e1b507eafc doc: update README.md. 2023-03-23 15:07:49 +00:00
fadd789bbc doc: update CONTRIBUTING.md. 2023-03-23 15:07:49 +00:00
3d967056e5 doc: Update README.md (#333)
新增镜像站
ref.moeyuuko.com
每日同步
2023-03-23 23:06:17 +08:00
555238ff04 doc: update README.md. 2023-03-16 07:53:39 +00:00
909e7929d0 doc: update CONTRIBUTING.md. 2023-03-16 07:53:38 +00:00
cb293dc036 doc: update docs/kotlin.md (#331) 2023-03-16 15:52:17 +08:00
1eadc7748e doc: Update README.md 2023-03-14 20:58:34 +08:00
f3b8c65f73 chore: update workflows config. 2023-03-14 20:16:57 +08:00
5c4075497e feat: add docs/scala.md (#326) 2023-03-14 20:03:40 +08:00
b75cb75372 feat: add docs/scala.md (#326) 2023-03-14 20:03:13 +08:00
1ca1e49030 doc: update docs/dockerfile.md 2023-03-14 16:32:37 +08:00
03b2ce120d chore: update Dockerfile 2023-03-14 15:49:38 +08:00
881fd368c5 doc: update docs/typescript.md 2023-03-13 09:41:48 +08:00
8f2117970b doc: update docs/linux-command.md (#89) 2023-03-09 11:22:46 +08:00
32b7b03faa doc: update docs/linux-command.md 2023-03-09 11:04:18 +08:00
ea762bf805 feat: add linux-command.md (#89,#286,#185,#289,#226) 2023-03-09 10:08:59 +08:00
30999dcafc doc: update docs/zip.md (#319) 2023-03-08 21:12:17 +08:00
d1c8300dcf feat: add docs/zip.md (#319) 2023-03-08 21:07:40 +08:00
e3bf99b022 doc: update docs/css.md 2023-03-06 09:25:11 +08:00
8c7c9e1957 doc: update README.md. 2023-03-04 02:27:48 +00:00
da61a8d25d doc: update CONTRIBUTING.md. 2023-03-04 02:27:47 +00:00
3ddd8d7fea doc: update docs/css.md 2023-03-04 10:26:12 +08:00
7facfea3f9 doc: update docs/docker.md (#323) 2023-03-02 15:46:02 +08:00
f687d48666 doc: update docs/kubernetes.md (#322) 2023-03-02 15:11:51 +08:00
a90c8e2ed4 doc: update docs/java.md (#321) 2023-03-02 15:11:04 +08:00
3087afb4ee doc: update README.md. 2023-03-02 07:09:22 +00:00
710848dcac doc: update CONTRIBUTING.md. 2023-03-02 07:09:21 +00:00
6d8fe96e96 doc: update java.md (#321) 2023-03-02 15:08:15 +08:00
5c775c9074 doc: update kubernetes.md (#322) 2023-03-02 15:07:57 +08:00
c40b0dff2f feat: add Justfile. (#276) 2023-03-02 09:54:40 +08:00
94bbb4f6a7 chore: update issue template. 2023-03-02 09:07:00 +08:00
dbbb2cce54 doc: Update README.md 2023-03-02 09:07:00 +08:00
714db4d198 doc: update README.md. 2023-03-01 14:27:14 +00:00
5e02521794 doc: update CONTRIBUTING.md. 2023-03-01 14:27:13 +00:00
cb5b582b81 doc: 移除已不可用的镜像站 (#317) 2023-03-01 22:25:25 +08:00
3fe58b7c0d doc: update README.md. 2023-03-01 13:53:38 +00:00
5ca1e140d1 doc: update CONTRIBUTING.md. 2023-03-01 13:53:38 +00:00
64b52fc1bc doc: update README.md #102 2023-03-01 21:52:15 +08:00
ab26411164 doc: update docs/docker.md 2023-02-28 23:19:35 +08:00
2c858eb744 doc: update docs/cs.md (#316) 2023-02-28 23:18:56 +08:00
c39abea00a doc: update README.md #102 2023-02-28 23:08:45 +08:00
30fa592d95 doc: update bash.md (#312) 2023-02-28 23:06:08 +08:00
36f071de00 doc: update README.md. 2023-02-28 15:06:00 +00:00
289237d5b6 doc: update CONTRIBUTING.md. 2023-02-28 15:05:59 +00:00
b1a10ee797 doc: docs/cs.md (#316) 2023-02-28 23:04:29 +08:00
f597396afe doc: update README.md. 2023-02-27 00:48:57 +00:00
36a3bb2112 doc: update CONTRIBUTING.md. 2023-02-27 00:48:56 +00:00
88d42e6ac8 doc(cs): update cs.md. (#314) 2023-02-27 08:47:46 +08:00
59e840628b doc: update README.md. 2023-02-26 14:52:06 +00:00
2519135036 doc: update CONTRIBUTING.md. 2023-02-26 14:52:05 +00:00
32af22afaa doc: update docker.md (#313)
* add bash debug info

* Add some additional notes
2023-02-26 22:50:54 +08:00
fcf60fb56f doc: update README.md. 2023-02-26 14:00:24 +00:00
f81d2174f6 doc: update CONTRIBUTING.md. 2023-02-26 14:00:23 +00:00
9daa435dee doc: update bash.md (#312) 2023-02-26 21:58:52 +08:00
defd3d3fee doc: update README.md. 2023-02-23 15:35:38 +00:00
33103fb68d doc: update CONTRIBUTING.md. 2023-02-23 15:35:37 +00:00
2348522810 doc: Update java.md (#311)
添加List和Set集合中打印时使用lamba输出的方式。
2023-02-23 23:34:24 +08:00
5ca71fdb60 doc: update README.md. 2023-02-23 05:34:14 +00:00
bbf00328b3 doc: update CONTRIBUTING.md. 2023-02-23 05:34:13 +00:00
dba2f6c1fd chore: update README.md #206 #102 2023-02-23 13:29:34 +08:00
3523cdff76 doc: update README.md. 2023-02-20 05:16:48 +00:00
d4fd7a30c8 doc: update CONTRIBUTING.md. 2023-02-20 05:16:47 +00:00
7c153a0579 fix: typo adb.md (#306) 2023-02-20 13:15:17 +08:00
8f2a86457b chore: update workflows config. 2023-02-20 11:30:50 +08:00
b98e7d8395 released v1.36.0 2023-02-20 11:10:24 +08:00
3d1317603e doc: update homebrew.md 2023-02-20 11:07:54 +08:00
8a651c813b doc: update README.md. 2023-02-20 01:13:01 +00:00
10884e73f0 doc: update CONTRIBUTING.md. 2023-02-20 01:13:00 +00:00
de4286cd7f doc: Update adb.md & homebrew.md and delete repeated mirror items (#304)
* chore: delete duplicate items

* doc: update adb.md and homebrew.md
2023-02-20 09:11:28 +08:00
f31aab4b35 chore(deps): update dependency refs-cli to ^1.3.2 (#279) 2023-02-15 09:42:34 +08:00
485e83c5df doc: update README.md. 2023-02-11 12:25:25 +00:00
5f1e3f6a2b doc: update CONTRIBUTING.md. 2023-02-11 12:25:24 +00:00
9688866fdb doc: python.md (#299)
Maybe it's not perfect, but it's better than before
2023-02-11 20:24:13 +08:00
9c59d4a225 doc: update README.md. 2023-02-11 12:23:48 +00:00
3f2559c1e1 doc: update CONTRIBUTING.md. 2023-02-11 12:23:47 +00:00
606776662d Update rust.md (#296) 2023-02-11 20:22:44 +08:00
3cec40c4f9 doc: update python.md (#297)
fix anchor link
2023-02-11 20:22:20 +08:00
a5c1f3c02e doc: update README.md. 2023-02-11 12:17:05 +00:00
8171974454 doc: update CONTRIBUTING.md. 2023-02-11 12:17:04 +00:00
d50673ad3f doc: update google-chrome.md (#298) 2023-02-11 20:15:41 +08:00
7ca89af17c doc: Update docker.md (#294)
format file: remove "。" in the forms (obsessive-compulsive disorder ...)
2023-02-10 11:29:00 +08:00
e0ce750d73 doc: update README.md. 2023-02-07 09:54:19 +00:00
409e44a354 doc: update CONTRIBUTING.md. 2023-02-07 09:54:18 +00:00
8382555a20 doc: Update docker.md (#292)
update docker commit grammar
2023-02-07 17:52:24 +08:00
e3e6783703 doc: update README.md. 2023-02-04 02:02:08 +00:00
ea86c3a76c doc: update CONTRIBUTING.md. 2023-02-04 02:02:07 +00:00
49b1394090 doc: update README.md 2023-02-04 10:00:36 +08:00
03f1c20d2c doc: update README.md. 2023-02-02 04:01:31 +00:00
ae060ebac2 doc: update CONTRIBUTING.md. 2023-02-02 04:01:30 +00:00
358d8f4e17 doc: update golang.md (#282) 2023-02-02 11:59:57 +08:00
6614543e04 doc: update README.md. 2023-02-02 03:54:09 +00:00
5693510df6 doc: update CONTRIBUTING.md. 2023-02-02 03:54:08 +00:00
XYZ
dfaaee7ce5 doc: Update regex.md (#277) 2023-02-02 11:52:58 +08:00
XYZ
c356147d5f doc: Update regex.md (#278) 2023-02-02 11:52:27 +08:00
1e1836f949 doc: update README.md. 2023-02-02 03:47:26 +00:00
65aab8d920 doc: update CONTRIBUTING.md. 2023-02-02 03:47:26 +00:00
816aabf365 doc: update README.md. 2023-02-02 03:46:34 +00:00
9efea19f6b doc: update CONTRIBUTING.md. 2023-02-02 03:46:33 +00:00
e1661b5dc4 doc: update golang.md (#282)
doc: update jquery.md
2023-02-02 11:46:20 +08:00
45f42568fc doc: update javascript.md (#281) 2023-02-02 11:45:19 +08:00
04d063f1fe doc: update README.md. 2023-01-17 09:53:37 +00:00
7b5d556dcc doc: update CONTRIBUTING.md. 2023-01-17 09:53:37 +00:00
6900980460 doc: update nextjs.md (#274) 2023-01-17 17:52:24 +08:00
28066ae3c4 doc: update README.md. 2023-01-14 04:24:05 +00:00
39bd0173e8 doc: update CONTRIBUTING.md. 2023-01-14 04:24:04 +00:00
6b570f2035 doc: update javascript.md (#271)
add JavaScript Functions 函数
line: 472-480
2023-01-14 12:22:40 +08:00
dac7e778cb doc: update README.md. 2023-01-12 10:29:35 +00:00
9e16ec7005 doc: update CONTRIBUTING.md. 2023-01-12 10:29:34 +00:00
489d7f509e doc: Update README.md (#270) 2023-01-12 18:28:13 +08:00
c0855988c0 chore(deps): update dependency markdownlint-cli to ^0.33.0 (#262)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-10 21:13:56 +08:00
e5e0160628 doc: update cs.md (#266) 2023-01-10 21:11:35 +08:00
cb7b542fb1 doc: update cs.md (#266) 2023-01-10 21:08:54 +08:00
101d5c1b09 doc: update README.md. 2023-01-09 05:29:08 +00:00
004553f1de doc: update CONTRIBUTING.md. 2023-01-09 05:29:07 +00:00
da7da9aae0 doc: Update README.md (#263)
* Update new mirror sources

* update mirror titles
2023-01-09 13:28:24 +08:00
6d4ce812d0 doc: update README.md #206 2023-01-09 13:27:46 +08:00
bab4e10038 doc: update README.md. 2023-01-06 07:01:43 +00:00
e30defe3bf doc: update CONTRIBUTING.md. 2023-01-06 07:01:41 +00:00
0691e82eb2 doc: update java.md (#261) 2023-01-06 14:59:49 +08:00
38b685315b doc: Update java.md (#261)
原来的 Java 官网弃用了
2023-01-05 18:52:11 +08:00
ae633b43e8 released v1.35.0 2023-01-05 11:37:05 +08:00
cc6e992a4b doc: update kotlin.md 2023-01-05 11:22:28 +08:00
2d994f8597 doc: update CONTRIBUTING.md 2023-01-05 11:04:07 +08:00
ad5accdeff doc: update julia.md 2023-01-05 10:34:41 +08:00
3a7af1eef3 feat: add kubernetes.md cheatsheet. #44 2023-01-05 10:27:01 +08:00
9ef65a9f3d feat: add ps.md cheatsheet. #251 2023-01-05 10:07:52 +08:00
6c220d88ae doc: update README.md #102 2023-01-05 09:15:55 +08:00
01da713410 doc: update README.md. 2023-01-03 08:45:58 +00:00
768bcb96d9 doc: update CONTRIBUTING.md. 2023-01-03 08:45:58 +00:00
fc11b2f0dc doc: Update README.md (#259) 2023-01-03 16:44:39 +08:00
dda6efdc7c doc: Update README.md (#258) 2023-01-03 11:09:33 +08:00
019b4d51ec chore(deps): update dependency markdownlint to ^0.27.0 (#250)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-01 20:54:59 +08:00
f40b56ebb8 doc: update cpp.md #255 2022-12-31 22:43:36 +08:00
bb533b9081 doc: update README.md. 2022-12-31 13:56:18 +00:00
6ca7d88a48 doc: update CONTRIBUTING.md. 2022-12-31 13:56:17 +00:00
a2cfd4e785 doc: update cpp.md (#255)
* 更新排版

更新了以下内容的排版,以适应网页的风格:

+ lambda表达式
+ 多线程

* 更新C++多线程:锁

更新以下部分:

+ `mutex`
    + 上锁——`lock`
    + 解锁——`unlock`
    + 尝试上锁——`try_lock`
+ `lock_guard<Mutex>`
    + 额外参数`std::adopt_lock`
+ `unique_lock<Mutex>`
    + 额外参数
        + `std::adopt_lock`
        + `std::try_to_lock`
        + `std::defer_lock`
    + 成员函数
        + `lock`
        + `unlock`
        + `release`
        + `owns_lock`

* 更新C++11多线程内容

更新内容:
 
+ `call_once`
+ `condition_variable` 
    + `wait`
    + `notify_one`
    + `notify_all`
+ `async`
    + `std::launch::deferred`
    + `std::launch::async`
    + `std::deferred | std::launch::async`
+ `future`
    + `wait`
    + `get`
    + `wait_for`
    + `wait_until`
+ `future_status`
    + `ready`
    + `timeout`
    + `deferred`
+ `shared_future`
2022-12-31 21:54:47 +08:00
b08cc85e41 doc: update cpp.md (#254) 2022-12-30 16:03:26 +08:00
3f84fe66d3 doc: update README.md. 2022-12-30 06:37:49 +00:00
5cde10b118 doc: update CONTRIBUTING.md. 2022-12-30 06:37:48 +00:00
db7a9aa6f9 doc: Update cpp.md (#254)
开始添加多线程部分,主要添加了线程的创建、销毁和this_thread的所有函数

尚未开始的内容:锁、互斥量、线程同步
2022-12-30 14:36:19 +08:00
9879fabc78 doc: update README.md. 2022-12-30 02:45:46 +00:00
a2a2ae55ca doc: update CONTRIBUTING.md. 2022-12-30 02:45:46 +00:00
19f919f532 doc: update docs/css.md 2022-12-30 10:44:24 +08:00
cabda9b9c9 doc: update README.md. (#252) 2022-12-29 18:09:46 +08:00
ce12b2a329 doc: update README.md. 2022-12-29 06:10:04 +00:00
5e3d42d1ad doc: update CONTRIBUTING.md. 2022-12-29 06:10:04 +00:00
bf962194da released v1.34.0 2022-12-29 14:08:39 +08:00
f5e2ad2c31 doc: update feds.md (#248) 2022-12-27 09:05:13 +08:00
ff0cc58c1d doc: Update feds.md (#248)
两个codepen似乎具有误导性,建议明确指出两者协议的区别。
2022-12-27 09:03:30 +08:00
b42883e3de doc: Update cpp.md (#246) 2022-12-26 16:08:44 +08:00
931850d916 feat: add mongodb.md cheatsheet. #236 2022-12-26 16:07:30 +08:00
f4d2c99007 feat: add pycharm.md cheatsheet. #244 2022-12-26 14:53:36 +08:00
112a53c101 doc: update README.md. 2022-12-26 02:33:17 +00:00
9e525009c9 doc: update CONTRIBUTING.md. 2022-12-26 02:33:16 +00:00
f78562b95e doc: Update cpp.md (#246)
补充了Lambda表达式的内容
2022-12-26 10:32:02 +08:00
63d846b35d doc: Update iptables.md (#245) 2022-12-25 14:14:44 +08:00
afd924a928 doc: update javascript.md (#243) 2022-12-21 18:19:30 +08:00
fb19cda5bb doc: update README.md. 2022-12-21 09:45:41 +00:00
c9834110cd doc: update CONTRIBUTING.md. 2022-12-21 09:45:40 +00:00
98edffbca0 chore: update README.md #102 2022-12-21 17:44:08 +08:00
b3d206d981 doc: update README.md. 2022-12-21 09:34:54 +00:00
9ec7595b83 doc: update CONTRIBUTING.md. 2022-12-21 09:34:53 +00:00
ef823de9a5 doc: update javascript.md Proxy and Reflect (#243) 2022-12-21 17:33:23 +08:00
da22b78d8f doc: update README.md. 2022-12-20 06:46:14 +00:00
06978b1601 doc: update CONTRIBUTING.md. 2022-12-20 06:46:13 +00:00
b768bd4e9b doc: update README.md. 2022-12-20 06:45:19 +00:00
a143e30d93 doc: update CONTRIBUTING.md. 2022-12-20 06:45:18 +00:00
7ac675e34c feat: add mirror (#239) 2022-12-20 14:44:40 +08:00
8e3307272c doc: Update java.md (#240)
修正一些文字说明,补充下ConcurrentHashMap的使用
2022-12-20 14:44:11 +08:00
0c9fb086ee released v1.33.0 2022-12-18 00:11:53 +08:00
f1200c67e1 feat: add adb.md cheatsheet. #233 2022-12-18 00:08:37 +08:00
cc20a31a47 doc: update quickreference.md. 2022-12-18 00:08:37 +08:00
1f34ea3bc3 doc: update README.md. 2022-12-17 13:48:04 +00:00
61b3b5deec doc: update CONTRIBUTING.md. 2022-12-17 13:48:03 +00:00
3fed079194 doc: update README.md. (#235) 2022-12-17 21:46:36 +08:00
c481bcdb7b doc: update README.md. 2022-12-17 13:07:35 +00:00
96e752e809 doc: update CONTRIBUTING.md. 2022-12-17 13:07:35 +00:00
01d238eaab doc: update make.md (#234) 2022-12-17 21:06:15 +08:00
07aaae0e2b chore: support more platforms. #232 2022-12-17 17:59:22 +08:00
247cd4d4e6 chore: support aarch64. #232 2022-12-17 17:24:43 +08:00
9945c1b16f chore: support aarch64. #232 2022-12-17 17:16:57 +08:00
8b151f891c doc: update lua.md. 2022-12-17 11:56:25 +08:00
9dd378128e doc: update README.md. 2022-12-17 01:05:50 +00:00
6b286b6eb6 doc: update CONTRIBUTING.md. 2022-12-17 01:05:49 +00:00
d280013c31 docs: update golang.md (#231) 2022-12-17 09:04:28 +08:00
bdf0dc17cd feat: add reactrouter.md cheatsheet. 2022-12-17 00:55:16 +08:00
4995e6f500 doc: update README.md. 2022-12-16 14:31:59 +00:00
822e08a6de doc: update CONTRIBUTING.md. 2022-12-16 14:31:58 +00:00
88f392c532 doc: update feds.md. 2022-12-16 22:30:13 +08:00
72766dfabe doc: update vscode.md (#230) 2022-12-16 15:05:38 +08:00
bfe5551acf feat: add feds.md cheatsheet. 2022-12-15 23:52:28 +08:00
c5792b7c7e doc: update README.md. 2022-12-15 14:34:54 +00:00
81548feeef doc: update CONTRIBUTING.md. 2022-12-15 14:34:53 +00:00
5e284e6f14 doc: update java.md (#229) 2022-12-15 22:33:42 +08:00
3c4540d248 doc: update README.md. 2022-12-15 06:31:36 +00:00
e8ccba5cbb doc: update CONTRIBUTING.md. 2022-12-15 06:31:35 +00:00
e6d2a48410 doc: update flask.md (#228) (#223) 2022-12-15 14:30:17 +08:00
a82f7b948e doc: update typescript.md. 2022-12-15 10:33:19 +08:00
7c17fe1222 chore: update script. 2022-12-14 12:59:16 +08:00
e781a3b20e doc: update flask logo. 2022-12-14 12:39:04 +08:00
64 changed files with 7795 additions and 360 deletions

View File

@ -1,20 +0,0 @@
---
name: 🐞 错误报告
about: 当出现问题时提交报告以便修复!
title: '错误报告: xxx.md'
labels: bug
assignees: jaywcjlove
---
### 错误类型
- [ ] 排版 & 文字错误
- [ ] 清单内容示例错误
### 错误清单
`xxx.md`
### 错误内容描述
请在这里描述具体错误内容。

42
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: 🐞 错误报告
description: 当出现问题时提交报告以便修复!
title: '🐞 错误报告: xxx.md'
labels: ['request']
assignees: jaywcjlove
body:
- type: markdown
attributes:
value: |
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
注意:请求太多,请按照下面内容提供错误报告
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
- type: input
id: error-list
attributes:
label: 📄 错误清单
description: 指定错误清单文件,方便我们快速定位错误。
placeholder: ex. `docs/ansible.md`
validations:
required: true
- type: checkboxes
id: error-type
attributes:
label: 🧨 错误类型
description: 请选择错误类型。
options:
- label: 排版 & 文字错误
- label: 清单内容示例错误
- label: 其它
validations:
required: true
- type: textarea
id: description
attributes:
label: 📖 错误说明
description: 您可以在这里简单的提供一些资料,方便我们在 Quick Reference 中添加您想添加的备忘清单(速查表)。
placeholder: 请您在这里详细介绍具体错误问题
validations:
required: true

View File

@ -1,36 +0,0 @@
---
name: 🤙 备忘清单请求
about: 请求添加备忘清单和参考。
title: '请求添加备忘清单: '
labels: request
assignees: jaywcjlove
---
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
注意:请求太多,参考【优先级】快速添加内容
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
#### 优先级
- [ ] 提交 PR 优先合并(优先处理)
- [ ] 提供可复制的[中文/英文]备忘清单资料,优先添加
- [ ] 大众化的内容(java/python),优先搬运(小众内容请提供资料)
#### 说明项目
您可以在这里简单的提供一些资料,方便我们在 Quick Reference 中添加您想添加的备忘清单(速查表)。
【请您在这里介绍一下工具或者语言,这很重要】
- 如果你有一张不错的备忘清单(速查表) [`参考这里`](https://github.com/jaywcjlove/reference/blob/main/CONTRIBUTING.md) 为仓库贡献。
- 如果您不方便贡献,请在下方参考资料中提供链接地址,方便共建备忘清单(速查表)
- 这里为您提供了 Markdown 排版[示例教程](https://jaywcjlove.github.io/reference/docs/quickreference.html)
#### 提供参考资料地址
提供更多参考资料有助于我们整理成备忘清单(速查表)
- 提供参考地址 https://jaywcjlove.github.io/reference
- 提供官网地址 https://jaywcjlove.github.io/reference
_⚠ 注意: 随着内容越来越多可能甚至找不到这个工具或者语言的官网请您在这里提供以便大家共同参与贡献内容_

View File

@ -0,0 +1,55 @@
name: 🤙 备忘清单请求
description: 请求添加备忘清单和参考
title: '【备忘清单】 请求: <Name>'
labels: ['request']
assignees: jaywcjlove
body:
- type: markdown
attributes:
value: |
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
注意:请求太多,参考【优先级】快速添加内容
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
### 优先级
- 提交 PR 优先合并(优先处理)
- 提供可复制的[中文/英文]备忘清单资料,优先添加
- 大众化的内容(java/python),优先搬运(小众内容请提供资料)
- type: textarea
id: description
attributes:
label: 说明项目
description: 您可以在这里简单的提供一些资料,方便我们在 Quick Reference 中添加您想添加的备忘清单(速查表)。
placeholder: 【请您在这里介绍一下工具或者语言,这很重要】
validations:
required: true
- type: input
id: official-website
attributes:
label: 提供官网
description: 提供官网网站有助于我们整理成备忘清单(速查表)
placeholder: ex. https://xxx.com
- type: markdown
attributes:
value: |
_⚠ 注意: 随着内容越来越多可能甚至找不到这个工具或者语言的官网请您在这里提供以便大家共同参与贡献内容_
- type: textarea
id: reference-url
attributes:
label: 参考资料 URL
description: 提供更多参考资料有助于我们整理成备忘清单(速查表)
placeholder: |
https://jaywcjlove.github.io/reference
https://jaywcjlove.github.io/reference
validations:
required: true
- type: markdown
attributes:
value: |
_⚠ 注意: 提供更多参考资料以便大家共同参与贡献内容_

14
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: 😍 投稿指南
url: https://github.com/jaywcjlove/reference/blob/main/CONTRIBUTING.md
about: 请在做出任何贡献之前通读!
- name: 🚀 部署镜像网站
url: https://github.com/jaywcjlove/reference/issues/102#issue-1451649637
about: 部署镜像网站教程在这里!
- name: 🪩 清单排版布局说明
url: https://jaywcjlove.github.io/reference/docs/quickreference.html
about: 部署镜像网站教程在这里!
- name: 🪩 Markdown 语法说明
url: https://jaywcjlove.github.io/reference/docs/markdown.html
about: 部署镜像网站教程在这里!

View File

@ -84,7 +84,7 @@ jobs:
id: changelog
uses: jaywcjlove/changelog-generator@main
with:
filter-author: (小弟调调™)
filter-author: (小弟调调™|github-actions-bot|dependabot|renovate\\[bot\\]|dependabot\\[bot\\]|Renovate Bot)
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
- name: Create Release
@ -122,8 +122,7 @@ jobs:
```
# Create Docker Image
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
@ -136,7 +135,7 @@ jobs:
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKER_USER }}/reference:latest
tags: wcjiang/reference:latest
- name: Build and push image:tags
uses: docker/build-push-action@v3
@ -145,7 +144,7 @@ jobs:
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKER_USER }}/reference:${{steps.changelog.outputs.version}}
tags: wcjiang/reference:${{steps.changelog.outputs.version}}
# Create Docker Image in Github
- name: Login to the GitHub Container Registry

View File

@ -132,75 +132,164 @@ REF_LABEL=网站首页
由于中国国内访问,时常打不开,你可以访问下面镜像网站。
- [quickref.cn](https://quickref.cn)
- [ecdata.cn](http://ref.ecdata.cn)
- [mofe.io](http://quickref.mofe.io)
- [aibk.cn](https://quickref.aibk.cn)
- [jgeek.cn](http://reference.jgeek.cn/)
- [laoleng.vip](http://bbs.laoleng.vip/reference/)
- [liujiapeng.com](https://www.liujiapeng.com/)
- [dbyun.net](https://www.dbyun.net/reference/index.html)
- [dc6.fun](https://dc6.fun/reference/)
- [if010.com](https://quickref.if010.com/)
- [pipecraft.net](https://quickref.pipecraft.net/)
- [isteed.cc](https://ref.isteed.cc/)
- [1han.wiki](https://code.1han.wiki/)
- [linzhe.top](https://linzhe.top/)
- [xushanxiang.com](https://xushanxiang.com/ref/)
- [winnerzr01.github.io](https://winnerzr01.github.io/Quick-Reference/index.html)
- [hestudio.org](https://quickref.hestudio.org)
- [surcode.cn](https://ref.surcode.cn)
- [cms.im](https://quickref.cms.im/)
- [nuomiphp.com](https://reference.tool.nuomiphp.com/)
- [eryajf.net](https://ref.eryajf.net/)
- [kjchmc.cn](https://ref.kjchmc.cn/)
- [likeadmin.cn](https://www.likeadmin.cn/quickref/)
- [qiubit.cc](http://ref.qiubit.cc)
- [aoh.cc](https://aoh.cc/)
- [reference.code05.com](https://reference.code05.com/)
- [kyoma.top](https://reference.kyoma.top/)
- [quickreference.pages.dev](https://quickreference.pages.dev/)
- [code05.com](https://reference.code05.com/)
- [xhfun.cn](https://ref.xhfun.cn/)
感谢🙏
## 利用 Github Actions 定时任务来完成自动更新
在仓库添加 `.github/workflows/update-ref.yml` 文件 Github Actions 配置,感谢 @eryajf https://github.com/jaywcjlove/reference/issues/102#issuecomment-1368158419 提供方法
```yml
name: 每8个小时更新一次reference
on:
schedule:
- cron: '21 */8 * * *' # 定时任务
workflow_dispatch: # 手动运行
env: # 设置环境变量
TZ: Asia/Shanghai # 时区(设置时区可使页面中的`最近更新时间`使用时区时间)
jobs:
build: # 自定义名称
runs-on: ubuntu-latest
steps:
- name: 🚜 拉取最新代码
uses: actions/checkout@v3
with:
ref: 'main'
repository: 'jaywcjlove/reference'
- name: ♻️ 编译静态文件
run: |
echo -e 'REF_URL=https://refs.xxx.net/\nREF_LABEL=网站首页' > .env
npm install
npm run build
- name: 🚁 部署到服务器
uses: wlixcc/SFTP-Deploy-Action@v1.0
with:
username: 'root' #ssh user name
port: '22' # 远程服务器ssh端口默认22
server: 'prod.refs.xxx.net' # 远程服务器IP
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} # 认证服务器秘钥对的私钥
local_path: './dist/*' # 对应我们项目打包后的静态文件路径
remote_path: '/data/www/refs.xxx.net' # 服务器上的路径
delete_remote_files: true
```
## 贡献
请参阅[贡献指南](./CONTRIBUTING.md)了解如何开始。一如既往,感谢我们出色的贡献者!
<!--GAMFC--><a href="https://github.com/jaywcjlove" title="小弟调调">
<img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/>
<!--GAMFC--><a href="https://github.com/jaywcjlove" title="小弟调调">
<img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/>
</a>
<a href="https://github.com/fwqaaq" title="fw_qaq">
<img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fw_qaq"/>
<a href="https://github.com/fwqaaq" title="fwqaaq">
<img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fwqaaq"/>
</a>
<a href="https://github.com/mofelee" title="mofelee">
<img src="https://avatars.githubusercontent.com/u/5069410?v=4" width="42;" alt="mofelee"/>
</a>
<a href="https://github.com/JeffersonHuang" title="Jefferson">
<img src="https://avatars.githubusercontent.com/u/47512530?v=4" width="42;" alt="Jefferson"/>
<a href="https://github.com/JeffersonHuang" title="Jefferson Huang">
<img src="https://avatars.githubusercontent.com/u/47512530?v=4" width="42;" alt="Jefferson Huang"/>
</a>
<a href="https://github.com/Alex-Programer" title="Alex">
<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/expoli" title="expoli">
<img src="https://avatars.githubusercontent.com/u/31023767?v=4" width="42;" alt="expoli"/>
</a>
<a href="https://github.com/eryajf" title="二丫讲梵">
<img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/>
</a>
<a href="https://github.com/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/chaos-cn" title="chaos">
<img src="https://avatars.githubusercontent.com/u/71205599?v=4" width="42;" alt="chaos"/>
</a>
<a href="https://github.com/MarioMang" title="MarioMang">
<img src="https://avatars.githubusercontent.com/u/3959555?v=4" width="42;" alt="MarioMang"/>
</a>
<a href="https://github.com/qyl27" title="秋 雨落">
<img src="https://avatars.githubusercontent.com/u/53731501?v=4" width="42;" alt="秋 雨落"/>
</a>
<a href="https://github.com/heStudio-Network" title="醉、倾城">
<img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="醉、倾城"/>
</a>
<a href="https://github.com/sjh42" title="42:p">
<img src="https://avatars.githubusercontent.com/u/34529275?v=4" width="42;" alt="42:p"/>
</a>
<a href="https://github.com/LufsX" title="LufsX">
<img src="https://avatars.githubusercontent.com/u/33221883?v=4" width="42;" alt="LufsX"/>
<a href="https://github.com/XYZscratcher" title="XYZ">
<img src="https://avatars.githubusercontent.com/u/108533817?v=4" width="42;" alt="XYZ"/>
</a>
<a href="https://github.com/1834423612" title="kjch">
<img src="https://avatars.githubusercontent.com/u/49981661?v=4" width="42;" alt="kjch"/>
</a>
<a href="https://github.com/mancuoj" title="mancuoj">
<img src="https://avatars.githubusercontent.com/u/45707684?v=4" width="42;" alt="mancuoj"/>
</a>
<a href="https://github.com/pangxiaoli" title="pangxiaoli">
<img src="https://avatars.githubusercontent.com/u/54620953?v=4" width="42;" alt="pangxiaoli"/>
</a>
<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/ryanhex53" title="ryanhex53">
<img src="https://avatars.githubusercontent.com/u/360426?v=4" width="42;" alt="ryanhex53"/>
</a>
<a href="https://github.com/eryajf" title="二丫讲梵">
<img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/>
</a>
<a href="https://github.com/catcto" title="喵仙人">
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="喵仙人"/>
</a>
<a href="https://github.com/Country-If" title="Maylon">
<img src="https://avatars.githubusercontent.com/u/62837275?v=4" width="42;" alt="Maylon"/>
</a>
<a href="https://github.com/13812700839" title="花殇">
<img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/>
</a>
<a href="https://github.com/Smartdousha" title="dousha">
<img src="https://avatars.githubusercontent.com/u/52566311?v=4" width="42;" alt="dousha"/>
<a href="https://github.com/dousha0w0" title="dousha0w0">
<img src="https://avatars.githubusercontent.com/u/52566311?v=4" width="42;" alt="dousha0w0"/>
</a>
<a href="https://github.com/Brid9e" title="Brid9e">
<img src="https://avatars.githubusercontent.com/u/85558909?v=4" width="42;" alt="Brid9e"/>
<a href="https://github.com/Brid9e" title="Joe">
<img src="https://avatars.githubusercontent.com/u/85558909?v=4" width="42;" alt="Joe"/>
</a>
<a href="https://github.com/ch3nnn" title="陈通">
<img src="https://avatars.githubusercontent.com/u/40114564?v=4" width="42;" alt="陈通"/>
</a>
<a href="https://github.com/CharlotteZeng" title="hanchZ">
<img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="hanchZ"/>
</a>
<a href="https://github.com/DaiNing810" title="DaiN">
<img src="https://avatars.githubusercontent.com/u/94962339?v=4" width="42;" alt="DaiN"/>
<a href="https://github.com/Damao2250" title="Damao">
<img src="https://avatars.githubusercontent.com/u/19251992?v=4" width="42;" alt="Damao"/>
</a>
<a href="https://github.com/demigodliu" title="DemigodLiu">
<img src="https://avatars.githubusercontent.com/u/30372735?v=4" width="42;" alt="DemigodLiu"/>
@ -208,54 +297,132 @@ REF_LABEL=网站首页
<a href="https://github.com/eeeeeio" title="EEEEE">
<img src="https://avatars.githubusercontent.com/u/20723545?v=4" width="42;" alt="EEEEE"/>
</a>
<a href="https://github.com/Fuku-L" title="Fuku-L">
<img src="https://avatars.githubusercontent.com/u/38535911?v=4" width="42;" alt="Fuku-L"/>
</a>
<a href="https://github.com/gongyeheyu" title="GONGYE Heyu">
<img src="https://avatars.githubusercontent.com/u/85177605?v=4" width="42;" alt="GONGYE Heyu"/>
</a>
<a href="https://github.com/Ding-Kyoma" title="HooinKyoma">
<img src="https://avatars.githubusercontent.com/u/44542198?v=4" width="42;" alt="HooinKyoma"/>
</a>
<a href="https://github.com/ljq" title="Jack Liu">
<img src="https://avatars.githubusercontent.com/u/7278286?v=4" width="42;" alt="Jack Liu"/>
</a>
<a href="https://github.com/jasnzhuang" title="Jason Zhuang">
<img src="https://avatars.githubusercontent.com/u/16612921?v=4" width="42;" alt="Jason Zhuang"/>
</a>
<a href="https://github.com/JetSquirrel" title="JetSquirrel">
<img src="https://avatars.githubusercontent.com/u/20291255?v=4" width="42;" alt="JetSquirrel"/>
</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/Lihuagreek" title="Lihuagreek">
<img src="https://avatars.githubusercontent.com/u/51040740?v=4" width="42;" alt="Lihuagreek"/>
</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/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/malcolmyu" title="Minghao Yu">
<img src="https://avatars.githubusercontent.com/u/3203962?v=4" width="42;" alt="Minghao Yu"/>
</a>
<a href="https://github.com/Moeyuuko" title="Moeyuuko">
<img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/>
</a>
<a href="https://github.com/Mo3et" title="Monet Lee">
<img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee"/>
</a>
<a href="https://github.com/HanaNoryu" title="Noryu">
<img src="https://avatars.githubusercontent.com/u/109856546?v=4" width="42;" alt="Noryu"/>
</a>
<a href="https://github.com/Perzch" title="Perzch">
<img src="https://avatars.githubusercontent.com/u/67987641?v=4" width="42;" alt="Perzch"/>
</a>
<a href="https://github.com/PipecraftNet" title="Pipecraft">
<img src="https://avatars.githubusercontent.com/u/88728670?v=4" width="42;" alt="Pipecraft"/>
</a>
<a href="https://github.com/QDelta" title="QDelta">
<img src="https://avatars.githubusercontent.com/u/60222316?v=4" width="42;" alt="QDelta"/>
</a>
<a href="https://github.com/qinxiongzhou" title="Ryan Zhou">
<img src="https://avatars.githubusercontent.com/u/33239096?v=4" width="42;" alt="Ryan Zhou"/>
</a>
<a href="https://github.com/whb1998a" title="WHB">
<img src="https://avatars.githubusercontent.com/u/44045064?v=4" width="42;" alt="WHB"/>
</a>
<a href="https://github.com/hi-liyan" title="Yan Li">
<img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="Yan Li"/>
<a href="https://github.com/BATTLEHAWK00" title="While True: learn()">
<img src="https://avatars.githubusercontent.com/u/45313304?v=4" width="42;" alt="While True: learn()"/>
</a>
<a href="https://github.com/hi-liyan" title="嘉木旅人">
<img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="嘉木旅人"/>
</a>
<a href="https://github.com/Yo-gurts" title="Yogurt">
<img src="https://avatars.githubusercontent.com/u/44612841?v=4" width="42;" alt="Yogurt"/>
</a>
<a href="https://github.com/dfshizhiqiang" title="Zech">
<img src="https://avatars.githubusercontent.com/u/7030019?v=4" width="42;" alt="Zech"/>
</a>
<a href="https://github.com/yikuaibro" title="yikuaibro">
<img src="https://avatars.githubusercontent.com/u/44493045?v=4" width="42;" alt="yikuaibro"/>
</a>
<a href="https://github.com/zhu0629" title="Zhu">
<img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="Zhu"/>
</a>
<a href="https://github.com/Leaderzhangyi" title="ZinkCas">
<img src="https://avatars.githubusercontent.com/u/46915666?v=4" width="42;" alt="ZinkCas"/>
</a>
<a href="https://github.com/y52y" title="Zyj">
<img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/>
</a>
<a href="https://github.com/Lmmmmmm-bb" title="_lmmmmmm">
<img src="https://avatars.githubusercontent.com/u/54026110?v=4" width="42;" alt="_lmmmmmm"/>
</a>
<a href="https://github.com/chyok" title="chyok">
<img src="https://avatars.githubusercontent.com/u/32629225?v=4" width="42;" alt="chyok"/>
</a>
<a href="https://github.com/gaoxiaoduan" title="coderduan">
<img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="coderduan"/>
<a href="https://github.com/gaoxiaoduan" title="Jerrod Cole">
<img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="Jerrod Cole"/>
</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/godotc" title="godotc">
<img src="https://avatars.githubusercontent.com/u/79260851?v=4" width="42;" alt="godotc"/>
<a href="https://github.com/fakevn" title="fakevn">
<img src="https://avatars.githubusercontent.com/u/11464386?v=4" width="42;" alt="fakevn"/>
</a>
<a href="https://github.com/fjqz177" title="fjqz177">
<img src="https://avatars.githubusercontent.com/u/83070583?v=4" width="42;" alt="fjqz177"/>
</a>
<a href="https://github.com/gi-b716" title="gi-b716">
<img src="https://avatars.githubusercontent.com/u/78394473?v=4" width="42;" alt="gi-b716"/>
</a>
<a href="https://github.com/godotc" title="godot42">
<img src="https://avatars.githubusercontent.com/u/79260851?v=4" width="42;" alt="godot42"/>
</a>
<a href="https://github.com/greyhao" title="greyhao">
<img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="greyhao"/>
</a>
<a href="https://github.com/sunny0826" title="Xudong Guo">
<img src="https://avatars.githubusercontent.com/u/24563928?v=4" width="42;" alt="Xudong Guo"/>
</a>
<a href="https://github.com/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/auroraslot" title="Tang Weize">
<img src="https://avatars.githubusercontent.com/u/48817882?v=4" width="42;" alt="Tang Weize"/>
</a>
<a href="https://github.com/joyfully-W" title="joyfully-W">
<img src="https://avatars.githubusercontent.com/u/32212924?v=4" width="42;" alt="joyfully-W"/>
</a>
<a href="https://github.com/k983551019" title="k983551019">
<img src="https://avatars.githubusercontent.com/u/48147837?v=4" width="42;" alt="k983551019"/>
</a>
@ -265,6 +432,9 @@ REF_LABEL=网站首页
<a href="https://github.com/genius-kim" title="kim">
<img src="https://avatars.githubusercontent.com/u/119488561?v=4" width="42;" alt="kim"/>
</a>
<a href="https://github.com/kubeme" title="kubernetes for me">
<img src="https://avatars.githubusercontent.com/u/16346220?v=4" width="42;" alt="kubernetes for me"/>
</a>
<a href="https://github.com/larry-xue" title="larry">
<img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="larry"/>
</a>
@ -274,32 +444,50 @@ REF_LABEL=网站首页
<a href="https://github.com/lykjjj" title="lykjjj">
<img src="https://avatars.githubusercontent.com/u/58510058?v=4" width="42;" alt="lykjjj"/>
</a>
<a href="https://github.com/mancuoj" title="mancuoj">
<img src="https://avatars.githubusercontent.com/u/45707684?v=4" width="42;" alt="mancuoj"/>
<a href="https://github.com/miclon-dev" title="miclon-dev">
<img src="https://avatars.githubusercontent.com/u/111753685?v=4" width="42;" alt="miclon-dev"/>
</a>
<a href="https://github.com/onewesong" title="onewesong">
<img src="https://avatars.githubusercontent.com/u/17920822?v=4" width="42;" alt="onewesong"/>
</a>
<a href="https://github.com/phygerr" title="phygerr">
<img src="https://avatars.githubusercontent.com/u/42068889?v=4" width="42;" alt="phygerr"/>
</a>
<a href="https://github.com/Mowmowj" title="shelton">
<img src="https://avatars.githubusercontent.com/u/24759562?v=4" width="42;" alt="shelton"/>
</a>
<a href="https://github.com/wjjwkwindy" title="wjjwkwindy">
<img src="https://avatars.githubusercontent.com/u/9508591?v=4" width="42;" alt="wjjwkwindy"/>
<a href="https://github.com/wannima66" title="tmen">
<img src="https://avatars.githubusercontent.com/u/26410255?v=4" width="42;" alt="tmen"/>
</a>
<a href="https://github.com/wjjwkwindy" title="Hudson Alen">
<img src="https://avatars.githubusercontent.com/u/9508591?v=4" width="42;" alt="Hudson Alen"/>
</a>
<a href="https://github.com/xing133" title="xing133">
<img src="https://avatars.githubusercontent.com/u/5336490?v=4" width="42;" alt="xing133"/>
</a>
<a href="https://github.com/zxx-457" title="zxx-457">
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx-457"/>
<a href="https://github.com/zxx457" title="zxx457">
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx457"/>
</a>
<a href="https://github.com/lvzhenbo" title="吕振波">
<img src="https://avatars.githubusercontent.com/u/32427677?v=4" width="42;" alt="吕振波"/>
</a>
<a href="https://github.com/qyl27" title="秋雨落">
<img src="https://avatars.githubusercontent.com/u/53731501?v=4" width="42;" alt="秋雨落"/>
<a href="https://github.com/LuckyJie12" title="夜未央">
<img src="https://avatars.githubusercontent.com/u/102901105?v=4" width="42;" alt="夜未央"/>
</a>
<a href="https://github.com/ZIDOUZI" title="子斗子">
<img src="https://avatars.githubusercontent.com/u/53157536?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/1250422131" title="萌新杰少">
<img src="https://avatars.githubusercontent.com/u/52126790?v=4" width="42;" alt="萌新杰少"/>
</a>
<a href="https://github.com/qwxingzhe" title="行者">
<img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/>
</a>
<a href="https://github.com/Zeng-qh" title="都一样">
<img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/>
</a><!--GAMFC-END-->
上图贡献者列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 自动生成贡献者图片。

View File

@ -1,6 +1,6 @@
# https://lipanski.com/posts/smallest-docker-image-static-website
# https://github.com/lipanski/docker-static-website
FROM lipanski/docker-static-website:latest
FROM wcjiang/docker-static-website:latest
# Copy the static website
# Use the .dockerignore file to control what ends up inside the image!

242
README.md
View File

@ -53,8 +53,9 @@ Quick Reference
[INI](./docs/ini.md)<!--rehype:style=background: rgb(57 59 60);-->
[JSON](./docs/json.md)<!--rehype:style=background: rgb(57 59 60);-->
[Java](./docs/java.md)<!--rehype:style=background: rgb(211 55 49);&class=contributing&data-info=👆看看还缺点儿什么?-->
[Julia](./docs/julia.md)<!--rehype:style=background: rgb(211 55 49);&class=contributing&data-info=👆看看还缺点儿什么?-->
[Julia](./docs/julia.md)<!--rehype:style=background: rgb(26 188 156);&class=contributing&data-info=👆看看还缺点儿什么?-->
[Kotlin](./docs/kotlin.md)<!--rehype:style=background: rgb(211 55 49);&class=contributing&data-info=👆看看还缺点儿什么?-->
[Kubernetes](./docs/kubernetes.md)<!--rehype:style=background: rgb(51 113 227);&class=contributing&data-info=👆看看还缺点儿什么?-->
[LaTeX](./docs/latex.md)<!--rehype:style=background: rgb(0 128 128);&class=contributing-->
[Laravel 8](./docs/laravel.md)<!--rehype:style=background: rgb(249 50 44);&class=contributing tag&data-lang=PHP-->
[Markdown](./docs/markdown.md)<!--rehype:style=background: rgb(103 61 156);-->
@ -63,6 +64,7 @@ Quick Reference
[Python](./docs/python.md)<!--rehype:style=background: rgb(43 91 132);-->
[Ruby](./docs/ruby.md)<!--rehype:style=background: rgb(204 52 45);-->
[Rust](./docs/rust.md)<!--rehype:style=background: rgb(71 71 71);-->
[Scala](./docs/scala.md)<!--rehype:style=background: rgb(34 82 94);-->
[Swift](./docs/swift.md)<!--rehype:style=background: rgb(240 81 57);-->
[SwiftUI](./docs/swiftui.md)<!--rehype:style=background: rgb(10 127 247);&class=tag&data-lang=swift-->
[TOML](./docs/toml.md)<!--rehype:style=background: rgb(132 132 132);-->
@ -73,6 +75,7 @@ Quick Reference
## 前端
[前端导航](./docs/feds.md)<!--rehype:style=background: rgb(35 115 205);&class=tag&data-lang=导航-->
[CSS 3](./docs/css.md)<!--rehype:style=background: rgb(35 115 205);&class=tag&data-lang=CSS-->
[Electron](./docs/electron.md)<!--rehype:style=background: rgb(0 72 153);-->
[Emmet](./docs/emmet.md)<!--rehype:style=background: rgb(122 203 23);-->
@ -86,6 +89,7 @@ Quick Reference
[Less.js](./docs/lessjs.md)<!--rehype:style=background: rgb(29 54 93);&class=tag&data-lang=CSS-->
[Next.js](./docs/nextjs.md)<!--rehype:style=background: rgb(0 0 0);&class=tag&data-lang=React-->
[React](./docs/react.md)<!--rehype:style=background: rgb(34 143 173);-->
[React Router](./docs/reactrouter.md)<!--rehype:style=background: rgb(244 66 79);&class=tag&data-lang=React-->
[React Native](./docs/react-native.md)<!--rehype:style=background: rgb(34 143 173);&class=tag&data-lang=React-->
[RegEx 正则表达式](./docs/regex.md)<!--rehype:style=background: rgb(149 36 155);-->
[TypeScript](./docs/typescript.md)<!--rehype:style=background: rgb(49 120 198);-->
@ -120,9 +124,11 @@ Quick Reference
## 命令
[ADB, Android Debug Bridge](./docs/adb.md)<!--rehype:style=background: rgb(238 0 0);&class=contributing tag&data-lang=Android&data-info=👆看看还缺点儿什么?-->
[Ansible](./docs/ansible.md)<!--rehype:style=background: rgb(238 0 0);&class=contributing tag&data-lang=RedHat&data-info=👆看看还缺点儿什么?-->
[Awk](./docs/awk.md)<!--rehype:style=background: rgb(16 185 129);-->
[Conan](./docs/conan.md)<!--rehype:style=background: rgb(0 193 9);&class=tag&data-lang=C/C++-->
[Conda](./docs/conda.md)<!--rehype:style=background: rgb(68 168 51);&class=tag&data-lang=Python-->
[CocoaPods](./docs/cocoapods.md)<!--rehype:style=background: rgb(251 0 6);&class=tag&data-lang=C/C++-->
[Cargo](./docs/cargo.md)<!--rehype:style=background: rgb(71 71 71);&class=tag&data-lang=Rust-->
[Curl](./docs/curl.md)<!--rehype:style=background: rgb(16 185 129);-->
@ -130,6 +136,7 @@ Quick Reference
[Cron](./docs/cron.md)<!--rehype:style=background: rgb(239 68 68);-->
[CMake](./docs/cmake.md)<!--rehype:style=background: rgb(92 107 192);&class=contributing-->
[Make](./docs/make.md)<!--rehype:style=background: rgb(99 99 99);&class=contributing-->
[Gdb](./docs/gdb.md)<!--rehype:style=background: rgb(215 89 62);-->
[Git](./docs/git.md)<!--rehype:style=background: rgb(215 89 62);-->
[Grep](./docs/grep.md)<!--rehype:style=background: rgb(16 185 129);-->
[Find](./docs/find.md)<!--rehype:style=background: rgb(16 185 129);-->
@ -139,11 +146,13 @@ Quick Reference
[Netstat](./docs/netstat.md)<!--rehype:style=background: rgb(16 185 129);-->
[iptables](./docs/iptables.md)<!--rehype:style=background: rgb(32 74 135);-->
[jq](./docs/jq.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=JSON-->
[Justfile](./docs/justfile.md)<!--rehype:style=background: rgb(16 185 129);-->
[Lsof](./docs/lsof.md)<!--rehype:style=background: rgb(16 185 129);-->
[Mitmproxy](./docs/mitmproxy.md)<!--rehype:style=background: rgb(4 92 135);-->
[Netcat](./docs/netcat.md)<!--rehype:style=background: rgb(4 92 135);-->
[Sed](./docs/sed.md)<!--rehype:style=background: rgb(16 185 129);-->
[OpenSSL](./docs/openssl.md)<!--rehype:style=background: rgb(114 20 18);-->
[ps](./docs/ps.md)<!--rehype:style=background: rgb(99 99 99);-->
[Systemd](./docs/systemd.md)<!--rehype:style=background: rgb(16 185 129);-->
[SSH](./docs/ssh.md)<!--rehype:style=background: rgb(99 99 99);-->
[Screen](./docs/screen.md)<!--rehype:style=background: rgb(99 99 99);-->
@ -151,13 +160,17 @@ Quick Reference
[Tmux](./docs/tmux.md)<!--rehype:style=background: rgb(99 99 99);-->
[YUM](./docs/yum.md)<!--rehype:style=background: rgb(86 86 123);-->
[CMD](./docs/cmd.md)<!--rehype:style=background: rgb(99 99 99);-->
[Zip](./docs/zip.md)<!--rehype:style=background: rgb(99 99 99);-->
[APT](./docs/apt.md)<!--rehype:style=background: rgb(30 144 255);-->
[tar](./docs/tar.md)<!--rehype:style=background: rgb(215 89 62);-->
[pacman](./docs/pacman.md)<!--rehype:style=background: rgb(24 147 209);&class=tag&data-lang=archlinux&class=contributing-->
[Linux Command](./docs/linux-command.md)<!--rehype:style=background: rgb(215 89 62);&class=tag&data-lang=命令速查-->
<!--rehype:class=home-card-->
## 数据库
[MySQL](./docs/mysql.md)<!--rehype:style=background: rgb(1 117 143);&class=tag&data-lang=SQL-->
[MongoDB](./docs/mongodb.md)<!--rehype:style=background: rgb(0 237 100);-->
[Oracle](./docs/oracle.md)<!--rehype:style=background: rgb(255 0 0);&class=tag&data-lang=SQL-->
[PostgreSQL](./docs/postgres.md)<!--rehype:style=background: rgb(43 109 163);&class=tag&data-lang=SQL-->
[Redis](./docs/redis.md)<!--rehype:style=background: rgb(198 47 44);-->
@ -174,6 +187,7 @@ Quick Reference
[Gitlab](./docs/gitlab.md)<!--rehype:style=background: rgb(226 67 41);-->
[Google Chrome](./docs/google-chrome.md)<!--rehype:style=background: rgb(29 116 232);-->
[IntelliJ IDEA](./docs/intelli-j-idea.md)<!--rehype:style=background: rgb(223 148 0);&class=tag&data-lang=Java-->
[PyCharm](./docs/pycharm.md)<!--rehype:style=background: rgb(36 215 137);&class=tag&data-lang=Python-->
[Sketch](./docs/sketch.md)<!--rehype:style=background: rgb(223 148 0);&class=tag&data-lang=macOS-->
[Sublime Text](./docs/sublime-text.md)<!--rehype:style=background: rgb(223 148 0);-->
[VSCode](./docs/vscode.md)<!--rehype:style=background: rgb(91 163 230);-->
@ -183,7 +197,7 @@ Quick Reference
## 其它
[Quick Reference](./docs/quickreference.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=排版说明-->
[Quick Reference](./docs/quickreference.md)<!--rehype:style=background: rgb(0 182 122);&class=tag&data-lang=排版说明-->
[Aspect Ratio](./docs/aspect-ratio.md)<!--rehype:style=background: rgb(16 185 129);-->
[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-->
@ -191,7 +205,7 @@ Quick Reference
[HTTP 状态码](./docs/http-status-code.md)<!--rehype:style=background: rgb(16 185 129);-->
[HTML 字符实体](./docs/html-char.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=HTML-->
[ISO 639-1 Language Code](./docs/iso-639-1.md)<!--rehype:style=background: rgb(16 185 129);-->
[Emoji](./docs/emoji.md)<!--rehype:style=background: rgb(16 185 129);-->
[Emoji](./docs/emoji.md)<!--rehype:style=\-\-bg\-opacity: 0.75;background-image: linear-gradient(to left, rgba(74 222 128 / var(\-\-bg\-opacity)), rgba(59 130 246 / var(\-\-bg\-opacity)));-->
[MIME types](./docs/mime.md)<!--rehype:style=background: rgb(16 185 129);-->
[Resolutions](./docs/resolutions.md)<!--rehype:style=background: rgb(16 185 129);-->
<!--rehype:class=home-card-->
@ -201,7 +215,7 @@ Quick Reference
上面的列表没有看到你想要的? 您是否正在寻找一些备忘清单或参考资料,或者您有一些片段备忘清单要分享,这是一个最好的机会!
[`请求添加备忘单(速查表)`](https://github.com/jaywcjlove/reference/issues/new?title=【备忘清单】+请求%3A+&labels=request&template=cheatsheet-request.md&assignee=jaywcjlove)<!--rehype:class=home-button&style=margin-top:2rem&target=__blank-->
[`请求添加备忘单(速查表)`](https://github.com/jaywcjlove/reference/issues/new?title=【备忘清单】+请求%3A+&labels=request&template=cheatsheet-request.md&assignee=)<!--rehype:class=home-button&style=margin-top:2rem&target=__blank-->
[`我有一张备忘单(速查表)`](https://github.com/jaywcjlove/reference/blob/main/CONTRIBUTING.md)<!--rehype:class=home-button text-grey&target=__blank-->
<!--rehype:style=margin-top:3rem-->
@ -211,62 +225,86 @@ Quick Reference
请参阅 [Quick Reference](./docs/quickreference.md) 了解如何开始。一如既往,感谢我们出色的[贡献者](https://github.com/jaywcjlove/reference/graphs/contributors)
<!--rehype:style=padding-bottom:1rem;-->
<!--GAMFC--><a href="https://github.com/jaywcjlove" title="小弟调调">
<img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/>
<!--GAMFC--><a href="https://github.com/jaywcjlove" title="小弟调调">
<img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/>
</a>
<a href="https://github.com/fwqaaq" title="fw_qaq">
<img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fw_qaq"/>
<a href="https://github.com/fwqaaq" title="fwqaaq">
<img src="https://avatars.githubusercontent.com/u/82551626?v=4" width="42;" alt="fwqaaq"/>
</a>
<a href="https://github.com/mofelee" title="mofelee">
<img src="https://avatars.githubusercontent.com/u/5069410?v=4" width="42;" alt="mofelee"/>
</a>
<a href="https://github.com/JeffersonHuang" title="Jefferson">
<img src="https://avatars.githubusercontent.com/u/47512530?v=4" width="42;" alt="Jefferson"/>
<a href="https://github.com/JeffersonHuang" title="Jefferson Huang">
<img src="https://avatars.githubusercontent.com/u/47512530?v=4" width="42;" alt="Jefferson Huang"/>
</a>
<a href="https://github.com/Alex-Programer" title="Alex">
<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/expoli" title="expoli">
<img src="https://avatars.githubusercontent.com/u/31023767?v=4" width="42;" alt="expoli"/>
</a>
<a href="https://github.com/eryajf" title="二丫讲梵">
<img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/>
</a>
<a href="https://github.com/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/chaos-cn" title="chaos">
<img src="https://avatars.githubusercontent.com/u/71205599?v=4" width="42;" alt="chaos"/>
</a>
<a href="https://github.com/MarioMang" title="MarioMang">
<img src="https://avatars.githubusercontent.com/u/3959555?v=4" width="42;" alt="MarioMang"/>
</a>
<a href="https://github.com/qyl27" title="秋 雨落">
<img src="https://avatars.githubusercontent.com/u/53731501?v=4" width="42;" alt="秋 雨落"/>
</a>
<a href="https://github.com/heStudio-Network" title="醉、倾城">
<img src="https://avatars.githubusercontent.com/u/119711513?v=4" width="42;" alt="醉、倾城"/>
</a>
<a href="https://github.com/sjh42" title="42:p">
<img src="https://avatars.githubusercontent.com/u/34529275?v=4" width="42;" alt="42:p"/>
</a>
<a href="https://github.com/LufsX" title="LufsX">
<img src="https://avatars.githubusercontent.com/u/33221883?v=4" width="42;" alt="LufsX"/>
<a href="https://github.com/XYZscratcher" title="XYZ">
<img src="https://avatars.githubusercontent.com/u/108533817?v=4" width="42;" alt="XYZ"/>
</a>
<a href="https://github.com/1834423612" title="kjch">
<img src="https://avatars.githubusercontent.com/u/49981661?v=4" width="42;" alt="kjch"/>
</a>
<a href="https://github.com/mancuoj" title="mancuoj">
<img src="https://avatars.githubusercontent.com/u/45707684?v=4" width="42;" alt="mancuoj"/>
</a>
<a href="https://github.com/pangxiaoli" title="pangxiaoli">
<img src="https://avatars.githubusercontent.com/u/54620953?v=4" width="42;" alt="pangxiaoli"/>
</a>
<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/ryanhex53" title="ryanhex53">
<img src="https://avatars.githubusercontent.com/u/360426?v=4" width="42;" alt="ryanhex53"/>
</a>
<a href="https://github.com/eryajf" title="二丫讲梵">
<img src="https://avatars.githubusercontent.com/u/33259379?v=4" width="42;" alt="二丫讲梵"/>
</a>
<a href="https://github.com/catcto" title="喵仙人">
<img src="https://avatars.githubusercontent.com/u/5467932?v=4" width="42;" alt="喵仙人"/>
</a>
<a href="https://github.com/Country-If" title="Maylon">
<img src="https://avatars.githubusercontent.com/u/62837275?v=4" width="42;" alt="Maylon"/>
</a>
<a href="https://github.com/13812700839" title="花殇">
<img src="https://avatars.githubusercontent.com/u/58072506?v=4" width="42;" alt="花殇"/>
</a>
<a href="https://github.com/Smartdousha" title="dousha">
<img src="https://avatars.githubusercontent.com/u/52566311?v=4" width="42;" alt="dousha"/>
<a href="https://github.com/dousha0w0" title="dousha0w0">
<img src="https://avatars.githubusercontent.com/u/52566311?v=4" width="42;" alt="dousha0w0"/>
</a>
<a href="https://github.com/Brid9e" title="Brid9e">
<img src="https://avatars.githubusercontent.com/u/85558909?v=4" width="42;" alt="Brid9e"/>
<a href="https://github.com/Brid9e" title="Joe">
<img src="https://avatars.githubusercontent.com/u/85558909?v=4" width="42;" alt="Joe"/>
</a>
<a href="https://github.com/ch3nnn" title="陈通">
<img src="https://avatars.githubusercontent.com/u/40114564?v=4" width="42;" alt="陈通"/>
</a>
<a href="https://github.com/CharlotteZeng" title="hanchZ">
<img src="https://avatars.githubusercontent.com/u/19461184?v=4" width="42;" alt="hanchZ"/>
</a>
<a href="https://github.com/DaiNing810" title="DaiN">
<img src="https://avatars.githubusercontent.com/u/94962339?v=4" width="42;" alt="DaiN"/>
<a href="https://github.com/Damao2250" title="Damao">
<img src="https://avatars.githubusercontent.com/u/19251992?v=4" width="42;" alt="Damao"/>
</a>
<a href="https://github.com/demigodliu" title="DemigodLiu">
<img src="https://avatars.githubusercontent.com/u/30372735?v=4" width="42;" alt="DemigodLiu"/>
@ -274,54 +312,132 @@ Quick Reference
<a href="https://github.com/eeeeeio" title="EEEEE">
<img src="https://avatars.githubusercontent.com/u/20723545?v=4" width="42;" alt="EEEEE"/>
</a>
<a href="https://github.com/Fuku-L" title="Fuku-L">
<img src="https://avatars.githubusercontent.com/u/38535911?v=4" width="42;" alt="Fuku-L"/>
</a>
<a href="https://github.com/gongyeheyu" title="GONGYE Heyu">
<img src="https://avatars.githubusercontent.com/u/85177605?v=4" width="42;" alt="GONGYE Heyu"/>
</a>
<a href="https://github.com/Ding-Kyoma" title="HooinKyoma">
<img src="https://avatars.githubusercontent.com/u/44542198?v=4" width="42;" alt="HooinKyoma"/>
</a>
<a href="https://github.com/ljq" title="Jack Liu">
<img src="https://avatars.githubusercontent.com/u/7278286?v=4" width="42;" alt="Jack Liu"/>
</a>
<a href="https://github.com/jasnzhuang" title="Jason Zhuang">
<img src="https://avatars.githubusercontent.com/u/16612921?v=4" width="42;" alt="Jason Zhuang"/>
</a>
<a href="https://github.com/JetSquirrel" title="JetSquirrel">
<img src="https://avatars.githubusercontent.com/u/20291255?v=4" width="42;" alt="JetSquirrel"/>
</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/Lihuagreek" title="Lihuagreek">
<img src="https://avatars.githubusercontent.com/u/51040740?v=4" width="42;" alt="Lihuagreek"/>
</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/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/malcolmyu" title="Minghao Yu">
<img src="https://avatars.githubusercontent.com/u/3203962?v=4" width="42;" alt="Minghao Yu"/>
</a>
<a href="https://github.com/Moeyuuko" title="Moeyuuko">
<img src="https://avatars.githubusercontent.com/u/14266681?v=4" width="42;" alt="Moeyuuko"/>
</a>
<a href="https://github.com/Mo3et" title="Monet Lee">
<img src="https://avatars.githubusercontent.com/u/34803812?v=4" width="42;" alt="Monet Lee"/>
</a>
<a href="https://github.com/HanaNoryu" title="Noryu">
<img src="https://avatars.githubusercontent.com/u/109856546?v=4" width="42;" alt="Noryu"/>
</a>
<a href="https://github.com/Perzch" title="Perzch">
<img src="https://avatars.githubusercontent.com/u/67987641?v=4" width="42;" alt="Perzch"/>
</a>
<a href="https://github.com/PipecraftNet" title="Pipecraft">
<img src="https://avatars.githubusercontent.com/u/88728670?v=4" width="42;" alt="Pipecraft"/>
</a>
<a href="https://github.com/QDelta" title="QDelta">
<img src="https://avatars.githubusercontent.com/u/60222316?v=4" width="42;" alt="QDelta"/>
</a>
<a href="https://github.com/qinxiongzhou" title="Ryan Zhou">
<img src="https://avatars.githubusercontent.com/u/33239096?v=4" width="42;" alt="Ryan Zhou"/>
</a>
<a href="https://github.com/whb1998a" title="WHB">
<img src="https://avatars.githubusercontent.com/u/44045064?v=4" width="42;" alt="WHB"/>
</a>
<a href="https://github.com/hi-liyan" title="Yan Li">
<img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="Yan Li"/>
<a href="https://github.com/BATTLEHAWK00" title="While True: learn()">
<img src="https://avatars.githubusercontent.com/u/45313304?v=4" width="42;" alt="While True: learn()"/>
</a>
<a href="https://github.com/hi-liyan" title="嘉木旅人">
<img src="https://avatars.githubusercontent.com/u/40056492?v=4" width="42;" alt="嘉木旅人"/>
</a>
<a href="https://github.com/Yo-gurts" title="Yogurt">
<img src="https://avatars.githubusercontent.com/u/44612841?v=4" width="42;" alt="Yogurt"/>
</a>
<a href="https://github.com/dfshizhiqiang" title="Zech">
<img src="https://avatars.githubusercontent.com/u/7030019?v=4" width="42;" alt="Zech"/>
</a>
<a href="https://github.com/yikuaibro" title="yikuaibro">
<img src="https://avatars.githubusercontent.com/u/44493045?v=4" width="42;" alt="yikuaibro"/>
</a>
<a href="https://github.com/zhu0629" title="Zhu">
<img src="https://avatars.githubusercontent.com/u/13188450?v=4" width="42;" alt="Zhu"/>
</a>
<a href="https://github.com/Leaderzhangyi" title="ZinkCas">
<img src="https://avatars.githubusercontent.com/u/46915666?v=4" width="42;" alt="ZinkCas"/>
</a>
<a href="https://github.com/y52y" title="Zyj">
<img src="https://avatars.githubusercontent.com/u/51304324?v=4" width="42;" alt="Zyj"/>
</a>
<a href="https://github.com/Lmmmmmm-bb" title="_lmmmmmm">
<img src="https://avatars.githubusercontent.com/u/54026110?v=4" width="42;" alt="_lmmmmmm"/>
</a>
<a href="https://github.com/chyok" title="chyok">
<img src="https://avatars.githubusercontent.com/u/32629225?v=4" width="42;" alt="chyok"/>
</a>
<a href="https://github.com/gaoxiaoduan" title="coderduan">
<img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="coderduan"/>
<a href="https://github.com/gaoxiaoduan" title="Jerrod Cole">
<img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="Jerrod Cole"/>
</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/godotc" title="godotc">
<img src="https://avatars.githubusercontent.com/u/79260851?v=4" width="42;" alt="godotc"/>
<a href="https://github.com/fakevn" title="fakevn">
<img src="https://avatars.githubusercontent.com/u/11464386?v=4" width="42;" alt="fakevn"/>
</a>
<a href="https://github.com/fjqz177" title="fjqz177">
<img src="https://avatars.githubusercontent.com/u/83070583?v=4" width="42;" alt="fjqz177"/>
</a>
<a href="https://github.com/gi-b716" title="gi-b716">
<img src="https://avatars.githubusercontent.com/u/78394473?v=4" width="42;" alt="gi-b716"/>
</a>
<a href="https://github.com/godotc" title="godot42">
<img src="https://avatars.githubusercontent.com/u/79260851?v=4" width="42;" alt="godot42"/>
</a>
<a href="https://github.com/greyhao" title="greyhao">
<img src="https://avatars.githubusercontent.com/u/107107440?v=4" width="42;" alt="greyhao"/>
</a>
<a href="https://github.com/sunny0826" title="Xudong Guo">
<img src="https://avatars.githubusercontent.com/u/24563928?v=4" width="42;" alt="Xudong Guo"/>
</a>
<a href="https://github.com/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/auroraslot" title="Tang Weize">
<img src="https://avatars.githubusercontent.com/u/48817882?v=4" width="42;" alt="Tang Weize"/>
</a>
<a href="https://github.com/joyfully-W" title="joyfully-W">
<img src="https://avatars.githubusercontent.com/u/32212924?v=4" width="42;" alt="joyfully-W"/>
</a>
<a href="https://github.com/k983551019" title="k983551019">
<img src="https://avatars.githubusercontent.com/u/48147837?v=4" width="42;" alt="k983551019"/>
</a>
@ -331,6 +447,9 @@ Quick Reference
<a href="https://github.com/genius-kim" title="kim">
<img src="https://avatars.githubusercontent.com/u/119488561?v=4" width="42;" alt="kim"/>
</a>
<a href="https://github.com/kubeme" title="kubernetes for me">
<img src="https://avatars.githubusercontent.com/u/16346220?v=4" width="42;" alt="kubernetes for me"/>
</a>
<a href="https://github.com/larry-xue" title="larry">
<img src="https://avatars.githubusercontent.com/u/48818060?v=4" width="42;" alt="larry"/>
</a>
@ -340,32 +459,50 @@ Quick Reference
<a href="https://github.com/lykjjj" title="lykjjj">
<img src="https://avatars.githubusercontent.com/u/58510058?v=4" width="42;" alt="lykjjj"/>
</a>
<a href="https://github.com/mancuoj" title="mancuoj">
<img src="https://avatars.githubusercontent.com/u/45707684?v=4" width="42;" alt="mancuoj"/>
<a href="https://github.com/miclon-dev" title="miclon-dev">
<img src="https://avatars.githubusercontent.com/u/111753685?v=4" width="42;" alt="miclon-dev"/>
</a>
<a href="https://github.com/onewesong" title="onewesong">
<img src="https://avatars.githubusercontent.com/u/17920822?v=4" width="42;" alt="onewesong"/>
</a>
<a href="https://github.com/phygerr" title="phygerr">
<img src="https://avatars.githubusercontent.com/u/42068889?v=4" width="42;" alt="phygerr"/>
</a>
<a href="https://github.com/Mowmowj" title="shelton">
<img src="https://avatars.githubusercontent.com/u/24759562?v=4" width="42;" alt="shelton"/>
</a>
<a href="https://github.com/wjjwkwindy" title="wjjwkwindy">
<img src="https://avatars.githubusercontent.com/u/9508591?v=4" width="42;" alt="wjjwkwindy"/>
<a href="https://github.com/wannima66" title="tmen">
<img src="https://avatars.githubusercontent.com/u/26410255?v=4" width="42;" alt="tmen"/>
</a>
<a href="https://github.com/wjjwkwindy" title="Hudson Alen">
<img src="https://avatars.githubusercontent.com/u/9508591?v=4" width="42;" alt="Hudson Alen"/>
</a>
<a href="https://github.com/xing133" title="xing133">
<img src="https://avatars.githubusercontent.com/u/5336490?v=4" width="42;" alt="xing133"/>
</a>
<a href="https://github.com/zxx-457" title="zxx-457">
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx-457"/>
<a href="https://github.com/zxx457" title="zxx457">
<img src="https://avatars.githubusercontent.com/u/114141362?v=4" width="42;" alt="zxx457"/>
</a>
<a href="https://github.com/lvzhenbo" title="吕振波">
<img src="https://avatars.githubusercontent.com/u/32427677?v=4" width="42;" alt="吕振波"/>
</a>
<a href="https://github.com/qyl27" title="秋雨落">
<img src="https://avatars.githubusercontent.com/u/53731501?v=4" width="42;" alt="秋雨落"/>
<a href="https://github.com/LuckyJie12" title="夜未央">
<img src="https://avatars.githubusercontent.com/u/102901105?v=4" width="42;" alt="夜未央"/>
</a>
<a href="https://github.com/ZIDOUZI" title="子斗子">
<img src="https://avatars.githubusercontent.com/u/53157536?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/1250422131" title="萌新杰少">
<img src="https://avatars.githubusercontent.com/u/52126790?v=4" width="42;" alt="萌新杰少"/>
</a>
<a href="https://github.com/qwxingzhe" title="行者">
<img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"/>
</a>
<a href="https://github.com/Zeng-qh" title="都一样">
<img src="https://avatars.githubusercontent.com/u/40046415?v=4" width="42;" alt="都一样"/>
</a><!--GAMFC-END-->
[贡献者](https://github.com/jaywcjlove/reference/graphs/contributors)列表,由 [contributors](https://github.com/jaywcjlove/github-action-contributors) 根据提交次数的先后顺序自动生成
@ -381,9 +518,7 @@ Quick Reference
[aibk.cn](https://quickref.aibk.cn)<!--rehype:target=_blank-->
[jgeek.cn](http://reference.jgeek.cn/)<!--rehype:target=_blank-->
[laoleng.vip](http://bbs.laoleng.vip/reference/)<!--rehype:target=_blank-->
[liujiapeng.com](https://www.liujiapeng.com/)<!--rehype:target=_blank-->
[dbyun.net](https://www.dbyun.net/reference/index.html)<!--rehype:target=_blank-->
[dc6.fun](https://dc6.fun/reference/)<!--rehype:target=_blank-->
[if010.com](https://quickref.if010.com/)<!--rehype:target=_blank-->
[pipecraft.net](https://quickref.pipecraft.net/)<!--rehype:target=_blank&class=contributing&data-info=👆需要梯子-->
[isteed.cc](https://ref.isteed.cc/)<!--rehype:target=_blank-->
@ -391,16 +526,37 @@ Quick Reference
[linzhe.top](https://linzhe.top/)<!--rehype:target=_blank-->
[xushanxiang.com](https://xushanxiang.com/ref/)<!--rehype:target=_blank-->
[winnerzr01.github.io](https://winnerzr01.github.io/Quick-Reference/index.html)<!--rehype:target=_blank&class=contributing&data-info=👆需要梯子-->
[isteed.cc](https://ref.isteed.cc/)<!--rehype:target=_blank-->
[quickref.hestudio.org](https://quickref.hestudio.org)<!--rehype:target=_blank&class=contributing&data-info=👆整点自动同步-->
[hestudio.org](https://quickref.hestudio.org)<!--rehype:target=_blank&class=contributing&data-info=👆整点自动同步-->
[surcode.cn](https://ref.surcode.cn)<!--rehype:target=_blank-->
[cms.im](https://quickref.cms.im/)<!--rehype:target=_blank-->
[nuomiphp.com](https://reference.tool.nuomiphp.com/)<!--rehype:target=_blank-->
[eryajf.net](https://ref.eryajf.net/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[kjchmc.cn](https://ref.kjchmc.cn/)<!--rehype:target=_blank&class=contributing&data-info=👆实时同步,多线路-->
[qiubit.cc](http://ref.qiubit.cc)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[aoh.cc](https://aoh.cc/)<!--rehype:target=_blank-->
[quickreference.pages.dev](https://quickreference.pages.dev/)<!--rehype:target=_blank-->
[xhfun.cn](https://ref.xhfun.cn/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[caitou.org](https://quickref.caitou.org/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[guoxudong.io](https://reference.guoxudong.io/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[btaw.cn](https://btaw.cn/qr)<!--rehype:target=_blank&class=contributing-->
[lzw.me](https://lzw.me/x/reference/)<!--rehype:target=_blank-->
[itcent.cn](https://code.itcent.cn/)<!--rehype:target=_blank-->
[moeyuuko.com](https://ref.moeyuuko.com/)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[coolxy.top](https://refer.coolxy.top)<!--rehype:target=_blank-->
[notes-bin.top](https://notes-bin.top)<!--rehype:target=_blank-->
[tangcc.cn](https://web.tangcc.cn)<!--rehype:target=_blank-->
[xadocker.cn](https://reference.xadocker.cn)<!--rehype:target=_blank-->
[trtu.com.cn](https://reference.trtu.com.cn)<!--rehype:target=_blank-->
[lzzzt.cn](https://ref.lzzzt.cn)<!--rehype:target=_blank-->
[kclouder.cn](https://www.kclouder.cn/reference)<!--rehype:target=_blank-->
[defense.ink](https://ref.defense.ink)<!--rehype:target=_blank&class=contributing&data-info=👆每天自动同步-->
[djcoder.com](https://doc.djcoder.com)<!--rehype:target=_blank-->
[qirishuzhai.com](http://qirishuzhai.com/quickref)<!--rehype:target=_blank-->
[longdada.me](https://ref.longdada.me)<!--rehype:target=_blank-->
[xalaok.top](https://ref.xalaok.top)<!--rehype:target=_blank-->
<!--rehype:class=home-card home-links-->
如果你有资源,可以很方便部署 web 版,这非常简单,只需要克隆 [gh-pages](https://github.com/jaywcjlove/reference/tree/gh-pages) 分支代码到你的静态服务就可以了,还可以使用 [docker](https://hub.docker.com/r/wcjiang/reference) 快捷部署 web 版。
如果你有资源,可以很方便[部署 web 版](https://github.com/jaywcjlove/reference/issues/102#issue-1451649637),这非常简单,只需要克隆 [gh-pages](https://github.com/jaywcjlove/reference/tree/gh-pages) 分支代码到你的静态服务就可以了,还可以使用 [docker](https://hub.docker.com/r/wcjiang/reference) 快捷部署 web 版。
<!--rehype:ignore:start-->
## License

3
assets/adb.svg Normal file
View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16" height="1em" width="1em">
<path d="m10.213 1.471.691-1.26c.046-.083.03-.147-.048-.192-.085-.038-.15-.019-.195.058l-.7 1.27A4.832 4.832 0 0 0 8.005.941c-.688 0-1.34.135-1.956.404l-.7-1.27C5.303 0 5.239-.018 5.154.02c-.078.046-.094.11-.049.193l.691 1.259a4.25 4.25 0 0 0-1.673 1.476A3.697 3.697 0 0 0 3.5 5.02h9c0-.75-.208-1.44-.623-2.072a4.266 4.266 0 0 0-1.664-1.476ZM6.22 3.303a.367.367 0 0 1-.267.11.35.35 0 0 1-.263-.11.366.366 0 0 1-.107-.264.37.37 0 0 1 .107-.265.351.351 0 0 1 .263-.11c.103 0 .193.037.267.11a.36.36 0 0 1 .112.265.36.36 0 0 1-.112.264Zm4.101 0a.351.351 0 0 1-.262.11.366.366 0 0 1-.268-.11.358.358 0 0 1-.112-.264c0-.103.037-.191.112-.265a.367.367 0 0 1 .268-.11c.104 0 .19.037.262.11a.367.367 0 0 1 .107.265c0 .102-.035.19-.107.264ZM3.5 11.77c0 .294.104.544.311.75.208.204.46.307.76.307h.758l.01 2.182c0 .276.097.51.292.703a.961.961 0 0 0 .7.288.973.973 0 0 0 .71-.288.95.95 0 0 0 .292-.703v-2.182h1.343v2.182c0 .276.097.51.292.703a.972.972 0 0 0 .71.288.973.973 0 0 0 .71-.288.95.95 0 0 0 .292-.703v-2.182h.76c.291 0 .54-.103.749-.308.207-.205.311-.455.311-.75V5.365h-9v6.404Zm10.495-6.587a.983.983 0 0 0-.702.278.91.91 0 0 0-.293.685v4.063c0 .271.098.501.293.69a.97.97 0 0 0 .702.284c.28 0 .517-.095.712-.284a.924.924 0 0 0 .293-.69V6.146a.91.91 0 0 0-.293-.685.995.995 0 0 0-.712-.278Zm-12.702.283a.985.985 0 0 1 .712-.283c.273 0 .507.094.702.283a.913.913 0 0 1 .293.68v4.063a.932.932 0 0 1-.288.69.97.97 0 0 1-.707.284.986.986 0 0 1-.712-.284.924.924 0 0 1-.293-.69V6.146c0-.264.098-.491.293-.68Z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

1
assets/conda.svg Normal file
View File

@ -0,0 +1 @@
<svg height="1em" width="1em" role="img" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Anaconda</title><path d="M12.045.033a12.181 12.182 0 00-1.361.078 17.512 17.513 0 011.813 1.433l.48.438-.465.45a15.047 15.048 0 00-1.126 1.205l-.178.215a8.527 8.527 0 01.86-.05 8.154 8.155 0 11-4.286 15.149 15.764 15.765 0 01-1.841.106h-.86a21.847 21.848 0 00.264 2.866 11.966 11.967 0 106.7-21.89zM8.17.678a12.181 12.182 0 00-2.624 1.275 15.506 15.507 0 011.813.43A18.551 18.552 0 018.17.678zM9.423.75a16.237 16.238 0 00-.995 1.998 16.15 16.152 0 011.605.66 6.98 6.98 0 01.43-.509c.234-.286.472-.559.716-.817A15.047 15.048 0 009.423.75zM4.68 2.949a14.969 14.97 0 000 2.336c.587-.065 1.196-.1 1.812-.107a16.617 16.617 0 01.48-1.748 16.48 16.481 0 00-2.292-.481zM3.62 3.5A11.938 11.938 0 001.762 5.88a17.004 17.004 0 011.877-.444A17.39 17.391 0 013.62 3.5zm4.406.287c-.143.437-.265.888-.38 1.347a8.255 8.255 0 011.67-.803c-.423-.2-.845-.38-1.29-.544zM6.3 6.216a14.051 14.052 0 00-1.555.108c.064.523.157 1.038.272 1.554a8.39 8.391 0 011.283-1.662zm-2.55.137a15.313 15.313 0 00-2.602.716h-.078v.079a17.104 17.105 0 001.267 2.544l.043.071.072-.049a16.309 16.31 0 011.734-1.083l.057-.035V8.54a16.867 16.868 0 01-.408-2.094v-.092zM.644 8.095l-.063.2A11.844 11.845 0 000 11.655v.209l.143-.152a17.706 17.707 0 011.584-1.447l.057-.043-.043-.064a16.18 16.18 0 01-1.025-1.87zm3.77 1.253l-.18.1c-.465.273-.93.573-1.375.889l-.065.05.05.064c.309.437.645.867.996 1.276l.137.165v-.208a8.176 8.176 0 01.364-2.15zM2.2 10.853l-.072.05a16.574 16.574 0 00-1.813 1.734l-.058.058.066.057a15.449 15.45 0 001.991 1.483l.072.05.043-.08a16.738 16.74 0 011.053-1.64v-.05l-.043-.05a16.99 16.99 0 01-1.19-1.54zm1.855 2.071l-.121.172a15.363 15.363 0 00-.917 1.433l-.043.072.071.043a16.61 16.61 0 001.562.766l.193.086-.086-.193a8.04 8.04 0 01-.66-2.172zm-3.976.48v.2a11.758 11.759 0 00.946 3.326l.078.186.072-.194a16.215 16.216 0 01.845-2l.057-.063-.064-.043a17.197 17.198 0 01-1.776-1.284zm2.543 1.805l-.035.08a15.764 15.765 0 00-.983 2.479v.08h.086a16.15 16.152 0 002.688.5l.072.007v-.086a17.562 17.563 0 01.164-2.056v-.065H4.55a16.266 16.266 0 01-1.849-.896zm2.544 1.169v.114a17.254 17.255 0 00-.151 1.828v.078h.931c.287 0 .624.014.946 0h.209l-.166-.129a8.011 8.011 0 01-1.64-1.834zm-3.29 2.1l.115.172a11.988 11.988 0 002.502 2.737l.157.129v-.201a22.578 22.58 0 01-.2-2.336v-.071h-.072a16.23 16.23 0 01-2.3-.387z"/></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

213
assets/gdb.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 23 KiB

5
assets/kubernetes.svg Normal file
View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" height="1em" width="1em">
<path d="m10.013 13.738-2.254.387a4.475 4.475 0 0 0 1.753 2.231l.865-2.095a.27.27 0 0 0 .022-.228c-.022-.18-.204-.295-.386-.295zm.865-2.914c.205 0 .387-.159.387-.364l.114-2.277-.456.091a4.516 4.516 0 0 0-2.118 1.162l1.89 1.343c.069.022.115.045.183.045zm-1.002 1.48a.366.366 0 0 0-.045-.524l-1.685-1.503a4.797 4.797 0 0 0-.661 2.778l2.209-.637c.091-.023.137-.046.182-.114zm1.457.797.616.296.614-.296.16-.661-.433-.546h-.683l-.433.546zm1.344-2.436c.114.159.341.182.5.091l1.867-1.32a4.286 4.286 0 0 0-2.573-1.23l.137 2.3a.215.215 0 0 0 .069.159z"/>
<path d="m21.944 14.103-1.73-7.446c-.113-.364-.387-.66-.729-.842L12.541 2.49c-.182-.091-.387-.114-.569-.114s-.387 0-.569.045L4.457 5.769a1.22 1.22 0 0 0-.683.842l-1.708 7.492c-.068.387.023.774.25 1.093l4.805 5.943c.273.273.66.456 1.047.479h7.651c.41.045.797-.137 1.048-.479l4.805-5.943c.227-.319.318-.706.272-1.093zm-2.845.501c-.046 0-.068 0-.114-.023-.022-.023-.022-.023-.045-.023-.046 0-.068-.022-.092-.022-.091-.023-.159-.068-.25-.114a.32.32 0 0 1-.137-.045h-.022a3.91 3.91 0 0 0-.729-.205h-.022a.26.26 0 0 0-.182.068s0 .023-.023.023l-.183-.024a5.628 5.628 0 0 1-2.46 3.097l.068.182s-.022 0-.022.022a.264.264 0 0 0-.022.228c.091.228.205.455.364.66v.045a.396.396 0 0 1 .091.114.81.81 0 0 1 .159.228c.023.022.046.045.046.068 0 0 .022 0 .022.022a.582.582 0 0 1 .023.342.38.38 0 0 1-.205.25c-.068.022-.114.045-.183.045a.511.511 0 0 1-.433-.273c-.022 0-.022-.022-.022-.022-.022-.023-.022-.045-.046-.068-.045-.068-.068-.159-.091-.25l-.046-.137v-.022a3.816 3.816 0 0 0-.296-.706.353.353 0 0 0-.182-.137c0-.023 0-.023-.023-.023l-.091-.159c-.228.068-.479.159-.729.205-.41.114-.82.159-1.229.159a5.368 5.368 0 0 1-1.981-.364l-.091.182c0 .023 0 .023-.023.023a.35.35 0 0 0-.182.137c-.114.228-.228.455-.296.706l-.045.137c-.023.091-.068.159-.091.25-.022.023-.045.045-.045.068-.023 0-.023.022-.023.022a.508.508 0 0 1-.433.273.434.434 0 0 1-.159-.045.469.469 0 0 1-.182-.615c.023 0 .023-.023.023-.023.022-.023.022-.045.045-.068.068-.091.114-.182.159-.228s.068-.068.091-.114v-.023a3.73 3.73 0 0 0 .364-.66.268.268 0 0 0-.023-.228s-.022 0-.022-.022l.114-.16a3.578 3.578 0 0 1-.615-.41 5.493 5.493 0 0 1-1.867-2.664l-.205.022s0-.022-.023-.022a.256.256 0 0 0-.182-.068h-.022a4.015 4.015 0 0 0-.751.205h-.024c-.045 0-.091.023-.137.046-.068.022-.159.068-.25.091-.022 0-.091-.022-.091 0 0 .023 0 .023-.023.023-.045.023-.068.023-.114.023a.424.424 0 0 1-.456-.319.445.445 0 0 1 .364-.524c.023-.023.023-.023.046-.023.045 0 .068-.022.091-.022.091 0 .182-.023.273-.023.045-.022.091-.022.137-.022a4.2 4.2 0 0 0 .774-.137c.068-.046.137-.091.16-.16 0 0 .022 0 .022-.022l.182-.046c-.205-1.298.091-2.618.797-3.734.022-.045.045-.068.068-.114l-.131-.132a.106.106 0 0 1-.004.019v-.023l.004.004c.01-.065-.031-.145-.072-.186-.182-.182-.41-.319-.638-.455l-.136-.069a2.587 2.587 0 0 1-.251-.136c-.022 0-.068-.045-.068-.045s0-.023-.022-.023a.49.49 0 0 1-.092-.639c.068-.114.182-.159.319-.159a.54.54 0 0 1 .319.114l.023.023c.022.022.045.022.068.045.068.069.114.137.182.205.023.022.068.045.091.091.159.182.364.364.569.524.045.022.091.045.137.045.045 0 .068-.023.091-.023h.023l.137.091a5.426 5.426 0 0 1 2.801-1.594c.273-.046.523-.091.774-.114l.023-.182v-.045c.068-.045.091-.114.114-.182 0-.273 0-.524-.045-.774v-.023c0-.045 0-.091-.023-.137a1.129 1.129 0 0 1-.045-.273v-.113c0-.114.045-.228.137-.319.114-.114.25-.182.387-.159a.45.45 0 0 1 .387.478v.137c-.023.091-.023.182-.045.273 0 .045-.023.091-.023.136v.023c-.048.273-.048.524-.048.774.023.068.045.136.114.182v-.023l.023.182a5.84 5.84 0 0 1 2.96 1.184c.183.182.387.364.569.546l.183-.114h.022c.022.023.068.023.091.023.046 0 .091-.023.137-.045.205-.137.41-.319.569-.501.022-.023.068-.046.091-.091.046-.068.114-.137.183-.205.022 0 .045-.022.068-.045l.022-.023a.546.546 0 0 1 .318-.114c.114 0 .251.068.319.16.159.205.113.478-.091.637 0 .023.022.023 0 .046-.023.022-.046.022-.068.045-.092.045-.16.091-.251.137l-.137.068a4.104 4.104 0 0 0-.638.455c-.045.046-.068.137-.068.205v.023l-.136.137c.364.569.638 1.207.797 1.867.137.66.182 1.343.091 2.003l.182.046a.278.278 0 0 0 .16.159c.25.068.523.114.773.137h.023a.297.297 0 0 0 .137.022c.091 0 .182 0 .272.023.046 0 .092 0 .092.023 0 .022.022.022.045.022a.537.537 0 0 1 .41.479.49.49 0 0 1-.453.32z"/>
<path d="M12.085 14.718a.352.352 0 0 0-.455.091l-1.116 2.027c.456.136.957.228 1.435.228.341 0 .66-.045.979-.114.159-.045.296-.068.433-.091l-1.093-1.981c-.069-.069-.115-.115-.183-.16zm3.644-4.441-1.708 1.548a.36.36 0 0 0-.091.16c-.046.205.068.41.273.455l2.163.615a4.375 4.375 0 0 0-.092-1.435 4.63 4.63 0 0 0-.545-1.343zm-2.073 3.484a.371.371 0 0 0-.205.433l.889 2.141a4.366 4.366 0 0 0 1.366-1.366c.182-.25.318-.547.433-.865l-2.277-.387a.634.634 0 0 0-.206.044z"/>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

3
assets/mongodb.svg Normal file
View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 120 257" fill="none" xmlns="http://www.w3.org/2000/svg" height="1em" width="1em">
<path d="M82.323 28.644C71.537 15.847 62.249 2.85 60.35.15c-.2-.2-.5-.2-.7 0-1.897 2.7-11.185 15.697-21.971 28.494C-54.902 146.721 52.26 226.406 52.26 226.406l.9.6C53.958 239.303 55.955 257 55.955 257h7.99s1.998-17.597 2.797-29.994l.899-.7c.1.1 107.263-79.585 14.68-197.662ZM59.95 224.606s-4.793-4.099-6.092-6.198v-.201l5.793-128.574c0-.4.6-.4.6 0l5.792 128.574v.201c-1.299 2.099-6.093 6.198-6.093 6.198Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 537 B

3
assets/pycharm.svg Normal file
View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" height="1em" width="1em">
<path d="M7.833 6.666v-.055c0-1-.667-1.5-1.778-1.5H4.389v3.055h1.723c1.111 0 1.721-.666 1.721-1.5zM0 0v24h24V0H0zm2.223 3.167h4c2.389 0 3.833 1.389 3.833 3.445v.055c0 2.278-1.778 3.5-4.001 3.5H4.389v2.945H2.223V3.167zM11.277 21h-9v-1.5h9V21zm4.779-7.777c-2.944.055-5.111-2.223-5.111-5.057C10.944 5.333 13.056 3 16.111 3c1.889 0 3 .611 3.944 1.556l-1.389 1.61c-.778-.722-1.556-1.111-2.556-1.111-1.658 0-2.873 1.375-2.887 3.084.014 1.709 1.174 3.083 2.887 3.083 1.111 0 1.833-.445 2.61-1.167l1.39 1.389c-.999 1.112-2.166 1.779-4.054 1.779z"/>
</svg>

After

Width:  |  Height:  |  Size: 656 B

4
assets/reactrouter.svg Normal file
View File

@ -0,0 +1,4 @@
<svg viewBox="0 0 256 140" fill="currentColor" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid" height="1em" width="1em">
<path d="M78.066 92.588c12.818 0 23.209-10.391 23.209-23.21 0-12.817-10.391-23.208-23.21-23.208-12.817 0-23.208 10.39-23.208 23.209 0 12.818 10.391 23.209 23.209 23.209Zm-54.857 46.417c12.818 0 23.209-10.39 23.209-23.209 0-12.817-10.391-23.208-23.21-23.208C10.392 92.588 0 102.978 0 115.796c0 12.818 10.39 23.21 23.209 23.21Zm209.582 0c12.818 0 23.209-10.39 23.209-23.209 0-12.817-10.39-23.208-23.209-23.208-12.818 0-23.209 10.39-23.209 23.208 0 12.818 10.391 23.21 23.21 23.21Z"/>
<path d="M156.565 70.357c-.742-7.754-1.12-14.208-7.06-18.744-7.522-5.744-16.044-2.017-26.54-5.806C112.65 43.312 105 34.155 105 23.24 105 10.405 115.578 0 128.626 0c9.665 0 17.974 5.707 21.634 13.883 5.601 10.64 1.96 21.467 8.998 26.921 8.333 6.458 19.568 1.729 32.104 7.848a23.614 23.614 0 0 1 9.84 8.425A22.858 22.858 0 0 1 205 69.718c0 10.915-7.65 20.073-17.964 22.568-10.497 3.789-19.019.062-26.541 5.806-8.46 6.46-3.931 17.267-10.826 28.682-3.913 7.518-11.867 12.663-21.043 12.663-13.048 0-23.626-10.405-23.626-23.24 0-9.323 5.582-17.364 13.638-21.066 12.536-6.12 23.77-1.39 32.104-7.848 4.807-3.726 5.823-9.473 5.823-16.926Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

3
assets/scala.svg Normal file
View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 32 32" height="1em" width="1em">
<path d="M6.12 32c6.047 0 18.411-2.021 19.76-4v-7.641c-1.276 1.88-13.714 3.885-19.76 3.885zm0-10.182c6.047 0 18.411-2.021 19.76-4v-7.635c-1.276 1.875-13.714 3.88-19.76 3.88zm0-10.177c6.047 0 18.411-2.021 19.76-4V0C24.604 1.875 12.166 3.88 6.12 3.88z"/>
</svg>

After

Width:  |  Height:  |  Size: 367 B

384
docs/adb.md Normal file
View File

@ -0,0 +1,384 @@
Android Debug Bridge 备忘清单
===
[ADB](https://developer.android.com/studio/command-line/adb.html) 既 Android Debug Bridge是 Google 的 Android SDK 中的一个命令行工具,可让您的计算机控制 Android 设备执行各种设备操作。以下是您可以与 [ADB](https://developer.android.com/studio/command-line/adb.html) 一起使用的一些最常见的命令及其用法
入门
----
### 设备基础
<!--rehype:wrap-class=row-span-2-->
:-- | --
:-- | --
`adb devices` | 列出已连接的设备
`adb devices -l` | 列出已连接的设备和种类
`adb connect [IP:PORT]` | 连接到指定 IP 和端口的设备
`adb disconnect [IP:PORT]` | 断开指定 IP 和端口的设备连接,若未指定,则断开所有连接
`adb root` | 以 `root` 权限重新启动 `adbd`
`adb start-server` | 启动 `adb` 服务
`adb kill-server` | 停止 `adb` 服务
`adb remount` | 重新挂载具有读/写访问权限的文件系统
`adb reboot` | 重启设备
`adb reboot bootloader` | 将设备重启到 fastboot 模式
`adb reboot recovery` | 将设备重启到恢复模式
`adb disable-verity` | 禁用设备的 dm-verity 安全特性
<!--rehype:className=left-align code-nowrap-->
---
- `wait-for-device` 可以在 `adb` 之后指定,以确保该命令在设备连接后运行
- `-s` 可用于在多个连接时将命令发送到特定设备
#### 示例
```bash
$ adb wait-for-device devices
List of devices attached
somedevice-1234 device
someotherdevice-1234 device
```
```bash
$ adb -s somedevice-1234 root
```
### Logcat
<!--rehype:wrap-class=row-span-2-->
:-- | --
:-- | --
`adb logcat` | 将日志消息打印到标准输出
`adb logcat -g` | 显示当前日志缓冲区大小
`adb logcat -G <size>` | 设置缓冲区大小K 或 M
`adb logcat -c` | 清除日志缓冲区
`adb logcat *:V` | 启用所有日志消息(详细)
`adb logcat -f <filename>` | 将日志转储到指定文件
<!--rehype:className=left-align code-nowrap-->
#### 示例
```bash
$ adb logcat -G 16M
$ adb logcat *:V > output.log
```
#### 过滤日志输出
- `V` 最详细的信息(最低优先级)
- `D` 调试信息
- `I` 普通信息
- `W` 警告信息
- `E` 错误信息
- `F` 致命错误信息
- `S` 静默(最高优先级)
<!--rehype:className=cols-2 shortcuts style-none-->
例如,要显示优先级不低于 `警告` 的所有标记的所有日志消息,可以使用以下命令:
```bash
$ adb logcat *:W
```
### 文件管理
:-- | --
:-- | --
`adb push <local> <remote>` | 将本地文件复制到远程设备
`adb pull <remote> <local>` | 将远程设备文件复制到本地
<!--rehype:className=left-align code-nowrap-->
#### 示例
```bash
$ echo "This is a test" > test.txt
$ adb push test.txt /sdcard/test.txt
$ adb pull /sdcard/test.txt pulledTest.txt
```
### 远程 Shell
:-- | --
:-- | --
`adb shell <command>` | 在设备上运行指定的命令(大多数 Unix 命令在这里工作)
`adb shell wm size` | 显示当前屏幕分辨率
`adb shell wm size WxH` | 将分辨率设置为 WxH
`adb shell pm list packages` | 列出所有已安装的应用包
`adb shell pm list packages -3` | 列出所有已安装的第三方的应用包
`adb shell monkey -p app.package.name` | 启动指定包名的应用程序
<!--rehype:className=style-list-arrow-->
### 包安装
:-- | --
:-- | --
`adb shell install <apk>` | 安装应用程序
`adb shell install <path>` | 从手机路径安装应用
`adb shell install -r <path>` | 从手机路径安装应用(允许覆盖安装)
`adb shell uninstall <name>` | 卸载应用程序
<!--rehype:className=left-align code-nowrap-->
### Paths
<!--rehype:wrap-class=row-span-2-->
:-- | --
:-- | --
`/data/data/<package>/databases` | 应用程序数据库
`/data/data/<package>/shared_prefs/` | 共享偏好设置
`/data/app` | 用户安装的 APK
`/system/app` | 系统预装的 APK 文件
`/mmt/asec` | 加密的应用程序App2SD
`/mmt/emmc` | 内部 SD 卡
`/mmt/adcard` | 外部/内部 SD 卡
`/mmt/adcard/external_sd` | 外置 SD 卡
<!--rehype:className=style-list-arrow-->
---
:-- | --
:-- | --
`adb shell ls` | 列出目录内容
`adb shell ls -s` | 每个文件的打印尺寸
`adb shell ls -R` | 递归列出子目录
<!--rehype:className=left-align code-nowrap-->
### 手机信息
<!--rehype:wrap-class=row-span-2-->
:-- | --
:-- | --
`adb get-statе` | 打印设备状态
`adb get-serialno` | 获取设备的序列号
`adb shell dumpsys iphonesybinfo` | 获取设备的 IMEI 信息
`adb shell netstat` | 列出设备上的所有 TCP 连接
`adb shell pwd` | 打印当前工作目录
`adb shell dumpsys battery` | 获取设备电池状态
`adb shell pm list features` |列出设备支持的所有功能
`adb shell service list` | 列出设备上运行的所有服务
`adb shell dumpsys activity <package>/<activity>` | 获取指定包和活动的信息
`adb shell ps` | 打印设备上所有运行的进程状态
`adb shell wm size` | 显示当前设备的屏幕分辨率
`dumpsys window windows` \| `grep -E 'mCurrentFocus\|mFocusedApp'` | 打印当前应用程序的打开活动的信息
<!--rehype:className=style-list-arrow-->
### 包信息
:-- | --
:-- | --
`adb shell list packages` | 列出包名称
`adb shell list packages -r` | 列出包名 + apks 的路径
`adb shell list packages -3` | 列出第三方包名称
`adb shell list packages -s` | 仅列出系统包
`adb shell list packages -u` | 列出包名称 + 已卸载
`adb shell dumpsys package packages` | 列出所有应用程序的信息
`adb shell dump <name>` | 列出一个包的信息
`adb shell path <package>` | 列出 APK 文件的路径
<!--rehype:className=style-list-arrow-->
### 设备相关命令
<!--rehype:wrap-class=col-span-2 row-span-2-->
:-- | --
:-- | --
`adb reboot recovery` | 重启设备进入恢复模式
`adb reboot fastboot` | 重启设备进入恢复模式
`adb shell screencap -p "/path/to/screenshot.png"` | 截图
`adb shell screenrecord "/path/to/record.mp4"` | 录制设备屏幕
`adb backup -apk -all -f backup.ab` | 备份设置和应用程序
`adb backup -apk -shared -all -f backup.ab` | 备份设置、应用程序和共享存储
`adb backup -apk -nosystem -all -f backup.ab` | 仅备份非系统应用程序
`adb restore backup.ab` | 恢复以前的备份
`adb shell am start -a android.intent.action.VIEW -d URL` | 打开网址
`adb shell am start -t image/* -a android.intent.action.VIEW` | 打开画廊
<!--rehype:className=code-nowrap left-align-->
### 权限
:-- | --
:-- | --
`adb shell permissions groups` | 列出所有已定义的权限组
`adb shell list permissions -g -r` | 列出了所有权限的详细信息
<!--rehype:className=style-list-arrow-->
### Logs
:-- | --
:-- | --
`adb logcat [options] [filter] [filter]` | 查看设备日志
`adb bugreport` | 打印错误报告
<!--rehype:className=style-list-arrow-->
常见的 ADB 命令
---
### 将文件推送到 Android 设备的下载文件夹
```bash
$ adb push example.apk /sdcard/Download/
```
### 列出所有已安装的包并获取完整路径
```bash
$ adb shell pm list packages -f
```
### 从安卓设备中提取文件
```bash
$ adb pull /sdcard/Download/example.apk
```
### 从主机安装 APK 到 Android 设备
```bash
$ adb shell install example.apk
```
### 从 Android 设备存储安装 APK
```bash
$ adb shell install /sdcard/Download/example.apk
```
### 设置网络代理
```bash
$ adb shell settings put global http_proxy <address>:<port>
```
### 禁用网络代理
```bash
$ adb shell settings put global http_proxy :0
```
### 显示连接的设备并指定一个设备进行 Shell
```bash
$ adb devices
$ adb -s 7f1c864e shell
```
`7f1c864e` 是设备 `ID`
### 通过 IP 地址连接到设备
```bash
$ adb connect 192.168.56.101:5555
```
### 通过 Wi-Fi 连接 ADB
<!--rehype:wrap-class=row-span-5-->
我们可以通过 `Wi-Fi` 或专门使用 `tcp` 连接使用 `adb`。 要通过 `Wi-Fi` 使用 `adb`,首先通过 `USB` 连接手机并启用 `USB` 调试。然后列出所有设备:
```bash
$ adb devices
# 这应该给出这样的输出:
# device_id device
```
现在检查 `Android` 设备的 `IP`
```bash
$ adb shell ifconfig
# 输出:
wlan0 Link encap:UNSPEC Driver icnss
inet addr:XXX.XXX.X.XX Bcast:XXX.XXX.X.XXX
```
记下 `inet addr` 后的 `IP` 地址。稍后要用。现在在某个端口重新启动 `tcpip`
```bash
$ adb tcpip $port
```
例如 5555
```bash
$ adb tcpip 5555
```
您现在可以断开 USB 线缆使用。 若要连接到设备请键入以下命令:
```bash
$ adb connect $ip:$port
```
例如:
```bash
$ adb connect 192.168.1.4:5555
```
### 将计算机上的 APK 文件安装到设备
```bash
$ adb install /Users/dev/projects/myapp.apk
```
### 查找应用的 APK 路径
```bash
$ adb shell pm path com.example.myapp
```
`com.example.myapp` 替换为您自己的应用程序包名称
### 通过名称查找应用的包名
```bash
$ adb shell pm list package | grep app_name
```
### 从设备提取 APK 到您的计算机
```bash
$ adb pull /data/app/com.example.myapp.apk ./
```
### 将文件从计算机复制到设备
```bash
$ adb push path/to/local/file /sdcard/foo.txt
```
### 滚动屏幕
```bash
$ adb shell input swipe 300 300 500 1000 # 上
$ adb shell input swipe 500 1000 300 300 # 下
```
### 发文本
使用虚拟键盘发送文本:
```bash
$ adb shell input text "Hello World"
```
### 发送按键事件
```bash
$ adb shell input keyevent 66
# 66 是回车键码
```
### 发送点击
点击屏幕:
```bash
$ adb shell input tap x y
```
### 查看包的日志
```bash
$ adb shell 'logcat --pid=$(pidof -s <package_name>)'
```
查看特定包的日志

View File

@ -1010,6 +1010,25 @@ echo "${args[@]}"
将参数放入数组中,然后追加
### 调试模式
启用调试模式,会把脚本中的每条命令的执行情况打印出来。它可以在整个会话或脚本上运行,也可以在脚本内以编程方式启用。
以调试模式运行脚本(整个脚本都会打印调试信息)
```bash
$ bash -x myscript.sh
```
在bash脚本中打开调试(针对部分内容打印调试信息)。
```bash
#!/bin/bash
set -x # Enable debugging
# some code here
set +x # Disable debugging output.
```
Bash 颜色
----

112
docs/conda.md Normal file
View File

@ -0,0 +1,112 @@
Conda备忘清单
===
这是开始使用 `conda` 命令的快速参考备忘单,初次学习可参考[这里](https://anaconda.org.cn/anaconda/user-guide/getting-started/#open-nav-win)
入门
-----
<!--rehype:body-class=cols-1-->
### 常用基础命令
命令 | 说明
:-- | --
`conda info` | 查看 conda 的一系列基本信息(版本、源、路径等)
`conda update -n base conda` | 在base环境中更新conda
`conda install anconda=2022.05` | 安装最新的anaconda发行版(见[发行说明](https://docs.anaconda.com/navigator/release-notes/?utm_source=cheatsheet))
`conda create --name <ENVNAME>` | 创建一个新的环境
`conda activate <ENVNAME>` | 激活/切换/选择一个环境
`conda env list 或者 conda info -e` | 列出所有的环境和位置看
`conda list -n <ENVNAME> --show-channel-urls` | 列出某个环境所有包和包的下载源路径
`conda install -n <ENVNAME> <PKG1> <PKG2>` | 在某个环境中安装包
`conda uninstall <PKGNAME包名> -n <ENVNAME环境名>` | 从某个环境删除某个包
`conda update --all -n <ENVNAME环境名>` | 升级某个环境的所有包
<!--rehype:className=show-header-->
环境与包管理
-----
### 包与源管理
<!--rehype:wrap-class=col-span-2-->
> 在使用 `conda` 时,包依赖关系和平台细节会**自动解决**
查看命令均可搭配 `grep` 命令使用,例如:
```bash
conda list | grep torch #列出所有包含torch的包
```
Command | Description
:-- | --
`conda list` | 列出所有安装的包
`conda list --show-channel-urls` |列出包含源信息的已安装包
`conda update --all` | 更新所有包
`conda install -c <CHANNELNAME源地址> <PKG1包> <PKG2>` | 从特定源(如清华源、阿里源)安装包
`conda install PKGNAME=3.1.4` | 安装指定版本的包
`conda install "PKGNAME>2.5,<3.2"` | 使用AND逻辑安装包
`conda install "<PKGNAME> [version='2.5\|3.2']"` |
`conda uninstall <PKGNAME>` | 卸载包
`conda config --show-sources` | 查看源地址(位置越靠上,搜索的时候越优先)
`conda config --add channels <CHANNELNAME>` | 添加conda的源地址
`conda config --remove channels <CHANNELNAME>`| 移除conda的源地址
### 更改环境
Command | Description
:-- | --
`conda create -n <ENVNAME> python=3.10` | 指定Python版本创建环境
`conda create --clone <ENVNAME> -n <NEWENV>` | 从已有环境克隆一个新环境
`conda rename -n <ENVNAME> <NEWENVNAME>` | 对环境名字重命名
`conda remove -n <ENVNAME> --all` | 通过名字删除一个环境
`conda list -n <ENVNAME> --revisions` | 列出环境的各个修订版本
`conda install -n <ENVNAME> --revision <NUMBER>"` | 回滚到环境的某个版本本
<!--rehype:className=style-list-arrow-->
关于 `conda` 环境回滚可参考:[这里](https://www.pybloggers.com/2016/06/conda-revisions-letting-you-rollback-to-a-previous-version-of-your-environment/)
### 导出环境配置
<!--rehype:wrap-class=col-span-2 row-span-2-->
建议将导出文件命名为“environment”环境名称将被保留
Command | Description
:-- | --
`conda env export --from-history>ENV.yml` | 跨平台兼容需(通过这种方式,可以省去所有其他可能是特定于平台的依赖项)
`conda env export -n ENVNAME > ENV.yml` | 导出指定环境到yml文件
`conda env export > ENV.yml` | 导出当前环境到yml文件
`conda list --explicit>ENV.txt` | 导出包信息到当前目录
`conda env create -n ENVNAME --file ENV.yml` | 从yml文件导入
`conda create -n ENVNAME --file ENV.txt` | 从txt文件导入
<!--rehype:className=style-list-arrow-->
### 另外
查看命令帮助
```bash
conda <COMMAND> --help
conda search <PKGNAME> --info
conda clean --all # 清除所有未使用的文件
conda config --show # 检查conda配置
```
### 额外提示
```bash
conda COMMAND --help # 获得任何命令的帮助
# 获取任何包裹的信息
conda search PKGNAME --info
# 运行没有用户提示的命令,例如,安装多个包
conda COMMAND ARG --yes
conda install PKG1 PKG2 --yes
conda clean --all # 删除所有未使用的文件
conda config --show # 检查 conda 配置
```
另见
----
- [Anaconda文档](https://anaconda.org.cn/)
- [官网命令Cheat sheet](https://conda.io/projects/conda/en/latest/user-guide/cheatsheet.html)
- [Conda cheatsheet PDF](https://conda.io/projects/conda/en/latest/_downloads/843d9e0198f2a193a3484886fa28163c/conda-cheatsheet.pdf)

View File

@ -545,6 +545,416 @@ int main() {
}
```
### Lambda 表达式
<!--rehype:wrap-class=col-span-2-->
Lambda 表达式可以在函数内定义,可以理解为在函数内定义的临时函数。格式:
```cpp
auto func = []() -> return_type { };
```
- `[]`为捕获列表,能够捕获其所在函数的局部变量
- 一个空的捕获列表代表Lambda表达式不捕获任何的变量
- 对于值捕获,直接在中括号中填写要捕获的变量即可:
```cpp
int val = 5;
auto func = [val]() -> return_type { };
```
- 对于引用捕获,需要在捕获的变量前添加`&`
```cpp
string str("hello world!");
auto func = [&str]() -> return_type { };
```
- 如果变量太多,需要编译器根据我们编写的代码自动捕获,可以采用隐式捕获的方式。
- 全部值捕获:
```cpp
int val1, val2;
auto func = [=]() -> int
{
return val1 + val2;
};
```
- 全部引用捕获:
```cpp
string str1("hello"), str2("word!");
auto func = [&]() -> string
{
return str1 + str2;
};
```
- 混合隐式捕获:
如果希望对一部分变量采用值捕获,对其他变量采用引用捕获,可以混合使用:
```cpp
int val1 = 123, val2 = 456;
string str1("123"), str2(456);
auto func1 = [=, &str1]() -> int
{
return val1 == std::stoi(str1)
? val1 : val2;
};
auto func2 = [&, val1]() -> int
{
return str1 == std::to_string(val1)
? str1 : str2;
};
```
- `()` 是参数列表,我们只需要按照普通函数的使用方法来使用即可
- `return_type` 是函数的返回类型,`-> return_type` 可以不写,编译器会自动推导
- `{}` 中的内容就是函数体,依照普通函数的使用方法使用即可
<!--rehype:className=style-timeline-->
此处给出一个 Lambda 表达式的实际使用例子(当然可以使用 `str::copy`):
```cpp
// vec中包含1, 2, 3, 4, 5
std::vector<int> vec({1, 2, 3, 4, 5});
std::for_each(vec.begin(), vec.end(),
[](int& ele) -> void
{
std::cout << ele
<< " ";
});
```
## C++多线程
### 多线程介绍
g++编译选项:`-std=c++11`。包含头文件:
- `#include <thread>`C++多线程库
- `#include <mutex>`C++互斥量库
- `#include <future>`C++异步库
### 线程的创建
<!--rehype:wrap-class=row-span-2-->
以普通函数作为线程入口函数:
```cpp
void entry_1() { }
void entry_2(int val) { }
std::thread my_thread_1(entry_1);
std::thread my_thread_2(entry_2, 5);
```
以类对象作为线程入口函数:
```cpp
class Entry
{
void operator()() { }
void entry_function() { }
};
Entry entry;
// 调用operator()()
std::thread my_thread_1(entry);
// 调用Entry::entry_function
std::thread my_thread_2(&Entry::entry_function, &entry);
```
以lambda表达式作为线程入口函数
```cpp
std::thread my_thread([]() -> void
{
// ...
});
```
### 线程的销毁
```cpp
thread my_thread;
// 阻塞
my_thread.join();
// 非阻塞
my_thread.detach();
```
### `this_thread`
```cpp
// 获取当前线程ID
std::this_thread::get_id();
// 使当前线程休眠一段指定时间
std::this_thread::sleep_for();
// 使当前线程休眠到指定时间
std::this_thread::sleep_until();
// 暂停当前线程的执行,让别的线程执行
std::this_thread::yield();
```
### 锁
<!--rehype:wrap-class=row-span-3-->
> `#include <mutex>`
#### 锁的基本操作
创建锁
```cpp
std::mutex m;
```
上锁
```cpp
m.lock();
```
解锁
```cpp
m.unlock();
```
尝试上锁:成功返回`true`,失败返回`false`
```cpp
m.try_lock();
```
解锁
```cpp
m.unlock();
```
#### 更简单的锁 —— `std::lock_guard<Mutex>`
构造时上锁,析构时解锁
```cpp
std::mutex m;
std::lock_guard<std::mutex> lock(m);
```
额外参数:`std::adopt_lock`:只需解锁,无需上锁
```cpp
// 手动上锁
m.lock();
std::lock_guard<mutex> lock(m,
std::adopt_lock);
```
#### `unique_lock<Mutex>`
构造上锁,析构解锁
```cpp
std::mutex m;
std::unique_lock<mutex> lock(m);
```
##### `std::adopt_lock`
只需解锁,无需上锁
```cpp
// 手动上锁
m.lock();
std::unique_lock<mutex> lock(m,
std::adopt_lock);
```
##### `std::try_to_lock`
尝试上锁,可以通过`std::unique_lock<Mutex>::owns_lock()`查看状态
```cpp
std::unique_lock<mutex> lock(m,
std::try_to_lock);
if (lock.owns_lock())
{
// 拿到了锁
}
else
{
// 没有
}
```
##### `std::defer_lock`
绑定锁,但不上锁
```cpp
std::unique_lock<mutex> lock(m,
std::defer_lock);
lock.lock();
lock.unlock();
```
##### `std::unique_lock<Mutex>::release`
返回所管理的`mutex`对象指针,**释放所有权。**一旦释放了所有权,那么如果原来互斥量处于互斥状态,程序员有责任手动解锁。
#### `std::call_once`
当多个线程通过这个函数调用一个可调用对象时,只会有一个线程成功调用。
```cpp
std::once_flag flag;
void foo() { }
std::call_once(flag, foo);
```
### `std::condition_variable`
#### 创建条件变量
```cpp
std::condition_variable cond;
```
#### 等待条件变量被通知
```cpp
std::unique_lock<std::mutex>
lock;
extern bool predicate();
// 调用方式 1
cond.wait(lock);
// 调用方式 2
cond.wait(lock, predicate);
```
----
- `wait`不断地尝试重新获取并加锁该互斥量,如果获取不到,它就卡在这里并反复尝试重新获取,如果获取到了,执行流程就继续往下走
- `wait`在获取到互斥量并加锁了互斥量之后:
- 如果`wait`被提供了可调用对象,那么就执行这个可调用对象:
- 如果返回值为`false`,那么`wait`继续加锁,直到再次被 notified
- 如果返回值为`true`,那么`wait`返回,继续执行流程
- 如果`wait`没有第二个参数,那么直接返回,继续执行
#### `std::condition_variable::notify_one`
`notify_one` 唤醒一个调用 `wait` 的线程。注意在唤醒之前要解锁,否则调用 `wait` 的线程也会因为无法加锁而阻塞。
#### `std::condition_variable::notify_all`
唤醒所有调用 `wait` 的线程。
### 获取线程的运行结果
<!--rehype:wrap-class=row-span-2-->
> `#include <future>`
#### 创建异步任务
```cpp
double func(int val);
// 使用std::async创建异步任务
// 使用std::future获取结果
// future模板中存放返回值类型
std::future<double> result =
std::async(func, 5);
```
#### 获取异步任务的返回值
等待异步任务结束,但是不获取返回值:
```cpp
result.wait();
```
获取异步任务的返回值:
```cpp
int val = result.get();
```
注:
- `get()`返回右值,因此只可调用一次
- 只要调用上述任意函数,线程就会一直阻塞到返回值可用(入口函数运行结束)
#### `std::async` 的额外参数
额外参数可以被放在 `std::async` 的第一个参数位置,用于设定 `std::async` 的行为:
- `std::launch::deferred`:入口函数的运行会被推迟到`std::future<T>::get()`或者`std::future<T>::wait()`被调用时。此时调用线程会直接运行线程入口函数,换言之,**不会创建子线程**
- `std::launch::async`:立即创建子线程,并运行线程入口函数
- `std::launch::deferred | std::launch::async`:默认值,由系统自行决定
#### 返回值的状态
让当前线程等待一段时间(等待到指定时间点),以期待返回值准备好:
```cpp
extern double foo(int val) {}
std::future<double> result =
async(foo, 5);
//返回值类型
std::future_status status;
// 等待一段时间
status = result.wait_for(
std::chrono::seconds(1)
);
// 等待到某一时间点
status = result.wait_for(
std::chrono::now() +
std::chrono::seconds(1)
);
```
在指定的时间过去后,可以获取等待的结果:
```cpp
// 返回值已经准备好
if (status ==
std::future_status::ready)
{
}
// 超时:尚未准备好
else if (status ==
std::future_status::timeout)
{ }
// 尚未启动: std::launch::deferred
else if (status ==
std::future_status::deferred)
{ }
```
#### 多个返回值
```cpp
std::shared_future<T> result;
```
如果要多次获取结果,可以使用`std::shared_future`,其会返回结果的一个**拷贝**。
对于不可拷贝对象,可以在`std::shared_future`中存储对象的指针,而非指针本身。
C++ 预处理器
------------

View File

@ -26,47 +26,34 @@ $ dotnet run
Hello, world!
```
### 变量
### 命名空间
```cs
int intNum = 9;
long longNum = 9999999;
float floatNum = 9.99F;
double doubleNum = 99.999;
decimal decimalNum = 99.9999M;
char letter = 'D';
bool @bool = true;
string site = "jaywcjlove.github.io";
var num = 999;
var str = "999";
var bo = false;
//使用时 using 命名名称
using Test;
//创建:
namespace Test{
class Test_className{
// main方法是程序的主入口
public void Myclass() {
console.writeline("Test")
}
}
}
```
### 原始数据类型
### 访问修饰符
<!--rehype:wrap-class=row-span-2-->
数据类型 | 尺寸 | 范围
:- | - | -
| `int` | 4 bytes | -2^31^ ^to^ 2^31^-1 |
| `long` | 8 bytes | -2^63^ ^to^ 2^63^-1 |
| `float` | 4 bytes | 6 ^to^ 7 decimal digits |
| `double` | 8 bytes | 15 decimal digits |
| `decimal` | 16 bytes | 28 ^to^ 29 decimal digits |
| `char` | 2 bytes | 0 ^to^ 65535 |
| `bool` | 1 bit | true / false |
| `string` | 2 bytes per char | _N/A_ |
<!--rehype:className=show-header-->
### 注释
```cs
// 单行注释
/* 多行
注释 */
// TODO向 Visual Studio 中的任务列表添加注释
/// 用于文档的单行注释
/** 多行 注释
用于文档 **/
```
| 声明的可访问性 | 含义 |
|-----|----------------------|
| `public` | 访问不受限制 |
| `protected` | 访问限于包含类或派生自包含类的类型 (该类内部和继承类中可以访问) |
| `internal` | 访问限于当前程序集 |
| `protected internal` | 访问限于当前程序集或派生自包含类的类型 |
| `private` | 访问限于包含类 |
| `private protected` | 访问限于包含类或当前程序集中派生自包含类的类型,自 C# 7.2 之后可用 |
<!--rehype:className=style-list-->
### 字符串
@ -91,6 +78,42 @@ if(int.TryParse(Console.ReadLine(),out int input))
}
```
### 变量
```cs
int intNum = 9;
long longNum = 9999999;
float floatNum = 9.99F;
double doubleNum = 99.999;
decimal decimalNum = 99.9999M;
char letter = 'D';
bool @bool = true;
string site = "jaywcjlove.github.io";
var num = 999;
var str = "999";
var bo = false;
```
### 注释
```cs
// 单行注释
/*
* 多行
* 注释
*/
// TODO向IDE中的任务列表添加注释VS、Rider都支持
/// XML 单行注释,用于文档
/**
* XML 多行注释,
* 用于文档
*/
```
### 条件判断
```cs
@ -132,6 +155,39 @@ foreach(int num in numbers) {
}
```
C# 数据类型
---------------------
### 原始数据类型
<!--rehype:wrap-class=col-span-2-->
| 关键字 | 名称 | System 别名 | 占用空间Byte | 数据范围 |
| ------ | ------------ | ----------- | ---------- | ---------------------------------------- |
| `bool` | 布尔型 | `Boolean` | 1 | true/false |
| `sbyte` | 有符号字节型 | `SByte` | 1 | -128 ~ 127 |
| `byte` | 字节型 | `Byte` | 1 | 0 ~ 255 |
| `short` | 短整型 | `Int16` | 2 | -32,768 ~ 32,767 |
| `ushort` | 无符号短整型 | `UInt16` | 2 | 0 ~ 65,535 |
| `int` | 整型 | `Int32` | 4 | -2,147,483,648 ~ 2,147,483,647 |
| `uint` | 无符号整型 | `UInt32` | 4 | 0 ~ 4,294,967,295 |
| `long` | 长整型 | `Int64` | 8 | -2^63 ~ 2^63-1 |
| `ulong` | 无符号长整型 | `UInt64` | 8 | 0 ~ 2^64-1 |
| `char` | 字符型 | `Char` | 8 | UTF-16 所编码的字符 |
| `float` | 单精度浮点型 | `Single` | 4 | ±1.5x10^45 ~ ±3.4x10^38 |
| `double` | 双精度浮点型 | `Double` | 8 | ±5.0x10^-324 ~ ±1.7x10^308 |
| `nint` | 指针型 | `IntPtr` | 与指针相同 | 与指针相同(受操作系统和处理器位宽影响) |
| `nuint` | 无符号指针型 | `UIntPtr` | 与指针相同 | 与指针相同(受操作系统和处理器位宽影响) |
<!--rehype:className=show-header-->
### 基本数据类型
关键字 | 名称 | System 别名 | 说明
:------ | ------ | ------ | ------
(除指针型外的全部原始数据类型) | - | - | 原始数据类型都是值类型,基本数据类型包含部分本质上是引用的数据类型
`string` | 字符串 | `String` | 可变长度
`decimal` | 十进制浮点数 | `Decimal` | 适合处理货币等计算16字节长不遵循 IEEE 754 关于浮点数的规则
<!--rehype:className=show-header-->
C# 字符串
----------------
@ -213,6 +269,78 @@ string multiLine = """
Console.WriteLine(multiLine); // => Content begin "Hello World!" /\n<>"" end.
```
### 字符串操作
#### 字符串分割
```cs
string Name = "字A符A串A分A割";
string[] Names=Name.Split(new char[] { 'A' });
//会以A为媒介把字符串分成若干份
for (int i = 0; i < Names.Length; i++)
{
Console.Write(Names[i]);
}
```
#### 字符串截取
```cs
string Str = "字符串截取";
Str = Str.Substring(2, 1);
Console.WriteLine(Str);
//输出结果“串”,意为从第二个下标开始截取一位字符
```
#### 字符串替换
```cs
string Rep = "字符1替换";
Rep = Rep.Replace("1", "串");
Console.WriteLine(Rep);
//会把字符中的 “1”替换成“串”
```
### 逻辑运算
<!--rehype:wrap-class=col-span-2-->
```cs
//或运算, 与运算, 非运算
bool A = true;
bool B = false;
bool Or = A || B; // = A | B
bool And = A && B; // = A & B
bool Not = !A;
// ||,&& 与 |,& 分别为逻辑运算和条件逻辑运算, 两者的区别在于,
// 前者仅在必要时才会计算右侧的值, 后者始终计算右侧的值. 例如:
bool C = false;
bool D = true;
bool CalcD() {
D = !D;
return D;
}
bool E = C && CalcD(); // C: false, D: false, E: false
bool F = C & CalcD(); // C:false, D: true, F: false
// 两种运算方法稍有不同, 计算结果始终相同, 但第二种可能造成其他影响.
//异或运算
bool Xor = A ^ B;
```
C# 中的逻辑运算支持可空布尔类型运算. 注意条件逻辑运算不支持可空布尔类型.
x | y | x & y | x \| y | x ^ y | ! x
:- | - | --- | --- | --- | --
true | true | true | true | false | false
true | false | false | true | true | false
true | null | null | true | null | false
false | true | false | true | true | true
false | false | false | false | false | true
false | null | false | null | null | true
null | true | null | true | null | null
null | false | false | null | null | null
null | null | null | null | null | null
<!--rehype:className=show-header-->
杂项
-----------
@ -221,8 +349,8 @@ Console.WriteLine(multiLine); // => Content begin "Hello World!" /\n<>"" end.
概念 | 中文名 | 定义
:- | -|--
Runtime | 运行时 | 执行给定的已编译代码单元所需的服务集合
Common Language Runtime (CLR) | 通用语言运行库 | 主要定位、加载和托管 .NET 对象。<br/>CLR 还处理内存管理、应用程序托管、线程协调、执行安全检查和其他低级细节
Managed code | 托管代码 | 在 `.NET` 运行时编译和运行的代码。 C#/F#/VB 就是例子
Unmanaged code | 非托管代码 | 直接编译为机器代码且不能由 .NET 运行时直接托管的代码。<br/>不包含空闲内存管理、垃圾收集等。从 C/C++ 创建的 DLL 就是示例
`Runtime` | 运行时 | 执行给定的已编译代码单元所需的服务集合
`Common Language Runtime (CLR)` | 通用语言运行库 | 主要定位、加载和托管 .NET 对象。<br/>CLR 还处理内存管理、应用程序托管、线程协调、执行安全检查和其他低级细节
`Managed code` | 托管代码 | 在 `.NET` 运行时编译和运行的代码。 C#/F#/VB 就是例子
`Unmanaged code` | 非托管代码 | 直接编译为机器代码且不能由 .NET 运行时直接托管的代码。<br/>不包含空闲内存管理、垃圾收集等。从 C/C++ 创建的 DLL 就是示例
<!--rehype:className=show-header-->

View File

@ -1468,6 +1468,17 @@ html {
[点击我](#入门)页面会平滑滚动到入门
### 修改浏览器自动填充 input 样式
```css
input[type="text"]:autofill {
box-shadow: 0 0 0 1000px #000 inset;
-webkit-text-fill-color: white;
}
```
另见: [:autofill](https://developer.mozilla.org/en-US/docs/Web/CSS/:autofill)
### 忽略用作间距的换行符 \<br />
```css
@ -1785,6 +1796,22 @@ button:disabled {
就这么简单
### 子元素选中父元素
```css
div:has(img) {
background: black;
}
```
设置包含子元素 `img` 的 `div` 元素样式,还可以嵌套:
```css
div:has(h2):has(ul) {
background: black;
}
```
### 在用作间距的换行符上设置 `display: none`
用户使用额外的换行符
@ -1795,6 +1822,141 @@ br + br {
}
```
### 给 `body` 添加行高
```css
body {
line-height: 1.5;
}
```
您不需要为每个 `<p>`、`<h*>` 等分别添加行高。相反,将其添加到正文
### 检查本地是否安装了字体
<!--rehype:wrap-class=row-span-2-->
```css
@font-face {
font-family: "Dank Mono";
src:
/* Full name */
local("Dank Mono"),
/* Postscript name */
local("Dank-Mono"),
/* 否则,请下载它! */
url("//...a.server/DankMono.woff");
}
code {
font-family: "Dank Mono",
system-ui-monospace;
}
```
您可以在远程获取字体之前检查是否在本地安装了字体,这也是一个很好的性能提示
### 获取 HTML 元素的属性
```html
<a href="https://example.com">超链接</a>
```
attr HTML 元素的属性名。
```css
a:after {
content: " (" attr(href) ")";
}
```
### 为表单元素设置 `:focus`
```css
a:focus, button:focus, input:focus,
select:focus, textarea:focus {
box-shadow: none;
outline: #000 dotted 2px;
outline-offset: .05em;
}
```
有视力的键盘用户依靠焦点来确定键盘事件在页面中的位置。使表单元素的焦点比浏览器的默认实现更加突出和一致
### 垂直居中任何东西
<!--rehype:wrap-class=row-span-2-->
```css
html, body {
height: 100%;
margin: 0;
}
body {
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
display: -webkit-flex;
display: flex;
}
```
...还有 CSS 网格:
```css
body {
display: grid;
height: 100vh;
margin: 0;
place-items: center center;
}
```
### 逗号分隔列表
```css
ul > li:not(:last-child)::after {
content: ",";
}
```
使列表项看起来像一个真实的逗号分隔列表,使用 `:not()` 伪类,最后一项不会添加逗号
### 图片对齐不变形
```css
img {
width: 200px;
height: 200px;
/** 确保图片按原始宽高比例进行缩放 */
object-fit: cover;
object-position: left top;
transition: 1s;
}
img:hover {
/** 指定图片显示的位置,结合鼠标移动+过渡动画 */
object-position: right bottom;
}
```
### 多行截断,展示省略号
```css
.clamp {
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
```
`html` 文本超过 3 行将被截断,显示省略号...
```html
<p class="clamp">
展示多行文本,超过 3 行将被截断,显示省略号...
</p>
```
另见
---------

View File

@ -17,14 +17,14 @@ $ docker run -d -p 80:80 docker/getting-started
----
- `-d` - 以分离模式运行容器
- `-p 80:80` - 将端口 80 映射到容器中的端口 80
- `-d` - 以分离(后台)模式运行容器
- `-p 80:80` - 将端口 80 映射到容器中的端口 80,格式:宿主机端口:容器端口
- `docker/getting-started` - 要使用的镜像
在前台创建并运行容器
在前台创建并运行容器(之后如果要退出容器但是不关闭容器,按*Ctrl+P+Q*即可)
```shell
$ docker run -it -p --rm 8001:8080 --name my-nginx nginx
$ docker run -it --rm -p 8001:8080 --name my-nginx nginx
```
----
@ -41,7 +41,7 @@ $ docker run -it -p --rm 8001:8080 --name my-nginx nginx
|-------------------------------------|--------------------------------------------------|
| `docker ps` | 列出正在运行的容器 |
| `docker ps -a` | 列出所有容器 |
| `docker ps -s` | 列出正在运行的容器 _(带 CPU / 内存)_ |
| `docker ps -s` | 列出正在运行的容器 *(带 CPU / 内存)* |
| `docker images` | 列出所有镜像 |
| `docker exec -it <container> bash` | 连接到容器 |
| `docker logs <container>` | 显示容器的控制台日志 |
@ -142,13 +142,14 @@ Docker 镜像
`docker load --input ubuntu.tar` | 加载一个 tarred 存储库
`docker save busybox > ubuntu.tar` | 将镜像保存到 tar 存档
`docker history` | 显示镜像的历史
`docker commit nginx` | 将容器另存为镜像
`docker commit nginx my_nginx` | 将容器另存为镜像
`docker tag nginx eon01/nginx` | 标记镜像
`docker push eon01/nginx` | 推送镜像
### 构建镜像
```shell
# 注意有的最后面是英文 .
$ docker build .
$ docker build github.com/creack/docker-firefox
$ docker build - < Dockerfile
@ -232,10 +233,10 @@ docker network create -d overlay \
| Docker 语法 | 说明 |
|------------|------|
`docker search search_word` | 在 docker hub 中搜索镜像
`docker pull user/image` | 从 docker hub 下载镜像
`docker search search_word` | 在 docker hub 中搜索镜像
`docker pull user/image` | 从 docker hub 下载镜像
`docker login` | 向 docker hub 进行身份验证
`docker push user/image` | 将镜像上传到 docker hub
`docker push user/image` | 将镜像上传到 docker hub
### 镜像仓库命令
<!--rehype:wrap-class=row-span-3-->
@ -312,7 +313,7 @@ $ docker volume prune
`docker-compose config` | 验证并查看 Compose 文件
`docker-compose scale <service_name>=<replica>` | 为服务指定容器个数
`docker-compose top` | 显示正在运行的进程
`docker-compose run -rm -p 2022:22 web bash` | 启动 Web 服务并运行 bash 作为其命令,删除旧容器
`docker-compose run -rm -p 2022:22 web bash` | 启动 Web 服务并运行 bash 作为其命令,删除旧容器
### Docker Services
@ -658,6 +659,6 @@ $ docker run -d --name gitlab \
另见
----
- [Dockerfile 备忘清单](./dockerfile.md) _(github.io)_
- [Docker 官方入门教程](https://docs.docker.com/get-started/) _(docker.com)_
- [Docker入门学习笔记](https://jaywcjlove.github.io/docker-tutorial) _(github.io)_
- [Dockerfile 备忘清单](./dockerfile.md) *(github.io)*
- [Docker 官方入门教程](https://docs.docker.com/get-started/) *(docker.com)*
- [Docker入门学习笔记](https://jaywcjlove.github.io/docker-tutorial) *(github.io)*

View File

@ -28,8 +28,8 @@ FROM [--platform=<platform>] <image> [AS <name>]
示例
```dockerfile
FROM ruby:2.2.2
FROM golang:1.19-alpine3.16 AS build-env
FROM ruby:3.2.2
FROM golang:1.20-alpine3.16 AS build-env
```
### 变量 ENV
@ -214,7 +214,7 @@ Dockerfile 示例
### 服务静态网站的最小 Docker 镜像
```dockerfile
FROM lipanski/docker-static-website:latest
FROM wcjiang/docker-static-website:latest
# 使用 .dockerignore 文件来控制镜像中的内容!
# 复制当前目录内容,到容器中
COPY ./ .
@ -223,13 +223,13 @@ COPY ./ .
这会产生一个 **`154KB +`** 的单层镜像。 如果您需要以不同的方式配置 `httpd`,您可以覆盖 CMD 行:
```dockerfile
FROM lipanski/docker-static-website:latest
FROM wcjiang/docker-static-website:latest
COPY . .
CMD ["/busybox","httpd","-f","-v","-p","3000","-c","httpd.conf"]
```
缩小镜像过程[查看原文](https://lipanski.com/posts/smallest-docker-image-static-website),镜像 [Dockerfile 源码](https://github.com/lipanski/docker-static-website)。
缩小镜像过程[查看原文](https://lipanski.com/posts/smallest-docker-image-static-website),镜像 [Dockerfile 源码](https://github.com/forksss/docker-static-website)。
### Docker 镜像多阶段构建

View File

@ -3,8 +3,109 @@ Emoji 备忘清单
有些表情符号代码不太容易记住,所以这里有一个小备忘单。
入门
----------
分类
----
### 笑脸
<!--rehype:wrap-style=font-size: 27px;-->
😀 😃 😄 😁 😆 😅 😂 🤣 🥲 🥹 ☺️
😊 😇 🙂 🙃 😉 😌 😍 🥰 😘 😗 😙
😚 😋 😛 😝 😜 🤪 🤨 🧐 🤓 😎 🥸
🤩 🥳 😏 😒 😞 😔 😟 😕 🙁 ☹️ 😣
😖 😫 😩 🥺 😢 😭 😮‍💨 😤 😠 😡 🤬
🤯 😳 🥵 🥶 😱 😨 😰 😥 😓 🫣 🤗
🫡 🤔 🫢 🤭 🤫 🤥 😶 😶‍🌫️ 😐 😑 😬
🫨 🫠 🙄 😯 😦 😧 😮 😲 🥱 😴 🤤
😪 😵 😵‍💫 🫥 🤐 🥴 🤢 🤮 🤧 😷 🤒
🤕 🤑 🤠 😈 👿 👹 👺 🤡 💩 👻 💀
☠️ 👽 👾 🤖 🎃
😺 😸 😹 😻 😼 😽 🙀 😿 😾
### 人与幻想
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-2-->
👶 👧 🧒 👦 👩 🧑 👨 👩‍🦱 🧑‍🦱 👨‍🦱 👩‍🦰 🧑‍🦰 👨‍🦰 👱‍♀️ 👱 👱‍♂️ 👩‍🦳 🧑‍🦳 👨‍🦳 👩‍🦲 🧑‍🦲 👨‍🦲 🧔‍♀️ 🧔 🧔‍♂️ 👵 🧓 👴 👲 👳‍♀️ 👳 👳‍♂️ 🧕 👮‍♀️ 👮 👮‍♂️ 👷‍♀️ 👷 👷‍♂️ 💂‍♀️ 💂 💂‍♂️ 🕵️‍♀️ 🕵️ 🕵️‍♂️ 👩‍⚕️ 🧑‍⚕️ 👨‍⚕️ 👩‍🌾 🧑‍🌾 👨‍🌾 👩‍🍳 🧑‍🍳 👨‍🍳 👩‍🎓 🧑‍🎓 👨‍🎓 👩‍🎤 🧑‍🎤 👨‍🎤 👩‍🏫 🧑‍🏫 👨‍🏫 👩‍🏭 🧑‍🏭 👨‍🏭 👩‍💻 🧑‍💻 👨‍💻 👩‍💼 🧑‍💼 👨‍💼 👩‍🔧 🧑‍🔧 👨‍🔧 👩‍🔬 🧑‍🔬 👨‍🔬 👩‍🎨 🧑‍🎨 👨‍🎨 👩‍🚒 🧑‍🚒 👨‍🚒 👩‍✈️ 🧑‍✈️ 👨‍✈️ 👩‍🚀 🧑‍🚀 👨‍🚀 👩‍⚖️ 🧑‍⚖️ 👨‍⚖️ 👰‍♀️ 👰 👰‍♂️ 🤵‍♀️ 🤵 🤵‍♂️ 👸 🫅 🤴 🥷 🦸‍♀️ 🦸 🦸‍♂️ 🦹‍♀️ 🦹 🦹‍♂️ 🤶 🧑‍🎄 🎅 🧙‍♀️ 🧙 🧙‍♂️ 🧝‍♀️ 🧝 🧝‍♂️ 🧛‍♀️ 🧛 🧛‍♂️ 🧟‍♀️ 🧟 🧟‍♂️ 🧞‍♀️ 🧞 🧞‍♂️ 🧜‍♀️ 🧜 🧜‍♂️ 🧚‍♀️ 🧚 🧚‍♂️ 🧌 👼 🤰 🫄 🫃 🤱 👩‍🍼 🧑‍🍼 👨‍🍼 🙇‍♀️ 🙇 🙇‍♂️ 💁‍♀️ 💁 💁‍♂️ 🙅‍♀️ 🙅 🙅‍♂️ 🙆‍♀️ 🙆 🙆‍♂️ 🙋‍♀️ 🙋 🙋‍♂️ 🧏‍♀️ 🧏 🧏‍♂️ 🤦‍♀️ 🤦 🤦‍♂️ 🤷‍♀️ 🤷 🤷‍♂️ 🙎‍♀️ 🙎 🙎‍♂️ 🙍‍♀️ 🙍 🙍‍♂️ 💇‍♀️ 💇 💇‍♂️ 💆‍♀️ 💆 💆‍♂️ 🧖‍♀️ 🧖 🧖‍♂️ 💅 🤳 💃 🕺 👯‍♀️ 👯 👯‍♂️ 🕴 👩‍🦽 🧑‍🦽 👨‍🦽 👩‍🦼 🧑‍🦼 👨‍🦼 🚶‍♀️ 🚶 🚶‍♂️ 👩‍🦯 🧑‍🦯 👨‍🦯 🧎‍♀️ 🧎 🧎‍♂️ 🏃‍♀️ 🏃 🏃‍♂️ 🧍‍♀️ 🧍 🧍‍♂️ 👭 🧑‍🤝‍🧑 👬 👫 👩‍❤️‍👩 💑 👨‍❤️‍👨 👩‍❤️‍👨 👩‍❤️‍💋‍👩 💏 👨‍❤️‍💋‍👨 👩‍❤️‍💋‍👨 👪 👨‍👩‍👦 👨‍👩‍👧 👨‍👩‍👧‍👦 👨‍👩‍👦‍👦 👨‍👩‍👧‍👧 👨‍👨‍👦 👨‍👨‍👧 👨‍👨‍👧‍👦 👨‍👨‍👦‍👦 👨‍👨‍👧‍👧 👩‍👩‍👦 👩‍👩‍👧 👩‍👩‍👧‍👦 👩‍👩‍👦‍👦 👩‍👩‍👧‍👧 👨‍👦 👨‍👦‍👦 👨‍👧 👨‍👧‍👦 👨‍👧‍👧 👩‍👦 👩‍👦‍👦 👩‍👧 👩‍👧‍👦 👩‍👧‍👧 🗣 👤 👥 🫂
### 手势和身体部位
<!--rehype:wrap-style=font-size: 32px;-->
👋 🤚 🖐 ✋ 🖖 👌 🤌 🤏 ✌️ 🤞 🫰 🤟 🤘 🤙 🫵 🫱 🫲 🫸 🫷 🫳 🫴 👈 👉 👆 🖕 👇 ☝️ 👍 👎 ✊ 👊 🤛 🤜 👏 🫶 🙌 👐 🤲 🤝 🙏 ✍️ 💅 🤳 💪 🦾 🦵 🦿 🦶 👣 👂 🦻 👃 🫀 🫁 🧠 🦷 🦴 👀 👁 👅 👄 🫦 💋 🩸
### 苍白的表情符号
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-2 row-span-2-->
👋🏻 🤚🏻 🖐🏻 ✋🏻 🖖🏻 👌🏻 🤌🏻 🤏🏻 ✌🏻 🤞🏻 🫰🏻 🤟🏻 🤘🏻 🤙🏻 🫵🏻 🫱🏻 🫲🏻 🫸🏻 🫷🏻 🫳🏻 🫴🏻 👈🏻 👉🏻 👆🏻 🖕🏻 👇🏻 ☝🏻 👍🏻 👎🏻 ✊🏻 👊🏻 🤛🏻 🤜🏻 👏🏻 🫶🏻 🙌🏻 👐🏻 🤲🏻 🙏🏻 ✍🏻 💅🏻 🤳🏻 💪🏻 🦵🏻 🦶🏻 👂🏻 🦻🏻 👃🏻
👶🏻 👧🏻 🧒🏻 👦🏻 👩🏻 🧑🏻 👨🏻 👩🏻‍🦱 🧑🏻‍🦱 👨🏻‍🦱 👩🏻‍🦰 🧑🏻‍🦰 👨🏻‍🦰 👱🏻‍♀️ 👱🏻 👱🏻‍♂️ 👩🏻‍🦳 🧑🏻‍🦳 👨🏻‍🦳 👩🏻‍🦲 🧑🏻‍🦲 👨🏻‍🦲 🧔🏻‍♀️ 🧔🏻 🧔🏻‍♂️ 👵🏻 🧓🏻 👴🏻 👲🏻 👳🏻‍♀️ 👳🏻 👳🏻‍♂️ 🧕🏻 👮🏻‍♀️ 👮🏻 👮🏻‍♂️ 👷🏻‍♀️ 👷🏻 👷🏻‍♂️ 💂🏻‍♀️ 💂🏻 💂🏻‍♂️ 🕵🏻‍♀️ 🕵🏻 🕵🏻‍♂️ 👩🏻‍⚕️ 🧑🏻‍⚕️ 👨🏻‍⚕️ 👩🏻‍🌾 🧑🏻‍🌾 👨🏻‍🌾 👩🏻‍🍳 🧑🏻‍🍳 👨🏻‍🍳 👩🏻‍🎓 🧑🏻‍🎓 👨🏻‍🎓 👩🏻‍🎤 🧑🏻‍🎤 👨🏻‍🎤 👩🏻‍🏫 🧑🏻‍🏫 👨🏻‍🏫 👩🏻‍🏭 🧑🏻‍🏭 👨🏻‍🏭 👩🏻‍💻 🧑🏻‍💻 👨🏻‍💻 👩🏻‍💼 🧑🏻‍💼 👨🏻‍💼 👩🏻‍🔧 🧑🏻‍🔧 👨🏻‍🔧 👩🏻‍🔬 🧑🏻‍🔬 👨🏻‍🔬 👩🏻‍🎨 🧑🏻‍🎨 👨🏻‍🎨 👩🏻‍🚒 🧑🏻‍🚒 👨🏻‍🚒 👩🏻‍✈️ 🧑🏻‍✈️ 👨🏻‍✈️ 👩🏻‍🚀 🧑🏻‍🚀 👨🏻‍🚀 👩🏻‍⚖️ 🧑🏻‍⚖️ 👨🏻‍⚖️ 👰🏻‍♀️ 👰🏻 👰🏻‍♂️ 🤵🏻‍♀️ 🤵🏻 🤵🏻‍♂️ 👸🏻 🫅🏻 🤴🏻 🥷🏻 🦸🏻‍♀️ 🦸🏻 🦸🏻‍♂️ 🦹🏻‍♀️ 🦹🏻 🦹🏻‍♂️ 🤶🏻 🧑🏻‍🎄 🎅🏻 🧙🏻‍♀️ 🧙🏻 🧙🏻‍♂️ 🧝🏻‍♀️ 🧝🏻 🧝🏻‍♂️ 🧛🏻‍♀️ 🧛🏻 🧛🏻‍♂️ 🧜🏻‍♀️ 🧜🏻 🧜🏻‍♂️ 🧚🏻‍♀️ 🧚🏻 🧚🏻‍♂️ 👼🏻 🤰🏻 🫄🏻 🫃🏻 🤱🏻 👩🏻‍🍼 🧑🏻‍🍼 👨🏻‍🍼 🙇🏻‍♀️ 🙇🏻 🙇🏻‍♂️ 💁🏻‍♀️ 💁🏻 💁🏻‍♂️ 🙅🏻‍♀️ 🙅🏻 🙅🏻‍♂️ 🙆🏻‍♀️ 🙆🏻 🙆🏻‍♂️ 🙋🏻‍♀️ 🙋🏻 🙋🏻‍♂️ 🧏🏻‍♀️ 🧏🏻 🧏🏻‍♂️ 🤦🏻‍♀️ 🤦🏻 🤦🏻‍♂️ 🤷🏻‍♀️ 🤷🏻 🤷🏻‍♂️ 🙎🏻‍♀️ 🙎🏻 🙎🏻‍♂️ 🙍🏻‍♀️ 🙍🏻 🙍🏻‍♂️ 💇🏻‍♀️ 💇🏻 💇🏻‍♂️ 💆🏻‍♀️ 💆🏻 💆🏻‍♂️ 🧖🏻‍♀️ 🧖🏻 🧖🏻‍♂️ 💃🏻 🕺🏻 🕴🏻 👩🏻‍🦽 🧑🏻‍🦽 👨🏻‍🦽 👩🏻‍🦼 🧑🏻‍🦼 👨🏻‍🦼 🚶🏻‍♀️ 🚶🏻 🚶🏻‍♂️ 👩🏻‍🦯 🧑🏻‍🦯 👨🏻‍🦯 🧎🏻‍♀️ 🧎🏻 🧎🏻‍♂️ 🏃🏻‍♀️ 🏃🏻 🏃🏻‍♂️ 🧍🏻‍♀️ 🧍🏻 🧍🏻‍♂️ 👭🏻 🧑🏻‍🤝‍🧑🏻 👬🏻 👫🏻 🧗🏻‍♀️ 🧗🏻 🧗🏻‍♂️ 🏇🏻 🏂🏻 🏌🏻‍♀️ 🏌🏻 🏌🏻‍♂️ 🏄🏻‍♀️ 🏄🏻 🏄🏻‍♂️ 🚣🏻‍♀️ 🚣🏻 🚣🏻‍♂️ 🏊🏻‍♀️ 🏊🏻 🏊🏻‍♂️ ⛹🏻‍♀️ ⛹🏻 ⛹🏻‍♂️ 🏋🏻‍♀️ 🏋🏻 🏋🏻‍♂️ 🚴🏻‍♀️ 🚴🏻 🚴🏻‍♂️ 🚵🏻‍♀️ 🚵🏻 🚵🏻‍♂️ 🤸🏻‍♀️ 🤸🏻 🤸🏻‍♂️ 🤽🏻‍♀️ 🤽🏻 🤽🏻‍♂️ 🤾🏻‍♀️ 🤾🏻 🤾🏻‍♂️ 🤹🏻‍♀️ 🤹🏻 🤹🏻‍♂️ 🧘🏻‍♀️ 🧘🏻 🧘🏻‍♂️ 🛀🏻 🛌🏻
### 服装和配饰
<!--rehype:wrap-style=font-size: 26px;-->
🧳 🌂 ☂️ 🧵 🪡 🪢 🪭 🧶 👓 🕶 🥽
🥼 🦺 👔 👕 👖 🧣 🧤 🧥 🧦 👗 👘 🥻 🩴 🩱 🩲 🩳 👙 👚 👛 👜 👝 🎒 👞 👟 🥾 🥿 👠 👡 🩰 👢 👑 👒 🎩 🎓 🧢 ⛑ 🪖 💄 💍 💼
### 奶油白色表情符号
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
👋🏼 🤚🏼 🖐🏼 ✋🏼 🖖🏼 👌🏼 🤌🏼 🤏🏼 ✌🏼 🤞🏼 🫰🏼 🤟🏼 🤘🏼 🤙🏼 🫵🏼 🫱🏼 🫲🏼 🫸🏼 🫷🏼 🫳🏼 🫴🏼 👈🏼 👉🏼 👆🏼 🖕🏼 👇🏼 ☝🏼 👍🏼 👎🏼 ✊🏼 👊🏼 🤛🏼 🤜🏼 👏🏼 🫶🏼 🙌🏼 👐🏼 🤲🏼 🙏🏼 ✍🏼 💅🏼 🤳🏼 💪🏼 🦵🏼 🦶🏼 👂🏼 🦻🏼 👃🏼 👶🏼 👧🏼 🧒🏼 👦🏼 👩🏼 🧑🏼 👨🏼 👩🏼‍🦱 🧑🏼‍🦱 👨🏼‍🦱 👩🏼‍🦰 🧑🏼‍🦰 👨🏼‍🦰 👱🏼‍♀️ 👱🏼 👱🏼‍♂️ 👩🏼‍🦳 🧑🏼‍🦳 👨🏼‍🦳 👩🏼‍🦲 🧑🏼‍🦲 👨🏼‍🦲 🧔🏼‍♀️ 🧔🏼 🧔🏼‍♂️ 👵🏼 🧓🏼 👴🏼 👲🏼 👳🏼‍♀️ 👳🏼 👳🏼‍♂️ 🧕🏼 👮🏼‍♀️ 👮🏼 👮🏼‍♂️ 👷🏼‍♀️ 👷🏼 👷🏼‍♂️ 💂🏼‍♀️ 💂🏼 💂🏼‍♂️ 🕵🏼‍♀️ 🕵🏼 🕵🏼‍♂️ 👩🏼‍⚕️ 🧑🏼‍⚕️ 👨🏼‍⚕️ 👩🏼‍🌾 🧑🏼‍🌾 👨🏼‍🌾 👩🏼‍🍳 🧑🏼‍🍳 👨🏼‍🍳 👩🏼‍🎓 🧑🏼‍🎓 👨🏼‍🎓 👩🏼‍🎤 🧑🏼‍🎤 👨🏼‍🎤 👩🏼‍🏫 🧑🏼‍🏫 👨🏼‍🏫 👩🏼‍🏭 🧑🏼‍🏭 👨🏼‍🏭 👩🏼‍💻 🧑🏼‍💻 👨🏼‍💻 👩🏼‍💼 🧑🏼‍💼 👨🏼‍💼 👩🏼‍🔧 🧑🏼‍🔧 👨🏼‍🔧 👩🏼‍🔬 🧑🏼‍🔬 👨🏼‍🔬 👩🏼‍🎨 🧑🏼‍🎨 👨🏼‍🎨 👩🏼‍🚒 🧑🏼‍🚒 👨🏼‍🚒 👩🏼‍✈️ 🧑🏼‍✈️ 👨🏼‍✈️ 👩🏼‍🚀 🧑🏼‍🚀 👨🏼‍🚀 👩🏼‍⚖️ 🧑🏼‍⚖️ 👨🏼‍⚖️ 👰🏼‍♀️ 👰🏼 👰🏼‍♂️ 🤵🏼‍♀️ 🤵🏼 🤵🏼‍♂️ 👸🏼 🫅🏼 🤴🏼 🥷🏼 🦸🏼‍♀️ 🦸🏼 🦸🏼‍♂️ 🦹🏼‍♀️ 🦹🏼 🦹🏼‍♂️ 🤶🏼 🧑🏼‍🎄 🎅🏼 🧙🏼‍♀️ 🧙🏼 🧙🏼‍♂️ 🧝🏼‍♀️ 🧝🏼 🧝🏼‍♂️ 🧛🏼‍♀️ 🧛🏼 🧛🏼‍♂️ 🧜🏼‍♀️ 🧜🏼 🧜🏼‍♂️ 🧚🏼‍♀️ 🧚🏼 🧚🏼‍♂️ 👼🏼 🤰🏼 🫄🏼 🫃🏼 🤱🏼 👩🏼‍🍼 🧑🏼‍🍼 👨🏼‍🍼 🙇🏼‍♀️ 🙇🏼 🙇🏼‍♂️ 💁🏼‍♀️ 💁🏼 💁🏼‍♂️ 🙅🏼‍♀️ 🙅🏼 🙅🏼‍♂️ 🙆🏼‍♀️ 🙆🏼 🙆🏼‍♂️ 🙋🏼‍♀️ 🙋🏼 🙋🏼‍♂️ 🧏🏼‍♀️ 🧏🏼 🧏🏼‍♂️ 🤦🏼‍♀️ 🤦🏼 🤦🏼‍♂️ 🤷🏼‍♀️ 🤷🏼 🤷🏼‍♂️ 🙎🏼‍♀️ 🙎🏼 🙎🏼‍♂️ 🙍🏼‍♀️ 🙍🏼 🙍🏼‍♂️ 💇🏼‍♀️ 💇🏼 💇🏼‍♂️ 💆🏼‍♀️ 💆🏼 💆🏼‍♂️ 🧖🏼‍♀️ 🧖🏼 🧖🏼‍♂️ 💃🏼 🕺🏼 🕴🏼 👩🏼‍🦽 🧑🏼‍🦽 👨🏼‍🦽 👩🏼‍🦼 🧑🏼‍🦼 👨🏼‍🦼 🚶🏼‍♀️ 🚶🏼 🚶🏼‍♂️ 👩🏼‍🦯 🧑🏼‍🦯 👨🏼‍🦯 🧎🏼‍♀️ 🧎🏼 🧎🏼‍♂️ 🏃🏼‍♀️ 🏃🏼 🏃🏼‍♂️ 🧍🏼‍♀️ 🧍🏼 🧍🏼‍♂️ 👭🏼 🧑🏼‍🤝‍🧑🏼 👬🏼 👫🏼 🧗🏼‍♀️ 🧗🏼 🧗🏼‍♂️ 🏇🏼 🏂🏼 🏌🏼‍♀️ 🏌🏼 🏌🏼‍♂️ 🏄🏼‍♀️ 🏄🏼 🏄🏼‍♂️ 🚣🏼‍♀️ 🚣🏼 🚣🏼‍♂️ 🏊🏼‍♀️ 🏊🏼 🏊🏼‍♂️ ⛹🏼‍♀️ ⛹🏼 ⛹🏼‍♂️ 🏋🏼‍♀️ 🏋🏼 🏋🏼‍♂️ 🚴🏼‍♀️ 🚴🏼 🚴🏼‍♂️ 🚵🏼‍♀️ 🚵🏼 🚵🏼‍♂️ 🤸🏼‍♀️ 🤸🏼 🤸🏼‍♂️ 🤽🏼‍♀️ 🤽🏼 🤽🏼‍♂️ 🤾🏼‍♀️ 🤾🏼 🤾🏼‍♂️ 🤹🏼‍♀️ 🤹🏼 🤹🏼‍♂️ 🧘🏼‍♀️ 🧘🏼 🧘🏼‍♂️ 🛀🏼 🛌🏼
### 棕色表情符号
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
👋🏽 🤚🏽 🖐🏽 ✋🏽 🖖🏽 👌🏽 🤌🏽 🤏🏽 ✌🏽 🤞🏽 🫰🏽 🤟🏽 🤘🏽 🤙🏽 🫵🏽 🫱🏽 🫲🏽 🫸🏽 🫷🏽 🫳🏽 🫴🏽 👈🏽 👉🏽 👆🏽 🖕🏽 👇🏽 ☝🏽 👍🏽 👎🏽 ✊🏽 👊🏽 🤛🏽 🤜🏽 👏🏽 🫶🏽 🙌🏽 👐🏽 🤲🏽 🙏🏽 ✍🏽 💅🏽 🤳🏽 💪🏽 🦵🏽 🦶🏽 👂🏽 🦻🏽 👃🏽 👶🏽 👧🏽 🧒🏽 👦🏽 👩🏽 🧑🏽 👨🏽 👩🏽‍🦱 🧑🏽‍🦱 👨🏽‍🦱 👩🏽‍🦰 🧑🏽‍🦰 👨🏽‍🦰 👱🏽‍♀️ 👱🏽 👱🏽‍♂️ 👩🏽‍🦳 🧑🏽‍🦳 👨🏽‍🦳 👩🏽‍🦲 🧑🏽‍🦲 👨🏽‍🦲 🧔🏽‍♀️ 🧔🏽 🧔🏽‍♂️ 👵🏽 🧓🏽 👴🏽 👲🏽 👳🏽‍♀️ 👳🏽 👳🏽‍♂️ 🧕🏽 👮🏽‍♀️ 👮🏽 👮🏽‍♂️ 👷🏽‍♀️ 👷🏽 👷🏽‍♂️ 💂🏽‍♀️ 💂🏽 💂🏽‍♂️ 🕵🏽‍♀️ 🕵🏽 🕵🏽‍♂️ 👩🏽‍⚕️ 🧑🏽‍⚕️ 👨🏽‍⚕️ 👩🏽‍🌾 🧑🏽‍🌾 👨🏽‍🌾 👩🏽‍🍳 🧑🏽‍🍳 👨🏽‍🍳 👩🏽‍🎓 🧑🏽‍🎓 👨🏽‍🎓 👩🏽‍🎤 🧑🏽‍🎤 👨🏽‍🎤 👩🏽‍🏫 🧑🏽‍🏫 👨🏽‍🏫 👩🏽‍🏭 🧑🏽‍🏭 👨🏽‍🏭 👩🏽‍💻 🧑🏽‍💻 👨🏽‍💻 👩🏽‍💼 🧑🏽‍💼 👨🏽‍💼 👩🏽‍🔧 🧑🏽‍🔧 👨🏽‍🔧 👩🏽‍🔬 🧑🏽‍🔬 👨🏽‍🔬 👩🏽‍🎨 🧑🏽‍🎨 👨🏽‍🎨 👩🏽‍🚒 🧑🏽‍🚒 👨🏽‍🚒 👩🏽‍✈️ 🧑🏽‍✈️ 👨🏽‍✈️ 👩🏽‍🚀 🧑🏽‍🚀 👨🏽‍🚀 👩🏽‍⚖️ 🧑🏽‍⚖️ 👨🏽‍⚖️ 👰🏽‍♀️ 👰🏽 👰🏽‍♂️ 🤵🏽‍♀️ 🤵🏽 🤵🏽‍♂️ 👸🏽 🫅🏽 🤴🏽 🥷🏽 🦸🏽‍♀️ 🦸🏽 🦸🏽‍♂️ 🦹🏽‍♀️ 🦹🏽 🦹🏽‍♂️ 🤶🏽 🧑🏽‍🎄 🎅🏽 🧙🏽‍♀️ 🧙🏽 🧙🏽‍♂️ 🧝🏽‍♀️ 🧝🏽 🧝🏽‍♂️ 🧛🏽‍♀️ 🧛🏽 🧛🏽‍♂️ 🧜🏽‍♀️ 🧜🏽 🧜🏽‍♂️ 🧚🏽‍♀️ 🧚🏽 🧚🏽‍♂️ 👼🏽 🤰🏽 🫄🏽 🫃🏽 🤱🏽 👩🏽‍🍼 🧑🏽‍🍼 👨🏽‍🍼 🙇🏽‍♀️ 🙇🏽 🙇🏽‍♂️ 💁🏽‍♀️ 💁🏽 💁🏽‍♂️ 🙅🏽‍♀️ 🙅🏽 🙅🏽‍♂️ 🙆🏽‍♀️ 🙆🏽 🙆🏽‍♂️ 🙋🏽‍♀️ 🙋🏽 🙋🏽‍♂️ 🧏🏽‍♀️ 🧏🏽 🧏🏽‍♂️ 🤦🏽‍♀️ 🤦🏽 🤦🏽‍♂️ 🤷🏽‍♀️ 🤷🏽 🤷🏽‍♂️ 🙎🏽‍♀️ 🙎🏽 🙎🏽‍♂️ 🙍🏽‍♀️ 🙍🏽 🙍🏽‍♂️ 💇🏽‍♀️ 💇🏽 💇🏽‍♂️ 💆🏽‍♀️ 💆🏽 💆🏽‍♂️ 🧖🏽‍♀️ 🧖🏽 🧖🏽‍♂️ 💃🏽 🕺🏽 🕴🏽 👩🏽‍🦽 🧑🏽‍🦽 👨🏽‍🦽 👩🏽‍🦼 🧑🏽‍🦼 👨🏽‍🦼 🚶🏽‍♀️ 🚶🏽 🚶🏽‍♂️ 👩🏽‍🦯 🧑🏽‍🦯 👨🏽‍🦯 🧎🏽‍♀️ 🧎🏽 🧎🏽‍♂️ 🏃🏽‍♀️ 🏃🏽 🏃🏽‍♂️ 🧍🏽‍♀️ 🧍🏽 🧍🏽‍♂️ 👭🏽 🧑🏽‍🤝‍🧑🏽 👬🏽 👫🏽 🧗🏽‍♀️ 🧗🏽 🧗🏽‍♂️ 🏇🏽 🏂🏽 🏌🏽‍♀️ 🏌🏽 🏌🏽‍♂️ 🏄🏽‍♀️ 🏄🏽 🏄🏽‍♂️ 🚣🏽‍♀️ 🚣🏽 🚣🏽‍♂️ 🏊🏽‍♀️ 🏊🏽 🏊🏽‍♂️ ⛹🏽‍♀️ ⛹🏽 ⛹🏽‍♂️ 🏋🏽‍♀️ 🏋🏽 🏋🏽‍♂️ 🚴🏽‍♀️ 🚴🏽 🚴🏽‍♂️ 🚵🏽‍♀️ 🚵🏽 🚵🏽‍♂️ 🤸🏽‍♀️ 🤸🏽 🤸🏽‍♂️ 🤽🏽‍♀️ 🤽🏽 🤽🏽‍♂️ 🤾🏽‍♀️ 🤾🏽 🤾🏽‍♂️ 🤹🏽‍♀️ 🤹🏽 🤹🏽‍♂️ 🧘🏽‍♀️ 🧘🏽 🧘🏽‍♂️ 🛀🏽 🛌🏽
### 深棕色表情符号
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
👋🏾 🤚🏾 🖐🏾 ✋🏾 🖖🏾 👌🏾 🤌🏾 🤏🏾 ✌🏾 🤞🏾 🫰🏾 🤟🏾 🤘🏾 🤙🏾 🫵🏾 🫱🏾 🫲🏾 🫸🏾 🫷🏾 🫳🏾 🫴🏾 👈🏾 👉🏾 👆🏾 🖕🏾 👇🏾 ☝🏾 👍🏾 👎🏾 ✊🏾 👊🏾 🤛🏾 🤜🏾 👏🏾 🫶🏾 🙌🏾 👐🏾 🤲🏾 🙏🏾 ✍🏾 💅🏾 🤳🏾 💪🏾 🦵🏾 🦶🏾 👂🏾 🦻🏾 👃🏾 👶🏾 👧🏾 🧒🏾 👦🏾 👩🏾 🧑🏾 👨🏾 👩🏾‍🦱 🧑🏾‍🦱 👨🏾‍🦱 👩🏾‍🦰 🧑🏾‍🦰 👨🏾‍🦰 👱🏾‍♀️ 👱🏾 👱🏾‍♂️ 👩🏾‍🦳 🧑🏾‍🦳 👨🏾‍🦳 👩🏾‍🦲 🧑🏾‍🦲 👨🏾‍🦲 🧔🏾‍♀️ 🧔🏾 🧔🏾‍♂️ 👵🏾 🧓🏾 👴🏾 👲🏾 👳🏾‍♀️ 👳🏾 👳🏾‍♂️ 🧕🏾 👮🏾‍♀️ 👮🏾 👮🏾‍♂️ 👷🏾‍♀️ 👷🏾 👷🏾‍♂️ 💂🏾‍♀️ 💂🏾 💂🏾‍♂️ 🕵🏾‍♀️ 🕵🏾 🕵🏾‍♂️ 👩🏾‍⚕️ 🧑🏾‍⚕️ 👨🏾‍⚕️ 👩🏾‍🌾 🧑🏾‍🌾 👨🏾‍🌾 👩🏾‍🍳 🧑🏾‍🍳 👨🏾‍🍳 👩🏾‍🎓 🧑🏾‍🎓 👨🏾‍🎓 👩🏾‍🎤 🧑🏾‍🎤 👨🏾‍🎤 👩🏾‍🏫 🧑🏾‍🏫 👨🏾‍🏫 👩🏾‍🏭 🧑🏾‍🏭 👨🏾‍🏭 👩🏾‍💻 🧑🏾‍💻 👨🏾‍💻 👩🏾‍💼 🧑🏾‍💼 👨🏾‍💼 👩🏾‍🔧 🧑🏾‍🔧 👨🏾‍🔧 👩🏾‍🔬 🧑🏾‍🔬 👨🏾‍🔬 👩🏾‍🎨 🧑🏾‍🎨 👨🏾‍🎨 👩🏾‍🚒 🧑🏾‍🚒 👨🏾‍🚒 👩🏾‍✈️ 🧑🏾‍✈️ 👨🏾‍✈️ 👩🏾‍🚀 🧑🏾‍🚀 👨🏾‍🚀 👩🏾‍⚖️ 🧑🏾‍⚖️ 👨🏾‍⚖️ 👰🏾‍♀️ 👰🏾 👰🏾‍♂️ 🤵🏾‍♀️ 🤵🏾 🤵🏾‍♂️ 👸🏾 🫅🏾 🤴🏾 🥷🏾 🦸🏾‍♀️ 🦸🏾 🦸🏾‍♂️ 🦹🏾‍♀️ 🦹🏾 🦹🏾‍♂️ 🤶🏾 🧑🏾‍🎄 🎅🏾 🧙🏾‍♀️ 🧙🏾 🧙🏾‍♂️ 🧝🏾‍♀️ 🧝🏾 🧝🏾‍♂️ 🧛🏾‍♀️ 🧛🏾 🧛🏾‍♂️ 🧜🏾‍♀️ 🧜🏾 🧜🏾‍♂️ 🧚🏾‍♀️ 🧚🏾 🧚🏾‍♂️ 👼🏾 🤰🏾 🫄🏾 🫃🏾 🤱🏾 👩🏾‍🍼 🧑🏾‍🍼 👨🏾‍🍼 🙇🏾‍♀️ 🙇🏾 🙇🏾‍♂️ 💁🏾‍♀️ 💁🏾 💁🏾‍♂️ 🙅🏾‍♀️ 🙅🏾 🙅🏾‍♂️ 🙆🏾‍♀️ 🙆🏾 🙆🏾‍♂️ 🙋🏾‍♀️ 🙋🏾 🙋🏾‍♂️ 🧏🏾‍♀️ 🧏🏾 🧏🏾‍♂️ 🤦🏾‍♀️ 🤦🏾 🤦🏾‍♂️ 🤷🏾‍♀️ 🤷🏾 🤷🏾‍♂️ 🙎🏾‍♀️ 🙎🏾 🙎🏾‍♂️ 🙍🏾‍♀️ 🙍🏾 🙍🏾‍♂️ 💇🏾‍♀️ 💇🏾 💇🏾‍♂️ 💆🏾‍♀️ 💆🏾 💆🏾‍♂️ 🧖🏾‍♀️ 🧖🏾 🧖🏾‍♂️ 💃🏾 🕺🏾 🕴🏿 👩🏾‍🦽 🧑🏾‍🦽 👨🏾‍🦽 👩🏾‍🦼 🧑🏾‍🦼 👨🏾‍🦼 🚶🏾‍♀️ 🚶🏾 🚶🏾‍♂️ 👩🏾‍🦯 🧑🏾‍🦯 👨🏾‍🦯 🧎🏾‍♀️ 🧎🏾 🧎🏾‍♂️ 🏃🏾‍♀️ 🏃🏾 🏃🏾‍♂️ 🧍🏾‍♀️ 🧍🏾 🧍🏾‍♂️ 👭🏾 🧑🏾‍🤝‍🧑🏾 👬🏾 👫🏾 🧗🏾‍♀️ 🧗🏾 🧗🏾‍♂️ 🏇🏾 🏂🏾 🏌🏾‍♀️ 🏌🏾 🏌🏾‍♂️ 🏄🏾‍♀️ 🏄🏾 🏄🏾‍♂️ 🚣🏾‍♀️ 🚣🏾 🚣🏾‍♂️ 🏊🏾‍♀️ 🏊🏾 🏊🏾‍♂️ ⛹🏾‍♀️ ⛹🏾 ⛹🏾‍♂️ 🏋🏾‍♀️ 🏋🏾 🏋🏾‍♂️ 🚴🏾‍♀️ 🚴🏾 🚴🏾‍♂️ 🚵🏾‍♀️ 🚵🏾 🚵🏾‍♂️ 🤸🏾‍♀️ 🤸🏾 🤸🏾‍♂️ 🤽🏾‍♀️ 🤽🏾 🤽🏾‍♂️ 🤾🏾‍♀️ 🤾🏾 🤾🏾‍♂️ 🤹🏾‍♀️ 🤹🏾 🤹🏾‍♂️ 🧘🏾‍♀️ 🧘🏾 🧘🏾‍♂️ 🛀🏾 🛌🏾
### 黑色表情符号
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
👋🏿 🤚🏿 🖐🏿 ✋🏿 🖖🏿 👌🏿 🤌🏿 🤏🏿 ✌🏿 🤞🏿 🫰🏿 🤟🏿 🤘🏿 🤙🏿 🫵🏿 🫱🏿 🫲🏿 🫸🏿 🫷🏿 🫳🏿 🫴🏿 👈🏿 👉🏿 👆🏿 🖕🏿 👇🏿 ☝🏿 👍🏿 👎🏿 ✊🏿 👊🏿 🤛🏿 🤜🏿 👏🏿 🫶🏿 🙌🏿 👐🏿 🤲🏿 🙏🏿 ✍🏿 💅🏿 🤳🏿 💪🏿 🦵🏿 🦶🏿 👂🏿 🦻🏿 👃🏿 👶🏿 👧🏿 🧒🏿 👦🏿 👩🏿 🧑🏿 👨🏿 👩🏿‍🦱 🧑🏿‍🦱 👨🏿‍🦱 👩🏿‍🦰 🧑🏿‍🦰 👨🏿‍🦰 👱🏿‍♀️ 👱🏿 👱🏿‍♂️ 👩🏿‍🦳 🧑🏿‍🦳 👨🏿‍🦳 👩🏿‍🦲 🧑🏿‍🦲 👨🏿‍🦲 🧔🏿‍♀️ 🧔🏿 🧔🏿‍♂️ 👵🏿 🧓🏿 👴🏿 👲🏿 👳🏿‍♀️ 👳🏿 👳🏿‍♂️ 🧕🏿 👮🏿‍♀️ 👮🏿 👮🏿‍♂️ 👷🏿‍♀️ 👷🏿 👷🏿‍♂️ 💂🏿‍♀️ 💂🏿 💂🏿‍♂️ 🕵🏿‍♀️ 🕵🏿 🕵🏿‍♂️ 👩🏿‍⚕️ 🧑🏿‍⚕️ 👨🏿‍⚕️ 👩🏿‍🌾 🧑🏿‍🌾 👨🏿‍🌾 👩🏿‍🍳 🧑🏿‍🍳 👨🏿‍🍳 👩🏿‍🎓 🧑🏿‍🎓 👨🏿‍🎓 👩🏿‍🎤 🧑🏿‍🎤 👨🏿‍🎤 👩🏿‍🏫 🧑🏿‍🏫 👨🏿‍🏫 👩🏿‍🏭 🧑🏿‍🏭 👨🏿‍🏭 👩🏿‍💻 🧑🏿‍💻 👨🏿‍💻 👩🏿‍💼 🧑🏿‍💼 👨🏿‍💼 👩🏿‍🔧 🧑🏿‍🔧 👨🏿‍🔧 👩🏿‍🔬 🧑🏿‍🔬 👨🏿‍🔬 👩🏿‍🎨 🧑🏿‍🎨 👨🏿‍🎨 👩🏿‍🚒 🧑🏿‍🚒 👨🏿‍🚒 👩🏿‍✈️ 🧑🏿‍✈️ 👨🏿‍✈️ 👩🏿‍🚀 🧑🏿‍🚀 👨🏿‍🚀 👩🏿‍⚖️ 🧑🏿‍⚖️ 👨🏿‍⚖️ 👰🏿‍♀️ 👰🏿 👰🏿‍♂️ 🤵🏿‍♀️ 🤵🏿 🤵🏿‍♂️ 👸🏿 🫅🏿 🤴🏿 🥷🏿 🦸🏿‍♀️ 🦸🏿 🦸🏿‍♂️ 🦹🏿‍♀️ 🦹🏿 🦹🏿‍♂️ 🤶🏿 🧑🏿‍🎄 🎅🏿 🧙🏿‍♀️ 🧙🏿 🧙🏿‍♂️ 🧝🏿‍♀️ 🧝🏿 🧝🏿‍♂️ 🧛🏿‍♀️ 🧛🏿 🧛🏿‍♂️ 🧜🏿‍♀️ 🧜🏿 🧜🏿‍♂️ 🧚🏿‍♀️ 🧚🏿 🧚🏿‍♂️ 👼🏿 🤰🏿 🫄🏿 🫃🏿 🤱🏿 👩🏿‍🍼 🧑🏿‍🍼 👨🏿‍🍼 🙇🏿‍♀️ 🙇🏿 🙇🏿‍♂️ 💁🏿‍♀️ 💁🏿 💁🏿‍♂️ 🙅🏿‍♀️ 🙅🏿 🙅🏿‍♂️ 🙆🏿‍♀️ 🙆🏿 🙆🏿‍♂️ 🙋🏿‍♀️ 🙋🏿 🙋🏿‍♂️ 🧏🏿‍♀️ 🧏🏿 🧏🏿‍♂️ 🤦🏿‍♀️ 🤦🏿 🤦🏿‍♂️ 🤷🏿‍♀️ 🤷🏿 🤷🏿‍♂️ 🙎🏿‍♀️ 🙎🏿 🙎🏿‍♂️ 🙍🏿‍♀️ 🙍🏿 🙍🏿‍♂️ 💇🏿‍♀️ 💇🏿 💇🏿‍♂️ 💆🏿‍♀️ 💆🏿 💆🏿‍♂️ 🧖🏿‍♀️ 🧖🏿 🧖🏿‍♂️ 💃🏿 🕺🏿 🕴🏿 👩🏿‍🦽 🧑🏿‍🦽 👨🏿‍🦽 👩🏿‍🦼 🧑🏿‍🦼 👨🏿‍🦼 🚶🏿‍♀️ 🚶🏿 🚶🏿‍♂️ 👩🏿‍🦯 🧑🏿‍🦯 👨🏿‍🦯 🧎🏿‍♀️ 🧎🏿 🧎🏿‍♂️ 🏃🏿‍♀️ 🏃🏿 🏃🏿‍♂️ 🧍🏿‍♀️ 🧍🏿 🧍🏿‍♂️ 👭🏿 🧑🏿‍🤝‍🧑🏿 👬🏿 👫🏿 🧗🏿‍♀️ 🧗🏿 🧗🏿‍♂️ 🏇🏿 🏂🏿 🏌🏿‍♀️ 🏌🏿 🏌🏿‍♂️ 🏄🏿‍♀️ 🏄🏿 🏄🏿‍♂️ 🚣🏿‍♀️ 🚣🏿 🚣🏿‍♂️ 🏊🏿‍♀️ 🏊🏿 🏊🏿‍♂️ ⛹🏿‍♀️ ⛹🏿 ⛹🏿‍♂️ 🏋🏿‍♀️ 🏋🏿 🏋🏿‍♂️ 🚴🏿‍♀️ 🚴🏿 🚴🏿‍♂️ 🚵🏿‍♀️ 🚵🏿 🚵🏿‍♂️ 🤸🏿‍♀️ 🤸🏿 🤸🏿‍♂️ 🤽🏿‍♀️ 🤽🏿 🤽🏿‍♂️ 🤾🏿‍♀️ 🤾🏿 🤾🏿‍♂️ 🤹🏿‍♀️ 🤹🏿 🤹🏿‍♂️ 🧘🏿‍♀️ 🧘🏿 🧘🏿‍♂️ 🛀🏿 🛌🏿
### 动物与自然
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
🐶 🐱 🐭 🐹 🐰 🦊 🐻 🐼 🐻‍❄️ 🐨 🐯 🦁 🐮 🐷 🐽 🐸 🐵 🙈 🙉 🙊 🐒 🐔 🐧 🐦 🐦‍⬛ 🐤 🐣 🐥 🦆 🦅 🦉 🦇 🐺 🐗 🐴 🦄 🐝 🪱 🐛 🦋 🐌 🐞 🐜 🪰 🪲 🪳 🦟 🦗 🕷 🕸 🦂 🐢 🐍 🦎 🦖 🦕 🐙 🦑 🦐 🦞 🦀 🪼 🪸 🐡 🐠 🐟 🐬 🐳 🐋 🦈 🐊 🐅 🐆 🦓 🫏 🦍 🦧 🦣 🐘 🦛 🦏 🐪 🐫 🦒 🦘 🦬 🐃 🐂 🐄 🐎 🐖 🐏 🐑 🦙 🐐 🦌 🫎 🐕 🐩 🦮 🐕‍🦺 🐈 🐈‍⬛ 🪽 🪶 🐓 🦃 🦤 🦚 🦜 🦢 🪿 🦩 🕊 🐇 🦝 🦨 🦡 🦫 🦦 🦥 🐁 🐀 🐿 🦔 🐾 🐉 🐲 🌵 🎄 🌲 🌳 🌴 🪹 🪺 🪵 🌱 🌿 ☘️ 🍀 🎍 🪴 🎋 🍃 🍂 🍁 🍄 🐚 🪨 🌾 💐 🌷 🪷 🌹 🥀 🌺 🌸 🪻 🌼 🌻 🌞 🌝 🌛 🌜 🌚 🌕 🌖 🌗 🌘 🌑 🌒 🌓 🌔 🌙 🌎 🌍 🌏 🪐 💫 ⭐️ 🌟 ✨ ⚡️ ☄️ 💥 🔥 🌪 🌈 ☀️ 🌤 ⛅️ 🌥 ☁️ 🌦 🌧 ⛈ 🌩 🌨 ❄️ ☃️ ⛄️ 🌬 💨 💧 💦 🫧 ☔️ ☂️ 🌊 🌫
### 食物和饮料
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
🍏 🍎 🍐 🍊 🍋 🍌 🍉 🍇 🍓 🫐 🍈 🍒 🍑 🥭 🍍 🥥 🥝 🍅 🍆 🥑 🥦 🫛 🥬 🥒 🌶 🫑 🌽 🥕 🫒 🧄 🧅 🫚 🥔 🍠 🫘 🥐 🥯 🍞 🥖 🥨 🧀 🥚 🍳 🧈 🥞 🧇 🥓 🥩 🍗 🍖 🦴 🌭 🍔 🍟 🍕 🫓 🥪 🥙 🧆 🌮 🌯 🫔 🥗 🥘 🫕 🥫 🍝 🍜 🍲 🍛 🍣 🍱 🥟 🦪 🍤 🍙 🍚 🍘 🍥 🥠 🥮 🍢 🍡 🍧 🍨 🍦 🥧 🧁 🍰 🎂 🍮 🍭 🍬 🍫 🍿 🍩 🍪 🌰 🥜 🍯 🥛 🍼 🫖 ☕️ 🍵 🧃 🥤 🧋 🫙 🍶 🍺 🍻 🥂 🍷 🫗 🥃 🍸 🍹 🧉 🍾 🧊 🥄 🍴 🍽 🥣 🥡 🥢 🧂
### 活动和运动
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
⚽️ 🏀 🏈 ⚾️ 🥎 🎾 🏐 🏉 🥏 🎱 🪀 🏓 🏸 🏒 🏑 🥍 🏏 🪃 🥅 ⛳️ 🪁 🏹 🎣 🤿 🥊 🥋 🎽 🛹 🛼 🛷 ⛸ 🥌 🎿 ⛷ 🏂 🪂 🏋️‍♀️ 🏋️ 🏋️‍♂️ 🤼‍♀️ 🤼 🤼‍♂️ 🤸‍♀️ 🤸 🤸‍♂️ ⛹️‍♀️ ⛹️ ⛹️‍♂️ 🤺 🤾‍♀️ 🤾 🤾‍♂️ 🏌️‍♀️ 🏌️ 🏌️‍♂️ 🏇 🧘‍♀️ 🧘 🧘‍♂️ 🏄‍♀️ 🏄 🏄‍♂️ 🏊‍♀️ 🏊 🏊‍♂️ 🤽‍♀️ 🤽 🤽‍♂️ 🚣‍♀️ 🚣 🚣‍♂️ 🧗‍♀️ 🧗 🧗‍♂️ 🚵‍♀️ 🚵 🚵‍♂️ 🚴‍♀️ 🚴 🚴‍♂️ 🏆 🥇 🥈 🥉 🏅 🎖 🏵 🎗 🎫 🎟 🎪 🤹 🤹‍♂️ 🤹‍♀️ 🎭 🩰 🎨 🎬 🎤 🎧 🎼 🎹 🥁 🪘 🪇 🎷 🎺 🪗 🎸 🪕 🎻 🪈 🎲 ♟ 🎯 🎳 🎮 🎰 🧩
### 旅游与地点
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
🚗 🚕 🚙 🚌 🚎 🏎 🚓 🚑 🚒 🚐 🛻 🚚 🚛 🚜 🦯 🦽 🦼 🛴 🚲 🛵 🏍 🛺 🚨 🚔 🚍 🚘 🚖 🛞 🚡 🚠 🚟 🚃 🚋 🚞 🚝 🚄 🚅 🚈 🚂 🚆 🚇 🚊 🚉 ✈️ 🛫 🛬 🛩 💺 🛰 🚀 🛸 🚁 🛶 ⛵️ 🚤 🛥 🛳 ⛴ 🚢 ⚓️ 🛟 🪝 ⛽️ 🚧 🚦 🚥 🚏 🗺 🗿 🗽 🗼 🏰 🏯 🏟 🎡 🎢 🛝 🎠 ⛲️ ⛱ 🏖 🏝 🏜 🌋 ⛰ 🏔 🗻 🏕 ⛺️ 🛖 🏠 🏡 🏘 🏚 🏗 🏭 🏢 🏬 🏣 🏤 🏥 🏦 🏨 🏪 🏫 🏩 💒 🏛 ⛪️ 🕌 🕍 🛕 🕋 ⛩ 🛤 🛣 🗾 🎑 🏞 🌅 🌄 🌠 🎇 🎆 🌇 🌆 🏙 🌃 🌌 🌉 🌁
### 对象
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
⌚️ 📱 📲 💻 ⌨️ 🖥 🖨 🖱 🖲 🕹 🗜 💽 💾 💿 📀 📼 📷 📸 📹 🎥 📽 🎞 📞 ☎️ 📟 📠 📺 📻 🎙 🎚 🎛 🧭 ⏱ ⏲ ⏰ 🕰 ⌛️ ⏳ 📡 🔋 🪫 🔌 💡 🔦 🕯 🪔 🧯 🛢 🛍️ 💸 💵 💴 💶 💷 🪙 💰 💳 💎 ⚖️ 🪮 🪜 🧰 🪛 🔧 🔨 ⚒ 🛠 ⛏ 🪚 🔩 ⚙️ 🪤 🧱 ⛓ 🧲 🔫 💣 🧨 🪓 🔪 🗡 ⚔️ 🛡 🚬 ⚰️ 🪦 ⚱️ 🏺 🔮 📿 🧿 🪬 💈 ⚗️ 🔭 🔬 🕳 🩹 🩺 🩻 🩼 💊 💉 🩸 🧬 🦠 🧫 🧪 🌡 🧹 🪠 🧺 🧻 🚽 🚰 🚿 🛁 🛀 🧼 🪥 🪒 🧽 🪣 🧴 🛎 🔑 🗝 🚪 🪑 🛋 🛏 🛌 🧸 🪆 🖼 🪞 🪟 🛍 🛒 🎁 🎈 🎏 🎀 🪄 🪅 🎊 🎉 🪩 🎎 🏮 🎐 🧧 ✉️ 📩 📨 📧 💌 📥 📤 📦 🏷 🪧 📪 📫 📬 📭 📮 📯 📜 📃 📄 📑 🧾 📊 📈 📉 🗒 🗓 📆 📅 🗑 🪪 📇 🗃 🗳 🗄 📋 📁 📂 🗂 🗞 📰 📓 📔 📒 📕 📗 📘 📙 📚 📖 🔖 🧷 🔗 📎 🖇 📐 📏 🧮 📌 📍 ✂️ 🖊 🖋 ✒️ 🖌 🖍 📝 ✏️ 🔍 🔎 🔏 🔐 🔒 🔓
### 符号
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-3-->
❤️ 🩷 🧡 💛 💚 💙 🩵 💜 🖤 🩶 🤍 🤎 ❤️‍🔥 ❤️‍🩹 💔 ❣️ 💕 💞 💓 💗 💖 💘 💝 💟 ☮️ ✝️ ☪️ 🪯 🕉 ☸️ ✡️ 🔯 🕎 ☯️ ☦️ 🛐 ⛎ ♈️ ♉️ ♊️ ♋️ ♌️ ♍️ ♎️ ♏️ ♐️ ♑️ ♒️ ♓️ 🆔 ⚛️ 🉑 ☢️ ☣️ 📴 📳 🈶 🈚️ 🈸 🈺 🈷️ ✴️ 🆚 💮 🉐 ㊙️ ㊗️ 🈴 🈵 🈹 🈲 🅰️ 🅱️ 🆎 🆑 🅾️ 🆘 ❌ ⭕️ 🛑 ⛔️ 📛 🚫 💯 💢 ♨️ 🚷 🚯 🚳 🚱 🔞 📵 🚭 ❗️ ❕ ❓ ❔ ‼️ ⁉️ 🔅 🔆 〽️ ⚠️ 🚸 🔱 ⚜️ 🔰 ♻️ ✅ 🈯️ 💹 ❇️ ✳️ ❎ 🌐 💠 Ⓜ️ 🌀 💤 🏧 🚾 ♿️ 🅿️ 🛗 🈳 🈂️ 🛂 🛃 🛄 🛅 🚹 🚺 🚼 ⚧ 🚻 🚮 🎦 🛜 📶 🈁 🔣 🔤 🔡 🔠 🆖 🆗 🆙 🆒 🆕 🆓 0⃣ 1⃣ 2⃣ 3⃣ 4⃣ 5⃣ 6⃣ 7⃣ 8⃣ 9⃣ 🔟 🔢 #⃣ *️⃣ ⏏️ ▶️ ⏸ ⏯ ⏹ ⏺ ⏭ ⏮ ⏩ ⏪ ⏫ ⏬ ◀️ 🔼 🔽 ➡️ ⬅️ ⬆️ ⬇️ ↗️ ↘️ ↙️ ↖️ ↕️ ↔️ ↪️ ↩️ ⤴️ ⤵️ 🔀 🔁 🔂 🔄 🔃 🎵 🎶 ➗ ✖️ 🟰 ♾ 💲 💱 ™️ ©️ ®️ 〰️ ➰ ➿ 🔚 🔙 🔛 🔝 🔜 ✔️ ☑️ 🔘 🔴 🟠 🟡 🟢 🔵 🟣 ⚫️ ⚪️ 🟤 🔺 🔻 🔸 🔹 🔶 🔷 🔳 🔲 ▪️ ▫️ ◾️ ◽️ ◼️ ◻️ 🟥 🟧 🟨 🟩 🟦 🟪 ⬛️ ⬜️ 🟫 🔈 🔇 🔉 🔊 🔔 🔕 📣 📢 👁‍🗨 💬 💭 🗯 ♠️ ♣️ ♥️ ♦️ 🃏 🎴 🀄️ 🕐 🕑 🕒 🕓 🕔 🕕 🕖 🕗 🕘 🕙 🕚 🕛 🕜 🕝 🕞 🕟 🕠 🕡 🕢 🕣 🕤 🕥 🕦 🕧
### 非表情符号
<!--rehype:wrap-style=font-size: 28px;-->
✢ ✣ ✤ ✥ ✦ ✧ ★ ☆ ✯ ✡︎ ✩ ✪ ✫ ✬ ✭ ✮ ✶ ✷ ✵ ✸ ✹ → ⇒ ⟹ ⇨ ⇾ ➾ ⇢ ☛ ☞ ➔ ➜ ➙ ➛ ➝ ➞ ♠︎ ♣︎ ♥︎ ♦︎ ♤ ♧ ♡ ♢ ♚ ♛ ♜ ♝ ♞ ♟ ♔ ♕ ♖ ♗ ♘ ♙ ⚀ ⚁ ⚂ ⚃ ⚄ ⚅ 🂠 ⚈ ⚉ ⚆ ⚇ 𓀀 𓀁 𓀂 𓀃 𓀄 𓀅 𓀆 𓀇 𓀈 𓀉 𓀊 𓀋 𓀌 𓀍 𓀎 𓀏 𓀐 𓀑 𓀒 𓀓 𓀔 𓀕 𓀖 𓀗 𓀘 𓀙 𓀚 𓀛 𓀜 𓀝
### 旗帜
<!--rehype:wrap-style=font-size: 28px;&wrap-class=col-span-2-->
🏳️ 🏴 🏁 🚩 🏳️‍🌈 🏳️‍⚧️ 🏴‍☠️ 🇦🇫 🇦🇽 🇦🇱 🇩🇿 🇦🇸 🇦🇩 🇦🇴 🇦🇮 🇦🇶 🇦🇬 🇦🇷 🇦🇲 🇦🇼 🇦🇺 🇦🇹 🇦🇿 🇧🇸 🇧🇭 🇧🇩 🇧🇧 🇧🇾 🇧🇪 🇧🇿 🇧🇯 🇧🇲 🇧🇹 🇧🇴 🇧🇦 🇧🇼 🇧🇷 🇮🇴 🇻🇬 🇧🇳 🇧🇬 🇧🇫 🇧🇮 🇰🇭 🇨🇲 🇨🇦 🇮🇨 🇨🇻 🇧🇶 🇰🇾 🇨🇫 🇹🇩 🇨🇱 🇨🇳 🇨🇽 🇨🇨 🇨🇴 🇰🇲 🇨🇬 🇨🇩 🇨🇰 🇨🇷 🇨🇮 🇭🇷 🇨🇺 🇨🇼 🇨🇾 🇨🇿 🇩🇰 🇩🇯 🇩🇲 🇩🇴 🇪🇨 🇪🇬 🇸🇻 🇬🇶 🇪🇷 🇪🇪 🇪🇹 🇪🇺 🇫🇰 🇫🇴 🇫🇯 🇫🇮 🇫🇷 🇬🇫 🇵🇫 🇹🇫 🇬🇦 🇬🇲 🇬🇪 🇩🇪 🇬🇭 🇬🇮 🇬🇷 🇬🇱 🇬🇩 🇬🇵 🇬🇺 🇬🇹 🇬🇬 🇬🇳 🇬🇼 🇬🇾 🇭🇹 🇭🇳 🇭🇰 🇭🇺 🇮🇸 🇮🇳 🇮🇩 🇮🇷 🇮🇶 🇮🇪 🇮🇲 🇮🇱 🇮🇹 🇯🇲 🇯🇵 🎌 🇯🇪 🇯🇴 🇰🇿 🇰🇪 🇰🇮 🇽🇰 🇰🇼 🇰🇬 🇱🇦 🇱🇻 🇱🇧 🇱🇸 🇱🇷 🇱🇾 🇱🇮 🇱🇹 🇱🇺 🇲🇴 🇲🇰 🇲🇬 🇲🇼 🇲🇾 🇲🇻 🇲🇱 🇲🇹 🇲🇭 🇲🇶 🇲🇷 🇲🇺 🇾🇹 🇲🇽 🇫🇲 🇲🇩 🇲🇨 🇲🇳 🇲🇪 🇲🇸 🇲🇦 🇲🇿 🇲🇲 🇳🇦 🇳🇷 🇳🇵 🇳🇱 🇳🇨 🇳🇿 🇳🇮 🇳🇪 🇳🇬 🇳🇺 🇳🇫 🇰🇵 🇲🇵 🇳🇴 🇴🇲 🇵🇰 🇵🇼 🇵🇸 🇵🇦 🇵🇬 🇵🇾 🇵🇪 🇵🇭 🇵🇳 🇵🇱 🇵🇹 🇵🇷 🇶🇦 🇷🇪 🇷🇴 🇷🇺 🇷🇼 🇼🇸 🇸🇲 🇸🇦 🇸🇳 🇷🇸 🇸🇨 🇸🇱 🇸🇬 🇸🇽 🇸🇰 🇸🇮 🇬🇸 🇸🇧 🇸🇴 🇿🇦 🇰🇷 🇸🇸 🇪🇸 🇱🇰 🇧🇱 🇸🇭 🇰🇳 🇱🇨 🇵🇲 🇻🇨 🇸🇩 🇸🇷 🇸🇿 🇸🇪 🇨🇭 🇸🇾 🇹🇼 🇹🇯 🇹🇿 🇹🇭 🇹🇱 🇹🇬 🇹🇰 🇹🇴 🇹🇹 🇹🇳 🇹🇷 🇹🇲 🇹🇨 🇹🇻 🇻🇮 🇺🇬 🇺🇦 🇦🇪 🇬🇧 🏴󠁧󠁢󠁥󠁮󠁧󠁿 🏴󠁧󠁢󠁳󠁣󠁴󠁿 🏴󠁧󠁢󠁷󠁬󠁳󠁿 🇺🇳 🇺🇸 🇺🇾 🇺🇿 🇻🇺 🇻🇦 🇻🇪 🇻🇳 🇼🇫 🇪🇭 🇾🇪 🇿🇲 🇿🇼
Github emoji 图标标记
----
### People

155
docs/feds.md Normal file
View File

@ -0,0 +1,155 @@
FED 前端导航
===
前端开发导航快速参考备忘单展示了前端的一些工具
社区
---
[CSDN](https://www.csdn.net/)<!--rehype:target=_blank&style=background: rgb(252 85 49/var(\-\-bg\-opacity));-->
[GitHub](https://github.com/)<!--rehype:target=_blank&style=background: rgb(0 0 0/var(\-\-bg\-opacity));-->
[InfoQ](http://www.infoq.com/cn)<!--rehype:target=_blank&style=background: rgb(66 133 244/var(\-\-bg\-opacity));-->
[Medium](https://medium.com/topic/technology)<!--rehype:target=_blank-->
[SegmentFault](https://segmentfault.com/)<!--rehype:target=_blank&style=background: rgb(0 150 94/var(\-\-bg\-opacity));-->
[Stack Overflow](https://stackoverflow.com/)<!--rehype:target=_blank&style=background: rgb(244 130 37/var(\-\-bg\-opacity));-->
[V2EX](https://www.v2ex.com/?tab=tech)<!--rehype:target=_blank&style=background: rgb(0 0 0/var(\-\-bg\-opacity));-->
[博客园](https://www.cnblogs.com/)<!--rehype:target=_blank&style=background: rgb(46 122 203/var(\-\-bg\-opacity));-->
[开源中国](https://www.oschina.net/)<!--rehype:target=_blank&style=background: rgb(43 179 81/var(\-\-bg\-opacity));-->
[稀土掘金](https://juejin.im/)<!--rehype:target=_blank&style=background: rgb(30 128 255/var(\-\-bg\-opacity));-->
[W3cplus](https://www.w3cplus.com/)<!--rehype:target=_blank-->
<!--rehype:class=home-card-->
构建工具
---
[Webpack](http://webpack.github.io/)<!--rehype:target=_blank&style=background: rgb(107 148 216/var(\-\-bg\-opacity));-->
[NPM](https://www.npmjs.com/)<!--rehype:target=_blank&style=background: rgb(203 8 1/var(\-\-bg\-opacity));-->
[Yarn](https://yarnpkg.com/zh-Hans/)<!--rehype:target=_blank&style=background: rgb(33 136 182/var(\-\-bg\-opacity));-->
[pnpm](https://pnpm.io/)<!--rehype:target=_blank&style=background: rgb(246 146 32/var(\-\-bg\-opacity));-->
[Lerna](https://lerna.js.org/)<!--rehype:target=_blank&style=background: rgb(147 51 234/var(\-\-bg\-opacity));-->
[Vitejs](https://cn.vitejs.dev/)<!--rehype:target=_blank&style=background: rgb(188 52 254/var(\-\-bg\-opacity));-->
[Gulp](https://gulpjs.com/)<!--rehype:target=_blank&style=background: rgb(207 70 71/var(\-\-bg\-opacity));-->
[Parcel](https://en.parceljs.org/)<!--rehype:target=_blank&style=background: rgb(192 145 99/var(\-\-bg\-opacity));-->
[Rollup](https://rollupjs.org/guide/en/)<!--rehype:target=_blank&style=background: rgb(239 51 53/var(\-\-bg\-opacity));-->
[Turbopack](https://turbo.build/)<!--rehype:target=_blank&style=background: rgb(248 30 87/var(\-\-bg\-opacity));-->
[Create React App](https://create-react-app.dev/)<!--rehype:target=_blank&style=background: rgb(60 106 146/var(\-\-bg\-opacity));-->
[Browserify](http://browserify.org/)<!--rehype:target=_blank&style=background: rgb(60 106 146/var(\-\-bg\-opacity));-->
[Yeoman](http://yeoman.io/)<!--rehype:target=_blank-->
[Grunt](https://gruntjs.com/)<!--rehype:target=_blank-->
[Babel](https://babeljs.io/)<!--rehype:target=_blank&style=background: rgb(245 218 85/var(\-\-bg\-opacity));-->
[FIS3](https://fex-team.github.io/fis3/)<!--rehype:target=_blank-->
<!--rehype:class=home-card-->
教程文档
---
[MDN Web Docs](https://developer.mozilla.org/zh-CN/)<!--rehype:target=_blank&style=background: rgb(140 181 255/var(\-\-bg\-opacity));-->
[ECMAScript 6 入门](https://es6.ruanyifeng.com/)<!--rehype:target=_blank-->
<!--rehype:class=home-card-->
JavaScript 工具
---
[Chrome Dev Tools](https://www.google.cn/chrome/)<!--rehype:target=_blank-->
[CoffeeScript](https://coffeescript.org/)<!--rehype:target=_blank-->
[Firefox Developer Tools](https://www.mozilla.org/zh-CN/firefox/new/)<!--rehype:target=_blank-->
[flow](https://flow.org/)<!--rehype:target=_blank&style=background: rgb(232 189 54/var(\-\-bg\-opacity));-->
[TypeScript](https://www.typescriptlang.org/)<!--rehype:target=_blank&style=background: rgb(49 120 197/var(\-\-bg\-opacity));-->
[JS 压缩,格式化](https://www.css-js.com/)<!--rehype:target=_blank-->
[JSDoc](https://jsdoc.app/)<!--rehype:target=_blank&style=background: rgb(197 149 199/var(\-\-bg\-opacity));-->
[UglifyJS](http://lisperator.net/uglifyjs/transform)<!--rehype:target=_blank-->
[Prettier](https://prettier.io/)<!--rehype:target=_blank&style=background: rgb(197 149 199/var(\-\-bg\-opacity));-->
<!--rehype:class=home-card-->
JavaScript 测试工具
---
[Chai](http://chaijs.com/)<!--rehype:target=_blank&style=background: rgb(164 8 1/var(\-\-bg\-opacity));-->
[ESLint](https://eslint.org/)<!--rehype:target=_blank&style=background: rgb(76 50 195/var(\-\-bg\-opacity));-->
[JSHint](http://jshint.com/)<!--rehype:target=_blank-->
[Jasmine](https://jasmine.github.io/)<!--rehype:target=_blank&style=background: rgb(138 65 130/var(\-\-bg\-opacity));-->
[Jest](https://jestjs.io/)<!--rehype:target=_blank&style=background: rgb(158 79 101/var(\-\-bg\-opacity));-->
[Mochajs](https://mochajs.org/)<!--rehype:target=_blank&style=background: rgb(141 103 72/var(\-\-bg\-opacity));-->
<!--rehype:class=home-card-->
CSS 工具
---
[30秒CSS](https://atomiks.github.io/30-seconds-of-css/)<!--rehype:target=_blank-->
[Autoprefixer](https://github.com/postcss/autoprefixer)<!--rehype:target=_blank-->
[ColorZilla](http://www.colorzilla.com/gradient-editor/)<!--rehype:target=_blank-->
[CSS Protips](https://github.com/AllThingsSmitty/css-protips)<!--rehype:target=_blank-->
[CSS3 Maker](http://www.css3maker.com/)<!--rehype:target=_blank-->
[cssnano](http://cssnano.co/)<!--rehype:target=_blank-->
[CSSPIN](https://webkul.github.io/csspin/)<!--rehype:target=_blank-->
[CSSreference](https://cssreference.io/)<!--rehype:target=_blank-->
[CSSTree](https://github.com/csstree/csstree)<!--rehype:target=_blank-->
[CSS美化压缩](http://tool.css-js.com/)<!--rehype:target=_blank-->
[Easing Functions Cheat Sheet](http://easings.net/zh-cn)<!--rehype:target=_blank-->
[Emmet](https://www.emmet.io/)<!--rehype:target=_blank-->
[est](http://ecomfe.github.io/est/)<!--rehype:target=_blank-->
[Flex Layout Attribute](https://github.com/StefanKovac/flex-layout-attribute)<!--rehype:target=_blank-->
[Grid.Guide](http://grid.guide/)<!--rehype:target=_blank-->
[minireset.css](http://lesscss.org/)<!--rehype:target=_blank-->
[Normalize.css](http://necolas.github.io/normalize.css/)<!--rehype:target=_blank-->
[PostCSS](http://postcss.org/)<!--rehype:target=_blank-->
[purifycss](https://github.com/purifycss/purifycss)<!--rehype:target=_blank-->
[Less](https://lesscss.org/)<!--rehype:target=_blank&style=background: rgb(36 74 121/var(\-\-bg\-opacity));-->
[SASS](http://sass-lang.com/)<!--rehype:target=_blank&style=background: rgb(191 64 128/var(\-\-bg\-opacity));-->
[Sprite Cow](http://www.spritecow.com/)<!--rehype:target=_blank-->
[Stylus](http://stylus-lang.com/)<!--rehype:target=_blank&style=background: rgb(126 194 66/var(\-\-bg\-opacity));-->
[Stylelint](https://stylelint.io/)<!--rehype:target=_blank-->
<!--rehype:class=home-card-->
框架类库
---
[React](https://facebook.github.io/react/)<!--rehype:target=_blank&style=background: rgb(97 218 251/var(\-\-bg\-opacity));-->
[Vue 中文](https://cn.vuejs.org/)<!--rehype:target=_blank&style=background: rgb(66 184 131/var(\-\-bg\-opacity));-->
[Angular](https://angular.io/)<!--rehype:target=_blank&style=background: rgb(195 8 47/var(\-\-bg\-opacity));-->
[jQuery](http://www.jquery123.com/)<!--rehype:target=_blank-->
[Bootstrap](https://getbootstrap.com/)<!--rehype:target=_blank&style=background: rgb(113 44 249/var(\-\-bg\-opacity));-->
[React Native 中文](https://reactnative.cn/)<!--rehype:target=_blank&style=background: rgb(36 120 194/var(\-\-bg\-opacity));-->
[Flutter](https://flutter.dev/)<!--rehype:target=_blank&style=background: rgb(35 104 215/var(\-\-bg\-opacity));-->
[RxJs](http://reactivex.io/rxjs/)<!--rehype:target=_blank-->
<!--rehype:class=home-card-->
在线代码编辑器工具
---
[CodePen](https://codepen.io/)<!--rehype:target=_blank-->
[CodeSandbox](https://codesandbox.io/)<!--rehype:target=_blank-->
[StackBlitz](https://stackblitz.com/)<!--rehype:target=_blank-->
[esbuild](https://esbuild.github.io/)<!--rehype:target=_blank-->
[JSFiddle](https://jsfiddle.net/)<!--rehype:target=_blank-->
[Replit](https://replit.com/)<!--rehype:target=_blank-->
[JSRUN.NET](https://jsrun.net/)<!--rehype:target=_blank-->
[WebComponents.dev](https://webcomponents.dev/)<!--rehype:target=_blank-->
[JS Bin](https://jsbin.com/)<!--rehype:target=_blank-->
[RunKit](https://runkit.com/)<!--rehype:target=_blank-->
<!--rehype:class=home-card-->
兼容、性能测试
---
[Browser Sandbox](https://turbo.net/browsers)<!--rehype:target=_blank-->
[Browserdiet](https://browserdiet.com/zh/)<!--rehype:target=_blank-->
[browsershots](http://browsershots.org/)<!--rehype:target=_blank-->
[BrowserStack](https://www.browserstack.com/)<!--rehype:target=_blank-->
[Can I use](http://caniuse.com/)<!--rehype:target=_blank-->
[httpstatus](https://httpstatus.io/)<!--rehype:target=_blank-->
[Observatory](https://observatory.mozilla.org/)<!--rehype:target=_blank-->
[PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/?hl=zh-CN)<!--rehype:target=_blank-->
[Security Headers](https://securityheaders.com/)<!--rehype:target=_blank-->
<!--rehype:class=home-card-->
CDN
---
[cdnjs](https://cdnjs.com/)<!--rehype:target=_blank-->
[jsDelivr](https://www.jsdelivr.com/)<!--rehype:target=_blank-->
[前端静态资源库](https://cdn.baomitu.com/)<!--rehype:target=_blank-->
[UNPKG](https://unpkg.com/)<!--rehype:target=_blank-->
[Statically](https://statically.io/)<!--rehype:target=_blank-->
[raw.githack.com](http://raw.githack.com/)<!--rehype:target=_blank-->
<!--rehype:class=home-card-->

View File

@ -157,12 +157,12 @@ with app.test_request_context():
### HTTP 方法
默认情况下,路由仅响应 `GET` 请求。可以使用 `route()` 装饰器的方法参数来处理不同的 `HTTP` 方法
默认路由仅响应 `GET` 请求。可以使用 `route()` 装饰器的方法参数来处理不同的 `HTTP` 方法
```py
from flask import request
@app.route('/login', methods=['GET', 'POST'])
@app.route('/login',methods=['GET','POST'])
def login():
if request.method == 'POST':
return do_the_login()
@ -181,3 +181,75 @@ def login_get():
def login_post():
return do_the_login()
```
### Blueprint
创建蓝图Bp1
```py
from flask import Blueprint, abort, jsonify
# 定义Bp1并定义url前缀为/img
Bp1 = Blueprint('imgBlue', __name__, template_folder='templates', url_prefix='/img')
@Bp1.route('/getimg')
def getImg():
try:
return jsonify(name="img", size="100KB")
except Exception as e:
abort(e)
```
创建蓝图Bp2
```py
from flask import Blueprint, abort, jsonify
# 定义Bp2并定义url前缀为/video
Bp2 = Blueprint('videoBlue', __name__, template_folder='templates', url_prefix='/video')
@Bp2.route('/getvideo')
def getvideo():
try:
return jsonify(name="video", size="100GB")
except Exception as e:
abort(e)
```
在flask app中引用蓝图Bp1和Bp2
```py
from flask import Flask, jsonify
from lantu.img import Bp1
from lantu.video import Bp2
app = Flask(__name__)
# 注册蓝图到app
app.register_blueprint(Bp1)
app.register_blueprint(Bp2)
@app.route('/')
def index():
return jsonify(name='phyger')
if __name__ == '__main__':
app.run(host="127.0.0.1", debug=True)
```
简单测试
```bash
curl http://127.0.0.1:5000/
>> {"name":"phyger"}
curl http://127.0.0.1:5000/img/getimg
>> {"name": "img", "size": "100KB"}
curl http://127.0.0.1:5000/video/getvideo
>> {"name": "video", "size": "100GB"}
```

View File

@ -616,10 +616,10 @@ Flex 的用法与 `Row` 或 `Column` 类似,但只需要额外传入 `directio
```dart
Flex(
direction: Axis.vertiacl,
children[
Fluterlogo(),
Fluterlogo(),
Fluterlogo(),
children: [
FlutterLogo(),
FlutterLogo(),
FlutterLogo(),
],
),
```
@ -628,11 +628,11 @@ Flex(
```dart
Flex(
dirction: Axis.horizontal,
direction: Axis.horizontal,
children: [
Flutterlogo(),
Flutterlogo(),
Flutterlogo(),
FlutterLogo(),
FlutterLogo(),
FlutterLogo(),
],
),
```

246
docs/gdb.md Normal file
View File

@ -0,0 +1,246 @@
GDB 备忘清单
===
本清单提供了对 [GDB](https://en.wikipedia.org/wiki/GNU_Debugger) 的入门简要概述,以及 `GDB` 常用示例,完整文档参阅 [Debugging with gdb](https://www.eecs.umich.edu/courses/eecs373/readings/Debugger.pdf),该文档最后有 `GDB index`,可以快速查找命令。
入门
---
<!--rehype:body-class=cols-2-->
### 常用命令
<!--rehype:wrap-class=row-span-2-->
`[]` 内为命令缩写
| 命令 `[缩写]` | 说明 |
|:--------------------|:-----------|
| `help[h]` | **查看命令帮助**。如 `help run` |
| `run[r]` | **运行程序**。可搭配参数使用 |
| `start` | **运行程序,停在第一条执行语句**。可搭配参数使用 |
| `list[l]` | **查看程序源码** |
| `break[b]` | **设置断点**。可指定文件名、函数名和行号等参数来设置断点 |
| `watch` | **设置监视点**。当监视的变量发生更改时,程序会被中断 |
| `delete` | **删除断点等**。可用于删除断点、监视点、`display` 等 |
| `continue[c]` | **继续执行程序**。让程序继续执行,到下一个断点或程序结束 |
| `next[n]` | **单步执行程序,跳过函数调用** |
| `step[s]` | **单步执行程序,进入函数调用** |
| `finish` | **结束当前函数**。返回到函数调用点 |
| `kill` | **杀死当前的调试进程** |
| `backtrace[bt]` | **查看函数调用栈**。它会打印出当前的函数调用栈 |
| `frame[fr]` | **切换栈帧**。以查看该栈帧中的局部变量和参数等 |
| `info` | **查看程序状态信息**。例如断点、寄存器、线程、局部变量等 |
| `show` | **查看 `gdb` 配置信息**。与 `info` 不同, `show` 查看 `GDB` 本身的配置信息 |
| `set` | **设置变量值**。有时指定变量类型才能设置,如 `set *(int*)(&a) = 3` |
| `whatis` | **查看变量、函数类型**。例如,`whatis a` 可以显示变量 `a` 的类型 |
| `ptype` | **查看变量、函数类型**。会显示完整的结构体类型 |
| `print[p]` | **打印变量的值**。例如,`print x` 可以显示变量 `x` 的当前值 |
| `display` | **持续打印变量的值**。与 `print` 类似,但它会在每次停下时自动输出值 |
| `thread` | **切换线程**。例如,`thread 2` 切换到编号为 `2` 的线程 |
| `signal` | **向进程发送信号**。例如,`signal 9` 发送编号为 `9` 的信号 |
<!--rehype:className=left-align-->
### 启动调试
启动进程,不带参数
```bash
# gdb <program>
(gdb) run
```
启动进程,带参数 `<args>`
```bash
# gdb <program>
(gdb) run <args>
```
启动 `gdb` 时传入参数,`run` 就不用传入了
```bash
# gdb --args <program> 1 2 3
(gdb) run
```
通过 `set` 设置参数
```bash
# gdb <program>
(gdb) set args 1 2 3
(gdb) run
```
显示运行时将要或已经传递给程序的参数
```bash
(gdb) show args
```
在启动进程前,添加环境变量
```bash
(gdb) set env DEBUG 1
```
在启动进程前,清除环境变量
```bash
(gdb) unset env DEBUG
```
通过进程号 `123` 连接到正在运行的进程
```bash
(gdb) attach 123
```
### core dump 文件
<!--rehype:wrap-class=row-span-2-->
默认情况下,`linux` 系统中程序崩溃时也不会生成 `core dump` 文件,需要先启用
```bash
ulimit -c unlimited
echo "/tmp/core-%e-%p-%t" > /proc/sys/kernel/core_pattern
```
调试 `core` 文件
```bash
gdb program /tmp/core-file
```
### 查看源码
<!--rehype:wrap-class=row-span-2-->
| 命令 | 说明 |
|:--------------------|:-----------|
| `(gdb) list 30` | 查看第 `30` 行为中心的上下 `5` 行源码 |
| `(gdb) list main` | 查看 `main` 函数为中心的上下 `5` 行源码 |
| `(gdb) list file.c:30` | 查看 `file.c` 文件中 `30` 行的源码 |
| `(gdb) list file.c:main` | 查看 `file.c` 文件中 `main` 函数 |
| `(gdb) disassemble` | 查看当前可执行文件的汇编源码 |
| `(gdb) disassemble myfun` | 查看指定函数的汇编源码 |
### 流程控制
<!--rehype:wrap-class=row-span-2-->
| 命令 | 说明 |
|:--------------------|:-----------|
| `(gdb) step[s]` | 执行源码级别的单步进入操作 |
| `(gdb) stepi[si]` | 执行指令级别的单步进入操作 |
| `(gdb) next[n]` | 执行源码级别的单步跳过操作 |
| `(gdb) nexti[ni]` | 执行指令级别的单步跳过操作 |
| `(gdb) continue[c]` | 继续执行,到下一个断点或程序结束 |
| `(gdb) finish` | 运行完当前函数,并返回到函数调用点 |
| `(gdb) return` | 直接退出当前函数,不执行剩下代码块 |
| `(gdb) return expression` | 可以指定返回值的内容 |
| `(gdb) until` | 结束当前循环 |
### 断点命令
<!--rehype:wrap-class=row-span-2-->
| 命令 | 说明 |
|:--------------------|:-----------|
| `(gdb) break main` | 在所有名为 `main` 的函数处设置一个断点 |
| `(gdb) break test.c:12` | 在文件 `test.c` 的第 `12` 行设置断点 |
| `(gdb) break test.c:func` | 在文件 `test.c``func` 函数处设置断点 |
| `(gdb) rbreak regular-expression` | 在正则表达式匹配的函数名上设置断点 |
| `(gdb) break foo if a < 100` | 设置**条件断点**,条件满足才停止 |
| `(gdb) info break` | 列出所有断点位置、编号 |
| `(gdb) delete 2` | 删除指定编号的断点 |
| `(gdb) clear` | 删除刚才停止处的断点 |
| `(gdb) disable 1` | `disable` 指定编号的断点 |
| `(gdb) enable 1` | `enable` 指定编号的断点 |
### watch 命令
| 命令 | 说明 |
|:--------------------|:-----------|
| `(gdb) watch var` | 监视变量,当值变化时会输出新、旧值 |
| `(gdb) info break` | 列出断点,也包括 `watchpoint` |
| `(gdb) i watch` | 只列出 `watchpoint` |
| `(gdb) delete 1` | 删除指定的 `watchpoint` |
### 查看变量
<!--rehype:wrap-class=row-span-2-->
| 命令 | 说明 |
|:--------------------|:-----------|
| `(gdb) info args` | 查看传入参数信息 |
| `(gdb) info local` | 查看当前栈帧(函数)的本地变量 |
| `(gdb) print var` | 查看指定变量的值 |
| `(gdb) print/x var` | 以十六进制输出变量的值 |
| `(gdb) print ptr` | 假设 `int *ptr=&a`,输出变量 `a` 的地址 |
| `(gdb) print *ptr` | 假设 `int *ptr=&a`,输出变量 `a` 的值 |
| `(gdb) print *ptr@5` | 假设 `int ptr[5]`,输出数组的值 |
| `(gdb) display var` | 与 `print` 作用相同,但每次停下来都自动输出变量的值 |
| `(gdb) info display` | 列出所有设置了 `display` 的变量 |
| `(gdb) undisplay 1` | 与 `display` 相反,不能指定变量名,只能是编号 |
| `(gdb) delete display 1` | 与 `undisplay` 类似,通过编号取消显示 |
| `(gdb) whatis var` | 查看变量类型 |
| `(gdb) ptype var` | 比 `type` 更详细,会给出结构体的定义 |
### frame 栈帧
每当一个函数被调用时,一个新的栈帧 `frame` 就会被压入栈中,栈帧包含了该函数的局部变量、参数、返回地址和其他信息,当函数执行完毕后,这个栈帧会被弹出栈并销毁。
| 命令 | 说明 |
|:--------------------|:-----------|
| `(gdb) frame` | 显示当前栈帧和源代码行 |
| `(gdb) backtrace` | 打印出当前正在执行的所有栈帧 |
| `(gdb) backtrace 5` | 只显示最近调用的 `5` 个栈帧 |
| `(gdb) frame 2` | 切换到第 `2` 个栈帧,以查看信息 |
| `(gdb) up` | 切换到上一级调用栈帧 |
| `(gdb) down` | 切换到下一级调用栈帧 |
### 函数调用
`call``print` 调用的函数如果存在全局变量、静态变量的修改,在函数返回后会恢复到调用之前的值,这两个调用不会影响程序的状态
| 命令 | 说明 |
|:--------------------|:-----------|
| `(gdb) call func(a, b)` | 调用指定的函数,不影响主线程变量 |
| `(gdb) print func(a, b)` | 与 `call` 类似 |
| `(gdb) finish` | 结束当前运行的函数 |
### 信号
<!--rehype:wrap-class=row-span-2-->
`linux` 下使用 `kill -l` 查看信号编号与信号名,使用 `info signal` 查看信号的处理方式、描述等:
```bash
(gdb) info signal
Signal Stop Print Pass to program Description
SIGHUP Yes Yes Yes Hangup
SIGINT Yes Yes No Interrupt
SIGQUIT Yes Yes Yes Quit
SIGILL Yes Yes Yes Illegal instruction
```
| 命令 | 说明 |
|:--------------------|:-----------|
| `(gdb) signal SIGKILL` | 向进程发送信号,用信号名或编号表示 |
| `(gdb) signal 9` | 向进程发送信号,用信号名或编号表示 |
| `(gdb) handle <signal> actions` | 指定信号的处理方式,选择如下,可以组合 |
| `stop/nostop` | 收到信号是否停止进程,类似断点 |
| `print/noprint` | 收到信号是否输出消息 |
| `pass/nopass` | 是否将信号传递给程序 |
### 线程
| 命令 | 说明 |
|:--------------------|:-----------|
| `(gdb) info threads` | 列出所有线程,标识当前所在线程 |
| `(gdb) thread 2` | 切换到编号为 `2` 的线程 |
| `(gdb) break file.c:23 thread all` | 在所有线程中相应的行上设置断点 |
| `(gdb) thread apply all command` | 让所有线程执行 `gdb` 命令 |
| `(gdb) thread apply ID1 ID2 command` | 让指定线程执行 `gdb` 命令 |
| `(gdb) set scheduler-locking off` | 所有线程都执行,这是默认值 |
| `(gdb) set scheduler-locking on` | 只让当前线程执行 |
另见
---
- [应用崩溃调试分析](https://carlyleliu.github.io/2022/%E5%BA%94%E7%94%A8%E5%B4%A9%E6%BA%83%E8%B0%83%E8%AF%95%E5%88%86%E6%9E%90)

View File

@ -33,6 +33,8 @@ s1 = "Learn Go!"
// 一次声明多个变量
var b, c int = 1, 2
var d = true
// 匿名赋值
_ , e = 10, 20
```
简短声明
@ -70,7 +72,7 @@ func say(message string) {
多行注释 */
```
### 如果语句
### if 语句
```go
if true {
@ -139,7 +141,6 @@ fmt.Println(!true) // false
参见:[更多操作符](#运算符和标点符号)
### 数组 Arrays
<!--rehype:wrap-class=row-span-2-->
```go
┌────┬────┬────┬────┬─────┬─────┐
@ -183,6 +184,7 @@ fmt.Println("2d: ", twoDimension)
```
### 指针(Pointers)
<!--rehype:wrap-class=col-span-2-->
```go
func main () {
@ -194,9 +196,30 @@ func getPointer () (myPointer *int) {
a := 234
return &a
}
//申明指针的时候如果没有指向某个变量默认值为nil
//不能直接进行操作,包括读写
var p *int
*p = 123 // panic nil pointer
```
a := new(int)
*a = 234
---
```go
//而用new返回的是有默认值的指针, 为数据类型的默认值
func main(){
//有一块内存存放了10它的地址由系统自动分配别名是a
a := 10
//内存存放的10变成了20
a = 20
var p *int
p = &a //或者直接写 p := &a
//上面的p是一个指针通过 *p 的方式同样可以访问 变量a指向 的内存
/*当你动态申请内存的时候,指针的存在意义之一就被体现出来了*/
ptr := new(int)
//申请了一块内存空间没有办法指定别名new()返回内存地址,用指针接收
//此时并没有变量能直接指向这块内存,所以只能通过内存地址来访问
}
```
参见:[指针(Pointers)](https://tour.golang.org/moretypes/1)
@ -225,11 +248,29 @@ const s string = "constant"
const Phi = 1.618
const n = 500000000
const d = 3e20 / n
fmt.Println(d)
```
常量声明可以使用 iota常量生成器 初始化,它用于
生成一组以相似规则初始化的常量,但是不用每行都
写一遍初始化表达式。
注意:
1. 在一个const声明语句中在第一个声明的常量所在的行iota被置为0然后在每一个有常量声明的行加一。
2. 写在同一行的值是相同的
```go
const (
a = iota
b
c
)
// a = 0, b = 1, c = 2
```
### 类型转换
Go语言中不允许隐式转换所有类型转换必须显式声明强制转换而且转换只能发生在两种相互兼容的类型之间。
```go
i := 90
f := float64(i)
@ -431,7 +472,7 @@ for {
}
```
Golang 结构和映射
Golang 结构和Maps
--------
### 定义
@ -467,7 +508,7 @@ v := Vertex{X: 1}
您还可以输入字段名
### 映射
### Maps
<!--rehype:wrap-class=row-span-2-->
```go
@ -511,7 +552,7 @@ fmt.Println(plus(1, 2))
fmt.Println(plusPlus(1, 2, 3))
```
### 多返回
### 多返回
```go
func vals() (int, int) {
@ -533,7 +574,7 @@ r1, r2 := func() (string, string) {
fmt.Println(r1, r2)
```
### 命名返回
### 命名返回
```go
func split(sum int) (x, y int) {
@ -546,7 +587,7 @@ fmt.Println(x) // => 7
fmt.Println(y) // => 10
```
### 变量函数
### 可变参数函数
```go
func sum(nums ...int) {
@ -557,10 +598,12 @@ func sum(nums ...int) {
}
fmt.Println(total)
}
sum(1, 2) //=> [1 2] 3
sum(1, 2) // => [1 2] 3
sum(1, 2, 3) // => [1 2 3] 6
nums := []int{1, 2, 3, 4}
sum(nums...) // => [1 2 3 4] 10
// 不定参在内存中是连续存储的
// 不定参内部再传递的时候,参数也要是不定的
```
### 初始化函数
@ -597,20 +640,8 @@ func main() {
}
```
### 关闭 1
```go
func scope() func() int{
outer_var := 2
foo := func() int {return outer_var}
return foo
}
// Outpus: 2
fmt.Println(scope()())
```
### 关闭 2
### 闭包
<!--rehype:wrap-class=col-span-2 row-span-2-->
```go
func outer() (func() int, int) {
outer_var := 2
@ -622,8 +653,25 @@ func outer() (func() int, int) {
return inner, outer_var
}
inner, val := outer()
fmt.Println(inner()) // => 200
fmt.Println(val) // => 101
fmt.Println(val)
// => 101
fmt.Println(inner())
// => 200这里涉及到golang中闭包和内存逃逸的概念inner()实际上执行了两次outer()中一次fmt又一次
//但为什么是200呢编译器不能确定outer_var在后续会不会使用
//所以outer_var不会随着outer()结束而释放它的栈Stack空间
//而会逃逸到Heap那么第二次的inner()中outer_var就会是101。
```
### 关闭 1
```go
func scope() func() int{
outer_var := 2
foo := func() int {return outer_var}
return foo
}
// Outpus: 2
fmt.Println(scope()())
```
Golang 包(Packages)
@ -835,8 +883,21 @@ Golang 方法(Methods)
<!--rehype:body-class=cols-2-->
### 接收器
<!--rehype:wrap-class=row-span-2-->
```go
//Go语言中的方法Method是一种作用于特定类型变量的函数。
//这种特定类型变量叫做接收者Receiver
//接收者的概念就类似于其他语言中的 this 或者 self。
//方法的定义格式如下:
func (接收者变量 接收者类型) 方法名(参数列表) (返回参数) {
函数体
}
// 其中,
// 1.接收者变量:接收者中的参数变量名在命名时,官方建议使用接收者类型名
//的第一个小写字母而不是self、this之类的命名。例如Person类型的接收者变量
// 应该命名为 pConnector类型的接收者变量应该命名为c等。
// 2.接收者类型:接收者类型和参数类似,可以是指针类型和非指针类型。
// 3.方法名、参数列表、返回参数:具体格式与函数定义相同。
type Vertex struct {
X, Y float64
}
@ -844,27 +905,82 @@ type Vertex struct {
func (v Vertex) Abs() float64 {
return math.Sqrt(v.X * v.X + v.Y * v.Y)
}
func (v Vertex) valuechange() float64 {
v.X += 1
return v.X
}
func (v *Vertex) pointerchange() float64 {
v.X += 1
return v.X
}
func main() {
v := Vertex{1, 2}
v.Abs()
v = Vertex{1, 2}
fmt.Println(v.valuechange()) // 2
fmt.Println(v) // {1 2}
v = Vertex{1, 2}
fmt.Println(v.pointerchange())// 2
fmt.Println(v) // {2 2}
}
//如果在方法里修改receiver的值要对caller生效使用 pointer receiver。
v := Vertex{1, 2}
v.Abs()
```
参见:[Methods](https://tour.golang.org/methods/1)
参见:[Methods](https://tour.golang.org/methods/1)[指针接收器](https://tour.golang.org/methods/4)
### Mutation
### 方法表达式
方法表达式相当于提供一种语法将类型方法调用显式地转换为函数调用,接收者(receiver)必须显式地传递进去。
```go
func (v *Vertex) Scale(f float64) {
v.X = v.X * f
v.Y = v.Y * f
func (t T) Get(){
return t.a
}
v := Vertex{6, 12}
v.Scale(0.5)
// `v` 已更新
func (t *T) Set(i int){
t.a = i
}
//表达式`T.Get`和`(*T).Set`被称为方法表达式,
//需要注意的是在方法表达式中编译器不会做自动转换。
//值调用会自动转换,表达式调用则不会,例如:
type Data struct{}
func (Data) TestValue () {}
func (*Data) TestPointer () {}
//声明一个类型变量a
var a Data= struct{}{}
//表达式调用编译器不会进行自动转换
Data.TestValue(a)
//Data.TestValue(&a)
(*Data).TestPointer (&a)
//Data.TestPointer(&a) //type Data has no method TestPointer
//值调用编译器会进行自动转换
y : = (&a).TestValue //编译器帮助转换a.TestValue
g : = a.TestPointer //会转换为(&a).TestPointer
```
参见:[指针接收器](https://tour.golang.org/methods/4)
#### 组合结构的方法集
内嵌字段的访问不需要使用全路径,只要保证命名是唯一的就可以,尽量避免同名。如果外层字段和内层字段有相同的方法,则使用简化模式访问外层方法会覆盖内层的方法。
```go
x : = X{a: 1}
y : = Y{
X : x ,
b : 2 ,
}
z : = z {
Y : y ,
c : 3 ,
}//组合结构,内嵌字段
```
组合结构的方法集有如下规则:
- 若类型 T 包含匿名字段 S ,则 T 的方法集包含S的方法集
- 若类型 T 包含匿名字段 *S ,则 T 的方法集包含 S 和*S方法集
- 不管类型 T 中嵌入的匿名字段是 S 还是 *S *T 方法集总是包含 S 和 *S 方法集
Golang 接口(Interfaces)
--------
@ -912,6 +1028,279 @@ func main() {
```
<!--rehype:className=wrap-text -->
Golang Embed (Go version >= 1.16)
---
### 嵌入为string
``` go
package main
import (
_ "embed"
"fmt"
)
//go:embed version.txt
var version string
func main() {
fmt.Printf("version %q\n", version)
}
```
### 嵌入为[]byte
``` go
package main
import (
_ "embed"
"fmt"
)
//go:embed version.txt
var versionByte []byte
func main() {
fmt.Printf("version %q\n", string(versionByte))
}
```
### 嵌入为embed.FS
``` go
//go:embed hello.txt
var f embed.FS
func main() {
data, _ := f.ReadFile("hello.txt")
fmt.Println(string(data))
}
```
### 嵌入多个文件
``` go
//go:embed hello.txt
//go:embed hello2.txt
var f embed.FS
func main() {
data, _ := f.ReadFile("hello.txt")
fmt.Println(string(data))
data, _ = f.ReadFile("hello2.txt")
fmt.Println(string(data))
}
```
### 嵌入子文件夹下的文件
``` go
//go:embed p/hello.txt p/hello2.txt
var f embed.FS
func main() {
data, _ := f.ReadFile("p/hello.txt")
fmt.Println(string(data))
data, _ = f.ReadFile("p/hello2.txt")
fmt.Println(string(data))
}
```
### 同一个文件嵌入为多个变量
``` go
//go:embed hello.txt
var s string
//go:embed hello.txt
var s2 string
func main() {
fmt.Println(s)
fmt.Println(s2)
}
```
### 匹配模式
``` go
//go:embed p/*
var f embed.FS
func main() {
data, _ := f.ReadFile("p/.hello.txt")
fmt.Println(string(data))
data, _ = f.ReadFile("p/q/.hi.txt") // 没有嵌入 p/q/.hi.txt
fmt.Println(string(data))
}
```
Golang 泛型 (Go version >= 1.18)
-------------
### 泛型类型
<!--rehype:wrap-class=row-span-1-->
```text
type S[T int|float32|float64 ] []T
┬ ────────┬────────
┆ ╰─── 2. 类型约束
╰────────────── 1. 类型形参
```
<!--rehype:className=wrap-text -->
可以使用类型实参 int 或 string 实例化
``` go
type MyMap[K int|string, V float32 | float64] map[K]V
var a MyMap[string, float64] = map[string]float64{
"jack_score": 9.6,
"bob_score": 8.4,
}
```
<!--rehype:className=wrap-text -->
- **匿名结构体不支持泛型**<!--rehype:style=color: #b43c29;-->
- **匿名函数不支持泛型**<!--rehype:style=color: #b43c29;-->
### 泛型函数
<!--rehype:wrap-class=row-span-1-->
任意类型
``` go
func Add[T any](a,b T) T {
return a+b
}
```
对类型进行约束
``` go
func Add[T string | int | int8](a,b T) T {
return a+b
}
```
类型嵌套
``` go
type WowStruct[T int | float32, S []T] struct {
Data S
MaxValue T
MinValue T
}
var ws WowStruct[int, []int]
```
<!--rehype:className=wrap-text -->
泛型函数中进行类型声明 (go version >= 1.20)
``` go
func F[T1 any]() {
type x struct{}
type y = x
}
```
### 泛型约束
<!--rehype:wrap-class=row-span-2-->
通过接口实现
``` go
type Addable interface{
type int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, uintptr, float32, float64, complex64, complex128, string
}
func Add[T Addable](a,b T) T {
return a+b
}
```
<!--rehype:className=wrap-text -->
使用 ~ 符号
``` go
type Int interface {
~int | ~int8 | ~int16 | ~int32 | ~int64
}
type Uint interface {
~uint | ~uint8 | ~uint16 | ~uint32
}
type Float interface {
~float32 | ~float64
}
type Slice[T Int | Uint | Float] []T
var s Slice[int] // 正确
type MyInt int
var s2 Slice[MyInt] // MyInt底层类型是int所以可以用于实例化
type MyMyInt MyInt
var s3 Slice[MyMyInt] // 正确。MyMyInt 虽然基于 MyInt 但底层类型也是int所以也能用于实例化
type MyFloat32 float32 // 正确
var s4 Slice[MyFloat32]
```
<!--rehype:className=wrap-text -->
使用 ~ 时的限制:
<!--rehype:style=color: #b43c29;-->
1. ~后面的类型不能为接口
2. ~后面的类型必须为基本类型
<!--rehype:style=color: #b43c29;-->
### 泛型 Receiver
<!--rehype:wrap-class=row-span-1-->
定义普通类型支持泛型
``` go
type MySlice[T int | float32] []T
func (s MySlice[T]) Sum() T {
var sum T
for _, value := range s {
sum += value
}
return sum
}
```
<!--rehype:className=wrap-text -->
结构体支持泛型
``` go
type A[T int | float32 | float64] struct {
}
func (receiver A[T]) Add(a T, b T) T {
return a + b
}
```
<!--rehype:className=wrap-text -->
### 泛型接口
<!--rehype:wrap-class=row-span-1-->
``` go
type Uint interface { // 接口 Uint 中有类型,所以是一般接口
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
}
type ReadWriter interface { // ReadWriter 接口既有方法也有类型,所以是一般接口
~string | ~[]rune
Read(p []byte) (n int, err error)
Write(p []byte) (n int, err error)
}
```
<!--rehype:className=wrap-text -->
一般接口类型不能用来定义变量,只能用于泛型的类型约束中
<!--rehype:style=color: #b43c29;-->
杂项
-------------
@ -987,7 +1376,7 @@ Go 命令
`GOOS` | 编译系统
`GOARCH` | 编译arch
`GO111MODULE` | gomod开关
`GOPROXY` | go代理 <https://goproxy.io> <https://goproxy.cn>
`GOPROXY` | go代理 <https://goproxy.io> <https://goproxy.cn> <https://mirrors.aliyun.com/goproxy/>
`GOSSAFUNC` | 生成 `SSA.html` 文件,展示代码优化的每一步 `GOSSAFUNC=func_name go build`
<!--rehype:className=style-list-arrow-->
@ -1006,11 +1395,11 @@ Go 命令
另见
--------
- [Devhints](https://devhints.io/go) _(devhints.io)_
- [A tour of Go](https://tour.golang.org/welcome/1) _(tour.golang.org)_
- [Golang wiki](https://github.com/golang/go/wiki/) _(github.com)_
- [Effective Go](https://golang.org/doc/effective_go.html) _(golang.org)_
- [Go by Example](https://gobyexample.com/) _(gobyexample.com)_
- [Awesome Go](https://awesome-go.com/) _(awesome-go.com)_
- [JustForFunc Youtube](https://www.youtube.com/channel/UC_BzFbxG2za3bp5NRRRXJSw) _(youtube.com)_
- [Style Guide](https://github.com/golang/go/wiki/CodeReviewComments) _(github.com)_
- [Devhints](https://devhints.io/go) *(devhints.io)*
- [A tour of Go](https://tour.golang.org/welcome/1) *(tour.golang.org)*
- [Golang wiki](https://github.com/golang/go/wiki/) *(github.com)*
- [Effective Go](https://golang.org/doc/effective_go.html) *(golang.org)*
- [Go by Example](https://gobyexample.com/) *(gobyexample.com)*
- [Awesome Go](https://awesome-go.com/) *(awesome-go.com)*
- [JustForFunc Youtube](https://www.youtube.com/channel/UC_BzFbxG2za3bp5NRRRXJSw) *(youtube.com)*
- [Style Guide](https://github.com/golang/go/wiki/CodeReviewComments) *(github.com)*

View File

@ -206,7 +206,41 @@ Chrome 开发者工具键盘快捷键
`Enter` | 执行
<!--rehype:className=shortcuts-->
Chrome 搜索引擎查询语法
---
### 语法
语法 | 阐述
:- | -
`site:` | 指定网站
`inurl:` | URL 中存在的关键字页面
`intext:` | 网页内容里的关键字
`Filetype:` | 指定文件的类型
`intitle:` | 网页辩题中的关键字
`link:` | 返回所有你指定的域名链接
`info:` | 查找指定站点信息
`cache:` | 搜索 Google 中的内容缓存
`related:` | 搜索相关的网站
<span style="color:red">注意:</span>搜索语法的 `:` 后不应该存在空格,像这样 `site:google.com`,而不是这样 `site: google.com`
### 指令
指令 | 阐述
:- | -
`@` | 用于搜索社交媒体,如:`@twitter`
`*` | 通配符省略,如:`wlop *`
`$` | 用于搜索指定的价格,如:`phone $400`
`#` | 搜索 `#` 标签,如:`#疯狂星期四`
`-` | 排除特定关键字,如:`中国美食 -麻辣`
`""` | 完全匹配的结果,如:`"最高的建筑"`
`..` | 某个数字范围之内的,如:`phone $50..$100`
`OR` | 组合搜索,如:`疯狂星期四 OR 肯德基`
`AND` | 空格默认是 AND 指令
另见
----
- [Keyboard shortcuts for Google Chrome](https://support.google.com/chrome/answer/157179?hl=en) _(support.google.com)_
- [Search Help for Google Chrome](https://support.google.com/websearch/answer/2466433?hl=en)

View File

@ -37,27 +37,28 @@ export HOMEBREW_INSTALL_FROM_API=1
命令 | 说明
:--- :---
`brew install git` | `安装`一个包
`brew reinstall git` | 重新`安装`一个包
`brew install git` | `安装`一个软件
`brew reinstall git` | 重新`安装`一个软件
`brew uninstall git` | `删除`/`卸载`软件包
`brew upgrade git` | 升级包
`brew upgrade git` | 升级一个软件
`brew upgrade` | 升级所有可升级的包
:--- :---
`brew unlink git` | `取消`链接
`brew link git` | 关联
`brew switch git 2.5.0` | 更改版本
`brew unlink git` | 取消软件包的链接
`brew link git` | 链接已有的软件包
`brew switch git 2.5.0` | 切换软件包的版本
:--- :---
`brew list --versions git` | 看看你有什么版本
`brew list --versions git` | 查看安装的软件包及其版本信息
### 更多包命令
命令 | 说明
:--- :---
`brew info git` | 列出版本、注意事项等
`brew cleanup git` | 删除旧版本
`brew edit git` | 编辑此软件包
`brew cat git` | 打印这个软件包
`brew home git` | 打开主页
`brew search git` | 搜索公式
`brew info git` | 显示软件包的版本、依赖、注意事项等信息
`brew cleanup git` | 删除旧版本的软件包及其依赖
`brew edit git` | 编辑此软件包的安装脚本
`brew cat git` | 打印软件包的安装脚本
`brew home git` | 打开此软件包的主页
`brew search git` | 搜索软件包公式并显示相关信息
### Brew Cask 命令
@ -66,20 +67,20 @@ export HOMEBREW_INSTALL_FROM_API=1
`brew install --cask firefox` | 安装火狐浏览器
`brew list --cask` | 列出已安装应用
Cask 命令用于与图形应用程序交互
Cask 命令用于与图形界面应用程序交互,可以安装和管理 macOS 上的图形界面应用程序
### 全局命令
<!--rehype:wrap-class=row-span-2-->
命令 | 说明
:--- :---
`brew update` | 更新 `brew``cask`
`brew upgrade` | 升级所有软件包
`brew list` | 已安装列表
`brew outdated` | 升级需要什么?
`brew doctor` | 诊断 brew 问题
`brew pin <formula>` | 防止指定软件包升级
`brew unpin <formula>` | 允许升级指定软件包
`brew update` | 更新 `Homebrew``Cask`
`brew upgrade` | 升级所有可升级的软件包
`brew list` | 列出已安装的软件包
`brew outdated` | 列出需要升级的软件包
`brew doctor` | 诊断 Homebrew 是否存在问题
`brew pin <formula>` | 防止指定软件包升级
`brew unpin <formula>` | 允许指定软件包被升级
### Brew 清理
@ -127,6 +128,27 @@ $ brew info <formula>
`brew help` | 打印帮助信息
`brew help <sub-command>` | 打印子命令的帮助信息
### 依赖
显示`包`的依赖关系。 特定于`包`的其他选项可能是附加到命令
```bash
# 您还可以看到包和依赖关系图
$ brew deps --tree --installed
$ brew deps git # 显示 git 依赖
```
### 卸载 Homebrew
- 使用官方卸载脚本卸载 Homebrew
- 验证文件是否已删除
```bash
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
$ sudo rm -rf /opt/homebrew
```
<!--rehype:className=wrap-text -->
另见
---

View File

@ -793,7 +793,7 @@ HTML meta 标签
<!--rehype:body-class=cols-2-->
### Meta 标签
<!--rehype:wrap-class=row-span-3-->
<!--rehype:wrap-class=row-span-5-->
meta 标记描述 HTML 文档中的元数据。它解释了关于 HTML 的其他材料。
@ -821,7 +821,7 @@ meta 标记描述 HTML 文档中的元数据。它解释了关于 HTML 的其他
```html
<!-- 描述 -->
<meta name="description" content="···">
<meta name="description" content="网页描述···">
<meta property="og:description" content="···">
<meta name="twitter:description" content="···">
```
@ -849,6 +849,32 @@ meta 标记描述 HTML 文档中的元数据。它解释了关于 HTML 的其他
<meta name="viewport" content="width=1024">
```
---
```html
<!-- 重定向 -->
<meta http-equiv="refresh" content="5;url=http://example.com/">
<meta name="robots" content="index,follow">
<meta name="generator" content="网站生成工具">
<meta name="csrf-token" content="token值">
```
### 常用 Meta
```html
<meta name="description" content="网页描述···">
<meta name="keywords" content="关键词1,关键词2,关键词3">
<meta name="author" content="作者名">
```
### 常用 Meta
```html
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.png" type="image/png">
<link rel="icon" href="favicon.jpg" type="image/jpeg">
```
### Open Graph
```html
@ -887,6 +913,106 @@ Facebook、Instagram、Pinterest、LinkedIn 等使用。
请参阅:[Geotagging](https://en.wikipedia.org/wiki/Geotagging#HTML_pages)
标签语义化
------
### 复杂布局
<!--rehype:wrap-class=row-span-2-->
```
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
┆ <header> ┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
┆ <nav> ┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
┆ <section> ┆
┆╭┈┈┈┈┈┈┈┈╮╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮┆
┆┆<aside> ┆┆ <main> ┆┆
┆┆ ┆┆╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮┆┆
┆┆ ┆┆┆ <article> ┆ ┆ <aside> ┆┆┆
┆┆ ┆┆┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆┆┆
┆┆ ┆┆┆ ┆ <header> ┆ ┆ ┆ ┆┆┆
┆┆ ┆┆┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆┆┆
┆┆ ┆┆┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆┆┆
┆┆ ┆┆┆ ┆ <article> ┆ ┆ ┆ ┆┆┆
┆┆ ┆┆┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆┆┆
┆┆ ┆┆┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆┆┆
┆┆ ┆┆┆ ┆ <footer> ┆ ┆ ┆ ┆┆┆
┆┆ ┆┆┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆┆┆
┆┆ ┆┆╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯┆┆
┆╰┈┈┈┈┈┈┈┈╯╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
┆ <footer> ┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
```
### 复杂布局
<!--rehype:wrap-class=row-span-2-->
```
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
┆ <header> ┆
┆ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ┆
┆ ┆ <nav> ┆ ┆
┆ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
┆ <main> ┆
┆ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆
┆ ┆ <article> ┆ ┆ <aside> ┆ ┆
┆ ┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆ ┆
┆ ┆ ┆ <header> ┆ ┆ ┆ ┆ ┆
┆ ┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆ ┆
┆ ┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆ ┆
┆ ┆ ┆ <section> ┆ ┆ ┆ ┆ ┆
┆ ┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆ ┆
┆ ┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆ ┆
┆ ┆ ┆ <footer> ┆ ┆ ┆ ┆ ┆
┆ ┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆ ┆
┆ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
┆ <footer> ┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
```
### 区域语义化
```
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈┈┈╮
┆ <main> ┆ ┆ <aside> ┆
┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆
┆ ┆ <header> ┆ ┆ ┆ ┆
┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆
┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆
┆ ┆ <section> ┆ ┆ ┆ ┆
┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆
┆ ╭┈┈┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ┆
┆ ┆ <footer> ┆ ┆ ┆ ┆
┆ ╰┈┈┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈┈┈╯
```
### 页面头语义化
```
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮
┆ <header> ┆
┆ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ┆
┆ ┆ <section> ┆ ┆
┆ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ┆
┆ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ┆
┆ ┆ <nav> ┆ ┆ <aside> ┆ ┆
┆ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ┆
┆ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ┆
┆ ┆ <footer> ┆ ┆
┆ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ┆
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
```
另见
--------

View File

@ -74,7 +74,7 @@ IDEA Windows 和 Linux 键盘映射
`Esc`| 转到编辑器
`Shift` `Esc`| 隐藏活动或最后一个活动窗口
`Ctrl` `Shift` `F4`| 关闭活动运行,消息...
`Ctrl` `G`| 去线
`Ctrl` `G`| 导航到行:列
`Ctrl` `E`| 最近的文件弹出窗口
`Ctrl` `Alt` `Left` _/_ `Right`| 向后/向前导航
`Ctrl` `Shift` `Backspace`| 导航到上次编辑位置
@ -192,4 +192,4 @@ IDEA Windows 和 Linux 键盘映射
`Ctrl` `Alt` `Shift` `S` | 打开项目结构对话框
`Ctrl` `Shift` `A` | 寻找行动
`Ctrl` `Tab` | 在工具和选项卡之间切换
<!--rehype:className=shortcuts-->
<!--rehype:className=shortcuts-->

View File

@ -1,7 +1,7 @@
iptables 备忘清单
====
iptables 是一个配置 Linux 内核 防火墙(opens new window)的命令行工具,是 [netfilter](https://en.wikipedia.org/wiki/Netfilter)(opens new window)项目的一部分。这个快速参考备忘单显示了它的常用命令使用清单
iptables 是一个配置 Linux 内核防火墙的命令行工具,是 [netfilter](https://en.wikipedia.org/wiki/Netfilter) 项目的一部分。这个快速参考备忘单显示了它的常用命令使用清单
入门
---

View File

@ -89,7 +89,7 @@ boolean[] answers = {true, false};
查看: [Arrays](#java-数组)
### Swap
### 交换变量 Swap
```java
int a = 1;
@ -101,7 +101,7 @@ b = temp;
System.out.println(a + " " + b); // 2 1
```
### Type Casting
### 类型转换 Type Casting
```java
// Widening
@ -344,7 +344,7 @@ for (int a: arr) {
// 输出: a b c
```
### Multidimensional Arrays
### 二维数组 Multidimensional Arrays
```java
int[][] matrix = { {1, 2, 3}, {4, 5} };
@ -359,7 +359,7 @@ for (int i = 0; i < a.length; ++i) {
// 输出: 1 2 3 4 5 6 7
```
### Sort
### 排序 Sort
```java
char[] chars = {'b', 'a', 'c'};
@ -544,13 +544,161 @@ for (int i = 0; i < 5; i++) {
// 输出: 0123
```
Java 多线程
--------------------
### 创建线程
```java
// 实现Runnable接口
public class RunnableThread implements Runnable {
@Override
public void run() {
// todo something
}
}
// 实现Callable接口,T 替换成实际类型
public class CallableTask implements Callable<T> {
@Override
public T call() throws Exception {
// todo something
return null;
}
}
// 继承Thrad类
public class ExtendsThread extends Thread {
@Override
public void run() {
// todo something
}
}
// 运行线程
public static void main(String[] args) throws ExecutionException, InterruptedException {
new Thread(new RunnableThread()).start();
new ExtendsThread2().start();
FutureTask<Integer> integerFutureTask = new FutureTask<>(new CallableTask());
integerFutureTask.run();
}
```
### 线程池
```java
/**
* corePoolSize: 核心线程数
* maximumPoolSize: 最大线程数
* keepAliveTime: 线程空闲时间
* timeUni: 线程空闲时间单位
* workQueue: 线程等待队列
* threadFactory: 线程创建工厂
* handler: 拒绝策略
*/
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(
2, 5,
5, TimeUnit.SECONDS,
new ArrayBlockingQueue<>(10),
new DefaultThreadFactory("pollName"),
new ThreadPoolExecutor.CallerRunsPolicy());
// 内置的线程池, 不推荐生产使用
Executors.newCachedThreadPool();
Executors.newFixedThreadPool(10);
Executors.newScheduledThreadPool(10);
Executors.newSingleThreadExecutor();
```
### synchronized
<!--rehype:wrap-class=row-span-1-->
```java
// 代码块
synchronized(obj) {
...
}
// (静态)方法
public synchronized (static) void methodName() {
...
}
```
### ThreadLocal
```java
// 使用完之后一定要记得remove, 否则会内存泄露
ThreadLocal<Integer> threadLocal = new ThreadLocal<>();
threadLocal.set(1);
threadLocal.get();
threadLocal.remove();
```
### 线程等待与唤醒
```java
// 需要synchronized修饰的代码块才能使用
wait();
notify();
notifyAll();
// 使用lock的条件唤醒
ReentrantLock lock = new ReentrantLock();
Condition condition= lock.newCondition();
lock.lock();
try{
// 当前线程唤醒或等待
condition.await();
condition.signal();
condition.signalAll();
} finally {
lock.unlock
}
// LockSupport,可以先unpark,后续park不会阻塞线程
LockSupport.park(obj);
LockSupport.unpark(thread);
```
### 线程编排
```java
// CountDownLatch
CountDownLatch countDownLatch = new CountDownLatch(2);
new Thread(() -> {
try {
...
}finally {
countDownLatch.countDown();
}
}).start();
countDownLatch.await();
// CompletableFuture
CompletableFuture<Void> task1 = CompletableFuture.runAsync(() -> {});
CompletableFuture<Void> task2 = CompletableFuture.runAsync(() -> {});
CompletableFuture<Void> task3 = CompletableFuture.runAsync(() -> {});
CompletableFuture.allOf(task1, task2, task3).get();
// Semaphore
Semaphore semaphore = new Semaphore(5);
try {
semaphore.acquire();
} finally {
semaphore.release();
}
```
Java 框架搜集
--------------------
### Java
### Java 集
<!--rehype:wrap-class=col-span-2 row-span-2-->
集 | Interface | 有序 | 已排序 | 线程安全 | 复制 | Nullable
| Interface | 有序 | 已排序 | 线程安全 | 复制 | Nullable
:-|:-|:-|:-|:-|:-|:-
[ArrayList](https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html) | List | Y | _N_ | _N_ | Y | Y
[Vector](https://docs.oracle.com/javase/8/docs/api/java/util/Vector.html) | List | Y | _N_ | Y | Y | Y
@ -595,6 +743,8 @@ nums.remove(0); // 非常慢
for (Integer value : nums) {
System.out.println(value);
}
// lambda 打印元素
nums.forEach(e -> System.out.println(e.toString()));
```
### HashMap
@ -615,6 +765,25 @@ m.forEach((key, value) -> {
});
```
### ConcurrentHashMap
```java
ConcurrentHashMap<Integer, String> m
= new ConcurrentHashMap<>();
m.put(100, "Hello");
m.put(101, "Geeks");
m.put(102, "Geeks");
// 移除
m.remove(101, "Geeks");
// 如果不存在,就添加,存在就不变更
m.putIfAbsent(103, "Hello");
// 替换
m.replace(101, "Hello", "For");
System.out.println(m);
```
### HashSet
```java
@ -634,6 +803,7 @@ set.remove("cat");
for (String element : set) {
System.out.println(element);
}
set.forEach(e -> System.out.println(e.toString()));
```
### ArrayDeque
@ -771,7 +941,7 @@ text.split(Pattern.quote("|"));
`Math.toDegrees(rad)` | 以度为单位的角度弧度
`Math.toRadians(deg)` | 以弧度为单位的角度度
### Try/Catch/Finally
### 异常 Try/Catch/Finally
```java
try {
@ -816,8 +986,59 @@ method.invoke(classLoader, url);
- `SecureRandom` 实例用于生成安全的伪随机数流
- `UUID` 表示一个不可变的通用唯一标识符
- `Vector` 实现了一个可增长的对象数组
- `LocalDate` 表示没有时区的日期只包含年月日不可变并且线程安全的java8 及以上版本可用
- `LocalTime` 表示没有时区的时间只包含时分秒不可变并且线程安全的java8 及以上版本可用
- `LocalDateTime` 表示没有时区的日期时间同时包含年月日时分秒不可变并且线程安全的java8 及以上版本可用
### IO流
```java
// 输入流转输出流
byte[] inputContent = "test".getBytes();
try (InputStream inputStream = new ByteArrayInputStream(inputContent);
OutputStream outputStream = new ByteArrayOutputStream()) {
byte[] buffer = new byte[1024];
int len;
while ((len = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, len);
}
} catch (IOException e) {
throw new RuntimeException(e);
}
```
### Collections 工具类
```java
// 计算出现频率
List<Integer> list = new ArrayList<>();
list.add(1);
list.add(2);
list.add(2);
list.add(3);
list.add(3);
list.add(3);
int frequency = Collections.frequency(list, 2); // frequency = 2
```
### Stream 流
```java
// 统计词频
List<Integer> list = new ArrayList<>();
list.add(1);
list.add(1);
list.add(3);
list.add(2);
list.add(2);
list.add(2);
Map<Integer, Long> frequencyMap = list.stream().collect(Collectors.groupingBy(x -> x, Collectors.counting()));
// 1: 2
// 2: 3
// 3: 1
```
另见
---
- [Java 官网](https://www.java.com/zh-CN/) _(java.com)_
- [Java 官网](https://www.oracle.com/cn/java/) _(oracle.com/cn/java)_

View File

@ -88,7 +88,7 @@ console.log(single.length);
```javascript
5 + 5 = 10 // 加法 Addition
10 - 5 = 5 // 法 Subtraction
10 - 5 = 5 // 法 Subtraction
5 * 10 = 50 // 乘法 Multiplication
10 / 5 = 2 // 除法 Division
10 % 5 = 0 // 取模 Modulo
@ -469,6 +469,15 @@ function sum(num1, num2) {
sum(2, 4); // 6
```
### 立即执行函数
```javascript
//命名函数并立即执行一次
(function sum(num1, num2) {
return num1 + num2;
})(2,4)//6
```
### 函数表达式
```javascript
@ -1190,6 +1199,99 @@ console.log(myCat.name);
myCat.name = 'Yankee';
```
### Proxy
Proxy 对象用于创建一个对象的代理,从而实现基本操作的拦截和自定义(如属性查找、赋值、枚举、函数调用等)。
```javascript
// 用于拦截对象的读取属性操作。
const handler = {
get: function(obj, prop) {
return prop in obj ? obj[prop] : 37;
}
};
const p = new Proxy({}, handler);
p.a = 1;
p.b = undefined;
console.log(p.a, p.b); // 1, undefined
console.log('c' in p, p.c); // false, 37
```
#### 语法
```javascript
const p = new Proxy(target, handler)
```
- target 要使用 Proxy 包装的目标对象(可以是任何类型的对象,包括原生数组,函数,甚至另一个代理)。
- handler 一个通常以函数作为属性的对象,各属性中的函数分别定义了在执行各种操作时代理 p 的行为。
#### 方法
:- | :-
:- | :-
`Proxy.revocable()` | 创建一个可撤销的Proxy对象 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable)
#### handler 对象的方法
:- | :-
:- | :-
`handler.getPrototypeOf()` | Object.getPrototypeOf 方法的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/getPrototypeOf)
`handler.setPrototypeOf()` | Object.setPrototypeOf 方法的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/setPrototypeOf)
`handler.isExtensible()` | Object.isExtensible 方法的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/isExtensible)
`handler.preventExtensions()` | Object.preventExtensions 方法的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/preventExtensions)
`handler.getOwnPropertyDescriptor()` | Object.getOwnPropertyDescriptor 方法的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/getOwnPropertyDescriptor)
`handler.defineProperty()` | Object.defineProperty 方法的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/defineProperty)
`handler.has()` | in 操作符的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/has)
`handler.get()` | 属性读取操作的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/get)
`handler.set()` | 属性设置操作的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/set)
`handler.deleteProperty()` | delete 操作符的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/deleteProperty)
`handler.ownKeys()` | Object.getOwnPropertyNames 方法和 Object.getOwnPropertySymbols 方法的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/ownKeys)
`handler.apply()` | 函数调用操作的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/apply)
`handler.construct()` | new 操作符的捕捉器 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/construct)
<!--rehype:className=style-list-arrow-->
### Reflect
Reflect 是一个内置的对象,它提供拦截 JavaScript 操作的方法。这些方法与proxy handlers (en-US)的方法相同。Reflect不是一个函数对象因此它是不可构造的。
```javascript
// 检测一个对象是否存在特定属性
const duck = {
name: 'Maurice',
color: 'white',
greeting: function() {
console.log(`Quaaaack! My name is ${this.name}`);
}
}
Reflect.has(duck, 'color');
// true
Reflect.has(duck, 'haircut');
// false
```
#### 静态方法
:- | :-
:- | :-
`Reflect.apply(target, thisArgument, argumentsList)` | 对一个函数进行调用操作,同时可以传入一个数组作为调用参数。和 Function.prototype.apply() 功能类似 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/apply)
`Reflect.construct(target, argumentsList[, newTarget])` | 对构造函数进行 new 操作,相当于执行 new target(...args) [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/construct)
`Reflect.defineProperty(target, propertyKey, attributes)` | 和 Object.defineProperty() 类似。如果设置成功就会返回 true [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/defineProperty)
`Reflect.deleteProperty(target, propertyKey)` | 作为函数的delete操作符相当于执行 delete target[name] [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/deleteProperty)
`Reflect.get(target, propertyKey[, receiver])` | 获取对象身上某个属性的值,类似于 target[name] [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/get)
`Reflect.getOwnPropertyDescriptor(target, propertyKey)` | 类似于 Object.getOwnPropertyDescriptor()。如果对象中存在该属性,则返回对应的属性描述符,否则返回 undefined [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/getOwnPropertyDescriptor)
`Reflect.getPrototypeOf(target)` | 类似于 Object.getPrototypeOf() [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/getPrototypeOf)
`Reflect.has(target, propertyKey)` | 判断一个对象是否存在某个属性,和 in 运算符 的功能完全相同 [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/has)
`Reflect.isExtensible(target)` | 类似于 Object.isExtensible() [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible)
`Reflect.ownKeys(target)` | 返回一个包含所有自身属性(不包含继承属性)的数组。(类似于 Object.keys(), 但不会受enumerable 影响) [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/ownKeys)
`Reflect.preventExtensions(target)` | 类似于 Object.preventExtensions()。返回一个Boolean [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions)
`Reflect.set(target, propertyKey, value[, receiver])` | 将值分配给属性的函数。返回一个Boolean如果更新成功则返回true [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/set)
`Reflect.setPrototypeOf(target, prototype)` | 设置对象原型的函数。返回一个 Boolean如果更新成功则返回 true [#](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/setPrototypeOf)
<!--rehype:className=style-list-arrow-->
JavaScript this 绑定
----

View File

@ -113,7 +113,7 @@ $("selector1, selector2 ...selectorn")
- [[name!="value"]](https://api.jquery.com/attribute-not-equal-selector/) _选择不具有指定属性或具有指定属性但不具有特定值的元素_<!--rehype:tooltips-->
- [[name^="value"]](https://api.jquery.com/attribute-starts-with-selector/) _选择具有指定属性且值恰好以给定字符串开头的元素_<!--rehype:tooltips-->
- [[name]](https://api.jquery.com/has-attribute-selector/) _选择具有指定属性和任意值的元素_<!--rehype:tooltips-->
- [[name="value"][name2="value2"]](https://api.jquery.com/multiple-attribute-selector/) _匹配匹配所有指定属性过滤器的元素_<!--rehype:tooltips-->
- [[name="value"]](https://api.jquery.com/multiple-attribute-selector/) _匹配匹配所有指定属性过滤器的元素_<!--rehype:tooltips-->
<!--rehype:className=cols-2 style-none-->
### 子过滤器

View File

@ -1,7 +1,7 @@
Julia 备忘清单
===
本备忘清单旨在快速理解 [Julia](https://mysql.com) 一份简单而粗略的语言概览,供您参考。
本备忘清单旨在快速理解 [Julia](https://julialang.org/) 一份简单而粗略的语言概览,供您参考。
入门
---
@ -678,4 +678,5 @@ names(ModuleName, all::Bool, imported::Bool)
另见
---
- [快速入门一份简单而粗略的语言概览](https://cheatsheet.juliadocs.org/zh-cn/)
- [Julia 官方网站](https://julialang.org/) _(julialang.org)_
- [快速入门一份简单而粗略的语言概览](https://cheatsheet.juliadocs.org/zh-cn/) _(juliadocs.org)_

283
docs/justfile.md Normal file
View File

@ -0,0 +1,283 @@
Justfile 备忘清单
===
[![Repo Dependents](https://badgen.net/github/dependents-repo/casey/just)](https://github.com/casey/just/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/casey/just)
[`just`](https://github.com/casey/just) 为您提供一种保存和运行项目特有命令的便捷方式
入门
----
### 简单的 justfile
```bash
#!/usr/bin/env just --justfile
# hello 是配方(recipe)的名字
hello:
echo "Hello World!"
```
### 带参数的配方
<!--rehype:wrap-class=row-span-2-->
```bash
filter PATTERN:
echo {{PATTERN}}
# 带有默认值的 param
email address='master@example.com':
echo {{address}}
# 带表达式的参数
test triple=(arch() + "-unknown-unknown"):
./test {{triple}}
# 变量参数:“+”接受一个或多个值
backup +FILES:
scp {{FILES}} me@example.com
# 带*的可变参数:零个或多个值
commit MESSAGE *FLAGS:
git commit {{FLAGS}} -m "{{MESSAGE}}"
```
### 变量和子变量
```bash
version := "0.2.7"
tardir := "awesomesauce-" + version
tarball := tardir + ".tar.gz"
test:
echo {{version}}
# 仅从命令行设置/覆盖变量
$ just --set version 1.1.0
```
### 默认配置
```bash
default: lint build test
# 显示帮助信息的默认配方
default:
@just --list
# 如果没有默认配方,则默认第一个配方
```
### 命令的环境变量
```bash
export RUST_BACKTRACE := "1"
test:
# 如果堆栈崩溃,将打印堆栈跟踪
cargo test
```
### backtick-从评估中捕获输出
<!--rehype:wrap-class=row-span-2-->
```bash
JAVA_HOME := `jbang jdk home 11`
# Backtick 代码块
stuff := \```
foo="hello"
echo $foo "world"
\```
done BRANCH=`git rev-parse --abbrev-ref HEAD`:
git checkout master
sloc:
@echo "`wc -l *.c` lines of code"
# Backtick 在任何地方工作:字符串/变量/参数
```
注意: 上面示例中 <code>\\`</code> 没有转义过来
### 别名
```bash
alias t := test
alias c := check
```
### 带有命令 env 变量配置
```bash
# recipe 参数作为$符号的Env变量
hello $name:
echo $name
```
### 设置
```bash
set shell := ["zsh", "-cu"]
set dotenv-load := true
serv:
echo "$DATABASE_ADDRESS from .env"
set positional-arguments := true
foo:
echo $0
echo $1
```
### 配置依赖性-之前、之后和周围
```bash
# 执行序列A-> B-> C-> D
b: a && c d
# 执行配方(recipe)“A”
b:
echo 'B start!'
just a
echo 'B end!'
# 通过表达式依赖参数
default: (build "main")
build target:
@echo 'Building {{target}}...'
```
### Just 函数
```shell
hello name:
echo {{os()}}
echo {{uppercase(name)}}
# 函数类别
* 系统信息
* 系统信息
* Justfile 和 Justfile目录
* 字符串操纵
* 路径操纵
# String contact: (key + ":" + value)
```
### 字符串-用双引号转义
```bash
tring-with-tab := "\t"
string-with-newline := "\n"
escapes := '\t\n\r\"\\'
# 该字符串将评估为`foo\nbar\n`
x := '''
foo
bar
'''
```
### 命令注释quiet(@)、suppre­ss(-)、invert(!)
```bash
hello:
@ echo "command will not be echoed"
- echo "ignore none-zero exit status and continue"
@hello2:
echo "command will not be echoed"
# 反转命令退出状态!- shell 功能
hello3:
# 如果命令成功退出状态为0请仅退出
! git branch | grep '* master'
```
### 条件表达式if、loop 和 while
<!--rehype:wrap-class=row-span-2-->
```shell
# 正则表达匹配
fo := if "hi" =~ 'h.+' { "match" } else { "mismatch" }
test:
if true; then echo 'True!'; fi
for file in `ls .`; do echo $file; done
while `server-is-dead`; do ping -c 1 server; done
foo bar:
echo {{ if bar == "bar" { "hello" } else { "bye" } }}
```
### Just 命令行
<!--rehype:wrap-class=row-span-2-->
```bash
# 运行配方(recipe)
$ just hello param1
# 按字母顺序列出配方(recipe)
$ just --list
$ just --summary
# 显示有关配方(recipe)的完整信息
just --show test
# 选择以交互方式运行的配方(recipe)
$ just --choose
# shell 完成
just --comp­letions zsh
```
### 其他语言的配置
```bash
bash-test:
#!/usr/bin/env bash
set -euxo pipefail
hello='Yo'
echo "$hello from bash!"
```
### 私人配置 - 名称以开头 _
```bash
test: _test-helper
./bin/test
# ommited from 'just --list'
_test-helper:
./bin/super-secret-test-helper-stuff
```
### 注意
```bash
# 每个命令行都由一个新的 shell 执行
# 如果一个命令行执行失败just会退出
# 后面的命令行不会执行
change-working-dir:
cd bar && pwd
# 多行构造 - 用斜线转义换行符
if true; then \
echo 'True!'; \
fi
# justfile 不区分大小写Justfile、JUSTFILE 等
# justfile 可以被隐藏:'.justfile'
# 从子目录调用配方:`~/app1/target>$ just build`
```
### 作为 shell 别名的配置
```bash
for recipe in `just -f ~/.justfile --summary`; do
alias $recipe="just -f ~/.justfile -d. $recipe"
done
```
### IDE 集成
- VS Code: <https:­//m­ark­etp­lac­e.v­isu­als­tud­io.c­om­/it­ems­?it­emN­ame­=sk­ell­ock.just>
- JetBrains: <https:­//p­lug­ins.je­tbr­ain­s.c­om/­plu­gin­/18­658­-just>

View File

@ -350,7 +350,7 @@ when(grade) {
var height = 46 // inches
if (height in 1..53) {
println("抱歉,您必须至少 54 英寸才能乘坐过山车"
println("抱歉,您必须至少 54 英寸才能乘坐过山车")
}
// Prints: 抱歉,您必须至少 54 英寸才能乘坐过山车
```
@ -606,6 +606,75 @@ fun main() {
```
<!--rehype:className=wrap-text-->
### 简单的高阶函数
<!--rehype:wrap-class=col-span-2-->
```kotlin
//注意啦这里的num1AndNum2有个operation它是接收了一个函数作为形参
fun num1AndNum2(num1: Int, num2: Int, operation: (Int, Int) -> Int): Int {
//让我们试着向operation传入参数
return operation(num1, num2)
}
fun plus(num1: Int, num2: Int): Int {
return num1 + num2
}
fun main(args: Array<String>) {
val total = num1AndNum2(100, 200, ::plus)
println(total)//300
//怎么样?我们利用传入一个函数来充当另一个函数的参数
}
```
还记得我们怎么在Java中用接口吗
试着用函数参数简化它
<!--rehype:className=wrap-text-->
### 以匿名函数作为参数的函数
```kotlin
//operation是一个函数类型的参数哦
fun num1AndNum2(num1: Int, num2: Int, operation: (Int, Int) -> Int): Int {
return operation(num1, num2)
}
fun main(args: Array<String>) {
//这里我们定义一个匿名函数
val operation: (Int, Int) -> Int = { i: Int, i2: Int ->
i + i2
}
val total = num1AndNum2(100, 200, operation)
println(total) //300
}
```
<!--rehype:className=wrap-text-->
### Lambda表达式方式传入函数参数
<!--rehype:wrap-class=col-span-2-->
```kotlin
//我们还是不改变什么
fun num1AndNum2(num1: Int, num2: Int, operation: (Int, Int) -> Int): Int {
return operation(num1, num2)
}
fun main(args: Array<String>) {
//wow哦天哪Lambda可以做到这样简洁
val total = num1AndNum2(100, 200) { n1, n2 ->
n1 + n2
}
println(total)
}
```
这里之所以可以把lambda写在外部是因为operation是最后一个参数。
<!--rehype:className=wrap-text-->
---

344
docs/kubernetes.md Normal file
View File

@ -0,0 +1,344 @@
Kubernetes 备忘清单
===
查看资源信息
---
### 节点
资源名称: nodes, 缩写: no
```bash
$ kubectl get no # 显示所有节点信息
$ kubectl get no -o wide # 显示所有节点的更多信息
$ kubectl describe no # 显示节点详情
$ kubectl get no -o yaml # 以yaml格式显示节点详情
$ kubectl get node --selector=[label_name] # 筛选指定标签的节点
$ kubectl get nodes -o jsonpath='{.items[*].status.addresses[?(@.type=="ExternalIP")].address}'
# 输出jsonpath表达式定义的字段信息
$ kubectl top node [node_name] # 显示节点(CPU/内存/存储)使用情况
```
### 容器组
资源名称: pods, 缩写: po
```bash
$ kubectl get po # 显示所有容器组信息
$ kubectl get po -o wide
$ kubectl describe po
$ kubectl get po --show-labels # 查看容器组的labels
$ kubectl get po -l app=nginx
$ kubectl get po -o yaml
$ kubectl get pod [pod_name] -o yaml --export
$ kubectl get pod [pod_name] -o yaml --export > nameoffile.yaml
# 以yaml格式导出容器组信息到yaml文件
$ kubectl get pods --field-selector status.phase=Running
# 使用字段选择器筛选出容器组信息
```
### 命名空间
资源名称: namespaces, 缩写: ns
```bash
$ kubectl get ns
$ kubectl get ns -o yaml
$ kubectl describe ns
```
### 无状态
资源名称: deployments, 缩写: deploy
```bash
$ kubectl get deploy
$ kubectl describe deploy
$ kubectl get deploy -o wide
$ kubectl get deploy -o yaml
```
### 服务
资源名称: services, 缩写: svc
```bash
$ kubectl get svc
$ kubectl describe svc
$ kubectl get svc -o wide
$ kubectl get svc -o yaml
$ kubectl get svc --show-labels
```
### 守护进程集
资源名称: daemonsets, 缩写: ds
```bash
$ kubectl get ds
$ kubectl describe ds --all-namespaces
$ kubectl describe ds [daemonset_name] -n [namespace_name]
$ kubectl get ds [ds_name] -n [ns_name] -o yaml
```
### 事件
资源名称: events, 缩写: ev
```bash
$ kubectl get events
$ kubectl get events -n kube-system
$ kubectl get events -w
```
### 日志
```bash
$ kubectl logs [pod_name]
$ kubectl logs --since=1h [pod_name]
$ kubectl logs --tail=20 [pod_name]
$ kubectl logs -f -c [container_name] [pod_name]
$ kubectl logs [pod_name] > pod.log
```
### 服务帐户
资源名称: serviceaccounts, 缩写: sa
```bash
$ kubectl get sa
$ kubectl get sa -o yaml
$ kubectl get serviceaccounts default -o yaml >./sa.yaml
$ kubectl replace serviceaccount default -f ./sa.yaml
```
### 副本集
资源名称: replicasets, 缩写: rs
```bash
$ kubectl get rs
$ kubectl describe rs
$ kubectl get rs -o wide
$ kubectl get rs -o yaml
```
### 角色
```bash
$ kubectl get roles --all-namespaces
$ kubectl get roles --all-namespaces -o yaml
```
### 保密字典
```bash
$ kubectl get secrets
$ kubectl get secrets --all-namespaces
$ kubectl get secrets -o yaml
```
### 配置项
资源名称: configmaps, 缩写: cm
```bash
$ kubectl get cm
$ kubectl get cm --all-namespaces
$ kubectl get cm --all-namespaces -o yaml
```
### 路由
资源名称: ingresses, 缩写: ing
```bash
$ kubectl get ing
$ kubectl get ing --all-namespaces
```
### 持久卷
资源名称: persistentvolumes, 缩写: pv
```bash
$ kubectl get pv
$ kubectl describe pv
```
### 持久卷声明
资源名称: persistentvolumeclaims, 缩写: pvc
```bash
$ kubectl get pvc
$ kubectl describe pvc
```
### 存储类
资源名称: storageclasses, 缩写: sc
```bash
$ kubectl get sc
$ kubectl get sc -o yaml
```
### 多个资源
```bash
$ kubectl get svc, po
$ kubectl get deploy, no
$ kubectl get all
$ kubectl get all --all-namespaces
```
变更资源属性
---
### 污点
```bash
$ kubectl taint [node_name] [taint_name]
```
### 标签
```bash
$ kubectl label nodes <node-name> <label-key>=<label-value> #增加
$ kubectl label nodes <node-name> <label-key>- #删除
$ kubectl label nodes <node-name> <label-key>=<label-value> --overwrite #修改
```
### 维护/可调度
```bash
$ kubectl cordon [node_name] # 节点维护
$ kubectl uncordon [node_name] # 节点可调度
```
### 清空节点
```bash
$ kubectl drain [node_name] # 清空节点
```
### 节点/容器组
```bash
$ kubectl delete node [node_name]
$ kubectl delete pod [pod_name]
$ kubectl edit node [node_name]
$ kubectl edit pod [pod_name]
```
### 无状态/命名空间
```bash
$ kubectl edit deploy [deploy_name]
$ kubectl delete deploy [deploy_name]
$ kubectl expose deploy [deploy_name] --port=80 --type=NodePort
$ kubectl scale deploy [deploy_name] --replicas=5
$ kubectl delete ns
$ kubectl edit ns [ns_name]
```
### 服务
```bash
$ kubectl edit svc [svc_name]
$ kubectl delete svc [svc_name]
```
### 守护进程集
```bash
$ kubectl edit ds [ds_name] -n kube-system
$ kubectl delete ds [ds_name]
```
### 服务账号
```bash
$ kubectl edit sa [sa_name]
$ kubectl delete sa [sa_name]
```
### 注释
```bash
$ kubectl annotatepo [pod_name] [annotation]
$ kubectl annotateno [node_name]
```
添加资源
---
### 创建容器组
```bash
$ kubectl create -f [name_of_file]
$ kubectl apply -f [name_of_file]
$ kubectl run [pod_name] --image=nginx --restart=Never
$ kubectl run [pod_name] --generator=run-pod/v1 --image=nginx
$ kubectl run [pod_name] --image=nginx --restart=Never
```
### 创建服务
```bash
$ kubectl create svc nodeport [svc_name] --tcp=8080:80
```
### 创建无状态应用
```bash
$ kubectl create -f [name_of_file]
$ kubectl apply -f [name_of_file]
$ kubectl create deploy [deploy_name] --image=nginx
```
### 容器交互
```bash
$ kubectl run [pod_name] --image=busybox --rm -it --restart=Never -- sh
```
### 输出YAML文件
```bash
$ kubectl create deploy [deploy_name] --image=nginx --dry-run -o yaml > deploy.yaml
$ kubectl get po [pod_name] -o yaml --export > pod.yaml
$ kubectl run nginx --image=nginx:alpine --dry-run -o -yaml > deploy.yaml
```
### 获取帮助
```bash
$ kubectl -h
$ kubectl create -h
$ kubectl run -h
$ kubectl explain deploy.spec
```
请求
---
### API调用
```bash
$ kubectl get --raw /apis/metrics.k8s.io/
```
### 集群信息
```bash
$ kubectl config
$ kubectl cluster-info
$ kubectl get componentstatus
```
另见
---
- [Kubernetes 官方文档 命令行工具 (kubectl)](https://kubernetes.io/zh-cn/docs/reference/kubectl/) _(kubernetes.io)_

224
docs/linux-command.md Normal file
View File

@ -0,0 +1,224 @@
Linux 命令速查表
===
这个快速参考备忘单提供了使用 Linux 常用命令的使用清单
命令速查表
---
### 系统
<!--rehype:wrap-class=row-span-2-->
:--- | :---
:--- | :---
**`uname`** | 显示linux系统信息
**`uname -r`** | 显示内核版本信息
**`uptime`** | 显示系统运行的时间<br/>(包括平均负载)
**`hostname`** | 显示系统主机名
**`hostname -i`** | 显示系统的IP地址
**`last reboot`** | 显示系统重新启动历史记录
**`date`** | 显示当前系统日期和时间
**`timedatectl`** | 查询和更改系统时钟
**`cal`** | 显示当前日历的月份和日期
**`w`** | 显示系统中当前登录的用户
**`whoami`** | 显示您的登录身份
**`finger username`** | 显示有关用户的信息
<!--rehype:className=style-list-->
### 硬件
<!--rehype:wrap-class=row-span-2-->
:--- | :---
:--- | :---
**`dmesg`** | 显示启动消息
**`cat /proc/cpuinfo`** | 显示有关CPU的更多信息例如型号、型号名称、核心、厂商标识
**`cat /proc/meminfo`** | 显示有关硬件内存的更多信息,例如总内存和可用内存
**`lshw`** | 显示有关系统硬件配置的信息
**`lsblk`** | 显示块设备相关信息
**`free -m`** | 显示系统中空闲和使用的内存(-m标志表示内存(MB))
**`lspci -tv`** | 在树状图中显示PCI设备
**`lsusb -tv`** | 以树状图的形式显示USB设备
**`dmidecode`** | 显示BIOS中的硬件信息
**`hdparm -i /dev/xda`** | 显示有关磁盘数据的信息
**`hdparm -tT /dev/xda <:code>`** | 在设备xda上进行读速度测试
**`badblocks -s /dev/xda`** | 测试磁盘上不可读的块
<!--rehype:className=style-list-->
### 用户
:--- | :---
:--- | :---
**`id`** | 显示活动用户的详细信息如uid、gid和组
**`last`** | 显示系统中的最后一次登录
**`who`** | 显示谁已登录到系统
**`groupadd "admin"`** | 添加组"admin"
**`adduser "Sam"`** | 添加用户 Sam
**`userdel "Sam"`** | 删除用户 Sam
**`usermod`** | 用于更改/修改用户信息
<!--rehype:className=style-list-->
### 登陆
:--- | :---
:--- | :---
**`ssh user@host`** | 使用指定用户安全连接到主机
**`ssh -p port_number user@host`** | 使用指定端口安全地连接到主机
**`ssh host`** | 通过SSH默认端口22安全连接到系统
**`telnet host`** | 通过telnet默认端口23连接到主机
<!--rehype:className=style-list-->
### 文件
<!--rehype:wrap-class=row-span-4-->
:--- | :---
:--- | :---
**`ls -al`** | 列出文件-包括常规文件和隐藏文件以及它们的权限
**`pwd`** | 显示当前目录文件路径
**`mkdir 'directory_name'`** | 创建一个新目录
**`rm file_name`** | 删除一个文件
**`rm -f filename`** | 强制删除文件
**`rm -r directory_name`** | 递归地删除一个目录
**`rm -rf directory_name`** | 强制并递归地删除一个目录
**`cp file1 file2`** | 将file1的内容复制到file2
**`cp -r dir1 dir2`** | 递归地将dir1复制到dir2。如果dir2不存在则创建它
**`mv file1 file2`** | 将file1重命名为file2
**`ln -s /path/to/file_name link_name`** | 创建到file_name的软链接
**`touch file_name`** | 创建一个新文件
**`cat > file_name`** | 从键盘创建一个文件
**`more file_name`** | 输出文件的内容
**`head file_name`** | 显示文件的前10行
**`tail file_name`** | 显示文件的最后10行
**`gpg -c file_name`** | 加密一个文件
**`gpg file_name.gpg`** | 解密文件
**`wc`** | 打印文件中的字节、单词和行数
**`xargs`** | 从标准输入执行命令
<!--rehype:className=style-list-->
### 进程
<!--rehype:wrap-class=row-span-3-->
:--- | :---
:--- | :---
**`ps`** | 显示当前活动的进程
**`ps aux \| grep 'telnet'`** | 搜索进程'telnet'的id
**`pmap`** | 显示进程的内存映射
**`top`** | 显示所有正在运行的进程
**`kill pid`** | 使用给定的pid终止进程
**`killall proc`** | 杀死/终止所有名为proc的进程
**`pkill process-name`** | 向具有其名称的进程发送信号
**`bg`** | 将一个在后台暂停的命令,变成继续执行
**`fg`** | 将后台中的命令调至前台继续运行
**`fg n`** | job n to the foreground
**`lsof`** | 列出进程打开的文件 [#](./lsof.md)
**`renice 19 PID`** | 使进程以非常低的优先级运行
**`pgrep firefox`** | 查找Firefox进程ID
**`pstree`** | 在树模型中可视化过程
<!--rehype:className=style-list-->
### 安装包
:--- | :---
:--- | :---
**`rpm -i pkg_name.rpm`** | 安装 rpm 包
**`rpm -e pkg_name`** | 删除 rpm 包
**`dnf install pkg_name`** | 使用 dnf 工具安装软件包
<!--rehype:className=style-list-->
### 文件权限
:--- | :---
:--- | :---
**`chmod octal filename`** | 将文件权限更改为八进制
**`chmod 777 /data/test.c`** | 将rwx权限设置为owner、group和everyone(其他可以访问服务器的人)
**`chmod 755 /data/test.c`** | 将rwx设置为所有者将r_x设置为组和所有人
**`chmod 766 /data/test.c`** | 为所有者设置rwx为组和每个人设置rw
**`chown owner user-file`** | 更改文件的所有权
**`chown owner-user:owner-group file_name`** | 更改文件的所有者和组所有者
**`chown owner-user:owner-group directory`** | 更改目录的所有者和组所有者
<!--rehype:className=style-list-->
### 安装源(编译)
:--- | :---
:--- | :---
**`./configure`** | 检查系统以获得构建程序所需的软件。它将构建包含有效构建项目所需的指令的Makefile
**`make`** |
**`make install`** | 编译后,该命令将二进制文件安装在默认/修改的路径中
<!--rehype:className=style-list-->
### 压缩/打包
:--- | :---
:--- | :---
**`tar -cf home.tar home<:code>`** | 创建名为"home"的存档文件。tar文件home'
**`tar -xf files.tar`** | 解压档案文件"files.tar"
**`tar -zcvf home.tar.gz source-folder`** | 从源文件夹创建压缩的tar存档文件
**`gzip file`** | 压缩扩展名为.gz的文件
<!--rehype:className=style-list-->
### 搜索
:--- | :---
:--- | :---
**`grep pattern files`** | 在文件中搜索给定的模式
**`grep -r pattern dir`** | Search recursively for a pattern in a given directory
**`locate file`** | 查找文件的所有实例
**`find /home/ -name "index"`** | 在/home文件夹中查找以index开头的文件名
**`find /home -size +10000k`** | 在主文件夹中查找大于10000k的文件
<!--rehype:className=style-list-->
### 网络
<!--rehype:wrap-class=row-span-3-->
:--- | :---
:--- | :---
**`ip addr show`** | 显示IP地址和所有网络接口
**`ip address add 192.168.0.1/24 dev eth0`** | 将IP地址192.168.0.1分配给接口eth0
**`ifconfig`** | 显示所有网络接口的IP地址
**`ping host`** | ping命令发送ICMP回送请求以建立到服务器/PC的连接
**`whois domain`** | 检索有关域名的更多信息
**`dig domain`** | 检索关于域的DNS信息
**`dig -x host`** | 对域执行反向查找
**`host google.com`** | 执行域名的IP查找
**`hostname -i`** | 显示本地IP地址
**`wget file_name`** | 从在线资源下载文件
**`netstat -pnltu`** | 显示所有活动监听端口
<!--rehype:className=style-list-->
### 文件传输
:--- | :---
:--- | :---
**`scp file1.txt server2/tmp`** | 安全地将file1.txt复制到/tmp目录中的server2
**`rsync -a /home/apps /backup/`** | 将/home/apps目录中的内容与/backup目录进行同步
<!--rehype:className=style-list-->
### 磁盘使用情况
<!--rehype:wrap-class=row-span-2-->
:--- | :---
:--- | :---
**`df -h`** | 显示安装系统上的空闲空间
**`df -i`** | 显示文件系统上的空闲inode
**`fdisk -l`** | 显示磁盘分区、大小和类型
**`du -sh`** | 以人类可读的格式显示当前目录中的磁盘使用情况
**`findmnt`** | 显示所有文件系统的目标挂载点
**`mount device-path mount-point`** | 挂载设备
<!--rehype:className=style-list-->
### 目录遍历
:--- | :---
:--- | :---
**`cd ..`** | 在目录树结构中向上移动一层
**`cd`** | 将目录更改为$HOME目录
**`cd /test`** | 将目录更改为/test目录
<!--rehype:className=style-list-->
另见
---
- [Linux命令大全搜索工具](https://jaywcjlove.github.io/linux-command) _(jaywcjlove.github.io)_
- [Linux命令大全(手册)](https://www.linuxcool.com/) _(linuxcool.com)_
- [MAN手册 - 中文](https://manpages.debian.org/buster/manpages-zh/index.html) _(debian.org)_
- [Linux 命令行速查表](https://www.cheat-sheet.cn/post/linux-command-line-cheat-sheet/) _(cheat-sheet.cn)_

View File

@ -293,7 +293,7 @@ print(a ^ b) -- 64.0
---
### 运算符
<!--rehype:wrap-class=row-span-2-->
<!--rehype:wrap-class=row-span-3-->
#### 关系运算符

View File

@ -28,15 +28,15 @@ a.txt: b.txt c.txt
### 文件命令
文件会以 `GNUmakefile`(不推荐使用)、`Makefile``makefile` 查找目录下的名称
make命令会以 `GNUmakefile`(不推荐使用)、`makefile``Makefile`(推荐使用)的顺序查找当前目录下的文件
#### 自定义文件名称
#### 自定义文件路径
```bash
$ make target -f NAME
$ make target -f FILE
```
我们可以使用 `-f NAME` 来指定需要编译的文件名
我们可以使用 `-f FILE` 来指定makefile文件的路径
#### 隐式生成

434
docs/mongodb.md Normal file
View File

@ -0,0 +1,434 @@
MongoDB 备忘清单
===
[MongoDB](https://www.mongodb.com/developer/products/mongodb/cheat-sheet/#connect-mongodb-shell) 此备忘单包含一些方便的提示、命令和快速参考,可让您立即连接并进行 CRUD
入门
---
### 连接 MongoDB Shell
<!--rehype:wrap-class=col-span-2-->
```bash
mongo # 默认连接到 mongodb://127.0.0.1:27017
mongo --host <host> --port <port> -u <user> -p <pwd> # 如果需要提示,请省略密码
mongo "mongodb://192.168.1.1:27017"
# MongoDB 地图集
mongo "mongodb+srv://cluster-name.abcde.mongodb.net/<dbname>" --username <username>
```
### 显示数据库
```mongodb
show dbs
db // 打印当前数据库
```
### 切换数据库
```mongodb
use <database_name>
```
### 显示集合
```mongodb
show collections
```
### 运行 JavaScript 文件
```mongodb
load("myScript.js")
```
CRUD
---
### 创建
<!--rehype:wrap-class=col-span-3-->
```mongodb
db.coll.insertOne({ name: "Max" })
db.coll.insert([{ name: "Max"}, {name:"Alex"}]) // 批量插入
db.coll.insert([{ name: "Max"}, {name:"Alex"}], {ordered: false}) // 无序批量插入
db.coll.insert({ date: ISODate()})
db.coll.insert({ name: "Max"}, {"writeConcern": {"w": "majority", "wtimeout": 5000}})
```
### 寻找文件
Commands | Description
:-- | ---
`db.docx.findOne()` | 查找一个随机文档
`db.docx.find().prettyPrint()` | 查找所有文档
`db.docx.find({}, {name:true, _id:false})` | 仅显示文档 Docx 的名称
`db.docx.find({}, {name:true, _id:false})` | 可以在多个文件中按属性查找一个文件
### 使用运算符查找文档
<!--rehype:wrap-class=col-span-2-->
Operator | Description | Commands
:-- | --- | ---
`$gt` | 大于 | `db.docx.find({class:{$gt:'T'}`
`$gte` | 大于等于 | `db.docx.find({class:{$gt:'T'}`
`$lt` | 小于 | `db.docx.find({class:{$lt:'T'}`
`$lte` | 小于等于 | `db.docx.find({class:{$lte:'T'}`
`$exists` | 属性是否存在 | `db.docx.find({class:{$gt:'T'}`
`$regex` | 正则表达式匹配 | `db.docx.find({name:{$regex:'^USS\\sE'}})`
`$type` | 按元素类型搜索 | `db.docx.find({name : {$type:4}})`
### 读取
<!--rehype:wrap-class=col-span-3-->
```mongodb
db.coll.findOne() // 返回单个文档
db.coll.find() // 返回一个游标 - 显示 20 个结果 - "it" 显示更多
db.coll.find().pretty()
db.coll.find({name: "Max", age: 32}) // 隐式逻辑“与”。
db.coll.find({date: ISODate("2020-09-25T13:57:17.180Z")})
// 或“queryPlanner”或“allPlansExecution”
db.coll.find({name: "Max", age: 32}).explain("executionStats")
db.coll.distinct("name")
// 数数
db.coll.count({age: 32}) // 基于馆藏元数据的估计
db.coll.estimatedDocumentCount() // 基于馆藏元数据的估计
db.coll.countDocuments({age: 32}) // 聚合管道的别名 - 准确计数
// Comparison 比较
db.coll.find({"year": {$gt: 1970}})
db.coll.find({"year": {$gte: 1970}})
db.coll.find({"year": {$lt: 1970}})
db.coll.find({"year": {$lte: 1970}})
db.coll.find({"year": {$ne: 1970}})
db.coll.find({"year": {$in: [1958, 1959]}})
db.coll.find({"year": {$nin: [1958, 1959]}})
// Logical 逻辑
db.coll.find({name:{$not: {$eq: "Max"}}})
db.coll.find({$or: [{"year" : 1958}, {"year" : 1959}]})
db.coll.find({$nor: [{price: 1.99}, {sale: true}]})
db.coll.find({
$and: [
{$or: [{qty: {$lt :10}}, {qty :{$gt: 50}}]},
{$or: [{sale: true}, {price: {$lt: 5 }}]}
]
})
// Element 元素
db.coll.find({name: {$exists: true}})
db.coll.find({"zipCode": {$type: 2 }})
db.coll.find({"zipCode": {$type: "string"}})
// Aggregation Pipeline 聚合管道
db.coll.aggregate([
{$match: {status: "A"}},
{$group: {_id: "$cust_id", total: {$sum: "$amount"}}},
{$sort: {total: -1}}
])
// 使用“文本”索引进行文本搜索
db.coll.find({$text: {$search: "cake"}}, {score: {$meta: "textScore"}})
.sort({score: {$meta: "textScore"}})
// Regex 正则表达式
db.coll.find({name: /^Max/}) // 正则表达式以字母“M”开头
db.coll.find({name: /^Max$/i}) // 正则表达式不区分大小写
// Array
db.coll.find({tags: {$all: ["Realm", "Charts"]}})
db.coll.find({field: {$size: 2}}) // 无法索引 - 更喜欢存储数组的大小并更新它
db.coll.find({results: {$elemMatch: {product: "xyz", score: {$gte: 8}}}})
// Projections 预测
db.coll.find({"x": 1}, {"actors": 1}) // actors + _id
db.coll.find({"x": 1}, {"actors": 1, "_id": 0}) // actors
db.coll.find({"x": 1}, {"actors": 0, "summary": 0}) // 除了“actors”和“summary”之外的所有内容
// Sort 排序, skip 跳过, limit 限制
db.coll.find({}).sort({"year": 1, "rating": -1}).skip(10).limit(3)
// Read Concern 阅读关注
db.coll.find().readConcern("majority")
```
### 更新
<!--rehype:wrap-class=col-span-3-->
```mongodb
db.coll.update({"_id": 1}, {"year": 2016}) // 警告! 替换整个文档
db.coll.update({"_id": 1}, {$set: {"year": 2016, name: "Max"}})
db.coll.update({"_id": 1}, {$unset: {"year": 1}})
db.coll.update({"_id": 1}, {$rename: {"year": "date"} })
db.coll.update({"_id": 1}, {$inc: {"year": 5}})
db.coll.update({"_id": 1}, {$mul: {price: NumberDecimal("1.25"), qty: 2}})
db.coll.update({"_id": 1}, {$min: {"imdb": 5}})
db.coll.update({"_id": 1}, {$max: {"imdb": 8}})
db.coll.update({"_id": 1}, {$currentDate: {"lastModified": true}})
db.coll.update({"_id": 1}, {$currentDate: {"lastModified": {$type: "timestamp"}}})
// Array
db.coll.update({"_id": 1}, {$push :{"array": 1}})
db.coll.update({"_id": 1}, {$pull :{"array": 1}})
db.coll.update({"_id": 1}, {$addToSet :{"array": 2}})
db.coll.update({"_id": 1}, {$pop: {"array": 1}}) // 最后一个元素
db.coll.update({"_id": 1}, {$pop: {"array": -1}}) // 第一个元素
db.coll.update({"_id": 1}, {$pullAll: {"array" :[3, 4, 5]}})
db.coll.update({"_id": 1}, {$push: {scores: {$each: [90, 92, 85]}}})
db.coll.updateOne({"_id": 1, "grades": 80}, {$set: {"grades.$": 82}})
db.coll.updateMany({}, {$inc: {"grades.$[]": 10}})
db.coll.update({}, {$set: {"grades.$[element]": 100}}, {multi: true, arrayFilters: [{"element": {$gte: 100}}]})
// 更新很多
db.coll.update({"year": 1999}, {$set: {"decade": "90's"}}, {"multi":true})
db.coll.updateMany({"year": 1999}, {$set: {"decade": "90's"}})
// FindOneAndUpdate 查找并更新
db.coll.findOneAndUpdate({"name": "Max"}, {$inc: {"points": 5}}, {returnNewDocument: true})
// Upsert 更新插入
db.coll.update({"_id": 1}, {$set: {item: "apple"}, $setOnInsert: {defaultQty: 100}}, {upsert: true})
// Replace 代替
db.coll.replaceOne({"name": "Max"}, {"firstname": "Maxime", "surname": "Beugnet"})
// Save 保存
db.coll.save({"item": "book", "qty": 40})
// Write concern 写关注
db.coll.update({}, {$set: {"x": 1}}, {"writeConcern": {"w": "majority", "wtimeout": 5000}})
```
### 删除
<!--rehype:wrap-class=col-span-3-->
```mongodb
db.coll.remove({name: "Max"})
db.coll.remove({name: "Max"}, {justOne: true})
db.coll.remove({}) // 警告!删除所有文档但不删除集合本身及其索引定义
db.coll.remove({name: "Max"}, {"writeConcern": {"w": "majority", "wtimeout": 5000}})
db.coll.findOneAndDelete({"name": "Max"})
```
数据库和集合
---
### Drop
```mongodb
// 删除集合及其索引定义
db.coll.drop()
// 仔细检查你*不*在 PROD 集群上......:-)
db.dropDatabase()
```
### 创建集合
<!--rehype:wrap-class=col-span-2 row-span-2-->
```mongodb
// 使用 $jsonschema 创建集合
db.createCollection("contacts", {
validator: {$jsonSchema: {
bsonType: "object",
required: ["phone"],
properties: {
phone: {
bsonType: "string",
description: "必须是一个字符串并且是必需的"
},
email: {
bsonType: "string",
pattern: "@mongodb\.com$",
description: "必须是字符串并匹配正则表达式模式"
},
status: {
enum: [ "Unknown", "Incomplete" ],
description: "只能是枚举值之一"
}
}
}}
})
```
### 其他采集功能
```mongodb
db.coll.stats()
db.coll.storageSize()
db.coll.totalIndexSize()
db.coll.totalSize()
db.coll.validate({full: true})
// 第二个参数用于删除目标集合(如果存在)
db.coll.renameCollection("new_coll", true)
```
索引
---
### 列表索引
```mongodb
db.coll.getIndexes()
db.coll.getIndexKeys()
```
### 创建索引
<!--rehype:wrap-class=col-span-2 row-span-3-->
```mongodb
// 索引类型
db.coll.createIndex({"name": 1}) // 单字段索引
db.coll.createIndex({"name": 1, "date": 1}) // 复合索引
db.coll.createIndex({foo: "text", bar: "text"}) // 文本索引
db.coll.createIndex({"$**": "text"}) // 通配符文本索引
db.coll.createIndex({"userMetadata.$**": 1}) // 通配符索引
db.coll.createIndex({"loc": "2d"}) // 二维索引
db.coll.createIndex({"loc": "2dsphere"}) // 2dsphere 索引
db.coll.createIndex({"_id": "hashed"}) // 哈希索引
// Index Options
db.coll.createIndex({"lastModifiedDate": 1}, {expireAfterSeconds: 3600}) // TTL指数
db.coll.createIndex({"name": 1}, {unique: true})
db.coll.createIndex({"name": 1}, {partialFilterExpression: {age: {$gt: 18}}}) // 部分索引
// 强度为 1 或 2 的不区分大小写的索引
db.coll.createIndex({"name": 1}, {collation: {locale: 'en', strength: 1}})
db.coll.createIndex({"name": 1 }, {sparse: true})
```
### 删除索引
```mongodb
db.coll.dropIndex("name_1")
```
### 隐藏/取消隐藏索引
```mongodb
db.coll.hideIndex("name_1")
db.coll.unhideIndex("name_1")
```
方便的命令
---
###
<!--rehype:wrap-class=col-span-3&style=display:none;&wrap-style=padding-top: 0;-->
```mongodb
use admin
db.createUser({"user": "root", "pwd": passwordPrompt(), "roles": ["root"]})
db.dropUser("root")
db.auth( "user", passwordPrompt() )
use test
db.getSiblingDB("dbname")
db.currentOp()
db.killOp(123) // opid
db.fsyncLock()
db.fsyncUnlock()
db.getCollectionNames()
db.getCollectionInfos()
db.printCollectionStats()
db.stats()
db.getReplicationInfo()
db.printReplicationInfo()
db.isMaster()
db.hostInfo()
db.printShardingStatus()
db.shutdownServer()
db.serverStatus()
db.setSlaveOk()
db.getSlaveOk()
db.getProfilingLevel()
db.getProfilingStatus()
db.setProfilingLevel(1, 200) // 0 == OFF, 1 == ON with slowms, 2 == ON
db.enableFreeMonitoring()
db.disableFreeMonitoring()
db.getFreeMonitoringStatus()
db.createView("viewName", "sourceColl", [{$project:{department: 1}}])
```
各种各样的
---
### 改变流
```mongodb
watchCursor = db.coll.watch([
{
$match : {"operationType": "insert" }
}
])
while (!watchCursor.isExhausted()){
if (watchCursor.hasNext()){
print(tojson(watchCursor.next()));
}
}
```
### 分片集群
<!--rehype:wrap-class=col-span-2 row-span-3-->
```mongodb
sh.status()
sh.addShard("rs1/mongodbd1.example.net:27017")
sh.shardCollection("mydb.coll", {zipcode: 1})
sh.moveChunk("mydb.coll", { zipcode: "53187" }, "shard0019")
sh.splitAt("mydb.coll", {x: 70})
sh.splitFind("mydb.coll", {x: 70})
sh.disableAutoSplit()
sh.enableAutoSplit()
sh.startBalancer()
sh.stopBalancer()
sh.disableBalancing("mydb.coll")
sh.enableBalancing("mydb.coll")
sh.getBalancerState()
sh.setBalancerState(true/false)
sh.isBalancerRunning()
sh.addTagRange("mydb.coll", {state: "NY",zip: MinKey}, {state: "NY",zip: MaxKey}, "NY")
sh.removeTagRange("mydb.coll", {state: "NY",zip: MinKey}, {state: "NY",zip: MaxKey}, "NY")
sh.addShardTag("shard0000", "NYC")
sh.removeShardTag("shard0000", "NYC")
sh.addShardToZone("shard0000", "JFK")
sh.removeShardFromZone("shard0000", "NYC")
sh.removeRangeFromZone("mydb.coll", {a: 1, b: 1}, {a: 10, b: 10})
```
### 副本集
```mongodb
rs.status()
rs.initiate({"_id": "replicaTest",
members: [
{ _id: 0, host: "127.0.0.1:27017" },
{ _id: 1, host: "127.0.0.1:27018" },
{ _id: 2, host: "127.0.0.1:27019",
arbiterOnly:true }]
})
rs.add("mongodbd1.example.net:27017")
rs.addArb("mongodbd2.example.net:27017")
rs.remove("mongodbd1.example.net:27017")
rs.conf()
rs.isMaster()
rs.printReplicationInfo()
rs.printSlaveReplicationInfo()
rs.reconfig(<valid_conf>)
rs.slaveOk()
rs.stepDown(20, 5)
// (stepDownSecs, secondaryCatchUpPeriodSecs)
```

View File

@ -115,7 +115,7 @@ $ npm run start
```
<!--rehype:className=wrap-text-->
需要[注意]((https://docs.nestjs.com/first-steps#language))的一点是,`JavaScript`的版本是需要`Babel`
需要[注意](<https://docs.nestjs.com/first-steps#language>)的一点是,`JavaScript` 的版本是需要 `Babel`
另见
---

View File

@ -201,7 +201,7 @@ export default Blog
- Next.js 在后台触发页面的重新生成
- 一旦页面生成成功Next.js 将使缓存失效并显示更新后的页面。如果后台重新生成失败,旧页面仍将保持不变
### 使用 useeffect 客户端数据获取
### 使用 useEffect 客户端数据获取
```jsx
import { useState, useEffect } from 'react'
@ -399,7 +399,7 @@ const path = require('path')
module.exports = {
sassOptions: {
includePaths:
includePaths:
[path.join(__dirname, 'styles')],
},
}
@ -1336,7 +1336,7 @@ NEXT_PUBLIC_ANALYTICS_ID=abcdefghijk
// pages/index.js
import setupAnalyticsService from '../lib/my-analytics-service'
//
//
// 它将在构建时转换为 `setupAnalyticsService('abcdefghijk')`
setupAnalyticsService(process.env.NEXT_PUBLIC_ANALYTICS_ID)
@ -1528,11 +1528,11 @@ export default function Home() {
```js
// GET `/post` (empty object)
{ }
{ }
// `GET /post/a` (single-element array)
{ "slug": ["a"] }
{ "slug": ["a"] }
// `GET /post/a/b` (multi-element array)
{ "slug": ["a", "b"] }
{ "slug": ["a", "b"] }
```
### 事件执行调整页面

313
docs/pacman.md Normal file
View File

@ -0,0 +1,313 @@
Pacman 备忘清单
===
这个是 Arch Linux 软件包管理器 Pacman 快速参考备忘单显示了它的常用命令使用清单。
PACMAN 清单查询
---
### 介绍
<!--rehype:wrap-class=row-span-2-->
Pacman 是 Arch Linux 软件包管理器。帮助您在 Arch Linux 上使用 Pacman 软件包管理器进行软件包的安装、升级、搜索和删除等操作
---
命令语法格式
```bash
$ pacman [ OPTIONS ] COMMAND
```
同步非本地(local)软件仓库并升级系统的软件包
```bash
$ pacman -Syu
```
子命令描述和任务,显示 apt 命令和选项。
```bash
$ pacman -h or --help
# 或
$ pacman
```
查看指令用法
```bash
$ man pacman
```
请注意,使用 Pacman 命令时,需要管理员权限 `sudo`
---
相关参考文献
- [Archlinux Wiki 官方文档](https://wiki.archlinuxcn.org/wiki/Pacman)
### 示例
<!--rehype:wrap-class=row-span-2-->
Option | Function
:-- | --
`pacman -D, --database` | 操作软件包数据库
`pacman -Q, --query` | 从数据库中查询软件包
`pacman -R, --remove` | 从系统中移除软件包
`pacman -S, --sync` | 同步软件包
`pacman -T, --deptest` | 检查依赖关系
`pacman -U, --upgrade` | 将包升级或添加到系统,并从同步存储库安装所需的依赖项。
`pacman -F, --files` | 查询文件数据库。
`pacman -V, --version` | 显示版本
`pacman -h, --help` | 显示帮助信息
<!--rehype:className=style-list-arrow-->
升级所有已安装的软件包
```bash
$ sudo pacman -Syu
```
### 安装
要安装单个或者一系列软件包(包含软件包的依赖)
```bash
$ pacman -S 包名_1 包名_2 ...
```
要通过正则表达式安装一系列软件包
```bash
$ pacman -S $(pacman -Ssq 包正则表达式)
```
有时软件包有多个版本,放在不同的仓库内(例如 extra 和 testing
```bash
$ pacman -S extra/包名
```
要安装多个含有相似名称的软件包,可以使用花括号扩展
```bash
$ pacman -S plasma-{desktop,mediacenter,nm}
```
可以多层扩展到需要的层次:
```bash
$ pacman -S plasma-{workspace{,-wallpapers},pa}
```
### 安装包组
一些包属于一个可以同时安装的软件包组
```bash
$ pacman -S gnome
```
想要查看哪些包属于 gnome 组
```bash
$ pacman -Sg gnome
```
### 查询包数据库
<!--rehype:wrap-class=row-span-3-->
pacman 使用 -Q 参数查询本地软件包数据库, -S 查询同步数据库,以及 -F查询文件数据库
pacman 可以在包数据库中查询软件包,查询位置包含了软件包的名字和描述
```bash
$ pacman -Ss string1 string2 ...
```
使用正则
```bash
$ pacman -Ss '^vim-'
```
要查询已安装的软件包:
```bash
$ pacman -Qs string1 string2 ...
```
按文件名查找软件库:
```bash
$ pacman -F string1 string2 ...
```
显示软件包的详尽的信息:
```bash
$ pacman -Si package_name
```
查询本地安装包的详细信息:
```bash
$ pacman -Qi package_name
```
同时显示备份文件和修改状态:
```bash
$ pacman -Qii package_name
```
要获取已安装软件包所包含文件的列表:
```bash
$ pacman -Ql package_name
```
查询远程库中软件包包含的文件:
```bash
$ pacman -Fl package_name
```
查软件包安装的文件是否都存在:
```bash
$ pacman -Qk package_name
```
查询数据库获取某个文件属于哪个软件包
```bash
$ pacman -Qo /path/to/file_name
```
查询文件属于远程数据库中的哪个软件包:
```bash
$ pacman -F /path/to/file_name
```
查询所有不再作为依赖的软件包(孤立orphans)
```bash
$ pacman -Qdt
```
查询所有明确安装而且不被其它包依赖的软件包:
```bash
$ pacman -Qet
```
### 清理软件包缓存
pacman 将下载的软件包保存在 /var/cache/pacman/pkg/ 并且不会自动移除旧的和未安装版本的软件包
要删除目前没有安装的所有缓存的包,和没有被使用的同步数据库
```bash
$ pacman -Sc
```
要删除缓存中的全部文件
```bash
$ pacman -Scc
```
#### Pactree
> 注意: pactree 不再是pacman包的一部分。它现在在pacman-contrib包中。
要显示软件包的依赖树:
```bash
$ pactree package_name
```
### 删除软件包
删除单个软件包,保留其全部已经安装的依赖关系
```bash
$ pacman -R package_name
```
删除指定软件包,及其所有没有被其他已安装软件包使用的依赖关系:
```bash
# ⚠️删除类似 gnome 这样的软件包组时,将会忽略组中软件包的安装原因,因为实际操作上执行的是逐一删除软件组的每一个软件,依赖软件包的安装原因不会被忽略。
$ pacman -Rs package_name
```
<!--rehype:className=wrap-text -->
要删除软件包和所有依赖这个软件包的程序:
```bash
# ⚠️此操作是递归的,请小心检查,可能会一次删除大量的软件包。
$ pacman -Rsc package_name
```
要删除一个被其他软件包依赖的软件包,但是不删除依赖这个软件包的其他软件包
```bash
# ⚠️ 此操作有破坏系统的能力,应该尽量避免使用
$ pacman -Rdd package_name
```
### 查询一个包含具体文件的包名
同步文件数据库:
```bash
$ pacman -Fy
```
查询包含某个文件的包名,比如:
```bash
$ pacman -F pacman
core/pacman 5.0.1-4
usr/bin/pacman
usr/share/bash-completion/completions/pacman
extra/xscreensaver 5.36-1
usr/lib/xscreensaver/pacman
```
### 其它命令
升级系统时安装其他软件包:
```bash
$ pacman -Syu package_name1 package_name2 ...
```
下载包而不安装它:
```bash
$ pacman -Sw package_name
```
安装一个本地包(不从源里下载)
```bash
$ pacman -U /path/to/package/package_name-version.pkg.tar.zst
```
要将本地包保存至缓存
```bash
$ pacman -U file:///path/to/package/package_name-version.pkg.tar.zst
```
安装一个远程包(不在 pacman 配置的源里面):
```bash
$ pacman -U http://www.example.com/repo/example.pkg.tar.zst
```

248
docs/ps.md Normal file
View File

@ -0,0 +1,248 @@
ps 备忘清单
===
Linux 为我们提供了一个名为 `ps` 的实用程序,用于查看与系统上的进程相关的信息,它是 `Process Status` 的缩写
这份 `ps` 命令备忘清单的快速参考列表,包含常用选项和示例。
入门
---
### 语法
<!--rehype:wrap-class=row-span-4-->
```bash
$ ps [options]
```
命令运行示例,列出当前 shell 中的所有进程:
```bash
$ ps
PID TTY TIME CMD
12330 pts/0 00:00:00 bash
21621 pts/0 00:00:00 ps
```
---
:-- | --
:-- | --
`PID` | 唯一的进程 ID
`TTY` | 用户登录的终端类型
`TIME` | 进程运行的 CPU 数量,以分钟和秒为单位
`CMD` | 启动进程的命令的名称
注意:有时当我们执行 `ps` 命令时,它显示 `TIME``00:00:00`
---
ps 命令支持 3 种使用语法风格
- `Unix` 可以分组并以连字符开头
- `BSD` 可以分组但前面没有连字符
- `GNU` 长选项,前面有双连字符
### 示例
<!--rehype:wrap-class=row-span-3-->
Option | Function
:-- | --
`ps -ef / -aux` | 以完整格式列出当前正在运行的进程
`ps -ax` | 列出当前正在运行的进程
`ps -u <username>` | 列出特定用户的进程
`ps -C <command>` | 列出给定命令的进程
`ps -p <PID>` | 列出具有给定 PID 的进程
`ps -ppid <PPID>` | 列出具有给定 ppid 的进程
`pstree` | 在层次结构中显示过程
`ps -L` | 列出特定进程的所有线程
`ps --sort pmem` | 查找内存泄漏
`ps -eo` | 显示安全信息
`ps T` | 允许您仅选择与此终端关联的所有进程
`ps -U root -u root u` | 显示由 root 运行的进程
<!--rehype:className=code-nowrap-->
### 查看系统上的每个进程
要使用标准语法查看系统上的每个进程:
```bash
$ ps -e # 列出所有进程
$ ps -ef
$ ps -eF
$ ps -ely
```
要使用 BSD 语法查看系统上的每个进程:
```bash
$ ps ax # 以 BSD 格式列出所有进程
$ ps axu
```
### 打印进程树
```bash
$ ps -ejH
$ ps axjf
```
### 仅打印 PID 42 的名称
```bash
$ ps -q 42 -o comm=
```
### 获取有关线程的信息
```bash
$ ps -eLf
$ ps axms
```
### 列出当前用户拥有的所有进程
```bash
$ ps x
```
### 获取安全信息
<!--rehype:wrap-class=col-span-2-->
```bash
$ ps -eo euser,ruser,suser,fuser,f,comm,label
$ ps axZ
$ ps -eM
```
### 查看以 root 身份运行的每个进程
查看以 root 身份运行的每个进程(真实且有效的 ID用户格式
```bash
$ ps -U root -u root u
```
### 查看具有用户定义格式的每个进程
<!--rehype:wrap-class=col-span-2-->
```bash
$ ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
$ ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
$ ps -Ao pid,tt,user,fname,tmout,f,wchan
```
### 仅打印 syslogd 的进程 ID
```bash
$ ps -C syslogd -o pid=
```
### 显示面向用户的格式
<!--rehype:wrap-class=col-span-2 row-span-2-->
```bash
$ ps u
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
refs 11400 1.1 0.0 34853544 5816 s025 Ss Tue02PM 0:02.82 /bin/zsh --login
refs 34561 0.6 0.0 34822644 3152 s016 S+ 14Dec22 115:59.28 zsh (figterm)
refs 21377 0.5 0.0 34973972 7076 s028 S+ Wed09AM 4:32.19 zsh (figterm)
refs 78881 0.5 0.0 34843484 3256 s015 S+ 17Dec22 90:27.10 zsh (figterm)
```
### 列出具有完整格式的进程
```bash
$ ps f
$ ps -F
```
### 显示虚拟内存格式
```bash
$ ps v
```
### 按有效用户 ID 或名称显示进程
```bash
$ ps -u user[name or id]
# OR
$ ps --user user[name or id]
$ ps -u root
```
按**真实**用户 ID 或名称显示进程
```bash
$ ps -U user[name or id]
# OR
$ ps --User user[name or id]
```
### 按实际组 ID 或名称显示进程
```bash
$ ps -G group[name or id]
# OR
$ ps --Group group[name or id]
```
### 隐藏 ps 命令输出的标题
```bash
$ ps h
PID TT STAT TIME COMMAND
33790 s000 S+ 104:10.45 zsh (figterm)
33800 s001 Ss+ 0:02.76 /bin/zsh --login
77830 s002 S+ 90:22.51 zsh (figterm)
77840 s003 Ss 0:00.66 /bin/zsh --login
```
### 显示命令后的环境
```bash
$ ps e
PID TTY STAT TIME COMMAND
886 tty2 Ssl+ 0:00 /usr/li....
```
### 重复 ps 命令输出的标题行
```bash
$ ps --headers -A
PID TTY TIME CMD
1 ? 00:00:01 systemd
2 ? 00:00:00 kthreadd
3 ? 00:00:00 rcu_gp
```
### 显示进程树
```bash
$ ps --forest -A
PID TTY TIME CMD
2 ? 00:00:00 kthreadd
3 ? 00:00:00 \_ rcu_gp
4 ? 00:00:00 \_ rcu_par_gp
960 ? 00:00:00 \_ goa-identity-se
1118 ? 00:00:00 \_ at-spi-bus-laun
1124 ? 00:00:00 | \_ dbus-daemon
```
您可以使用 -H 选项打印进程层次结构
```bash
$ ps -H -A
PID TTY TIME CMD
2 ? 00:00:00 kthreadd
3 ? 00:00:00 rcu_gp
1832 ? 00:00:37 gnome-terminal-
1840 pts/0 00:00:00 bash
1925 pts/1 00:00:00 bash
2867 pts/1 00:00:00 su
2868 pts/1 00:00:00 bash
```

163
docs/pycharm.md Normal file
View File

@ -0,0 +1,163 @@
PyCharm 键盘快捷键备忘清单
===
这个 [PyCharm](https://resources.jetbrains.com/storage/products/pycharm/docs/PyCharm_ReferenceCard.pdf) 快速参考备忘单显示了它的键盘快捷键和命令
快捷键
---
### 创建和编辑
<!--rehype:wrap-class=col-span-2 row-span-2-->
:-- | --
:-- | --
`Alt` + `Enter` | 显示意图动作
`Ctrl` + `Space` | 基本代码完成
`Ctrl` + `Shift` + `Space` | 智能代码完成
`Ctrl` + `Alt` + `Space` | 类型名称完成
`Ctrl` + `Shift` + `Enter` | 完整声明
`Ctrl` + `P` / `Alt` + `Q` | 参数信息/上下文信息
`Ctrl` + `Shift` + `I` | 快速定义
`Ctrl` + `Q` / `Shift` + `F1` | 快速/外部文档
`Alt` + `Insert` | 生成代码
`Ctrl` + `O` / `Ctrl` + `I` | 覆盖/实施成员
`Ctrl` + `Alt` + `T` | 围绕着……
`Ctrl` + `/` | 注释行注释
`Ctrl` + `W` / `Ctrl` + `Shift` + `W` | 扩展/收缩选择
`Ctrl` + `Alt` + `O` | 优化导入
`Ctrl` + `Alt` + `I` | 自动缩进行
`Ctrl` + `X` / `Ctrl` + `C` / `Ctrl` + `V` | 剪切/复制/粘贴
`Ctrl` + `Shift` + `C` | 复制文档路径
`Ctrl` + `Shift` + `V` | 从剪贴板历史粘贴
`Ctrl` + `D` | 复制当前行或选择
`Ctrl` + `Shift` + `Up` / `Down` | 向上/向下移动线
`Ctrl` + `Y` | 删除插入符处的行
`Ctrl` + `Shift` + `J` / `Ctrl` + `Enter` | 加入/分割线
`Shift` + `Enter` | 开始新行
`Ctrl` + `Shift` + `U` | 切换大小写
`Ctrl` + `NumPad` `+` / `-` | 展开/折叠代码块
`Ctrl` + `Shift` + `NumPad` `+` / `-` | 全部展开/折叠
`Ctrl` + `S` | 保存全部
<!--rehype:className=shortcuts-->
### 版本控制
:-- | --
:-- | --
`Alt` + <code>`</code> | VCS 操作弹出...
`Ctrl` + `K` | 提交
`Ctrl` + `T` | 更新项目
`Alt` + `Shift` + `C` | 近期变动
`Ctrl` + `Alt` + `Z` | 恢复
`Ctrl` + `Shift` + `K` | 推…
`Ctrl` + `Alt` + `Shift` + `Down` / `Up` | 下一个/上一个更改
<!--rehype:className=shortcuts-->
### 掌握您的 IDE
:-- | --
:-- | --
`Ctrl`+`Shift`+`A` | 寻找行动...
`Alt`+`[0-9]` | 打开一个工具窗口
`Ctrl`+`Alt`+`Y` | 同步
`Ctrl`+<code>`</code> | 快速切换方案...
`Ctrl`+`Alt`+`S` | 设置...
`F4` / `Alt`+`Home` | 跳转到源/导航栏
`F12` | 跳转到最后一个工具窗口
`Shift`+`Esc` / `Ctrl`+`Shift`+`F12` | 隐藏活动/所有工具窗口
`Alt`+`Right` / `Alt`+`Left` | 转到下一个/上一个编辑器选项卡
`Esc` | 转到编辑器(从工具窗口)
`Ctrl`+`Shift`+`F4` / `Ctrl`+`F4` | 关闭活动标签/窗口
<!--rehype:className=shortcuts left-align-->
### 找到一切
:-- | --
:-- | --
`Shift` + `Shift` | 到处搜索
`Ctrl` + `F` / `R` | 查找/替换
`Ctrl` + `Shift` + `F` / `R` | 在路径中查找/在路径中替换
`F3` / `Shift` + `F3` | 下/上一个事件
`Ctrl` + `F3` | 在插入符处查找单词
`Ctrl` + `N` / `Ctrl` + `Shift` + `N` | 去班级/档案
`Ctrl` + `F12` | 转到文件成员
`Ctrl` + `Alt` + `Shift` + `N` | 转到符号
<!--rehype:className=shortcuts-->
### 从符号导航
:-- | --
:-- | --
`Ctrl` + `B` | 声明
`Ctrl` + `Shift` + `B` | 类型声明 _(仅限 JavaScript)_
`Ctrl` + `U` | 超级方法
`Ctrl` + `Alt` + `B` | 实施
`Alt` + `F7` / `Ctrl` + `F7` | 查找用法/在文件中查找用法
`Ctrl` + `Shift` + `F7` | 突出显示文件中的用法
`Ctrl` + `Alt` + `F7` | 显示用法
<!--rehype:className=shortcuts-->
### 重构和清理
:-- | --
:-- | --
`Ctrl` + `Alt` + `Shift` + `T` | 重构这个……
`F5` /`F6` | 复制…/移动…
`Alt` + `Delete` | 安全删除…
`Shift` + `F6` | 改名…
`Ctrl` + `F6` | 更改签名…
`Ctrl` + `Alt` + `N` | 排队…
`Ctrl` + `Alt` + `M` | 提取方法
`Ctrl` + `Alt` + `V` / `P` | 引入变量/参数
`Ctrl` + `Alt` + `F` / `C` | 引入字段/常量
`Ctrl` + `Alt` + `L` | 重新格式化代码
<!--rehype:className=shortcuts-->
### 分析和探索
:-- | --
:-- | --
`Ctrl` + `F1` | 显示错误描述
`F2` / `Shift` + `F2` | 下一个/上一个突出显示的错误
`Ctrl` + `Alt` + `Shift` + `I` | 按名称运行检查...
`Ctrl` + `H` / `Ctrl` + `Alt` + `H` | 类型/调用层次结构
<!--rehype:className=shortcuts-->
### 在上下文中导航
:-- | --
:-- | --
`Alt`+`F1` | 选择...
`Ctrl`+`E` / `Ctrl`+`Shift`+`E` | 最近查看/最近位置
`Ctrl`+`Shift`+`Back` | 最后编辑位置
`Ctrl`+`Alt`+`Left` / `Right` | 向后/向前导航
`Alt`+`Up` / `Down` | 转到上一个/下一个方法
`Ctrl`+`G` | 转到行/列...
`Ctrl`+`]` / `[` | 转到代码块结束/开始
`Alt`+`Shift`+`F` | 添加到收藏夹
`F11` | 切换书签
`Ctrl`+`F11` | 使用助记符切换书签
`Ctrl`+`[0-9]` | 转到编号书签
`Shift`+`F11` | 显示书签
<!--rehype:className=shortcuts-->
### 构建、运行和调试
:-- | --
:-- | --
`Ctrl` + `Shift` + `F10` | 运行上下文配置
`Alt` + `Shift` + `F10`/`F9` | 运行/调试所选配置
`Shift` + `F10`/`F9` | 运行/调试当前配置
`F8` / `F7` | 跨过/进入
`Shift` + `F7` | 智能步入
`Shift` + `F8` | 走出去
`Alt` + `F9` / `Ctrl` + `Alt` + `F9` | 运行到光标/强制运行到光标
`Alt` + `F10` | 显示执行点
`Alt` + `F8` | 评估表达...
`Ctrl` + `F2` | 停止
`Ctrl` + `Shift` + `F2` | 停止后台进程...
`F9` | 恢复程序
`Ctrl` + `F8` | 切换行断点
`Ctrl` + `Alt` + `Shift` + `F8` | 切换临时行断点
`Ctrl` + `Shift` + `F8` | 编辑/查看断点
<!--rehype:className=shortcuts-->

View File

@ -152,7 +152,7 @@ message += "Part 2."
'10 + 10 = 20'
```
查看: [Python F-Strings](#f-字符串(Python 3.6+))
查看: [Python F-Strings](#python-f-字符串自-python-36-起)
Python 数据类型
---------------
@ -489,7 +489,7 @@ Python F 字符串(自 Python 3.6+ 起)
'text '
>>> f'{"test":*>10}' # 向左填充
'******test'
>>> f'{"test":*<10}' # 填写正确
>>> f'{"test":*<10}' # 向右填充
'test******'
>>> f'{"test":*^10}' # 填充中心
'***test***'
@ -649,7 +649,7 @@ a_list[start:end:step]
['spam', 'egg', 'bacon', 'tomato', 'ham', 'lobster']
```
#### 迈着大步
#### 跳跃索引
```python
['spam', 'egg', 'bacon', 'tomato', 'ham', 'lobster']
@ -678,7 +678,7 @@ a_list[start:end:step]
['butter']
```
### 使用权
### 列表边界
```python
>>> li = ['a', 'b', 'c', 'd']

View File

@ -838,6 +838,16 @@ H2 部分
默认表格末尾列`右对齐`,添加 `<!--rehype:className=left-align-->` 类让其`左对齐`
### 强制 code 不换行
| Command | Description |
| ---- | ---- |
| `adb remount` | Remounts file system with read/write access |
| `adb reboot bootloader` | Reboots the device into fastboot |
<!--rehype:className=show-header code-nowrap-->
添加 `<!--rehype:className=code-nowrap-->` 注释
列表
---

1071
docs/reactrouter.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -297,7 +297,7 @@ RegEX 备忘清单
范例 | 说明
:-|-
`colou?r` | 匹配 <yel>color</yel><yel>color</yel>
`colou?r` | 匹配 <yel>color</yel><yel>colour</yel>
`[BW]ill[ieamy's]*` | 匹配 <yel>Bill</yel><yel>Willy</yel><yel>William's</yel> 等。
`[a-zA-Z]+` | 匹配 1 个或多个字母
`\d{3}-\d{2}-\d{4}` | 匹配 SSN
@ -615,7 +615,7 @@ M(?(?=.*?\bher\b)s|r)\.
表达式 | 匹配示例
:- | -
`The` | The `fat` cat sat on the mat.
`The` | `The` fat cat sat on the mat.
`/The/gi` | `The` fat cat sat on `the` mat.
<!--rehype:className=show-header-->

View File

@ -180,7 +180,7 @@ let p = Point { x: 10, y: 11 };
let px: i32 = p.x;
```
#### 元结构体
#### 元结构体
```rust
struct Color (i32, i32, i32);

356
docs/scala.md Normal file
View File

@ -0,0 +1,356 @@
Scala
===
[![Repo Dependents](https://badgen.net/github/dependents-repo/scala/scala)](https://github.com/scala/scala/network/dependents)
[![Github repo](https://badgen.net/badge/icon/Github?icon=github&label)](https://github.com/scala/scala)
本速查表可以用于快速地查找 [Scala](https://github.com/scala/scala) 语法结构
<!--rehype:style=padding-top: 12px;-->
入门
-----
### 介绍
- [Scala](https://github.com/scala/scala) 官网 _(github.com)_
### 函数
<!--rehype:wrap-class=col-span-2 row-span-4-->
```scala
def f(x: Int) = { x*x } // ✅ GOOD
def f(x: Int) { x*x } // ❌ BAD 定义函数,潜在风险:
// 不加“=”号将会是一段返回Unit类型的过程
// 这将会导致意想不到的错误。
def f(x: Any) = println(x) // ✅ GOOD
def f(x) = println(x) // ❌ BAD 定义函数 语法错误: 每个参数都需要指定类型。
type R = Double // 类型别名
def f(x: R) vs.
def f(x: => R) // 传值调用 传名调用 (惰性参数)
(x:R) => x*x // 匿名函数
(1 to 5).map(_*2) vs. // 匿名函数: 下划线是参数的占位符
(1 to 5).reduceLeft( _+_ )
(1 to 5).map( x => x*x ) // 匿名函数: 必须命名以后才可以多次使用同一个参数
(1 to 5).map(2*) // ✅ GOOD
(1 to 5).map(*2) // ❌ BAD 匿名函数: 绑定中缀方法明智的做法是2*_。
(1 to 5).map { x => val y=x*2; println(y); y } // 匿名函数: 代码块风格,最后一个表达式作为返回值
(1 to 5) filter {_%2 == 0} map {_*2} // 匿名函数: 管道风格(或者用圆括号)
// 匿名函数: 要传入多个代码块的话,需要使用花括号。
def compose(g:R=>R, h:R=>R) = (x:R) => g(h(x))
val f = compose({_*2}, {_-1})
val zscore = (mean:R, sd:R) => (x:R) => (x-mean)/sd // 柯里化, 显然的语法。
def zscore(mean:R, sd:R) = (x:R) => (x-mean)/sd // 柯里化, 显然的语法。
def zscore(mean:R, sd:R)(x:R) = (x-mean)/sd // 柯里化,语法糖。然后:)
val normer = zscore(7, 0.4) _ // 需要在尾部加下划线来变成偏函数(只对语法糖版本适用)
def mapmake[T](g:T=>T)(seq: List[T]) = seq.map(g) // 泛型
5.+(3); 5 + 3
(1 to 5) map (_*2) // 中缀语法糖
def sum(args: Int*) = args.reduceLeft(_+_) // 变长参数
```
### 变量
```scala
var x = 5 // 可变变量
val x = 5 // ✅ GOOD
x=6 // ❌ BAD 常量
var x: Double = 5 // 显式类型
```
### 包
```scala
import scala.collection._ // 通配符导入
import scala.collection.Vector
// 选择性导入
import scala.collection.{Vector, Sequence}
// 重命名导入
import scala.collection.{Vector => Vec28}
// 导入java.util包里除Date之外的一切
import java.util.{Date => _, _}
// 文件开头的包名 pkg
package pkg { ... } // 声明这是一个包
```
### 数据结构
```scala
(1,2,3) // 元组字面量 (Tuple3)
// 解构绑定:通过模式匹配来解构元组。
var (x,y,z) = (1,2,3)
// ❌ BAD 潜在风险:整个元组被赋值给了每一个变量
var x,y,z = (1,2,3)
// 列表 (不可变)
var xs = List(1,2,3)
xs(2) // 用括号索引 (slides)
1 :: List(2,3) // Cons构成
1 to 5 /* 等价于 => */ 1 until 6
// Range类型语法糖
1 to 10 by 2
// Unit类型的唯一成员 (相当于 C/Java 里的void)
() (空括号)
```
控制结构
---
### 条件
```scala
if (check) happy else sad
```
### 条件(语法糖)
```scala
if (check) happy same as
if (check) happy else ()
```
### while 循环
```scala
while (x < 5) { println(x); x += 1}
```
### do while 循环
```scala
do { println(x); x += 1} while (x < 5)
```
### break. (slides)
```scala
import scala.util.control.Breaks._
breakable {
for (x <- xs) {
if (Math.random < 0.1) break
}
}
```
### for 表达式: filter/map
```scala
for (x <- xs if x%2 == 0) yield x*10
// 等价于
xs.filter(_%2 == 0).map(_*10)
```
### for 表达式: 解构绑定
```scala
for ((x,y) <- xs zip ys) yield x*y
// 等价于
(xs zip ys) map { case (x,y) => x*y }
```
### for 表达式: 叉乘
```scala
for (x <- xs; y <- ys) yield x*y
// 等价于
xs flatMap {x => ys map {y => x*y}}
```
### for 表达式: 不可避免的格式
```scala
for (x <- xs; y <- ys) {
println("%d/%d = %.1f".format(x, y, x/y.toFloat))
}
```
### for 表达式: 包括上边界的遍历
```scala
for (i <- 1 to 5) {
println(i)
}
```
### for 表达式: 忽略上边界的遍历
```scala
for (i <- 1 until 5) {
println(i)
}
```
模式匹配
---
### 在函数的参数中使用模式匹配
```scala
// ✅ GOOD
(xs zip ys) map { case (x,y) => x*y }
// ❌ BAD
(xs zip ys) map( (x,y) => x*y )
```
### 可以匹配任何Int类型值的名称
<!--rehype:wrap-class=col-span-2-->
```scala
val v42 = 42
Some(3) match {
case Some(v42) => println("42")
case _ => println("Not 42")
}
```
❌ BAD: “v42” 被解释为可以匹配任何Int类型值的名称打印输出”42”
```scala
val v42 = 42
Some(3) match {
case Some(`v42`) => println("42")
case _ => println("Not 42")
}
```
✅ GOOD: 有反引号的 “`v42`” 被解释为已经存在的 `val v42`,所以输出的是 “Not 42”.
```scala
val UppercaseVal = 42
Some(3) match {
case Some(UppercaseVal) => println("42")
case _ => println("Not 42")
}
```
✅ GOOD: UppercaseVal 被视作已经存在的 val而不是一个新的模式变量因为它是以大写字母开头的所以 `UppercaseVal` 所包含的值42和检查的值3不匹配输出”Not 42”
面向对象
----
### 构造器参数 - 私有
```scala
class C(x: R) same as
class C(private val x: R)
var c = new C(4)
```
### 构造器参数 - 公有
```scala
class C(val x: R)
var c = new C(4)
c.x
```
### 构造函数就是类的主体
<!--rehype:wrap-class=row-span-2-->
```scala
class C(var x: R) {
assert(x > 0, "positive please")
var y = x
val readonly = 5
private var secret = 1
def this = this(42)
}
```
### 匿名类
```scala
new{ ... }
```
### 定义一个抽象类
```scala
abstract class D { ... } // 不可创建
```
### 定义一个继承子类
```scala
class C extends D { ... }
```
### 继承与构造器参数
```scala
class D(var x: R)
class C(x: R) extends D(x)
```
愿望清单: 默认自动传参
### 定义一个单例
```scala
object O extends D { ... }
```
和模块一样
### 特质
```scala
trait T { ... }
class C extends T { ... }
class C extends D with T { ... }
```
带有实现的接口,没有构造参数
### 多个特质
```scala
trait T1; trait T2
class C extends T1 with T2
class C extends D with T1 with T2
```
### 必须声明覆盖该方法
```scala
class C extends D { override def f = ...}
```
### 创建对象
```scala
new java.io.File("f")
new List[Int] // ✅ GOOD
List(1,2,3) // ❌ BAD
```
### 类字面量
```scala
classOf[String]
```
### 类型检查 (运行时)
```scala
x.isInstanceOf[String]
```
### 类型强制转换 (运行时)
```scala
x.asInstanceOf[String]
```
### 归属 (编译时)
```scala
x: String
```

View File

@ -1350,6 +1350,7 @@ const point = [3, 4] as const
```
### satisfies
<!--rehype:wrap-class=row-span-2-->
`satisfies` 允许将验证表达式的类型与某种类型匹配,而无需更改该表达式的结果类型。
@ -1385,10 +1386,10 @@ const palette = {
// undefined | number
const redComponent = palette.red.at(0)
```
<!--rehype:className=wrap-text-->
### 范型实例化表达式
<!--rehype:wrap-class=row-span-2-->
不使用的情况下:
@ -1432,6 +1433,449 @@ const makeStringBox = makeBox<string>;
makeStringBox(42);
```
### 识别全局修改模块
```ts
declare global {
interface String {
fancyFormat(opts: FancyOption): string;
}
}
export interface FancyOption {
fancinessLevel: number;
}
```
.d.ts 模版
---
### Module: Plugin
例如,当您想使用扩展另一个库的 JavaScript 代码时
```ts
import { greeter } from "super-greeter";
// 普通欢迎 API
greeter(2);
greeter("Hello world");
// 现在我们在运行时用一个新函数扩展对象
import "hyper-super-greeter";
greeter.hyperGreet();
```
"`super-greeter`" 的定义:
```ts
/* 此示例说明如何为您的函数设置多个重载 */
export interface GreeterFunction {
(name: string): void
(time: number): void
}
/* 此示例显示如何导出接口指定的函数 */
export const greeter: GreeterFunction;
```
我们可以像下面这样扩展现有模块:
```ts
/* 导入这个模块添加到的模块 */
import { greeter } from "super-greeter";
/* 声明与上面导入的模块相同的模块,然后我们扩展 greeter 函数的现有声明 */
export module "super-greeter" {
export interface GreeterFunction {
/** Greets even better! */
hyperGreet(): void;
}
}
```
<!--rehype:className=wrap-text-->
### 全局库模板 Global .d.ts
<!--rehype:wrap-class=row-span-2-->
全局库可能如下所示:
```ts
function createGreeting(s) {
return "Hello, " + s;
}
```
或者像这样:
```ts
window.createGreeting = function (s) {
return "Hello, " + s;
};
```
<pur>类型声明示例</pur>
```ts
/* 可以作为 myLib(3) 此处包含这些调用签名 */
declare function myLib(a: string): string;
declare function myLib(a: number): number;
/* 如果你希望这个库的名称是一个有效的类型名称,你可以在这里这样做例如,这允许我们写 'var x: myLib'; 确保这确实有意义! 如果没有,只需删除此声明并在下面的命名空间内添加类型 */
interface myLib {
name: string;
length: number;
extras?: string[];
}
/* 如果您的库在全局变量上公开了属性,请将它们放在此处。 您还应该在此处放置类型(接口和类型别名) */
declare namespace myLib {
// 我们可以写 'myLib.timeout = 50;'
let timeout: number;
// 我们可以访问 'myLib.version',但不能更改它
const version: string;
// 我们可以通过 'let c = new myLib.Cat(42)' 创建一些类或参考例如 '函数 f(c: myLib.Cat) { ... }
class Cat {
constructor(n: number);
// 我们可以从 'Cat' 实例中读取 'c.age'
readonly age: number;
// 我们可以从 'Cat' 实例调用 'c.purr()'
purr(): void;
}
// 我们可以将变量声明为
// 'var s: myLib.CatSettings = { weight: 5, name: "Maru" };'
interface CatSettings {
weight: number;
name: string;
tailLength?: number;
}
// 我们可以写 'const v: myLib.VetID = 42;'
// 或 'const v: myLib.VetID = "bob";'
type VetID = string | number;
// 我们可以调用 'myLib.checkCat(c)' 或 'myLib.checkCat(c, v);'
function checkCat(c: Cat, s?: VetID);
}
```
<!--rehype:className=wrap-text-->
### Module: Function
<!--rehype:wrap-class=row-span-2-->
```ts
import greeter from "super-greeter";
greeter(2);
greeter("Hello world");
```
要处理通过 `UMD` 和模块导入:
```ts
/* 如果此模块是一个 UMD 模块在模块加载器环境之外加载时公开全局变量“myFuncLib”请在此处声明该全局变量。 否则,删除此声明 */
export as namespace myFuncLib;
/* 此声明指定该函数是从文件中导出的对象 */
export = Greeter;
/* 此示例说明如何为您的函数设置多个重载 */
declare function Greeter(name: string): Greeter.NamedReturnType;
declare function Greeter(length: number): Greeter.LengthReturnType;
```
<!--rehype:className=wrap-text-->
如果你也想从你的模块中公开类型,你可以把它们放在这个块中。 通常你会想要描述函数返回类型的形状; 如本例所示,应在此处声明该类型,请注意,如果您决定包含此命名空间,则模块可能会被错误地导入为命名空间对象,除非 `--esModuleInterop` 已打开: `import * as x from '[~THE MODULE~]';` 错误的!不要这样做!
```ts
declare namespace Greeter {
export interface LengthReturnType {
width: number;
height: number;
}
export interface NamedReturnType {
firstName: string;
lastName: string;
}
/**
* 如果模块也有属性,在这里声明它们。 例如,这个声明说这个代码是合法的:
* import f = require('super-greeter');
* console.log(f.defaultName);
*/
export const defaultName: string;
export let defaultLength: number;
}
```
<!--rehype:className=wrap-text-->
### Module: Class
例如,当您想要使用如下所示的 `JavaScript` 代码时:
```ts
const Greeter = require("super-greeter");
const greeter = new Greeter();
greeter.greet();
```
要处理通过 `UMD` 和模块导入:
```ts
export as namespace "super-greeter";
/* 此声明指定类构造函数是从文件中导出的对象 */
export = Greeter;
/* 在此类中编写模块的方法和属性 */
declare class Greeter {
constructor(customGreeting?: string);
greet: void;
myMethod(opts: MyClass.MyClassMethodOptions): number;
}
```
<!--rehype:className=wrap-text-->
如果你也想从你的模块中公开类型,你可以把它们放在这个块中,如果您决定包含此命名空间,则模块可能会被错误地导入为命名空间对象,除非 --esModuleInterop 已打开:
`import * as x from '[~THE MODULE~]';` 错误的! 不要这样做!
```ts
declare namespace MyClass {
export interface MyClassMethodOptions {
width?: number;
height?: number;
}
}
```
<!--rehype:className=wrap-text-->
JSDoc 参考
---
### @type
<!--rehype:wrap-class=row-span-2-->
```javascript
/** @type {string} */
var s;
/** @type {Window} */
var win;
/** @type {PromiseLike<string>} */
var promisedString;
// 您可以指定具有 DOM 属性的 HTML 元素
/** @type {HTMLElement} */
var elm = document.querySelector(selector);
elm.dataset.myData = "";
/** @type {number[]} */
var ns;
/** @type {Array.<number>} */
var jsdoc;
/** @type {Array<number>} */
var nas;
/** @type {string | boolean} */
var sb;
/** @type {{ a: string, b: number }} */
var var9;
/**
* 将任意“字符串”属性映射到“数字”的类地图对象
* @type {Object.<string, number>}
*/
var stringToNumber;
/** @type {Object.<number, object>} */
var arrayLike;
/** @type {function(string, boolean): number} Closure syntax */
var sbn;
/** @type {(s: string, b: boolean) => number} TypeScript syntax */
var sbn2;
/** @type {Function} */
var fn7;
/** @type {function} */
var fn6;
/**
* @type {*} - can be 'any' type
*/
var star;
/**
* @type {?} - unknown type (same as 'any')
*/
var question;
/** @type {number | string} */
var numberOrString = Math.random() < 0.5 ? "hello" : 100;
var typeAssertedNumber = /** @type {number} */ (numberOrString);
let one = /** @type {const} */(1);
```
### 导入类型
```javascript
// @filename: types.d.ts
export type Pet = {
name: string,
};
// @filename: main.js
/** @param { import("./types").Pet } p */
function walk(p) {
console.log(`Walking ${p.name}...`);
}
```
导入类型可以在类型别名声明中使用
```javascript
/**
* @typedef {import("./types").Pet} Pet
*/
/** @type {Pet} */
var myPet;
myPet.name;
```
如果您不知道类型,或者如果它有一个很烦人的大类型,`import types` 可以用来从模块中获取值的类型:
```javascript
/**
* @type {typeof import("./accounts").userAccount}
*/
var x = require("./accounts").userAccount;
```
### @param 和 @returns
```javascript
/**
* @param {string} p1 - 一个字符串参数
* @param {string=} p2 - 可选参数Google Closure 语法)
* @param {string} [p3] - 另一个可选参数JSDoc 语法)
* @param {string} [p4="test"] - 具有默认值的可选参数
* @returns {string} 这是结果
*/
function stringsStrings(p1, p2, p3, p4) {
// TODO
}
```
同样,对于函数的返回类型:
```javascript
/**
* @return {PromiseLike<string>}
*/
function ps() {}
/**
* @returns {{ a: string, b: number }} - 可以使用“@returns”和“@return”
*/
function ab() {}
```
### @typedef, @callback, 和 @param
<!--rehype:wrap-class=col-span-2 row-span-2-->
```javascript
/**
* @typedef {Object} SpecialType - 创建一个名为“SpecialType”的新类型
* @property {string} prop1 - SpecialType 的字符串属性
* @property {number} prop2 - SpecialType 的数字属性
* @property {number=} prop3 - SpecialType 的可选数字属性
* @prop {number} [prop4] - SpecialType 的可选数字属性
* @prop {number} [prop5=42] - 具有默认值的 SpecialType 的可选数字属性
*/
/** @type {SpecialType} */
var specialTypeObject;
specialTypeObject.prop3;
```
您可以在第一行使用 object 或 Object
```javascript
/**
* @typedef {object} SpecialType1 - 创建一个名为“SpecialType”的新类型
* @property {string} prop1 - SpecialType 的字符串属性
* @property {number} prop2 - SpecialType 的数字属性
* @property {number=} prop3 - SpecialType 的可选数字属性
*/
/** @type {SpecialType1} */
var specialTypeObject1;
```
**@param** 允许对一次性类型规范使用类似的语法。 请注意,嵌套的属性名称必须以参数名称为前缀:
```javascript
/**
* @param {Object} options - 形状和上面的SpecialType一样
* @param {string} options.prop1
* @param {number} options.prop2
* @param {number=} options.prop3
* @param {number} [options.prop4]
* @param {number} [options.prop5=42]
*/
function special(options) {
return (options.prop4 || 1001) + options.prop5;
}
```
**@callback** 类似于 **@typedef**,但它指定的是函数类型而不是对象类型:
```javascript
/**
* @callback Predicate
* @param {string} data
* @param {number} [index]
* @returns {boolean}
*/
/** @type {Predicate} */
const ok = (s) => !(s.length % 2);
```
当然,这些类型中的任何一种都可以在单行 **@typedef** 中使用 TypeScript 语法声明:
```javascript
/** @typedef {{ prop1: string, prop2: string, prop3?: number }} SpecialType */
/** @typedef {(data: string, index?: number) => boolean} Predicate */
```
### @template
您可以使用 **@template** 标记声明类型参数。 这使您可以创建通用的函数、类或类型:
```javascript
/**
* @template T
* @param {T} x - 流向返回类型的通用参数
* @returns {T}
*/
function id(x) {
return x;
}
const a = id("string");
const b = id(123);
const c = id({});
```
使用逗号或多个标签来声明多个类型参数:
```javascript
/**
* @template T,U,V
* @template W,X
*/
```
您还可以在类型参数名称之前指定类型约束。 只有列表中的第一个类型参数受到约束:
```javascript
/**
* @template {string} K - K 必须是字符串或字符串文字
* @template {{ serious(): string }} Seriousalizable - 一定要有 serious 的方法
* @param {K} key
* @param {Seriousalizable} object
*/
function seriousalize(key, object) {
// ????
}
```
最后,您可以为类型参数指定默认值:
```javascript
/** @template [T=object] */
class Cache {
/** @param {T} initial */
constructor(T) {
}
}
let c = new Cache()
```
CLI
---
@ -1463,7 +1907,7 @@ $ tsc app.ts util.ts --target esnext --outfile index.js
`--init` _boolean_ | 初始化 TypeScript 项目并创建 tsconfig.json 文件
`--listFilesOnly` _boolean_ | 打印作为编译一部分的文件名,然后停止处理
`--locale` _string_ | 设置来自 TypeScript 的消息传递语言。 这不影响发射
`--project` _string_ | 编译项目给定其配置文件的路径,或带有tsconfig.json的文件夹
`--project` _string_ | 编译项目给定其配置文件的路径,或带有 'tsconfig.json' 的文件夹
`--showConfig` _boolean_ | 打印最终配置而不是构建
`--version` _boolean_ | 打印编译器的版本
<!--rehype:className=style-list-->

View File

@ -184,7 +184,7 @@ G gg H M L k j ▶ print("to")
:- | -
`v` | 进入可视化模式
`V` | 进入视线模式
`<C-v>` | 进入可视化阻挡模式
`<C-v>` | 进入可视模式
`ggVG` | 选择所有文本
`>` _/_ `<` | 向右/向左移动文本
<!--rehype:className=shortcuts-->

View File

@ -5,16 +5,16 @@ VSCode 备忘清单
## Windows
### 一般的
### 通用
| - | - |
|-----------------------------|------------------------|
| `Ctrl` `Shift` `P` _/_ `F1` | 显示命令面板 |
| `Ctrl` `P` | 快速打开,转到文件 |
| `Ctrl` `Shift` `N` | 新窗户 |
| `Ctrl` `Shift` `W` | 关闭窗口 |
| `Ctrl` `,` | 用户设置 |
| `Ctrl` `K` `Ctrl` `S` | 键盘快捷键 |
| `Ctrl` `Shift` `N` | 打开新窗口 |
| `Ctrl` `Shift` `W` | 关闭当前窗口 |
| `Ctrl` `,` | 打开用户设置 |
| `Ctrl` `K` `Ctrl` `S` | 打开键盘快捷键设置 |
<!--rehype:className=shortcuts-->
### 基本编辑
@ -36,16 +36,16 @@ VSCode 备忘清单
| `Ctrl` `End` | 转到文件末尾 |
| `Ctrl` `↑` _/_ `↓` | 向上/向下滚动行 |
| `Alt` `PgUp` _/_ `PgDn` | 向上/向下滚动页面 |
| `Ctrl` `Shift` `[` | 折叠(折叠)区域 |
| `Ctrl` `Shift` `]` | 展开(展开)区域 |
| `Ctrl` `K` `Ctrl` `[` | 折叠(折叠)所有子区域 |
| `Ctrl` `K` `Ctrl` `]` | 展开(展开)所有子区域 |
| `Ctrl` `K` `Ctrl` `0` | 折叠(折叠)所有区域 |
| `Ctrl` `K` `Ctrl` `J` | 展开(展开)所有区域 |
| `Ctrl` `Shift` `[` | 折叠区域 |
| `Ctrl` `Shift` `]` | 展开区域 |
| `Ctrl` `K` `Ctrl` `[` | 折叠所有子区域 |
| `Ctrl` `K` `Ctrl` `]` | 展开所有子区域 |
| `Ctrl` `K` `Ctrl` `0` | 折叠所有区域 |
| `Ctrl` `K` `Ctrl` `J` | 展开所有区域 |
| `Ctrl` `K` `Ctrl` `C` | 添加行注释 |
| `Ctrl` `K` `Ctrl` `U` | 删除行注释 |
| `Ctrl` `/` | 切换行注释 |
| `Shift` `Alt` `A` | 切换块评论 |
| `Shift` `Alt` `A` | 切换块注释 |
| `Alt` `Z` | 切换自动换行 |
<!--rehype:className=shortcuts-->
@ -54,28 +54,28 @@ VSCode 备忘清单
| - | - |
|----------------------|--------------------|
| `Ctrl` `T` | 显示所有符号 |
| `Ctrl` `G` | 去线 |
| `Ctrl` `G` | 跳转到指定行数 |
| `Ctrl` `P` | 转到文件 |
| `Ctrl` `Shift` `O` | 转到符号 |
| `Ctrl` `Shift` `M` | 显示问题面板 |
| `F8` | 转到下一个错误 |
| `Shift` `F8` | 转到上一个错误 |
| `Ctrl` `Shift` `Tab` | 浏览编辑组历史 |
| `Alt` `←` _/_ `→` | 后退/前进 |
| `Ctrl` `M` | 切换 Tab 移动焦点 |
| `Alt` `←` _/_ `→` | 后退/前进 |
| `Ctrl` `M` | 切换 Tab 移动焦点 |
<!--rehype:className=shortcuts-->
### 搜索和替换
| - | - |
|---------------------------|---------------------------------|
| `Ctrl` `F` | 找 |
| `Ctrl` `H` | 替 |
| `Ctrl` `F` | 找 |
| `Ctrl` `H` | 替 |
| `F3` _/_ `Shift` `F3` | 查找下一个/上一个 |
| `Alt` `Enter` | 选择所有出现的查找匹配项 |
| `Ctrl` `D` | 将选择添加到下一个查找匹配项 |
| `Ctrl` `K` `Ctrl` `D` | 将最后一个选择移动到下一个查找匹配项 |
| `Alt` `C` _/_ `R` _/_ `W` | 切换区分大小写/正则表达式/整个单词 |
| `Ctrl` `D` | 将所选内容设置为查找关键词 |
| `Ctrl` `K` `Ctrl` `D` | 将一个选择移动到下一个查找匹配项 |
| `Alt` `C` _/_ `R` _/_ `W` | 切换区分大小写/正则表达式/全字匹配 |
<!--rehype:className=shortcuts-->
### 多光标和选择
@ -90,7 +90,7 @@ VSCode 备忘清单
| `Ctrl` `Shift` `L` | 选择当前选择的所有匹配项 |
| `Ctrl` `F2` | 选择当前单词的所有出现 |
| `Shift` `Alt` `→` | 展开选择 |
| `Shift` `Alt` `←` | 收选择 |
| `Shift` `Alt` `←` | 收选择 |
| `Shift` `Alt` `<Drag>` | 列(框)选择 |
| `Ctrl` `Shift` `Alt` `<Arrow>` | 列(框)选择 |
| `Ctrl` `Shift` `Alt` `PgUp` _/_ `PgDn` | 列(框)选择页上/下 |
@ -100,17 +100,17 @@ VSCode 备忘清单
| - | - |
|-----------------------------|-----------------|
| `Ctrl` `<Space>` `Ctrl` `I` | 触发建议 |
| `Ctrl` `Shift` `<Space>` | 触发参数提示 |
| `Ctrl` `<Space>` `Ctrl` `I` | 显示建议 |
| `Ctrl` `Shift` `<Space>` | 显示参数提示 |
| `Shift` `Alt` `F` | 格式化文档 |
| `Ctrl` `K` `Ctrl` `F` | 格式选择 |
| `Ctrl` `K` `Ctrl` `F` | 格式化所选区域 |
| `F12` | 转到定义 |
| `Alt` `F12` | 窥视定义 |
| `Ctrl` `K` `F12` | 打开定义到一边 |
| `Ctrl` `.` | 快速解决 |
| `Shift` `F12` | 显示参考 |
| `Alt` `F12` | 速览定义 |
| `Ctrl` `K` `F12` | 在侧边栏中打开定义 |
| `Ctrl` `.` | 快速修复 |
| `Shift` `F12` | 显示引用 |
| `F2` | 重命名符号 |
| `Ctrl` `K` `Ctrl` `X` | 修剪尾随空格 |
| `Ctrl` `K` `Ctrl` `X` | 删除尾随空格 |
| `Ctrl` `K` `M` | 更改文件语言 |
<!--rehype:className=shortcuts-->
@ -121,8 +121,8 @@ VSCode 备忘清单
| `Ctrl` `F4` `Ctrl` `W` | 关闭编辑器 |
| `Ctrl` `K` `F` | 关闭文件夹 |
| `Ctrl` `\` | 拆分编辑器 |
| `Ctrl` `1` _/_ `2` _/_ `3` | 专注于第一、第二或第三编辑组 |
| `Ctrl` `K` `Ctrl` `←` _/_ `→` | 专注于上一个/下一个编辑组 |
| `Ctrl` `1` _/_ `2` _/_ `3` | 将焦点切换到第一/二/三编辑组 |
| `Ctrl` `K` `Ctrl` `←` _/_ `→` | 将焦点切换到上/下一个编辑组 |
| `Ctrl` `Shift` `PgUp` _/_ `PgDn` | 向左/向右移动编辑器 |
| `Ctrl` `K` `←` _/_ `→` | 移动活动编辑器组 |
<!--rehype:className=shortcuts-->
@ -137,11 +137,11 @@ VSCode 备忘清单
| `Ctrl` `Shift` `S` | 另存为 |
| `Ctrl` `K` `S` | 保存所有 |
| `Ctrl` `F4` | 关闭 |
| `Ctrl` `K` `Ctrl` `W` | 关闭松油 |
| `Ctrl` `K` `Ctrl` `W` | 关闭所有 |
| `Ctrl` `Shift` `T` | 重新打开关闭的编辑器 |
| `Ctrl` `K` `Enter` | 保持预览模式编辑器打开 |
| `Ctrl` `Tab` | Open next |
| `Ctrl` `Shift` `Tab` | Open previous |
| `Ctrl` `Tab` | 打开下一项 |
| `Ctrl` `Shift` `Tab` | 打开上一项 |
| `Ctrl` `K` `P` | 复制活动文件的路径 |
| `Ctrl` `K` `R` | 在资源管理器中显示活动文件 |
| `Ctrl` `K` `O` | 在新窗口/实例中显示活动文件 |
@ -175,12 +175,12 @@ VSCode 备忘清单
| `F9` | 切换断点 |
| `F5` | 开始/继续 |
| `Shift` `F5` | 停止 |
| `Shift` `F11` _/_ `F11` | 进/出 |
| `F10` | 跨过去 |
| `Shift` `F11` _/_ `F11` | 单步调试/跳出 |
| `F10` | 单步跳过 |
| `Ctrl` `K` `Ctrl` `I` | 显示悬停 |
| `Ctrl` <code>\`</code> | 显示综合终端 |
| `Ctrl` `Shift` <code>\`</code> | 创建一个新终端 |
| `Ctrl` `C` | 复制选择 |
| `Ctrl` `C` | 复制所选内容 |
| `Ctrl` `V` | 粘贴到活动终端 |
| `Ctrl` `↑` _/_ `↓` | 向上/向下滚动 |
| `Shift` `PgUp` _/_ `PgDn` | 向上/向下滚动页面 |

151
docs/zip.md Normal file
View File

@ -0,0 +1,151 @@
Zip 备忘清单
====
Zip 命令用于在 Linux 系统上创建、压缩和解压缩 zip 文件
入门
----
### Zip 用法
```shell
$ zip [-选项] [-b 路径] [-t 日期] [-n 后缀名] [压缩文件列表] [-xi 列表]
```
<!--rehype:className=wrap-text-->
默认操作是添加或替换压缩文件列表中的压缩文件条目,压缩文件列表可以包括特殊名称 `-`,压缩标准输入数据
- `Zip` 是一个创建和管理 `zip` 文件的压缩工具
- `Unzip` 是一个用于解压缩 `zip` 文件的工具
```shell
$ yum install -y unzip zip
```
### 选项示例
<!--rehype:wrap-class=col-span-2 row-span-2-->
参数 | 描述 | 参数 | 描述
:--- | :--- | :--- | :---
`-f` | **freshen:** 只压缩具有变化的文件 | `-u` | **update:** 只压缩变化的或新增的文件
`-d` | 在压缩文件中删除项目 | `-m` | 移动到压缩文件中(删除操作系统文件)
`-r` | 递归进入目录 | `-j` | 不记录目录名
`-0` | 仅存储 | `-l` | 将`LF`转换为`CRLF`(-ll CRLF转LF)
`-1` | 更快压缩 | `-9` | 更好压缩
`-q` | 安静操作 | `-v` | 显示详细操作/打印版本信息
`-c` | 增加注释 | `-z` | 添加压缩文件注释
`-@` | 从标准输入流读取文件列表 | `-o` | 让压缩文件日期与最近更新的文件日期一致
`-x` | 排除以下文件/目录 | `-i` | 仅添加以下文件/目录
`-F` | 修复压缩文件(-FF尝试更加努力) | `-D` | 不添加目录到压缩文件中
`-A` | 调整自解压可执行文件 | `-J` | 忽略压缩文件的前缀(解压自解压文件)
`-T` | 检查压缩文件是否完整 | `-X` | 排除额外的文件属性
`-y` | 将符号链接作为链接存储 | `-h` | 显示此帮助文件
`-n` | 不压缩以下文件类型 | `-w` | 在压缩操作之前提示
`-V` | 保留VMS版本号 | `-L` | 使一些名称小写
`-M` | 通过“more”分页器进行数据流输出 | `-O` | CHARSET指定字符编码以供压缩条目使用
`-k` | 加密压缩文件项 | `-s` | 使用正则表达式选择要包括的条目
`-u@` | 从标准输入读取参数 | `-vV` | 仅包括与VMS版本字符串匹配的条目
`-z` | 将zip放入存档模式 | `-Z` | `zipinfo` 模式
`-C` | 大小写不敏感匹配文件名(需要UTF-8文件系统;参阅--Ohelp) | &nbsp; | &nbsp;
`-2**` | 通过第二层压缩 | `-3**` | 通过第三层压缩
`-4**` | 通过第四层压缩 | `-d**` | 仅提取这些文件(仅限zipinfo模式)
`-j**` | 忽略 `zipfile` 的前缀(解压模式) | &nbsp; | &nbsp;
`**` 这些级别是数据压缩算法,具有 gzip(1) 兼容的级别 `1-9`, 以及特殊的 `0` 表示无压缩和 `-1` (最快)表示压缩数据以"存储"方法机会存储在ZIP文件中 的未压缩数据。
### 语法形式和选项
:- | :-
:- | :-
**基本语法** | `zip [选项] 文件名.zip [文件列表]`
**压缩目录** | `zip -r [选项] 文件名.zip 目录名称`
**将文件添加到现有压缩文件** | `zip -u [选项] 文件名.zip 文件名称`
**解压缩文件** | `unzip [选项] 文件名.zip`
**将 zip 文件解压缩到指定目录** | `unzip [选项] 文件名.zip -d 目录名称`
**列出 zip 文件中的内容** | `unzip -l 文件名.zip`
**将 zip 文件加密** | `zip -e [选项] 文件名.zip 文件名称`
**将 zip 文件解密** | `unzip [选项] 文件名.zip然后输入密码解密`
**将 zip 文件中的文件转成 UTF-8 编码** | `zip -O utf-8 -r [选项] 文件名.zip 文件列表`
<!--rehype:className=style-list-arrow-->
Zip 压缩示例
--------
### 创建新的 zip 压缩文件
```shell
$ zip filename.zip file1 file2 folder1
```
### 将文件添加到现有的 zip 压缩文件
```shell
$ zip -r filename.zip file3 folder2
```
### 压缩文件排除文件
<!--rehype:wrap-class=row-span-2-->
```shell
$ zip -r basic.zip example/basic/ -x "example/basic/node_modules/*" -x "example/basic/build/*" -x "example/basic/coverage/*"
```
<!--rehype:className=wrap-text-->
压缩 `example/basic/` 目录内容到 `basic.zip` 压缩包中 `-x` 指定排除目录,注意**没有双引**号将不起作用
### 将大文件分割成多个zip文件
```shell
$ zip -s 10M -r filename.zip largefile
```
### 将zip文件加密
```shell
$ zip -e secure.zip file4
```
### 更新zip文件中的文件
```shell
$ zip -u filename.zip file5
```
### 将zip文件中的文件转成UTF-8编码
```shell
$ zip -O utf-8 -r utf8zip.zip utf8file
```
Zip 解压示例
--------
### 将zip文件解密
```shell
$ unzip secure.zip然后输入密码解密
```
### 解压缩zip文件
```shell
$ unzip filename.zip
```
### 将zip文件解压缩到指定目录
```shell
$ unzip filename.zip -d folder3
```
### 列出zip文件中的内容
```shell
$ unzip -l filename.zip
```
另见
----
- [Zip 官网](https://www.info-zip.org/Zip.html) _(info-zip.org)_
- [Zip 命令帮助文档](https://jaywcjlove.github.io/linux-command/c/zip.html) _(info-zip.org)_

View File

@ -1,6 +1,6 @@
{
"name": "@wcj/reference",
"version": "1.32.0",
"version": "1.37.0",
"description": "为开发人员分享快速参考备忘单(主要是方便自己)。",
"author": "jaywcjlove",
"license": "MIT",
@ -21,11 +21,18 @@
"url": "https://github.com/jaywcjlove/reference/issues"
},
"keywords": [],
"lint-staged": {
"**/*.{mjs,css,json,prettierrc,lintstagedrc}": "prettier --write",
"*.md": "markdownlint --fix",
"docs/*.md": "markdownlint --fix"
},
"devDependencies": {
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"refs-cli": "^1.2.10"
"refs-cli": "^1.3.2",
"markdownlint": "^0.27.0",
"markdownlint-cli": "^0.33.0"
},
"engines": {
"node": ">=16.0.0"