最新发布第15页
一对一关系-Stewed Noodles 资源

一对一关系

一对一关系意味着每个 A对象都有一个对应的B对象,例如说每个人都有一本护照,或者每只宠物都有一个主人。 例如,如果我们有 Country 和 City 模型,它们之间有一个真正的一对一关系,那么在创...
jiulinxiri的头像-Stewed Noodles 资源烩之面大会员jiulinxiri9个月前
0150
What is a synchronous function? 什么是同步函数?-Stewed Noodles 资源

What is a synchronous function? 什么是同步函数?

By default, all Swift functions are synchronous, but what does that mean? A synchronous function is one that executes all its work in a simple, straight line on a single threa...
How to discard results in a task group 如何丢弃任务组中的结果-Stewed Noodles 资源

How to discard results in a task group 如何丢弃任务组中的结果

Swift has a special task group type called a discarding task group, which has a very specialized function: tasks that complete are automatically discarded and destroyed, ...
What’s the difference between actors, classes, and structs? Actors、Classes和 Structs 之间有什么区别?-Stewed Noodles 资源

What’s the difference between actors, classes, and structs? Actors、Classes和 Structs 之间有什么区别?

Swift provides four concrete nominal types for defining custom objects: actors, classes, structs, and enums. Each of these works a little differently from the others, but the first...
巡检计划巡检状态选项添加颜色-Stewed Noodles 资源

巡检计划巡检状态选项添加颜色

列表页面添加 在 index.vue 中添加,如下的代码 <!-- 巡检计划状态添加颜色显示 --> <template v-if='column.leapKey === 'select' && column.prop === 'inspectionPlanStatus''>...
jiulinxiri的头像-Stewed Noodles 资源烩之面大会员jiulinxiri3个月前
0150
Day 9 - 字典与嵌套-Stewed Noodles 资源

Day 9 – 字典与嵌套

字典 基本语法 字典是由键值对组成,基本的语法如下 {key1:value1, key2: value2, ...} 示例 # 字典示例 colors = { 'apple': 'red', 'pear': 'green', 'banana': 'yellow' } 基本使用 字典的基...
jiulinxiri的头像-Stewed Noodles 资源烩之面大会员jiulinxiri11个月前
0140
Day 12 - 作用域 Scope-Stewed Noodles 资源

Day 12 – 作用域 Scope

Python 没有块级作用域(Block Scope),只有局部作用域以及全局作用域。 局部作用域 在函数中声明的变量(或函数)具有局部作用域(也称为函数作用域)。它们只能被同一代码块中的其他代码看到...
jiulinxiri的头像-Stewed Noodles 资源烩之面大会员jiulinxiri11个月前
0140
模型上下文-Stewed Noodles 资源

模型上下文

ModelContext 是 SwiftData 中负责跟踪所有在内存中创建、修改和删除的对象的组件。它确保这些对象能够在稍后某个时刻保存到模型容器中。ModelContext 提供了一个便捷的方式来管理对象的状态,...
jiulinxiri的头像-Stewed Noodles 资源烩之面大会员jiulinxiri9个月前
0140
Understanding how global actor inference works 了解全局参与者推理的工作原理-Stewed Noodles 资源

Understanding how global actor inference works 了解全局参与者推理的工作原理

Apple explicitly annotates many of its types as being @MainActor, including most UIKit types such as UIView and UIButton. However, for a while the Swift team da...
2. 添加内购项目-Stewed Noodles 资源