最新发布第23页
How to handle concurrency errors in unit tests 如何处理单元测试中的并发错误-Stewed Noodles 资源

How to handle concurrency errors in unit tests 如何处理单元测试中的并发错误

Both Swift Testing and XCTest give us three main options for handling errors in tests: we can consider them immediate failures, we can handle them internally and make our own asser...
普通报销单表头-Stewed Noodles 资源

普通报销单表头

普通报销单表头添加经费来源,最终的效果如下图所示 普通报销单表头添加经费来源 录入页面 当选择经费来源字段时,表头后添加 [经费来源值]。 打开 webmain/flow/input/inputjs/mode_putong.js ...
XuX的头像-Stewed Noodles 资源烩之面大会员XuX1年前
0250
Live Data-Stewed Noodles 资源

Live Data

基本介绍 LiveData 是一个可观察的数据持有类。与普通的可观察对象不同,LiveData 具备生命周期感知能力,也就是说它会遵循应用中其他组件(如 Activity、Fragment 或 Service)的生命周期。 这...
it 关键字-Stewed Noodles 资源

it 关键字

当 Lambda 表达式或匿名函数只接收 一个参数 时,it 会作为这个参数的 隐式名称(默认参数名)。 val numbers = listOf(1, 2, 3, 4, 5) // it 表示参数 println(numbers.map { it * it }) // [1...
设备点检-Stewed Noodles 资源

设备点检

设备点检的基本模块 点检项目 点检项目的基本信息,如下所示 点检计划 点检计划的基本信息,如下所示 点检任务 点检任务的基本信息,如下所示
XuX的头像-Stewed Noodles 资源烩之面大会员XuX5个月前
0250
Day 2 - 理解数据类型和字符串操作-Stewed Noodles 资源

Day 2 – 理解数据类型和字符串操作

基本数据类型 String 字符串下标 字符串的下标 Subscripting可以提取字符串特定位置的字符。 # 提取第一个字符 print('Hello'[0]) # H # 提取最后一个字符 print('Hello'[len('Hello') - 1]) # ...
Widget 的 Container Background-Stewed Noodles 资源

Widget 的 Container Background

Widget 的 Container Background(容器背景) 是在 iOS 17 中引入的。在 Widget 的开发过程中,可能会在预览中遇到如下的错误 Widget needs to adopt container background. 容器背景用途 iOS 1...
Animation-Stewed Noodles 资源

Animation

当指定的值发生变化时,将给定的动画应用于此视图。 struct ContentView: View { @State private var scale = 0.5 var body: some View { VStack { Circle().scale(scale).animation(.easeIn, v...
XuX的头像-Stewed Noodles 资源烩之面大会员XuX1年前
0240
How to cancel a task group 如何取消任务组-Stewed Noodles 资源

How to cancel a task group 如何取消任务组

Swift’s task groups can be cancelled in one of three ways: if the parent task of the task group is cancelled, if you explicitly call cancelAll() on the group, or if one of your ...
Is it efficient to create many tasks? 创建许多任务是否有效?-Stewed Noodles 资源

Is it efficient to create many tasks? 创建许多任务是否有效?

Previously I talked about the concept of thread explosion, which is when you create many more threads than CPU cores and the system struggles to manage them effectively. Howev...