最新发布第13页
How to make parts of an actor nonisolated 如何使 actor 的各个部分非隔离-Stewed Noodles 资源

How to make parts of an actor nonisolated 如何使 actor 的各个部分非隔离

All methods and mutable properties inside an actor are isolated to that actor by default, which means they cannot be accessed directly from code that’s external to the actor. Acce...
Who decides which actor code runs on? 谁决定在哪个 actor 代码上运行?-Stewed Noodles 资源

Who decides which actor code runs on? 谁决定在哪个 actor 代码上运行?

One common confusion with actors comes in deciding exactly where code runs, because just adding @MainActor and hoping for the best is rarely good enough.与 Actor 的一个常...
OpenCV 图像二值化-Stewed Noodles 资源

OpenCV 图像二值化

图像二值化的目的是简化图像的处理难度,基本原理是以图像的某个阈值为分界线,小于阈值的为0,大于阈值的设置为某个特定值。 OpenCV 提供以下的方法进行二值化处理threshold(src, thresh, MaxV...
jiulinxiri的头像-Stewed Noodles 资源烩之面大会员jiulinxiri10个月前
0300
Activity 生命周期-Stewed Noodles 资源

Activity 生命周期

Activity 的生命周期,如下图所示 onCreate() 调用时机:当 Activity 第一次被创建 时调用(只会调用一次)。常用操作:• 初始化界面(调用 setContentView() 加载布局)• 初始化数据、变量、...
jiulinxiri的头像-Stewed Noodles 资源烩之面大会员jiulinxiri5个月前
0300
Windows 部署 Ollama-Stewed Noodles 资源

Windows 部署 Ollama

下载 Ollama在 https://ollama.com/download/ 页面下载,系统对应的 Ollama 程序。部署 Ollama安装 Ollama双击 Ollama 的程序,即可进行 Ollama 的安装。修改环境变量Ollama 的默认模型存储路径...
jiulinxiri的头像-Stewed Noodles 资源烩之面大会员jiulinxiri2年前
0290
LLM 概述-Stewed Noodles 资源

LLM 概述

AI 技术名词 AI 中常见的技术名词如下 人工智能:AI - Artificial Intelligence 大语言模型:LLM - Large Language Model 自然语言处理:NLP - Natural Language Processing 机器学习:ML - Mac...
jiulinxiri的头像-Stewed Noodles 资源烩之面大会员jiulinxiri2年前
0290
Day 11 - 21点(黑杰克)-Stewed Noodles 资源

Day 11 – 21点(黑杰克)

游戏介绍 黑杰克(英语:Blackjack),是使用扑克牌玩的赌博游戏。游戏目标是将选手的卡片计数添加到最大而不超过21。纸牌的计数规则:A可作1或11点,2-10作该牌之点数,J、Q、K作10点。 代码实...
jiulinxiri的头像-Stewed Noodles 资源烩之面大会员jiulinxiri2年前
0290
Day 18 - Turtle 与 GUI-Stewed Noodles 资源

Day 18 – Turtle 与 GUI

绘制正方形 利用turtle进行正方形的绘制 # 导入模块 import turtle for i in range(4): turtle.forward(100) turtle.left(90) my_screen = turtle.Screen() # 点击屏幕推出GUI界面 my_screen.ex...
jiulinxiri的头像-Stewed Noodles 资源烩之面大会员jiulinxiri2年前
0290
How to call async throwing functions 如何调用异步 throwing 函数-Stewed Noodles 资源

How to call async throwing functions 如何调用异步 throwing 函数

Just like their synchronous counterparts, Swift’s async functions can be throwing or non-throwing depending on how you want them to behave. However, there is a twist: although we ...
Understanding how global actor inference works 了解全局参与者推理的工作原理-Stewed Noodles 资源

Understanding how global actor inference works 了解全局参与者推理的工作原理

Apple explicitly annotates many of its types as being @MainActor, including most UIKit types such as UIView and UIButton. However, for a while the Swift team da...