最新发布第26页
Why can’t we call async functions using async var? 为什么我们不能使用 async var 调用 async 函数?-Stewed Noodles 资源

Why can’t we call async functions using async var? 为什么我们不能使用 async var 调用 async 函数?

Swift’s async let syntax provides short, helpful syntax for running lots of work concurrently, allowing us to wait for them all later on. However, it only works as ...
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”-Stewed Noodles 资源

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...
How to create a custom AsyncSequence 如何创建自定义 AsyncSequence-Stewed Noodles 资源

How to create a custom AsyncSequence 如何创建自定义 AsyncSequence

There are only three differences between creating an AsyncSequence and creating a regular Sequence, none of which are complicated.创建 AsyncSequence 和创建...
What are tasks and task groups? 什么是任务和任务组?-Stewed Noodles 资源

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...
What’s the difference between async let, tasks, and task groups? async let、tasks 和 task groups 之间有什么区别?-Stewed Noodles 资源

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...
4. ① 列出产品-Stewed Noodles 资源
匿名函数-Stewed Noodles 资源

匿名函数

匿名函数:没有名字的函数。 语法 基本语法 val anonymousFunction = fun(parameters): ReturnType {    body    return statement if needed} 示例代码 val numbers =...
Data Class 数据类-Stewed Noodles 资源

Data Class 数据类

Kotlin 中的 数据类(data class) 是一种用于只存数据的类,能够自动生成常用的函数。 equals() hashCode() toString() copy() 语法 data class ClassName( val prop: Type, var prop2: Type )...
Docker 部署 Gitlab-Stewed Noodles 资源
Docker 容器与主机间文件/文件夹拷贝-Stewed Noodles 资源

Docker 容器与主机间文件/文件夹拷贝

Docker 容器与主机之间文件或者文件夹的拷贝是经常遇到的场景。Docker 提供了docker up 命令,可以轻松实现容器与主机之间文件或者文件夹的拷贝。docker cp命令语法docker cp命令的基本语法,如...
XuX的头像-Stewed Noodles 资源烩之面大会员XuX2年前
0210