戳人痛处

导航

2023年7月4日 #

[记]Rust闭包加动态分发

摘要: ~~~rust pub trait App { fn run(&mut self); } #[derive(Clone, Copy)] pub struct Cda{ d:i32, } impl Cda { fn new(num:i32)->Self{ Self { d: num } } fn in 阅读全文

posted @ 2023-07-04 13:32 戳人痛处 阅读(47) 评论(0) 推荐(0)

2023年6月6日 #

[记]Rust结构体转换为二进制数据

摘要: 这个函数可以直接读取或者转化为二进制数据,适用于系统编程; ~~~rust use std::mem; struct Testdata{ ucc:u8, udd:u8, } fn main() { let ddd = Testdata{ucc:2,udd:9}; unsafe{ let uu16:u 阅读全文

posted @ 2023-06-06 17:29 戳人痛处 阅读(318) 评论(0) 推荐(0)

2023年5月8日 #

[记]Rust使用winrt库调用第三方C# DLL库的方法?

摘要: Rust 是一门系统编程语言,它的运行时比较"轻量级",因此难以跨平台地直接调用 Windows Runtime (WinRT) 组件。不过我们可以通过 Rust 库 winrt 来操作 WinRT 组件,同时也可以通过 Rust 的 FFI( Foreign Function Interface 阅读全文

posted @ 2023-05-08 10:53 戳人痛处 阅读(1206) 评论(0) 推荐(0)

2023年3月28日 #

[记]开源字体ing

摘要: 方舟像素字体 MIT, OFL-1.1 licenses found TakWolf/ark-pixel-font: Open source Pan-CJK pixel font / 开源的泛中日韩像素字体 (github.com) 得意黑字体 OFL-1.1 license atelier-anc 阅读全文

posted @ 2023-03-28 17:55 戳人痛处 阅读(34) 评论(0) 推荐(0)

2023年3月25日 #

[记]egui在windows系统下加入系统托盘功能

摘要: Rust语言有什么windows系统下 系统托盘库? AI: Rust语言有多个Windows系统下的系统托盘库,其中一些包括: systray:这是一个轻量级的系统托盘库,支持Windows、Linux和macOS平台。 tray_rust:这是一个基于WinAPI的系统托盘库,支持Windows 阅读全文

posted @ 2023-03-25 16:28 戳人痛处 阅读(637) 评论(0) 推荐(0)

2023年2月22日 #

[记]egui使用中文字体

摘要: pub fn new(cc: &eframe::CreationContext<'_>) -> Self { let mut fonts = eframe::egui::FontDefinitions::default(); // Install my own font (maybe support 阅读全文

posted @ 2023-02-22 16:38 戳人痛处 阅读(969) 评论(0) 推荐(0)

2023年2月18日 #

[记]egui使用wasm至浏览器中运行

摘要: 使用eframe框架可以很方便的创建native应用或者是web应用; 可以参照模板 eframe_template ; 拉取代码后可以直接指令 cargo run 编译运行,如下; hint #[cfg(not(target_arch = "wasm32"))] fn main() -> efra 阅读全文

posted @ 2023-02-18 14:38 戳人痛处 阅读(490) 评论(0) 推荐(0)

2023年2月1日 #

[记]Rust上传库到crates.io失败的解决办法参考

摘要: 1.SSL验证失败 fatal: unable to access 'https://github.com/rust-lang/crates.io-index/': OpenSSL SSL_read: Connection was reset, errno 10054 取消git的SSL验证 git 阅读全文

posted @ 2023-02-01 09:40 戳人痛处 阅读(454) 评论(0) 推荐(0)

2023年1月30日 #

[记]python的音频波形读取与音视频剪辑

摘要: 1.音频波形读取 import librosa aaa = librosa.load("233.mp3") # print(aaa) print(aaa[0])#波形数据 print(aaa[1])#码率 # print(len(aaa[0])/aaa[1]) s_play = len(aaa[0] 阅读全文

posted @ 2023-01-30 11:32 戳人痛处 阅读(144) 评论(0) 推荐(0)

2023年1月6日 #

[记]python操作xml文件

摘要: test.xml <A> <AA> <AAA name="aaa">AaA</AAA> <BBB></BBB> </AA> <BB> <CCC name="ccc">CcC</CCC> <DDD></DDD> </BB> </A> 1.读取信息 import xml.etree.ElementTre 阅读全文

posted @ 2023-01-06 17:57 戳人痛处 阅读(40) 评论(0) 推荐(0)