Day 10 – 函数输出
单返回值 函数通过 return 关键字,进行函数的输出。 def function_name(input_parameter): <body of function that uses input_argument> return output 示例代码 def format_name(f_nam...
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...
How to follow this guide 如何遵循本指南
This guide is called Swift Concurrency by Example because it focuses on providing as many examples as possible. My goal is to stay laser-focused on real-world problems and real-wor...
How to discard results in a task group 如何丢弃任务组中的结果
Swift has a special task group type called a discarding task group, which has a very specialized function: tasks that complete are automatically discarded and destroyed, ...
How to serialize parameterized tests with Swift Testing 如何使用 Swift Testing 序列化参数化测试
Swift Testing's parameterized tests allow us to send multiple values into a single test, and they'll be run in parallel for maximum performance. If you don't want this – if you wa...
Word 隐藏所有回车换行符
Windows 系统下,按 Ctrl + Shift + 8 可以快速显示或隐藏所有格式标记,包括回车符(¶)。 macOS 系统下,视图 -> 显示段落标 中,取消勾选。
State
当 State 改变时,Compose 会自动重新构建(recompose)相关 UI,这就是 Compose 声明式 UI 的核心。 mutableStateOf mutableStateOf 是 Jetpack Compose 中最基础的状态容器。它会: 存储任意...
Navigation
依赖添加 如需使用 Navigation,需要添加依赖,具体参考 Navigation 。 dependencies { val nav_version = '2.9.6' implementation('androidx.navigation:navigation-compose:$nav_version') } ...









