最新发布第17页
排序
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...
Important: Do not use an actor for your SwiftUI data models 重要提示:请勿将角色用于 SwiftUI 数据模型
Swift’s actors allow us to share data in multiple parts of our app without causing problems with concurrency, because they automatically ensure two pieces of code cannot...
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...
How to force concurrent tests to run on a specific actor 如何强制并发测试在特定actor上运行
Swift Testing and XCTest behave differently when it comes to running tests in parallel: unless you say otherwise, Swift Testing will run both synchronous and asynchronous tests on ...
Xcode快捷键
按键 符号 功能描述 Command ⌘ 常用于系统快捷操作,例如复制、粘贴等。 Option ⌥ 用于组合键或输入特殊字符。 Shift ⇧ 用于大写字母或功能增强。 Control ⌃ 结合快捷键的辅助按键。 Caps L...
物资、设备与资产
采购阶段 在采购阶段设备以物资的形式呈现,采购阶段主要是物资的采购、到货以及验收。物资形式下的设备拥有物资编码。 设备建档 物资采购完成后,可以进行设备建档,设备建档会生成设备编码。 ...
Docker 基础 – 容器
容器常见命令创建容器# 完整命令 docker container run <image name> # 简写命令 docker run <image name> 列出容器查看 up 状态的容器# 完整命令 docker container ls # 简写命令 ...
macOS Python 多版本管理
安装 Homebrew Homebrew 的官网 https://brew.sh/ 在终端输入以下命令进行安装 /bin/bash -c '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)' 安装完成后...
Day 7 – 猜单词游戏
猜单词游戏的基本业务流程如下所示 生成单词,检测答案 生成随机单词,并检测用户输入的单词是否在选定的单词中 import random word_list = ['aardvark', 'baboon', 'camel'] chosen_word = ran...
一对一关系
一对一关系意味着每个 A对象都有一个对应的B对象,例如说每个人都有一本护照,或者每只宠物都有一个主人。 例如,如果我们有 Country 和 City 模型,它们之间有一个真正的一对一关系,那么在创...