yyqng

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2023年5月9日

摘要: 调用栈:main() --> libsosrc.so中的soFunc--> main.out中的callBySo #include <stdlib.h> #include <dlfcn.h> #include <stdio.h> void callBySo() { printf("callBySo\ 阅读全文
posted @ 2023-05-09 07:06 zziii 阅读(36) 评论(0) 推荐(0) 编辑

2023年5月5日

摘要: 代码示例: #include <stdio.h> #include <stdlib.h> #include <dlfcn.h> typedef int(*Func)(void*); int callFunc(dtInterp_t a) { void* handle = dlopen("*.so", 阅读全文
posted @ 2023-05-05 08:46 zziii 阅读(254) 评论(0) 推荐(0) 编辑

2022年10月29日

摘要: 编译选项: CXXFLAGS += -mavx2 #include <immintrin.h> #include <cmath> void reset_xy(int *x, int *y, int vector_size) { for (int i = 0; i < vector_size; i++ 阅读全文
posted @ 2022-10-29 21:16 zziii 阅读(7) 评论(0) 推荐(0) 编辑

2022年1月16日

摘要: window11截图快捷键: Win+Shift+S 显示乱码: 设置 -> 区域 -> 相关设置 -> 区域 -> 更改系统区域设置 -> 中文 阅读全文
posted @ 2022-01-16 17:37 zziii 阅读(51) 评论(0) 推荐(0) 编辑

2021年12月9日

摘要: .vimrc: " add by school1024.com set ts=4 set softtabstop=4 set shiftwidth=4 set expandtab set autoindent TAB替换为空格 :set ts=4 :set expandtab :%retab! 空格 阅读全文
posted @ 2021-12-09 09:10 zziii 阅读(89) 评论(0) 推荐(0) 编辑

2021年10月31日

摘要: VScode使用: VScode搭建C/C++开发环境 - 知乎 (zhihu.com) Visual studio使用: 添加文件夹(要求所有的文件必须在解决方案的目录中): 插件离线安装 1.下载.vsix文件 https://marketplace.visualstudio.com/vscod 阅读全文
posted @ 2021-10-31 13:26 zziii 阅读(39) 评论(0) 推荐(0) 编辑

摘要: 1、多线程 std::thread C++11之前链接需要-lpthread,之后引入多线程,不再需要第三方库。 函数指针、类函数指针、函数对象、lambda表达式作为线程函数传入std::thread构造示例后,线程立刻开始执行。 存储参数类似std::bind(),但是不同于std::funct 阅读全文
posted @ 2021-10-31 12:24 zziii 阅读(49) 评论(0) 推荐(0) 编辑

2021年10月15日

摘要: 查找某个目录下所有的文件内容: find src/ -type f -name "*.cpp" | xargs grep "test" 测试磁盘速度 time dd if=/dev/zero of=./test.dbf bs=8k count=300000 grep grep -r --exclud 阅读全文
posted @ 2021-10-15 16:19 zziii 阅读(24) 评论(0) 推荐(0) 编辑

2021年10月7日

摘要: ubuntu下使用PageUp/PageDown快速翻出历史命令 #vim/etc/inputrc 解除两行注视后重启终端 "\e[5~": history-search-backward "\e[6~": history-search-forward 阅读全文
posted @ 2021-10-07 22:13 zziii 阅读(49) 评论(0) 推荐(0) 编辑

2021年9月25日

摘要: 1. 修改git默认的编辑器nano为vim的两种方法 git config --global core.editor vim .git/config文件,在[core]中添加 editor = vim 2. 忽略权限的diff git status一片红色,往往只是因为文件的读写执行权限发生了变化 阅读全文
posted @ 2021-09-25 20:18 zziii 阅读(24) 评论(0) 推荐(0) 编辑