上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 新建main.cpp 1 #include<iostream> 2 #include "student.h" 3 4 using namespace std; 5 6 void printMenu() { 7 cout << "**********************************" 阅读全文
posted @ 2021-01-30 09:26 琵琶真的行 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 新建student.cpp,实现student.h声明的所有函数 1 #include<iostream> 2 #include "student.h" 3 4 using namespace std; 5 6 void displayStudent(Student *stu_head) { 7 S 阅读全文
posted @ 2021-01-30 09:23 琵琶真的行 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 新建student.h 1 #include<iostream> 2 #include<string> 3 4 using namespace std; 5 6 struct Student { 7 string no; 8 string name; 9 string sex; 10 int age 阅读全文
posted @ 2021-01-30 09:20 琵琶真的行 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 一、 删除某日期之后创建的所有目录和文件(包括有空格的目录和文件) 方法一 find ./ -newermt '2021-1-16 20:31' -print0 |xargs -0 rm -f {}; -print0,它以null字符分隔输出的文件名而不是用新行字符 tar 和 xargs 等命令有 阅读全文
posted @ 2021-01-16 21:22 琵琶真的行 阅读(863) 评论(0) 推荐(0) 编辑
摘要: 水仙花数,即一个三位数的个,十,百三位数字的立方和等于该三位数。 1 from math import pow 2 3 if __name__ == "__main__": 4 5 l = list() 6 for x in range(100, 1000): 7 x1, x2, x3 = str( 阅读全文
posted @ 2020-12-01 19:29 琵琶真的行 阅读(819) 评论(0) 推荐(0) 编辑
摘要: 1 !/bin/bash 2 3 4 HOSTNAME="localhost" 5 PORT="3306" 6 USERNAME="root" 7 PASSWORD="1234" 8 DBNAME="mydatabase" 9 10 11 LOGIN_CMD="mysql -h${HOSTNAME} 阅读全文
posted @ 2020-11-27 20:59 琵琶真的行 阅读(801) 评论(0) 推荐(0) 编辑
摘要: 1 NUM = 9 2 for i in range(1, NUM+1): 3 print() 4 for j in range(1, i+1): 5 if j == 1: 6 print(5*(NUM-i)*(" "), end="") 7 print("{0} * {1} = {2} ".for 阅读全文
posted @ 2020-11-19 16:17 琵琶真的行 阅读(439) 评论(0) 推荐(0) 编辑
摘要: 空指针和野指针 int *p = NULL; //空指针,即地址为0的指针,用于初始化指针,不可被访问 int *q = (int)0x1234; //野指针,因为没有申请访问地址0x1234权限,所以不可访问 空指针和野指针,我们都没有权限访问。 指针地址大小 指针地址所占内存大小跟系统有关。 3 阅读全文
posted @ 2020-11-13 00:15 琵琶真的行 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 一、数据库设计规范1.使用innodb引擎2.数据库和表的字符集统一使用utf83.所有表和字段添加注释4.单表数据量控制<500w5.谨慎使用mysql分区,跨区查询影响性能6.冷热数据分离,缓存7.禁止在数据库中存储图片,文件等大的二进制数据8.禁止在线上做数据库压力测试9.禁止从开发和测试环境 阅读全文
posted @ 2020-07-21 14:22 琵琶真的行 阅读(411) 评论(0) 推荐(1) 编辑
摘要: 当多人数据库迁移,会出现migration版本冲突。以下是解决办法 1.保存本地修改 git stash save 'c1' 2.拉取最新代码 git pull 3.migrations合并 flask db merge 4.数据库迁移 flask db upgrade 5.拿回修改 git sta 阅读全文
posted @ 2020-06-22 19:21 琵琶真的行 阅读(313) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页