From a511eff1cd71efe7ee9f504edefcb91b317ba3f5 Mon Sep 17 00:00:00 2001 From: rangersly <2281598291@qq.com> Date: Sat, 10 May 2025 09:56:15 +0800 Subject: [PATCH] Fix a large number of formatting errors --- electronic/parameter.md | 14 +++---- miscellaneous/web.md | 10 ++--- os/linux/arch/command.md | 2 +- os/linux/arch/install.md | 12 +++--- os/linux/command.md | 18 ++++----- os/linux/knowledge/net.md | 22 ---------- program/c_cpp/CodeSpecification.md | 6 +-- program/c_cpp/STL/algorithms.md | 4 +- program/c_cpp/STL/containers.md | 10 ++--- program/c_cpp/library/libs.md | 8 ++-- program/c_cpp/linux/net.md | 1 + program/c_cpp/linux/random.md | 4 +- program/c_cpp/universal/class.md | 8 ++-- program/c_cpp/universal/compile.md | 2 +- program/c_cpp/universal/cstring.md | 2 +- program/c_cpp/universal/dynamic-memory.md | 16 ++++---- program/c_cpp/universal/func.md | 2 +- program/c_cpp/universal/io.md | 40 ++++++++++--------- program/c_cpp/universal/pointer.md | 8 ++-- .../c_cpp/universal/specifier_qualifier.md | 6 +-- program/c_cpp/universal/template.md | 2 +- program/python/basics/summary.md | 10 ++--- program/tool/docker.md | 2 +- program/tool/gcc_g++.md | 12 +++--- program/tool/gdb.md | 4 +- program/tool/makefile.md | 4 +- program/tool/{objdump.txt => objdump.md} | 3 +- program/tool/perf.md | 2 +- program/tool/regexr.md | 5 --- 29 files changed, 108 insertions(+), 131 deletions(-) delete mode 100644 os/linux/knowledge/net.md rename program/tool/{objdump.txt => objdump.md} (96%) delete mode 100644 program/tool/regexr.md diff --git a/electronic/parameter.md b/electronic/parameter.md index 4f6d3b6..cc78f73 100644 --- a/electronic/parameter.md +++ b/electronic/parameter.md @@ -1,10 +1,10 @@ # 电子硬件参数 -## 目录 -- [电阻](#电阻) -- [电容](#电容) -- [电感](#电感) -- [微控制器](#微控制器) -- [逻辑器件](#逻辑器件) -- [晶体管](#晶体管) +## index +- [电阻](#) +- [电容](#) +- [电感](#) +- [微控制器](#) +- [逻辑器件](#) +- [晶体管](#) diff --git a/miscellaneous/web.md b/miscellaneous/web.md index 3f4a5c6..8a079f4 100644 --- a/miscellaneous/web.md +++ b/miscellaneous/web.md @@ -1,9 +1,9 @@ # website -+ [game](# game) -+ [live](# live) -+ [program](# program) -+ [study](# study) -+ [tool](# tool) ++ [game](#game) ++ [live](#live) ++ [program](#program) ++ [study](#study) ++ [tool](#tool) ## game - indienova.com # 冰与火之舞 diff --git a/os/linux/arch/command.md b/os/linux/arch/command.md index e2208da..9d171b1 100644 --- a/os/linux/arch/command.md +++ b/os/linux/arch/command.md @@ -10,7 +10,7 @@ + `-u` 升级已有安装包 + `-R` 卸载 + `-Q` 查看已安装 -> 示例 +> example + `pacman -Sy` 同步数据库 + `pacman -S ` 安装软件包 + `pacman -Syu` 更新系统 diff --git a/os/linux/arch/install.md b/os/linux/arch/install.md index d079f3c..1c9f1ee 100644 --- a/os/linux/arch/install.md +++ b/os/linux/arch/install.md @@ -5,12 +5,12 @@ - [修改控制台字体](#修改控制台字体) - [验证引导](#验证引导) - [验证网络和更改系统时间](#验证网络和更改系统时间) - - [硬盘分区](#硬盘分区) + - [硬盘分区](#disk) - [安装基础软件包](#安装基础软件包) - - [生成fstab](#生成fstab) + - [生成fstab](#fstab) - [chroot配置](#chroot) - [新系统](#新系统) - - [换源](#换源) + - [换源](#mirrors) - [普通用户](#普通用户) - [KDE](#kde) @@ -30,7 +30,7 @@ `ip addr` `timedatectl` -### 硬盘分区 +### disk ```bash parted /dev/sdX # 进入parted交互界面 @@ -81,7 +81,7 @@ mount --mkdir /dev/sdX1 /mnt/boot + alsa-utils # 声卡驱动 + 其他固件 -### 生成fstab +### fstab `genfstab -U /mnt > /mnt/etc/fstab` @@ -113,7 +113,7 @@ reboot ## 新系统 -### 换源 +### mirrors - `/etc/pacman.d/mirrorlist` ``` Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch diff --git a/os/linux/command.md b/os/linux/command.md index 2d97658..8066293 100644 --- a/os/linux/command.md +++ b/os/linux/command.md @@ -2,7 +2,7 @@ --- -## INDEX +## index - [文件操作](#文件操作) - [打包压缩](#打包压缩) @@ -46,7 +46,7 @@ - [objdump](../../program/tool/objdump) -- [INDEX](#INDEX) +- [index](#index) --- @@ -59,7 +59,7 @@ - [dd](#dd) -- [INDEX](#INDEX) +- [index](#index) --- @@ -74,7 +74,7 @@ - [parted](#parted) -- [INDEX](#INDEX) +- [index](#index) --- @@ -91,7 +91,7 @@ - [last](#last) : 查看用户登陆记录 -- [INDEX](#INDEX) +- [index](#index) --- @@ -110,7 +110,7 @@ - [ulimit](#ulimit) -- [INDEX](#INDEX) +- [index](#index) --- @@ -124,7 +124,7 @@ - [NetworkManager](#networkmanager) -- [INDEX](#INDEX) +- [index](#index) --- @@ -138,14 +138,14 @@ - [编解码工具](#编解码工具) -- [INDEX](#INDEX) +- [index](#index) --- ## 其他 -- [INDEX](#INDEX) +- [index](#index) --- diff --git a/os/linux/knowledge/net.md b/os/linux/knowledge/net.md deleted file mode 100644 index 144019f..0000000 --- a/os/linux/knowledge/net.md +++ /dev/null @@ -1,22 +0,0 @@ -## 配置dhcp - -vim /etc/network/interfaces -auto eth0 -iface eth0 inet dhcp - - -## 手动配置 -iface eth0 inet static -address 192.168.0.108 -netmask 255.255.255.0 -gateway 192.168.0.101 -network 192.168.0.108 - -service network restart //cpwl - -2.配置dns -vim /etc/resolv.conf -nameserver 114.114.114.114 -nameserver 8.8.8.8 -search localdomain - diff --git a/program/c_cpp/CodeSpecification.md b/program/c_cpp/CodeSpecification.md index aa6bd91..7d65772 100644 --- a/program/c_cpp/CodeSpecification.md +++ b/program/c_cpp/CodeSpecification.md @@ -1,8 +1,8 @@ # MY CODE SPECIFICATION -## INDEX -- [Naming](# naming) -- [Code](# code) +## index +- [Naming](#naming) +- [Code](#code) --- diff --git a/program/c_cpp/STL/algorithms.md b/program/c_cpp/STL/algorithms.md index 996d4f4..c8e1330 100644 --- a/program/c_cpp/STL/algorithms.md +++ b/program/c_cpp/STL/algorithms.md @@ -2,8 +2,8 @@ ## 目录 - [非修改性算法](#) - - [find](#) - - [conut](#) + - [find](#find) + - [conut](#conut) - [二分查找](#binary-search) - [修改性算法](#) - [copy](#) diff --git a/program/c_cpp/STL/containers.md b/program/c_cpp/STL/containers.md index 9b6571a..9ab9127 100644 --- a/program/c_cpp/STL/containers.md +++ b/program/c_cpp/STL/containers.md @@ -1,6 +1,6 @@ # STL 容器 -## 目录 +## index - [概念](#) - [通性](#) @@ -14,10 +14,10 @@ - [map](#) - [multimap](#) - [无序容器](#) - - [`unordered_set`](#unordered_set) - - [`unordered_multiset`](#unordered_multiset) - - [`unordered_map`](#unordered_map) - - [`unordered_multimap`](#unordered_multimap) + - [unordered-set](#unordered-set) + - [unordered-multiset](#unordered-multiset) + - [unordered-map](#unordered-map) + - [unordered-multimap](#unordered-multimap) - [预定义函数符](#) ## 概念 diff --git a/program/c_cpp/library/libs.md b/program/c_cpp/library/libs.md index 3a5f1c9..37d2148 100644 --- a/program/c_cpp/library/libs.md +++ b/program/c_cpp/library/libs.md @@ -2,9 +2,9 @@ --- -## INDEX +## index -- [C](#C) +- [C](#c) - [输入/输出 stdio](#stdio) - [资源管理和系统交互 stdlib](#stdlib) - [字符串处理 string](#string) @@ -26,10 +26,10 @@ - [多线程支持(C11) threads](#threads) - [原子操作(C11) stdatomic](#stdatomic) - [Unicode支持(C11) uchar](#uchar) -- [CPP](#CPP) +- [CPP](#cpp) - [STL](../STL/) - [POSIX](#unistd) -- [SELF](#SELF) +- [SELF](#self) - [offsetof](./self/offsetof.h) - [string hash](./self/string_hash.c) - [thread pool](./self/thread-pool.cpp) diff --git a/program/c_cpp/linux/net.md b/program/c_cpp/linux/net.md index abdb1d1..444a175 100644 --- a/program/c_cpp/linux/net.md +++ b/program/c_cpp/linux/net.md @@ -1,3 +1,4 @@ +# net ```cpp #include #include diff --git a/program/c_cpp/linux/random.md b/program/c_cpp/linux/random.md index e8a97d5..ff1f116 100644 --- a/program/c_cpp/linux/random.md +++ b/program/c_cpp/linux/random.md @@ -2,8 +2,8 @@ 从系统熵池进行获取 ## index -- [random-urandom](# random-urandom) -- [note](# note) +- [random-urandom](#random-urandom) +- [note](#note) ## random-urandom /dev/random 和 /dev/urandom 的区别 diff --git a/program/c_cpp/universal/class.md b/program/c_cpp/universal/class.md index 72a0123..44fb42f 100644 --- a/program/c_cpp/universal/class.md +++ b/program/c_cpp/universal/class.md @@ -4,7 +4,7 @@ - [访问控制](#访问控制) - [作用域运算符](#作用域运算符) - [类的六大特殊成员函数](#类的六大特殊成员函数) - - [RAII](#RAII) + - [RAII](#raii) - [move语义](#move) - [右值引用](#右值引用) - [初始化列表](#初始化列表) @@ -20,7 +20,7 @@ - [虚函数](#virtual) - [设计理念](#) - [is a](#) - - [AbstactBaseClass](#ABC) + - [AbstactBaseClass](#abc) ## 访问控制 @@ -53,7 +53,7 @@ demo& demo::operator = (demo&&); // 移动赋值构造函数 `demo::demo() = delete;`显式声明为禁用 -### RAII +### **raii** 在类的构造函数中申请堆内存,在析构函数中释放,这样可以保证类失效时内存被释放 @@ -192,7 +192,7 @@ __保护成员在派生类中的访问性__ ## 设计理念 ### is-a -### ABC +### **abc** 即使用[纯虚函数](#virtual)构造的抽象类 无法构建对象,只能用于构造其他派生类 diff --git a/program/c_cpp/universal/compile.md b/program/c_cpp/universal/compile.md index 68806af..4975a8b 100644 --- a/program/c_cpp/universal/compile.md +++ b/program/c_cpp/universal/compile.md @@ -1,6 +1,6 @@ # 预编译指令 -## 目录 +## index - [define](#define) - [预定义宏](#预定义宏) - [defined](#defined) diff --git a/program/c_cpp/universal/cstring.md b/program/c_cpp/universal/cstring.md index cda2665..ed53f54 100644 --- a/program/c_cpp/universal/cstring.md +++ b/program/c_cpp/universal/cstring.md @@ -3,7 +3,7 @@ --- -## INDEX +## index - [字符串库函数](#std-string) - [内存操作标准库函数](#std-mem) diff --git a/program/c_cpp/universal/dynamic-memory.md b/program/c_cpp/universal/dynamic-memory.md index ce87fd9..4b6557f 100644 --- a/program/c_cpp/universal/dynamic-memory.md +++ b/program/c_cpp/universal/dynamic-memory.md @@ -2,17 +2,17 @@ --- -## INDEX +## index -- [C](# C) - - [malloc](# malloc) - - [calloc](# calloc) - - [realloc](# realloc) +- [C](#c) + - [malloc](#malloc) + - [calloc](#calloc) + - [realloc](#realloc) - [aligned-alloc](#aligned-alloc) - [free](#) : 传入动态分配的指针地址,记得释放完赋NULL -- [CPP](# CPP) - - [new](# new) - - [delete](# delete) +- [CPP](#cpp) + - [new](#new) + - [delete](#delete) --- diff --git a/program/c_cpp/universal/func.md b/program/c_cpp/universal/func.md index 84262ae..4e97b25 100644 --- a/program/c_cpp/universal/func.md +++ b/program/c_cpp/universal/func.md @@ -1,6 +1,6 @@ # c-cpp function -## 目录 +## index - [extern](#extern) - [noexcept](#noexcept) - [重载](#) diff --git a/program/c_cpp/universal/io.md b/program/c_cpp/universal/io.md index cd326e4..149470a 100644 --- a/program/c_cpp/universal/io.md +++ b/program/c_cpp/universal/io.md @@ -1,24 +1,24 @@ -# c with cpp io +# c with cpp IO # INDEX -- [标准IO流](#IOstream) -- [C](#C) - - [格式化IO](#格式化IO) - - [字符IO](#charIO) - - [Cstring](#Cstring) - - [C二进制IO](#Cbin) - - [C文件操作](#C-FILE) +- [标准IO流](#iostream) +- [C](#c) + - [格式化IO](#format-io) + - [字符IO](#char-io) + - [Cstring](#cstring) + - [C二进制IO](#cbin) + - [C文件操作](#c-file) - [error](#c-error) -- [cpp stdio](#cpp stdio) -- [cpp fio](#cpp fio) +- [cpp stdio](#cpp-stdio) +- [cpp fio](#cpp-fio) - [关闭缓冲区读取](#../linux/ncurses.c) - [ANSI](#./ansi.md) --- -## **IOstream** +## **iostream** + stdin + stdout @@ -26,13 +26,13 @@ --- -## **C** +## **c** `#include ` --- -### 格式化IO +### **format-io** - scanf 格式化输入函数 - printf 格式化输出函数 @@ -48,7 +48,7 @@ __控制符__ --- -### charIO +### char-io + IN |function prototype |remark | @@ -67,7 +67,7 @@ __控制符__ --- -### Cstring +### **cstring** |function prototype |remark | |---------------------------------------------------------|--------------------------------| @@ -76,14 +76,16 @@ __控制符__ --- -### Cbin +### cbin `size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);` + size 读写的块大小 + nmemb 读写的块数量 `size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);` -### C-FILE +--- + +### c-file - `FILE *fp` 文件指针 - `FILE *fopen(const char *pathname, const char *mode);` 错误返回NULL @@ -133,7 +135,7 @@ __控制符__ --- -## cpp stdio +## cpp-stdio > 头文件 #include @@ -155,7 +157,7 @@ __控制符__ ``` ________________________________________________ -## file IO +## cpp-fio > 头文件 #include diff --git a/program/c_cpp/universal/pointer.md b/program/c_cpp/universal/pointer.md index 8251ce9..315b05d 100644 --- a/program/c_cpp/universal/pointer.md +++ b/program/c_cpp/universal/pointer.md @@ -2,12 +2,12 @@ ## 目录 -- [NULL and nullptr](#NULL-nullptr) -- [cpp智能指针](#cpp智能指针) +- [NULL and nullptr](#null-nullptr) +- [cpp智能指针](#cpp-pointer) - [注意事项](#注意事项) - [some example](#some-example) -## NULL-nullptr +## null-nullptr 在C和CPP中,NULL并不相同 @@ -25,7 +25,7 @@ 因此cpp中应使用nullptr,否则函数重载中会出现选择错误问题 -## cpp智能指针 +## cpp-pointer 1. `std::unique_ptr` diff --git a/program/c_cpp/universal/specifier_qualifier.md b/program/c_cpp/universal/specifier_qualifier.md index 36b5ca4..8c4f255 100644 --- a/program/c_cpp/universal/specifier_qualifier.md +++ b/program/c_cpp/universal/specifier_qualifier.md @@ -1,12 +1,12 @@ # 说明符 -## 目录 +## index - [static](#static) - [extern](#extern):引用声明 - [mutable](#mutable) -- [thread local](#`thread_local`) +- [thread local](#thread-local) - [const](#const) - -[const with point](# const-with-point) + -[const with point](#const-with-point) - [volatile](#volatile):强制读内存 - [restrict](#restrict) : 指示编译器优化指针(C99) diff --git a/program/c_cpp/universal/template.md b/program/c_cpp/universal/template.md index 184c5a8..065b019 100644 --- a/program/c_cpp/universal/template.md +++ b/program/c_cpp/universal/template.md @@ -1,6 +1,6 @@ # 模板 -## 目录 +## index - [函数模板](#) - [生成](#) - [类模板](#) diff --git a/program/python/basics/summary.md b/program/python/basics/summary.md index 5bb06b6..b1394da 100644 --- a/program/python/basics/summary.md +++ b/program/python/basics/summary.md @@ -1,12 +1,12 @@ # python基础合集 -## 目录 +## index - [程序之始](#run) -- [IO](#IO) +- [IO](#io) - [格式化输出](#) - [字符串](#string) -- [DEBUG](#Debug) +- [DEBUG](#debug) - [变量](#) - [数值类型](#) @@ -14,7 +14,7 @@ `if __name__ == '__main__'` 判断程序是否在主函数内(区别与模块等) -## IO +## io `print(values, sep, end)` 值, 分割符, 结尾符 > `print("hello", sep=',', end='_')` @@ -66,7 +66,7 @@ s.swapcase() # 转换大小写 eval('12+3') # 计算值 返回15 ``` -## Debug +## debug 1. pdb `import pdb; pdb.set_trace()` 程序运行到这行代码时会进入调试模式 diff --git a/program/tool/docker.md b/program/tool/docker.md index 0f7f0b4..acacc2e 100644 --- a/program/tool/docker.md +++ b/program/tool/docker.md @@ -1,7 +1,7 @@ # docker 是一个开源的应用容器引擎 -## 目录 +## index - [核心组件](#) - [install](#) - [基本命令](#) diff --git a/program/tool/gcc_g++.md b/program/tool/gcc_g++.md index bdd16e6..72d65c1 100644 --- a/program/tool/gcc_g++.md +++ b/program/tool/gcc_g++.md @@ -1,11 +1,11 @@ # gcc-g++ 编译器 ## 目录 -- [编译选项](#编译选项) - - [优化等级](# 优化等级) -- [制作库文件](#制作库文件) +- [编译选项](#option) + - [优化等级](#level) +- [制作库文件](#make-lib) -## 编译选项 +## **option** - `g++ -S test.s test.cpp` 编译成汇编文件 - `g++ -c test.o test.s` 目标文件 - `g++ -o test test.o` 链接 @@ -21,7 +21,7 @@ --- -### **优化等级** +### **level** - **O0** 不进行任何优化 - **O1** 基础优化 - 删除未使用的变量和函数 @@ -51,7 +51,7 @@ --- -## 制作库文件 +## make-lib --- diff --git a/program/tool/gdb.md b/program/tool/gdb.md index 1d5b03b..2d06e9e 100644 --- a/program/tool/gdb.md +++ b/program/tool/gdb.md @@ -2,7 +2,7 @@ 使用 -g 生成调试文件,不可以加 -O 选项 ## 目录 -- [基础使用](#基础使用) +- [基础使用](#base) - [run](#run) - [set](#set) - [mem](#mem) @@ -10,7 +10,7 @@ - [info](#info) - [core](#core) -## 基础使用 +## base `l n` 列出源码 `b n` 在第n行打断点 `break main if var_name > 10` 满足条件时打断点 diff --git a/program/tool/makefile.md b/program/tool/makefile.md index 906a309..aa9ec3e 100644 --- a/program/tool/makefile.md +++ b/program/tool/makefile.md @@ -1,7 +1,7 @@ # make ## 目录 -- [参数](#参数) +- [参数](#argv) - [makefile](#makefile) - [变量与赋值](#变量和赋值) - [自动变量](#自动变量) @@ -25,7 +25,7 @@ --- -## **参数** +## **argv** - `-n` 参数可以打印出make会执行的命令,但不真正执行 - `-f ` 指定makefile - `-i` 忽略错误 diff --git a/program/tool/objdump.txt b/program/tool/objdump.md similarity index 96% rename from program/tool/objdump.txt rename to program/tool/objdump.md index 1c77995..a956f47 100644 --- a/program/tool/objdump.txt +++ b/program/tool/objdump.md @@ -1,4 +1,5 @@ -objdump +# objdump + -f 显示文件头 -h 显示段(section)信息 -x 文件头和信息 diff --git a/program/tool/perf.md b/program/tool/perf.md index 2cc9940..8cf42fb 100644 --- a/program/tool/perf.md +++ b/program/tool/perf.md @@ -1,4 +1,4 @@ -# perf 功能强大的linux性能分析工具 +# perf 功能强大的linux性能分析工具 `perf [command] [options] [arguments]` 子命令 额外选项 要分析的程序或命令 diff --git a/program/tool/regexr.md b/program/tool/regexr.md deleted file mode 100644 index 93d4e4f..0000000 --- a/program/tool/regexr.md +++ /dev/null @@ -1,5 +0,0 @@ -# 正则表达式 - -## 学习工具 - + https://regexr.com 查询网站 - + regex-vis.com 可视化表达式