From 5701da6e5be81a11579490ee642fbd0790ffdd09 Mon Sep 17 00:00:00 2001 From: fw_qaq <82551626+Jack-Zhang-1314@users.noreply.github.com> Date: Fri, 11 Nov 2022 01:51:54 +0800 Subject: [PATCH] chore: format markdown code. (#42) * format: fix markdown * update: fix markdown * update: fix cron problems * update: delete .markdownlintignore * update * chore: add tab -> 4 space * chore: fix tab -> 2 in the .editorconfig --- .editorconfig | 7 + .lintstagedrc | 2 +- .markdownlint.json | 6 +- docs/ansible.md | 21 +- docs/awk.md | 26 ++- docs/bash.md | 55 +++-- docs/c.md | 45 +++-- docs/cargo.md | 15 +- docs/chmod.md | 4 +- docs/cmake.md | 2 +- docs/colors-named.md | 12 +- docs/conan.md | 1 - docs/cron.md | 18 +- docs/css.md | 57 +++--- docs/curl.md | 7 +- docs/djiango.md | 22 +- docs/docker.md | 22 +- docs/dockerfile.md | 2 +- docs/electron.md | 97 +++++---- docs/emacs.md | 4 +- docs/emmet.md | 21 +- docs/es6.md | 41 +++- docs/expressjs.md | 11 +- docs/ffmpeg.md | 4 - docs/find.md | 2 - docs/git.md | 8 +- docs/github-actions.md | 4 +- docs/gmail.md | 27 ++- docs/golang.md | 142 ++++++------- docs/grep.md | 10 +- docs/homebrew.md | 12 +- docs/html-char.md | 3 +- docs/html.md | 40 ++-- docs/htop.md | 8 +- docs/http-status-code.md | 90 ++++----- docs/ini.md | 2 +- docs/iso-639-1.md | 5 +- docs/java.md | 73 ++++--- docs/javascript.md | 11 +- docs/jest.md | 3 - docs/jq.md | 10 +- docs/json.md | 10 +- docs/koajs.md | 8 +- docs/lerna.md | 18 +- docs/lessjs.md | 3 +- docs/lsof.md | 7 +- docs/markdown.md | 13 +- docs/matlab.md | 416 +++++++++++++++++++------------------- docs/mime.md | 16 +- docs/mysql.md | 22 +- docs/netcat.md | 8 +- docs/netstat.md | 3 - docs/nginx.md | 7 +- docs/npm.md | 42 ++-- docs/package.json.md | 10 +- docs/postgres.md | 45 ++--- docs/python.md | 41 ++-- docs/quickreference.md | 10 +- docs/react.md | 22 +- docs/regex.md | 168 +++++++-------- docs/resolutions.md | 18 +- docs/ruby.md | 83 ++++---- docs/rust.md | 28 ++- docs/sass.md | 5 +- docs/screen.md | 6 +- docs/sed.md | 11 +- docs/semver.md | 7 +- docs/sketch.md | 4 +- docs/ssh.md | 8 +- docs/styled-components.md | 5 +- docs/stylus.md | 2 + docs/sublime-text.md | 10 +- docs/swift.md | 21 +- docs/swiftui.md | 8 +- docs/systemd.md | 2 +- docs/tmux.md | 2 +- docs/toml.md | 47 +++-- docs/typescript.md | 6 +- docs/vim.md | 13 +- docs/vscode.md | 7 +- docs/vue.md | 6 +- docs/vue2.md | 17 +- docs/xcode.md | 22 +- docs/xpath.md | 24 +-- docs/yaml.md | 8 +- docs/yarn.md | 2 +- docs/yum.md | 6 +- package.json | 2 +- 88 files changed, 1075 insertions(+), 1126 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..8c56b1f6466 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[./docs/*.md] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true diff --git a/.lintstagedrc b/.lintstagedrc index 6cc8b77084d..711c99f26be 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,4 +1,4 @@ { "**/*.{mjs,css,json,prettierrc,lintstagedrc}": ["prettier --write"], - "./docs/*.md": ["markdownlint --fix ./docs"] + "./docs/*.md": ["npx markdownlint-cli --fix ./docs"] } diff --git a/.markdownlint.json b/.markdownlint.json index 43dd5bff9ca..67d1683f295 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -4,5 +4,9 @@ "MD014": false, "MD024": false, "MD033": false, - "MD040": false + "MD040": false, + "MD010": { + "code_blocks": true, + "spaces_per_tab": 4 + } } diff --git a/docs/ansible.md b/docs/ansible.md index 6cddca9e79a..8fd7e80677f 100644 --- a/docs/ansible.md +++ b/docs/ansible.md @@ -18,7 +18,6 @@ Ansible 备忘清单 - [Ansible 官方文档](https://docs.ansible.com) - ### 配置位置 文件路径 | 说明 @@ -27,7 +26,6 @@ Ansible 备忘清单 `~/ansible.cfg` | 用户特定的配置 `$pwd/ansible.cfg` | 当前目录下的配置 - ### Inventory文件(hosts列表) #### 静态Inventory @@ -86,6 +84,7 @@ proxy=proxy.atlanta.example.com ```shell $ ansible all --list-hosts ``` + ping所有目标 ```shell @@ -108,19 +107,19 @@ $ ansible all -i localhost, -e '{"ansible_connection": "local"}' -a 'hostname' ```shell $ ansible all -i localhost, -e '{"ansible_connection": "local"}' -m setup -``` +``` 获取远程到本地 ```shell $ ansible target -m fetch -a "src=/tmp/seq dest=/tmp/seq" -``` +``` 拷贝本地到远程 ```shell $ ansible target -m copy -a "src=/tmp/seq dest=/tmp/seq" -``` +``` ### Ansible 命令帮助 @@ -131,7 +130,7 @@ $ ansible $ ansible [options] ``` ----- +--- :- | - :- | - @@ -219,7 +218,6 @@ $ ansible-galaxy init --offline ``` - ### ansible-doc 在本地访问文档 @@ -241,13 +239,13 @@ $ ansible-doc [options] [module...] `--version` | 显示程序的版本号并退出 - ### ansible-vault ```bash $ ansible-vault $ ansible-vault [create|decrypt|edit|encrypt|rekey|view] [--help] [options] vaultfile.yml ``` + --- :- | - @@ -268,6 +266,7 @@ $ ansible-vault [create|decrypt|edit|encrypt|rekey|view] [--help] [options] vaul $ ansible-playbook $ ansible-playbook playbook.yml ``` + --- :- | - @@ -329,13 +328,14 @@ $ ansible-playbook playbook.yml `-K`, `--ask-become-pass` | 要求提权密码 -### ansible-pull +### ansible-pull ```bash $ ansible-pull $ ansible-pull -U [options] ``` + --- :- | - @@ -394,10 +394,9 @@ $ ansible-pull -U [options] - - 另见 --- + [Getting started with Ansible](https://docs.ansible.com/ansible/latest/getting_started/index.html) [Introduction to ad hoc commands](https://docs.ansible.com/ansible/latest/user_guide/intro_adhoc.html) [Ansible cheatsheet](https://github.com/luckylittle/ansible-cheatsheet/blob/master/ansible-cheatsheet.txt) diff --git a/docs/awk.md b/docs/awk.md index 515963c9af0..33d6fac3b79 100644 --- a/docs/awk.md +++ b/docs/awk.md @@ -25,7 +25,7 @@ $ awk -F: '{print $1, $NF}' /etc/passwd | | `$NF` | 最后一个字段 | | | `/etc/passwd` | 输入数据文件 | -### Awk 程序 +### Awk 程序 ```bash BEGIN {<初始化>} @@ -59,7 +59,8 @@ $0/NR ▶ │ 1 │ baidu.com │ awk │ $0/NR ▶ │ 2 │ google.com │ 25 │ └──────┴──────────────┴───────┘ ``` ---- + +---- ```shell # 第一个和最后一个字段 @@ -253,7 +254,6 @@ awk -v varName="$PWD" ' END {print varName}' #### 速记作业 -- `+=` -- `-=` -- `*=` -- `/=` -- `%=` +- `+=` +- `-=` +- `*=` +- `/=` +- `%=` #### 比较运算符 @@ -366,7 +366,6 @@ Awk 函数 `toupper(s)` | 字符串 `s` 转大写 `getline` | 将 `$0` 设置为当前输入文件中的下一个输入记录 - ### 用户定义函数 ```shell @@ -424,7 +423,6 @@ awk 'BEGIN { }' ``` - ### 带拆分的数组 ```shell @@ -536,7 +534,6 @@ awk -F: '{ }' /etc/passwd ``` - Awk 循环 ---------- @@ -744,6 +741,7 @@ daemon /sbin ------------- ### 正则表达式元字符 + - `\` - `^` - `$` @@ -785,4 +783,4 @@ $ awk -f demo.awk /etc/passwd -------- - [GNU awk 用户指南](https://www-zeuthen.desy.de/dv/documentation/unixguide/infohtml/gawk/gawk.html) _(www-zeuthen.desy.de)_ -- [AWK cheatsheet](https://gist.github.com/Rafe/3102414) _(gist.github.com)_ \ No newline at end of file +- [AWK cheatsheet](https://gist.github.com/Rafe/3102414) _(gist.github.com)_ diff --git a/docs/bash.md b/docs/bash.md index 4dabb37108a..f06e3823db0 100644 --- a/docs/bash.md +++ b/docs/bash.md @@ -64,7 +64,6 @@ NAME = "John" # => Error (关于空间) 见:[特殊参数](http://wiki.bash-hackers.org/syntax/shellvars#special_parameters_and_shell_variables) - ### 函数 ```bash @@ -204,7 +203,7 @@ DIRPATH=${SRC%$BASEPATH} echo $DIRPATH # => "/path/to/" ``` -### Transform +### Transform ```bash STR="HELLO WORLD!" @@ -220,7 +219,7 @@ echo "${ARR[@],}" # => hello world echo "${ARR[@]^}" # => Hello World ``` -Bash 数组 +Bash 数组 ------ ### 定义数组 @@ -247,14 +246,14 @@ Numbers+=(4 5) # 附加 => 1 2 3 4 5 :- | - :- | - -`${Fruits[0]}` | 第一个元素 -`${Fruits[-1]}` | 最后一个元素 -`${Fruits[*]}` | 所有元素 -`${Fruits[@]}` | 所有元素 -`${#Fruits[@]}` | 总数 -`${#Fruits}` | 第一节长度 -`${#Fruits[3]}` | 第n个长度 -`${Fruits[@]:3:2}` | 范围 +`${Fruits[0]}` | 第一个元素 +`${Fruits[-1]}` | 最后一个元素 +`${Fruits[*]}` | 所有元素 +`${Fruits[@]}` | 所有元素 +`${#Fruits[@]}` | 总数 +`${#Fruits}` | 第一节长度 +`${#Fruits[3]}` | 第n个长度 +`${Fruits[@]:3:2}` | 范围 `${!Fruits[@]}` | 所有 Key ### 迭代 Iteration @@ -265,7 +264,9 @@ for e in "${Fruits[@]}"; do echo $e done ``` + #### With index + ```bash for i in "${!Fruits[@]}"; do printf "%s\t%s\n" "$i" "${Fruits[$i]}" @@ -443,7 +444,6 @@ fi `[[ f1 -ot f2 ]]` | f2 早于 f1 `[[ f1 -ef f2 ]]` | 相同的文件 - ### 更多条件 条件 | 描述 @@ -451,7 +451,7 @@ fi `[[ -o noclobber ]]` | 如果启用 OPTION `[[ ! EXPR ]]` | 不是 Not `[[ X && Y ]]` | 和 And -`[[ X \|\| Y ]]` | 或者 Or +`[[ X \|\| Y ]]` | 或者 Or ### 逻辑和,或 @@ -554,7 +554,7 @@ until [ $count -gt 10 ]; do done ``` -### 永远 +### 永远 ```bash while true; do @@ -570,7 +570,6 @@ while :; do done ``` - ### 正在读取行 ```bash @@ -720,8 +719,7 @@ Bash 历史 `!!` 可以替换为任何有效的扩展,即 `!cat`、`!-2`、`!42` 等。 - -各种各样的 +各种各样的 ------------- ### 数值计算 @@ -741,7 +739,6 @@ $(($RANDOM%200)) # Random number 0..199 pwd # still in first directory ``` - ### 检查命令 ```bash @@ -765,7 +762,6 @@ python hello.py &>/dev/null # 标准输出和标准错误到(空null) python hello.py < foo.txt # 将 foo.txt 提供给 python 的标准输入 ``` - ### 来源相对 ```bash @@ -791,7 +787,6 @@ case "$1" in esac ``` - ### 陷阱错误 @@ -862,7 +857,6 @@ fi 见[特殊参数](http://wiki.bash-hackers.org/syntax/shellvars#special_parameters_and_shell_variables)。 - ### grep 检查 @@ -872,11 +866,10 @@ if grep -q 'foo' ~/.bash_history; then fi ``` - ### 反斜杠转义 --   +-   - \! - \" - \# @@ -963,11 +956,11 @@ echo "${args[@]}" 另见 ---- -* [Shell 教程](https://jaywcjlove.github.io/shell-tutorial) _(jaywcjlove.github.io)_ -* [Devhints](https://devhints.io/bash) _(devhints.io)_ -* [Bash-hackers wiki](http://wiki.bash-hackers.org/) _(bash-hackers.org)_ -* [Shell vars](http://wiki.bash-hackers.org/syntax/shellvars) _(bash-hackers.org)_ -* [Learn bash in y minutes](https://learnxinyminutes.com/docs/bash/) _(learnxinyminutes.com)_ -* [Bash Guide](http://mywiki.wooledge.org/BashGuide) _(mywiki.wooledge.org)_ -* [ShellCheck](https://www.shellcheck.net/) _(shellcheck.net)_ -* [shell - Standard Shell](https://devmanual.gentoo.org/tools-reference/bash/index.html) _(devmanual.gentoo.org)_ \ No newline at end of file +- [Shell 教程](https://jaywcjlove.github.io/shell-tutorial) _(jaywcjlove.github.io)_ +- [Devhints](https://devhints.io/bash) _(devhints.io)_ +- [Bash-hackers wiki](http://wiki.bash-hackers.org/) _(bash-hackers.org)_ +- [Shell vars](http://wiki.bash-hackers.org/syntax/shellvars) _(bash-hackers.org)_ +- [Learn bash in y minutes](https://learnxinyminutes.com/docs/bash/) _(learnxinyminutes.com)_ +- [Bash Guide](http://mywiki.wooledge.org/BashGuide) _(mywiki.wooledge.org)_ +- [ShellCheck](https://www.shellcheck.net/) _(shellcheck.net)_ +- [shell - Standard Shell](https://devmanual.gentoo.org/tools-reference/bash/index.html) _(devmanual.gentoo.org)_ diff --git a/docs/c.md b/docs/c.md index 05888ad678b..3dcbde26587 100644 --- a/docs/c.md +++ b/docs/c.md @@ -560,13 +560,13 @@ printf("Line 6 - c 的值是 %d\n", c ); 运算符 | 描述 | 实例 -:- |:- |:- +:- |:- |:- `&` | 按位与操作,按二进制位进行"与"运算 | `(A & B)` 将得到 `12` 即为 0000 1100 `\|` | 按位或运算符,按二进制位进行"或"运算 | `(A \| B)` 将得到 `61` 即为 0011 1101 `^` | 异或运算符,按二进制位进行"异或"运算 | `(A ^ B)` 将得到 `49` 即为 0011 0001 `~` | 取反运算符,按二进制位进行"取反"运算 | `(~A)` 将得到 `-61` 即为 1100 0011 -`<<` | 二进制左移运算符 | `A << 2` 将得到 `240` 即为 1111 0000 -`>>` | 二进制右移运算符 | `A >> 2` 将得到 `15` 即为 0000 1111 +`<<` | 二进制左移运算符 | `A << 2` 将得到 `240` 即为 1111 0000 +`>>` | 二进制右移运算符 | `A >> 2` 将得到 `15` 即为 0000 1111 数据类型 Data Types --- @@ -608,7 +608,7 @@ printf("%c\n", myLetter); printf("%lf\n", myDouble); ``` ---- +---- 数据类型 | 说 明 :- | :- @@ -620,7 +620,6 @@ printf("%lf\n", myDouble); `double` | 双精度浮点型 `void` | 无类型 - ### 基本格式说明符 | 格式说明符 | 数据类型 | @@ -659,17 +658,17 @@ printf("%c\n", myLetter); 指令 | 描述 ---- | ---- -`#define` | 定义宏 -`#include` | 包含一个源代码文件 -`#undef` | 取消已定义的宏 -`#ifdef` | 如果宏已经定义,则返回真 -`#ifndef` | 如果宏没有定义,则返回真 -`#if` | 如果给定条件为真,则编译下面代码 -`#else` | `#if` 的替代方案 +`#define` | 定义宏 +`#include` | 包含一个源代码文件 +`#undef` | 取消已定义的宏 +`#ifdef` | 如果宏已经定义,则返回真 +`#ifndef` | 如果宏没有定义,则返回真 +`#if` | 如果给定条件为真,则编译下面代码 +`#else` | `#if` 的替代方案 `#elif` | 如果 `#if` 条件为假,当前条件为`真` -`#endif` | 结束一个 `#if……#else` 条件编译块 -`#error` | 当遇到标准错误时,输出错误消息 -`#pragma` | 使用标准化方法,向编译器发布特殊的命令到编译器中 +`#endif` | 结束一个 `#if……#else` 条件编译块 +`#error` | 当遇到标准错误时,输出错误消息 +`#pragma` | 使用标准化方法,向编译器发布特殊的命令到编译器中 ```c // 所有的 MAX_ARRAY_LENGTH 替换为 20 @@ -743,8 +742,6 @@ Carole 和 Debra: 我们爱你! 需要把一个宏的参数转换为字符串常量时,使用字符串常量化运算符 `#` - - ### 标记粘贴运算符(##) ```c @@ -821,12 +818,12 @@ void myFunction() { // 声明 declaration } ``` ---- +---- - `Declaration` 声明函数名称、返回类型和参数 _(如果有)_ - `Definition` 函数体 _(要执行的代码)_ ---- +---- ```c // 函数声明 @@ -949,7 +946,7 @@ printf("%f", floor(1.4)); // 四舍五入 (舍) printf("%f", pow(4, 3)); // x(4)的y(3)次方 ``` ---- +---- - `abs(x)` 绝对值 - `acos(x)` 反余弦值 @@ -1304,16 +1301,21 @@ void main (){ - 安装 [`Docker`](./docker.md) - 创建 [`Dockerfile`](./dockerfile.md) 文件 + ```dockerfile FROM alpine:3.14 RUN apk add --no-cache gcc musl-dev RUN apk add --no-cache g++ ``` + - 生成本地 myalpine 镜像 + ```bash docker build -t myalpine . ``` + - 运行映像,把当前路径 `($PWD)` 映射至容器的 `/test` 目录,用 `gcc` 编译程序,`exit`返回 + ```bash docker run -it -v $PWD:/test myalpine root@b1a38bd7107a:/# cd test @@ -1324,8 +1326,7 @@ void main (){ ``` - 另见 --- -- [C 教程](https://jaywcjlove.github.io/c-tutorial) _(jaywcjlove.github.io)_ \ No newline at end of file +- [C 教程](https://jaywcjlove.github.io/c-tutorial) _(jaywcjlove.github.io)_ diff --git a/docs/cargo.md b/docs/cargo.md index 8111d17e2d1..b62730379ca 100644 --- a/docs/cargo.md +++ b/docs/cargo.md @@ -265,7 +265,7 @@ $ cargo install --path . $ cargo install --list ``` ----- +--- - `--vers version` - `--version version` 指定要安装的版本 @@ -314,13 +314,13 @@ $ cargo uninstall ripgrep $ cargo login [options] [token] ``` ----- +--- :-|:- :-|:- `--registry` | 要使用的注册表的名称 ----- +--- :-|:- :-|:- @@ -338,7 +338,8 @@ $ cargo owner --add username foo # 从包中删除所有者: $ cargo owner --remove username foo ``` ----- + +--- :-|:- :-|:- @@ -356,7 +357,7 @@ $ cargo owner --remove username foo 编译选项 -- `--target triple` 为指定架构执行 Package +- `--target triple` 为指定架构执行 Package - `--target-dir directory` 用于存放生成的工件以及中间文件的目录 特性选择 @@ -383,7 +384,7 @@ $ cargo owner --remove username foo $ cargo package [options] ``` ----- +--- - `-l`, `--list` 输出包中包含的文件(不实际进行打包)。 - `--no-verify` 构建包时不进行校验。 @@ -428,4 +429,4 @@ $ cargo yank --vers 1.0.7 foo --- - [The Cargo Book](https://doc.rust-lang.org/stable/cargo/) _(doc.rust-lang.org)_ -- [Cargo 手册 中文版](https://www.rustwiki.org.cn/zh-CN/cargo/index.html) _(rustwiki.org.cn)_ \ No newline at end of file +- [Cargo 手册 中文版](https://www.rustwiki.org.cn/zh-CN/cargo/index.html) _(rustwiki.org.cn)_ diff --git a/docs/chmod.md b/docs/chmod.md index f825da143eb..0a06106c484 100644 --- a/docs/chmod.md +++ b/docs/chmod.md @@ -107,7 +107,6 @@ d rwx r-x r-x | `a` | 全部,和 ugo 一样 | - ### 权限 | 缩写 | 权限 | 值 | @@ -138,7 +137,6 @@ Chmod 示例 | `-` | 删除 | | `=` | 设置 | - ### chmod 600 ```shell @@ -504,4 +502,4 @@ $ find /path -type f -exec chmod 644 {} \; return perm_num; } -``` \ No newline at end of file +``` diff --git a/docs/cmake.md b/docs/cmake.md index 3359ac3b2f6..08092c8ac81 100644 --- a/docs/cmake.md +++ b/docs/cmake.md @@ -111,4 +111,4 @@ $ cmake --help[-] 另见 ---- -- [CMake Examples](http://ttroy50.github.io/cmake-examples/) _(ttroy50.github.io)_ \ No newline at end of file +- [CMake Examples](http://ttroy50.github.io/cmake-examples/) _(ttroy50.github.io)_ diff --git a/docs/colors-named.md b/docs/colors-named.md index ed36b0938c6..61829d19a8b 100644 --- a/docs/colors-named.md +++ b/docs/colors-named.md @@ -6,6 +6,8 @@ CSS 定义了一大组[命名颜色](https://www.w3.org/TR/css-color-4/#named-co Named Colors --- + + ### 颜色列表 @@ -760,7 +762,6 @@ HSL 颜色示例 - ### 150° Green-Cyans @@ -880,7 +881,6 @@ HSL 颜色示例 - ### 180° Cyans @@ -1000,7 +1000,6 @@ HSL 颜色示例 - ### 210° Cyan-Blues @@ -1120,7 +1119,6 @@ HSL 颜色示例 - ### 240° blues @@ -1240,7 +1238,6 @@ HSL 颜色示例 - ### 270° Blue-Magentas @@ -1360,7 +1357,6 @@ HSL 颜色示例 - ### 300° Magentas @@ -1480,7 +1476,6 @@ HSL 颜色示例 - ### 330° Magenta-Reds @@ -1600,9 +1595,8 @@ HSL 颜色示例 - 另见 ---- - [CSS 备忘清单](./css.md) -- [Named Colors](https://www.w3.org/TR/css-color-4/#named-colors) _(w3.org)_ \ No newline at end of file +- [Named Colors](https://www.w3.org/TR/css-color-4/#named-colors) _(w3.org)_ diff --git a/docs/conan.md b/docs/conan.md index ad5ffadfc70..eaa96252936 100644 --- a/docs/conan.md +++ b/docs/conan.md @@ -209,7 +209,6 @@ $ conan inspect boost/1.74.0 请参阅 [conan get](https://docs.conan.io/en/latest/reference/commands/consumer/get.html) 和 [conan inspect](https://docs.conan.io/en/latest/reference/commands/misc/inspect.html) 参考 - ### Lockfiles 创建一个锁文件: diff --git a/docs/cron.md b/docs/cron.md index 45414dc5e4b..8ea542730ae 100644 --- a/docs/cron.md +++ b/docs/cron.md @@ -1,7 +1,6 @@ Cron 备忘清单 === - [Cron](https://en.wikipedia.org/wiki/Cron) 最适合安排重复性任务。 可以使用关联的 at 实用程序来完成一次性任务的调度。 Crontab 格式 @@ -27,7 +26,7 @@ Min Hour Day Mon Weekday └───────────────────── 分钟 (0..59) ``` ------- +------- | 字段 | 范围 | 特殊字符 | |--------------|--------|--------------------| @@ -38,7 +37,6 @@ Min Hour Day Mon Weekday | 星期几 | 0 - 6 | , - * ? / L # | - ### 示例 | Example | Description | @@ -56,7 +54,6 @@ Min Hour Day Mon Weekday | `0 0 0 1 1 *` | 每年 1 月 1 日(每年) | | `@reboot` | 每次重启 _(非标准)_ | - ### 特殊字符串 | 特殊字符串 | 意义 | @@ -64,14 +61,13 @@ Min Hour Day Mon Weekday | @reboot | 运行一次,在系统启动时 _(非标准)_ | | @yearly | 每年运行一次,“0 0 1 1 *” _(非标准)_ | | @annually | (与@yearly 相同)_(非标准)_ | -| @monthly | 每月运行一次,“0 0 1 * *” _(非标准)_ | -| @weekly | 每周运行一次,“0 0 * * 0” _(非标准)_ | -| @daily | 每天运行一次,“0 0 * * *” _(非标准)_ | +| @monthly | 每月运行一次,“0 0 1 \* \*” _(非标准)_ | +| @weekly | 每周运行一次,“0 0 \* \* 0” _(非标准)_ | +| @daily | 每天运行一次,“0 0 \* \* \*” _(非标准)_ | | @midnight | (与@daily 相同)_(非标准)_ | -| @hourly | 每小时运行一次,“0 * * * *” _(非标准)_ | +| @hourly | 每小时运行一次,“0 \* \* \* \*” _(非标准)_ | - ### Crontab 命令 | - | - | @@ -82,7 +78,6 @@ Min Hour Day Mon Weekday | `crontab -v` | 显示您上次编辑 crontab 文件的时间。 _(非标准)_ | | `echo "@reboot echo hi" | crontab` | 轻松添加任务 | - ### 特殊字符 @@ -97,9 +92,8 @@ Min Hour Day Mon Weekday `问号(?)` | 可以代替“*”并允许用于月份和星期几。使用仅限于 cron 表达式中的 `月份中的某天` 或 `星期几`。 - ## Also see * [Devhints](https://devhints.io/cron) _(devhints.io)_ * [Crontab Generator](https://crontab-generator.org/) _(crontab-generator.org)_ -* [Crontab guru](https://crontab.guru/) _(crontab.guru)_ \ No newline at end of file +* [Crontab guru](https://crontab.guru/) _(crontab.guru)_ diff --git a/docs/css.md b/docs/css.md index 53e4b3d98ab..e1de45eb9d1 100644 --- a/docs/css.md +++ b/docs/css.md @@ -149,14 +149,14 @@ div { } ``` -查看: [Flexbox](#css-flexbox) | [Flex Tricks](#css-flexbox-tricks) +查看: [Flexbox](#css-flexbox) | [Flex Tricks](#css-flexbox-技巧) ### Grid 布局 ```css #container { display: grid; - grid: repeat(2, 60px) / auto-flow 80px; +s grid: repeat(2, 60px) / auto-flow 80px; } #container > div { background-color: #8ca0ff; @@ -165,7 +165,7 @@ div { } ``` -查看: [Grid Layout](#css-grid-layout) +查看: [Grid Layout](#grid-布局) ### 变量和计数器 @@ -244,7 +244,6 @@ p:first-child { 另见: [元素](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Type_selectors) / [类](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Class_selectors) / [ID](https://developer.mozilla.org/zh-CN/docs/Web/CSS/ID_selectors) / [通配](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Universal_selectors) 选择器 - ### 组合器 选择器 | 说明 @@ -277,10 +276,10 @@ p:first-child { 选择器 | 说明 :- | :- -`a:link ` | 链接正常 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/:link) -`a:active ` | 链接处于点击状态 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/:active) -`a:hover ` | 鼠标悬停链接 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/:hover) -`a:visited ` | 访问链接 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/:visited) +`a:link` | 链接正常 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/:link) +`a:active` | 链接处于点击状态 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/:active) +`a:hover` | 鼠标悬停链接 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/:hover) +`a:visited` | 访问链接 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/:visited) --- @@ -367,12 +366,12 @@ CSS 字体 `font-family:` | 字体族名或通用字体族名 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-family) `font-size:` | 字体的大小 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-size) `letter-spacing:` | 文本字符的间距 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/letter-spacing) -`line-height:` | 多行文本间距 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/line-height) -`font-weight:` | 粗细程度 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-weight) -`font-style:` | 字体样式 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-style) -`text-decoration:` | 文本的修饰线外观 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/text-decoration) -`text-align:` | 相对它的块父元素对齐 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/text-align) -`text-transform:` | 指定文本大小写 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/text-transform) +`line-height:` | 多行文本间距 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/line-height) +`font-weight:` | 粗细程度 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-weight) +`font-style:` | 字体样式 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-style) +`text-decoration:` | 文本的修饰线外观 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/text-decoration) +`text-align:` | 相对它的块父元素对齐 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/text-align) +`text-transform:` | 指定文本大小写 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/text-transform) 另见: [Font](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font) @@ -488,8 +487,8 @@ CSS 背景 属性 | 说明 :- | :- -`background:` | _([速记](#速记-1))_ -`background-color:` | 查看: [Colors](#css-颜色) +`background:` | _([速记](#速记-1))_ +`background-color:` | 查看: [Colors](#css-颜色) `background-image:` | 一个或者多个背景图像 `background-position:` | 背景图片设置初始位置 `background-size:` | 背景图片大小 @@ -555,7 +554,7 @@ CSS 盒子模型 另见: [box-sizing](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Box-sizing) -### 能见度 +### 能见度 ```css .invisible-elements { @@ -565,7 +564,6 @@ CSS 盒子模型 另见: [Visibility](https://developer.mozilla.org/zh-CN/docs/Web/CSS/visibility) - ### Auto 关键字 ```css @@ -577,7 +575,6 @@ div { 另见: [边距(margin)](https://developer.mozilla.org/zh-CN/docs/Web/CSS/margin) - ### 溢出(Overflow) ```css @@ -607,7 +604,7 @@ animation: bounce 300ms linear 100ms infinite alternate-reverse 属性 | 说明 :- | :- -`animation:` | _([速记](#速记-2))_ +`animation:` | _([速记](#速记-2))_ `animation-name:` | 动画名 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/animation-name) `animation-duration:` | 动画周期的时长 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/animation-duration) `animation-timing-function:` | 缓动函数 [#](https://developer.mozilla.org/zh-CN/docs/Web/CSS/animation-timing-function) @@ -804,7 +801,7 @@ flex-wrap: nowrap | wrap | wrap-reverse; flex-direction: row | row-reverse | column | column-reverse; ``` ----- +--- ```bash ╭┈┈╮ ▲ ╭┈┈╮ ┆ @@ -825,7 +822,7 @@ column-reverse column row row-reverse align-items: flex-start | flex-end | center | baseline | stretch; ``` ----- +--- ```css ▶ flex-start(起点对齐) ▶ flex-end(终点对齐) @@ -863,7 +860,7 @@ align-content: flex-start | flex-end | center | space-between | space-around | s ``` ----- +--- ```css ▶ flex-start(起点对齐) ▶ flex-end(终点对齐) @@ -903,7 +900,7 @@ align-content: flex-start | flex-end | center | space-between | space-around | s } ``` ----- +--- ```css ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ @@ -927,7 +924,7 @@ align-content: flex-start | flex-end | center | space-between | space-around | s } ``` ----- +--- ```css ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ @@ -983,7 +980,6 @@ CSS Flexbox 技巧 ### 移动布局 - ```css .container { display: flex; @@ -1069,7 +1065,7 @@ CSS Grid 网格布局 ### CSS 网格行 -CSS 语法: +CSS 语法: - grid-row: grid-row-start / grid-row-end; @@ -1128,7 +1124,7 @@ grid-row-gap: length; ### grid-row-start & grid-row-end -CSS 语法: +CSS 语法: - grid-row-start: auto|row-line; - grid-row-end: auto|row-line|span n; @@ -1166,7 +1162,6 @@ grid-row-end: span 2; } ``` - ### Justify Self ```css @@ -1376,7 +1371,6 @@ a[href^="http"]:empty::before { 如果 `` 标签里面没有内容,将 `href` 的值作为内容展示 - ### 使用 :root 表示灵活类型 @@ -1429,7 +1423,6 @@ div { 通过样式来控制一个元素 `div` 是否可以编辑 - 另见 --------- @@ -1440,4 +1433,4 @@ div { - [CSS Tricks: A Complete Guide to Grid](https://css-tricks.com/snippets/css/complete-guide-grid/) - [Browser support](https://caniuse.com/#feat=css-grid) - [Flex 布局教程:语法篇](https://www.ruanyifeng.com/blog/2015/07/flex-grammar.html?utm_source=tuicool) -- [CSS 专业技巧](https://github.com/AllThingsSmitty/css-protips/tree/master/translations/zh-CN) \ No newline at end of file +- [CSS 专业技巧](https://github.com/AllThingsSmitty/css-protips/tree/master/translations/zh-CN) diff --git a/docs/curl.md b/docs/curl.md index 7cd6d9a5104..7fbecc2c9c7 100644 --- a/docs/curl.md +++ b/docs/curl.md @@ -13,7 +13,6 @@ Curl 是一种在服务器之间传输数据的工具,支持协议,包括 HT - [Curl GitHub 源码仓库](https://github.com/curl/curl) _(github.com)_ - [Curl 官方网站](https://curl.se/) _(curl.se)_ - ### Options @@ -151,9 +150,9 @@ curl -sSL https://get.rvm.io | bash 命令 | 说明 :- | :- `curl -L -s http://ipecho.net/plain, curl -L -s http://whatismijnip.nl` | 获取我的公共 `IP` -`curl -u $username:$password http://repo.dennyzhang.com/README.txt` | 带凭证的 `curl` +`curl -u $username:$password http://repo.dennyzhang.com/README.txt` | 带凭证的 `curl` `curl -v -F key1=value1 -F upload=@localfilename ` | `curl` 上传 -`curl -k -v --http2 https://www.google.com/` | 使用 http2 curl +`curl -k -v --http2 https://www.google.com/` | 使用 http2 curl `curl -T cryptopp552.zip -u test:test ftp://10.32.99.187/` | curl `ftp` 上传 `curl -u test:test ftp://10.32.99.187/cryptopp552.zip -o cryptopp552.zip` | curl `ftp` 下载 `curl -v -u admin:admin123 --upload-file package1.zip http://mysever:8081/dir/package1.zip` | 使用凭证 `curl` 上传 @@ -282,4 +281,4 @@ curl -K file # 从文件中读取配置 curl --config file $HOME/.curlrc # 类 UNIX 系统中的默认配置文件 -``` \ No newline at end of file +``` diff --git a/docs/djiango.md b/docs/djiango.md index a97cbf00174..ac58a1db2dc 100644 --- a/docs/djiango.md +++ b/docs/djiango.md @@ -17,17 +17,20 @@ $ pip --version ``` -如果你没有安装 PIP,你可以从这个页面下载并安装它:https://pypi.org/project/pip/ +如果你没有安装 PIP,你可以从这个页面下载并安装它: ### 入门 - 创建虚拟环境 + ```bash $ py -m venv myproject # Windows $ python -m venv myproject # Unix/MacOS ``` + - 其中包含子文件夹和文件,如下所示 + ```bash myproject ├┈Include @@ -35,21 +38,27 @@ $ pip --version ├┈Scripts ╰┈pyvenv.cfg ``` + - 以下命令来激活环境 + ```bash # Windows: myproject\Scripts\activate.bat # Unix/MacOS: source myproject/bin/activate ``` + - 提示符中看到以下结果: + ```bash # Windows: (myproject) C:\Users\Your Name> # Unix/MacOS: (myproject) ... $ ``` + - 安装 Django + ```bash # Windows: (myproject) C:\Users\Name>py -m pip install Django @@ -248,7 +257,7 @@ INSTALLED_APPS = [ ] ``` -然后运行这个命令: +然后运行这个命令: ```bash $ py manage.py migrate @@ -417,7 +426,7 @@ def testing(request): - `forloop.counter0` 当前循环,从 0 开始 - `forloop.first` 循环是否在其第一次循环中 - `forloop.last` 循环是否在其最后一次循环中 -- `forloop.parentloop` +- `forloop.parentloop` - `forloop.revcounter` 如果从末尾开始并向后计数,则以 1 结束 - `forloop.revcounter0` 如果从末尾开始并向后计数,则以 0 结束 @@ -543,7 +552,7 @@ What is your name?{% endfilter %} ### 导入模板传入变量 -`mymenu.html`: +`mymenu.html`: ```django
HOME | {{ me }} | ABOUT | FORUM | {{ sponsor }}
@@ -762,9 +771,6 @@ function myFunction() { ``` - - - 另见 ---- @@ -772,4 +778,4 @@ function myFunction() { - [Django 教程](https://www.runoob.com/django/django-tutorial.html) _(runoob.com)_ - [Django 框架教程](http://c.biancheng.net/django/) _(biancheng.net)_ - [Django 4 中文教程](https://www.w3cschool.cn/django4/) _(w3cschool.cn)_ -- [Django Tutorial](https://www.w3schools.com/django/index.php) _(w3schools.com)_ \ No newline at end of file +- [Django Tutorial](https://www.w3schools.com/django/index.php) _(w3schools.com)_ diff --git a/docs/docker.md b/docs/docker.md index a019903de8b..12733e53227 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -21,7 +21,6 @@ $ docker run -d -p 80:80 docker/getting-started - `-p 80:80` - 将端口 80 映射到容器中的端口 80 - `docker/getting-started` - 要使用的镜像 - 在前台创建并运行容器 ```shell @@ -86,7 +85,6 @@ Docker 容器 `docker stats nginx-server` | 容器资源使用 `docker diff nginx-server` | 列出对容器所做的更改 - ### 创建容器 ```shell @@ -235,9 +233,9 @@ docker network create -d overlay \ | Docker 语法 | 说明 | |------------|------| `docker search search_word` | 在 docker hub 中搜索镜像。 -`docker pull user/image ` | 从 docker hub 下载镜像。 -`docker login ` | 向 docker hub 进行身份验证 -`docker push user/image ` | 将镜像上传到 docker hub。 +`docker pull user/image` | 从 docker hub 下载镜像。 +`docker login` | 向 docker hub 进行身份验证 +`docker push user/image` | 将镜像上传到 docker hub。 ### 镜像仓库命令 @@ -359,8 +357,8 @@ $ docker volume prune ### docker 主要命令 -:- | :- -:- | :- +:- | :- +:- | :- `attach` | 将本地标准输入、输出和错误流附加到正在运行的容器 `build` | 从 Dockerfile 构建镜像 `commit` | 从容器的更改创建新图像 @@ -527,8 +525,8 @@ $ docker volume prune ### docker 管理命令 -:- | :- -:- | :- +:- | :- +:- | :- `docker builder` | 管理构建 `docker buildx*` | Docker Buildx(Docker Inc.,v0.7.1) `docker compose*` | Docker Compose(Docker Inc.,v2.2.3) @@ -625,8 +623,8 @@ $ docker run --name my-nginx \ ```bash $ docker run --name my-postgres \ -e POSTGRES_PASSWORD=mysecretpassword \ - -e PGDATA=/var/lib/postgresql/data/pgdata \ - -v $HOME/nginx/mount:/var/lib/postgresql/data \ + -e PGDATA=/var/lib/postgresql/data/pgdata \ + -v $HOME/nginx/mount:/var/lib/postgresql/data \ -d postgres ``` @@ -662,4 +660,4 @@ $ 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)_ \ No newline at end of file +- [Docker入门学习笔记](https://jaywcjlove.github.io/docker-tutorial) _(github.io)_ diff --git a/docs/dockerfile.md b/docs/dockerfile.md index c5321415367..fed7c2f2822 100644 --- a/docs/dockerfile.md +++ b/docs/dockerfile.md @@ -232,4 +232,4 @@ CMD ["/busybox", "httpd", "-f", "-v", "-p", "3000", "-c", "httpd.conf"] - [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) _(docker.com)_ - [Docker 备忘清单](./docker.md) _(github.io)_ -- [Docker入门学习笔记](https://jaywcjlove.github.io/docker-tutorial) _(github.io)_ \ No newline at end of file +- [Docker入门学习笔记](https://jaywcjlove.github.io/docker-tutorial) _(github.io)_ diff --git a/docs/electron.md b/docs/electron.md index 53e2f641012..22aa3c81e0e 100644 --- a/docs/electron.md +++ b/docs/electron.md @@ -3,7 +3,6 @@ Electron 备忘清单 此快速参考备忘单提供了 Electron v21 API 说明和使用示例。 - 入门 ---- @@ -15,11 +14,14 @@ Electron 备忘清单 #### 创建你的应用程序 - 安装 + ```bash mkdir my-app && cd my-app npm init ``` + 在项目根目录会生成 `package.json` + ```json { "name": "my-app", @@ -30,22 +32,30 @@ Electron 备忘清单 "license": "MIT" } ``` + - 安装依赖包 + ```bash npm install --save-dev electron ``` + - 添加开发模式打开您的应用命令 + ```js "scripts": { "start": "electron ." } ``` + - 运行命令,启动应用程序 + ```bash npm start ``` + 入口都是 `main` 文件。这个文件控制了主进程,它运行在一个完整的Node.js环境中 - 创建 `index.html` 页面 + ```html @@ -60,7 +70,9 @@ Electron 备忘清单 ``` + - 窗口中打开您的页面 + ```js const { app, @@ -385,8 +397,8 @@ BrowserWindow `useContentSize` _boolean_ | _(宽)_ 和 _(高)_ 设置为web页面的尺寸。默认值 _(false)_ `center` _boolean_ | 窗口是否在屏幕居中。默认值 _(false)_ `minHeight` _整数_ | 窗口的最小高度。默认值 _(0)_ -`maxWidth ` _整数_ | 窗口的最大宽度。默认值不限 -`maxHeight ` _整数_ | 窗口的最大高度。默认值不限 +`maxWidth` _整数_ | 窗口的最大宽度。默认值不限 +`maxHeight` _整数_ | 窗口的最大高度。默认值不限 `resizable` _boolean_ | 窗口大小是否可调整。默认值 _(true)_ `movable` _boolean_ _(win/mac)_ | 窗口是否可移动。默认值 _(true)_ `minimizable` _boolean_ _(win/mac)_ | 窗口是否可最小化。默认值 _(true)_ @@ -417,14 +429,14 @@ BrowserWindow `transparent` _boolean_ | 使窗口
透明。 默认值 _(false)_. 在Windows上,仅在无边框窗口下起作用。 `type` _string_ | 窗口的类型, 默认为普通窗口. 更多信息见下文 `visualEffectState` _string_ _(mac)_ | 在 macOS 上指定外观应如何响应窗口活动状态。 必须与 _(vibrancy)_ 属性一起使用。 可能的值有 -` visualEffectState.followWindow` | 当窗口处于激活状态时,后台应自动显示为激活状态,当窗口处于非激活状态时,后台应自动显示为非激活状态。 默认为该值。 -` visualEffectState.active` | 后台应一直显示为激活状态。 -` visualEffectState.inactive` | 后台应一直显示为非激活状态。 +`visualEffectState.followWindow` | 当窗口处于激活状态时,后台应自动显示为激活状态,当窗口处于非激活状态时,后台应自动显示为非激活状态。 默认为该值。 +`visualEffectState.active` | 后台应一直显示为激活状态。 +`visualEffectState.inactive` | 后台应一直显示为非激活状态。 `titleBarStyle` _string_ _(win/mac)_ | 窗口标题栏样式。默认值 _(default)_ -` titleBarStyle.default` | 分别返回 _mac_ 或者 _win_ 的标准标题栏 -` titleBarStyle.hidden` | 在一个隐藏的标题栏和一个全尺寸大小的内容窗口中取得结果。 在 macOS 内, 窗口将一直拥有位于左上的标准窗口控制器 _(“traffic lights”)_。 在 Windows上,当与 _(titleBarOverlay: true)_ 合并时,它将激活窗口控件叠加(详情请参阅 _(titleBarOverlay)_),否则将不会显示窗口控件。 -` titleBarStyle.hiddenInset` _(mac)_ | 隐藏标题栏,使用窗口边缘稍微小的红绿灯按钮替代。 -` titleBarStyle.customButtonsOnHover` _(mac)_ | 隐藏的标题栏的全尺寸的内容窗口, 红绿灯按钮在鼠标悬停在窗口左上方时显示。**注意:**此选项目前是实验性的。 +`titleBarStyle.default` | 分别返回 _mac_ 或者 _win_ 的标准标题栏 +`titleBarStyle.hidden` | 在一个隐藏的标题栏和一个全尺寸大小的内容窗口中取得结果。 在 macOS 内, 窗口将一直拥有位于左上的标准窗口控制器 _(“traffic lights”)_。 在 Windows上,当与 _(titleBarOverlay: true)_ 合并时,它将激活窗口控件叠加(详情请参阅 _(titleBarOverlay)_),否则将不会显示窗口控件。 +`titleBarStyle.hiddenInset` _(mac)_ | 隐藏标题栏,使用窗口边缘稍微小的红绿灯按钮替代。 +`titleBarStyle.customButtonsOnHover` _(mac)_ | 隐藏的标题栏的全尺寸的内容窗口, 红绿灯按钮在鼠标悬停在窗口左上方时显示。**注意:**此选项目前是实验性的。 `trafficLightPosition` _Point_ _(mac)_ | 在无边框窗口中设置灯绿灯按钮位置。 `roundedCorners` _boolean_ _(mac)_ | 无边框窗口在 macOS 上,是否应该有圆角。 默认值为 _(true)_。 属性设置为 _(false)_ ,将阻止窗口是可全屏的。 ~~`fullscreenWindowTitle`~~ _boolean_ _(mac)_ ~~_已弃用_~~ | _titleBarStyle_ 设置为 _(hiddenInset)_ 时,在 macOS 全屏模式下标题栏显示标题。默认值为 _(false)_. @@ -433,34 +445,34 @@ BrowserWindow `zoomToPageWidth` _boolean_ _(mac)_ | 在 macOS 上控制,当按住 option 点击工具栏绿色红绿灯按钮或点击窗口 > 放大菜单项的行为。 如果为 _(true)_,窗口为将会缩放到适合宽度,若为 _(false)_ 将会放大到屏幕宽度。 这也会影响,直接调用 _(maximize())_ 的行为。 默认值为 _(false)_. `tabbingIdentifier` _string_ _(mac)_ | 选项卡组名称,允许在原生选择卡中打开窗口,macOS 10.12+ 支持。 Windows 中,有相同选项卡标识的将会组合在一起。 这会添加一个原生新增选项卡按钮到你窗口的选项卡栏,同时 _(app)_ 和窗口允许接收 _(new-window-for-tab)_ 事件。 `webPreferences` _Object_ | 网页功能设置。 -` webPreferences.devTools` _boolean_ | 是否开启 DevTools. 如果设置为 _(false)_, 则无法使用 _(BrowserWindow.webContents.openDevTools ())_ 打开 DevTools。 默认值为 _(true)_。 -` webPreferences.nodeIntegration` _boolean_ | 是否启用Node integration. 默认值为 _(false)_. -` webPreferences.nodeIntegrationInWorker` _boolean_ | 是否在Web工作器中启用了Node集成. 默认值为 _(false)_. 更多内容参见 [多线程](https://www.electronjs.org/docs/latest/tutorial/multithreading) -` webPreferences.nodeIntegrationInSubFrames` _boolean_ **_实验性_**| 是否允许在子页面(iframe)或子窗口(child window)中集成Node.js; 预先加载的脚本会被注入到每一个iframe,你可以用 _(process.isMainFrame)_ 来判断当前是否处于主框架(main frame)中。 -` webPreferences.preload` _string_ | 在页面运行其他脚本之前预先加载指定的脚本 无论页面是否集成Node, 此脚本都可以访问所有Node API 脚本路径为文件的绝对路径。 当 node integration 关闭时, 预加载的脚本将从全局范围重新引入node的全局引用标志[参考示例](https://www.electronjs.org/docs/latest/api/context-bridge#exposing-node-global-symbols) -` webPreferences.sandbox` _boolean_ | 如果设置该参数, 沙箱的渲染器将与窗口关联, 使它与Chromium OS-level 的沙箱兼容, 并禁用 Node. js 引擎。 它与 _(nodeIntegration)_ 的选项不同,且预加载脚本的 API 也有限制。[更多详情](https://www.electronjs.org/docs/latest/tutorial/sandbox) -` webPreferences.session` | [Session](https://www.electronjs.org/docs/latest/api/session#class-session) 设置页面的 session 而不是直接忽略 Session 对象, 也可用 _(partition)_ 选项来代替,它接受一个 partition 字符串. 同时设置了_(session)_ 和 _(partition)_时, _(session)_ 的优先级更高. 默认使用默认的 session. -` webPreferences.partition` | string (optional) - 通过 session 的 partition 字符串来设置界面session. 如果 _(partition)_ 以 _(persist:)_开头, 该页面将使用持续的 session,并在所有页面生效,且使用同一个_(partition)_. 如果没有 _(persist:)_ 前缀, 页面将使用 in-memory session. 通过分配相同的 _(partition)_, 多个页可以共享同一会话。 默认使用默认的 session. -` webPreferences.zoomFactor` _number_ | 页面的默认缩放系数, _(3.0)_ 表示 _(300%)_。 默认值为 _(1.0)_. -` webPreferences.javascript` _boolean_ | 是否启用 JavaScript 支持。 默认值为 _(true)_。 -` webPreferences.webSecurity` _boolean_ | 当设置为 _(false)_, 它将禁用同源策略 (通常用来测试网站), 如果此选项不是由开发者设置的,还会把 _(allowRunningInsecureContent)_设置为 _(true)_. 默认值为 _(true)_ -` webPreferences.allowRunningInsecureContent` _boolean_ | 允许一个 https 页面运行来自http url的JavaScript, CSS 或 plugins。 默认值为 _(false)_ -` webPreferences.images` _boolean_ | 允许加载图片。 默认值为 _(true)_ -` webPreferences.imageAnimationPolicy` _string_ | 指定如何运行图像动画 (比如: GIF等). 可以是 _(animate)_, _(animateOnce)_ 或 _(noAnimation)_。默认值为 _(animate)_ -` webPreferences.textAreasAreResizable` _boolean_ | 允许调整 TextArea 元素大小。 默认值为 _(true)_ -` webPreferences.webgl` _boolean_ | 启用 WebGL 支持。 默认值为 _(true)_ -` webPreferences.plugins` _boolean_ | 是否应该启用插件。 默认值为 _(false)_ -` webPreferences.experimentalFeatures` _boolean_ | 启用 Chromium 的实验功能。 默认值为 _(false)_ -` webPreferences.scrollBounce` _boolean_ _(mac)_ | 启用滚动回弹(橡皮筋)效果。 默认值为 _(false)_ -` webPreferences.enableBlinkFeatures`_string_ | 以 _(逗号)_ 分隔的需要启用的特性列表,譬如 _(CSSVariables,KeyboardEventKey)_ 在 [RuntimeEnabledFeatures.json5](https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/runtime_enabled_features.json5?l=70) 文件中查看被支持的所有特性 -` webPreferences.disableBlinkFeatures` _string_ | 以 _(,)_ 分隔的禁用特性列表, 如 _(CSSVariables,KeyboardEventKey)_ 在 [RuntimeEnabledFeatures.json5](https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/runtime_enabled_features.json5?l=70) 文件中查看被支持的所有特性 +`webPreferences.devTools` _boolean_ | 是否开启 DevTools. 如果设置为 _(false)_, 则无法使用 _(BrowserWindow.webContents.openDevTools ())_ 打开 DevTools。 默认值为 _(true)_。 +`webPreferences.nodeIntegration` _boolean_ | 是否启用Node integration. 默认值为 _(false)_. +`webPreferences.nodeIntegrationInWorker` _boolean_ | 是否在Web工作器中启用了Node集成. 默认值为 _(false)_. 更多内容参见 [多线程](https://www.electronjs.org/docs/latest/tutorial/multithreading) +`webPreferences.nodeIntegrationInSubFrames` _boolean_ **_实验性_**| 是否允许在子页面(iframe)或子窗口(child window)中集成Node.js; 预先加载的脚本会被注入到每一个iframe,你可以用 _(process.isMainFrame)_ 来判断当前是否处于主框架(main frame)中。 +`webPreferences.preload` _string_ | 在页面运行其他脚本之前预先加载指定的脚本 无论页面是否集成Node, 此脚本都可以访问所有Node API 脚本路径为文件的绝对路径。 当 node integration 关闭时, 预加载的脚本将从全局范围重新引入node的全局引用标志[参考示例](https://www.electronjs.org/docs/latest/api/context-bridge#exposing-node-global-symbols) +`webPreferences.sandbox` _boolean_ | 如果设置该参数, 沙箱的渲染器将与窗口关联, 使它与Chromium OS-level 的沙箱兼容, 并禁用 Node. js 引擎。 它与 _(nodeIntegration)_ 的选项不同,且预加载脚本的 API 也有限制。[更多详情](https://www.electronjs.org/docs/latest/tutorial/sandbox) +`webPreferences.session` | [Session](https://www.electronjs.org/docs/latest/api/session#class-session) 设置页面的 session 而不是直接忽略 Session 对象, 也可用 _(partition)_ 选项来代替,它接受一个 partition 字符串. 同时设置了_(session)_ 和 _(partition)_时, _(session)_ 的优先级更高. 默认使用默认的 session. +`webPreferences.partition` | string (optional) - 通过 session 的 partition 字符串来设置界面session. 如果 _(partition)_ 以 _(persist:)_开头, 该页面将使用持续的 session,并在所有页面生效,且使用同一个_(partition)_. 如果没有 _(persist:)_ 前缀, 页面将使用 in-memory session. 通过分配相同的 _(partition)_, 多个页可以共享同一会话。 默认使用默认的 session. +`webPreferences.zoomFactor` _number_ | 页面的默认缩放系数, _(3.0)_ 表示 _(300%)_。 默认值为 _(1.0)_. +`webPreferences.javascript` _boolean_ | 是否启用 JavaScript 支持。 默认值为 _(true)_。 +`webPreferences.webSecurity` _boolean_ | 当设置为 _(false)_, 它将禁用同源策略 (通常用来测试网站), 如果此选项不是由开发者设置的,还会把 _(allowRunningInsecureContent)_设置为 _(true)_. 默认值为 _(true)_ +`webPreferences.allowRunningInsecureContent` _boolean_ | 允许一个 https 页面运行来自http url的JavaScript, CSS 或 plugins。 默认值为 _(false)_ +`webPreferences.images` _boolean_ | 允许加载图片。 默认值为 _(true)_ +`webPreferences.imageAnimationPolicy` _string_ | 指定如何运行图像动画 (比如: GIF等). 可以是 _(animate)_, _(animateOnce)_ 或 _(noAnimation)_。默认值为 _(animate)_ +`webPreferences.textAreasAreResizable` _boolean_ | 允许调整 TextArea 元素大小。 默认值为 _(true)_ +`webPreferences.webgl` _boolean_ | 启用 WebGL 支持。 默认值为 _(true)_ +`webPreferences.plugins` _boolean_ | 是否应该启用插件。 默认值为 _(false)_ +`webPreferences.experimentalFeatures` _boolean_ | 启用 Chromium 的实验功能。 默认值为 _(false)_ +`webPreferences.scrollBounce` _boolean_ _(mac)_ | 启用滚动回弹(橡皮筋)效果。 默认值为 _(false)_ +`webPreferences.enableBlinkFeatures`_string_ | 以 _(逗号)_ 分隔的需要启用的特性列表,譬如 _(CSSVariables,KeyboardEventKey)_ 在 [RuntimeEnabledFeatures.json5](https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/runtime_enabled_features.json5?l=70) 文件中查看被支持的所有特性 +`webPreferences.disableBlinkFeatures` _string_ | 以 _(,)_ 分隔的禁用特性列表, 如 _(CSSVariables,KeyboardEventKey)_ 在 [RuntimeEnabledFeatures.json5](https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/runtime_enabled_features.json5?l=70) 文件中查看被支持的所有特性 `defaultFontFamily` _Object_ | 为 font-family 设置默认字体 -` defaultFontFamily.standard` _string_ |默认值为 _(Times New Roman)_ -` defaultFontFamily.serif` _string_ | 默认值为 _(Times New Roman)_ -` defaultFontFamily.sansSerif` _string_ | 默认值为 _(Arial)_ -` defaultFontFamily.monospace` _string_ | 默认值为 _(Courier New)_ -` defaultFontFamily.cursive` _string_ | 默认值为 _(Script)_ -` defaultFontFamily.fantasy` _string_ | 默认值为 _(Impact)_ +`defaultFontFamily.standard` _string_ |默认值为 _(Times New Roman)_ +`defaultFontFamily.serif` _string_ | 默认值为 _(Times New Roman)_ +`defaultFontFamily.sansSerif` _string_ | 默认值为 _(Arial)_ +`defaultFontFamily.monospace` _string_ | 默认值为 _(Courier New)_ +`defaultFontFamily.cursive` _string_ | 默认值为 _(Script)_ +`defaultFontFamily.fantasy` _string_ | 默认值为 _(Impact)_ `defaultFontSize` _Integer_ | 默认值为 _(16)_ `defaultMonospaceFontSize` _Integer_ | 默认值为 _(13)_ `minimumFontSize` _Integer_ | 默认值为 _(0)_ @@ -480,10 +492,10 @@ BrowserWindow `spellcheck` _boolean_ | 是否启用内置拼写检查器。 默认值为 _(true)_ `enableWebSQL` _boolean_ | 是否启用 [WebSQL api](https://www.w3.org/TR/webdatabase/)。 默认值为 _(true)_ `v8CacheOptions` _string_ | 强制 blink 使用 v8 代码缓存策略。 可接受的值为: -` v8CacheOptions.none` | 禁用代码缓存 -` v8CacheOptions.code` | 基于启发式代码缓存 -` v8CacheOptions.bypassHeatCheck` | 绕过启发式代码缓存,但使用懒编译。 -` v8CacheOptions.bypassHeatCheckAndEagerCompile` | 与上面相同,除了编译是及时的。 默认策略是 _(code)_ +`v8CacheOptions.none` | 禁用代码缓存 +`v8CacheOptions.code` | 基于启发式代码缓存 +`v8CacheOptions.bypassHeatCheck` | 绕过启发式代码缓存,但使用懒编译。 +`v8CacheOptions.bypassHeatCheckAndEagerCompile` | 与上面相同,除了编译是及时的。 默认策略是 _(code)_ `enablePreferredSizeMode` _boolean_ | 是否启用首选大小模式。 首选大小是包含文档布局所需的最小大小--无需滚动。 启用该属性将导致在首选大小发生变化时,在 _(WebContents)_ 上触发 _(preferred-size-changed)_ 事件。默认值为 _(false)_ `titleBarOverlay` _Object/Boolean_ | 当在 macOS 使用无框窗口结合 _(win.setWindowButtonVisibility(true))_ 或使用 _(titleBarStyle)_ 以便标准窗口控制 (在 macOS为 "traffic lights") 可见,此属性将启用 Window Controls Overlay [JavaScript APIs](https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#javascript-apis) 和 [CSS Environment Variables](https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#css-environment-variables)。指定 _(true)_ 将导致覆盖默认系统颜色。 默认值为 _(false)_ `color` _String_ _(win)_ | 启用窗口控制时覆盖面的 CSS 颜色 默认是系统颜色 @@ -684,7 +696,6 @@ child.once('ready-to-show', () => { `win.setTitleBarOverlay(options)` _(win)_ | 在已开启 Window Controls Overlay 的窗口上,此方法将更新标题栏叠加层的样式 [#](https://www.electronjs.org/zh/docs/latest/api/browser-window#winsettitlebaroverlayoptions-windows) - ### 静态方法 @@ -735,4 +746,4 @@ win.loadURL('https://github.com') 另见 --- -- [Electron 备忘清单](https://simulatedgreg.github.io/electron-cheatsheet/) _(simulatedgreg.github.io)_ \ No newline at end of file +- [Electron 备忘清单](https://simulatedgreg.github.io/electron-cheatsheet/) _(simulatedgreg.github.io)_ diff --git a/docs/emacs.md b/docs/emacs.md index fe0736d97f2..1190092a1a4 100644 --- a/docs/emacs.md +++ b/docs/emacs.md @@ -133,7 +133,7 @@ $ emacs 向后 | 向前 | 要杀死的实体 -:- | :- | :- +:- | :- | :- `DEL` | `C-d` | 字符
_(删除)_ `M-DEL` | `M-d` | 单词 `M-0` `C-k` | `C-k` | 行
_(到结尾)_ @@ -522,5 +522,3 @@ With prefix argument LINE, put point on LINE." 0 (prefix-numeric-value line)))) ``` - - diff --git a/docs/emmet.md b/docs/emmet.md index cdcb51bf0d3..e12ff8a1c19 100644 --- a/docs/emmet.md +++ b/docs/emmet.md @@ -3,7 +3,6 @@ Emmet 备忘清单 [Emmet](https://emmet.io/) 是一个用于提升 [HTML](./html.md) 和 CSS 代码编写的 Web 开发人员工具包,它允许您使用著名的 CSS 选择器以光速编写大型 HTML 代码块。 - Emmet 语法 --------------- @@ -16,7 +15,6 @@ Emmet 语法 - [Emmet for Coda](https://emmet.io/download/coda/) _(emmet.io)_ - [Emmet for Atom](https://github.com/emmetio/emmet-atom#readme) _(github.com)_ - ### 乘法:* `ul>li*5` @@ -81,7 +79,7 @@ p>{Click }+a{here}+{ 继续} ### ID 和 CLASS 属性 -#header +\# header ```html @@ -199,7 +197,6 @@ ul>li.item$@2*3 ``` - ### 上一层: ^ div+div>p>span+em^bq @@ -793,7 +790,6 @@ select select:disabled, select:d 别名 select[disabled.] - ```html ``` @@ -1162,7 +1158,7 @@ html:4s 别名 !!!4s+doc4[lang=${lang}] ``` -html:xt 别名 !!!xt+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}] +html:xt 别名 !!!xt+doc4[xmlns= xml:lang=${lang}] ```html @@ -1179,7 +1175,7 @@ html:xt 别名 !!!xt+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}] ``` -html:xs 别名 !!!xs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}] +html:xs 别名 !!!xs+doc4[xmlns= xml:lang=${lang}] ```html @@ -1195,7 +1191,7 @@ html:xs 别名 !!!xs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}] ``` -html:xxs 别名 !!!xxs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}] +html:xxs 别名 !!!xxs+doc4[xmlns= xml:lang=${lang}] ```html @@ -1968,6 +1964,7 @@ CSS font-weight: normal; } ``` + #### @i, @import ```css @@ -2057,7 +2054,7 @@ CSS `bfv:h` | backface-visibility:hidden; `bfv:v` | backface-visibility:visible; `bg:ie` | filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='x.png',sizingMethod='crop'); -`cm` | /* ${child} */ +`cm` | /\* ${child} */ `colm` | columns:; `colmc` | column-count:; `colmf` | column-fill:; @@ -2068,7 +2065,7 @@ CSS `colmrw` | column-rule-width:; `colms` | column-span:; `colmw` | column-width:; -`d:ib+` | display: inline-block;
*display: inline;
*zoom: 1; +`d:ib+` | display: inline-block;
*display: inline;
*zoom: 1; `jc` | justify-content:; `jc:c` | justify-content:center; `jc:fe` | justify-content:flex-end; @@ -2384,7 +2381,7 @@ choose+ A别名 xsl:choose>xsl:when+xsl:otherwise ``` -xsl 别名 !!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{ | } +xsl 别名 !!!+xsl:stylesheet[version=1.0 xmlns:xsl=]>{ | } ```xml @@ -2401,4 +2398,4 @@ xsl 别名 !!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/T 另见 -------- -* [Emmet Cheat sheet](https://docs.emmet.io/cheat-sheet/) _(docs.emmet.io)_ \ No newline at end of file +- [Emmet Cheat sheet](https://docs.emmet.io/cheat-sheet/) _(docs.emmet.io)_ diff --git a/docs/es6.md b/docs/es6.md index 89e6b2abad1..8b87bfb010f 100644 --- a/docs/es6.md +++ b/docs/es6.md @@ -149,7 +149,6 @@ class Circle extends Shape { 原型的语法糖。 请参阅: [类](https://babeljs.io/learn-es2015/#classes) - Promises -------- @@ -237,7 +236,9 @@ let {title, author} = { const scores = [22, 33] const [math = 50, sci = 50, arts = 50] = scores ``` + ---- + ```js // Result: // math === 22, sci === 33, arts === 50 @@ -252,7 +253,9 @@ function greet({ name, greeting }) { console.log(`${greeting}, ${name}!`) } ``` + ---- + ```js greet({ name: 'Larry', greeting: 'Ahoy' }) ``` @@ -266,7 +269,9 @@ function greet({ name = 'Rauno' } = {}) { console.log(`Hi ${name}!`); } ``` + ---- + ```js greet() // Hi Rauno! greet({ name: 'Larry' }) // Hi Larry! @@ -279,7 +284,9 @@ function printCoordinates({ left: x, top: y }) { console.log(`x: ${x}, y: ${y}`) } ``` + ---- + ```js printCoordinates({ left: 25, top: 90 }) ``` @@ -456,7 +463,9 @@ Objects ```js module.exports = { hello, bye } ``` -同下: + +同下: + ```js module.exports = { hello: hello, bye: bye @@ -524,22 +533,30 @@ Modules 模块 import 'helpers' // 又名: require('···') ``` ---- + +---- + ```js import Express from 'express' // 又名: const Express = require('···').default || require('···') ``` ---- + +---- + ```js import { indent } from 'helpers' // 又名: const indent = require('···').indent ``` ---- + +---- + ```js import * as Helpers from 'helpers' // 又名: const Helpers = require('···') ``` ---- + +---- + ```js import { indentSpaces as indent } from 'helpers' // 又名: const indent = require('···').indentSpaces @@ -554,12 +571,16 @@ import { indentSpaces as indent } from 'helpers' export default function () { ··· } // 又名: module.exports.default = ··· ``` + ---- + ```js export function mymethod () { ··· } // 又名: module.exports.mymethod = ··· ``` + ---- + ```js export const pi = 3.14159 // 又名: module.exports.pi = ··· @@ -643,7 +664,6 @@ new URL('data.txt', import.meta.url) Node.js 环境中,`import.meta.url`返回的总是本地路径,即 `file:URL` 协议的字符串,比如 `file:///home/user/foo.js` - Generators ---------- @@ -655,7 +675,9 @@ function* idMaker () { while (true) { yield id++ } } ``` ---- + +---- + ```js let gen = idMaker() gen.next().value // → 0 @@ -707,7 +729,6 @@ gen[Symbol.iterator] = function* () { `Generator` 函数赋值给 `Symbol.iterator` 属性,从而使得 `gen` 对象具有了 `Iterator` 接口,可以被 `...` 运算符遍历了 - ### Symbol.iterator 属性 ```js @@ -724,4 +745,4 @@ g[Symbol.iterator]() === g // true - [Learn ES2015](https://babeljs.io/docs/en/learn/) _(babeljs.io)_ - [ECMAScript 6 功能概述](https://github.com/lukehoban/es6features#readme) _(github.com)_ -- [ECMAScript 6 入门教程 (阮一峰)](https://es6.ruanyifeng.com/) _(ruanyifeng.com)_ \ No newline at end of file +- [ECMAScript 6 入门教程 (阮一峰)](https://es6.ruanyifeng.com/) _(ruanyifeng.com)_ diff --git a/docs/expressjs.md b/docs/expressjs.md index 494f837a442..041efec7d9b 100644 --- a/docs/expressjs.md +++ b/docs/expressjs.md @@ -10,16 +10,21 @@ Express 备忘清单 - 创建项目,添加 `package.json` 配置 + ```bash $ mkdir myapp # 创建目录 $ cd myapp # 进入目录 $ npm init -y # 初始化一个配置 ``` + - 安装依赖 + ```bash $ npm install express # 安装依赖 ``` + - 入口文件 `index.js` 添加代码: + ```js const express = require('express') const app = express() @@ -31,7 +36,9 @@ Express 备忘清单 console.log(`监听端口${port}示例应用`) }) ``` + - 使用以下命令运行应用程序 + ```bash $ node index.js ``` @@ -189,7 +196,7 @@ app.get('/', function (req, res) { :- | :- :- | :- -`res.app ` | [#](http://expressjs.com/en/4x/api.html#res.app) +`res.app` | [#](http://expressjs.com/en/4x/api.html#res.app) `res.headersSent` | [#](http://expressjs.com/en/4x/api.html#res.headersSent) `res.locals` | [#](http://expressjs.com/en/4x/api.html#res.locals) @@ -404,4 +411,4 @@ app.get('/', (req, res) => { title: 'Hey', message: 'Hello there!' }) }) -``` \ No newline at end of file +``` diff --git a/docs/ffmpeg.md b/docs/ffmpeg.md index c92c4091d64..358be1d4948 100644 --- a/docs/ffmpeg.md +++ b/docs/ffmpeg.md @@ -103,7 +103,6 @@ $ ffmpeg -i movie.webm movie.mp4 `Mi` | 220 | 1048576 | 兆字节 Mebibyte `Gi` | 230 | 1073741824 | Gibibyte - ### 音频参数 @@ -317,7 +316,6 @@ $ ffmpeg -i input.mov -itsoffset 3 -i input.mov -map 1:v -map 0:a -codec:a copy ``` - ### 图片中的视频 如果您有多个编号的图像 image1.jpg、image2.jpg... 像这样从它们创建一个视频 @@ -366,14 +364,12 @@ $ ffmpeg -y -threads 8 -i inFile -target pal-dvd -ac 2 -aspect 16:9 -acodec mp2 ``` - ### 转换为灰度 ```bash $ ffmpeg -y -i inFile -flags gray outFile ``` - ### 字幕 diff --git a/docs/find.md b/docs/find.md index b3b114dfc45..89b89582429 100644 --- a/docs/find.md +++ b/docs/find.md @@ -39,7 +39,6 @@ $ find . -name "json_*" | `-mindepth` | find / -mindepth 3 -maxdepth 5 -name pass | 在子目录级别 2 和 4 之间 | - ### 类型 | | | @@ -224,7 +223,6 @@ $ find . -type d -empty $ find . -type f -empty -delete ``` - 查找日期和时间 ------------- diff --git a/docs/git.md b/docs/git.md index d94f96729cf..ef35cc820f5 100644 --- a/docs/git.md +++ b/docs/git.md @@ -374,15 +374,20 @@ Git 技巧 ### 重命名分支 - **重命名**为`new` + ```shell $ git branch -m $ git branch -m #重命名分支 ``` + - **推送**并重置 + ```shell $ git push origin -u ``` + - **删除**远程分支 + ```shell $ git push origin --delete #方法1 $ git push origin :oldBranchName #方法2 @@ -827,7 +832,6 @@ $ git config --global --unset http.https://github.com.proxy $ git config --global --unset https.https://github.com.proxy ``` - ### clone 最新一次提交 ```bash @@ -890,4 +894,4 @@ Host github.com 另见 --- -- [最常用的 git 提示和技巧](https://github.com/git-tips/tips) \ No newline at end of file +- [最常用的 git 提示和技巧](https://github.com/git-tips/tips) diff --git a/docs/github-actions.md b/docs/github-actions.md index 780a7e33038..1127f5938d6 100644 --- a/docs/github-actions.md +++ b/docs/github-actions.md @@ -212,6 +212,7 @@ jobs: ```shell jobs..environment ``` + 使用单一环境名称的示例 ```yml @@ -251,7 +252,6 @@ steps: 设置环境变量的示例 - ```yml env: MY_ENV_VAR: ${{ }} @@ -838,4 +838,4 @@ steps: --- - [Github Actions 学习笔记](https://jaywcjlove.github.io/github-actions) _(jaywcjlove.github.io)_ -- [了解 GitHub Actions](https://docs.github.com/cn/actions/learn-github-actions) _(docs.github.com)_ \ No newline at end of file +- [了解 GitHub Actions](https://docs.github.com/cn/actions/learn-github-actions) _(docs.github.com)_ diff --git a/docs/gmail.md b/docs/gmail.md index 7ac041039ec..9ee785914da 100644 --- a/docs/gmail.md +++ b/docs/gmail.md @@ -8,8 +8,8 @@ Gmail 快捷键 ### Gmail 导航 -:- | :- -:- | :- +:- | :- +:- | :- `u` | 返回话题列表(或刷新话题列表) `k` / `j` | 较新/较旧的对话 `o` or `Enter` | 打开对话; 折叠/展开 @@ -20,8 +20,8 @@ Gmail 快捷键 ### Gmail 应用程序 -:- | :- -:- | :- +:- | :- +:- | :- `c` | 撰写 `d` | 添加 cc 撰写 `b` | 添加 cc 和 bcc 撰写 @@ -33,8 +33,8 @@ Gmail 快捷键 ### Gmail 操作 -:- | :- -:- | :- +:- | :- +:- | :- `,` | 将焦点移至工具栏 `x` | 选择对话 `s` | 旋转超级巨星 @@ -73,8 +73,8 @@ Gmail 快捷键 ### Gmail 跳转 -:- | :- -:- | :- +:- | :- +:- | :- `g` 然后 `i` | 打开收件箱 `g` 然后 `s` | 打开已加星标的对话 `g` 然后 `t` | 打开已发送消息 @@ -86,11 +86,10 @@ Gmail 快捷键 `g` 然后 `k` | 前往任务 - ### Gmail 主题列表选择 -:- | :- -:- | :- +:- | :- +:- | :- `*` 然后 `a` | 选择所有对话 `*` 然后 `n` | 取消选择所有对话 `*` 然后 `r` | 选择阅读对话 @@ -101,8 +100,8 @@ Gmail 快捷键 ### Gmail 搜索语法 -:- | :- -:- | :- +:- | :- +:- | :- `from:[arg]` | 从 `to:[arg]` | 至 `label:­[arg]` | 标签 @@ -126,4 +125,4 @@ Gmail 快捷键 - 按 `u` 刷新话题列表 - 对于多选,选择一个对话,然后 `shift+单击`另一个对话以选择其间的所有对话 -- 在主题中添加 `EOM`(消息结尾)以避免 `no-text-in-body` 警告 \ No newline at end of file +- 在主题中添加 `EOM`(消息结尾)以避免 `no-text-in-body` 警告 diff --git a/docs/golang.md b/docs/golang.md index f155b99664e..c08ec3ec88d 100644 --- a/docs/golang.md +++ b/docs/golang.md @@ -126,7 +126,7 @@ isTrue := true isFalse := false ``` -#### 操作符 +#### 操作符 ```go fmt.Println(true && true) // true @@ -247,7 +247,6 @@ s := strconv.Itoa(i) fmt.Println(s) // Outputs: 90 ``` - Golang 字符串 -------- @@ -256,18 +255,18 @@ Golang 字符串 ```go package main import ( - "fmt" - s "strings" + "fmt" + s "strings" ) func main() { /* 需要将字符串导入为 s */ - fmt.Println(s.Contains("test", "e")) + fmt.Println(s.Contains("test", "e")) /* 内置 */ fmt.Println(len("hello")) // => 5 // 输出: 101 - fmt.Println("hello"[1]) + fmt.Println("hello"[1]) // 输出: e - fmt.Println(string("hello"[1])) + fmt.Println(string("hello"[1])) } ``` @@ -277,38 +276,38 @@ func main() { ```go package main import ( - "fmt" - "os" + "fmt" + "os" ) type point struct { - x, y int + x, y int } func main() { - p := point{1, 2} - fmt.Printf("%v\n", p) // => {1 2} - fmt.Printf("%+v\n", p) // => {x:1 y:2} - fmt.Printf("%#v\n", p) // => main.point{x:1, y:2} - fmt.Printf("%T\n", p) // => main.point - fmt.Printf("%t\n", true) // => TRUE - fmt.Printf("%d\n", 123) // => 123 - fmt.Printf("%b\n", 14) // => 1110 - fmt.Printf("%c\n", 33) // => ! - fmt.Printf("%x\n", 456) // => 1c8 - fmt.Printf("%f\n", 78.9) // => 78.9 - fmt.Printf("%e\n", 123400000.0) // => 1.23E+08 - fmt.Printf("%E\n", 123400000.0) // => 1.23E+08 - fmt.Printf("%s\n", "\"string\"") // => "string" - fmt.Printf("%q\n", "\"string\"") // => "\"string\"" - fmt.Printf("%x\n", "hex this") // => 6.86578E+15 - fmt.Printf("%p\n", &p) // => 0xc00002c040 - fmt.Printf("|%6d|%6d|\n", 12, 345) // => | 12| 345| - fmt.Printf("|%6.2f|%6.2f|\n", 1.2, 3.45) // => | 1.20| 3.45| - fmt.Printf("|%-6.2f|%-6.2f|\n", 1.2, 3.45) // => |1.20 |3.45 | - fmt.Printf("|%6s|%6s|\n", "foo", "b") // => | foo| b| - fmt.Printf("|%-6s|%-6s|\n", "foo", "b") // => |foo |b | - s := fmt.Sprintf("a %s", "string") - fmt.Println(s) - fmt.Fprintf(os.Stderr, "an %s\n", "error") + p := point{1, 2} + fmt.Printf("%v\n", p) // => {1 2} + fmt.Printf("%+v\n", p) // => {x:1 y:2} + fmt.Printf("%#v\n", p) // => main.point{x:1, y:2} + fmt.Printf("%T\n", p) // => main.point + fmt.Printf("%t\n", true) // => TRUE + fmt.Printf("%d\n", 123) // => 123 + fmt.Printf("%b\n", 14) // => 1110 + fmt.Printf("%c\n", 33) // => ! + fmt.Printf("%x\n", 456) // => 1c8 + fmt.Printf("%f\n", 78.9) // => 78.9 + fmt.Printf("%e\n", 123400000.0) // => 1.23E+08 + fmt.Printf("%E\n", 123400000.0) // => 1.23E+08 + fmt.Printf("%s\n", "\"string\"") // => "string" + fmt.Printf("%q\n", "\"string\"") // => "\"string\"" + fmt.Printf("%x\n", "hex this") // => 6.86578E+15 + fmt.Printf("%p\n", &p) // => 0xc00002c040 + fmt.Printf("|%6d|%6d|\n", 12, 345) // => | 12| 345| + fmt.Printf("|%6.2f|%6.2f|\n", 1.2, 3.45) // => | 1.20| 3.45| + fmt.Printf("|%-6.2f|%-6.2f|\n", 1.2, 3.45) // => |1.20 |3.45 | + fmt.Printf("|%6s|%6s|\n", "foo", "b") // => | foo| b| + fmt.Printf("|%-6s|%-6s|\n", "foo", "b") // => |foo |b | + s := fmt.Sprintf("a %s", "string") + fmt.Println(s) + fmt.Fprintf(os.Stderr, "an %s\n", "error") } ``` @@ -316,8 +315,8 @@ func main() { ### 函数实例 -| 实例 | Result | -|-------------------------------|-------------| +| 实例 | Result | +| ----------------------------- | ----------- | | Contains("test", "es") | true | | Count("test", "t") | 2 | | HasPrefix("test", "te") | true | @@ -441,16 +440,16 @@ Golang 结构和映射 ```go package main import ( - "fmt" + "fmt" ) type Vertex struct { - X int - Y int + X int + Y int } func main() { - v := Vertex{1, 2} - v.X = 4 - fmt.Println(v.X, v.Y) // => 4 2 + v := Vertex{1, 2} + v.X = 4 + fmt.Println(v.X, v.Y) // => 4 2 } ``` @@ -569,6 +568,7 @@ sum(nums...) // => [1 2 3 4] 10 ```go import --> const --> var --> init() ``` + --- ```go @@ -701,22 +701,22 @@ Golang 并发 ```go package main import ( - "fmt" - "time" + "fmt" + "time" ) func f(from string) { - for i := 0; i < 3; i++ { - fmt.Println(from, ":", i) - } + for i := 0; i < 3; i++ { + fmt.Println(from, ":", i) + } } func main() { - f("direct") - go f("goroutine") - go func(msg string) { - fmt.Println(msg) - }("going") - time.Sleep(time.Second) - fmt.Println("done") + f("direct") + go f("goroutine") + go func(msg string) { + fmt.Println(msg) + }("going") + time.Sleep(time.Second) + fmt.Println("done") } ``` @@ -728,23 +728,23 @@ func main() { ```go package main import ( - "fmt" - "sync" - "time" + "fmt" + "sync" + "time" ) func w(id int, wg *sync.WaitGroup) { - defer wg.Done() - fmt.Printf("%d starting\n", id) - time.Sleep(time.Second) - fmt.Printf("%d done\n", id) + defer wg.Done() + fmt.Printf("%d starting\n", id) + time.Sleep(time.Second) + fmt.Printf("%d done\n", id) } func main() { - var wg sync.WaitGroup - for i := 1; i <= 5; i++ { - wg.Add(1) - go w(i, &wg) - } - wg.Wait() + var wg sync.WaitGroup + for i := 1; i <= 5; i++ { + wg.Add(1) + go w(i, &wg) + } + wg.Wait() } ``` @@ -916,6 +916,7 @@ func main() { ------------- ### 关键字(Keywords) + - break - default - func @@ -945,8 +946,8 @@ func main() { ### 运算符和标点符号 -| | | | | | | | | | -|---|----|-----|-----|------|----|-----|---|---| +| | | | | | | | | | +| --- | ---- | ----- | ----- | ------ | ---- | ----- | --- | --- | | `+` | `&` | `+=` | `&=` | `&&` | `==` | `!=` | `(` | `)` | | `-` | `\|` | `-=` | `\|=` | `\|\|` | `<` | `<=` | `[` | `]` | | `*` | `^` | `*=` | `^=` | `<-` | `>` | `>=` | `{` | `}` | @@ -956,6 +957,7 @@ func main() { 另见 -------- + - [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)_ diff --git a/docs/grep.md b/docs/grep.md index 155d0f6bbc9..fa021579536 100644 --- a/docs/grep.md +++ b/docs/grep.md @@ -3,7 +3,6 @@ Grep 备忘清单 本备忘单旨在快速提醒使用命令行程序 grep 所涉及的主要概念,并假设您已经了解其用法。 - 入门 ------ @@ -31,7 +30,6 @@ $ grep 'mellon' myfile.txt 文件名中接受通配符。 - ### 选项示例 @@ -51,7 +49,6 @@ $ grep 'mellon' myfile.txt | `-o` | grep -o search_string filename | 只显示字符串的匹配部分 | `-n` | grep -n "go" demo.txt | 显示匹配的行号 - Grep 正则表达式 ------- @@ -97,13 +94,12 @@ Grep 正则表达式 `[0-9]` | 任何数字 `[0-9­A-Z­a-z]` | 任何大小写字母或数字 - ### 位置 :- | :- :- | :- -`^ ` | 行的开头 -`$ ` | 行结束 +`^` | 行的开头 +`$` | 行结束 `^$` | 空行 `\<` | 词的开头 `\>` | 词尾 @@ -176,4 +172,4 @@ grep -c "text" file_name 另见 ---- -- [grep 中文文档](https://wangchujiang.com/linux-command/c/grep.html) _(jaywcjlove.github.io)_ \ No newline at end of file +- [grep 中文文档](https://wangchujiang.com/linux-command/c/grep.html) _(jaywcjlove.github.io)_ diff --git a/docs/homebrew.md b/docs/homebrew.md index 1e355b5a607..ab4bccc38a0 100644 --- a/docs/homebrew.md +++ b/docs/homebrew.md @@ -36,7 +36,7 @@ export HOMEBREW_INSTALL_FROM_API=1 ### 命令 命令 | 说明 -:--- :--- +:--- :--- `brew install git` | `安装`一个包 `brew reinstall git` | 重新`安装`一个包 `brew uninstall git` | `删除`/`卸载`软件包 @@ -51,7 +51,7 @@ export HOMEBREW_INSTALL_FROM_API=1 ### 更多包命令 命令 | 说明 -:--- :--- +:--- :--- `brew info git` | 列出版本、注意事项等 `brew cleanup git` | 删除旧版本 `brew edit git` | 编辑此软件包 @@ -62,7 +62,7 @@ export HOMEBREW_INSTALL_FROM_API=1 ### Brew Cask 命令 命令 | 说明 -:--- :--- +:--- :--- `brew install --cask firefox` | 安装火狐浏览器 `brew list --cask` | 列出已安装应用 @@ -72,7 +72,7 @@ Cask 命令用于与图形应用程序交互 命令 | 说明 -:--- :--- +:--- :--- `brew update` | 更新 `brew` 和 `cask` `brew upgrade` | 升级所有软件包 `brew list` | 已安装列表 @@ -120,7 +120,7 @@ $ brew info ### 帮助命令 命令 | 说明 -:--- :--- +:--- :--- `brew help` | 打印帮助信息 `brew help ` | 打印子命令的帮助信息 @@ -129,4 +129,4 @@ $ brew info - [Homebrew 官网](https://brew.sh/index_zh-cn) _(brew.sh)_ - [Homebrew brew 源码](https://github.com/Homebrew/brew) _(github.com)_ -- [Homebrew core 源码](https://github.com/Homebrew/homebrew-core) _(github.com)_ \ No newline at end of file +- [Homebrew core 源码](https://github.com/Homebrew/homebrew-core) _(github.com)_ diff --git a/docs/html-char.md b/docs/html-char.md index f072de3f34c..73209d6c9f1 100644 --- a/docs/html-char.md +++ b/docs/html-char.md @@ -3,7 +3,6 @@ HTML 字符实体备忘清单 此备忘清单是 HTML 实体及其编号和名称的完整列表。还包括可以用 HTML 表示的 ASCII 字符的完整列表。 - HTML 字符实体引用 ------ @@ -360,4 +359,4 @@ HTML 字符实体引用 另见 --- -- [HTML 字符集实体](https://jaywcjlove.github.io/html-tutorial/reference/charactersets_entities.html) \ No newline at end of file +- [HTML 字符集实体](https://jaywcjlove.github.io/html-tutorial/reference/charactersets_entities.html) diff --git a/docs/html.md b/docs/html.md index 9a533db94f6..db8a7bca296 100644 --- a/docs/html.md +++ b/docs/html.md @@ -43,11 +43,12 @@ HTML 备忘清单

我来自快速参考

分享快速参考备忘单。

``` + 请参阅:[段落元素](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/p) ### HTML 链接 -```html +```html Github @@ -68,8 +69,6 @@ HTML 备忘清单 请参阅:[\ 属性](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/a#attributes) - - ### Image 标签 ```html @@ -163,10 +162,8 @@ HTML 备忘清单 src="https://www.openstreetmap.org/export/embed.html?bbox=-0.004017949104309083%2C51.47612752641776%2C0.00030577182769775396%2C51.478569861898606&layer=mapnik"> - 请参阅:[内联框架元素](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/iframe) - ### HTML 中的 JavaScript ```html @@ -176,7 +173,6 @@ HTML 备忘清单 ``` - #### 外部 JavaScript ```html @@ -186,7 +182,6 @@ HTML 备忘清单 ``` - ### HTML 中的 CSS ```html @@ -206,8 +201,6 @@ HTML 备忘清单 ``` - - HTML5 标签 ------------- @@ -227,7 +220,6 @@ HTML5 标签 ``` - ### 标题导航 ```html @@ -242,7 +234,6 @@ HTML5 标签 ``` - ### HTML5 Tags @@ -281,7 +272,6 @@ HTML5 标签 [video](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/video) | 嵌入视频 [wbr](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/wbr) | 换行机会 - ### HTML5 Video ```html @@ -339,7 +329,6 @@ HTML5 标签 音 (yīn) - ### HTML5 kdi ```html @@ -358,7 +347,6 @@ HTML5 标签
  • User إيان: 90 points
  • - ### HTML5 progress ```html @@ -375,7 +363,6 @@ HTML5 标签

    我爱备忘清单

    - HTML 表格 -------------- @@ -505,19 +492,18 @@ HTML 表单 #### ↓ 预览
    - +
    - +

    - +
    - HTML `
    ` 元素用于收集信息并将其发送到外部源。 ### Form 属性 @@ -602,13 +588,16 @@ Textarea 是一个多行文本输入控件 单选按钮用于让用户只选择一个 ### Checkboxes + ```html ``` + #### ↓ 预览 + @@ -718,7 +707,6 @@ Textarea 是一个多行文本输入控件 `将数据提交到服务器` 重置为默认值 - HTML input 标签 ----------- @@ -729,10 +717,10 @@ HTML input 标签 输入标记是一个空元素,用于标识要从用户处获取的特定类型的字段信息。 ```html - + ``` ----- +--- :-|:- :-|:- @@ -794,7 +782,6 @@ HTML input 标签 | `type="search"` | | | `type="range"` | | - ### Input CSS 选择器 | | | @@ -820,6 +807,7 @@ meta 标记描述 HTML 文档中的元数据。它解释了关于 HTML 的其他 ``` + --- ```html @@ -828,6 +816,7 @@ meta 标记描述 HTML 文档中的元数据。它解释了关于 HTML 的其他 ``` + --- ```html @@ -836,6 +825,7 @@ meta 标记描述 HTML 文档中的元数据。它解释了关于 HTML 的其他 ``` + --- ```html @@ -843,12 +833,14 @@ meta 标记描述 HTML 文档中的元数据。它解释了关于 HTML 的其他 ``` + --- ```html ``` + --- ```html @@ -900,4 +892,4 @@ Facebook、Instagram、Pinterest、LinkedIn 等使用。 - [HTML 4.01 Specification](https://www.w3.org/TR/REC-html40/cover.html#minitoc) _(w3.org)_ - [HTML Tutorial](https://wangchujiang.com/html-tutorial/) _(jaywcjlove.github.io)_ -- [Emmet 备忘清单,提升 HTML 和 CSS 代码编写的工具包](./emmet.md) _(jaywcjlove.github.io)_ \ No newline at end of file +- [Emmet 备忘清单,提升 HTML 和 CSS 代码编写的工具包](./emmet.md) _(jaywcjlove.github.io)_ diff --git a/docs/htop.md b/docs/htop.md index c81046ccd93..b83c2b1242d 100644 --- a/docs/htop.md +++ b/docs/htop.md @@ -53,7 +53,7 @@ htop 的软件包在大多数发行版中都[可用下载](https://htop.dev/down `T` | 追踪/停止 `Z` | 僵尸 `D` | 磁盘睡眠 - + ### 交互式命令 @@ -81,7 +81,7 @@ htop 的软件包在大多数发行版中都[可用下载](https://htop.dev/down `p` | 在适用的情况下显示运行程序的完整路径(这是一个切换键) `Ctrl-L` | 刷新:重绘屏幕并重新计算数值 `Numbers` | PID搜索:输入进程ID,选择突出显示将移至它 - + ### 排序/线程 @@ -93,7 +93,7 @@ htop 的软件包在大多数发行版中都[可用下载](https://htop.dev/down `I` | `反转`排序顺序 `K` | 隐藏`内核`线程 `H` | 隐藏`用户`线程 - + ### 滚动 @@ -108,4 +108,4 @@ htop 的软件包在大多数发行版中都[可用下载](https://htop.dev/down `End` | 滚动到流程列表的`底部`
    _选择最后一个流程_ `Ctrl-A`, `^` | 向`左`滚动到流程条目`开头` _(即行开头)_ `Ctrl-E`, `$` | 向`右`滚动到流程条目`末尾` _(即行尾)_ - \ No newline at end of file + \ No newline at end of file diff --git a/docs/http-status-code.md b/docs/http-status-code.md index d6fc9b588c1..e0bc0f1c97a 100644 --- a/docs/http-status-code.md +++ b/docs/http-status-code.md @@ -6,7 +6,7 @@ HTTP 状态码备忘清单。 每个 HTTP 状态代码的快速参考。 HTTP 状态码 --- -### Means +### Means - [1xx: Informational](#1xx-信息) _这意味着已收到请求并且该过程正在继续_ - [2xx: Success](#2xx-成功的) _这意味着该操作已成功接收、理解和接受_ @@ -17,63 +17,63 @@ HTTP 状态码 ### 2xx. 成功的 -* [200: OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) _请求没问题_ -* [201: Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) _请求完成,并创建了一个新资源_ -* [202: Accepted](https://tools.ietf.org/html/rfc7231#section-6.3.3) _接受请求进行处理,但处理未完成_ -* [203: Non-Authoritative Information](https://tools.ietf.org/html/rfc7231#section-6.3.4) _实体标头中的信息来自本地或第三方副本,而不是来自原始服务器_ -* [204: No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) _响应中给出了状态码和标头,但响应中没有实体主体_ -* [205: Reset Content](https://tools.ietf.org/html/rfc7231#section-6.3.6) _浏览器应清除用于此事务的表单以获取其他输入_ -* [206: Partial Content](https://tools.ietf.org/html/rfc7233#section-4.1) _服务器正在返回请求大小的部分数据。 用于响应指定 Range 标头的请求。 服务器必须使用 Content-Range 标头指定响应中包含的范围_ +- [200: OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) _请求没问题_ +- [201: Created](https://tools.ietf.org/html/rfc7231#section-6.3.2) _请求完成,并创建了一个新资源_ +- [202: Accepted](https://tools.ietf.org/html/rfc7231#section-6.3.3) _接受请求进行处理,但处理未完成_ +- [203: Non-Authoritative Information](https://tools.ietf.org/html/rfc7231#section-6.3.4) _实体标头中的信息来自本地或第三方副本,而不是来自原始服务器_ +- [204: No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5) _响应中给出了状态码和标头,但响应中没有实体主体_ +- [205: Reset Content](https://tools.ietf.org/html/rfc7231#section-6.3.6) _浏览器应清除用于此事务的表单以获取其他输入_ +- [206: Partial Content](https://tools.ietf.org/html/rfc7233#section-4.1) _服务器正在返回请求大小的部分数据。 用于响应指定 Range 标头的请求。 服务器必须使用 Content-Range 标头指定响应中包含的范围_ ### 4xx. 客户端错误 -* [400: Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) _服务器不理解该请求_ -* [401: Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) _请求的页面需要用户名和密码_ -* [402: Payment Required](https://tools.ietf.org/html/rfc7231#section-6.5.2) _您还不能使用此代码_ -* [403: Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3) _禁止访问请求的页面_ -* [404: Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) _服务器找不到请求的页面_ -* [405: Method Not Allowed](https://tools.ietf.org/html/rfc7231#section-6.5.5) _请求中指定的方法是不允许的_ -* [406: Not Acceptable](https://tools.ietf.org/html/rfc7231#section-6.5.6) _服务器只能生成客户端不接受的响应_ -* [407: Proxy Authentication Required](https://tools.ietf.org/html/rfc7235#section-3.2) _您必须先通过代理服务器进行身份验证,然后才能提供此请求_ -* [408: Request Timeout](https://tools.ietf.org/html/rfc7231#section-6.5.7) _请求花费的时间比服务器准备等待的时间长_ -* [409: Conflict](https://tools.ietf.org/html/rfc7231#section-6.5.8) _由于冲突,请求无法完成_ -* [410: Gone](https://tools.ietf.org/html/rfc7231#section-6.5.9) _请求的页面不再可用_ -* [411: Length Required](https://tools.ietf.org/html/rfc7231#section-6.5.10) _“Content-Length”未定义。 没有它,服务器将不会接受请求_ -* [412: Precondition Failed](https://tools.ietf.org/html/rfc7232#section-4.2) _请求中给出的前提条件被服务器评估为 false_ -* [413: Payload Too Large](https://tools.ietf.org/html/rfc7231#section-6.5.11) _服务器不会接受请求,因为请求实体太大_ -* [414: URI Too Long](https://tools.ietf.org/html/rfc7231#section-6.5.12) _服务器不会接受请求,因为 url 太长。 当您将“发布”请求转换为具有长查询信息的“获取”请求时发生_ -* [415: Unsupported Media Type](https://tools.ietf.org/html/rfc7231#section-6.5.13) _服务器不会接受请求,因为不支持媒体类型_ -* [416: Range Not Satisfiable](https://tools.ietf.org/html/rfc7233#section-4.4) _请求的字节范围不可用且超出范围_ -* [417: Expectation Failed](https://tools.ietf.org/html/rfc7231#section-6.5.14) _此服务器无法满足在 Expect 请求标头字段中给出的期望_ -* [426: Upgrade Required](https://tools.ietf.org/html/rfc7231#section-6.5.15) _服务器拒绝使用当前协议执行请求,但在客户端升级到不同协议后可能愿意这样做_ -* [451: Unavailable For Legal Reasons](https://datatracker.ietf.org/doc/html/rfc7725#section-3) _此状态代码表示服务器拒绝访问资源作为法律要求的结果_ +- [400: Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) _服务器不理解该请求_ +- [401: Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) _请求的页面需要用户名和密码_ +- [402: Payment Required](https://tools.ietf.org/html/rfc7231#section-6.5.2) _您还不能使用此代码_ +- [403: Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3) _禁止访问请求的页面_ +- [404: Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) _服务器找不到请求的页面_ +- [405: Method Not Allowed](https://tools.ietf.org/html/rfc7231#section-6.5.5) _请求中指定的方法是不允许的_ +- [406: Not Acceptable](https://tools.ietf.org/html/rfc7231#section-6.5.6) _服务器只能生成客户端不接受的响应_ +- [407: Proxy Authentication Required](https://tools.ietf.org/html/rfc7235#section-3.2) _您必须先通过代理服务器进行身份验证,然后才能提供此请求_ +- [408: Request Timeout](https://tools.ietf.org/html/rfc7231#section-6.5.7) _请求花费的时间比服务器准备等待的时间长_ +- [409: Conflict](https://tools.ietf.org/html/rfc7231#section-6.5.8) _由于冲突,请求无法完成_ +- [410: Gone](https://tools.ietf.org/html/rfc7231#section-6.5.9) _请求的页面不再可用_ +- [411: Length Required](https://tools.ietf.org/html/rfc7231#section-6.5.10) _“Content-Length”未定义。 没有它,服务器将不会接受请求_ +- [412: Precondition Failed](https://tools.ietf.org/html/rfc7232#section-4.2) _请求中给出的前提条件被服务器评估为 false_ +- [413: Payload Too Large](https://tools.ietf.org/html/rfc7231#section-6.5.11) _服务器不会接受请求,因为请求实体太大_ +- [414: URI Too Long](https://tools.ietf.org/html/rfc7231#section-6.5.12) _服务器不会接受请求,因为 url 太长。 当您将“发布”请求转换为具有长查询信息的“获取”请求时发生_ +- [415: Unsupported Media Type](https://tools.ietf.org/html/rfc7231#section-6.5.13) _服务器不会接受请求,因为不支持媒体类型_ +- [416: Range Not Satisfiable](https://tools.ietf.org/html/rfc7233#section-4.4) _请求的字节范围不可用且超出范围_ +- [417: Expectation Failed](https://tools.ietf.org/html/rfc7231#section-6.5.14) _此服务器无法满足在 Expect 请求标头字段中给出的期望_ +- [426: Upgrade Required](https://tools.ietf.org/html/rfc7231#section-6.5.15) _服务器拒绝使用当前协议执行请求,但在客户端升级到不同协议后可能愿意这样做_ +- [451: Unavailable For Legal Reasons](https://datatracker.ietf.org/doc/html/rfc7725#section-3) _此状态代码表示服务器拒绝访问资源作为法律要求的结果_ ### 1xx. 信息 -* [100: Continue](https://tools.ietf.org/html/rfc7231#section-6.2.1) _服务器只收到了请求的一部分,但只要没有被拒绝,客户端就应该继续请求_ -* [101: Switching Protocols](https://tools.ietf.org/html/rfc7231#section-6.2.2) _服务器切换协议_ -* [102: Processing](https://tools.ietf.org/html/rfc2518#section-10.1) _用于通知客户端服务器已接受完整请求但尚未完成的临时响应_ +- [100: Continue](https://tools.ietf.org/html/rfc7231#section-6.2.1) _服务器只收到了请求的一部分,但只要没有被拒绝,客户端就应该继续请求_ +- [101: Switching Protocols](https://tools.ietf.org/html/rfc7231#section-6.2.2) _服务器切换协议_ +- [102: Processing](https://tools.ietf.org/html/rfc2518#section-10.1) _用于通知客户端服务器已接受完整请求但尚未完成的临时响应_ ### 3xx. 重定向 -* [300: Multiple Choices](https://tools.ietf.org/html/rfc7231#section-6.4.1) _一个链接列表。 用户可以选择一个链接并转到该位置。 最多五个地址_ -* [301: Moved Permanently](https://tools.ietf.org/html/rfc7231#section-6.4.2) _请求的页面已移至新的 url_ -* [302: Found](https://tools.ietf.org/html/rfc7231#section-6.4.3) _请求的页面已临时移动到新的 url_ -* [303: See Other](https://tools.ietf.org/html/rfc7231#section-6.4.4) _请求的页面可以在不同的 url 下找到_ -* [304: Not Modified](https://tools.ietf.org/html/rfc7232#section-4.1) _这是对 If-Modified-Since 或 If-None-Match 标头的响应代码,其中 URL 自指定日期以来未修改_ -* [305: Use Proxy](https://tools.ietf.org/html/rfc7231#section-6.4.5) _请求的 URL 必须通过 Location 标头中提到的代理访问_ -* [306: Unused](https://tools.ietf.org/html/rfc7231#section-6.4.6) _此代码在以前的版本中使用过。 它不再使用,但代码被保留_ -* [307: Temporary Redirect](https://tools.ietf.org/html/rfc7231#section-6.4.7) _请求的页面已临时移动到新的 url_ +- [300: Multiple Choices](https://tools.ietf.org/html/rfc7231#section-6.4.1) _一个链接列表。 用户可以选择一个链接并转到该位置。 最多五个地址_ +- [301: Moved Permanently](https://tools.ietf.org/html/rfc7231#section-6.4.2) _请求的页面已移至新的 url_ +- [302: Found](https://tools.ietf.org/html/rfc7231#section-6.4.3) _请求的页面已临时移动到新的 url_ +- [303: See Other](https://tools.ietf.org/html/rfc7231#section-6.4.4) _请求的页面可以在不同的 url 下找到_ +- [304: Not Modified](https://tools.ietf.org/html/rfc7232#section-4.1) _这是对 If-Modified-Since 或 If-None-Match 标头的响应代码,其中 URL 自指定日期以来未修改_ +- [305: Use Proxy](https://tools.ietf.org/html/rfc7231#section-6.4.5) _请求的 URL 必须通过 Location 标头中提到的代理访问_ +- [306: Unused](https://tools.ietf.org/html/rfc7231#section-6.4.6) _此代码在以前的版本中使用过。 它不再使用,但代码被保留_ +- [307: Temporary Redirect](https://tools.ietf.org/html/rfc7231#section-6.4.7) _请求的页面已临时移动到新的 url_ ### 5xx. 服务器错误 -* [500: Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) _请求未完成。服务器遇到了意外情况_ -* [501: Not Implemented](https://tools.ietf.org/html/rfc7231#section-6.6.2) _请求未完成。服务器不支持所需的功能_ -* [502: Bad Gateway](https://tools.ietf.org/html/rfc7231#section-6.6.3) _请求未完成。服务器收到来自上游服务器的无效响应_ -* [503: Service Unavailable](https://tools.ietf.org/html/rfc7231#section-6.6.4) _请求未完成。服务器暂时超载或停机_ -* [504: Gateway Timeout](https://tools.ietf.org/html/rfc7231#section-6.6.5) _网关已超时_ -* [505: HTTP Version Not Supported](https://tools.ietf.org/html/rfc7231#section-6.6.6) _服务器不支持“http 协议”版本_ +- [500: Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) _请求未完成。服务器遇到了意外情况_ +- [501: Not Implemented](https://tools.ietf.org/html/rfc7231#section-6.6.2) _请求未完成。服务器不支持所需的功能_ +- [502: Bad Gateway](https://tools.ietf.org/html/rfc7231#section-6.6.3) _请求未完成。服务器收到来自上游服务器的无效响应_ +- [503: Service Unavailable](https://tools.ietf.org/html/rfc7231#section-6.6.4) _请求未完成。服务器暂时超载或停机_ +- [504: Gateway Timeout](https://tools.ietf.org/html/rfc7231#section-6.6.5) _网关已超时_ +- [505: HTTP Version Not Supported](https://tools.ietf.org/html/rfc7231#section-6.6.6) _服务器不支持“http 协议”版本_ ### RESTful API diff --git a/docs/ini.md b/docs/ini.md index c6e1e770a78..0d1d61aacd4 100644 --- a/docs/ini.md +++ b/docs/ini.md @@ -182,4 +182,4 @@ array[]=second value - [INI 文件配置](https://en.wikipedia.org/wiki/INI_file) _(wikipedia.org)_ - [YAML 格式配置文件备忘清单](./yaml.md) _(jaywcjlove.github.io)_ -- [TOML 格式配置文件备忘清单](./toml.md) _(jaywcjlove.github.io)_ \ No newline at end of file +- [TOML 格式配置文件备忘清单](./toml.md) _(jaywcjlove.github.io)_ diff --git a/docs/iso-639-1.md b/docs/iso-639-1.md index 900804ea958..606a7295247 100644 --- a/docs/iso-639-1.md +++ b/docs/iso-639-1.md @@ -3,7 +3,6 @@ ISO 639-1 Language Code 备忘清单 这是一个符合 ISO 639-1 标准的 ISO 语言代码列表,它为多语言网站提供参考。 - 入门 ---- @@ -24,7 +23,7 @@ ISO 639-1 代码列表 ### 完整代码 -639-1 代码 | ISO 语言(中文)名称 | ISO 语言名称 | 本地名称 (地名) +639-1 代码 | ISO 语言(中文)名称 | ISO 语言名称 | 本地名称 (地名) :-|:-|:-|:- `aa` | 阿法尔语 | Afar | Afaraf `ab` | 阿布哈兹语 | Abkhaz | аҧсуа бызшәа @@ -234,4 +233,4 @@ ht | hat | 海地克里奥尔语 | 2003年2月26日 | 新增 | cpf - [国际化与本地化](https://zh.wikipedia.org/wiki/国际化与本地化) _(wikipedia.org)_ -- [ISO_639-1](https://zh.wikipedia.org/wiki/ISO_639-1) _(wikipedia.org)_ \ No newline at end of file +- [ISO_639-1](https://zh.wikipedia.org/wiki/ISO_639-1) _(wikipedia.org)_ diff --git a/docs/java.md b/docs/java.md index 5d488fb2117..4a7cbe4c5d9 100644 --- a/docs/java.md +++ b/docs/java.md @@ -73,6 +73,7 @@ for (char c: word.toCharArray()) { } // 输出: Q-u-i-c-k-R-e-f- ``` + 查看: [Loops](#java-循环) ### 数组 Arrays @@ -85,6 +86,7 @@ String[] letters = {"A", "B", "C"}; int[] mylist = {100, 200}; boolean[] answers = {true, false}; ``` + 查看: [Arrays](#java-数组) ### Swap @@ -127,9 +129,10 @@ if (j == 10) { } ``` -查看: [Conditionals](#java-conditionals) +查看: [Conditionals](#条件语句 Conditionals) ### 用户输入 + ```java Scanner in = new Scanner(System.in); String str = in.nextLine(); @@ -175,48 +178,60 @@ StringBuilder sb = new StringBuilder(10); └───┴───┴───┴───┴───┴───┴───┴───┴───┘ 0 1 2 3 4 5 6 7 8 9 ``` + --- ```java sb.append("Reference"); ``` + --- + ```java ┌───┬───┬───┬───┬───┬───┬───┬───┬───┐ | R | e | f | e | r | e | n | c | e | └───┴───┴───┴───┴───┴───┴───┴───┴───┘ 0 1 2 3 4 5 6 7 8 9 ``` + --- ```java sb.delete(3, 9); ``` + --- + ```java ┌───┬───┬───┬───┬───┬───┬───┬───┬───┐ | R | e | f | | | | | | | └───┴───┴───┴───┴───┴───┴───┴───┴───┘ 0 1 2 3 4 5 6 7 8 9 ``` + --- ```java sb.insert(0, "My "); ``` + --- + ```java ┌───┬───┬───┬───┬───┬───┬───┬───┬───┐ | M | y | | R | e | f | | | | └───┴───┴───┴───┴───┴───┴───┴───┴───┘ 0 1 2 3 4 5 6 7 8 9 ``` + --- ```java sb.append("!"); ``` + --- + ```java ┌───┬───┬───┬───┬───┬───┬───┬───┬───┐ | M | y | | R | e | f | ! | | | @@ -370,7 +385,7 @@ Java 条件语句 - `!` _(逻辑补码运算符;反转布尔值)_ ----- +--- - `==` _(等于)_ - `!=` _(不等于)_ @@ -380,19 +395,19 @@ Java 条件语句 - `<=` _(小于或等于)_ ----- +--- - `&&` _条件与_ - `||` _条件或_ - [?:](#三元运算符) _三元(if-then-else 语句的简写)_ ----- +--- - `instanceof` _(将对象与指定类型进行比较)_ ----- +--- - `~` _(一元按位补码)_ - `<<` _(签名左移)_ @@ -462,7 +477,7 @@ for (int i = 0; i < 10; i++) { // 输出: 0123456789 ``` ------- +--- ```java for (int i = 0,j = 0; i < 3; i++,j--) { @@ -537,28 +552,28 @@ Java 框架搜集 搜集 | 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 -[LinkedList](https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html) | List, Deque | Y | _N_ | _N_ | Y | Y -[CopyOnWriteArrayList](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CopyOnWriteArrayList.html) | List | Y | _N_ | Y | Y | Y -[HashSet](https://docs.oracle.com/javase/8/docs/api/java/util/HashSet.html) | Set | _N_ | _N_ | _N_ | _N_ | One `null` -[LinkedHashSet](https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashSet.html) | Set | Y | _N_ | _N_ | _N_ | One `null` -[TreeSet](https://docs.oracle.com/javase/8/docs/api/java/util/TreeSet.html) | Set | Y | Y | _N_ | _N_ | _N_ -[CopyOnWriteArraySet](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CopyOnWriteArraySet.html) | Set | Y | _N_ | Y | _N_ | One `null` -[ConcurrentSkipListSet](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentSkipListSet.html) | Set | Y | Y | Y | _N_ | _N_ -[HashMap](https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html) | Map | _N_ | _N_ | _N_ | _N (key)_ | One `null` _(key)_ -[HashTable](https://docs.oracle.com/javase/8/docs/api/java/util/Hashtable.html) | Map | _N_ | _N_ | Y | _N (key)_ | _N (key)_ -[LinkedHashMap](https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html) | Map | Y | _N_ | _N_ | _N (key)_ | One `null` _(key)_ -[TreeMap](https://docs.oracle.com/javase/8/docs/api/java/util/TreeMap.html) | Map | Y | Y | _N_ | _N (key)_ | _N (key)_ -[ConcurrentHashMap](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html) | Map | _N_ | _N_ | Y | _N (key)_ | _N_ -[ConcurrentSkipListMap](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentSkipListMap.html) | Map | Y | Y | Y | _N (key)_ | _N_ -[ArrayDeque](https://docs.oracle.com/javase/8/docs/api/java/util/ArrayDeque.html) | Deque | Y | _N_ | _N_ | Y | _N_ -[PriorityQueue](https://docs.oracle.com/javase/8/docs/api/java/util/PriorityQueue.html) | Queue | Y | _N_ | _N_ | Y | _N_ -[ConcurrentLinkedQueue](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html) | Queue | Y | _N_ | Y | Y | _N_ -[ConcurrentLinkedDeque](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentLinkedDeque.html) | Deque | Y | _N_ | Y | Y | _N_ -[ArrayBlockingQueue](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ArrayBlockingQueue.html) | Queue | Y | _N_ | Y | Y | _N_ -[LinkedBlockingDeque](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/LinkedBlockingDeque.html) | Deque | Y | _N_ | Y | Y | _N_ -[PriorityBlockingQueue](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/PriorityBlockingQueue.html) | Queue | Y | _N_ | Y | Y | _N_ +[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 +[LinkedList](https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html) | List, Deque | Y | _N_ | _N_ | Y | Y +[CopyOnWriteArrayList](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CopyOnWriteArrayList.html) | List | Y | _N_ | Y | Y | Y +[HashSet](https://docs.oracle.com/javase/8/docs/api/java/util/HashSet.html) | Set | _N_ | _N_ | _N_ | _N_ | One `null` +[LinkedHashSet](https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashSet.html) | Set | Y | _N_ | _N_ | _N_ | One `null` +[TreeSet](https://docs.oracle.com/javase/8/docs/api/java/util/TreeSet.html) | Set | Y | Y | _N_ | _N_ | _N_ +[CopyOnWriteArraySet](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CopyOnWriteArraySet.html) | Set | Y | _N_ | Y | _N_ | One `null` +[ConcurrentSkipListSet](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentSkipListSet.html) | Set | Y | Y | Y | _N_ | _N_ +[HashMap](https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html) | Map | _N_ | _N_ | _N_ | _N (key)_ | One `null` _(key)_ +[HashTable](https://docs.oracle.com/javase/8/docs/api/java/util/Hashtable.html) | Map | _N_ | _N_ | Y | _N (key)_ | _N (key)_ +[LinkedHashMap](https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html) | Map | Y | _N_ | _N_ | _N (key)_ | One `null` _(key)_ +[TreeMap](https://docs.oracle.com/javase/8/docs/api/java/util/TreeMap.html) | Map | Y | Y | _N_ | _N (key)_ | _N (key)_ +[ConcurrentHashMap](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html) | Map | _N_ | _N_ | Y | _N (key)_ | _N_ +[ConcurrentSkipListMap](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentSkipListMap.html) | Map | Y | Y | Y | _N (key)_ | _N_ +[ArrayDeque](https://docs.oracle.com/javase/8/docs/api/java/util/ArrayDeque.html) | Deque | Y | _N_ | _N_ | Y | _N_ +[PriorityQueue](https://docs.oracle.com/javase/8/docs/api/java/util/PriorityQueue.html) | Queue | Y | _N_ | _N_ | Y | _N_ +[ConcurrentLinkedQueue](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html) | Queue | Y | _N_ | Y | Y | _N_ +[ConcurrentLinkedDeque](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentLinkedDeque.html) | Deque | Y | _N_ | Y | Y | _N_ +[ArrayBlockingQueue](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ArrayBlockingQueue.html) | Queue | Y | _N_ | Y | Y | _N_ +[LinkedBlockingDeque](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/LinkedBlockingDeque.html) | Deque | Y | _N_ | Y | Y | _N_ +[PriorityBlockingQueue](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/PriorityBlockingQueue.html) | Queue | Y | _N_ | Y | Y | _N_ ### ArrayList @@ -771,4 +786,4 @@ try { 另见 --- -- [Java 官网](https://www.java.com/zh-CN/) _(java.com)_ \ No newline at end of file +- [Java 官网](https://www.java.com/zh-CN/) _(java.com)_ diff --git a/docs/javascript.md b/docs/javascript.md index 5fe1567b939..ecaa274fcdd 100644 --- a/docs/javascript.md +++ b/docs/javascript.md @@ -54,7 +54,6 @@ count = 10; console.log(count); // => 10 ``` - ### const 关键字 ```javascript @@ -238,11 +237,9 @@ parseFloat(); parseInt(); ``` - JavaScript 条件 ---- - ### 操作符 @@ -273,7 +270,7 @@ true && false; // false 1 === '1' // false ``` -#### 逻辑运算符 ! +#### 逻辑运算符 ```javascript let lateToWork = true; @@ -727,7 +724,6 @@ numbers.concat(newFirstNumber) 如果你想避免改变你的原始数组,你可以使用 concat。 - ### 方法 .splice() ```javascript @@ -1295,7 +1291,6 @@ class Song { } ``` - JavaScript Modules ---- @@ -1639,7 +1634,7 @@ msg(); // Message: Hello World! <-- 2 秒后 JavaScript 请求 ---- -### JSON +### JSON ```JS const jsonObj = { @@ -1771,4 +1766,4 @@ const getSuggestions = async () => { console.log(error) } } -``` \ No newline at end of file +``` diff --git a/docs/jest.md b/docs/jest.md index 55bdfdc4f3d..51c1d2bb0bf 100644 --- a/docs/jest.md +++ b/docs/jest.md @@ -546,7 +546,6 @@ test('async test', () => { 从你的测试中 _返回_ 一个 `Promise` - ## 模拟 ### 模拟函数 @@ -800,7 +799,6 @@ const fs = require('fs') const fs = require.requireActual('fs') ``` - 数据驱动测试(Jest 23+) ---- @@ -886,7 +884,6 @@ test('第二个文本', () => { `Node.js` 和 `Jest` 会缓存你需要的模块。 要测试具有副作用的模块,您需要在测试之间重置模块注册表 - 另见 ---- diff --git a/docs/jq.md b/docs/jq.md index fe8046ce0be..b3ee7be46d0 100644 --- a/docs/jq.md +++ b/docs/jq.md @@ -117,7 +117,7 @@ $ echo '[[1,2], "string", {"a":2}, null]' | jq '.[] | length' 输出结果 -```bash +```bash 2 6 1 @@ -133,7 +133,7 @@ $ echo '{"abc": 1, "abcd": 2, "Foo": 3}' | jq 'keys' 输出结果 -```bash +```bash [ "Foo", "abc", @@ -164,7 +164,7 @@ $ echo '[{"name":"JSON", "good":true}, {"name":"XML", "good":false}]' | jq '.[] 输出结果 -```bash +```bash "JSON" "XML" ``` @@ -178,7 +178,7 @@ $ echo '[1,5,3,0,7]' | jq 'map(select(. >= 2))' 输出结果 -```bash +```bash [ 5, 3, @@ -233,4 +233,4 @@ $ echo '42' | jq '"The input was \(.), which is one less than \(.+1)"' ---- - [jq 官网](https://stedolan.github.io/jq/) _(stedolan.github.io)_ -- [jq 命令使用](https://jaywcjlove.github.io/linux-command/c/jq.html) _(jaywcjlove.github.io)_ \ No newline at end of file +- [jq 命令使用](https://jaywcjlove.github.io/linux-command/c/jq.html) _(jaywcjlove.github.io)_ diff --git a/docs/json.md b/docs/json.md index bffd4c2f626..a10becfb74d 100644 --- a/docs/json.md +++ b/docs/json.md @@ -75,13 +75,13 @@ JSON 备忘清单 ```json { "foo": 'bar' } ``` -Have to be delimited by double quotes +Have to be delimited by double quotes ### 数字 - 类型 | 说明 + 类型 | 说明 -----|------ `Integer` | 数字 1-9、0 和正数或负数 `Fraction` | 0.3、3.9 等分数 @@ -297,6 +297,7 @@ let myArray = [ } ]; ``` + ---- | | | @@ -320,7 +321,7 @@ let myArray = [ ]; ``` ------ +---- | | | |--------------|-----------| @@ -328,10 +329,9 @@ let myArray = [ | `myArray[5]` | true | | `myArray[6]` | undefined | - 另见 ---- - [JSON](https://www.json.org/json-en.html) _(json.org)_ - [JSON Editor Online](http://jsoneditoronline.org/) _(jsoneditoronline.org)_ -- [Convert JSON Array to Markdown Table, CSV and more](https://tableconvert.com/json-to-markdown) _(tableconvert.com)_ \ No newline at end of file +- [Convert JSON Array to Markdown Table, CSV and more](https://tableconvert.com/json-to-markdown) _(tableconvert.com)_ diff --git a/docs/koajs.md b/docs/koajs.md index 799f9a6d3cb..4df95866226 100644 --- a/docs/koajs.md +++ b/docs/koajs.md @@ -3,7 +3,6 @@ Koajs 备忘清单 基于 Node.js 平台的下一代 web 开发框架,包含 [Koa](https://koajs.com/) 的 API 参考列表和一些示例。 - 入门 --- @@ -13,6 +12,7 @@ Koajs 备忘清单 [Koa](https://koajs.com/) 需要 [node v7.6.0](https://nodejs.org) 或更高版本来支持ES2015、异步方法,你可以安装自己支持的 `node` 版本 - 安装依赖 + ```bash $ mkdir myapp # 创建目录 $ cd myapp # 进入目录 @@ -20,7 +20,9 @@ Koajs 备忘清单 $ npm init -y # 初始化一个配置 $ npm install koa # 安装依赖 ``` + - 入口文件 `index.js` 添加代码: + ```js const Koa = require('koa'); const app = new Koa(); @@ -31,7 +33,9 @@ Koajs 备忘清单 app.listen(3000); ``` + - 使用以下命令运行应用程序 + ```bash $ node index.js ``` @@ -421,4 +425,4 @@ const ct = ctx.type; // => "image/png" ``` -获取 response Content-Type,不包含像"charset"这样的参数 \ No newline at end of file +获取 response Content-Type,不包含像"charset"这样的参数 diff --git a/docs/lerna.md b/docs/lerna.md index 4441a23e289..947cdacdf04 100644 --- a/docs/lerna.md +++ b/docs/lerna.md @@ -199,7 +199,7 @@ $ lerna publish --canary preminor } ``` ----- +--- :- | :- :- | :- @@ -239,7 +239,7 @@ $ lerna version -m "chore(doc): publish %v" - `prerelease` 预发行 ----- +--- :- | :- :- | :- @@ -311,7 +311,6 @@ $ lerna bootstrap --hoist `--force-local` [#](https://github.com/lerna/lerna/tree/main/commands/bootstrap#--force-local) | 此标志会导致引导命令始终对本地依赖项进行符号链接,而不管匹配的版本范围如何 - ### info 本地环境信息 ```bash @@ -410,9 +409,9 @@ lerna la :- | :- :- | :- -`--conventional-graduate` | [#](https://github.com/lerna/lerna/tree/main/commands/publishhttps://github.com/lerna/lerna/tree/main/commands/version#--conventional-graduate) -`--force-publish` | [#](https://github.com/lerna/lerna/tree/main/commands/publishhttps://github.com/lerna/lerna/tree/main/commands/version#--force-publish) -`--ignore-changes` | [#](https://github.com/lerna/lerna/tree/main/commands/publishhttps://github.com/lerna/lerna/tree/main/commands/version#--ignore-changes) +`--conventional-graduate` | [#](https://github.com/lerna/lerna/tree/main/commands/publishhttps://github.com/lerna/lerna/tree/main/commands/version#--conventional-graduate) +`--force-publish` | [#](https://github.com/lerna/lerna/tree/main/commands/publishhttps://github.com/lerna/lerna/tree/main/commands/version#--force-publish) +`--ignore-changes` | [#](https://github.com/lerna/lerna/tree/main/commands/publishhttps://github.com/lerna/lerna/tree/main/commands/version#--ignore-changes) `--include-merged-tags` | [#](https://github.com/lerna/lerna/tree/main/commands/publishhttps://github.com/lerna/lerna/tree/main/commands/version#--include-merged-tags) ### init @@ -424,13 +423,13 @@ lerna la - 如果不存在 `.gitignore`,则生成一个忽略文件 ----- +--- ```shell $ lerna init --independent ``` ----- +--- :- | :- :- | :- @@ -527,7 +526,6 @@ $ lerna diff package-name # 区分一个特定的包 类似于 `lerna changed`,此命令运行 `git diff` - ### clean 从所有包中删除 `node_modules` 目录 @@ -565,4 +563,4 @@ $ npm i lerna@latest $ lerna repair ``` -[`lerna repair`](https://github.com/lerna/lerna/tree/main/core/lerna/commands/repair#usage) 在升级后最有用,可确保应用新版本 lerna 的任何配置文件更改 \ No newline at end of file +[`lerna repair`](https://github.com/lerna/lerna/tree/main/core/lerna/commands/repair#usage) 在升级后最有用,可确保应用新版本 lerna 的任何配置文件更改 diff --git a/docs/lessjs.md b/docs/lessjs.md index 37e5dabac7e..afa23cf8b1f 100644 --- a/docs/lessjs.md +++ b/docs/lessjs.md @@ -72,7 +72,6 @@ $ lessc styles.less styles.css 另见: [混合(Mixin)的更多信息](https://lesscss.org/features/#mixins-feature) - ### 嵌套(Nesting) ```css @@ -716,4 +715,4 @@ each(range(4), { - [Less.js 官网](http://lesscss.org) _(lesscss.org)_ - [CSS 备忘清单](./css.md) _(jaywcjlove.github.io)_ - [Stylus 备忘清单](./stylus.md) _(jaywcjlove.github.io)_ -- [在线编译预览](http://lesscss.org/less-preview/#eyJjb2RlIjoiI2xpYigpIHtcbiAgICAuY29sb3JzKCkge1xuICAgICAgQHByaW1hcnk6IGJsdWU7XG4gICAgICBAc2Vjb25kYXJ5OiBncmVlbjtcbiAgICB9XG4gICAgLnJ1bGVzKEBzaXplKSB7XG4gICAgICBib3JkZXI6IEBzaXplIHNvbGlkIHdoaXRlO1xuICAgIH1cbiAgfVxuICBcbiAgLmJveCB3aGVuICgjbGliLmNvbG9yc1tAcHJpbWFyeV0gPSBibHVlKSB7XG4gICAgd2lkdGg6IDEwMHB4O1xuICAgIGhlaWdodDogKCR3aWR0aCAvIDIpO1xuICB9XG4gIFxuICAuYmFyOmV4dGVuZCguYm94KSB7XG4gICAgQG1lZGlhIChtaW4td2lkdGg6IDYwMHB4KSB7XG4gICAgICB3aWR0aDogMjAwcHg7XG4gICAgICAjbGliLnJ1bGVzKDFweCk7XG4gICAgfVxuICB9IiwiYWN0aXZlVmVyc2lvbiI6IjQueCJ9) _(lesscss.org)_ \ No newline at end of file +- [在线编译预览](http://lesscss.org/less-preview/#eyJjb2RlIjoiI2xpYigpIHtcbiAgICAuY29sb3JzKCkge1xuICAgICAgQHByaW1hcnk6IGJsdWU7XG4gICAgICBAc2Vjb25kYXJ5OiBncmVlbjtcbiAgICB9XG4gICAgLnJ1bGVzKEBzaXplKSB7XG4gICAgICBib3JkZXI6IEBzaXplIHNvbGlkIHdoaXRlO1xuICAgIH1cbiAgfVxuICBcbiAgLmJveCB3aGVuICgjbGliLmNvbG9yc1tAcHJpbWFyeV0gPSBibHVlKSB7XG4gICAgd2lkdGg6IDEwMHB4O1xuICAgIGhlaWdodDogKCR3aWR0aCAvIDIpO1xuICB9XG4gIFxuICAuYmFyOmV4dGVuZCguYm94KSB7XG4gICAgQG1lZGlhIChtaW4td2lkdGg6IDYwMHB4KSB7XG4gICAgICB3aWR0aDogMjAwcHg7XG4gICAgICAjbGliLnJ1bGVzKDFweCk7XG4gICAgfVxuICB9IiwiYWN0aXZlVmVyc2lvbiI6IjQueCJ9) _(lesscss.org)_ diff --git a/docs/lsof.md b/docs/lsof.md index 23a1fe6b9c5..681696f6026 100644 --- a/docs/lsof.md +++ b/docs/lsof.md @@ -78,7 +78,6 @@ $ kill -9 `lsof -t -u apache` $ kill -9 $(lsof -t -i :8080) ``` - ### 参数 @@ -109,13 +108,12 @@ lsof -p $pid lsof -i:9981 -P -t -sTCP:LISTEN ``` -### 列出打开文件的进程: +### 列出打开文件的进程 ```bash lsof $filename ``` - 示例 --- @@ -219,8 +217,7 @@ migration 2 root txt unknown /proc/2/exe `NAME` | 打开文件的确切名称 `REG` | 常规文件 - 另见 --- -- [lsof 命令帮助文档](https://jaywcjlove.github.io/linux-command/c/lsof.html) _(jaywcjlove.github.io)_ \ No newline at end of file +- [lsof 命令帮助文档](https://jaywcjlove.github.io/linux-command/c/lsof.html) _(jaywcjlove.github.io)_ diff --git a/docs/markdown.md b/docs/markdown.md index 2863e37cca1..d251c60c8cf 100644 --- a/docs/markdown.md +++ b/docs/markdown.md @@ -3,7 +3,6 @@ Markdown 备忘清单 这是 Markdown 语法的快速参考备忘单。 - Markdown 快速参考 ---- @@ -30,7 +29,6 @@ Header 2 -------- ``` - ### 块引用 ```markdown @@ -64,6 +62,7 @@ Header 2 + Item 1 + Item 2 ``` + 或者**任务**列表 ```markdown @@ -132,11 +131,13 @@ ___ ### 代码 -~~~markdown +```markdown + ```javascript console.log("This is a block code") ``` -~~~ + +``` ```markdown ~~~css @@ -144,12 +145,10 @@ console.log("This is a block code") ~~~ ``` - ```markdown 4 空格缩进做一个代码块 ``` - #### 内联代码 ```markdown @@ -246,4 +245,4 @@ Markdown 表格生成器:[tableconvert.com](https://tableconvert.com/) 另见 ---- -- [GitHub 风格的 Markdown 规范](https://github.github.com/gfm/) _(github.com)_ \ No newline at end of file +- [GitHub 风格的 Markdown 规范](https://github.github.com/gfm/) _(github.com)_ diff --git a/docs/matlab.md b/docs/matlab.md index 64d0c070596..e47314609a1 100644 --- a/docs/matlab.md +++ b/docs/matlab.md @@ -6,7 +6,6 @@ MATLAB 备忘清单 入门 --- - ### 介绍 MATLAB 是 `matrix laboratory` 的缩写形式 @@ -24,14 +23,18 @@ MATLAB 允许您使用单一的算术运算符或函数来处理矩阵中的所 ```matlab a + 10 ``` + MATLAB 将执行上述语句,并返回以下结果: + ``` ans = 3×3 11 13 15 12 14 16 17 18 20 ``` ---- + +---- + ```matlab sin(a) ``` @@ -50,7 +53,9 @@ ans = 3×3 ```matlab a' ``` + ---- + ``` ans = 3×3 1 2 7 @@ -63,7 +68,9 @@ ans = 3×3 ```matlab p = a*inv(a) ``` + ---- + ``` p = 3×3 1.0000 0 0 @@ -79,7 +86,9 @@ p = 3×3 ```matlab A = [a,a] ``` + ---- + ``` A = 3×6 @@ -93,7 +102,9 @@ A = 3×6 ```matlab A = [a; a] ``` + ---- + ``` A = 6×3 @@ -126,7 +137,9 @@ a = 1×4 ```matlab a = [1 3 5; 2 4 6; 7 8 10] ``` + ---- + ``` a = 3×3 1 3 5 @@ -139,7 +152,9 @@ a = 3×3 ```matlab z = zeros(5,1) ``` + ---- + ``` z = 5×1 0 @@ -156,6 +171,7 @@ z = 5×1 ```matlab sqrt(-1) ``` + ---- ``` @@ -167,7 +183,9 @@ ans = 0.0000 + 1.0000i ```matlab c = [3+4i, 4+3j; -i, 10j] ``` + ---- + ``` c = 2×2 complex @@ -180,8 +198,8 @@ c = 2×2 complex ### 输入命令 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [ans](https://ww2.mathworks.cn/help/matlab/ref/ans.html) | 最近计算的答案 [clc](https://ww2.mathworks.cn/help/matlab/ref/clc.html) | 清空命令行窗口 [diary](https://ww2.mathworks.cn/help/matlab/ref/diary.html) | 将命令行窗口文本记录到日志文件中 @@ -189,23 +207,22 @@ c = 2×2 complex [home](https://ww2.mathworks.cn/help/matlab/ref/home.html) | 发送光标复位 [iskeyword](https://ww2.mathworks.cn/help/matlab/ref/iskeyword.html) | 确定输入是否为 MATLAB 关键字 [more](https://ww2.mathworks.cn/help/matlab/ref/more.html) | 控制命令行窗口中的分页输出 -[commandwindow](https://ww2.mathworks.cn/help/matlab/ref/commandwindow.html) | 选择命令行窗口 +[commandwindow](https://ww2.mathworks.cn/help/matlab/ref/commandwindow.html) | 选择命令行窗口 [commandhistory](https://ww2.mathworks.cn/help/matlab/ref/commandhistory.html) | 打开命令历史记录窗口 #### 对象 -:- | :- -:- | :- +:- | :- +:- | :- [DisplayFormatOptions](https://ww2.mathworks.cn/help/matlab/ref/ans.html) | 命令行窗口中的输出显示格式 - ### 矩阵和数组 创建和合并数组 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [zeros](https://ww2.mathworks.cn/help/matlab/ref/zeros.html) | 创建全零数组 [ones](https://ww2.mathworks.cn/help/matlab/ref/ones.html) | 创建全部为 1 的数组 [rand](https://ww2.mathworks.cn/help/matlab/ref/rand.html) | 均匀分布的随机数 @@ -222,8 +239,8 @@ c = 2×2 complex 创建网格 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [linspace](https://ww2.mathworks.cn/help/matlab/ref/linspace.html) | 生成线性间距向量 [logspace](https://ww2.mathworks.cn/help/matlab/ref/logspace.html) | 生成对数间距向量 [freqspace](https://ww2.mathworks.cn/help/matlab/ref/freqspace.html) | 频率响应的频率间距 @@ -232,8 +249,8 @@ c = 2×2 complex 确定大小、形状和排序 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [length](https://ww2.mathworks.cn/help/matlab/ref/length.html) | 最大数组维度的长度 [size](https://ww2.mathworks.cn/help/matlab/ref/size.html) | 数组大小 [ndims](https://ww2.mathworks.cn/help/matlab/ref/double.ndims.html) | 数组维度数目 @@ -249,8 +266,8 @@ c = 2×2 complex 重构和重新排列 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [sort](https://ww2.mathworks.cn/help/matlab/ref/sort.html) | 对数组元素排序 [sortrows](https://ww2.mathworks.cn/help/matlab/ref/double.sortrows.html) | 对矩阵行或表行进行排序 [flip](https://ww2.mathworks.cn/help/matlab/ref/flip.html) | 翻转元素顺序 @@ -268,8 +285,8 @@ c = 2×2 complex 索引 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [colon](https://ww2.mathworks.cn/help/matlab/ref/colon.html) | 向量创建、数组下标和 for 循环迭代 [end](https://ww2.mathworks.cn/help/matlab/ref/end.html) | 终止代码块或指示最大数组索引 [ind2sub](https://ww2.mathworks.cn/help/matlab/ref/ind2sub.html) | 将线性索引转换为下标 @@ -280,8 +297,8 @@ c = 2×2 complex 创建数值变量 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [double](https://ww2.mathworks.cn/help/matlab/ref/double.html) | 双精度数组 [single](https://ww2.mathworks.cn/help/matlab/ref/single.html) | 单精度数组 [int8](https://ww2.mathworks.cn/help/matlab/ref/int8.html) | 8 位有符号整数数组 @@ -295,15 +312,15 @@ c = 2×2 complex 在数值类型之间转换 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [cast](https://ww2.mathworks.cn/help/matlab/ref/cast.html) | 将变量转换为不同的数据类型 [typecast](https://ww2.mathworks.cn/help/matlab/ref/typecast.html) | 在不更改基础数据的情况下转换数据类型 查询类型和值 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [allfinite](https://ww2.mathworks.cn/help/matlab/ref/allfinite.html") | Determine if all array elements are finite [anynan](https://ww2.mathworks.cn/help/matlab/ref/anynan.html") | Determine if any array element is NaN [isinteger](https://ww2.mathworks.cn/help/matlab/ref/isinteger.html) | 确定输入是否为整数数组 @@ -316,8 +333,8 @@ c = 2×2 complex 数值范围 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [eps](https://ww2.mathworks.cn/help/matlab/ref/eps.html) | 浮点相对精度 [flintmax](https://ww2.mathworks.cn/help/matlab/ref/flintmax.html) | 浮点格式的最大连续整数 [Inf](https://ww2.mathworks.cn/help/matlab/ref/inf.html) | 创建所有值均为 `Inf` 的数组 @@ -329,8 +346,8 @@ c = 2×2 complex ### 循环及条件语句 -:- | :- -:- | :- +:- | :- +:- | :- [if, elseif, else](https://ww2.mathworks.cn/help/matlab/ref/if.html) | 条件为 true 时执行语句 [switch, case, otherwise](https://ww2.mathworks.cn/help/matlab/ref/switch.html) | 执行多组语句中的一组 [for](https://ww2.mathworks.cn/help/matlab/ref/for.html) | 用来重复指定次数的 `for` 循环 @@ -346,8 +363,8 @@ c = 2×2 complex ### 字符串数组 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [string](https://ww2.mathworks.cn/help/matlab/ref/string.html) | 字符串数组 [strings](https://ww2.mathworks.cn/help/matlab/ref/strings.html) | 创建不包含字符的字符串数组 [join](https://ww2.mathworks.cn/help/matlab/ref/join.html) | 合并字符串 @@ -355,8 +372,8 @@ c = 2×2 complex ### 字符数组 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [char](https://ww2.mathworks.cn/help/matlab/ref/char.html) | 字符数组 [cellstr](https://ww2.mathworks.cn/help/matlab/ref/cellstr.html) | 转换为字符向量元胞数组 [blanks](https://ww2.mathworks.cn/help/matlab/ref/blanks.html) | 创建空白字符数组 @@ -364,8 +381,8 @@ c = 2×2 complex ### 字符或字符串数组 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [compose](https://ww2.mathworks.cn/help/matlab/ref/compose.html) | 将数据格式化为多个字符串 [sprintf](https://ww2.mathworks.cn/help/matlab/ref/sprintf.html) | 将数据格式化为字符串或字符向量 [strcat](https://ww2.mathworks.cn/help/matlab/ref/strcat.html) | 水平串联字符串 @@ -373,8 +390,8 @@ c = 2×2 complex ### 字符或字符串 - 转换输入参数 -:- | :- -:- | :- +:- | :- +:- | :- [convertCharsToStrings](https://ww2.mathworks.cn/help/matlab/ref/convertcharstostrings.html) | 将字符数组转换为字符串数组,其他数组不变 [convertStringsToChars](https://ww2.mathworks.cn/help/matlab/ref/convertstringstochars.html) | 将字符串数组转换为字符数组,其他数组不变 [convertContainedStringsToChars](https://ww2.mathworks.cn/help/matlab/ref/convertcontainedstringstochars.html) | 在元胞数组或结构体的任何级别转换字符串数组 @@ -382,8 +399,8 @@ c = 2×2 complex ### 字符或字符串 - 在数值和字符串之间转换 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [double](https://ww2.mathworks.cn/help/matlab/ref/double.html) | 双精度数组 [string](https://ww2.mathworks.cn/help/matlab/ref/string.html) | 字符串数组 [str2double](https://ww2.mathworks.cn/help/matlab/ref/str2double.html) | 将字符串转换为双精度值 @@ -394,8 +411,8 @@ c = 2×2 complex 数据类型 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [ischar](https://ww2.mathworks.cn/help/matlab/ref/ischar.html) | 确定输入是否为字符数组 [iscellstr](https://ww2.mathworks.cn/help/matlab/ref/iscellstr.html) | 确定输入是否为字符向量元胞数组 [isstring](https://ww2.mathworks.cn/help/matlab/ref/isstring.html) | 确定输入是否为字符串数组 @@ -403,8 +420,8 @@ c = 2×2 complex 文本属性 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [strlength](https://ww2.mathworks.cn/help/matlab/ref/strlength.html) | 字符串长度 [isstrprop](https://ww2.mathworks.cn/help/matlab/ref/isstrprop.html) | 确定输入字符串中的哪些字符属于指定类别 [isletter](https://ww2.mathworks.cn/help/matlab/ref/isletter.html) | 确定哪些字符为字母 @@ -415,8 +432,8 @@ c = 2×2 complex 查找 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [contains](https://ww2.mathworks.cn/help/matlab/ref/contains.html) | 确定字符串中是否有模式 [matches](https://ww2.mathworks.cn/help/matlab/ref/matches.html) | 确定模式是否与字符串匹配 [count](https://ww2.mathworks.cn/help/matlab/ref/count.html) | 计算字符串中模式的出现次数 @@ -427,22 +444,22 @@ c = 2×2 complex 替换 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [replace](https://ww2.mathworks.cn/help/matlab/ref/replace.html) | 查找并替换一个或多个子字符串 [replaceBetween](https://ww2.mathworks.cn/help/matlab/ref/replacebetween.html) | 替换起点和终点之间的子字符串 [strrep](https://ww2.mathworks.cn/help/matlab/ref/strrep.html) | 查找并替换子字符串 ### 字符串匹配模式 - 构建模式 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [pattern](https://ww2.mathworks.cn/help/matlab/ref/pattern.html) | 用于搜索和匹配文本的模式 ### 字符串匹配模式 - 字符匹配模式 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [alphanumericsPattern](https://ww2.mathworks.cn/help/matlab/ref/alphanumericspattern.html) | 匹配字母和数字字符 [characterListPattern](https://ww2.mathworks.cn/help/matlab/ref/characterlistpattern.html) | 匹配列表中的字符 [digitsPattern](https://ww2.mathworks.cn/help/matlab/ref/digitspattern.html) | 匹配数字字符 @@ -452,8 +469,8 @@ c = 2×2 complex ### 字符串匹配模式 - 模式搜索规则 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [optionalPattern](https://ww2.mathworks.cn/help/matlab/ref/optionalpattern.html) | 使模式匹配可选 [possessivePattern](https://ww2.mathworks.cn/help/matlab/ref/possessivepattern.html) | 匹配模式而不回溯 [caseSensitivePattern](https://ww2.mathworks.cn/help/matlab/ref/casesensitivepattern.html) | 以区分大小写的方式匹配模式 @@ -464,8 +481,8 @@ c = 2×2 complex ### 字符串匹配模式 - 边界模式 -:- | :- -:- | :- +:- | :- +:- | :- [alphanumericBoundary](https://ww2.mathworks.cn/help/matlab/ref/alphanumericboundary.html) | 匹配字母数字字符与非字母数字字符之间的边界 [digitBoundary](https://ww2.mathworks.cn/help/matlab/ref/digitboundary.html) | 匹配数字字符和非数字字符之间的边界 [letterBoundary](https://ww2.mathworks.cn/help/matlab/ref/letterboundary.html) | 匹配字母字符和非字母字符之间的边界 @@ -478,27 +495,25 @@ c = 2×2 complex ### 字符串匹配模式 - 自定义模式显示 - -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [maskedPattern](https://ww2.mathworks.cn/help/matlab/ref/maskedpattern.html) | 具有指定显示名称的模式 [namedPattern](https://ww2.mathworks.cn/help/matlab/ref/namedpattern.html) | 指定命名模式 ### 字符串匹配模式 - 正则表达式 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [regexp](https://ww2.mathworks.cn/help/matlab/ref/regexp.html) | 匹配正则表达式(区分大小写) [regexpi](https://ww2.mathworks.cn/help/matlab/ref/regexpi.html) | 匹配正则表达式(不区分大小写) [regexprep](https://ww2.mathworks.cn/help/matlab/ref/regexprep.html) | 使用正则表达式替换文本 [regexptranslate](https://ww2.mathworks.cn/help/matlab/ref/regexptranslate.html) | 将文本转换为正则表达式 [regexpPattern](https://ww2.mathworks.cn/help/matlab/ref/regexppattern.html) | 匹配指定正则表达式的模式 - ### 字符串匹配模式 - 联接和拆分 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [join](https://ww2.mathworks.cn/help/matlab/ref/join.html) | 合并字符串 [plus](https://ww2.mathworks.cn/help/matlab/ref/plus.html) | 添加数字,追加字符串 [split](https://ww2.mathworks.cn/help/matlab/ref/split.html) | 在分隔符处拆分字符串 @@ -514,8 +529,8 @@ c = 2×2 complex ### 字符串编辑 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [erase](https://ww2.mathworks.cn/help/matlab/ref/erase.html) | 删除字符串内的子字符串 [eraseBetween](https://ww2.mathworks.cn/help/matlab/ref/erasebetween.html) | 删除起点和终点之间的子字符串 [extract](https://ww2.mathworks.cn/help/matlab/ref/extract.html) | 从字符串中提取子字符串 @@ -535,15 +550,14 @@ c = 2×2 complex ### 字符串比较 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [matches](https://ww2.mathworks.cn/help/matlab/ref/matches.html) | 确定模式是否与字符串匹配 [strcmp](https://ww2.mathworks.cn/help/matlab/ref/strcmp.html) | 比较字符串 [strcmpi](https://ww2.mathworks.cn/help/matlab/ref/strcmpi.html) | 比较字符串(不区分大小写) [strncmp](https://ww2.mathworks.cn/help/matlab/ref/strncmp.html) | 比较字符串的前 n 个字符(区分大小写) [strncmpi](https://ww2.mathworks.cn/help/matlab/ref/strncmpi.html) | 比较字符串的前 n 个字符(不区分大小写) - ### 基本算术 @@ -563,8 +577,8 @@ c = 2×2 complex 乘法 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [.*](https://ww2.mathworks.cn/help/matlab/ref/times.html) | 乘法 [*](https://ww2.mathworks.cn/help/matlab/ref/mtimes.html) | 矩阵乘法 [prod](https://ww2.mathworks.cn/help/matlab/ref/prod.html) | 数组元素的乘积 @@ -574,8 +588,8 @@ c = 2×2 complex 除法 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [./](https://ww2.mathworks.cn/help/matlab/ref/rdivide.html) | 数组右除 [.\\](https://ww2.mathworks.cn/help/matlab/ref/ldivide.html) | 数组左除 [/](https://ww2.mathworks.cn/help/matlab/ref/mrdivide.html) | 求解关于 x 的线性方程组 xA = B @@ -589,8 +603,8 @@ c = 2×2 complex 转置 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [.'](https://ww2.mathworks.cn/help/matlab/ref/transpose.html) | 转置向量或矩阵 ['](https://ww2.mathworks.cn/help/matlab/ref/ctranspose.html) | 复共轭转置 [pagetranspose](https://ww2.mathworks.cn/help/matlab/ref/pagetranspose.html) | 按页转置 @@ -604,8 +618,8 @@ c = 2×2 complex ### 模除法和舍入 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [mod](https://ww2.mathworks.cn/help/matlab/ref/mod.html) | 除后的余数(取模运算) [rem](https://ww2.mathworks.cn/help/matlab/ref/rem.html) | 除后的余数 [idivide](https://ww2.mathworks.cn/help/matlab/ref/idivide.html) | 带有舍入选项的整除 @@ -616,17 +630,16 @@ c = 2×2 complex ### 自定义二元函数 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [bsxfun](https://ww2.mathworks.cn/help/matlab/ref/bsxfun.html) | 对两个数组应用按元素运算(启用隐式扩展) - ### 关系运算 值的比较 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [==](https://ww2.mathworks.cn/help/matlab/ref/eq.html) | 确定相等性 [>=](https://ww2.mathworks.cn/help/matlab/ref/ge.html) | 决定大于或等于 [>](https://ww2.mathworks.cn/help/matlab/ref/gt.html) | 确定大于 @@ -640,8 +653,8 @@ c = 2×2 complex true 或 false 条件 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [Short-circuit &&, \|\|](https://ww2.mathworks.cn/help/matlab/ref/logicaloperatorsshortcircuit.html) | 具有短路功能的逻辑运算 [&](https://ww2.mathworks.cn/help/matlab/ref/and.html) | 计算逻辑 `AND` [~](https://ww2.mathworks.cn/help/matlab/ref/not.html) | 计算逻辑 `NOT` @@ -659,8 +672,8 @@ true 或 false 条件 并集、交集、集合关系 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [intersect](https://ww2.mathworks.cn/help/matlab/ref/double.intersect.html) | 设置两个数组的交集 [ismember](https://ww2.mathworks.cn/help/matlab/ref/double.ismember.html) | 判断数组元素是否为集数组成员 [setdiff](https://ww2.mathworks.cn/help/matlab/ref/double.setdiff.html) | 设置两个数组的差集 @@ -677,8 +690,8 @@ true 或 false 条件 设置、偏移或比较特定位域 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [bitand](https://ww2.mathworks.cn/help/matlab/ref/bitand.html) | 按位 `AND` [bitor](https://ww2.mathworks.cn/help/matlab/ref/bitor.html) | 按位 `OR` [bitxor](https://ww2.mathworks.cn/help/matlab/ref/bitxor.html) | 按位 `XOR` @@ -688,7 +701,6 @@ true 或 false 条件 [bitshift](https://ww2.mathworks.cn/help/matlab/ref/bitshift.html) | 将位移动指定位数 [swapbytes](https://ww2.mathworks.cn/help/matlab/ref/swapbytes.html) | 交换字节顺序 - 数据导入和导出 --- @@ -697,8 +709,8 @@ true 或 false 条件 #### 基本导入和导出 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [readtable](https://ww2.mathworks.cn/help/matlab/ref/readtable.html) | 基于文件创建表 [writetable](https://ww2.mathworks.cn/help/matlab/ref/writetable.html) | 将表写入文件 [readtimetable](https://ww2.mathworks.cn/help/matlab/ref/readtimetable.html) | 基于文件创建时间表 @@ -706,8 +718,8 @@ true 或 false 条件 #### 定义导入规则 -:- | :- -:- | :- +:- | :- +:- | :- [detectImportOptions](https://ww2.mathworks.cn/help/matlab/ref/detectimportoptions.html) | 基于文件内容生成导入选项 [delimitedTextImportOptions](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.text.delimitedtextimportoptions.html) | 为带分隔符的文本导入选项对象 [fixedWidthImportOptions](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.text.fixedwidthimportoptions.html) | 等宽文本文件的导入选项对象 @@ -722,8 +734,8 @@ true 或 false 条件 ### 文本文件 - 读取和写入矩阵和数组 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [readmatrix](https://ww2.mathworks.cn/help/matlab/ref/readmatrix.html) | 从文件中读取矩阵 [writematrix](https://ww2.mathworks.cn/help/matlab/ref/writematrix.html) | 将矩阵写入文件 [readcell](https://ww2.mathworks.cn/help/matlab/ref/readcell.html) | 从文件中读取元胞数组 @@ -740,8 +752,8 @@ true 或 false 条件 基本导入和导出 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [readtable](https://ww2.mathworks.cn/help/matlab/ref/readtable.html) | 基于文件创建表 [writetable](https://ww2.mathworks.cn/help/matlab/ref/writetable.html) | 将表写入文件 [readtimetable](https://ww2.mathworks.cn/help/matlab/ref/readtimetable.html) | 基于文件创建时间表 @@ -750,8 +762,8 @@ true 或 false 条件 定义导入规则 -:- | :- -:- | :- +:- | :- +:- | :- [detectImportOptions](https://ww2.mathworks.cn/help/matlab/ref/detectimportoptions.html) | 基于文件内容生成导入选项 [spreadsheetImportOptions](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.spreadsheet.spreadsheetimportoptions.html) | 电子表格的导入选项对象 [getvaropts](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.text.delimitedtextimportoptions.getvaropts.html) | 获取变量导入选项 @@ -762,8 +774,8 @@ true 或 false 条件 ### 电子表格 - 读取和写入矩阵和数组 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [readmatrix](https://ww2.mathworks.cn/help/matlab/ref/readmatrix.html) | 从文件中读取矩阵 [writematrix](https://ww2.mathworks.cn/help/matlab/ref/writematrix.html) | 将矩阵写入文件 [readcell](https://ww2.mathworks.cn/help/matlab/ref/readcell.html) | 从文件中读取元胞数组 @@ -773,8 +785,8 @@ true 或 false 条件 ### 图像 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [imfinfo](https://ww2.mathworks.cn/help/matlab/ref/imfinfo.html) | 有关图形文件的信息 [imread](https://ww2.mathworks.cn/help/matlab/ref/imread.html) | 从图形文件读取图像 [imwrite](https://ww2.mathworks.cn/help/matlab/ref/imwrite.html) | 将图像写入图形文件 @@ -783,8 +795,8 @@ true 或 false 条件 ### 读取或写入 NetCDF 文件 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [nccreate](https://ww2.mathworks.cn/help/matlab/ref/nccreate.html) | 在 NetCDF 文件中创建变量 [ncdisp](https://ww2.mathworks.cn/help/matlab/ref/ncdisp.html) | 在命令行窗口中显示 NetCDF 数据源内容 [ncinfo](https://ww2.mathworks.cn/help/matlab/ref/ncinfo.html) | 返回有关 NetCDF 数据源的信息 @@ -796,8 +808,8 @@ true 或 false 条件 ### NetCDF 库程序包 - 库函数 -:- | :- -:- | :- +:- | :- +:- | :- [netcdf.getChunkCache](https://ww2.mathworks.cn/help/matlab/ref/netcdf.getchunkcache.html) | 检索 NetCDF 库的区块缓存设置 [netcdf.inqLibVers](https://ww2.mathworks.cn/help/matlab/ref/netcdf.inqlibvers.html) | 返回 NetCDF 库版本信息 [netcdf.setChunkCache](https://ww2.mathworks.cn/help/matlab/ref/netcdf.setchunkcache.html) | 设置 NetCDF 库的默认分块缓存设置 @@ -807,8 +819,8 @@ true 或 false 条件 ### NetCDF 库程序包 - 文件操作 -:- | :- -:- | :- +:- | :- +:- | :- [netcdf.abort](https://ww2.mathworks.cn/help/matlab/ref/netcdf.abort.html) | 还原最近的 netCDF 文件定义 [netcdf.close](https://ww2.mathworks.cn/help/matlab/ref/netcdf.close.html) | 关闭 netCDF 文件 [netcdf.create](https://ww2.mathworks.cn/help/matlab/ref/netcdf.create.html) | 创建新的 NetCDF 数据集 @@ -824,9 +836,8 @@ true 或 false 条件 ### NetCDF 库程序包 - 维度 - -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [netcdf.defDim](https://ww2.mathworks.cn/help/matlab/ref/netcdf.defdim.html) | 创建 netCDF 维度 [netcdf.inqDim](https://ww2.mathworks.cn/help/matlab/ref/netcdf.inqdim.html) | 返回 netCDF 维度名称和长度 [netcdf.inqDimID](https://ww2.mathworks.cn/help/matlab/ref/netcdf.inqdimid.html) | 返回维度 ID @@ -834,8 +845,8 @@ true 或 false 条件 ### NetCDF 库程序包 - 组 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [netcdf.defGrp](https://ww2.mathworks.cn/help/matlab/ref/netcdf.defgrp.html) | 在 NetCDF 文件中创建组 [netcdf.inqDimIDs](https://ww2.mathworks.cn/help/matlab/ref/netcdf.inqdimids.html) | 检索组中维度标识符列表 [netcdf.inqGrpName](https://ww2.mathworks.cn/help/matlab/ref/netcdf.inqgrpname.html) | 检索组名 @@ -847,8 +858,8 @@ true 或 false 条件 ### NetCDF 库程序包 - 变量 -:- | :- -:- | :- +:- | :- +:- | :- [netcdf.defVarFill](https://ww2.mathworks.cn/help/matlab/ref/netcdf.defvarfill.html) | 定义 NetCDF 变量的填充参数 [netcdf.defVar](https://ww2.mathworks.cn/help/matlab/ref/netcdf.defvar.html) | 创建 NetCDF 变量 [netcdf.defVarChunking](https://ww2.mathworks.cn/help/matlab/ref/netcdf.defvarchunking.html) | 定义 NetCDF 变量的分块行为 @@ -867,8 +878,8 @@ true 或 false 条件 ### NetCDF 库程序包 - 属性 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [netcdf.copyAtt](https://ww2.mathworks.cn/help/matlab/ref/netcdf.copyatt.html) | 将属性复制到新位置 [netcdf.delAtt](https://ww2.mathworks.cn/help/matlab/ref/netcdf.delatt.html) | 删除 netCDF 属性 [netcdf.getAtt](https://ww2.mathworks.cn/help/matlab/ref/netcdf.getatt.html) | 返回 NetCDF 属性 @@ -880,8 +891,8 @@ true 或 false 条件 ### NetCDF 库程序包 - 用户定义的类型 -:- | :- -:- | :- +:- | :- +:- | :- [netcdf.defVlen](https://ww2.mathworks.cn/help/matlab/ref/netcdf.defvlen.html) | Define user-defined variable length array type (NC_VLEN) [netcdf.inqUserType](https://ww2.mathworks.cn/help/matlab/ref/netcdf.inqusertype.html) | Return information about user-defined type [netcdf.inqVlen](https://ww2.mathworks.cn/help/matlab/ref/netcdf.inqvlen.html) | Return information about user-defined `NC_VLEN` type @@ -889,16 +900,16 @@ true 或 false 条件 ### NetCDF 库程序包 - 实用工具 -:- | :- -:- | :- +:- | :- +:- | :- [netcdf.getConstant](https://ww2.mathworks.cn/help/matlab/ref/netcdf.getconstant.html) | 返回命名常量的数值 [netcdf.getConstantNames](https://ww2.mathworks.cn/help/matlab/ref/netcdf.getconstantnames.html) | 返回 netCDF 库已知的常量列表 ### 读取或写入 HDF5 文件 -:- | :- | :- -:- | :- | :- +:- | :- | :- +:- | :- | :- [h5create](https://ww2.mathworks.cn/help/matlab/ref/h5create.html) | 创建 HDF5 数据集 [h5disp](https://ww2.mathworks.cn/help/matlab/ref/h5disp.html) | 显示 HDF5 文件的内容 [h5info](https://ww2.mathworks.cn/help/matlab/ref/h5info.html) | 有关 HDF5 文件的信息 @@ -907,12 +918,11 @@ true 或 false 条件 [h5write](https://ww2.mathworks.cn/help/matlab/ref/h5write.html) | 写入 HDF5 数据集 [h5writeatt](https://ww2.mathworks.cn/help/matlab/ref/h5writeatt.html) | 写入 HDF5 属性 - ### HDF5 库程序包 -:- | :- -:- | :- +:- | :- +:- | :- [Library (H5)](https://ww2.mathworks.cn/help/matlab/ref/libraryh5.html) | General-purpose functions for use with entire HDF5 library [Attribute (H5A)](https://ww2.mathworks.cn/help/matlab/ref/attributeh5a.html) | Metadata associated with datasets or groups [Dataset (H5D)](https://ww2.mathworks.cn/help/matlab/ref/dataseth5d.html) | Multidimensional arrays of data elements and supporting metadata @@ -932,8 +942,8 @@ true 或 false 条件 ### HDF4 文件 - 高级函数 -:- | :- -:- | :- +:- | :- +:- | :- [hdfinfo](https://ww2.mathworks.cn/help/matlab/ref/hdfinfo.html) | 有关 HDF4 或 HDF-EOS 文件的信息 [hdfread](https://ww2.mathworks.cn/help/matlab/ref/hdfread.html) | 从 HDF4 或 HDF-EOS 文件读取数据 [imread](https://ww2.mathworks.cn/help/matlab/ref/imread.html) | 从图形文件读取图像 @@ -942,16 +952,16 @@ true 或 false 条件 ### 低级函数 - 包 -:- | :- -:- | :- +:- | :- +:- | :- [matlab.io.hdf4.sd](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.hdf4.sd.html) | 直接与 HDF4 多文件科学数据集 (SD) 接口交互 [matlab.io.hdfeos.gd](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.hdfeos.gd.html) | 低级别访问 HDF-EOS 网格数据 [matlab.io.hdfeos.sw](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.hdfeos.sw.html) | 对 HDF-EOS 分段文件的低级别访问 #### 低级函数 - 函数 -:- | :- -:- | :- +:- | :- +:- | :- [hdfan](https://ww2.mathworks.cn/help/matlab/ref/hdfan.html) | HDF 多文件注释 (AN) 接口的入口 [hdfhx](https://ww2.mathworks.cn/help/matlab/ref/hdfhx.html) | HDF 外部数据 (HX) 接口的入口 [hdfh](https://ww2.mathworks.cn/help/matlab/ref/hdfh.html) | HDF H 接口的入口 @@ -966,11 +976,10 @@ true 或 false 条件 [hdfdf24](https://ww2.mathworks.cn/help/matlab/ref/hdfdf24.html) | HDF 24 位光栅图像 (DF24) 接口的入口 [hdfdfr8](https://ww2.mathworks.cn/help/matlab/ref/hdfdfr8.html) | HDF 8 位光栅图像 (DFR8) 接口的入口 - ### FITS 文件 - 函数 -:- | :- -:- | :- +:- | :- +:- | :- [fitsdisp](https://ww2.mathworks.cn/help/matlab/ref/fitsdisp.html) | 显示 FITS 元数据 [fitsinfo](https://ww2.mathworks.cn/help/matlab/ref/fitsinfo.html) | 有关 FITS 文件的信息 [fitsread](https://ww2.mathworks.cn/help/matlab/ref/fitsread.html) | 读取 FITS 文件中的数据 @@ -978,8 +987,8 @@ true 或 false 条件 ### FITS 文件 - 文件访问 -:- | :- -:- | :- +:- | :- +:- | :- [createFile](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.createfile.html) | 创建 FITS 文件 [openFile](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.openfile.html) | 打开 FITS 文件 [openDiskFile](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.opendiskfile.html) | 打开 FITS 文件 @@ -990,8 +999,8 @@ true 或 false 条件 ### FITS 文件 - 图像处理 -:- | :- -:- | :- +:- | :- +:- | :- [createImg](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.createimg.html) | 创建 FITS 图像 [getImgSize](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.getimgsize.html) | 图像大小 [getImgType](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.getimgtype.html) | 图像的数据类型 @@ -1003,8 +1012,8 @@ true 或 false 条件 ### FITS 文件 - 关键字 -:- | :- -:- | :- +:- | :- +:- | :- [readCard](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.readcard.html) | 关键字的标头记录 [readKey](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.readkey.html) | 关键字 [readKeyCmplx](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.readkeycmplx.html) | 复数标量值形式的关键字 @@ -1024,8 +1033,8 @@ true 或 false 条件 ### FITS 文件 - 标头数据单元 (HDU) 访问 -:- | :- -:- | :- +:- | :- +:- | :- [copyHDU](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.copyhdu.html) | 将当前 HDU 从一个文件复制到另一个文件 [getHDUnum](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.gethdunum.html) | FITS 文件中当前 HDU 的编号 [getHDUtype](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.gethdutype.html) | 当前 HDU 的类型 @@ -1038,8 +1047,8 @@ true 或 false 条件 ### FITS 文件 - 图像压缩 -:- | :- -:- | :- +:- | :- +:- | :- [imgCompress](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.imgcompress.html) | 将 HDU 从一个文件压缩到另一个文件中 [isCompressedImg](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.iscompressedimg.html) | 确定当前图像是否已压缩 [setCompressionType](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.setcompressiontype.html) | 设置图像压缩类型 @@ -1050,8 +1059,8 @@ true 或 false 条件 ### FITS 文件 - ASCII 表和二进制表 -:- | :- -:- | :- +:- | :- +:- | :- [createTbl](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.createtbl.html) | 创建新的 ASCII 或二进制表扩展 [insertCol](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.insertcol.html) | 向表插入列 [insertRows](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.insertrows.html) | 向表插入行 @@ -1074,23 +1083,23 @@ true 或 false 条件 ### FITS 文件 - 实用工具 -:- | :- -:- | :- +:- | :- +:- | :- [getConstantValue](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.getconstantvalue.html) | 指定常量的数值 [getVersion](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.getversion.html) | CFITSIO 库的修订号 [getOpenFiles](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.fits.getopenfiles.html) | 已打开的 FITS 文件列表 ### 条带交错文件 -:- | :- -:- | :- +:- | :- +:- | :- [multibandread](https://ww2.mathworks.cn/help/matlab/ref/multibandread.html) | 从二进制文件读取条带交错文件 [multibandwrite](https://ww2.mathworks.cn/help/matlab/ref/multibandwrite.html) | 将条带交错数据写入文件 ### 常用数据格式 (CDF) -:- | :- -:- | :- +:- | :- +:- | :- [cdfinfo](https://ww2.mathworks.cn/help/matlab/ref/cdfinfo.html) | 有关常用数据格式 (CDF) 文件的信息 [cdfread](https://ww2.mathworks.cn/help/matlab/ref/cdfread.html) | 读取常用数据格式 (CDF) 文件中的数据 [cdfepoch](https://ww2.mathworks.cn/help/matlab/ref/cdfepoch.html) | 将日期文本或日期序列值转换为 CDF 格式的日期 @@ -1098,14 +1107,14 @@ true 或 false 条件 #### 包 -:- | :- -:- | :- +:- | :- +:- | :- [cdflib](https://ww2.mathworks.cn/help/matlab/ref/cdflib.html) | 与 CDF 库直接交互 ### 读取视频数据 -:- | :- -:- | :- +:- | :- +:- | :- [VideoReader](https://ww2.mathworks.cn/help/matlab/ref/videoreader.html) | 创建对象以读取视频文件 [read](https://ww2.mathworks.cn/help/matlab/ref/videoreader.read.html) | 读取一个或多个视频帧 [readFrame](https://ww2.mathworks.cn/help/matlab/ref/videoreader.readframe.html) | 读取下一个视频帧 @@ -1115,8 +1124,8 @@ true 或 false 条件 ### 写入视频数据 -:- | :- -:- | :- +:- | :- +:- | :- [VideoWriter](https://ww2.mathworks.cn/help/matlab/ref/videowriter.html) | 创建对象以写入视频文件 [open](https://ww2.mathworks.cn/help/matlab/ref/videowriter.open.html) | 打开文件以写入视频数据 [writeVideo](https://ww2.mathworks.cn/help/matlab/ref/videowriter.writevideo.html) | 将视频数据写入到文件 @@ -1125,8 +1134,8 @@ true 或 false 条件 ### 读取或写入音频 -:- | :- -:- | :- +:- | :- +:- | :- [audioread](https://ww2.mathworks.cn/help/matlab/ref/audioread.html) | 读取音频文件 [audiowrite](https://ww2.mathworks.cn/help/matlab/ref/audiowrite.html) | 写音频文件 [lin2mu](https://ww2.mathworks.cn/help/matlab/ref/lin2mu.html) | 将线性音频信号转换为 mu-law @@ -1135,8 +1144,8 @@ true 或 false 条件 ### 播放音频 -:- | :- -:- | :- +:- | :- +:- | :- [audioplayer](https://ww2.mathworks.cn/help/matlab/ref/audioplayer.html) | 用于播放音频的对象 [isplaying](https://ww2.mathworks.cn/help/matlab/ref/audioplayer.isplaying.html) | 确定播放是否正在进行 [pause](https://ww2.mathworks.cn/help/matlab/ref/audioplayer.pause.html) | 暂停播放或录制 @@ -1147,8 +1156,8 @@ true 或 false 条件 ### 录制音频 -:- | :- -:- | :- +:- | :- +:- | :- [audiorecorder](https://ww2.mathworks.cn/help/matlab/ref/audiorecorder.html) | 用于录制音频的对象 [getaudiodata](https://ww2.mathworks.cn/help/matlab/ref/audiorecorder.getaudiodata.html) | 将录制的音频信号存储在数值数组中 [getplayer](https://ww2.mathworks.cn/help/matlab/ref/audiorecorder.getplayer.html) | 创建关联的 `audioplayer` 对象 @@ -1158,8 +1167,8 @@ true 或 false 条件 ### 播放声音 -:- | :- -:- | :- +:- | :- +:- | :- [audiodevinfo](https://ww2.mathworks.cn/help/matlab/ref/audiodevinfo.html) | 有关音频设备的信息 [audiodevreset](https://ww2.mathworks.cn/help/matlab/ref/audiodevreset.html) | 刷新可用音频设备列表 [sound](https://ww2.mathworks.cn/help/matlab/ref/sound.html) | 将信号数据矩阵转换为声音 @@ -1168,8 +1177,8 @@ true 或 false 条件 ### XML 文档的读取和写入 -:- | :- -:- | :- +:- | :- +:- | :- [matlab.io.xml.dom.DOMWriter](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.xml.dom.domwriter-class.html) | 串行化 XML 文档的写入器 [matlab.io.xml.dom.EntityResolver](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.xml.dom.entityresolver-class.html) | 实体解析器的抽象基类 [matlab.io.xml.dom.FileWriter](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.xml.dom.filewriter-class.html) | 创建文本文件的写入器 @@ -1187,8 +1196,8 @@ true 或 false 条件 ### W3C DOM -:- | :- -:- | :- +:- | :- +:- | :- [matlab.io.xml.dom.Attr](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.xml.dom.attr-class.html) | XML 元素的属性 [matlab.io.xml.dom.CDATASection](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.xml.dom.cdatasection-class.html) | CDATA 节 [matlab.io.xml.dom.Comment](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.xml.dom.comment-class.html) | XML 文档中的注释 @@ -1207,8 +1216,8 @@ true 或 false 条件 ### XML 变换 -:- | :- -:- | :- +:- | :- +:- | :- [matlab.io.xml.transform.CompiledStylesheet](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.xml.transform.compiledstylesheet-class.html) | 编译的样式表 [matlab.io.xml.transform.ResultDocument](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.xml.transform.resultdocument-class.html) | 将转换结果存储为文档 [matlab.io.xml.transform.ResultString](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.xml.transform.resultstring-class.html) | 将转换结果存储为字符串 @@ -1225,8 +1234,8 @@ true 或 false 条件 ### XPath 查询 -:- | :- -:- | :- +:- | :- +:- | :- [matlab.io.xml.xpath.CompiledExpression](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.xml.xpath.compiledexpression-class.html) | 编译的 XPath 表达式 [matlab.io.xml.xpath.EvalResultType](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.xml.xpath.evalresulttype-class.html) | XPath 表达式计算的结果类型 [matlab.io.xml.xpath.Evaluator](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.xml.xpath.evaluator-class.html) | XPath 表达式计算器 @@ -1235,8 +1244,8 @@ true 或 false 条件 ### JSON 格式 -:- | :- -:- | :- +:- | :- +:- | :- [jsondecode](https://ww2.mathworks.cn/help/matlab/ref/jsondecode.html) | 解码 JSON 格式的文本 [jsonencode](https://ww2.mathworks.cn/help/matlab/ref/jsonencode.html) | 基于结构化 `MATLAB` 数据创建 JSON 格式的文本 @@ -1244,8 +1253,8 @@ true 或 false 条件 ### 工作区变量和 MAT 文件 -:- | :- -:- | :- +:- | :- +:- | :- [load](https://ww2.mathworks.cn/help/matlab/ref/load.html) | 将文件变量加载到工作区中 [save](https://ww2.mathworks.cn/help/matlab/ref/save.html) | 将工作区变量保存到文件中 [matfile](https://ww2.mathworks.cn/help/matlab/ref/matlab.io.matfile.html) | 访问和更改 MAT 文件中的变量,而不必将文件加载到内存中 @@ -1261,8 +1270,8 @@ true 或 false 条件 ### 低级文件 I/O -:- | :- -:- | :- +:- | :- +:- | :- [fclose](https://ww2.mathworks.cn/help/matlab/ref/fclose.html) | 关闭一个或所有打开的文件 [feof](https://ww2.mathworks.cn/help/matlab/ref/feof.html) | 检测文件末尾 [ferror](https://ww2.mathworks.cn/help/matlab/ref/ferror.html) | 文件 I/O 错误信息 @@ -1280,8 +1289,8 @@ true 或 false 条件 ### 串行和 USB 通信 - 连接和配置 -:- | :- -:- | :- +:- | :- +:- | :- [serialportlist](https://ww2.mathworks.cn/help/matlab/ref/serialportlist.html) | 连接到您的系统的串行端口列表 [serialport](https://ww2.mathworks.cn/help/matlab/ref/serialport.html) | 连接到串行端口 [configureTerminator](https://ww2.mathworks.cn/help/matlab/ref/serialport.configureterminator.html) | 为与串行端口的 ASCII 字符串通信设置终止符 @@ -1289,8 +1298,8 @@ true 或 false 条件 ### 串行和 USB 通信 - 读取和写入 -:- | :- -:- | :- +:- | :- +:- | :- [read](https://ww2.mathworks.cn/help/matlab/ref/serialport.read.html) | 从串行端口读取数据 [readline](https://ww2.mathworks.cn/help/matlab/ref/serialport.readline.html) | 从串行端口读取 ASCII 字符串数据行 [write](https://ww2.mathworks.cn/help/matlab/ref/serialport.write.html) | 将数据写入串行端口 @@ -1298,18 +1307,17 @@ true 或 false 条件 ### 串行和 USB 通信 - 控制引脚和内存 -:- | :- -:- | :- +:- | :- +:- | :- [flush](https://ww2.mathworks.cn/help/matlab/ref/serialport.flush.html) | 清空串行端口设备缓冲区 [getpinstatus](https://ww2.mathworks.cn/help/matlab/ref/serialport.getpinstatus.html) | 获取串行引脚状态 [setRTS](https://ww2.mathworks.cn/help/matlab/ref/serialport.setrts.html) | 设置串行 RTS 引脚 [setDTR](https://ww2.mathworks.cn/help/matlab/ref/serialport.setdtr.html) | 设置串行 DTR 引脚 - ### TCP/IP 通信 - 连接和配置 -:- | :- -:- | :- +:- | :- +:- | :- [tcpclient](https://ww2.mathworks.cn/help/matlab/ref/tcpclient.html) | 创建与 TCP/IP 服务器的 TCP/IP 客户端连接 [echotcpip](https://ww2.mathworks.cn/help/matlab/ref/echotcpip.html) | 启动或停止 TCP/IP 回显服务器 [configureTerminator](https://ww2.mathworks.cn/help/matlab/ref/tcpclient.configureterminator.html) | 为通过 TCP/IP 与远程主机进行的 ASCII 字符串通信设置终止符 @@ -1318,8 +1326,8 @@ true 或 false 条件 ### TCP/IP 通信 - 读取和写入 -:- | :- -:- | :- +:- | :- +:- | :- [read](https://ww2.mathworks.cn/help/matlab/ref/tcpclient.read.html) | 通过 TCP/IP 读取远程主机上的数据 [readline](https://ww2.mathworks.cn/help/matlab/ref/tcpclient.readline.html) | 通过 TCP/IP 从远程主机读取 ASCII 字符串数据行 [write](https://ww2.mathworks.cn/help/matlab/ref/tcpclient.write.html) | 通过 TCP/IP 向远程主机写入数据 @@ -1329,8 +1337,8 @@ true 或 false 条件 ### Bluetooth 通信 - 连接和配置 -:- | :- -:- | :- +:- | :- +:- | :- [bluetoothlist](https://ww2.mathworks.cn/help/matlab/ref/bluetoothlist.html) | 扫描附近的 `Bluetooth` 经典设备 [bluetooth](https://ww2.mathworks.cn/help/matlab/ref/bluetooth.html) | 连接到 `Bluetooth` 经典设备 [configureTerminator](https://ww2.mathworks.cn/help/matlab/ref/bluetooth.configureterminator.html) | 为与 `Bluetooth` 设备的 ASCII 字符串通信设置终止符 @@ -1340,8 +1348,8 @@ true 或 false 条件 ### Bluetooth 通信 - 读取和写入 -:- | :- -:- | :- +:- | :- +:- | :- [read](https://ww2.mathworks.cn/help/matlab/ref/bluetooth.read.html) | 从 `Bluetooth` 设备读取数据 [readline](https://ww2.mathworks.cn/help/matlab/ref/bluetooth.readline.html) | 从 `Bluetooth` 设备读取 ASCII 字符串数据行 [write](https://ww2.mathworks.cn/help/matlab/ref/bluetooth.write.html) | 将数据写入 `Bluetooth` 设备 @@ -1352,8 +1360,8 @@ true 或 false 条件 ### Bluetooth 低功耗通信 -:- | :- -:- | :- +:- | :- +:- | :- [blelist](https://ww2.mathworks.cn/help/matlab/ref/blelist.html) | 扫描附近的低功耗 `Bluetooth` 外围设备 [ble](https://ww2.mathworks.cn/help/matlab/ref/ble.html) | 连接到低功耗 `Bluetooth` 外围设备 [characteristic](https://ww2.mathworks.cn/help/matlab/ref/matlabshared.blelib.characteristic.html) | 访问低功耗 `Bluetooth` 外围设备的特征 @@ -1366,8 +1374,8 @@ true 或 false 条件 ### Web 服务 -:- | :- -:- | :- +:- | :- +:- | :- [webread](https://ww2.mathworks.cn/help/matlab/ref/webread.html) | 从 RESTful Web 服务读取内容 [webwrite](https://ww2.mathworks.cn/help/matlab/ref/webwrite.html) | 将数据写入 RESTful Web 服务 [websave](https://ww2.mathworks.cn/help/matlab/ref/websave.html) | 将 RESTful Web 服务中的内容保存到文件 @@ -1378,8 +1386,8 @@ true 或 false 条件 ### FTP 文件操作 -:- | :- -:- | :- +:- | :- +:- | :- [ftp](https://ww2.mathworks.cn/help/matlab/ref/ftp.html) | 连接到 FTP 服务器以访问其文件 [sftp](https://ww2.mathworks.cn/help/matlab/ref/sftp.html) | Connection to SFTP server to access its files [ascii](https://ww2.mathworks.cn/help/matlab/ref/ftp.ascii.html) | 将 FTP 传输模式设置为 ASCII @@ -1396,8 +1404,8 @@ true 或 false 条件 ### 物联网 (IoT) 数据 -:- | :- -:- | :- +:- | :- +:- | :- [thingSpeakRead](https://ww2.mathworks.cn/help/matlab/ref/thingspeakread.html) | 读取存储在 `ThingSpeak` 通道中的数据 [thingSpeakWrite](https://ww2.mathworks.cn/help/matlab/ref/thingspeakwrite.html) | 将数据写入 `ThingSpeak` 通道 @@ -1406,4 +1414,4 @@ true 或 false 条件 ---- - [MATLAB 官网](https://www.mathworks.com) -- [MATLAB 官网(中文)](https://mathworks.cn/) \ No newline at end of file +- [MATLAB 官网(中文)](https://mathworks.cn/) diff --git a/docs/mime.md b/docs/mime.md index b7a0057eb58..f1ad0c9c0ce 100644 --- a/docs/mime.md +++ b/docs/mime.md @@ -3,7 +3,6 @@ MIME 类型 备忘清单 此备忘单列出了一些常见的 Web MIME 类型。 您可以查看包含所有已注册 MIME 类型的 [IANA/MIME 媒体类型注册表](https://www.iana.org/assignments/media-types/media-types.xhtml)。 - 入门 ---- @@ -17,7 +16,6 @@ MIME 类型 备忘清单 - 对于 Internet 上的文件格式或格式内容 - MIME 类型列表 -------- @@ -26,8 +24,8 @@ MIME 类型列表 扩展名 | MIME 类型(内容类型) | 文件种类 :-|:-|:- -\.aac | audio/aac | AAC 音频 -\.abw | application/x\-abiword | AbiWord 文档 +\.aac | audio/aac | AAC 音频 +\.abw | application/x\-abiword | AbiWord 文档 \.arc | application/x\-freearc | 存档文档(嵌入多个文件) \.avi | video/x\-msvideo | AVI: 音频视频交错 \.azw | application/vnd\.amazon\.ebook | 亚马逊 Kindle 电子书格式 @@ -87,11 +85,11 @@ MIME 类型列表 \.webp | image/webp | WEBP图像 \.woff | font/woff | Web 开放字体格式 (WOFF) \.woff2 | font/woff2 | Web 开放字体格式 (WOFF) -\.xhtml | application/xhtml\+xml | XHTML -\.xls | application/vnd\.ms\-excel | Microsoft Excel +\.xhtml | application/xhtml\+xml | XHTML +\.xls | application/vnd\.ms\-excel | Microsoft Excel \.xlsx | application/vnd\.openxmlformats\-officedocument\.spreadsheetml\.sheet | Microsoft Excel (OpenXML) -\.xml | application/xml 如果临时用户不可读(RFC 3023,第 3 节) text/xml,如果临时用户可读(RFC 3023,第 3 节) | XML -\.xul | application/vnd\.mozilla\.xul\+xml | XUL +\.xml | application/xml 如果临时用户不可读(RFC 3023,第 3 节) text/xml,如果临时用户可读(RFC 3023,第 3 节) | XML +\.xul | application/vnd\.mozilla\.xul\+xml | XUL \.zip | application/zip | ZIP 档案 \.3gp | video/3gpp audio/3gpp 如果它不包含视频 | 3GPP 音视频容器 \.3g2 | video/3gpp2 audio/3gpp2 如果它不包含视频 | 3GPP2 音视频容器 @@ -104,4 +102,4 @@ MIME 类型列表 - [iana mime.types](http://www.iana.org/assignments/media-types/media-types.xhtml) _(iana.org)_ - [apache mime.types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) _(svn.apache.org)_ -- [nginx mime.types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) _(hg.nginx.org)_ \ No newline at end of file +- [nginx mime.types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) _(hg.nginx.org)_ diff --git a/docs/mysql.md b/docs/mysql.md index 0031686d030..3c2d01b288a 100644 --- a/docs/mysql.md +++ b/docs/mysql.md @@ -3,7 +3,6 @@ MySQL 备忘清单 本备忘单旨在快速理解 [MySQL](https://mysql.com) 所涉及的主要概念,提供了最常用的SQL语句,供您参考。 - 入门 --- @@ -65,9 +64,9 @@ mysql -h -u -p [db_name] `SHOW TABLES;` | 列出当前数据库的表 `SHOW FIELDS FROM` t`;` | 表的列表字段 `DESC` t`;` | 显示表格结构 -`SHOW CREATE TABLE `t`;` | 显示创建表sql -`TRUNCATE TABLE `t`;` | 删除表中的所有数据 -`DROP TABLE `t`;` | 删除表格 +`SHOW CREATE TABLE`t`;` | 显示创建表sql +`TRUNCATE TABLE`t`;` | 删除表中的所有数据 +`DROP TABLE`t`;` | 删除表格 #### Proccess @@ -388,6 +387,7 @@ CREATE TABLE t( CHECK(c1> 0 AND c1 >= c2) ); ``` + c2列中的设置值不为NULL ```sql @@ -556,7 +556,6 @@ DROP INDEX idx_name; MySQL 数据类型 --------- - ### Strings | - | - | @@ -573,16 +572,15 @@ MySQL 数据类型 | `ENUM` | One of preset options | | `SET` | Selection of preset options | - ### Date & time + | Data Type | Format | |-------------|---------------------| -| `DATE ` | yyyy-MM-dd | -| `TIME ` | hh:mm:ss | -| `DATETIME ` | yyyy-MM-dd hh:mm:ss | +| `DATE` | yyyy-MM-dd | +| `TIME` | hh:mm:ss | +| `DATETIME` | yyyy-MM-dd hh:mm:ss | | `TIMESTAMP` | yyyy-MM-dd hh:mm:ss | -| `YEAR ` | yyyy | - +| `YEAR` | yyyy | ### Numeric @@ -602,4 +600,4 @@ MySQL 数据类型 - [SQL 基础教程](http://www.w3school.com.cn/sql/index.asp) _(w3school.com.cn)_ - [SQL 语句教程](http://www.1keydata.com/cn/sql/sql-count.php) _(1keydata.com)_ -- [21分钟 MySQL 基础入门](https://jaywcjlove.github.io/mysql-tutorial/21-minutes-MySQL-basic-entry.html) _(jaywcjlove.github.io)_ \ No newline at end of file +- [21分钟 MySQL 基础入门](https://jaywcjlove.github.io/mysql-tutorial/21-minutes-MySQL-basic-entry.html) _(jaywcjlove.github.io)_ diff --git a/docs/netcat.md b/docs/netcat.md index a6b8f7a9469..e90bb3a9a71 100644 --- a/docs/netcat.md +++ b/docs/netcat.md @@ -18,15 +18,14 @@ $ nc [options] [host] [port] 监听传入连接 -```shell +```shell $ nc -lp port [host] [port] ``` ### 选项示例 - -选项 | 示例 | 说明 +选项 | 示例 | 说明 :- | :- | :- `-h` | nc -h | 帮助 `-z` | nc -z 192.168.1.9 1-100 | 端口扫描主机或 `IP` 地址 @@ -40,7 +39,6 @@ $ nc -lp port [host] [port] `-4` | nc -4 -l 8000 | 仅限 `IPv4` `-6` | nc -6 -l 8000 | 仅限 `IPv6` - ### 聊天客户端-服务器 @@ -228,4 +226,4 @@ $ nc -lv 8000 $ nc 192.168.1.9 8000 -v -e /bin/bash ``` -反向 `shell` 通常用于绕过防火墙限制,例如阻止入站连接 \ No newline at end of file +反向 `shell` 通常用于绕过防火墙限制,例如阻止入站连接 diff --git a/docs/netstat.md b/docs/netstat.md index 1779fe02335..a719922fe9d 100644 --- a/docs/netstat.md +++ b/docs/netstat.md @@ -42,7 +42,6 @@ $ netstat -h `netstat -au` | 所有 UDP 连接 `netstat -ant` | 显示没有反向 DNS 查找的 IP 地址 - 选项 | 说明 :- | :- `netstat` | 活动连接 @@ -53,7 +52,6 @@ $ netstat -h `netstat -tnl` | 监听 TCP 端口 `netstat -unl` | 监听 UDP 端口 - ### 网络 选项 | 说明 @@ -65,7 +63,6 @@ $ netstat -h ### 路由 - 选项 | 说明 :- | :- `netstat -r` | 显示路由表 diff --git a/docs/nginx.md b/docs/nginx.md index 852b8e2ff88..ab4914063db 100644 --- a/docs/nginx.md +++ b/docs/nginx.md @@ -208,7 +208,7 @@ location /folder/ { # / 很重要! ### 反向代理 -#### 基础 +#### 基础 ```nginx server { @@ -260,7 +260,7 @@ server { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; - + } } ``` @@ -313,7 +313,6 @@ server { 您可以使用 Let's Encrypt 轻松保护您的网站/应用程序。去 [lets-encrypt](https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx.html) 获取更多信息 - ### 重定向(301永久) @@ -867,4 +866,4 @@ location = /robots.txt { --- - [Nginx 安装维护入门学习笔记](https://jaywcjlove.github.io/nginx-tutorial) _(jaywcjlove.github.io)_ -- [](https://virtubox.github.io/advanced-nginx-cheatsheet/) _(virtubox.github.io)_ \ No newline at end of file +- [](https://virtubox.github.io/advanced-nginx-cheatsheet/) _(virtubox.github.io)_ diff --git a/docs/npm.md b/docs/npm.md index 13cf25c136d..d81bef99d19 100644 --- a/docs/npm.md +++ b/docs/npm.md @@ -28,18 +28,18 @@ npm 备忘清单 命令 | 描述 :- |:- -`npm i sax` | `NPM` 包 +`npm i sax` | `NPM` 包 `npm i sax@latest` | 指定标签 `最新` `npm i sax@3.0.0` | 指定版本 `3.0.0` -`npm i sax@">=1 <2.0"` | 指定版本范围 -`npm i @org/sax` | 范围内的 `NPM` 包 -`npm i user/repo` | GitHub -`npm i user/repo#master` | GitHub -`npm i github:user/repo` | GitHub -`npm i gitlab:user/repo` | GitLab -`npm i /path/to/repo` | 绝对路径 -`npm i ./archive.tgz` | 压缩包 -`npm i https://site.com/archive.tgz` | 通过 `HTTP` 压缩包 +`npm i sax@">=1 <2.0"` | 指定版本范围 +`npm i @org/sax` | 范围内的 `NPM` 包 +`npm i user/repo` | GitHub +`npm i user/repo#master` | GitHub +`npm i github:user/repo` | GitHub +`npm i gitlab:user/repo` | GitLab +`npm i /path/to/repo` | 绝对路径 +`npm i ./archive.tgz` | 压缩包 +`npm i https://site.com/archive.tgz` | 通过 `HTTP` 压缩包 安装依赖的可用参数 @@ -78,19 +78,17 @@ $ npm cache verify # 验证缓存文件夹的内容,垃圾收集任何不需 ### 更新 -命令 | 描述 -:- | - +命令 | 描述 +:- | - `npm version ` | 要更改 `package.json` 中的版本号 `npm update` | 更新生产包 `npm update --dev` | 更新开发包 `npm update -g` | 更新全局包 `npm update lodash` | 更新 `lodash` 包 - ### 杂项功能 - ```bash # 将某人添加为所有者 $ npm owner add USERNAME PACKAGENAME @@ -168,7 +166,6 @@ $ nrm use cnpm `$PREFIX/etc/npmrc` | 全局配置文件 `/path/to/npm/npmrc` | npm 内置配置文件 - ### 配置内容 ```ini @@ -180,17 +177,16 @@ $ nrm use cnpm 注释使用 `#`, `;` 放置到一行的开头, [`.npmrc`](https://docs.npmjs.com/cli/v8/configuring-npm/npmrc) 文件由指定此注释语法的 [`npm/ini`](https://github.com/npm/ini) 解析 - ### registry :- | :- :- | :- -`npm` | https://registry.npmjs.org/ -`yarn` | https://registry.yarnpkg.com/ -`tencent` | https://mirrors.cloud.tencent.com/npm/ -`cnpm` | https://r.cnpmjs.org/ -`taobao` | https://registry.npmmirror.com/ -`npmMirror` | https://skimdb.npmjs.com/registry/ +`npm` | +`yarn` | +`tencent` | +`cnpm` | +`taobao` | +`npmMirror` | ### `.npmignore` @@ -265,4 +261,4 @@ ELECTRON_BUILDER_BINARIES_MIRROR=https://npmmirror.com/mirrors/electron-builder- ---- - [npm 仓库、网站和命令行界面的文档](https://docs.npmjs.com/) _(npmjs.com)_ -- [npmmirror 中国镜像站](https://npmmirror.com/) _(npmmirror.com)_ \ No newline at end of file +- [npmmirror 中国镜像站](https://npmmirror.com/) _(npmmirror.com)_ diff --git a/docs/package.json.md b/docs/package.json.md index 0e22c3c7e4b..ca856e784a3 100644 --- a/docs/package.json.md +++ b/docs/package.json.md @@ -21,7 +21,7 @@ package.json 备忘清单 } ``` -**规则** +#### 规则 - 必须小于或等于214个字符(包括 `@scope/` 范围包) - 不能以点(`.`)或下划线(`_`)开头 @@ -370,7 +370,7 @@ https://registry.npmjs.org/[包名]/-/[包名]-[version].tgz - `postversion`: 改变包版本后运行,然后提交。 - `pretest`, `test`, `posttest`: 由 `npm test` 命令运行。 - `prestop`, `stop`, `poststop`: 由 `npm stop` 命令运行。 -- `prestart`, `start`, `poststart`: 由 `npm start` 命令运行。 +- `prestart`, `start`, `poststart`: 由 `npm start` 命令运行。 - `prerestart`, `restart`, `postrestart`: 由 `npm restart` 命令运行。 注意:如果没有提供重启脚本,`npm restart` 将运行 `stop` 和`start` 脚本。 - `preshrinkwrap`, `shrinkwrap`, `postshrinkwrap`: 由 `npm shrinkwrap` 命令运行。 @@ -577,7 +577,6 @@ https://registry.npmjs.org/[包名]/-/[包名]-[version].tgz 此选项指定你的包的操作系统兼容性,它会检查 `process.platform`。 - ### `cpu` ```json @@ -624,6 +623,8 @@ Yarn ### `flat` + + 如果你的包只允许给定依赖的一个版本,你想强制和命令行上 [yarn install --flat](#) 相同的行为,把这个值设为 `true`。 ```json @@ -651,8 +652,7 @@ Yarn 注意,`yarn install --flat` 命令将会自动在 `package.json` 文件里加入 `resolutions` 字段。 - 另见 ---- -- [PACKAGE.JSON 中文说明](https://jaywcjlove.github.io/package.json) _(github.io)_ \ No newline at end of file +- [PACKAGE.JSON 中文说明](https://jaywcjlove.github.io/package.json) _(github.io)_ diff --git a/docs/postgres.md b/docs/postgres.md index fce1d1956ae..d7c7eb77f36 100644 --- a/docs/postgres.md +++ b/docs/postgres.md @@ -3,7 +3,6 @@ PostgreSQL 备忘清单 [PostgreSQL](https://www.postgresql.org/docs/current/) 备忘清单为您提供了常用的 PostgreSQL 命令和语句。 - 入门 --------------- @@ -34,7 +33,6 @@ postgres=# \q postgres=# \! ``` - ### psql 命令 @@ -52,7 +50,6 @@ postgres=# \! `-V` | psql -V | 打印 psql 版本 - ### 获得帮助 :- | - @@ -418,8 +415,8 @@ PostgreSQL 命令 ### 表 -:- | - -:- | - +:- | - +:- | - `\d ` | 描述表 `\d+
    ` | 详细描述表格 `\dt` | 列出当前模式中的表 @@ -428,12 +425,10 @@ PostgreSQL 命令 `\dp` | 列出表访问权限 `\det[+]` | 列出外部表 - - ### 查询缓冲区 -:- | - -:- | - +:- | - +:- | - `\e [FILE]` | 编辑查询缓冲区(或文件) `\ef [FUNC]` | 编辑函数定义 `\p` | 显示内容 @@ -441,13 +436,11 @@ PostgreSQL 命令 `\s [FILE]` | 显示历史记录或保存到文件 `\w FILE` | 将查询缓冲区写入文件 - - ### 信息 -:- | - -:- | - +:- | - +:- | - `\l[+]` | 列出所有数据库 `\dn[S+]` | 列出架构 `\di[S+]` | 列出索引 @@ -479,21 +472,19 @@ PostgreSQL 命令 `S`:显示系统对象,`+`:附加细节 - ### 连接 -:- | - -:- | - +:- | - +:- | - `\c [DBNAME]` | 连接到新数据库 `\encoding [ENCODING]` | 显示或设置客户端编码 `\password [USER]` | 更改密码 `\conninfo` | 显示信息 - ### 格式化 -:- | - -:- | - +:- | - +:- | - `\a` | 在未对齐和对齐之间切换 `\C [STRING]` | 设置表格标题,如果没有则取消设置 `\f [STRING]` | 显示或设置未对齐的字段分隔符 @@ -504,8 +495,8 @@ PostgreSQL 命令 ### 输入输出 -:- | - -:- | - +:- | - +:- | - `\copy ...` | 导入/导出表 _另见:_ [复制](#导入导出-csv) `\echo [STRING]` | 打印字符串 `\i FILE` | 执行文件 @@ -514,16 +505,16 @@ PostgreSQL 命令 ### 变量 -:- | - -:- | - +:- | - +:- | - `\prompt [TEXT] NAME` | 设置变量 `\set [NAME [VALUE]]` | 设置变量 _(如果没有参数,则列出所有变量)_ `\unset NAME` | 删除变量 ### 杂项 -:- | - -:- | - +:- | - +:- | - `\cd [DIR]` | 更改目录 `\timing [on\|off]` | 切换时间 `\! [COMMAND]` | 在shell中执行 @@ -536,7 +527,6 @@ PostgreSQL 命令 - `\lo_list` - `\lo_unlink LOBOID` - 各种各样的 ------------- @@ -635,4 +625,5 @@ $ sudo systemctl restart postgresql Also see -------- -- [Posgres-cheatsheet](https://gist.github.com/apolloclark/ea5466d5929e63043dcf#posgres-cheatsheet) _(gist.github.com)_ \ No newline at end of file + +- [Posgres-cheatsheet](https://gist.github.com/apolloclark/ea5466d5929e63043dcf#posgres-cheatsheet) _(gist.github.com)_ diff --git a/docs/python.md b/docs/python.md index 748d4c33d4d..00542eaed8d 100644 --- a/docs/python.md +++ b/docs/python.md @@ -57,6 +57,7 @@ llo 查看: [Strings](#python-字符串) ### Lists + ```python mylist = [] mylist.append(1) @@ -67,8 +68,7 @@ for item in mylist: 查看: [Lists](#python-lists) - -### If Else +### If Else ```python num = 200 @@ -77,6 +77,7 @@ if num > 0: else: print("num is not greater than 0") ``` + 查看: [流程控制](#python-流程控制) ### 循环 @@ -88,8 +89,8 @@ for item in range(6): else: print("Finally finished!") ``` -查看: [Loops](#python-循环) +查看: [Loops](#python-循环) ### 函数 @@ -101,7 +102,7 @@ else: 来自函数的你好 ``` -查看: [Functions](#python-functions) +查看: [Functions](#函数) ### 文件处理 @@ -124,7 +125,7 @@ result = 16 / 4 # => 4.0 (Float Division) result = 16 // 4 # => 4 (Integer Division) result = 25 % 2 # => 1 result = 5 ** 3 # => 125 -``` +``` `/` 表示 x 和 y 的商,`//` 表示 x 和 y 的底商,另见 [StackOverflow](https://stackoverflow.com/a/183870/13192320) @@ -151,7 +152,7 @@ message += "Part 2." '10 + 10 = 20' ``` -查看: [Python F-Strings](#python-f-strings-since-python) +查看: [Python F-Strings](#f-字符串(Python 3.6+)) Python 数据类型 --------------- @@ -165,6 +166,7 @@ multi_string = """Multiline Strings Lorem ipsum dolor sit amet, consectetur adipiscing elit """ ``` + 查看: [Strings](#python-字符串) ### 数字 @@ -194,8 +196,8 @@ list2 = [True, False, False] list3 = [1, 5, 7, 9, 3] list4 = list((1, 5, 7, 9, 3)) ``` -查看: [Lists](#python-lists) +查看: [Lists](#python-lists) ### 元组 Tuple @@ -361,6 +363,7 @@ o `len()` 函数返回字符串的长度 ### 多份 + ```python >>> s = '===+' >>> n = 8 @@ -396,7 +399,9 @@ True name = "John" print("Hello, %s!" % name) ``` + --- + ```python name = "John" age = 23 @@ -782,14 +787,14 @@ while x < 4: x += 1 # Shorthand for x = x + 1 ``` -### Break +### Break ```python x = 0 for index in range(10): x = index * 10 if index == 5: - break + break print(x) ``` @@ -799,7 +804,7 @@ for index in range(10): for index in range(3, 8): x = index * 10 if index == 5: - continue + continue print(x) ``` @@ -948,6 +953,7 @@ with open("myfile.txt") as file: for line in file: print(line) ``` + #### 带行号 ```python @@ -956,7 +962,6 @@ for i, line in enumerate(file, start=1): print("Number %s: %s" % (i, line)) ``` - ### 字符串 #### 写一个字符串 @@ -1082,8 +1087,9 @@ class ChildClass(ParentClass): print("Child Method") # 调用父级的 print_test() super().print_test() -``` ---- +``` + +--- ```python >>> child_instance = ChildClass() @@ -1172,7 +1178,8 @@ Yoki.sound() # => Woof! ```python # 这是单行注释 ``` ----------- + +--- ```python """ 可以写多行字符串 @@ -1180,7 +1187,9 @@ Yoki.sound() # => Woof! 作为文档。 """ ``` ----------- + +--- + ```python ''' 可以写多行字符串 使用三个',并且经常使用 @@ -1222,4 +1231,4 @@ else: # try/except 块的可选子句。 必须遵循除块 print("All good!") # 仅当 try 中的代码未引发异常时运行 finally: # 在所有情况下执行 print("我们可以在这里清理资源") -``` \ No newline at end of file +``` diff --git a/docs/quickreference.md b/docs/quickreference.md index 5f9cc5cd5c3..d599206502d 100644 --- a/docs/quickreference.md +++ b/docs/quickreference.md @@ -111,7 +111,6 @@ function () {} 如果代码块内容太长,使用强制换行类(`wrap-text`)解决 - ### 展示表格表头 ```markdown @@ -170,7 +169,7 @@ export const Student = ( ### 快捷键样式 -| Key | value | +| Key | value | | ---- | ---- | | `快捷键` | 说明 | | `快捷键` | 说明 | @@ -231,7 +230,6 @@ const school =
    学校
    ; `` | 时间轴样式 `` | 箭头标记 - ### 隐藏卡片标题 @@ -583,7 +581,6 @@ H2 部分 在 `Title 1` 标题添加 `col-span-2` 和 `row-span-2` 占位类,使用 `空格` 间隔。 - 表格 --- @@ -700,14 +697,19 @@ H2 部分 - **重命名为 new_name** + ```bash $ git branch -m ``` + - 推送和**重置** + ```bash $ git push origin -u ``` + - 删除远程分支 + ```bash $ git push origin --delete ``` diff --git a/docs/react.md b/docs/react.md index 56000901ff8..48b913ef210 100644 --- a/docs/react.md +++ b/docs/react.md @@ -3,7 +3,6 @@ React 备忘清单 适合初学者的综合 React 备忘清单。 - 入门 ---- @@ -59,7 +58,6 @@ import World, { Hello } from './hello.js'; 使用 `import` 导入 `Hello` 组件,在示例中使用。 - ### React 组件中的 CSS ```jsx {2,5} @@ -82,7 +80,6 @@ export const Student = ( ); ``` - ### 属性 ```jsx @@ -112,7 +109,6 @@ class Student extends React.Component { `class` 组件使用 `this.props` 访问传递给组件的属性。 - ### Children @@ -138,7 +134,7 @@ function AlertBox(props) { } ``` ----- +----- ```jsx {props.children} @@ -158,7 +154,7 @@ class AlertBox extends React.Component { } ``` ----- +----- ```jsx {this.props.children} @@ -297,7 +293,7 @@ function Student() { ### Portals -React 并*没有*创建一个新的 `div`。它只是把子元素渲染到 `domNode` 中。`domNode` 是一个可以在任何位置的有效 DOM 节点。 +React 并_没有_创建一个新的 `div`。它只是把子元素渲染到 `domNode` 中。`domNode` 是一个可以在任何位置的有效 DOM 节点。 ```jsx render() { @@ -438,7 +434,7 @@ function CustomTextInput(props) { ``` ----- +----- - [识别不安全的生命周期](https://zh-hans.reactjs.org/docs/strict-mode.html#identifying-unsafe-lifecycles) - [关于使用过时字符串 ref API 的警告](https://zh-hans.reactjs.org/docs/strict-mode.html#warning-about-legacy-string-ref-api-usage) @@ -754,7 +750,7 @@ export default function Weather(props) { } ``` ----- +----- ```js {isShow &&
    内容
    } @@ -860,7 +856,6 @@ class Welcome extends React.Component { `this.props` | 组件接受参数 `this.state` | 组件内状态 - ### Pure 组件 ```jsx @@ -1003,7 +998,7 @@ Menu.Item = ({ children }) => ( ); ``` ----- +----- ```jsx @@ -1330,7 +1325,7 @@ PropTypes 属性类型检查 import PropTypes from 'prop-types' ``` ----- +----- :- | - :- | - @@ -1354,7 +1349,6 @@ import PropTypes from 'prop-types' `oneOf(any)` | 枚举类型 `oneOfType([type])` | 几种类型中的任意一个类型 - #### _数组 Array_ :- | - @@ -1537,4 +1531,4 @@ MyComponent.propTypes = { - [React 官方中文文档](https://zh-hans.reactjs.org/) _(zh-hans.reactjs.org)_ - [反应生命周期方法图](https://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/) _(projects.wojtekmaj.pl)_ - [React 16 Cheat Sheet](https://reactcheatsheet.com) -- [Awesome React](https://github.com/enaqx/awesome-react) _(github.com)_ \ No newline at end of file +- [Awesome React](https://github.com/enaqx/awesome-react) _(github.com)_ diff --git a/docs/regex.md b/docs/regex.md index 7dd9af79c95..ec769ba0744 100644 --- a/docs/regex.md +++ b/docs/regex.md @@ -33,7 +33,6 @@ RegEX 备忘清单 `[a-zA-Z]` | 范围内的字符:
    `a-z` 或 `A-Z` `[a-zA-Z0-9]` | 范围内的字符:
    `a-z`、`A-Z` 或 `0-9` - ### 量词 范例 | 说明 @@ -115,7 +114,6 @@ RegEX 备忘清单 `[\b]` | 退格字符 `\` | 使任何字符文字 - ### 锚点 范例 | 说明 @@ -129,7 +127,6 @@ RegEX 备忘清单 `\b` | 一个词的边界 `\B` | 非单词边界 - ### 替代 范例 | 说明 @@ -210,8 +207,8 @@ RegEX 备忘清单 `(?!...)` | 负先行断言 `(?<=...)` | 正后发断言 `(?ring springboard 等。 -`. ` | 匹配 a9+ 等。 -`h.o ` | 匹配 hooh2oh/o 等。 -`ring\? ` | 匹配 ring? -`\(quiet\) ` | 匹配(安静) -`c:\\windows ` | 匹配 c:\windows +`ring` | 匹配 ring springboard 等。 +`.` | 匹配 a9+ 等。 +`h.o` | 匹配 hooh2oh/o 等。 +`ring\?` | 匹配 ring? +`\(quiet\)` | 匹配(安静) +`c:\\windows` | 匹配 c:\windows 使用 `\` 搜索这些特殊字符:
    `[ \ ^ $ . | ? * + ( ) { }` - ### 速记类 范例 | 说明 :-|- -`\w ` | “单词”字符
    _(字母、数字或下划线)_ -`\d ` | 数字 -`\s ` | 空格
    _(空格、制表符、vtab、换行符)_ -`\W, \D, or \S ` | 不是单词、数字或空格 -`[\D\S] ` | 表示不是数字或空格,两者都匹配 -`[^\d\s] ` | 禁止数字和空格 +`\w` | “单词”字符
    _(字母、数字或下划线)_ +`\d` | 数字 +`\s` | 空格
    _(空格、制表符、vtab、换行符)_ +`\W, \D, or \S` | 不是单词、数字或空格 +`[\D\S]` | 表示不是数字或空格,两者都匹配 +`[^\d\s]` | 禁止数字和空格 ### 出现次数 @@ -311,9 +307,9 @@ RegEX 备忘清单 范例 | 说明 :-|- -`cat\|dog ` | 匹配 catdog -`id\|identity ` | 匹配 ididentity -`identity\|id ` | 匹配 ididentity +`cat\|dog` | 匹配 catdog +`id\|identity` | 匹配 ididentity +`identity\|id` | 匹配 ididentity 当替代品重叠时,命令从长到短 @@ -334,7 +330,7 @@ RegEX 备忘清单 范例 | 说明 :-|- `* + {n,}`
    _greedy_ | 尽可能匹配 -`<.+> ` | 在 \bold\<\/b> 中找到 1 个大匹配项 +`<.+>` | 在 \bold\<\/b> 中找到 1 个大匹配项 `*? +? {n,}?`
    _lazy_ | 尽可能少匹配 `<.+?>` | 在 \<b>bold\<\/b> 中找到 2 个匹配项 @@ -343,20 +339,19 @@ RegEX 备忘清单 范例 | 说明 :-|- -`\b ` | “单词”边缘(非“单词”字符旁边) -`\bring ` | 单词以“ring”开头,例如 ringtone -`ring\b ` | 单词以“ring”结尾,例如 spring -`\b9\b ` | 匹配单个数字 9,而不是 19、91、99 等。 -`\b[a-zA-Z]{6}\b ` | 匹配 6 个字母的单词 -`\B ` | 不是字边 -`\Bring\B ` | 匹配 springswringer -`^\d*$ ` | 整个字符串必须是数字 +`\b` | “单词”边缘(非“单词”字符旁边) +`\bring` | 单词以“ring”开头,例如 ringtone +`ring\b` | 单词以“ring”结尾,例如 spring +`\b9\b` | 匹配单个数字 9,而不是 19、91、99 等。 +`\b[a-zA-Z]{6}\b` | 匹配 6 个字母的单词 +`\B` | 不是字边 +`\Bring\B` | 匹配 springswringer +`^\d*$` | 整个字符串必须是数字 `^[a-zA-Z]{4,20}$` | 字符串必须有 4-20 个字母 -`^[A-Z] ` | 字符串必须以大写字母开头 -`[\.!?"')]$ ` | 字符串必须以终端标点结尾 - +`^[A-Z]` | 字符串必须以大写字母开头 +`[\.!?"')]$` | 字符串必须以终端标点结尾 -### 修饰 +### 修饰 范例 | 说明 :-|- @@ -371,8 +366,8 @@ RegEX 备忘清单 范例 | 说明 :-|- -`(in\|out)put ` | 匹配 inputoutput -`\d{5}(-\d{4})?` | 美国邮政编码 _(“+ 4”可选)_ +`(in\|out)put` | 匹配 inputoutput +`\d{5}(-\d{4})?` | 美国邮政编码 _(“+ 4”可选)_ 如果组后匹配失败,解析器会尝试每个替代方案。
    @@ -417,11 +412,10 @@ RegEX 备忘清单 `(?warbling, string, fishing, ... `\b(?!\w+ing\b)\w+\b` | 不以“ing”结尾的单词 -`(?<=\bpre).*?\b ` | 匹配 pretend、present、prefix、... +`(?<=\bpre).*?\b` | 匹配 pretend、present、prefix、... `\b\w{3}(? Python 中的正则表达式 @@ -664,7 +658,6 @@ Python 中的正则表达式 import re ``` - ### 实例 @@ -736,11 +729,8 @@ False `re.compile` | 编译正则表达式模式供以后使用 `re.escape` | 返回所有非字母数字反斜杠的字符串 - - ### Flags 标志 - :- | - | - :- | - | - `re.I` | `re.IGNORECASE` | 忽略大小写 @@ -750,8 +740,6 @@ False `re.U` | `re.UNICODE` | 使 `\w`、`\b`、`\d`、`\s` _unicode 依赖_ `re.X` | `re.VERBOSE` | 可读风格 - - JavaScript 中的正则表达式 --------------- @@ -830,7 +818,7 @@ let regex = /apples/gi; console.log(text.match(regex)); ``` -### split() +### split() ```javascript @@ -894,14 +882,12 @@ text.replaceAll(regex, "mangoes"); ``` - PHP中的正则表达式 ------------ ### 函数 - :- | - :- | - `preg_match()` | 执行正则表达式匹配 @@ -911,7 +897,6 @@ PHP中的正则表达式 `preg_split()` | 按正则表达式模式拆分字符串 `preg_grep()` | 返回与模式匹配的数组条目 - ### preg_replace ```php @@ -923,7 +908,6 @@ echo preg_replace($regex, "QuickRef", $str); ``` - ### preg_match ```php @@ -933,7 +917,6 @@ $regex = "#quickref#i"; echo preg_match($regex, $str); ``` - ### preg_matchall @@ -952,17 +935,15 @@ if (preg_match_all($regex, $input_str, $matches_out)) { } ``` - ### preg_grep -```php +```php $arr = ["Jane", "jane", "Joan", "JANE"]; $regex = "/Jane/"; // Output: Jane echo preg_grep($regex, $arr); ``` - ### preg_split @@ -973,7 +954,6 @@ $regex = "@\s@"; print_r(preg_split($regex, $str)); ``` - Java 中的正则表达式 ------------- @@ -1003,10 +983,8 @@ boolean s3 = Pattern.matches(".s", "XXXX"); System.out.println(s3); // Outputs: false ``` - ### 模式字段 - :- | - :- | - `CANON_EQ` | 规范等价 @@ -1017,7 +995,6 @@ System.out.println(s3); // Outputs: false `UNICODE_CASE` | Unicode 感知大小写折叠 `UNIX_LINES` | Unix 行模式 - ### 方法 #### Pattern @@ -1029,10 +1006,10 @@ System.out.println(s3); // Outputs: false #### 匹配器 -- int start([int group | 字符串名称]) -- int end([int group | 字符串名称]) +- int start([int group | 字符串名称]) +- int end([int group | 字符串名称]) - 布尔 find([int start]) -- 字符 group([int 组 | 字符串名称]) +- 字符 group([int 组 | 字符串名称]) - 匹配器重置 reset() #### String @@ -1043,7 +1020,6 @@ System.out.println(s3); // Outputs: false 还有更多方法... - ### 例子 @@ -1073,7 +1049,6 @@ while (m.find()) { System.out.println(matches); ``` - MySQL中的正则表达式 ------------- @@ -1082,15 +1057,14 @@ MySQL中的正则表达式 函数名称 | 说明 :- | - -`REGEXP ` | 字符串是否匹配正则表达式 -`REGEXP_INSTR() ` | 匹配正则表达式的子字符串的起始索引
    _(注意:仅限 MySQL 8.0+)_ -`REGEXP_LIKE() ` | 字符串是否匹配正则表达式
    _(注意:仅 MySQL 8.0+)_ +`REGEXP` | 字符串是否匹配正则表达式 +`REGEXP_INSTR()` | 匹配正则表达式的子字符串的起始索引
    _(注意:仅限 MySQL 8.0+)_ +`REGEXP_LIKE()` | 字符串是否匹配正则表达式
    _(注意:仅 MySQL 8.0+)_ `REGEXP_REPLACE()` | 替换匹配正则表达式的子字符串
    _(注意:仅限 MySQL 8.0+)_ -`REGEXP_SUBSTR() ` | 返回匹配正则表达式的子字符串
    _(注意:仅 MySQL 8.0+)_ - - +`REGEXP_SUBSTR()` | 返回匹配正则表达式的子字符串
    _(注意:仅 MySQL 8.0+)_ ### REGEXP + ```sql expr REGEXP pat ``` @@ -1107,7 +1081,6 @@ mysql> SELECT 'a' REGEXP 'A', 'a' REGEXP BINARY 'A'; 1 0 ``` - ### REGEXP_REPLACE ``` @@ -1123,7 +1096,6 @@ mysql> SELECT REGEXP_REPLACE('abc ghi', '[a-z]+', 'X', 1, 2); abc X ``` - ### REGEXP_SUBSTR ``` @@ -1139,8 +1111,7 @@ mysql> SELECT REGEXP_SUBSTR('abc def ghi', '[a-z]+', 1, 3); ghi ``` - -### REGEXP_LIKE +### REGEXP_LIKE ``` REGEXP_LIKE(expr, pat[, match_type]) @@ -1161,7 +1132,6 @@ mysql> SELECT regexp_like('a\nb\nc', '^b$', 'm'); 1 ``` - ### REGEXP_INSTR ``` diff --git a/docs/resolutions.md b/docs/resolutions.md index 4e0f361dc59..3a2e7ddb2e3 100644 --- a/docs/resolutions.md +++ b/docs/resolutions.md @@ -133,7 +133,6 @@ Resolutions 备忘清单 | Xiaomi Redmi Note 8 Pro (2019) | 6.53 inch | 1080 x 2340 px | 393 x 851 px | 395 ppi | 144 ppi | 2.75 xxhdpi | Android 9.0 | - ### 平板 @@ -159,7 +158,6 @@ Resolutions 备忘清单 | Google Pixel C (2015) | 10.2 inch | 2560x1800 px | 1280 x 900 px | 308 ppi | 154 ppi | 2 xhdpi | Android 6.0.1 | - ### 笔记本电脑 @@ -234,20 +232,20 @@ N/A | 16:9 | 1536 x 864 px | 1.327 | N/A | 8.5 `WSXGA+` | 16:10 | 1680 x 1050 px | 1.764 | 1.97 | 2.23 `FHD` | 16:9 | 1920 x 1080 px | 2.074 | 64.81 | 20.41 `WUXGA` | 16:10 | 1920 x 1200 px | 2.304 | 0.81 | 0.93 -`QWXGA` | 16:9 | 2048 x 1152 px | 2.359 | N/A | 0.51 +`QWXGA` | 16:9 | 2048 x 1152 px | 2.359 | N/A | 0.51 `QXGA` | 4:3 | 2048 x 1536 px | 3.145 | - | - -`UWFHD` | ≈21:9 | 2560 x 1080 px | 2.765 | 1.13 | N/A -`QHD` | 16:9 | 2560 x 1440 px | 3.686 | 6.23 | 2.15 -`WQXGA` | 16:10 | 2560 x 1600 px | 4.096 | <0.58 | <2.4 -`UWQHD` | ≈21:9 | 3440 x 1440 px | 4.954 | 0.87 | N/A -`4K UHD`| 16:9 | 3840 x 2160 px | 8.294 | 2.12 | N/A +`UWFHD` | ≈21:9 | 2560 x 1080 px | 2.765 | 1.13 | N/A +`QHD` | 16:9 | 2560 x 1440 px | 3.686 | 6.23 | 2.15 +`WQXGA` | 16:10 | 2560 x 1600 px | 4.096 | <0.58 | <2.4 +`UWQHD` | ≈21:9 | 3440 x 1440 px | 4.954 | 0.87 | N/A +`4K UHD`| 16:9 | 3840 x 2160 px | 8.294 | 2.12 | N/A `Other` | - | - | - | 2.00 | 15.09 ### 屏幕分辨率 解析度 | 像素 -:- |:- +:- |:- `540p / qHD` | 960×540px `720p / HD` | 1280×720px `1080p / Full HD / FHD` | 19201080px @@ -275,4 +273,4 @@ N/A | 16:9 | 1536 x 864 px | 1.327 | N/A | 8.5 --- - [通用解析度列表](https://en.wikipedia.org/wiki/List_of_common_resolutions) _(en.wikipedia.org)_ -- [显示屏分辨率](https://en.wikipedia.org/wiki/Display_resolution) _(en.wikipedia.org)_ \ No newline at end of file +- [显示屏分辨率](https://en.wikipedia.org/wiki/Display_resolution) _(en.wikipedia.org)_ diff --git a/docs/ruby.md b/docs/ruby.md index 26a1363486b..2619d57fb00 100644 --- a/docs/ruby.md +++ b/docs/ruby.md @@ -192,14 +192,14 @@ puts "Hello world!" # 代码的内联注释 #### 比较运算符 -- `==` -- `!=` -- `>` -- `<` -- `>=` -- `<=` -- `<=>` -- `===` +- `==` +- `!=` +- `>` +- `<` +- `>=` +- `<=` +- `<=>` +- `===` - `eql?` - `equal?` @@ -350,7 +350,7 @@ WEATHER = "rainy".freeze ### 伪变量 -名字 | 说明 +名字 | 说明 :-- | -- `self` | 当前方法的接收者对象 `true` | `TrueClass` 的实例 @@ -376,8 +376,8 @@ WEATHER = "rainy".freeze ### 预定义变量 -名字 | 说明 -:-- | -- +名字 | 说明 +:-- | -- `$!` | 异常信息消息。raise 设置此变量 `$@` | 最后一个异常的回溯,它是 String 的数组,指示调用方法的位置。格式中的元素如:“filename:line”或“filename:line:in \`methodname'”(助记符:发生异常的地方) `$&` | 与此范围内最后一次成功的模式匹配匹配的字符串,如果最后一次模式匹配失败,则返回 nil。 (助记符:在某些编辑器中类似于 &)这个变量是只读的 @@ -412,8 +412,8 @@ WEATHER = "rainy".freeze ### 预定义的全局常量 -名字 | 说明 -:-- | -- +名字 | 说明 +:-- | -- `TRUE` | 典型的真值。在 Ruby 中,所有非 `false` 值(除了 `nil` 和 `false` 之外的所有值)都是 `true` `FALSE` | 虚假本身 `NIL` | 零本身 @@ -446,18 +446,17 @@ defined? PI ### 数据类型 - 类型 | 示例 | Class | 文档 :-- | -- | -- | -- -`Integer` | a = 17 | a.class > Integer
    a.class.superclass > Numeric | [#][2] -`Float` | a = 87.23 | a.class > Float
    a.class.superclass > Numeric | [#][3] -`String` | a = "Hello universe" | a.class > String | [#][4] -`Array` | a = [12, 34] | a.class > Array | [#][5] -`Hash` | a = {type: "tea", count: 10} | a.class > Hash | [#][6] -`Boolean` | a = false
    a = true | a.class > FalseClass
    a.class > TrueClass | [TrueClass][7] [FalseClass][8] -`Symbol` | a = :status | a.class > Symbol | [#][9] -`Range` | a = 1..3 | a.class > Range | [#][10] -`Nil` | a = nil | a.class > NilClass | [#][11] +`Integer` | a = 17 | a.class > Integer
    a.class.superclass > Numeric | [#][2] +`Float` | a = 87.23 | a.class > Float
    a.class.superclass > Numeric | [#][3] +`String` | a = "Hello universe" | a.class > String | [#][4] +`Array` | a = [12, 34] | a.class > Array | [#][5] +`Hash` | a = {type: "tea", count: 10} | a.class > Hash | [#][6] +`Boolean` | a = false
    a = true | a.class > FalseClass
    a.class > TrueClass | [TrueClass][7] [FalseClass][8] +`Symbol` | a = :status | a.class > Symbol | [#][9] +`Range` | a = 1..3 | a.class > Range | [#][10] +`Nil` | a = nil | a.class > NilClass | [#][11] [进一步阅读](https://www.digitalocean.com/community/tutorials/understanding-data-types-in-ruby) @@ -508,8 +507,7 @@ range.to_a 一些有用的方法 - -Method name | Output +Method name | Output :----------- | ----- `cover?` | `(1..5).cover?(5)` => `true` `end` | `('a'..'z').end` => `"z"` @@ -518,6 +516,7 @@ Method name | Output `eql?` | `((0..2).eql?(0..5)` => `false` ### 在 Range 中使用 step + ```ruby (1..20).step(2) { |number| puts "#{number}"} # 输出 @@ -533,7 +532,6 @@ Method name | Output # 19 ``` - 条件结构 --- @@ -543,6 +541,7 @@ Method name | Output num = 2 puts 'two' if num == 2 ``` + 如果条件为真,则执行代码 ### if elsif else 语句 @@ -688,7 +687,7 @@ puts string ### 有用的方法 -函数名称 | Output | Note +函数名称 | Output | Note :--- | ----- | ------ length or size | `"HELLO World".length` => `11`
    `"HELLO World".size` => `11` | 返回字符串的长度 reverse | `"hello worlD".reverse` => `"Dlrow olleh"` | 返回反转的字符串 @@ -719,7 +718,6 @@ eql? | `s = 'foo'` => `true`
    `s.eql?('foo')` => \+ | `"sammy " + "shark"` => `"sammyshark"` | 返回 self 和给定的其他字符串的连接 \+ | `"sammy " + "shark"` => `"sammyshark"` | 返回 self 和给定的其他字符串的连接 - 方法 --- @@ -802,6 +800,7 @@ Mobile = Class.new do end Mobile.ring ``` + ```ruby Mobile = Class.new class << Mobile @@ -888,6 +887,7 @@ puts a nil.nil? # true ``` + 您可以拥有自己的布尔方法 ```ruby @@ -1097,7 +1097,6 @@ give_me_data p proc 就像一个可以存储在变量中的块 - ### 任意参数 @@ -1441,7 +1440,6 @@ arr.uniq #=> [2, 5, 6, 556, 8, 9, 0, 123] ``` - ### 检查数组中是否存在值(`include?`) ```ruby @@ -1511,13 +1509,16 @@ sorted_primes = primes.sort puts "#{sorted_primes}" # 输出 => [2, 3, 5, 7] ``` + or in-place sort + ```ruby primes = [7, 2, 3, 5] primes.sort! puts "#{primes}" # 输出 => [2, 3, 5, 7] ``` + ```ruby planets = ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] planets.sort @@ -1629,7 +1630,6 @@ primes.delete(5) # [7, 2, 3] ``` - ### each @@ -1754,6 +1754,7 @@ end ``` --- + ```ruby a = 1 star = '*' @@ -1858,7 +1859,9 @@ data_sample = [2, 3, 5, 7] # 17 # 19 ``` + --- + ```ruby 19.step(1, -2) { |number| puts "#{number}"} # 输出 @@ -1894,6 +1897,7 @@ numbers.inject(:+) # 输出 # 10 ``` + 使用初始值和符号 ```ruby @@ -2003,7 +2007,6 @@ p str #=> "sixth fifth fourth third second first " 布尔可枚举方法 --- - ### 布尔可枚举方法 @@ -2160,7 +2163,9 @@ while count >= 1 # while loop ends here end ``` + 输出 + ``` Ruby Cheatsheet Ruby Cheatsheet @@ -2178,7 +2183,9 @@ for count in 1..5 do puts text end ``` + 输出 + ``` Ruby Cheatsheet Ruby Cheatsheet @@ -2201,7 +2208,9 @@ loop do # ending of ruby do..while loop end ``` + 输出 + ``` Ruby Cheatsheet ``` @@ -2218,7 +2227,9 @@ until var == 11 do # here loop ends end ``` + 输出 + ``` 70 80 @@ -2403,6 +2414,7 @@ true a.instance_of? Numeric false ``` + 如果对象是给定类的实例,而不是子类或超类,则返回 true ### 打印一个类的所有方法名 @@ -2412,7 +2424,9 @@ puts (String.methods).sort # 排除从 Object 类继承的方法 puts (String.methods - Object.public_instance_methods).sort ``` + ### 检查一个类是否有特定的方法 + ```ruby String.respond_to?(:prepend) true @@ -2420,16 +2434,12 @@ String.respond_to?(:append) false ``` - 另见 --- - [Ruby 官网](https://www.ruby-lang.org/en/) _(ruby-lang.org)_ - [Ruby Cheatsheet](https://github.com/lifeparticle/Ruby-Cheatsheet) _(github.com)_ - - -[1]: https://ruby-doc.org/core-3.1.2/doc/keywords_rdoc.html [2]: https://ruby-doc.org/core-3.1.2/Integer.html [3]: https://ruby-doc.org/core-3.1.2/Float.html [4]: https://ruby-doc.org/core-3.1.2/String.html @@ -2440,4 +2450,3 @@ false [9]: https://ruby-doc.org/core-3.1.2/Symbol.html [10]: https://ruby-doc.org/core-3.1.2/Range.html [11]: https://ruby-doc.org/core-3.1.2/NilClass.html -[12]: https://ruby-doc.org/core-3.1.2/Exception.html \ No newline at end of file diff --git a/docs/rust.md b/docs/rust.md index c48cd53b327..d40f6316f1d 100644 --- a/docs/rust.md +++ b/docs/rust.md @@ -13,6 +13,7 @@ fn main() { println!("Hello, World!"); } ``` + #### 编译运行 ```shell @@ -226,6 +227,7 @@ println!("社区的名称是 {community_name},它有 {no_of_members} 个成员 └─────┴─────┴─────┴─────┴─────┴─────┘ 0 1 2 3 4 5 ``` + ---- ```rust @@ -243,6 +245,7 @@ i0 | 1 | 2 | 3 | 4 | 5 | 6 | i1 | 6 | 5 | 4 | 3 | 2 | 1 | └────┴────┴────┴────┴────┴────┘ ``` + ---- ```rust @@ -355,7 +358,7 @@ Rust 运算符 `e <= f` | `e` 小于或等于 `f` `e >= f` | `e` 大于或等于 `f` ---------- +---- ```rust let (e, f) = (1, 100); @@ -377,7 +380,7 @@ let not_equal_to = e != f; // => true `a % b` | 通过与 `b` 相除得到 `a` 的余数 `a * b` | `a` 与 `b` 相乘 ------- +---- ```rust let (a, b) = (4, 5); @@ -399,7 +402,7 @@ let modulus: i32 = a % b; // => 4 `g << h` | 二进制左移 `g >> h` | 二进制右移 ------ +---- ```rust let (g, h) = (0x1, 0x2); @@ -418,7 +421,7 @@ let left_shift = h << 4; // => 32 `c || d` | 要么是真的_(OR)_ `!c` | `c` 为假 _(NOT)_ ------- +---- ```rust let (c, d) = (true, false); @@ -498,7 +501,9 @@ if let["Apple", _] = arr2{ println!("也适用于 str 数组"); } ``` + ---- + ```rust let tuple_1 = ("India", 7, 90, 90.432); if let(_, 7, 9, 78.99) = tuple_1{ @@ -549,7 +554,7 @@ let day_of_week = 2; } }; } -``` +``` ### 嵌套...If 表达式 @@ -561,7 +566,7 @@ if nested_conditions == 89 { println!("大于 97"); } } -``` +``` ### For 循环 @@ -744,7 +749,9 @@ let a_int = 90; // int // int 到 float let mut type_cast = (a_int as f64); ``` ------- + +---- + ```rust let orginal: char = 'I'; // char 到 int => 73 @@ -760,7 +767,9 @@ let mut foo = 4; let mut borrowed_foo = &foo; println!("{borrowed_foo}"); ``` ------- + +---- + ```rust let mut bar = 3; let mut mutable_borrowed_bar = &mut bar; @@ -791,7 +800,6 @@ println!("{a_number}"); 这将产生错误,因为变量 `a_number` 的范围在大括号处结束 - 另见 -------- @@ -804,4 +812,4 @@ println!("{a_number}"); - [Rust By Example 中文版](https://jaywcjlove.github.io/rust-cn-document-for-docker/rust-by-example-cn/) _(jaywcjlove.github.io)_ - [Rust 参考手册中文版](https://jaywcjlove.github.io/rust-cn-document-for-docker/reference/) _(jaywcjlove.github.io)_ - [RustDoc 手册中文版](https://jaywcjlove.github.io/rust-cn-document-for-docker/rustdoc/) _(jaywcjlove.github.io)_ -- [Rust Cookbook 中文版](https://jaywcjlove.github.io/rust-cn-document-for-docker/rust-cookbook/) _(jaywcjlove.github.io)_ \ No newline at end of file +- [Rust Cookbook 中文版](https://jaywcjlove.github.io/rust-cn-document-for-docker/rust-cookbook/) _(jaywcjlove.github.io)_ diff --git a/docs/sass.md b/docs/sass.md index 13effdf51f0..966c2d7ec06 100644 --- a/docs/sass.md +++ b/docs/sass.md @@ -156,7 +156,6 @@ h1 { Sass 混合(Mixins) ------ - ### 参数 ```scss @@ -264,7 +263,7 @@ green($color) blue($color) ``` ---- +---- :- | :- :- | :- @@ -617,4 +616,4 @@ map-get($map, key1) ---- - [Sass 官方文档](https://sass-lang.com/documentation) _(sass-lang.com)_ -- [Sass 中文文档](https://www.sass.hk/docs/) _(sass.hk)_ \ No newline at end of file +- [Sass 中文文档](https://www.sass.hk/docs/) _(sass.hk)_ diff --git a/docs/screen.md b/docs/screen.md index 2d776707a04..dcc6e38a280 100644 --- a/docs/screen.md +++ b/docs/screen.md @@ -30,7 +30,6 @@ $ screen -ls $ screen -r ``` - ### 选项 @@ -45,7 +44,6 @@ $ screen -r `-X` | screen -X -S debug kill | 终止正在运行的会话 - ### 进入 Command | Description @@ -108,7 +106,6 @@ Command | Description `Ctrl-A` `H` | 在屏幕会话中启用日志记录 - ### 分屏 Command | Description @@ -121,7 +118,6 @@ Command | Description `Ctrl-A` `Q` | 删除除当前区域之外的所有区域 - ### 滚动 Command | Description @@ -138,4 +134,4 @@ Command | Description ```shell $ ssh -t user@host screen -x -``` \ No newline at end of file +``` diff --git a/docs/sed.md b/docs/sed.md index 870f1532104..845aec98360 100644 --- a/docs/sed.md +++ b/docs/sed.md @@ -71,8 +71,8 @@ Sed 命令 ### 命令 -命令 | 示例 | 描述 -:- | :- |:- +命令 | 示例 | 描述 +:- | :- |:- `p` | sed -n '1,4 p' input.txt | 打印第 1-4 行 `p` | sed -n -e '1,4 p' -e '6,7 p' input.txt | 打印第 1-4 行和第 6-7 行 `d` | sed '1,4 d' input.txt | 打印除 1-4 之外的行 @@ -83,8 +83,8 @@ Sed 命令 ### 空间命令 -命令 | 描述 -:- | :- +命令 | 描述 +:- | :- `n` | 打印模式空间,空模式空间,读取下一行 `x` | 用保持空间交换模式空间 `h` | 复制模式空间以保持空间 @@ -99,7 +99,7 @@ $ sed 's/old/new/[flags]' [input-file] ``` --- - + | Flag | Description | |----------|--------------------------------------------| | `g` | 全球替代 | @@ -109,7 +109,6 @@ $ sed 's/old/new/[flags]' [input-file] | `I` | 搜索时忽略大小写 | | `e` | 在命令行中替换并执行 | - ### 循环命令 | Command | Description | diff --git a/docs/semver.md b/docs/semver.md index 63edef79cc8..8b7e92c8975 100644 --- a/docs/semver.md +++ b/docs/semver.md @@ -75,9 +75,9 @@ Semver 备忘清单 | `1.2 - 2.3.0` | 是 `1.2.0 - 2.3.0` | -当右侧为部分(例如,`2.3`)时,假定缺失的部分为`x`(例如,` 2.3.x`)。 +当右侧为部分(例如,`2.3`)时,假定缺失的部分为`x`(例如,`2.3.x`)。 -如果左边是部分的(例如,`1.2`),则假定缺少的部分为`0`(例如,` 1.2.0`)。 +如果左边是部分的(例如,`1.2`),则假定缺少的部分为`0`(例如,`1.2.0`)。 ### 有效的语义版本 @@ -142,9 +142,8 @@ Semver 备忘清单 1.1.2-prerelease+meta ``` - 另见 ---- - [语义化版本号验证正则表达式,支持按编号提取的语言](https://regex101.com/r/vkijKf/1/) -- [语义化版本号验证正则表达式,支持按组名称提取的语言](https://regex101.com/r/Ly7O1x/3/) \ No newline at end of file +- [语义化版本号验证正则表达式,支持按组名称提取的语言](https://regex101.com/r/Ly7O1x/3/) diff --git a/docs/sketch.md b/docs/sketch.md index 02438b7adcf..52ccdc6587b 100644 --- a/docs/sketch.md +++ b/docs/sketch.md @@ -22,7 +22,6 @@ Sketch 备忘清单 | `t` | (Text) 文本 | - ### 类型 @@ -131,8 +130,7 @@ Sketch 备忘清单 | `Fn + ↓` | 选择下面的页面 | - 另见 ---- -- [Sketch 官网](https://www.sketch.com/) _(sketch.com)_ \ No newline at end of file +- [Sketch 官网](https://www.sketch.com/) _(sketch.com)_ diff --git a/docs/ssh.md b/docs/ssh.md index bf8c3917a96..a6ad04888fd 100644 --- a/docs/ssh.md +++ b/docs/ssh.md @@ -99,7 +99,6 @@ $ scp user@server:/dir/* . `~/.ssh/known_hosts` | 登录主机 `~/.ssh/authorized_keys` | 授权登录密钥 - ### SCP 选项 选项 | 说明 @@ -111,7 +110,6 @@ scp `-P` 8080 | 使用特定端口 scp `-B` | 批处理模式_(防止密码)_ scp `-p` | 保留时间和模式 - ### 配置示例 ```toml @@ -148,7 +146,6 @@ $ ssh -J user@proxy_host1:port1,user@proxy_host2:port2 user@remote_host3 ``` - ### ssh-copy-id ```shell @@ -229,7 +226,6 @@ $ ssh-keygen -p -f ~/.ssh/id_rsa - dsa - ecdsa - ### known_hosts @@ -247,11 +243,11 @@ $ ssh-keygen -R ### 密钥格式 -- PEM +- PEM - PKCS8 另见 -------- - [OpenSSH 配置文件示例](https://www.cyberciti.biz/faq/create-ssh-config-file-on-linux-unix/) _(cyberciti.biz)_ -- [ssh_config](https://linux.die.net/man/5/ssh_config) _(linux.die.net)_ \ No newline at end of file +- [ssh_config](https://linux.die.net/man/5/ssh_config) _(linux.die.net)_ diff --git a/docs/styled-components.md b/docs/styled-components.md index 7433096fa28..0b449f7b165 100644 --- a/docs/styled-components.md +++ b/docs/styled-components.md @@ -3,7 +3,6 @@ styled-components 备忘清单 此快速参考备忘单提供了使用 CSS in JS 工具的各种方法。 - 入门 ---- @@ -29,6 +28,7 @@ import styled from 'styled-components'; ``` 创建一个 Title 组件 + ```jsx // 该组件将呈现具有样式的

    标签 const Title = styled.h1` @@ -236,7 +236,6 @@ const Demo = () => ( ); ``` - ### 样式对象 ```jsx {2,5} @@ -1107,4 +1106,4 @@ const Example = () => ( Drag Me! ); -``` \ No newline at end of file +``` diff --git a/docs/stylus.md b/docs/stylus.md index cc722d5bb04..98e2ff40dab 100644 --- a/docs/stylus.md +++ b/docs/stylus.md @@ -84,6 +84,7 @@ h5 { } ``` + 另见:下面[Mixins](#混合-Mixins) ### 变量 Variables @@ -388,6 +389,7 @@ for i in 1..3 .text-{i} font-size: lookup('font-size-' + i) ``` + ### 定义检查 ```stylus {1} diff --git a/docs/sublime-text.md b/docs/sublime-text.md index 6c6208deff8..0be59196024 100644 --- a/docs/sublime-text.md +++ b/docs/sublime-text.md @@ -58,7 +58,7 @@ Sublime Text 备忘清单 `⌃` | Control `⌥` | Option(alt) `⇧` | Shift -`⇪` | Caps Lock(大写) +`⇪` | Caps Lock(大写) `fn` | 功能键就是fn `↩︎` | return/Enter @@ -79,9 +79,9 @@ Sublime Text 备忘清单 快捷键 | 说明 :- | - -`⌘ P` | 去任何地方 -`⌘ G` | 转到行号 -`⌘ R` | 转到符号 +`⌘ P` | 去任何地方 +`⌘ G` | 转到行号 +`⌘ R` | 转到符号 `⌘ P, :` | 转到行号(`:`之后输入数字) `⌘ P, #` | 转到并列出字符串模糊匹配(`#`之后输入字符) `⌘ P, @` | 转到并列出符号(`@`之后开始输入符号名称) @@ -147,4 +147,4 @@ $ subl README.md ---- - [Sublime Text 官网](https://www.sublimetext.com/) _(sublimetext.com)_ -- [Sublime 编辑器快捷键](https://jaywcjlove.github.io/handbook/Shortcuts/sublime.html) _(jaywcjlove.github.io)_ \ No newline at end of file +- [Sublime 编辑器快捷键](https://jaywcjlove.github.io/handbook/Shortcuts/sublime.html) _(jaywcjlove.github.io)_ diff --git a/docs/swift.md b/docs/swift.md index 585bab7b3bc..53c0136cbeb 100644 --- a/docs/swift.md +++ b/docs/swift.md @@ -34,11 +34,11 @@ var price: Double = 8.99 ### 算术运算符 - - `+` 添加 - - `-` 减法 - - `*` 乘法 - - `/` 分配 - - `%` 余数 +- `+` 添加 +- `-` 减法 +- `*` 乘法 +- `/` 分配 +- `%` 余数 ---- @@ -444,7 +444,7 @@ switch num { // 打印: 7 奇数 ``` -### 逻辑运算符! +### 逻辑运算符 ```swift !true // false @@ -480,6 +480,7 @@ false || false // false ```swift false || true && false // false ``` + `true && false` 首先计算返回 `false` 然后,表达式,`false` || `false` 评估并返回最终结果 `false` ### 控制执行顺序 @@ -1431,9 +1432,9 @@ enum Dessert { let customerOrder: Dessert = .cake(flavor: "红色天鹅绒") switch customerOrder { case let .cake(flavor): - print("你点了一个 \(flavor) 蛋糕") + print("你点了一个 \(flavor) 蛋糕") case .brownie: - print("你点了一块巧克力蛋糕") + print("你点了一块巧克力蛋糕") } // 打印: "你点了一个红色天鹅绒蛋糕" ``` @@ -1521,7 +1522,7 @@ enum ShirtSize: String { case medium = "M" case large = "L" case extraLarge = "XL" - var description: String { + var description: String { return "这件衬衫尺码是 \(self.rawValue)" } } @@ -1534,4 +1535,4 @@ enum ShirtSize: String { - [快速编程语言(官方)](https://docs.swift.org/swift-book/) _(swift.or)_ - [Learn Swift](https://www.codecademy.com/resources/cheatsheets/language/swift) _(codecademy.com)_ - [Swift 开发人员的一站式快速参考](https://swiftly.dev/) _(swiftly.dev)_ -- [Swift 入门教程、读书笔记](https://jaywcjlove.github.io/swift-tutorial) _(jaywcjlove.github.io)_ \ No newline at end of file +- [Swift 入门教程、读书笔记](https://jaywcjlove.github.io/swift-tutorial) _(jaywcjlove.github.io)_ diff --git a/docs/swiftui.md b/docs/swiftui.md index 9ef3244f080..1336a381c7d 100644 --- a/docs/swiftui.md +++ b/docs/swiftui.md @@ -53,7 +53,7 @@ struct AlbumDetail: View { - [Picker](#picker-选择控件) _(UISegmentedControl)_ - [Stepper](#stepper-执行语义递增和递减操作的控件) _(UIStepper)_ - [DatePicker](#datepicker-日期控件) _(UIDatePicker)_ -- [Text](#text-文本) _(NSAttributedString)无等效项)_ +- [Text](#text) _(NSAttributedString)无等效项)_ - [Map](#map-地图界面的视图) _(MapKit)_ - [ProgressView](#progressview-进度视图) _(UIProgressView)_ - [Shape](#shape) / [Rectangle](#shape) / [Circle](#shape) @@ -230,7 +230,6 @@ Map(coordinateRegion: $region, 文档 - [Map](https://developer.apple.com/documentation/mapkit/map) - Layout(布局) ---- @@ -620,7 +619,6 @@ DatePicker("Maximum Date", selection: $selectedDate, 文档 - [DatePicker](https://developer.apple.com/documentation/swiftui/datepicker) - ### Slider 滑动输入条 用于从值的有界线性范围中选择一个值的控件。 @@ -673,6 +671,7 @@ NavigationView { } } ``` + 您可以使用 `.pickerStyle(WheelPickerStyle())` 覆盖样式。 ```swift @@ -1200,10 +1199,9 @@ struct SheetDetail: Identifiable { 文档 - [ActionSheet](https://developer.apple.com/documentation/swiftui/actionsheet) - 另见 --- - [SwiftUI 2.0 Cheat Sheet](https://github.com/SimpleBoilerplates/SwiftUI-Cheat-Sheet) _(github.com)_ - [SwiftUI 2.0 备忘清单](https://wangchujiang.com/swiftui-example/cheat-sheet.html) _(swiftui-example)_ -- [Swift 备忘清单](./swift.mdl) _(jaywcjlove.github.io)_ \ No newline at end of file +- [Swift 备忘清单](./swift.mdl) _(jaywcjlove.github.io)_ diff --git a/docs/systemd.md b/docs/systemd.md index b1b3fc0328f..000c51a5d75 100644 --- a/docs/systemd.md +++ b/docs/systemd.md @@ -107,4 +107,4 @@ SysVinit | Systemd | 说明 - [Systemd 官网](https://systemd.io/) _(systemd.io)_ - [Systemd Cheat Sheet](https://access.redhat.com/sites/default/files/attachments/12052018_systemd_6.pdf) _(access.redhat.com)_ -- [Systemd Cheat Sheet](https://www.linuxtrainingacademy.com/systemd-cheat-sheet/) _(linuxtrainingacademy.com)_ \ No newline at end of file +- [Systemd Cheat Sheet](https://www.linuxtrainingacademy.com/systemd-cheat-sheet/) _(linuxtrainingacademy.com)_ diff --git a/docs/tmux.md b/docs/tmux.md index 37600ff8c1b..543c383d4a4 100644 --- a/docs/tmux.md +++ b/docs/tmux.md @@ -240,4 +240,4 @@ Tmux 命令模式 --- - [Tmux 开源仓库](https://github.com/tmux/tmux) _(github.com)_ -- [Tmux Cheat Sheet & Quick Reference](https://tmuxcheatsheet.com/) _(tmuxcheatsheet.com)_ \ No newline at end of file +- [Tmux Cheat Sheet & Quick Reference](https://tmuxcheatsheet.com/) _(tmuxcheatsheet.com)_ diff --git a/docs/toml.md b/docs/toml.md index 612cf3c3c79..fb19b933bb3 100644 --- a/docs/toml.md +++ b/docs/toml.md @@ -44,7 +44,6 @@ int3 = -21 integerRange = 64 ``` - ### 浮点数 ```toml @@ -80,7 +79,7 @@ str2 = "You can \"quote\" me." str3 = "Name\tJos\u00E9\nLoc\tSF." ``` -See: [Strings](#toml-strings) +See: [Strings](#字符串) ### Table @@ -165,9 +164,9 @@ bar = 2 ```toml [table1] - foo = "bar" +foo = "bar" [table1.nested_table] - baz = "bat" +baz = "bat" ``` ### 类数组 @@ -186,16 +185,16 @@ text = "Love it!" ```json { - "comments" : [ - { - "author" : "Nate", - "text" : "Great Article!" - }, - { - "author" : "Anonymous", - "text" : "Love It!" - } - ] + "comments" : [ + { + "author" : "Nate", + "text" : "Great Article!" + }, + { + "author" : "Anonymous", + "text" : "Love It!" + } + ] } ``` @@ -224,17 +223,18 @@ type = "pug" [foo.bar.baz] bat = "hi" ``` + #### ↓ 等效的 JSON ```json { - "foo" : { - "bar" : { - "baz" : { - "bat" : "hi" - } - } - } + "foo" : { + "bar" : { + "baz" : { + "bat" : "hi" + } + } + } } ``` @@ -250,7 +250,7 @@ bat = "hi" ### 内联表 -```toml +```toml name = { first = "Tom", last = "Preston-Werner" } point = { x = 1, y = 2 } animal = { type.name = "pug" } @@ -263,6 +263,5 @@ animal = { type.name = "pug" } - [Learn X in Y minutes](https://learnxinyminutes.com/docs/toml/) _(learnxinyminutes.com)_ - [Better TOML VSCode 插件](https://marketplace.visualstudio.com/items?itemName=bungcip.better-toml) _(visualstudio.com)_ - - [INI 格式配置文件备忘清单](./ini.md) _(jaywcjlove.github.io)_ -- [YAML 格式配置文件备忘清单](./yaml.md) _(jaywcjlove.github.io)_ \ No newline at end of file +- [YAML 格式配置文件备忘清单](./yaml.md) _(jaywcjlove.github.io)_ diff --git a/docs/typescript.md b/docs/typescript.md index 38e4c3cd655..e209e6bc3a5 100644 --- a/docs/typescript.md +++ b/docs/typescript.md @@ -240,7 +240,6 @@ type Data = typeof data 通过 typeof 运算符重用来自现有 JavaScript 运行时值的类型。 - ### 从函数返回类型 ```ts @@ -1077,11 +1076,9 @@ console.log(fiveToHex()); 从 Type 中移除 this 参数。 如果 Type 没有显式声明此参数,则结果只是 Type。 否则,从 Type 创建一个不带此参数的新函数类型。 泛型被删除,只有最后一个重载签名被传播到新的函数类型中。 - JSX ---- - ### JSX 介绍 JSX 规范是对 ECMAScript 的类似 XML 的语法扩展。 @@ -1233,7 +1230,6 @@ function NotAValidFactoryFunction() { 默认情况下,`JSX.ElementClass` 是 {},但可以对其进行扩展,以将 `JSX` 的使用限制为仅限于符合适当接口的类型。 - ### 类组件 @@ -1267,4 +1263,4 @@ class Select extends React.Component, any> {} // 使用 const Form = () => items={['a', 'b']} />; -``` \ No newline at end of file +``` diff --git a/docs/vim.md b/docs/vim.md index 57af9129db7..e9b5d000c77 100644 --- a/docs/vim.md +++ b/docs/vim.md @@ -46,7 +46,7 @@ G gg H M L k j ▶ print("to") ┆ ╰┈┈┈┈┈▷ ┆ - SCREEN 1 END ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈▷ print("SCREEN 2") -``` +``` ### 动作 @@ -163,7 +163,7 @@ G gg H M L k j ▶ print("to") 快捷方式 | 说明 :- | - | `d` _\|_ `x` | 删除选择 _(剪切)_ -| `s` | 替换选择 +| `s` | 替换选择 | `y` | Yank 选择 _(复制)_ @@ -210,7 +210,7 @@ Vim 运算符 快捷方式 | 说明 :- | - -`d` | w +`d` | w 运算符 | 动作 @@ -276,7 +276,6 @@ Vim 文本对象 ### 用法 - 快捷方式 | 说明 :- | - `v` |         i _/_ a | p @@ -435,6 +434,7 @@ Vim 搜索和替换 ```vim :%s/{pattern}/{str}/[flags] ``` + --- :- | - @@ -460,7 +460,7 @@ Vim 搜索和替换 `,3` | 接下来的 `3` 行 `-3,` | 转发 `3` 行 -### 全局命令 +### 全局命令 ```vim @@ -516,7 +516,6 @@ Vim 搜索和替换 ### 例子 - ```shell :s/a\|b/xxx\0xxx/g # 将 "a b" 修改为 "xxxaxxx xxxbxxx" :s/test/\U& file/ # 将 "test" 修改为 "TEST FILE" @@ -855,4 +854,4 @@ dfx # 删除文本直到字符“x”(包括字符“x”): delete forward x - [Devhints](https://devhints.io/vim) _(devhints.io)_ - [Vim cheatsheet](https://vim.rtorr.com/lang/zh_cn/) _(vim.rotrr.com)_ - [Vim documentation](http://vimdoc.sourceforge.net/htmldoc/) _(vimdoc.sourceforge.net)_ -- [Interactive Vim tutorial](http://openvim.com/) _(openvim.com)_ \ No newline at end of file +- [Interactive Vim tutorial](http://openvim.com/) _(openvim.com)_ diff --git a/docs/vscode.md b/docs/vscode.md index 22998cb058f..42fd537c455 100644 --- a/docs/vscode.md +++ b/docs/vscode.md @@ -61,11 +61,10 @@ VSCode 备忘清单 | `F8` | 转到下一个错误 | | `Shift` `F8` | 转到上一个错误 | | `Ctrl` `Shift` `Tab` | 浏览编辑组历史 | -| `Alt` ` ←` _/_ `→` | 后退/前进 | +| `Alt` `←` _/_ `→` | 后退/前进 | | `Ctrl` `M` | 切换 Tab 移动焦点 | - ### 搜索和替换 | - | - | @@ -115,7 +114,6 @@ VSCode 备忘清单 | `Ctrl` `K` `M` | 更改文件语言 | - ### 编辑管理 | - | - | @@ -123,7 +121,7 @@ VSCode 备忘清单 | `Ctrl` `F4` `Ctrl` `W` | 关闭编辑器 | | `Ctrl` `K` `F` | 关闭文件夹 | | `Ctrl` `\` | 拆分编辑器 | -| `Ctrl` ` 1` _/_ `2` _/_ `3` | 专注于第一、第二或第三编辑组 | +| `Ctrl` `1` _/_ `2` _/_ `3` | 专注于第一、第二或第三编辑组 | | `Ctrl` `K` `Ctrl` `←` _/_ `→` | 专注于上一个/下一个编辑组 | | `Ctrl` `Shift` `PgUp` _/_ `PgDn` | 向左/向右移动编辑器 | | `Ctrl` `K` `←` _/_ `→` | 移动活动编辑器组 | @@ -170,7 +168,6 @@ VSCode 备忘清单 | `Ctrl` `K` `Z` | Zen 模式(Esc Esc 退出) | - ### 调试 | - | - | diff --git a/docs/vue.md b/docs/vue.md index 28790d49984..890e9d8c2a2 100644 --- a/docs/vue.md +++ b/docs/vue.md @@ -3,7 +3,6 @@ Vue 3 备忘清单 渐进式 JavaScript 框架 [Vue 3](https://cn.vuejs.org/) 备忘清单的快速参考列表,包含常用 API 和示例。 - 入门 --- @@ -129,7 +128,7 @@ app.mount('#app') Message: {{ msg }} ``` -使用的是 `Mustache` 语法 (即双大括号),每次 `msg` 属性更改时它也会同步更新 +使用的是 `Mustache` 语法 (即双大括号),每次 `msg` 属性更改时它也会同步更新 ### 原始 HTML @@ -209,7 +208,6 @@ data() { ``` - ### 指令 Directives ```html @@ -641,4 +639,4 @@ API 参考 --- - [Vue 3.x 官方文档](https://cn.vuejs.org/) -- [Vue Router 4.x 官方文档](https://router.vuejs.org/zh/) \ No newline at end of file +- [Vue Router 4.x 官方文档](https://router.vuejs.org/zh/) diff --git a/docs/vue2.md b/docs/vue2.md index 8b5bb75f681..8c25bf6e645 100644 --- a/docs/vue2.md +++ b/docs/vue2.md @@ -17,7 +17,7 @@ Vue 是一套用于构建用户界面的渐进式框架 注意:Vue 2.x 版本对应 Vue Router 3.x 路由版本 -#### 快速创建 **Vue** 项目 ([Vue CLI](https://cli.vuejs.org/zh/guide/creating-a-project.html)) +#### 快速创建 **Vue** 项目 ([Vue CLI](https://cli.vuejs.org/zh/guide/creating-a-project.html)) ```bash npx @vue/cli create hello-world @@ -277,7 +277,7 @@ var app6 = new Vue({ ... ``` -当 `eventName` 的值为 `focus` 时,`v-on:[eventName]` 将等价于 `v-on:focus` +当 `eventName` 的值为 `focus` 时,`v-on:[eventName]` 将等价于 `v-on:focus` ### 指令修饰符 @@ -550,7 +550,6 @@ data: { ``` - ```js var example1 = new Vue({ el: '#example-1', @@ -995,7 +994,7 @@ computed: { Checked names: {{ checkedNames }} ``` -如下 data +如下 data ```js new Vue({ @@ -1006,7 +1005,7 @@ new Vue({ }) ``` -### 单选按钮 +### 单选按钮 ```html
    @@ -1195,6 +1194,7 @@ vm.selected.number // => 123 - 将 `HTML`/`CSS`/`JS` 三部分存放到一个 `Hello.vue` 文件中 + ```html