MySQL 修改 user 表后无法登录
修改my.cnf文件 打开my.cnf文件 vim /etc/my.cnf 把 sql-mode 的STRICT_TRANS_TABLES去掉 修改sql-mode 停止MySQL服务 输入以下的命令,停止MySQL服务。 systemctl stop mysqld.service 停止MyS...
Activity 生命周期
Activity 的生命周期,如下图所示 onCreate() 调用时机:当 Activity 第一次被创建 时调用(只会调用一次)。常用操作:• 初始化界面(调用 setContentView() 加载布局)• 初始化数据、变量、...
Day 17 – 自定义类(Class)
自定义类 类定义的语法,如下 # 类的定义, ClassName必须首字母大写 class ClassName: # 类的对象 class_name_1 = ClassName() 常见的几种命名方式- PascalCase - camelCase - snake_case 构造...
Day 21 – 贪吃蛇(下)
类继承 从现有类继承行为和外观的过程成为类继承。这里的行为和外观分别为类的方法和属性。类继承可以对现有的类进行属性以及方法的扩展。 # Fish类 class Fish: def __init__(self): '''初始化...
SwiftData 调试
SwiftData 在调试时可以直接在输出窗口显示对应的 SQL 语句。 设置方法 点击如下的按钮,弹出 Scheme 窗口 在弹出的Scheme 窗口中,选择 Run菜单,然后选择 Argument 标签页,点击+号按钮。 然...
What’s the performance cost of calling an async function? 调用 async 函数的性能成本是多少?
Whenever we use await to call an async function, we mark a potential suspension point in our code – we’re acknowledging that it’s entirely possible our function w...
What’s the difference between Sequence, AsyncSequence, and AsyncStream? Sequence、AsyncSequence 和 AsyncStream 之间有什么区别?
Swift provides several ways of receiving a potentially endless flow of data, allowing us to read values one by one, or loop over them using for, while, or similar.Swift ...








