最新发布第19页
排序
What’s the difference between Sequence, AsyncSequence, and AsyncStream? Sequence、AsyncSequence 和 AsyncStream 之间有什么区别?
Swift provides several ways of receiving a potentially endless flow of data, allowing us to read values one by one, or loop over them using for, while, or similar.Swift ...
How to create a task group and add tasks to it 如何创建任务组并向其添加任务
Swift’s task groups are collections of tasks that work together to produce a single result. Each task inside the group must return the same kind of data, but if you use enum assoc...
How to run tasks using SwiftUI’s task() modifier 如何使用 SwiftUI 的 task() 修饰符运行任务
SwiftUI provides a task() modifier that starts a new task as soon as a view appears, and automatically cancels the task when the view disappears. This is sort of the equi...
环境搭建
硬件部分 硬件部分,我们可以直接申请免费云资源 阿里云 GPU 以及 CPU 资源 Kaggle GPU 以及 CPU 资源 Google GPU 以及 CPU 资源 阿里云GPU(相对麻烦) 点击以下链接,进入申请页面 https://fr...
NumPy 的使用
NumPy 用于处理多维数组或矩阵。具体的使用步骤 引入NumPy库 矩阵基本运算 基本使用 import numpy as np # 创建一维数组 arr1 = np.array([1, 2, 3, 4, 5]) # 打印数组 print('一维数组:', arr1...
Constraint Layout
ConstraintLayout 是一种高级布局系统,适合复杂 UI。可以在 Compose 中使用,用来创建: 复杂对齐 多视图相互依赖的布局 百分比布局 链式布局(Chains) Barrier(根据子项动态位置对齐) Guid...
Dependency Injection
在现代 Android 开发中,依赖注入(Dependency Injection,DI)是一种设计模式,用于简化应用中各个组件之间依赖关系的管理。 依赖注入是一种设计思想:对象不自己创建依赖,而是由外部把依赖“...
Day 21 – 贪吃蛇(下)
类继承 从现有类继承行为和外观的过程成为类继承。这里的行为和外观分别为类的方法和属性。类继承可以对现有的类进行属性以及方法的扩展。 # Fish类 class Fish: def __init__(self): '''初始化...
SwiftData 调试
SwiftData 在调试时可以直接在输出窗口显示对应的 SQL 语句。 设置方法 点击如下的按钮,弹出 Scheme 窗口 在弹出的Scheme 窗口中,选择 Run菜单,然后选择 Argument 标签页,点击+号按钮。 然...








