日常解决问题基本靠 Google,拿来水博客跟 Copy&Paste 也没啥区别,但是又想把这些方法记录下来,万一以后需要用还方便查看,于是打算全部写在这一篇文章里了。
当然,为了防止未来的我忘记当时写的是什么东西,咱尽量将一些因人而异、因机而异的东西标注出来(比如每段的 Replacement),但难免有疏漏,如果有读者能够看到,并感到疑惑,请不要吝啬你的留言。[1]
因为我是用的是 Windows 10 系统所以一下的东西只保证在 Windows 10 有用其他系统,诸如 Windows 7/Linux/macOS 请自行查找方案
目前可用的 VS Code 调试 C/C++ 配置
2020-11-12 19:53 GMT +8
基于网上现有的稍加修改
请替换 [debugger_path] 并且保证你的 gcc 是可用状态,或者使用其他的编译器/调试器
launch.json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| { "version": "2,0.0", "configurations": [ { "name": "(gdb) Launch", "type": "cppdbg", "request": "launch", "targetArchitecture": "x64", "program": "${workspaceRoot}/${fileBasenameNoExtension}.exe", "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "internalConsoleOptions": "openOnSessionStart", "externalConsole": true, "MIMode": "gdb", "miDebuggerPath": "[debugger_path]/gdb.exe", "preLaunchTask": "gcc", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ] }
|
tasks.json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| { "version": "2.0.0", "tasks": [ { "label": "gcc", "command": "gcc", "args": [ "${file}", "-o", "${fileDirname}/${fileBasenameNoExtension}.exe", "-g", "-Wall", "-fexec-charset=GBK" ], "type": "cppbuild", "options": { "cwd": "[debugger_path]/bin" }, "problemMatcher": ["$gcc"], "group": "build", "detail": "compiler: gcc" } ] }
|
Win10 任务栏菜单小图标变黑了
2020-9-10 16:55 GMT+8
建议创建开机任务执行
通过 JDK 生成 JRE
2020-9-22 9:36 GMT+8
1 2
| cd %JAVA_HOME% bin\jlink.exe --module-path jmods --add-modules java.desktop --output jre
|
使用 hexo-reference 插件生成脚注编号重复
找到 \<blog_root_folder>\node_modules\hexo-reference\src\footnotes.js
删除或者注释这几行代码
1 2 3 4 5 6 7 8 9 10 11
| footnotes.forEach(function (footNote) { html += '<li id="fn:' + footNote.index + '">'; -> -> -> html += '<span style="display: inline-block; vertical-align: top; margin-left: 10px;">'; html += md.renderInline(footNote.content.trim()); html += '<a href="#fnref:' + footNote.index + '" rev="footnote"> ↩</a></span></li>'; });
|
Grub 找不到 Windows 引导了
2021-3-19 11:12 GMT+8
我是用的是 Manjaro
首先需要安装 os-prober
,然后打开 /etc/default/grub
,编辑或者添加以下几项
1 2 3
| GRUB_TIMEOUT_STYLE=menu #显示菜单 GRUB_TIMEOUT=10 #超时时间10秒 GRUB_DISABLE_OS_PROBER=false #允许os探测
|
修改完成后运行 sudo update-grub
就可以找到 Windows 引导了。