最新发布第9页
排序
OpenCV 二值化原理
基本流程 通常使用的 JPG、PNG 文件,都是压缩后的格式。这些格式解码之后,可以还原为 RGB 文件。RGB 文件中的每一个像素点都是由 红、绿、蓝三种颜色构成。 RGB 将 RGB 文件中的红色、绿色以...
@Attribute 宏定义属性
框架默认的行为适用于大多数使用场景,能够有效管理模型类的存储属性。然而,如果您需要更改特定属性的持久化行为,可以使用 @Attribute 宏对其进行注解。例如,您可以通过指定某个属性的值在该...
How to create and use an actor in Swift 如何在 Swift 中创建和使用 actor
Creating and using an actor in Swift takes two steps: create the type using actor rather than class or struct, then use await when accessing its ...
如何使用 matchedGeometryEffect() 将一个视图的动画同步到另一个视图
如果你在视图层次结构的两个不同部分中有相同的视图,并且希望在这两者之间进行动画过渡——例如,从列表视图切换到放大的详细视图——那么你应该使用 SwiftUI 的 matchedGeometryEffect() 修饰...
How to use @MainActor to run code on the main queue 如何使用 @MainActor 在主队列上运行代码
@MainActor is a global actor that uses the main queue for executing its work. In practice, this means methods or types marked with @MainActor can (for the most part)...
LiveScribe
We're going to build a macOS app that lets users write Markdown and see exactly how it looks as they type. More importantly, we're going to do so using test-driven development, so ...
What is an asynchronous function?什么是异步函数?
Although Swift functions are synchronous by default, we can make them asynchronous by adding one keyword: async. Inside asynchronous functions, we can call other asy...
利用 buildx 构建多架构镜像
由于使用的是 M1 型号的 Mac 电脑,docker 构建出来的镜像是 ARM 架构的。如果要构建其他架构的镜像,需要使用 docker 的 buildx 插件。ARM 架构的 Docker 镜像启用 buildx 插件buildx 插件是 d...
Day 16 – 面向对象编程(OOP)
面向对象编程(Object Oriented Programming, OOP),模拟事物为对象(Object),每个对象都有自己的属性(attribute)以及方法(methods)。 对象与类 在 OOP 中,有类(Class)以及对象(Obje...