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

2022年12月3日

SwiftUI 入门

摘要: [文档](https://developer.apple.com/documentation/swiftui/) ## 1 组件 ### 1.1 基础组件 #### Text ```swift Text("Hamlet") .font(.largeTitle) .fontWeight(.bold) 阅读全文

posted @ 2022-12-03 15:54 Lemo_wd 阅读(843) 评论(0) 推荐(0)

2022年12月2日

Swift 基础语法

摘要: 原文 英文原文 简单值 类型不会自动转换,需要手动转换: let label = "The width is " let width = 94 let widthLabel = label + String(width) 字符串插值语法 () let apples = 3 let oranges = 阅读全文

posted @ 2022-12-02 21:19 Lemo_wd 阅读(107) 评论(0) 推荐(0)

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 阅读(76) 评论(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 阅读(534) 评论(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 阅读(780) 评论(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 阅读(505) 评论(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 阅读(583) 评论(0) 推荐(0)

2022年9月21日

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

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

posted @ 2022-09-21 00:38 Lemo_wd 阅读(653) 评论(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 阅读(649) 评论(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 阅读(1280) 评论(0) 推荐(0)

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

导航