最新发布第10页
排序
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...
Day 19 – 实例、状态和高级函数
事件监听 turtle模块的事件监听,通过 screen 的 listen 方法实现。 from turtle import Turtle, Screen tim = Turtle() screen = Screen() def move_forward(): tim.forward(100) # 监听屏幕输...
Day 20 – 贪吃蛇(上)
设置游戏屏幕 from turtle import Screen screen = Screen() # 设置屏幕大小 screen.setup(width=600, height=600) # 设置背景颜色 screen.bgcolor('black') # 设置标题 screen.title('贪吃蛇')...
What calls the first async function? 什么调用第一个异步函数?
You can only call async functions from other async functions, because they might need to suspend themselves and everything that is waiting for them. This leads to a bit of a chicke...
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...
Windows 部署 Ollama
下载 Ollama在 https://ollama.com/download/ 页面下载,系统对应的 Ollama 程序。部署 Ollama安装 Ollama双击 Ollama 的程序,即可进行 Ollama 的安装。修改环境变量Ollama 的默认模型存储路径...
LLM 概述
AI 技术名词 AI 中常见的技术名词如下 人工智能:AI - Artificial Intelligence 大语言模型:LLM - Large Language Model 自然语言处理:NLP - Natural Language Processing 机器学习:ML - Mac...
What is a synchronous function? 什么是同步函数?
By default, all Swift functions are synchronous, but what does that mean? A synchronous function is one that executes all its work in a simple, straight line on a single threa...
清空物品列表信息
清除物品 执行下边的SQL语句,清除现有的物品。 # 清除物品信息表 DELETE FROM xinhu_goods; 清除物品分类 在【流程模块】->【数据选项】->【行政选项】->【物品分类】中进行分类的管...
Day 4 – 随机化与列表
随机化 Python 提供random模块以实现随机化。详情可参考 https://docs.python.org/zh-cn/3.13/library/random.html # 导入 random 模块 import random # 1 到 10 的随机整数 rand_num = random....