摘要: When you land in the world of computers with their strange convoluted machine language, it's a bit like landing on another planet, whose inhabitants s 阅读全文
posted @ 2023-04-26 16:41 One7 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 图片链接:https://blog.hutchins1.net/2020/02/vt102.html https://en.wikipedia.org/wiki/VT100 2022/4/22 阅读全文
posted @ 2022-04-22 20:09 One7 阅读(40) 评论(0) 推荐(0) 编辑
摘要: s命令 vi/vim中可以使用 :s命令来替换字符串 下面介绍几个简单的用法 :s/helllo/sky/ 替换当前行第一个hello为sky :s/helllo/sky/g 替换当前行的所有hello为sky :n,$s/hello/sky 替换第n行开始到最后一行的第一个hello为sky :n 阅读全文
posted @ 2022-04-15 19:47 One7 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 一个字符占几个字节? 1、ASCII码中:一个英文字母(不分大小写)占一个字节的空间,一个中文汉字占两个字节的空间。 一个二进制数字序列,在计算机中作为一个数字单元,一般为8位二进制数,换算为十进制。最小值0,最大值255。 2、UTF-8编码中:一个英文字符等于一个字节,一个中文(含繁体)等于三个 阅读全文
posted @ 2022-04-13 17:33 One7 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 2022/4/11 阅读全文
posted @ 2022-04-11 19:18 One7 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 上午在看源码项目 webbench 时,刚开始就被一个似乎挺陌生函数 getopt_long() 给卡住了,说实话这函数没怎么见过,自然不知道这哥们是干什么的。 于是乎百度了一番,原来是处理命令行选项参数的,的确,正规点的大型程序一般第一步就是处理命令行参数的,接着才是主干程序。在百度和 man 的 阅读全文
posted @ 2022-04-11 17:13 One7 阅读(529) 评论(0) 推荐(1) 编辑
摘要: C程序编译过程 echo $? 输出返回值 xxd 用于二进制或16进制显示文件内容 set nowrap 取消自动换行 file a.out 查看文件类型 man gcc gcc --help tldr gcc 社区维护 What is tldr-pages? The tldr-pages pro 阅读全文
posted @ 2022-04-06 19:47 One7 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 编写可读代码 不可读:void (*signal(int sig, void (*func)(int)))(int); 可读: typedef void (*sighandler_t)(int); sighandler_t signal(int, sighandler_t); 例子:实现数字逻辑电路 阅读全文
posted @ 2022-04-05 22:10 One7 阅读(193) 评论(0) 推荐(0) 编辑
摘要: C语言中所有的数据都可以理解成是地址(指针)+ 类型(对地址的解读) #include <stdio.h> void printptr(void *p) { printf("p = %p; *p = %016lx\n", p, *(long *)p); } int x; int main(int a 阅读全文
posted @ 2022-04-02 21:47 One7 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 个人拙见:home side $DISPLAY=:0 is consistent with the listening port of X-server Application. More details are as follows. Display NumberX11 server applic 阅读全文
posted @ 2022-04-01 17:29 One7 阅读(30) 评论(0) 推荐(0) 编辑