最新发布第22页
排序
ROOM Database
Room Database 是 Android 官方提供的本地数据库框架,是 Jetpack 架构组件的一部分,用于在应用中以安全、简洁、高效的方式存储本地数据。它在 SQLite 之上提供了更高层的抽象,让开发者更容易...
Docker 容器与主机间文件/文件夹拷贝
Docker 容器与主机之间文件或者文件夹的拷贝是经常遇到的场景。Docker 提供了docker up 命令,可以轻松实现容器与主机之间文件或者文件夹的拷贝。docker cp命令语法docker cp命令的基本语法,如...
Day 7 – 猜单词游戏
猜单词游戏的基本业务流程如下所示 生成单词,检测答案 生成随机单词,并检测用户输入的单词是否在选定的单词中 import random word_list = ['aardvark', 'baboon', 'camel'] chosen_word = ran...
Day 13 – 调试 Debugging
代码调试中的几种方法以及建议。 描述问题,代码执行的目的是什么,实现的流程是什么 复现问题,调试 Bug 的前提 Play Computer,能够像计算机一样逐行浏览代码,以便找出问题所在。 修复错误,...
How to fix the error “async call in a function that does not support concurrency” 如何修复错误 “async call in a function that does not support concurrency”
This error occurs when you’ve tried to call an async function from a synchronous function, which is not allowed in Swift – asynchronous functions must be able to suspend the...
What are tasks and task groups? 什么是任务和任务组?
Using async/await in Swift allows us to write asynchronous code that is easy to read and understand, but by itself it doesn’t enable us to run anything concurrently – even w...
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...
What’s the difference between async let, tasks, and task groups? async let、tasks 和 task groups 之间有什么区别?
Swift’s async let, Task, and task groups all solve a similar problem: they allow us to create concurrency in our code so the system is able to run them efficiently. Beyo...
How to make async command-line tools and scripts 如何制作异步命令行工具和脚本
If you’re writing a command-line tool with Swift, you can use async code in two ways: if you're using main.swift you can immediately make and use async functions as norm...





