上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 45 下一页
摘要: Go当中的Fscanf p := &pb.Person{} rd := bufio.NewReader(r) fmt.Print("Enter person ID number: ") if _, err := fmt.Fscanf(rd, "%d\n", &p.Id); err != nil { 阅读全文
posted @ 2024-12-19 20:42 Gold_stein 阅读(8) 评论(0) 推荐(0)
摘要: python当中的with关键字 Python 中 with 关键字的作用 with 关键字在 Python 中用于 上下文管理。它简化了资源的 获取和释放,特别是文件操作、数据库连接或网络套接字等资源。使用 with 语句时,可以确保在执行代码块时,资源会得到适当的管理和清理,即使在出现异常的情况 阅读全文
posted @ 2024-12-19 19:47 Gold_stein 阅读(63) 评论(0) 推荐(0)
摘要: VSC配置C/C++基本开发环境 在 Visual Studio Code (VSCode) 配置 C++ 开发环境时,tasks.json、launch.json 和 c_cpp_properties.json 是用于配置编译、调试和 IntelliSense 的重要文件。以下是这些文件的作用、如 阅读全文
posted @ 2024-12-17 23:59 Gold_stein 阅读(381) 评论(0) 推荐(0)
摘要: leetcode31. next permutation 这道题可以先从极端情况入手考虑: 第一个全排列: 1 2 3 4 5,完全升序的 最后一个全排列: 5 4 3 2 1,完全降序的 有一个很显然的结论:为了最小化我们的操作对字典序的影响,我们要尽量修改靠后的元素的顺序。 所以,我们能确定,我 阅读全文
posted @ 2024-12-16 20:49 Gold_stein 阅读(18) 评论(0) 推荐(0)
摘要: Pybind简介 pybind11 是一个用于将 C++ 代码与 Python 代码绑定的库。它使得你能够轻松地将 C++ 编写的函数、类、以及数据结构暴露给 Python,从而在 Python 中使用 C++ 代码。这通常用于加速性能关键的部分,或者利用现有的 C++ 库,同时保留 Python 阅读全文
posted @ 2024-12-15 21:03 Gold_stein 阅读(311) 评论(0) 推荐(0)
摘要: C++ typeid输出信息格式 用这段程序做演示: #include <iostream> #include <typeinfo> class Base { virtual void dummy() {} }; class Derived : public Base { /* ... */ }; 阅读全文
posted @ 2024-12-15 15:26 Gold_stein 阅读(32) 评论(0) 推荐(0)
摘要: Bash脚本中的HereDocuments 学习链接:https://blog.csdn.net/weixin_47219935/article/details/107631697 阅读全文
posted @ 2024-12-13 19:15 Gold_stein 阅读(22) 评论(0) 推荐(0)
摘要: Python3.13在PaddleClas运行适配问题 报错1:AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? pkgutil的ImpImporter在Pyth 阅读全文
posted @ 2024-12-12 17:16 Gold_stein 阅读(1767) 评论(0) 推荐(0)
摘要: PaddleClas ImportError问题 问题背景 事先通过pip install -e .安装了editable版本的PaddleClas包,也在PYTHONPATH当中添加了相关路径,但是在执行模型推理时,还是遇到了这个问题: Traceback (most recent call la 阅读全文
posted @ 2024-12-11 20:11 Gold_stein 阅读(164) 评论(0) 推荐(0)
摘要: ccache的存储逻辑 在cmake当中指定的CCACHE_PATH 是 ccache 程序本身的可执行文件路径,即告诉系统去哪里找到 ccache 这个程序。在你的例子中是位于 /usr/local/bin/ccache 在PATH当中指定的CCACHE_DIR 是 ccache 用来存储编译缓存 阅读全文
posted @ 2024-12-11 20:01 Gold_stein 阅读(186) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 45 下一页