会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Loading
Azure's Blog
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
23
24
25
26
27
28
29
30
31
···
76
下一页
2022年1月17日
使用std::move(*pointer)有意义吗?
摘要: 疑问 代码中希望使用std::move提高效率,想探究std::move(*pointer)的用法是否合理? 分析 这个问题不可一概而论,因为pointer所指对象的类型会影响结果。 整数 #include <iostream> int main() { int* p(new int(22));//
阅读全文
posted @ 2022-01-17 12:17 azureology
阅读(175)
评论(0)
推荐(0)
2022年1月11日
np.ndarray与Eigen::Matrix之间的互相转换
摘要: 需求 项目需要在C++中调用一些numpy矩阵数据,希望可以实现相互转化。 实现 C++读取 有关npy读取可以使用库llohse/libnpy 局限是一次只能读取单个npy数组,多个不同纬度的矩阵拼接比较麻烦 多个数组保存的npz文件则需要用rogersce/cnpy读取 Python保存 使用n
阅读全文
posted @ 2022-01-11 21:33 azureology
阅读(1066)
评论(0)
推荐(0)
C++向assert加入错误信息
摘要: 需求 程序使用assert(bool_expression)进行断言,希望能在中断时给出提示信息。 实现 使用&&连接表达式,字符串作为非空指针,bool值为true不会影响结果。 assert(a == b && "A is not equal to B"); 参考 c++ - Add custo
阅读全文
posted @ 2022-01-11 21:08 azureology
阅读(189)
评论(0)
推荐(0)
2022年1月4日
Python listdir只展示文件夹
摘要: 诉求 使用listdir提取子目录却无法过滤文件,希望结果list仅保留文件夹 实现 调用next函数配合os.walk next(os.walk('.'))[1] 提取(dirpath, dirnames, filenames)拼接 参考 filesystems - How to list onl
阅读全文
posted @ 2022-01-04 23:57 azureology
阅读(233)
评论(0)
推荐(0)
WPS Office has not found any installed printers
摘要: 问题 之前用deb安装wps缩放DPI一直不正常无法解决 后续定位到系统中存在未知来源的变量QT_SCALE_FACTOR=1.25 同时影响了wps和virtual box在内的应用GUI渲染 无奈替换换snap版后恢复正常。 使用snap安装Ubuntu软件商店提供的wps成功却无法使用打印机。
阅读全文
posted @ 2022-01-04 23:25 azureology
阅读(303)
评论(0)
推荐(0)
上一页
1
···
23
24
25
26
27
28
29
30
31
···
76
下一页
公告