
计算机基础
文章平均质量分 63
HayPinF
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
find命令排除文件夹,特别留意此处对-a与-o“逻辑运算符“的理解
举个例子:haypin@ubt ~/Logs find . -path './dir1' -prune -o -iname '*.log' -a -print参考https://www.cnblogs.com/drizzlewithwind/p/5705915.html注意-path 'path-ignore' -prune必须紧跟在find的搜索目录后,这里将要排除目录的-path 'path-ignore' -prune与一个匹配文件名的-iname '*.log'通过-o或连接,.原创 2021-07-02 14:55:43 · 641 阅读 · 0 评论 -
cmake构建后处理事件
使用add_custom_command()函数参考官方文档:https://cmake.org/cmake/help/v3.20/command/add_custom_command.html#command:add_custom_command之前使用Visual Studio 2010时记得有在项目配置里写后处理事件的脚本,经常遇到权限问题,那时以为是Visual Studio 2010 特别地执行后处理,但其实cmake的函数非常丰富,自带这些需求。windows平台的软件开发真得不堪回首。原创 2021-06-12 00:13:13 · 3653 阅读 · 3 评论 -
C++编译链接的理解与static修饰全局函数
1、C++编译链接的理解首先,C++链接的逻辑是:对构建目标target,其int main()入口函数所在的文件通过#include "myfunc_class.h"包含函数或类的声明,这些头文件内也可以写有实现从而都不需要.cpp文件,但这样做就违背了“在头文件中只包含声明使头文件内容紧凑清晰”的初衷,所以一般会在对应的"myfunc_class.cpp"文件中写有实现。然后这些“依赖文件”又可以有其他依赖文件,从而形成如下的拓扑依赖关系:main.cpp<——myfunc_clas...原创 2021-06-04 17:41:04 · 469 阅读 · 0 评论 -
Python正则表达式re的嵌套捕获组按深度优先索引
>>> import re>>> my_reg = re.compile(r'(a(b(c)))')>>> text = "abc">>> mat = re.search(my_reg,text)>>> print(mat)<_sre.SRE_Match object at 0x101a28ae0>>>> mat.group(0)'abc'>>&g...原创 2021-05-20 11:05:51 · 402 阅读 · 0 评论 -
mac外接NTFS磁盘read only filesystem解决办法。以及VMWare、Parallels打开外接磁盘上虚拟机的方法。
转载https://www.xiaorongmao.com/blog/49由于NTFS磁盘外接到mac上是只读的,导致VMWare、Parallels不能打开外接NTFS磁盘上的虚拟机,必须将外接NTFS磁盘挂载成读写的才可以:1、首先查看外接磁盘分区的/dev文件,diskutil info /Volumes/SamsungSSD860EVO,找到/dev/disk2s2;2、将分区弹出但是不要拔掉移动硬盘链接:hdiutil eject /Volumes/SamsungSSD860EVO转载 2021-05-07 21:54:05 · 2355 阅读 · 0 评论 -
ubuntu系统迁移到虚拟机。以及启动报错ALERT! UUID=x-x does not exist . Dropping to a shell !或error: no such device: x
参考:tar命令备份还原系统https://www.cnblogs.com/chenjiye/p/11332387.html和https://m.linuxidc.com/Linux/2014-01/94973.htmmac挂载U盘只读时解决办法https://www.xiaorongmao.com/blog/49之前尝试过将win10+ubuntu18双系统迁移到新硬盘,当时参考了很多教程,主要有两种方式:1、新旧硬盘分区拷贝文件+修改新硬盘/boot/grub/grub.cfg和/.原创 2021-05-07 17:55:02 · 2959 阅读 · 2 评论 -
python的str与unicode类型
参考https://blog.csdn.net/VictoriaW/article/details/75314737首先看一段脚本:>>> mystr = '哈哈'>>> mystr'\xe5\x93\x88\xe5\x93\x88' #我用python2.7.16,str类型字符串在buffer缓存非ascii字符时自动进行unicode码 ——> UTF-8码的编码>>> type(mystr)<type 'str转载 2021-05-04 23:29:30 · 414 阅读 · 0 评论 -
UTF与UNICODE,ANSI与ASCII、GB2312字符编码与项目属性中”多字节字符集“
之前转载 2020-05-24 00:21:48 · 574 阅读 · 0 评论