上一页 1 2 3 4 5 6 7 8 9 ··· 68 下一页
摘要: title: rust识别EOF date: 2020-08-17 16:45:54 tags: 参考:https://stackoverflow.com/questions/41210691/how-to-check-for-eof-in-read-line-in-rust-1-12 如果read 阅读全文
posted @ 2024-09-28 14:16 寻找繁星 阅读(36) 评论(0) 推荐(0)
摘要: title: rust用BufReader加速stdin读取 date: 2021-11-17 17:30:21 tags: BufReader官方文档:https://doc.rust-lang.org/stable/std/io/struct.BufReader.html use std::io 阅读全文
posted @ 2024-09-28 14:16 寻找繁星 阅读(47) 评论(0) 推荐(0)
摘要: title: rust格式控制 date: 2021-10-12 20:59:05 官方教程:https://doc.rust-lang.org/std/fmt/ 注意,标准库里的格式控制字符串必须是字面量: https://www.reddit.com/r/rust/comments/48jzw0 阅读全文
posted @ 2024-09-28 14:16 寻找繁星 阅读(24) 评论(0) 推荐(0)
摘要: title: rust格式化打印到文件 date: 2021-07-05 09:58:41 用write!和writeln!即可。 write!(&mut writer, "Factorial of {} = {}", num, factorial); writeln!就是在最后自动加一个换行。 原 阅读全文
posted @ 2024-09-28 14:16 寻找繁星 阅读(25) 评论(0) 推荐(0)
摘要: title: rust单行读取多个整数 date: 2020-08-15 10:49:13 tags: rust读取真的很麻烦。网上的方法一般是用split(' ')来分割出整数。但是如果中间有多个空格就凉了。后面查阅官方文档发现了split_whitespace,可以用多个空白字符(空格和tab, 阅读全文
posted @ 2024-09-28 14:16 寻找繁星 阅读(79) 评论(0) 推荐(0)
摘要: title: rust从一行中读取数组 date: 2020-08-26 13:50:41 tags: use std::io; fn main() { let mut input = String::new(); io::stdin().read_line(&mut input).unwrap() 阅读全文
posted @ 2024-09-28 14:16 寻找繁星 阅读(25) 评论(0) 推荐(0)
摘要: title: rust BufReader逐字符读取 date: 2021-12-03 20:05:20 tags: BufReader有一个fill_buf的方法: fn fill_buf(&mut self) -> Result<&[u8]> 它可以返回它的内部buffer,如果buffer是空 阅读全文
posted @ 2024-09-28 14:16 寻找繁星 阅读(121) 评论(0) 推荐(0)
摘要: title: rust print固定宽度左边补零 date: 2020-08-25 19:34:43 tags: 参考:https://doc.rust-lang.org/std/fmt/ 任意类型 fn main() { println!("{:0>3}", 2333); println!("{ 阅读全文
posted @ 2024-09-28 14:16 寻找繁星 阅读(52) 评论(0) 推荐(0)
摘要: title: Rust文件操作 date: 2022-10-14 21:27:13 tags: 文件管理 mkdir https://doc.rust-lang.org/std/fs/fn.create_dir.html mkdir -p https://doc.rust-lang.org/std/ 阅读全文
posted @ 2024-09-28 14:16 寻找繁星 阅读(106) 评论(0) 推荐(0)
摘要: title: 英文缩写 date: 2020-05-22 01:59:25 tags: 数据库 缩写 全称 TPMMS Two-Phase Multiway Merge-Sort 阅读全文
posted @ 2024-09-28 14:16 寻找繁星 阅读(27) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 68 下一页