摘要: word里面匹配"[1] " \[[0-9]{1,}\]^32 \[和\]:匹配左右中括号 [0-9]:匹配数字 {1,}:匹配至少一次 ^32:匹配word中的英文空格 阅读全文
posted @ 2024-03-25 17:52 小小灰迪 阅读(3) 评论(0) 推荐(0) 编辑
摘要: git 基础知识 workspace:工作区 staging area:暂存区/缓存区 local repository:版本库或本地仓库 remote repository:远程仓库 git 基本操作 git配置信息 git config 查看全局配置 git config --global -- 阅读全文
posted @ 2024-02-28 15:54 小小灰迪 阅读(2) 评论(0) 推荐(0) 编辑
摘要: { "latex-workshop.latex.autoBuild.run":"never", // "latex-workshop.latex.autoBuild.run":"onSave", "latex-workshop.latex.autoBuild.interval":10000, "la 阅读全文
posted @ 2023-12-04 18:07 小小灰迪 阅读(20) 评论(0) 推荐(0) 编辑
摘要: \[weight=0 \\ mean = \frac {meam*weight+curVal}{weight+1} \]int weight = 0; Vec3i pixel = {0,0,0}; for(size_t index=0; index < singlePairFish->fishImg 阅读全文
posted @ 2023-10-12 21:30 小小灰迪 阅读(8) 评论(0) 推荐(0) 编辑
摘要: ```c++ #include #include #include #include #include using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val( 阅读全文
posted @ 2023-08-23 21:33 小小灰迪 阅读(9) 评论(0) 推荐(0) 编辑
摘要: # 使用全局内存 [完整代码链接](https://github.com/brucefan1983/CUDA-Programming/blob/master/src/07-global-memory/matrix.cu) ## A合并访问、B非合并访问 ```c++ #ifdef USE_DP ty 阅读全文
posted @ 2023-08-15 15:57 小小灰迪 阅读(244) 评论(0) 推荐(0) 编辑
摘要: [官方库](https://github.com/google/sanitizers) ## 应用场景 编译参数通过 -fsanitize 决定开启 sanitizer: - `-fsanitize=address` 开启AddressSanitizer(ASan),包括LeakSanitizer( 阅读全文
posted @ 2023-08-07 16:27 小小灰迪 阅读(588) 评论(0) 推荐(0) 编辑
摘要: # coredump ## 修改coredump文件位置 查询文件位置 ```bash cat /proc/sys/kernel/core_pattern # 默认值是core,表示当前目录。否则就是在指定目录下。 ``` 更改 coredump 文件路径的方法分两种:临时更改方式与永久更改方式: 阅读全文
posted @ 2023-08-04 16:23 小小灰迪 阅读(161) 评论(0) 推荐(0) 编辑
摘要: **只定义`void testFunc(int num, const std::function& functor)`就可以,其他的相当于这个函数的特化版本** ```c++ #include #include using namespace std; int func1(int num) { co 阅读全文
posted @ 2023-08-01 15:27 小小灰迪 阅读(25) 评论(0) 推荐(0) 编辑
摘要: ```bash 假设链表中每一个节点的值都在0-9之间,那么链表整体就可以代表一个非负整数。 给定两个这种链表,请生成代表两个整数之差绝对值结果链表。链表长度最大值为10000,链表任意值0≤val3->7,链表2为9->6->3,最后生成新的结果链表为2-~>6, 不允许使用其它数据结构 ``` 阅读全文
posted @ 2023-07-30 12:50 小小灰迪 阅读(162) 评论(0) 推荐(0) 编辑