小弧光的博客

公众号:小弧光黑板报

导航

2023年7月31日 #

写一个c++模板函数,支持int类型相加,string类型相加以及 string和int相加

摘要: 要实现一个支持int类型相加、string类型相加以及string和int相加的C++模板函数,你可以使用函数重载和模板特化来实现这个目标。以下是一个示例实现: ```cpp #include #include // 模板函数:支持int类型相加 template T add(T a, T b) { 阅读全文

posted @ 2023-07-31 11:20 小弧光 阅读(76) 评论(0) 推荐(0) 编辑

2023年6月9日 #

atomic_enum rust 原子枚举类型

摘要: https://docs.rs/atomic_enum/latest/atomic_enum/ #[atomic_enum] #[derive(PartialEq)] enum CatState { Dead = 0, BothDeadAndAlive, Alive, } let state = A 阅读全文

posted @ 2023-06-09 09:30 小弧光 阅读(11) 评论(0) 推荐(0) 编辑

2023年6月1日 #

Arc get_mut

摘要: /// Returns a mutable reference into the given `Arc`, if there are /// no other `Arc` or [`Weak`] pointers to the same allocation. /// /// Returns [`N 阅读全文

posted @ 2023-06-01 10:36 小弧光 阅读(15) 评论(0) 推荐(0) 编辑

2023年5月29日 #

rust 测试如何打印 println 输出结果

摘要: ``` cargo test -- --nocapture or rustc --test main.rs; ./main or (my favorite) cargo watch “test -- --nocapture” ``` https://medium.com/@ericdreichert 阅读全文

posted @ 2023-05-29 16:47 小弧光 阅读(187) 评论(0) 推荐(0) 编辑

2023年5月11日 #

open与openat

摘要: 原文:https://evian-zhang.github.io/introduction-to-linux-x86_64-syscall/src/filesystem/open-openat-name_to_handle_at-open_by_handle_at-open_tree.html 系统 阅读全文

posted @ 2023-05-11 13:45 小弧光 阅读(371) 评论(0) 推荐(0) 编辑

2023年4月25日 #

10 iozone Examples for Disk I/O Performance Measurement on Linux

摘要: https://www.thegeekstuff.com/2011/05/iozone-examples/ As we discussed in our Linux performance monitoring introduction article, measuring IO subsystem 阅读全文

posted @ 2023-04-25 11:16 小弧光 阅读(50) 评论(0) 推荐(0) 编辑

2023年4月21日 #

Writing a file system from scratch in Rust

摘要: Writing a file system from scratch in Rust2020-07-27 https://blog.carlosgaldino.com/writing-a-file-system-from-scratch-in-rust.html Data produced by p 阅读全文

posted @ 2023-04-21 16:52 小弧光 阅读(17) 评论(3) 推荐(0) 编辑

How fast are your disks? Find out the open source way, with fio

摘要: https://arstechnica.com/gadgets/2020/02/how-fast-are-your-disks-find-out-the-open-source-way-with-fio/ Storage benchmarking—much like Wi-Fi benchmarki 阅读全文

posted @ 2023-04-21 16:42 小弧光 阅读(23) 评论(0) 推荐(0) 编辑

从 aws 读取一个文件

摘要: use clap::{Arg, ArgAction, Command}; use fuser::{BackgroundSession, MountOption, Session}; use mountpoint_s3::fuse::S3FuseFilesystem; use mountpoint_s 阅读全文

posted @ 2023-04-21 16:00 小弧光 阅读(30) 评论(0) 推荐(0) 编辑

2023年2月19日 #

40+ Best Open Source Android Apps

摘要: 原文:https://itsfoss.com/open-source-android-apps/ The best open source Android apps. Replace the proprietary options to enjoy a potentially better expe 阅读全文

posted @ 2023-02-19 19:45 小弧光 阅读(65) 评论(0) 推荐(0) 编辑