大学数据库模式

下面以数据库系统概念第6版的大学数据库模式作为示例
创建一个数据库名为:

1
university

然后进入这个数据库,执行如下建表命令:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
create table classroom
(building varchar(15),
room_number varchar(7),
capacity numeric(4,0),
primary key (building, room_number)
);
create table department
(dept_name varchar(20),
building varchar(15),
budget numeric(12,2) check (budget > 0),
primary key (dept_name)
);
create table course
(course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numeric(2,0) check (credits > 0),
primary key (course_id),
foreign key (dept_name) references department(dept_name)
on delete set null
);
create table instructor
(ID varchar(5),
name varchar(20) not null,
dept_name varchar(20),
salary numeric(8,2) check (salary > 29000),
primary key (ID),
foreign key (dept_name) references department(dept_name)
on delete set null
);
create table section
(course_id varchar(8),
sec_id varchar(8),
semester varchar(6)
check (semester in ('Fall', 'Winter', 'Spring', 'Summer')),
year numeric(4,0) check (year > 1701 and year < 2100),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(4),
primary key (course_id, sec_id, semester, year),
foreign key (course_id) references course(course_id)
on delete cascade,
foreign key (building, room_number) references classroom(building, room_number)
on delete set null
);
create table teaches
(ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
primary key (ID, course_id, sec_id, semester, year),
foreign key (course_id,sec_id, semester, year) references section(course_id,sec_id, semester, year)
on delete cascade,
foreign key (ID) references instructor(ID)
on delete cascade
);
create table student
(ID varchar(5),
name varchar(20) not null,
dept_name varchar(20),
tot_cred numeric(3,0) check (tot_cred >= 0),
primary key (ID),
foreign key (dept_name) references department(dept_name)
on delete set null
);
create table takes
(ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
grade varchar(2),
primary key (ID, course_id, sec_id, semester, year),
foreign key (course_id,sec_id, semester, year) references section(course_id,sec_id, semester, year)
on delete cascade,
foreign key (ID) references student(ID)
on delete cascade
);
create table advisor
(s_ID varchar(5),
i_ID varchar(5),
primary key (s_ID),
foreign key (i_ID) references instructor (ID)
on delete set null,
foreign key (s_ID) references student (ID)
on delete cascade
);
create table time_slot
(time_slot_id varchar(4),
day varchar(1),
start_hr numeric(2) check (start_hr >= 0 and start_hr < 24),
start_min numeric(2) check (start_min >= 0 and start_min < 60),
end_hr numeric(2) check (end_hr >= 0 and end_hr < 24),
end_min numeric(2) check (end_min >= 0 and end_min < 60),
primary key (time_slot_id, day, start_hr, start_min)
);
create table prereq
(course_id varchar(8),
prereq_id varchar(8),
primary key (course_id, prereq_id),
foreign key (course_id) references course(course_id)
on delete cascade,
foreign key (prereq_id) references course(course_id)
);

逆向数据库到模型

逆向数据库到模型可以将mysql中创建好的表转成E-R图。
步骤如下图所示:
图片
这样就得到E-R图了,如下所示:
图片

切换E-R图 表示方式

图片

UML格式的E-R图如下所示

图片

下载需要的破解程序

生成秘钥文件

先运行navicat-patcher.exe这个程序

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
PS D:\Desktop\PuoJie> .\navicat-patcher.exe
***************************************************
* Navicat Patcher by @DoubleLabyrinth *
* Version: 4.1 *
***************************************************

Usage:
navicat-patcher.exe [-dry-run] <Navicat Installation Path> [RSA-2048 PEM File Path]

[-dry-run] Run patcher without applying any patches.
This parameter is optional.

<Navicat Installation Path> The folder path where Navicat is installed.
This parameter must be specified.

[RSA-2048 PEM File Path] The path to an RSA-2048 private key file.
This parameter is optional.
If not specified, an RSA-2048 private key file
named "RegPrivateKey.pem" will be generated.

Example:
navicat-patcher.exe "C:\Program Files\PremiumSoft\Navicat Premium 12"
PS D:\Desktop\PuoJie>

所以要执行如下命令:

1
navicat-patcher.exe "Navicat安装路径"

我的命令如下:

1
navicat-patcher.exe "F:\Program Files\PremiumSoft\Navicat Premium 12"

命令运行过程

D:\Desktop\PuoJie>navicat-patcher.exe "F:\Program Files\PremiumSoft\Navicat Premium 12"
***************************************************
*       Navicat Patcher by @DoubleLabyrinth       *
*                  Version: 4.1                   *
***************************************************

Press Enter to continue or Ctrl + C to abort.

[+] Try to open Navicat.exe ... Ok!
[+] Try to open libcc.dll ... Ok!

[+] PatchSolution0 ...... Ready to apply
    [*] Patch offset = +0x029bd6d8
[+] PatchSolution1 ...... Ready to apply
    [*] [0] Patch offset = +0x0220aa60
    [*] [1] Patch offset = +0x0074c749
...... 这里省略了一大串的输出
    [*] [109] Instruction RVA = 0x016637f8, Patch Offset = +0x01662bfc
    [*] [110] Instruction RVA = 0x016637fe, Patch Offset = +0x01662c01
[-] PatchSolution4 ...... Omitted

[*] PatchSolution0 is suppressed in order to keep digital signature valid.

[?] Previous backup F:\Program Files\PremiumSoft\Navicat Premium 12\libcc.dll.backup detected. Delete? (y/n)

然后输入y

[*] Generating new RSA private key, it may take a long time...
[*] Your RSA public key:
...... 这里省略了一大串的输出
[*] +01662bfc: 51 41 ---> 51 41
[*] +01662c01: 42 ---> 42

[*] New RSA-2048 private key has been saved to
D:\Desktop\PuoJie\RegPrivateKey.pem

*******************************************************
*           PATCH HAS BEEN DONE SUCCESSFULLY!         *
*                  HAVE FUN AND ENJOY~                *
*******************************************************

可以看到命令在当前目录(D:\Desktop\PuoJie)下生成RegPrivateKey.pem这个文件.(D:\Desktop\PuoJie\RegPrivateKey.pem

使用上面生成的秘钥文件破解

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
PS D:\Desktop\PuoJie> .\navicat-keygen.exe
***************************************************
* Navicat Keygen by @DoubleLabyrinth *
* Version: 4.0 *
***************************************************

Usage:
navicat-keygen.exe <-bin|-text> [-adv] <RSA-2048 Private Key File>

<-bin|-text> Specify "-bin" to generate "license_file" used by Navicat 11.
Specify "-text" to generate base64-encoded activation code.
This parameter must be specified.

[-adv] Enable advance mode.
This parameter is optional.

<RSA-2048 Private Key File> A path to an RSA-2048 private key file.
This parameter must be specified.

Example:
navicat-keygen.exe -text .\RegPrivateKey.pem
PS D:\Desktop\PuoJie>

所以我的命令如下:

1
navicat-keygen.exe -text .\RegPrivateKey.pem

选择要破解的程序和版本

我用的是Premium 12.1 中文版,所以

  • 先输入1,
  • 然后输入1

这样就得到了一个序列号

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
G:\Desktop\PuoJie>navicat-keygen.exe -text .\RegPrivateKey.pem
***************************************************
* Navicat Keygen by @DoubleLabyrinth *
* Version: 4.0 *
***************************************************

[*] Select Navicat product:
0. DataModeler
1. Premium
2. MySQL
3. PostgreSQL
4. Oracle
5. SQLServer
6. SQLite
7. MariaDB
8. MongoDB
9. ReportViewer

(Input index)> 1

[*] Select product language:
0. English
1. Simplified Chinese
2. Traditional Chinese
3. Japanese
4. Polish
5. Spanish
6. French
7. German
8. Korean
9. Russian
10. Portuguese

(Input index)> 1

[*] Input major version number:
(range: 0 ~ 15, default: 12)> 12

[*] Serial number:
NAVN-6XZI-FK3F-NU44

复制序列号 断开网络 打开Navicat 手动激活

复制生成的这个序列号,接下断开网络,打开navicat,点帮助,注册,然后输入序列号,选择手动激活,这样会得一大串字符串(这里我命名为邀请码):

1
2
3
bz6Pp8T7/4kXP8UZ2uJ9XUKvy6xP8G3mhe1ZSOOAznS7sVRzjGNiTvyiUuNFtPq5++KQXBgtpT62pKEU8SzKwtPfpwfpE2Gck5GW8IkY7v025AIvAE0kgk6c
4th+L2GvMRtOX4D9kqzGyh0Pz8ywrwOGlotN72MNWkpWNbhI8+rM8qvTNYkMkM4XBl4b1marLMIsKFDWZSb0tZ5yoWTiqBa3qWyM/ewHeY3TW4hxXLHqK3+H
md1ATOn4RKMgNiNk2fN2YyQ5beHB06U13TT+HKUoTIZC56+rGXaQOHfo+tshBuc929/KqgzsiGY9dkupJ2PIgdUwh8pw0oxEXCNyug==

复制邀请码 生成注册码

复制这一大串字符串.
然后,回到cmd中,继续输入用户名组织,接着粘贴刚才复制的,按下两次回车,这样就生成了注册码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[*] Your name: lan
[*] Your organization: lan
[*] Input request code in Base64: (Input empty line to end)
bz6Pp8T7/4kXP8UZ2uJ9XUKvy6xP8G3mhe1ZSOOAznS7sVRzjGNiTvyiUuNFtPq5++KQXBgtpT62pKEU8SzKwtPfpwfpE2Gck5GW8IkY7v025AIvAE0kgk6c
4th+L2GvMRtOX4D9kqzGyh0Pz8ywrwOGlotN72MNWkpWNbhI8+rM8qvTNYkMkM4XBl4b1marLMIsKFDWZSb0tZ5yoWTiqBa3qWyM/ewHeY3TW4hxXLHqK3+H
md1ATOn4RKMgNiNk2fN2YyQ5beHB06U13TT+HKUoTIZC56+rGXaQOHfo+tshBuc929/KqgzsiGY9dkupJ2PIgdUwh8pw0oxEXCNyug==
[*] Request Info:
{"K":"NAVN6XZIFK3FNU44", "DI":"+th07Jntcvd3RIb9CnhQ", "P":"WIN"}
[*] Response Info:
{"K":"NAVN6XZIFK3FNU44","DI":"+th07Jntcvd3RIb9CnhQ","N":"lan","O":"lan","T":1574497681}
[*] Activation Code:
mWO8nXhK31HFTR4PJpea/2v0oeHNmBwSfmSjbb42ZhuqQRuj4Zqq+FjnXYAIp60OgI/L9JFUjrEb6u7AXFarVDJzVLYiGPIacD0uUVG+azHE86FKh4VyekxO
RKtHivokjqq6v+owtonQrOalF60FN/Xe8+8DBTObaIEIT3FGvIsIvoSDEv4KnxywQASDTL0c0L23rukCtbSngJ47CoAtYOejBWgFsbH+ATAPPyJZqxkRp8C7
F2uob7A8rMPkQU7bR+Jc7KIzok1JqvSraH3eBo+ZgNUyFQm0afSYBeJ7jEkD9u/Ns+qHc4X197y4L7XHi3gybdBPc+hvU91WmzHSKA==

复制注册码 回到Navicat,粘贴注册码

复制生成的这串字符串:

1
2
3
mWO8nXhK31HFTR4PJpea/2v0oeHNmBwSfmSjbb42ZhuqQRuj4Zqq+FjnXYAIp60OgI/L9JFUjrEb6u7AXFarVDJzVLYiGPIacD0uUVG+azHE86FKh4VyekxO
RKtHivokjqq6v+owtonQrOalF60FN/Xe8+8DBTObaIEIT3FGvIsIvoSDEv4KnxywQASDTL0c0L23rukCtbSngJ47CoAtYOejBWgFsbH+ATAPPyJZqxkRp8C7
F2uob7A8rMPkQU7bR+Jc7KIzok1JqvSraH3eBo+ZgNUyFQm0afSYBeJ7jEkD9u/Ns+qHc4X197y4L7XHi3gybdBPc+hvU91WmzHSKA==

粘贴到Navicat上的注册码输入框,就可以。

参考资料

https://github.com/DoubleLabyrinth/navicat-keygen/blob/windows/doc/how-to-use.windows.zh-CN.md

生成github token

以此点击github头像,选择Setting,然后下来到最后,选择Developer settings,然后选择最下面的Personal access tokens菜单,即可进入token设置页面。
或者点击如下链接,进入:

https://github.com/settings/tokens

下载安装PigGo

进入PicGo仓库然后点击

配置PigGo

详细配置见PigGo配置手册

Github图床配置

PigGo的Github图床配置有固定的格式:
仓库名格式为:用户名/仓库名
分支名设置为:master
Token设置为:上面获取到的token
存储路径可以随意,如设置为:img/
自定义域名格式为:

1
https://raw.githubusercontent.com/用户名/仓库名/分支名

这个默认的好像无法同步删除github上的图片,只能上传图片。所以安装picgo-plugin-github-plus

githubPlus插件配置

githubPlus可以同步相册,当在PigGo的相册中删除图片后,会同步删除github上的图片.

同步更新删除Github

插件设置的搜索框中,输入插件的名称:picgo-plugin-github-plus,然后安装这个插件.

配置githubPlus

这个插件的配置和上面的Github图片配置差不多一样.
图片

PigGo其他配置

上传快捷方式

图片_配置快捷方式

参考连接

PicGo仓库
PicGo插件库
picgo-plugin-github-plus仓库

cmd 解压缩WinRAR的命令行模式用法介绍

下载安装WinRAR

WinRAR.exe安装完后,从安装目录将主程序winRAR.exe拷贝出来即可,该程序是独立可运行的

WinRaR的命令行模式程序在安装目录下的rar.exe (打包压缩程序),unrar.exe(解压缩程序)

unrar.exe帮助文档

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
F:\Program Files\WinRAR>unrar.exe /?

UNRAR 5.71 x64 免费软件 版权所有 (C) 1993-2019 Alexander Roshal

用法: unrar <command> -<switch 1> -<switch N> <archive> <files...>
<@listfiles...> <path_to_extract\>

<Commands>
e 提取文件不带压缩路径
l[t[a],b] 列出压缩文档内容 [technical[all], bare]
p 打印文件到 stdout
t 测试压缩文档的文件
v[t[a],b] 详细列出压缩文档的内容 [technical[all],bare]
x 解压文件带完整路径

<Switches>
- 停止参数扫描
@[+] 禁用 [enable] 文件列表
ac 压缩或解压后清除压缩文档属性
ad 扩展压缩文档名称到目标路径
ag[format] 使用当前日期生成压缩文档名称
ai 忽略文件属性
ap<path> 设置压缩文档内部的路径
c- 禁用内容显示
cfg- 禁用读取配置
cl 转换名称为小写
cu 转换名称为大写
dh 打开共享的文件
ep 从名称里排除路径
ep3 扩展路径为完整路径包括驱动器盘符
f 刷新文件
id[c,d,p,q] 禁用消息
ierr 发送所有压缩文档到 stderr
inul 禁用所有消息
ioff[n] 完成一个操作后关闭电脑
kb 保留损坏的已解压文件
n<file> 额外管理器包含文件
n@ 从 stdin 读取额外的过滤器掩码
n@<list> 从列表文件读取额外的过滤器掩码
o[+|-] 设置覆盖模式
oc 设置 NTFS 压缩属性
ol[a] 将符号链接处理为链接 [absolute paths]
or 自动重命名文件
ow 保存或恢复文件拥有者和组
p[password] 设置密码
p- 不要查询密码
r 递归子目录
ri<P>[:<S>] 设置优先级 (0-默认,1-最小.15-最大) 和休眠时间单位为 ms
sc<chr>[obj] 指定字符集
sl<size> 处理小于指定大小的文件
sm<size> 处理大于指定大小的文件
ta[mcao]<d> 处理那些在日期 <d> YYYYMMDDHHMMSS 之后修改过的文件
tb[mcao]<d> 处理那些在日期 <d> YYYYMMDDHHMMSS 之前修改过的文件
tn[mcao]<t> 处理那些时间比 <t> 更新的文件
to[mcao]<t> 处理那些时间比 <t> 更老的文件
ts[m,c,a] 保存或恢复文件时间(修改日期,创建日期,访问日期)
u 更新文件
v 列出所有卷
ver[n] 文件版本控制
vp 每个卷之前暂停
x<file> 排除特定文件
x@ 读取文件名以便从 stdin 排除
x@<list> 排除在特定列表文件里列出的文件
y 对所有问题回答是

先这样,有空再研究

参考资料

https://www.cnblogs.com/fetty/p/4769279.html

帮助文档

1
2
3
4
5
6
7
G:\Desktop\测试\转换>rename /?
重命名文件。

rename [drive:][path]filename1 filename2.
ren [drive:][path]filename1 filename2.

请注意,你不能为目标文件指定新的驱动器或路径。

实例

查看当前目录下的所有文件:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
G:\Desktop\测试\转换>dir
驱动器 G 中的卷是 原来的C
卷的序列号是 0C02-061D

G:\Desktop\测试\转换 的目录

2019/11/22 10:58 <DIR> .
2019/11/22 10:58 <DIR> ..
2019/03/25 21:14 146,611,267 陶行知全集++第10卷__12523122_方明主编_四川教育出版社_2005.05.uvz
2018/12/06 20:42 156,103,271 陶行知全集++第10卷__12523123_方明主编_四川教育出版社_2005.05.uvz
2018/12/06 20:42 25,267,040 陶行知全集++第11卷_12523124_方明主编_四川教育出版社_2005.05.uvz
2018/12/06 20:43 36,004,323 陶行知全集++第12卷_12523125_方明主编_四川教育出版社_2005.05.uvz
2018/12/06 20:43 23,036,965 陶行知全集++第1卷_12523140_方明主编_四川教育出版社_2005.05.uvz
2018/12/06 20:44 20,494,827 陶行知全集++第2卷_12523141_方明主编_四川教育出版社_2005.05.uvz
2018/12/06 20:45 22,416,767 陶行知全集++第3卷_12523142_方明主编_四川教育出版社_2005.05.uvz
2018/12/06 20:45 23,548,054 陶行知全集++第4卷_12523143_方明主编_四川教育出版社_2005.05.uvz
2018/12/06 20:45 21,866,681 陶行知全集++第5卷_12523128_方明主编_四川教育出版社_2005.05.uvz
2018/12/06 20:46 22,036,824 陶行知全集++第6卷_12523129_方明主编_四川教育出版社_2005.05.uvz
2018/12/06 20:46 13,181,388 陶行知全集++第7卷_12523130_方明主编_四川教育出版社_2005.05.uvz
2018/12/06 20:46 17,464,226 陶行知全集++第8卷_12523131_方明主编_四川教育出版社_2005.05.uvz
2018/12/06 20:46 21,756,190 陶行知全集++第9卷_12523121_方明主编_四川教育出版社_2005.05.uvz
13 个文件 549,787,823 字节
2 个目录 218,458,599,424 可用字节

将当前目录下的所有.uvz文件转为.zip

1
G:\Desktop\测试\转换>rename *.uvz *.zip

转换效果

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
G:\Desktop\测试\转换>dir
驱动器 G 中的卷是 原来的C盘
卷的序列号是 0C02-061D

G:\Desktop\测试\转换 的目录

2019/11/22 11:04 <DIR> .
2019/11/22 11:04 <DIR> ..
2019/03/25 21:14 146,611,267 陶行知全集++第10卷_上_12523122_方明主编_四川教育出版社_2005.05.zip
2018/12/06 20:42 156,103,271 陶行知全集++第10卷_下_12523123_方明主编_四川教育出版社_2005.05.zip
2018/12/06 20:42 25,267,040 陶行知全集++第11卷_12523124_方明主编_四川教育出版社_2005.05.zip
2018/12/06 20:43 36,004,323 陶行知全集++第12卷_12523125_方明主编_四川教育出版社_2005.05.zip
2018/12/06 20:43 23,036,965 陶行知全集++第1卷_12523140_方明主编_四川教育出版社_2005.05.zip
2018/12/06 20:44 20,494,827 陶行知全集++第2卷_12523141_方明主编_四川教育出版社_2005.05.zip
2018/12/06 20:45 22,416,767 陶行知全集++第3卷_12523142_方明主编_四川教育出版社_2005.05.zip
2018/12/06 20:45 23,548,054 陶行知全集++第4卷_12523143_方明主编_四川教育出版社_2005.05.zip
2018/12/06 20:45 21,866,681 陶行知全集++第5卷_12523128_方明主编_四川教育出版社_2005.05.zip
2018/12/06 20:46 22,036,824 陶行知全集++第6卷_12523129_方明主编_四川教育出版社_2005.05.zip
2018/12/06 20:46 13,181,388 陶行知全集++第7卷_12523130_方明主编_四川教育出版社_2005.05.zip
2018/12/06 20:46 17,464,226 陶行知全集++第8卷_12523131_方明主编_四川教育出版社_2005.05.zip
2018/12/06 20:46 21,756,190 陶行知全集++第9卷_12523121_方明主编_四川教育出版社_2005.05.zip
13 个文件 549,787,823 字节
2 个目录 218,458,599,424 可用字节

div元素和span元素

相同点

divspan都可以将HTML元素组合起来,类似一个盒子将里面的内容当作一个整体来处理,从而实现整体作用效果,提高效率。

不同点

div块级元素,是可用于组合其他HTML元素的容器,其常用的用途是文档布局,主要用于页面的排版。
span内联元素(行内元素),主要用于容纳文字。span只是把内容定义成一个整体进行操作,不影响布局和显示,而且span没有什么实用特性,它的作用便是围绕HTML代码中的其他元素,为其指定样式。

块级元素和内联元素的转换

  • 给块元素定义display:inline,块元素便成为了内嵌元素,
  • 给内嵌元素定义display:block就成为了块元素。

参考资料

https://blog.csdn.net/glyly555/article/details/80408890

div元素和span元素

相同点

divspan都可以将HTML元素组合起来,类似一个盒子将里面的内容当作一个整体来处理,从而实现整体作用效果,提高效率。

不同点

div块级元素,是可用于组合其他HTML元素的容器,其常用的用途是文档布局,主要用于页面的排版。
span内联元素(行内元素),主要用于容纳文字。span只是把内容定义成一个整体进行操作,不影响布局和显示,而且span没有什么实用特性,它的作用便是围绕HTML代码中的其他元素,为其指定样式。

块级元素和内联元素的转换

  • 给块元素定义display:inline,块元素便成为了内嵌元素,
  • 给内嵌元素定义display:block就成为了块元素。

参考资料

https://blog.csdn.net/glyly555/article/details/80408890

首先引入样式和js

使用下拉列表需要使用JS

1
2
<link href="https://cdn.bootcss.com/Buttons/2.0.0/css/buttons.min.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/Buttons/2.0.0/js/buttons.min.js"></script>

使用样式

在html标签上添加特定的class即可应用样式.

形状

1
2
3
4
5
6
7
8
<div class="showcase-examples l-center">
<button class="button">默认</button>
<button class="button button-rounded">圆角正方</button>
<button class="button button-pill">圆角</button>
<button class="button button-square">正方</button>
<button class="button button-box">盒子</button>
<button class="button button-circle"></button>
</div>

颜色

1
2
3
4
5
6
7
8
<div class="showcase-examples l-center">
<button class="button">Go</button>
<button class="button button-primary">Go</button>
<button class="button button-action">Go</button>
<button class="button button-highlight">Go</button>
<button class="button button-caution">Go</button>
<button class="button button-royal">Go</button>
</div>

大小

1
2
3
4
5
6
7
8
<div class="showcase-examples l-center">
<button class="button button-primary button-rounded button-tiny">Go</button>
<button class="button button-primary button-rounded button-small">Go</button>
<button class="button button-primary button-rounded">Go</button>
<button class="button button-primary button-rounded button-large">Go</button>
<button class="button button-primary button-rounded button-jumbo">Go</button>
<button class="button button-primary button-rounded button-giant">Go</button>
</div>

透明按钮

1
2
3
4
5
6
7
<div class="showcase-examples l-center" style="background: #ffff00;">
<button class="button button-plain button-border">透明按钮</button>
<button class="button button-plain button-border button-circle"><i class="fa fa-reply"></i></button>
<button class="button button-plain button-border button-box"><i class="fa fa-star"></i></button>
<button class="button button-plain button-border button-square"><i class="fa fa-trash-o"></i></button>
<button class="button button-plain button-borderless"><i class="fa fa-tag"></i></button>
</div>

3D按钮

1
2
3
4
5
6
7
8
<div class="showcase-examples l-center">
<button class="button button-3d button-box button-jumbo"><i class="fa fa-thumbs-up"></i></button>
<button class="button button-3d button-primary button-rounded">Check out the new site!</button>
<button class="button button-3d button-action button-pill">Visit Us!</button>
<button class="button button-3d button-action button-circle button-jumbo"><i class="fa fa-thumbs-up"></i></button>
<button class="button button-3d button-caution"><i class="fa fa-camera"></i>Go</button>
<button class="button button-3d button-royal">Say Hi!</button>
</div>

突起按钮

1
2
3
4
5
6
7
<div class="showcase-examples l-center">
<button class="button button-raised button-primary button-pill">Visit Us!</button>
<button class="button button-raised button-action button-circle button-jumbo"><i class="fa fa-thumbs-up"></i></button>
<button class="button button-raised button-caution"><i class="fa fa-camera"></i> Go</button>
<button class="button button-raised button-royal">Say Hi!</button>
<button class="button button-raised button-pill button-inverse">Say Hi!</button>
</div>

长阴影

1
2
3
4
5
6
7
<div class="showcase-examples l-center l-longshadows">
<button class="button button-primary button-box button-giant button-longshadow-right"><i class="fa fa-twitter"></i></button>
<button class="button button-caution button-box button-raised button-giant button-longshadow"><i class="fa fa-google-plus"></i></button>
<button class="button button-action button-box button-giant button-longshadow-left"><i class="fa fa-share-alt"></i></button>
<button class="button button-highlight button-box button-giant button-longshadow-right button-longshadow-expand"><i class="fa fa-rss"></i></button>
<button class="button button-primary button-circle button-giant button-longshadow"><i class="fa fa-gear"></i></button>
</div>

光晕效果

1
2
3
4
5
6
7
8
<div class="showcase-examples l-over l-center">
<button class="button button-glow button-rounded button-raised button-primary">Go</button>
<button class="button button-glow button-border button-rounded button-primary">Go</button>
<button class="button button-glow button-circle button-action button-jumbo"><i class="fa fa-thumbs-up"></i></button>
<button class="button button-glow button-rounded button-highlight">Go</button>
<button class="button button-glow button-rounded button-caution">Go</button>
<button class="button button-glow button-rounded button-royal">Go</button>
</div>

带下拉菜单的按钮

当按钮被点击时会出现一个下拉菜单

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<div class="showcase-examples l-center">
<span class="button-dropdown" data-buttons="dropdown">
<button class="button button-rounded">
Select Me <i class="fa fa-caret-down"></i>
</button>
<ul class="button-dropdown-list">
<li><a href="#带下拉菜单的按钮">Option Link 1</a></li>
<li><a href="#带下拉菜单的按钮">Option Link 2</a></li>
<li class="button-dropdown-divider">
<a href="#带下拉菜单的按钮">Option Link 3</a>
</li>
</ul>
</span>
<span class="button-dropdown button-dropdown-primary" data-buttons="dropdown">
<button class="button button-primary button-large">
<i class="fa fa-bars"></i> Select Me
</button>
<ul class="button-dropdown-list is-below">
<li><a href="#带下拉菜单的按钮"><i class="fa fa-heart-o"></i> Option Link 1</a></li>
<li><a href="#带下拉菜单的按钮">Option Link 2</a></li>
<li class="button-dropdown-divider">
<a href="#带下拉菜单的按钮">Option Link 3</a>
</li>
</ul>
</span>
<span class="button-dropdown button-dropdown-action" data-buttons="dropdown">
<button class="button button-action">
Select Me <i class="fa fa-caret-up"></i>
</button>
<ul class="button-dropdown-list is-above">
<li><a href="#带下拉菜单的按钮">Option Link 1</a></li>
<li><a href="#带下拉菜单的按钮">Option Link 2</a></li>
<li class="button-dropdown-divider">
<a href="#带下拉菜单的按钮">Option Link 3</a>
</li>
</ul>
</span>
<span class="button-dropdown button-dropdown-plain" data-buttons="dropdown">
<button class="button button-caution button-pill">
Select Me <i class="fa fa-caret-down"></i>
</button>
<ul class="button-dropdown-list">
<li><a href="#带下拉菜单的按钮">Option Link 1</a></li>
<li class="button-dropdown-divider">
<a href="#带下拉菜单的按钮">Option Link 2</a>
</li>
<li>
<a href="#带下拉菜单的按钮">Option Link 3</a>
</li>
</ul>
</span>
<span class="button-dropdown button-dropdown-inverse" data-buttons="dropdown">
<a href="#带下拉菜单的按钮" class="button button-inverse">
<i class="fa fa-envelope"></i> Select Me <i class="fa fa-caret-down"></i>
</a>
<ul class="button-dropdown-list is-below">
<li><a href="#带下拉菜单的按钮">Option Link 1</a></li>
<li class="button-dropdown-divider">
<a href="#带下拉菜单的按钮">Option Link 2</a>
</li>
<li>
<a href="#带下拉菜单的按钮">Option Link 3</a>
</li>
</ul>
</span>
</div>

效果

按钮组

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<span class="showcase-examples l-center">
<span class="button-group">
<button type="button" class="button button-primary">Option 1</button>
<button type="button" class="button button-primary">Option 2</button>
<button type="button" class="button button-primary">Option 3</button>
<!-- DROPDOWN MENU -->
<span class="button-dropdown button-dropdown-primary" data-buttons="dropdown">
<a href="#" class="button button-primary"> Select Me <i class="fa fa-caret-down"></i></a>
<ul class="button-dropdown-list is-below">
<li><a href="#按钮组">Option Link 1</a></li>
<li><a href="#按钮组">Option Link 2</a></li>
<li class="button-dropdown-spanider"><a href="#">Option Link 3</a></li>
</ul>
</span>
</span>
<span class="button-group">
<button type="button" class="button button-pill button-action">Option 1</button>
<button type="button" class="button button-pill button-action">Option 2</button>
<button type="button" class="button button-pill button-action">Option 3</button>
</span>
<span class="button-group">
<button type="button" class="button button-royal button-rounded button-raised">Option 1</button>
<button type="button" class="button button-royal button-rounded button-raised">Option 2</button>
<button type="button" class="button button-royal button-rounded button-raised">Option 3</button>
</span>
</span>

效果

Select Me

堆叠按钮

block 级别的按钮会占据最大宽度

1
2
3
4
5
6
7
8
<div class="showcase-examples l-center" style="width: 100%;">
<button class="button button-block button-rounded button-large">Go</button>
<button class="button button-block button-rounded button-primary button-large">Go</button>
<button class="button button-block button-rounded button-action button-large">Go</button>
<button class="button button-block button-rounded button-highlight button-large">Go</button>
<button class="button button-block button-rounded button-caution button-large">Go</button>
<button class="button button-block button-rounded button-royal button-large">Go</button>
</div>

效果

额外的环绕效果

为按钮周围增加额外视觉效果能够突出按钮

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<div class="showcase-examples l-center">
<span class="button-wrap">
<button class="button button-circle">
<i class="fa fa-cloud"></i>
</button>
</span>
<span class="button-wrap">
<button class="button button-circle button-raised button-primary">
<i class="fa fa-cloud"></i>
</button>
</span>
<span class="button-wrap">
<a href="#额外的环绕效果" class="button button-pill ">Go</a>
</span>
<span class="button-wrap">
<a href="#额外的环绕效果" class="button button-pill button-raised button-primary">Go</a>
</span>
</div>

效果

Go Go

表单按钮

Buttons 作为表单元素也是非常棒的

1
2
3
4
5
6
7
8
9
<div class="showcase-examples l-center">
<input type="submit" value="Go" class="button button-pill button-primary">
<button class="button button-pill button-primary">Go</button>
<!-- DISABLED BUTTONS -->
<input disabled="" type="submit" value="Go" class="button button-pill button-primary">
<button disabled="" class="button button-pill button-primary">Go</button>
<button disabled="" class="button button-pill button-flat-primary">Go</button>
<a href="#" class="button disabled button-pill button-primary ">Go</a>
</div>

效果

Go

各种文字样式

按钮中的文本可以有多种样式

1
2
3
4
5
6
<div class="showcase-examples l-center">
<a href="#各种文字样式" class="button button-uppercase button-primary">uppercase</a>
<a href="#各种文字样式" class="button button-lowercase button-primary ">lowercase</a>
<a href="#各种文字样式" class="button button-capitalize button-primary">capitalize</a>
<a href="#各种文字样式" class="button button-small-caps button-primary">small caps</a>
</div>

效果

参考资料

https://www.bootcss.com/p/buttons/
https://www.bootcdn.cn/Buttons/
https://blog.csdn.net/wangjiaohome/article/details/49761169

Git SSH配置过程

配置邮箱和用户名

配置邮箱

1
git config --global user.email "your_email@example.com"

例如我的邮箱:

1
git config --global user.email "18251956727@163.com"

配置用户名

1
git config --global user.name "your_name"
1
git config --global user.name "lanlan2017"

查看效果

1
git config --global  --list
1
2
3
4
5
Administrator@DESKTOP-8ISAT6B MINGW64 /e/Blog
$ git config --global --list
core.quotepath=false
user.email=18251956727@163.com
user.name=lanlan2017

生成密钥对

生成默认长度的密钥对

1
ssh-keygen -t rsa -C "18251956727@163.com"

生成指定长度的密钥对

1
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

添加key到SSH

1
ssh-add 私钥文件名
1
ssh-add id_rsa

解决 Could not open a connection to your authentication agent

如果出现如下错误:

1
2
3
lan@DESKTOP-8ISAT6B MINGW64 ~/.ssh
$ ssh-add id_rsa
Could not open a connection to your authentication agent.

则先执行如下命令

1
ssh-agent bash

然后再次执行:

1
ssh-add id_rsa

即可

添加成功效果

1
2
$ ssh-add id_rsa
Identity added: id_rsa (xxxxxxx@xxxx.com)

将公钥添加到Github上

1
cat id_rsa.pub

然后复制,然后浏览器上进入GitHub网站。
点击github网站右上方头像,然后选择Setting,在Account settings栏中选择SSH and GPG keys,然后点击右上方的New SSH key按钮。
然后在Title输入框中输入公钥的名称。在Key文本域中输入上面的公钥(id_rsa.pub)的内容

测试链接是否成功

进入一个之前的git本地仓库,输入如下命令测试连接:

1
ssh -T git@github.com

如果有如下输出,则表示公钥已经设置好,SSH连接正常。

1
2
3
lan@DESKTOP-8ISAT6B MINGW64 /e/Blog/blog9 (master)
$ ssh -T git@github.com
Hi xxx! You've successfully authenticated, but GitHub does not provide shell access.

使用SSH推送远程仓库

1
2
3
git add .
git commit -m '测试SSH推送'
git push origin master

这个时候就可以直接推送到远程仓库了.不再需要输入用户名和密码.

SSH推送有问题

如果这个时候还需要输入密码,这表示上面的步骤有问题.

你可能没有开启ssh-agent

你可以先需要输入如下命令

1
ssh-agent bash

再试着推送

1
git push origin master

你可能的远程仓库地址时HTTPS的不是SSH地址

如果ssh-agent也开启了,密钥设置的也没有问题,push的时候还是要求登录密码,那你可能用的时HTTPS的仓库地址

查看远程仓库地址

1
git remote -v
1
2
3
4
lan@DESKTOP-8ISAT6B MINGW64 /e/Blog/blog10 (master)
$ git remote -v
origin https://github.com/lanlan2017/JavaReadingNotes.git (fetch)
origin https://github.com/lanlan2017/JavaReadingNotes.git (push)

删除远程仓库地址

1
git remote rm origin

重新添加SSH地址

1
git remote add origin git@github.com:lanlan2017/JavaReadingNotes.git

这样就可以直接push了:

1
2
3
4
5
6
7
8
9
10
11
12
lan@DESKTOP-8ISAT6B MINGW64 /e/Blog/blog10 (master)
$ git push origin master
Enumerating objects: 18, done.
Counting objects: 100% (18/18), done.
Delta compression using up to 4 threads
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 6.94 KiB | 3.47 MiB/s, done.
Total 11 (delta 6), reused 0 (delta 0)
remote: Resolving deltas: 100% (6/6), completed with 6 local objects.
To github.com:lanlan2017/JavaReadingNotes.git
58370ef..1f87f16 master -> master

如果还不行,则按上面的步骤重新操作一遍。

参考资料

https://blog.csdn.net/hx1298234467/article/details/53576826
https://www.cnblogs.com/yangshifu/p/9919817.html
https://www.cnblogs.com/e-cat/p/10862208.html