09 2022 档案

摘要:使用 git reset --soft 答案来源(高赞回答):https://stackoverflow.com/questions/22355612/how-to-undo-the-last-commit-in-git-but-keep-my-changes-as-unstaged 阅读全文
posted @ 2022-09-29 01:07 yinhuachen 阅读(45) 评论(0) 推荐(0) 编辑
摘要:看高赞回答 答案来源:https://stackoverflow.com/questions/42174485/git-how-dangerous-is-deleted-by-us-conflict 阅读全文
posted @ 2022-09-28 06:30 yinhuachen 阅读(1453) 评论(0) 推荐(0) 编辑
摘要:看高赞回答 答案来源 https://stackoverflow.com/questions/1186535/how-do-i-modify-a-specific-commit 阅读全文
posted @ 2022-09-28 06:29 yinhuachen 阅读(25) 评论(0) 推荐(0) 编辑
摘要:1. 预处理 = 文本粘贴 + 去除注释 gcc -E 可以通过 gcc --verbose(阅读工具的日志)来查看头文件是如何被编译器找到的(可以使用 gcc --verbose > /dev/null 丢掉预处理的结果,只看verbose的内容) 在 C 编程语言中,#warning 指令类似于 阅读全文
posted @ 2022-09-26 16:51 yinhuachen 阅读(102) 评论(0) 推荐(0) 编辑
摘要:答案来源:https://stackoverflow.com/questions/7901864/git-conflict-markers 阅读全文
posted @ 2022-09-24 15:21 yinhuachen 阅读(10) 评论(0) 推荐(0) 编辑
摘要:1. 2-way merge 和 3-way merge 作者:Lazykid链接:https://www.zhihu.com/question/30200228/answer/866309494来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 Three-way me 阅读全文
posted @ 2022-09-24 14:49 yinhuachen 阅读(105) 评论(0) 推荐(0) 编辑
摘要:当你的 git 项目需要引用其它的 git 库时,直接把代码复制到你的 git 库中的行为会使得当 “引用库” 的上游发生改变时,难以把这些上游改变和你自己的定制化改变合并。 而如果采用对 .so 文件进行 "include" 的方法,你又很难确保每个使用你的代码的用户会安装那个 .so 库。 以下 阅读全文
posted @ 2022-09-24 04:18 yinhuachen 阅读(22) 评论(0) 推荐(0) 编辑
摘要:git checkout master -- filename答案来源:https://stackoverflow.com/questions/37972753/git-reset-single-file-in-feature-branch-to-be-the-same-as-in-master 阅读全文
posted @ 2022-09-22 22:02 yinhuachen 阅读(25) 评论(0) 推荐(0) 编辑
摘要:使用 script 命令 答案来源:https://stackoverflow.com/questions/3515208/can-colorized-output-be-captured-via-shell-redirect 阅读全文
posted @ 2022-09-22 21:32 yinhuachen 阅读(14) 评论(0) 推荐(0) 编辑
摘要:视频1:https://www.bilibili.com/video/BV1hY4y1u7XK/?spm_id_from=333.337.search-card.all.click&vd_source=7a1a0bc74158c6993c7355c5490fc600 内存泄漏原因:malloc/ne 阅读全文
posted @ 2022-09-21 18:46 yinhuachen 阅读(147) 评论(0) 推荐(0) 编辑
摘要:1. bug可能存在的地方有三处代码、输入、配置 2. 工具组合:1. trace(用来定位大致范围) 2. gdb(用来精准定位) 3. 很多工具有 --verbose 选项,可以帮助debug 4. 好的、可维护性高的代码看起来很像需求(手册) 5. 在每一次指针访问时,都增加一个断言 gcc 阅读全文
posted @ 2022-09-21 03:35 yinhuachen 阅读(67) 评论(0) 推荐(0) 编辑
摘要:把复杂语句拆分成简单语句的工具(输入是C语言,输出也是C语言):C Intermediate Language C语言语句的语义谁说了算?答案:C语言标准手册(比如C99标准手册) C程序是个状态机,CPU也是个状态机,因为CPU = 数字逻辑电路 = 状态机。 指令集相关 指令集是软件和硬件之间的 阅读全文
posted @ 2022-09-21 00:13 yinhuachen 阅读(74) 评论(0) 推荐(0) 编辑
摘要:df / 查看磁盘分区使用情况 fdisk /dev/sdb 对磁盘进行分区 grep "\bint i\b" a.c 查找文件中定义变量i的位置 The symbol \b matches the empty string at the edge of a word wget http://www 阅读全文
posted @ 2022-09-20 10:57 yinhuachen 阅读(64) 评论(0) 推荐(0) 编辑
摘要:如果字符串使用 ‘’ (单引号)括起来,则使用 A = [], A = [A, str] 这种创建矩阵的方式只会导致“字符串连接” 如果字符串使用 “ ”(双引号)括起来,则使用 A = [], A = [A, str] 这种创建矩阵的方式能够创建矩阵 关于把单引号字符串转换成双引号字符串的方法:例 阅读全文
posted @ 2022-09-13 21:22 yinhuachen 阅读(3405) 评论(0) 推荐(0) 编辑
摘要:注意:File Exchange 其实算是 matlab 的 “开源社区” 还可以在 mathworks help center 查看各种API的用法:https://www.mathworks.com/help/matlab/ref/imread.html 代码来源:https://www.mat 阅读全文
posted @ 2022-09-13 19:14 yinhuachen 阅读(32) 评论(0) 推荐(0) 编辑
摘要:答案来源:https://blog.csdn.net/a52228254/article/details/106184602 阅读全文
posted @ 2022-09-07 17:05 yinhuachen 阅读(30) 评论(0) 推荐(0) 编辑
摘要:提问:verilog 在进行数值比较(使用 ==, ,>=, <= 等比较运算符)时,如果有一个或两个运算符是未知的(比如 x 或 z),会有怎样的行为? 详细解释: 我正在做HDLbits的这道题目(题目链接:https://hdlbits.01xz.net/wiki/Rotate100 ) 。这 阅读全文
posted @ 2022-09-05 20:32 yinhuachen 阅读(26) 评论(0) 推荐(0) 编辑
摘要:可以直接使用 man bash 去查阅答案 答案来源:https://stackoverflow.com/questions/2500436/how-does-cat-eof-work-in-bash(并不是最高赞答案哦!) 阅读全文
posted @ 2022-09-01 22:45 yinhuachen 阅读(16) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示