上一页 1 2 3 4 5 6 7 8 9 ··· 31 下一页

2022年11月18日

leetcode 算法笔记 —— 简单题

摘要: 简单题 1、两数之和 impl Solution { pub fn two_sum(nums: Vec<i32>, target: i32) -> Vec<i32> { let mut mp = HashMap::new(); for i in 0..nums.len() { let num = n 阅读全文

posted @ 2022-11-18 14:46 Lemo_wd 阅读(63) 评论(0) 推荐(0)

2022年11月17日

flutter 性能分析图表的查看

摘要: 1. Flutter 的线程 平台线程 即主线程,plugin 代码运行在此线程。具体请参阅 Android 的 MainThread 以及 iOS 的 UIKit 文档。 UI 线程 UI 线程在 Dart VM 中执行 Dart 代码。当应用创建和展示场景的时候,UI 线程首先建立一个 图层树( 阅读全文

posted @ 2022-11-17 16:48 Lemo_wd 阅读(521) 评论(0) 推荐(0)

2022年11月10日

rust 基础 —— Option 的 as_ref 与 as_deref

摘要: 代码: fn hello(name: &String) { println!("Name is {}", name); } fn greet(name: &str) { println!("Name is {}", name); } fn main() { let option_name: Opti 阅读全文

posted @ 2022-11-10 09:53 Lemo_wd 阅读(762) 评论(0) 推荐(0)

2022年11月4日

rust 基础 —— 创建链表

摘要: 使用枚举类 use crate::List::{Cons, Nil}; enum List { // Cons:元组结构体,包含链表的一个元素和一个指向下一节点的指针 Cons(u32, Box<List>), // Nil:末结点,表明链表结束 Nil, } // 可以为 enum 定义方法 im 阅读全文

posted @ 2022-11-04 14:52 Lemo_wd 阅读(490) 评论(0) 推荐(1)

2022年9月29日

flutter 效果实现 —— 组件自由移动与大小调整

摘要: 示例: class DynamicBoxPage extends StatelessWidget { const DynamicBoxPage({Key? key}) : super(key: key); @override Widget build(BuildContext context) { 阅读全文

posted @ 2022-09-29 09:29 Lemo_wd 阅读(574) 评论(0) 推荐(0)

2022年9月21日

flutter 效果实现 —— 键盘快捷键绑定

摘要: 对于快捷键绑定回调大致有三种方式,第一种是使用 CallbackShortcuts;第二种是使用 Focus 的 onKey 回调,参考前一篇文章中的 Key Events 的示例1;第三种就是下面所介绍的。 效果: 代码: class ShortcutPage extends StatefulWi 阅读全文

posted @ 2022-09-21 00:38 Lemo_wd 阅读(641) 评论(0) 推荐(0)

2022年9月20日

flutter 基础 —— Focus 组件的使用

摘要: Focus 组件 class HomePage extends StatefulWidget { const HomePage({Key? key}) : super(key: key); @override State<HomePage> createState() => _HomePageSta 阅读全文

posted @ 2022-09-20 11:25 Lemo_wd 阅读(636) 评论(0) 推荐(0)

2022年9月18日

flutter 效果实现 —— 去除水波纹效果

摘要: 修改主题 theme: ThemeData( splashColor: Colors.transparent, highlightColor: Colors.transparent, splashFactory: NoSplash.splashFactory, ), 或者修改单个 ElevatedB 阅读全文

posted @ 2022-09-18 21:59 Lemo_wd 阅读(1270) 评论(0) 推荐(0)

2022年9月15日

dart 基础知识查漏补缺

摘要: 一、基础类型 1. late 关键字 有两种用法: 第一种是告知编译器该变量在使用前会执行初始化。因为 dart 编译器要求非空变量必须在初始化后才能使用: late String description; void main() { description = 'Feijoada!'; print 阅读全文

posted @ 2022-09-15 11:38 Lemo_wd 阅读(192) 评论(0) 推荐(0)

2022年9月5日

flutter 效果实现 —— 可拖拽 GridView

摘要: 效果: 代码: class GridDragView extends StatefulWidget { const GridDragView({Key? key}) : super(key: key); @override State<GridDragView> createState() => _ 阅读全文

posted @ 2022-09-05 22:38 Lemo_wd 阅读(1079) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 9 ··· 31 下一页

导航