01 2021 档案

摘要:有两个程序A,B A绑定端口8000,然后用system函数启动程序B,然后再把A杀掉,这个时候再重启A的时候会发现绑定端口失败, 原因是端口被B绑定了,实际上是被继承了,为了避免这种情况,需要对主socket设置如下 fcntl(mainSocket, F_SETFD, FD_CLOEXEC); 阅读全文
posted @ 2021-01-19 19:58 十七-2020 阅读(213) 评论(0) 推荐(0)
摘要:选取对应行 tab键 选取行缩进 shift键+tab键 删除选取行缩进 阅读全文
posted @ 2021-01-18 15:02 十七-2020 阅读(25) 评论(0) 推荐(0)
摘要:strcasecmp 忽略大小写字符串比较函数 #include <strings.h> int strcasecmp(const char *s1, const char *s2); 参数为两个需要比较的字符串 返回值 0: 相同 非0: 返回第一个不同的字符相差的数量。 实例 #include 阅读全文
posted @ 2021-01-07 17:54 十七-2020 阅读(409) 评论(0) 推荐(0)
摘要:使用 git remote set-url 命令,更新远程仓库的 url git remote set-url origin <newurl> 先删除之前关联的远程仓库,再来添加新的远程仓库关联 删除关联的远程仓库 git remote remove <name> 添加新的远程仓库关联 git re 阅读全文
posted @ 2021-01-07 14:14 十七-2020 阅读(4359) 评论(0) 推荐(1)
摘要:下载 curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo chmod +x repo 为了方便可以将其拷贝到你的PATH里。 更新 repo的运行过程中会尝试访问官方的git源更新自己,如果想使用tuna的镜像源进行更新,可以 阅读全文
posted @ 2021-01-07 14:11 十七-2020 阅读(771) 评论(0) 推荐(0)
摘要:vim-plug下载 curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 详细配置,自用备份 syntax on 阅读全文
posted @ 2021-01-06 20:53 十七-2020 阅读(95) 评论(0) 推荐(0)