XuX-Stewed Noodles 资源-第25页
XuX的头像-Stewed Noodles 资源
超级管理员河南管理员
一拳之石取其了坚,一勺之水取其净!
Is it efficient to create many tasks? 创建许多任务是否有效?-Stewed Noodles 资源

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...
SubscriptionStoreView 订阅商店视图-Stewed Noodles 资源
Manifest 文件-Stewed Noodles 资源

Manifest 文件

Manifest.xml 文件是重要的配置文件,提供了Android 应用程序的基本信息。 <?xml version='1.0' encoding='utf-8'?> <!--配置清单的开始标记--> <manifest xmlns:android='http://sche...
高阶函数-Stewed Noodles 资源

高阶函数

高阶函数可以接受一个或多个函数作为参数,也可以讲一个函数作为返回值。 fun operateOnNumbers(a: Int, b: Int, operation: (Int, Int) -> Int): Int { return operation(a, b) } // 函数的使...
Jetpack Compose-Stewed Noodles 资源

Jetpack Compose

Jetpack compose 是谷歌开发的一款现代工具包,用于构建原生 Android用户界面。它允许开发者使用声明式编程模型为 Android应用构建 UI 界面,当底层数据发生改变时,Compose 负责更新 UI 界面,...
Docker 部署 Ollama-Stewed Noodles 资源

Docker 部署 Ollama

安装 ollama这里采用 docker 进行 ollama 的部署。部署支持 CPU 也支持 GPU, 详情参考https://hub.docker.com/r/ollama/ollama。这里采用 CPU 的安装模式,安装命令如下docker run -d -v /opt/...
使用 @Model 宏定义模型-Stewed Noodles 资源

使用 @Model 宏定义模型

您将使用 @Model 宏来定义所有 SwiftData 模型类。该宏会自动使您的类能够从 SwiftData 加载和存储数据,支持观察更改,并添加 Hashable、Identifiable、Observable 和 PersistentModel 的遵循...
How to call an async function using async let 如何使用 async let 调用 async 函数-Stewed Noodles 资源

How to call an async function using async let 如何使用 async let 调用 async 函数

Sometimes you want to run several async operations at the same time then wait for their results to come back, and the easiest way to do that is with async let. This lets you start...
Sending data safely across actor boundaries 跨参与者边界安全地发送数据-Stewed Noodles 资源

Sending data safely across actor boundaries 跨参与者边界安全地发送数据

Swift tries to ensure access to shared data is done safely, partly through types such as actors, and partly through a concept of sendability implemented through the ...
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 ...