Skip to content

Commit

Permalink
更新了最后10天的文档
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrued committed Oct 28, 2019
1 parent d036c5c commit 00a3941
Show file tree
Hide file tree
Showing 7 changed files with 593 additions and 33 deletions.
54 changes: 27 additions & 27 deletions Day36-40/36-38.关系型数据库MySQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,55 +243,55 @@ MySQL在过去由于性能高、成本低、可靠性好,已经成为最流行
-- 创建学院表
create table tb_college
(
collid int auto_increment comment '编号',
collname varchar(50) not null comment '名称',
intro varchar(500) default '' comment '介绍',
collid int auto_increment comment '编号',
collname varchar(50) not null comment '名称',
collintro varchar(500) default '' comment '介绍',
primary key (collid)
);

-- 创建学生表
create table tb_student
(
stuid int not null comment '学号',
stuname varchar(20) not null comment '姓名',
sex boolean default 1 comment '性别',
birth date not null comment '出生日期',
addr varchar(255) default '' comment '籍贯',
collid int not null comment '所属学院',
stuid int not null comment '学号',
stuname varchar(20) not null comment '姓名',
stusex boolean default 1 comment '性别',
stubirth date not null comment '出生日期',
stuaddr varchar(255) default '' comment '籍贯',
collid int not null comment '所属学院',
primary key (stuid),
foreign key (collid) references tb_college (collid)
);

-- 创建教师表
create table tb_teacher
(
teaid int not null comment '工号',
teaname varchar(20) not null comment '姓名',
title varchar(10) default '助教' comment '职称',
collid int not null comment '所属学院',
teaid int not null comment '工号',
teaname varchar(20) not null comment '姓名',
teatitle varchar(10) default '助教' comment '职称',
collid int not null comment '所属学院',
primary key (teaid),
foreign key (collid) references tb_college (collid)
);

-- 创建课程表
create table tb_course
(
couid int not null comment '编号',
couname varchar(50) not null comment '名称',
credit int not null comment '学分',
teaid int not null comment '授课老师',
couid int not null comment '编号',
couname varchar(50) not null comment '名称',
coucredit int not null comment '学分',
teaid int not null comment '授课老师',
primary key (couid),
foreign key (teaid) references tb_teacher (teaid)
);

-- 创建选课记录表
create table tb_record
(
recid int auto_increment comment '选课记录编号',
sid int not null comment '选课学生',
cid int not null comment '所选课程',
seldate datetime default now() comment '选课时间日期',
score decimal(4,1) comment '考试成绩',
recid int auto_increment comment '选课记录编号',
sid int not null comment '选课学生',
cid int not null comment '所选课程',
seldate datetime default now() comment '选课时间日期',
score decimal(4,1) comment '考试成绩',
primary key (recid),
foreign key (sid) references tb_student (stuid),
foreign key (cid) references tb_course (couid),
Expand Down Expand Up @@ -548,13 +548,13 @@ MySQL在过去由于性能高、成本低、可靠性好,已经成为最流行

```SQL
-- 插入学院数据
insert into tb_college (collname, intro) values
insert into tb_college (collname, collintro) values
('计算机学院', '创建于1956年是我国首批建立计算机专业。学院现有计算机科学与技术一级学科和网络空间安全一级学科博士学位授予权,其中计算机科学与技术一级学科具有博士后流动站。计算机科学与技术一级学科在2017年全国第四轮学科评估中评为A;2019 U.S.News全球计算机学科排名26名;ESI学科排名0.945‰,进入全球前1‰,位列第43位。'),
('外国语学院', '1998年浙江大学、杭州大学、浙江农业大学、浙江医科大学四校合并,成立新的浙江大学。1999年原浙江大学外语系、原杭州大学外国语学院、原杭州大学大外部、原浙江农业大学公外部、原浙江医科大学外语教学部合并,成立浙江大学外国语学院。2003年学院更名为浙江大学外国语言文化与国际交流学院。'),
('经济管理学院', '四川大学经济学院历史悠久、传承厚重,其前身是创办于1905年的四川大学经济科,距今已有100多年的历史。已故著名经济学家彭迪先、张与九、蒋学模、胡寄窗、陶大镛、胡代光,以及当代著名学者刘诗白等曾先后在此任教或学习。在长期的办学过程中,学院坚持以马克思主义的立场、观点、方法为指导,围绕建设世界一流经济学院的奋斗目标,做实“两个伟大”深度融合,不断提高党的建设质量与科学推进一流事业深度融合。');

-- 插入学生数据
insert into tb_student (stuid, stuname, sex, birth, addr, collid) values
insert into tb_student (stuid, stuname, stusex, stubirth, stuaddr, collid) values
(1001, '杨逍', 1, '1990-3-4', '四川成都', 1),
(1002, '任我行', 1, '1992-2-2', '湖南长沙', 1),
(1033, '王语嫣', 0, '1989-12-3', '四川成都', 1),
Expand All @@ -571,18 +571,18 @@ MySQL在过去由于性能高、成本低、可靠性好,已经成为最流行
delete from tb_student where stuid=4040;

-- 更新学生数据
update tb_student set stuname='杨过', addr='湖南长沙' where stuid=1001;
update tb_student set stuname='杨过', stuaddr='湖南长沙' where stuid=1001;

-- 插入老师数据
insert into tb_teacher (teaid, teaname, title, collid) values
insert into tb_teacher (teaid, teaname, teatitle, collid) values
(1122, '张三丰', '教授', 1),
(1133, '宋远桥', '副教授', 1),
(1144, '杨逍', '副教授', 1),
(2255, '范遥', '副教授', 2),
(3366, '韦一笑', '讲师', 3);

-- 插入课程数据
insert into tb_course (couid, couname, credit, teaid) values
insert into tb_course (couid, couname, coucredit, teaid) values
(1111, 'Python程序设计', 3, 1122),
(2222, 'Web前端开发', 2, 1122),
(3333, '操作系统', 4, 1122),
Expand Down
8 changes: 7 additions & 1 deletion Day91-100/91.团队项目开发的问题和解决方案.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 团队项目开发的问题和解决方案

我们经常听到个人开发和团队开发这两个词,所谓个人开发就是一个人把控产品的所有内容;而团队开发则是由多个人组团并完成产品的开发。要实施团队开发以下几点是必不可少的
个人开发和团队开发这两个词相信对大家来说并不陌生。所谓个人开发就是一个人把控产品的所有内容;而团队开发则是由多个人组团并完成产品的开发。要实施团队开发以下几点是不可或缺的

1. 对开发过程中的各种事件(例如:谁到什么时间完成了什么事情)进行管理和共享。
2. 在团队内部共享各类工作成果以及新的知识技巧等。
Expand All @@ -10,6 +10,8 @@

### 团队项目开发常见问题

团队开发相较于个人开发,容易遇到以下几个方面的问题。

#### 问题1:传统的沟通方式无法确定处理的优先级

例如:使用邮件进行沟通可能出现邮件数量太多导致重要的邮件被埋没,无法管理状态,不知道哪些问题已经解决,哪些问题尚未处理,如果用全文检索邮件的方式来查询相关问题效率过于低下。
Expand Down Expand Up @@ -107,6 +109,8 @@ tar -xvf git-2.23.0.tar
yum -y install libcurl-devel
```

> 说明:没有这个依赖库,git的网络功能将无法执行。
安装前的配置。

```Shell
Expand Down Expand Up @@ -575,6 +579,8 @@ tar -xvf ZenTaoPMS.pro8.5.2.zbox_64.tar

持续集成对于编译型语言的意义更大,对于Python这样的解释型语言,更多的时候是用于对接版本控制系统触发自动化测试并产生相应的报告。类似的功能也可以通过在Git服务上配置**Webhook**来完成,码云甚至可以直接对接[钉钉开放平台](<https://ding-doc.dingtalk.com/>)使用钉钉机器人来向项目相关人员发送即时消息。Gitlab也对CI和CD(持续交付)提供了支持,具体内容请大家参考[《GitLab CI/CD基础教程》](<https://blog.stdioa.com/2018/06/gitlab-cicd-fundmental/>)



> **说明**
>
> 1. 关于敏捷开发的相关内容,有兴趣的读者可以阅读知乎上的[《这才是敏捷开发》](<https://zhuanlan.zhihu.com/p/33472102>)一文。
Expand Down
5 changes: 5 additions & 0 deletions Day91-100/94.网络API接口设计.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,8 @@ API接口返回的数据通常都是**JSON**或**XML**格式,我们这里不
/* ... */
}
```



> 提示:如果没有接口文档撰写经验,可以使用在线接口文档编辑平台RAP2或YAPI来进行接口文档撰写,也可以参考我的[《方天下(租房项目)接口文档》](../番外篇/方天下(租房项目)接口文档.md)来了解如何撰写接口文档。
8 changes: 5 additions & 3 deletions Day91-100/95.使用Django开发商业项目.md
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ class BlacklistPermission(permissions.BasePermission):

![](./res/rbac-full.png)

2. ACL - 访问控制列表(每个用户绑定自己的访问白名单)。
2. ACL - 访问控制列表(每个用户绑定自己的访问白名单或黑名单)。

#### 访问限流

Expand Down Expand Up @@ -1616,7 +1616,7 @@ def example_view(request, format=None):
# 此处省略下面的代码
```

当然也可以通过继承`BaseThrottle`来自定义限流策略,通常需要重写`allow_request``wait`方法。
当然也可以通过继承`SimpleRateThrottle`来自定义限流策略,通常需要重写`allow_request``wait`方法。

### 异步任务和计划任务

Expand Down Expand Up @@ -2272,9 +2272,11 @@ TOTAL 267 176 34%
4. 使用 - 在页面右侧可以看到一个调试工具栏,上面包括了执行时间、项目设置、请求头、SQL、静态资源、模板、缓存、信号等调试信息,查看起来非常的方便。
5. 项目上线之前,请记住**去掉django-debug-toolbar相关的所有配置**
### 部署相关
请参考《Django项目上线指南》
请参考[《项目部署上线和性能调优》](98.项目部署上线和性能调优.md)
### 性能相关
Expand Down
2 changes: 1 addition & 1 deletion Day91-100/96.软件测试和自动化测试.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ Selenium是实现Web应用程序的功能测试以及集成测试自动化的浏
4. 在Jenkins的“系统管理”中选择“系统设置”并配置“Selenium Remote Control”下的“HTMLSuite Runner”。
5. 新建测试用的Jenkins任务并进行配置,配置的内容包括:浏览器、起始URL、测试套件和测试结果输出文件。

配置完成后,就可以执行Jenkins的“立即构建”了。
配置完成后,就可以执行Jenkins的“立即构建”了。
4 changes: 3 additions & 1 deletion Day91-100/98.项目部署上线和性能调优.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ pip install -r code/teamproject/requirements.txt
5. 启动服务器。

```Shell
uwsgi --ini conf/uwsgi.ini
nohup uwsgi --ini conf/uwsgi.ini &
```

### Nginx的配置
Expand Down Expand Up @@ -756,6 +756,8 @@ class MasterSlaveRouter(object):

[Supervisor](https://github.com/Supervisor/supervisor)是一个用Python写的进程管理工具,可以很方便的用来在类Unix系统下启动、重启(自动重启程序)和关闭进程,目前Supervisor暂时还没有提供对Python 3的支持,可以通过Python 2来安装和运行Supervisor,再通过Supervisor来管理Python 3的程序。

> **提示**:还有一个和Supervisor功能类似的工具名为Circus,支持Python 3。
1. 安装Supervisor。

```Shell
Expand Down
Loading

0 comments on commit 00a3941

Please sign in to comment.