上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 68 下一页
摘要: title: C++11 终止一个thread对象表示的线程 date: 2019-12-04 16:32:11 “terminate 1 thread + forcefully (target thread doesn’t cooperate) + pure C++11 = No way”. 23 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(29) 评论(0) 推荐(0)
摘要: title: C++ endian转换 date: 2020-04-22 11:49:29 tags: linux上可以使用endian.h,但是windows没有。 解决方法是使用boost,可移植性强。 安装 debian系列 sudo apt install -y libboost-dev 使 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(57) 评论(0) 推荐(0)
摘要: title: C++ boost SSL使用 date: 2020-04-25 00:29:25 tags: 我使用的boost版本是1.62,所以下面的文档都是1.62的。如果想看其他版本的,把url中的1_62_0换成你想看的版本即可。 官方文档 官方提供的boost asio的例子 boost 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(161) 评论(0) 推荐(0)
摘要: title: C++内存占用分析 date: 2023-10-25 20:43:07 tags: Max resident set size (RSS) 用getrusage 文档:https://man7.org/linux/man-pages/man2/getrusage.2.html #inc 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(197) 评论(0) 推荐(0)
摘要: title: 给flatpak添加国内镜像源 date: 2021-12-30 20:24:23 tags: 上交有flathub的镜像源。官方教程:https://mirror.sjtu.edu.cn/docs/flathub 如果已经添加了flathub的话,就用remote-modify修改: 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(7266) 评论(0) 推荐(0)
摘要: title: C++学习笔记 date: 2020-04-03 23:33:34 .clang-format # <https://clang.llvm.org/docs/ClangFormatStyleOptions.html> IndentWidth: 4 UseTab: Always TabW 阅读全文
posted @ 2024-09-28 14:05 寻找繁星 阅读(58) 评论(0) 推荐(0)
摘要: title: rust atoi date: 2021-12-03 21:06:44 tags: rust标准库里没有atoi。要将字符串转为整数,可以用parse: fn main() { let s = "23333"; let x: usize = s.parse().unwrap(); pr 阅读全文
posted @ 2024-09-28 13:45 寻找繁星 阅读(15) 评论(0) 推荐(0)
摘要: title: rust运行shell命令并获取输出 date: 2021-08-17 17:53:28 use std::io::{BufReader, BufRead}; use std::process::{self, Command, Stdio}; fn main() { ls(); ps( 阅读全文
posted @ 2024-09-28 13:45 寻找繁星 阅读(205) 评论(0) 推荐(0)
摘要: title: Rust索引String date: 2022-08-24 15:19:46 tags: Rust的String里其实是UTF-8编码的,而UTF-8是变长编码,因此会导致Rust索引String时,可能是索引第k个UTF-8字符(需要遍历字符串),也可能是索引第k个字节。因此,Rus 阅读全文
posted @ 2024-09-28 13:45 寻找繁星 阅读(48) 评论(0) 推荐(0)
摘要: title: Rust vector reduce size date: 2022-08-26 22:11:13 tags: resize requires a default value: fn resize(&mut self, new_len: usize, value: T) While t 阅读全文
posted @ 2024-09-28 13:45 寻找繁星 阅读(13) 评论(0) 推荐(0)
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 68 下一页