Skip to content

Commit 45ada95

Browse files
committed
update
1 parent e8f36d7 commit 45ada95

29 files changed

+814
-172
lines changed

database/code/JDBC/.idea/workspace.xml

Lines changed: 117 additions & 172 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
1.46 KB
Binary file not shown.
1.66 KB
Binary file not shown.

database/code/JDBC/src/Test.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import java.sql.Connection;
2+
import java.sql.DriverManager;
3+
import java.sql.PreparedStatement;
4+
5+
public class Test {
6+
public static void main(String[] args) throws Exception{
7+
Class.forName("com.mysql.jdbc.Driver");
8+
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/db1","root","123456");
9+
PreparedStatement pstmt = conn.prepareStatement("insert into psn values(?,?)");
10+
for (int i = 0; i < 20000; i++) {
11+
pstmt.setInt(1,i);
12+
pstmt.setString(2,i+"");
13+
pstmt.addBatch();
14+
}
15+
pstmt.executeBatch();
16+
conn.close();
17+
}
18+
}

database/code/JDBC/src/Test2.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import java.sql.Connection;
2+
import java.sql.DriverManager;
3+
import java.sql.PreparedStatement;
4+
5+
public class Test2 {
6+
public static void main(String[] args) throws Exception{
7+
long starttime = System.currentTimeMillis();
8+
Class.forName("com.mysql.jdbc.Driver");
9+
Connection conn = DriverManager.getConnection("jdbc:mysql://192.168.85.111:3306/sakila","root","123456");
10+
PreparedStatement pstmt = conn.prepareStatement("insert into userinfo(name) values(?)");
11+
for (int i = 0; i < 1000000; i++) {
12+
pstmt.setString(1,i+"");
13+
pstmt.addBatch();
14+
}
15+
pstmt.executeBatch();
16+
conn.close();
17+
System.out.println(System.currentTimeMillis()-starttime);
18+
}
19+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Document</title>
9+
</head>
10+
11+
<body>
12+
</body>
13+
14+
</html>
15+
<script>
16+
//这里面是要书写JS语法的地方
17+
alert("Hello word");
18+
</script>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Document</title>
9+
</head>
10+
11+
<body>
12+
13+
</body>
14+
15+
</html>
16+
<script>
17+
//单行注释
18+
/*
19+
多行注释:可以写多行注释给同事们看
20+
工作当中尽量养成这个习惯
21+
*/
22+
//JS字符串:人说的话,务必加上双引号、单引号
23+
alert("我是祖国未来");
24+
alert("我们希望我们将来很好");
25+
alert('希望听贾老师的课程你们有收获');
26+
</script>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Document</title>
9+
</head>
10+
11+
<body>
12+
13+
</body>
14+
15+
</html>
16+
<script>
17+
//提示框
18+
prompt("姑娘你的芳龄");
19+
prompt("小小兄弟你回家了吗", 66666);
20+
</script>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Document</title>
9+
</head>
10+
11+
<body>
12+
13+
</body>
14+
15+
</html>
16+
<script>
17+
//控制台打印数据
18+
console.log("我在控制台中打印数据,你看不见我");
19+
console.log(12306);
20+
</script>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Document</title>
9+
</head>
10+
11+
<body>
12+
13+
</body>
14+
15+
</html>
16+
<script>
17+
//字符串(String):字符串即为人说的话【务必加上双引号、单引号】
18+
console.log("我爱你JS");
19+
console.log("最近快过年了,回家要胖五进");
20+
//数字类型(Number):咱们小学学习数字
21+
console.log(100);
22+
console.log(-4.14);
23+
console.log(123456789);
24+
//布尔类型数值:true、false
25+
console.log(true);
26+
console.log(false);
27+
//未定类型数据
28+
console.log(undefined);
29+
//空对象类型
30+
console.log(null);
31+
</script>
32+
<script>
33+
//JS当中有一个关键字typeof可以检测数据类型
34+
console.log(typeof 123);
35+
console.log(typeof true);
36+
console.log(typeof undefined);
37+
</script>

0 commit comments

Comments
 (0)