jiulinxiri-Stewed Noodles 资源-第5页
jiulinxiri的头像-Stewed Noodles 资源
超级管理员河南管理员
一拳之石取其了坚,一勺之水取其净!
函数与闭包-Stewed Noodles 资源

函数与闭包

可变函数 可变函数是一种不确定迭代的函数,也就是你发送多少参数,它就接受多少参数。 func add(numbers: Int...) -> Int { var total = 0 for number in numbers { total += number } retu...
1年前
0435
SwiftUI List 中多个按钮 button 同时触发-Stewed Noodles 资源

SwiftUI List 中多个按钮 button 同时触发

问题描述 在 list 中的一列中设置多个按钮会出现同时触发的问题 问题演示 解决方案 增设按钮的类型属性 .buttonStyle(.borderless),也可以选择其他的按钮类型。 Button('Add to Red') { redSco...
1年前
04210
冲奶-Stewed Noodles 资源

冲奶

奶粉母乳比例3:2 奶粉/水/母乳比例 总量(水+母乳) 奶粉 水 母乳 175ML 3勺半 105ML 70ML 150ML 3勺 90ML 60ML 125ML 2勺半 75ML 50ML 100ML 2勺 60ML 40ML 注: 冲奶需 45°C 以下温开水。
1年前
04213
Kana Quest-Stewed Noodles 资源

Kana Quest

这个 app 用来学习日语中的平假名(hiragana)与片假名(katakana)。 基本用户界面 这个项目的 assets.zip 压缩文件,包含两个重要的文件: kana.json 文件包含我们要使用的所有日语字符。 Bundle-...
批处理脚本入门-Stewed Noodles 资源

批处理脚本入门

简介 批处理就是对某对象进行批量的处理,通常被认为是一种简化的脚本语言,它应用于 DOS 和 Windows 系统中。批处理使用一系列的命令进行自动化操作。 基本语法 注释 rem 带@echo off,所有的执...
1年前
04215
Python 语言基础-Stewed Noodles 资源

Python 语言基础

变量的定义 # 定义变量 name = 'Alice' age = 30 # 使用变量 print('Name:', name) print('Age:', age) # 修改变量 name = 'Bob' age = 25 # 使用修改后的变量 print('Updated Name:', name) pr...
布局(八) - 坐标空间-Stewed Noodles 资源

布局(八) – 坐标空间

Framework 为我们提供两种内置的坐标空间: 全局坐标空间 和 本地坐标空间,我们也可以定义⾃⼰的坐标空间。struct ContentView: View { var body: some View { VStack { Text('Hello') Text('Se...
语法(一) - 模式匹配-Stewed Noodles 资源

语法(一) – 模式匹配

Swift 的 switch 语句具有灵活却富有表现力的匹配模式。 基本使用 单值匹配 单值字符串匹配 let name = "twostraws" switch name { case "bilbo": print("Hello, Bilb...
1年前
04013
单项目集合-Stewed Noodles 资源

单项目集合

代码内有什么? 在 swift 标准库文件 Array.swift 中,可以检索到 insert() 方法,如下所示: public mutating func insert(_ newElement: __owned Element, at i: Int) { _checkIndex(i) self.r...
How to make function parameters isolated 如何隔离函数参数-Stewed Noodles 资源

How to make function parameters isolated 如何隔离函数参数

Any properties and methods that belong to an actor are isolated to that actor, but you can make external functions isolated to an actor if you want. This allows the funct...