当前位置:网站首页>JDBC快速入門教程
JDBC快速入門教程
2022-06-12 17:41:00 【*夜幕星河℡】
主要內容
- JDBC使用
- JDBC工具類
- JDBC控制事務
教學目標
- 能够理解JDBC的概念
- 能够使用DriverManager 類
- 能够使用 Connection 接口
- 能够使用 Statement 接口
- 能够使用 ResultSet 接口
- 能够說出 SQL 注入原因和解决方案
- 能够通過 PreparedStatement 完成增、删、改、查
- 能够完成 PreparedStatement 改造登錄案例
JDBC
概念
Java DataBase Connectivity Java 數據庫連接, Java語言操作數據庫
本質
其實是官方(sun公司)定義的一套操作所有關系型數據庫的規則,即接口。
各個數據庫生產商去實現這套接口,提供數據庫驅動jar包。
我們可以使用這套接口(JDBC)編程,真正執行的代碼是驅動jar包中的實現類。
好處
1) 程序員如果要開發訪問數據庫的程序,只需要會調用 JDBC 接口中的方法即可,不用關注類是如何實現的。
2) 使用同一套 Java 代碼,進行少量的修改就可以訪問其他 JDBC 支持的數據庫

快速入門
步驟
* 步驟:
1. 導入驅動jar包 mysql-connector-java-5.1.37-bin.jar
1.在項目中創建libs目錄
2.複制mysql-connector-java-5.1.37-bin.jar到項目的libs目錄下
3.在libs目錄下選中需要添加的jar包,然後右鍵-->Bulid Path-->Add to Build Path
2. 注册驅動
3. 獲取數據庫連接對象 Connection
4. 定義sql
5. 獲取執行sql語句的對象 Statement
6. 執行sql,接受返回結果
7. 處理結果
8. 釋放資源
詳解各個核心對象
1. DriverManager
DriverManager:驅動管理對象
* 功能:
1. 注册驅動:告訴程序該使用哪一個數據庫驅動jar
static void registerDriver(Driver driver) :注册與給定的驅動程序 DriverManager 。
寫代碼使用: Class.forName("com.mysql.jdbc.Driver");
通過查看源碼發現:在com.mysql.jdbc.Driver類中存在靜態代碼塊
static {
try {
java.sql.DriverManager.registerDriver(new Driver());
} catch (SQLException E) {
throw new RuntimeException("Can't register driver!");
}
}
注意:mysql5之後的驅動jar包可以省略注册驅動的步驟。
2. 獲取數據庫連接:
* 方法:static Connection getConnection(String url, String user, String password)
* 參數:
* url:指定連接的路徑
* 語法:jdbc:mysql://ip地址(域名):端口號/數據庫名稱
* 例子:jdbc:mysql://localhost:3306/db3
* 細節:如果連接的是本機mysql服務器,並且mysql服務默認端口是3306,則url可以簡寫為:jdbc:mysql:///數據庫名稱
* user:用戶名
* password:密碼
2. Connection
Connection:數據庫連接對象
1. 功能:
1. 獲取執行sql 的對象
* Statement createStatement()
* PreparedStatement prepareStatement(String sql)
2. 管理事務:
* 開啟事務:setAutoCommit(boolean autoCommit) :調用該方法設置參數為false,即開啟事務
* 提交事務:commit()
* 回滾事務:rollback()
3. Statement
1. 執行sql
1. boolean execute(String sql) :可以執行任意的sql 了解
2. int executeUpdate(String sql) :執行DML(insert、update、delete)語句、DDL(create,alter、drop)語句
* 返回值:影響的行數,可以通過這個影響的行數判斷DML語句是否執行成功 返回值>0的則執行成功,反之,則失敗。
3. ResultSet executeQuery(String sql) :執行DQL(select)語句
練習:
1.student錶 添加一條記錄
2. student錶 修改記錄
3. student錶 删除一條記錄
//加載驅動,連接數據庫,釋放資源
package com.zhibang.utils;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Properties;
/** * 加載驅動,連接數據庫,釋放資源 * @author 雨落星辰 * */
public class Utils {
private static String driver = "com.mysql.jdbc.Driver";//加載驅動包
private static String url = "jdbc:mysql://localhost:3306/girls";//連接數據庫 localhost為本地id girls為數據庫錶名
private static String urname = "root";//用戶名
private static String pass = "3306";//密碼
/** * 加載驅動包 */
static {
try {
Class.forName(driver);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/** * 連接數據庫 * @return */
public static Connection getConnection() {
Connection con = null;
try {
con = DriverManager.getConnection(url,urname,pass);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return con;
}
/** * 釋放 Connection,PreparedStatement,ResultSet 資源 * @param con * @param ps * @param rst */
public static void close(Connection con,PreparedStatement ps,ResultSet res) {
try {
if(con!=null) {
con.close();
}
if(ps!=null) {
ps.close();
}
if(res!=null) {
res.close();
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/** * 釋放 Connection,PreparedStatement 資源 * @param con * @param ps */
public static void close_1(Connection con,PreparedStatement ps) {
try {
if(con!=null) {
con.close();
}
if(ps!=null) {
ps.close();
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
//學生類
package com.zhibang.student;
/** * 錶數據 * @author 雨落星辰 * */
public class student {
private int id;//學號
private String uname;//用戶名
private String psw;//密碼
public student() {
}
public student(int id2, String uname, String psw) {
super();
this.id = id2;
this.uname = uname;
this.psw = psw;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUname() {
return uname;
}
public void setUname(String uname) {
this.uname = uname;
}
public String getPsw() {
return psw;
}
public void setPsw(String psw) {
this.psw = psw;
}
@Override
public String toString() {
return "student [id=" + id + ", uname=" + uname + ", psw=" + psw + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + id;
result = prime * result + ((psw == null) ? 0 : psw.hashCode());
result = prime * result + ((uname == null) ? 0 : uname.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
student other = (student) obj;
if (id != other.id)
return false;
if (psw == null) {
if (other.psw != null)
return false;
} else if (!psw.equals(other.psw))
return false;
if (uname == null) {
if (other.uname != null)
return false;
} else if (!uname.equals(other.uname))
return false;
return true;
}
}
- student錶 添加一條記錄
//拿起你金貴的手邊聽課邊實現
public static int getinsert(student st) {
String sql = "INSERT INTO admin(`username`,`password`) VALUES ('"+ st.getUname() +"','"+ st.getPsw() +"')";
int n = 0;
try {
con = Utils.getConnection();
ps = con.prepareStatement(sql);
n = ps.executeUpdate();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
Utils.close_1(con, ps);
}
return n;
}
- student錶 修改記錄
//拿起你金貴的手邊聽課邊實現
public static int getupdate(student st) {
String sql = "UPDATE admin SET `password`='"+ st.getPsw() +"' WHERE id="+ st.getId() +"";
int n = 0;
try {
con = Utils.getConnection();
ps = con.prepareStatement(sql);
n = ps.executeUpdate();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
Utils.close_1(con, ps);
}
return n;
}
- student錶 删除一條記錄
//拿起你金貴的手邊聽課邊實現
public static int getdelect(student st) {
String sql = "DELETE FROM admin WHERE id="+ st.getId() +"";
int n = 0;
try {
con = Utils.getConnection();
ps = con.prepareStatement(sql);
n = ps.executeUpdate();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
Utils.close_1(con, ps);
}
return n;
}
- 執行DDL語句
//拿起你金貴的手邊聽課邊實現
//添加
student st = new student();
st.setUname("ccc");
st.setPsw("244542");
int n = UserDao.getinsert(st);
if(n>0) {
System.out.println("提交成功");
}else {
System.out.println("提交失敗");
}
//修改
student st = new student();
st.setId(1);
st.setPsw("2113");
int n = UserDao.getupdate(st);
if(n>0) {
System.out.println("提交成功");
}else {
System.out.println("提交失敗");
}
//删除
student st = new student();
st.setId(6);
int n = UserDao.getdelect(st);
if(n>0) {
System.out.println("提交成功");
}else {
System.out.println("提交失敗");
}
4. ResultSet
* boolean next(): 遊標向下移動一行,判斷當前行是否是最後一行末尾(是否有數據),如果是,則返回false,如果不是則返回true
* getXxx(參數):獲取數據
* Xxx:代錶數據類型 如: int getInt() , String getString()
* 參數:
1. int:代錶列的編號,從1開始 如: getString(1)
2. String:代錶列名稱。 如: getDouble("balance")
* 注意:
* 使用步驟:
1. 遊標向下移動一行
2. 判斷是否有數據
3. 獲取數據
//循環判斷遊標是否是最後一行末尾。
while(rs.next()){
//獲取數據
//6.2 獲取數據
int id = rs.getInt(1);
String name = rs.getString("name");
double balance = rs.getDouble(3);
System.out.println(id + "---" + name + "---" + balance);
}

* 練習:
* 定義一個方法,查詢student錶的數據將其封裝為對象,然後裝載集合,返回。
1. 定義student類
2. 定義方法 public List<student> findAll(){}
3. 實現方法 select * from student;
//加載驅動,連接數據庫,釋放資源
package com.zhibang.utils;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Properties;
/** * 加載驅動,連接數據庫,釋放資源 * @author 雨落星辰 * */
public class Utils {
private static String driver = "com.mysql.jdbc.Driver";//加載驅動包
private static String url = "jdbc:mysql://localhost:3306/girls";//連接數據庫 localhost為本地id girls為數據庫錶名
private static String urname = "root";//用戶名
private static String pass = "3306";//密碼
/** * 加載驅動包 */
static {
try {
Class.forName(driver);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/** * 連接數據庫 * @return */
public static Connection getConnection() {
Connection con = null;
try {
con = DriverManager.getConnection(url,urname,pass);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return con;
}
/** * 釋放 Connection,PreparedStatement,ResultSet 資源 * @param con * @param ps * @param rst */
public static void close(Connection con,PreparedStatement ps,ResultSet res) {
try {
if(con!=null) {
con.close();
}
if(ps!=null) {
ps.close();
}
if(res!=null) {
res.close();
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/** * 釋放 Connection,PreparedStatement 資源 * @param con * @param ps */
public static void close_1(Connection con,PreparedStatement ps) {
try {
if(con!=null) {
con.close();
}
if(ps!=null) {
ps.close();
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
實現代碼(student類):
//拿起你金貴的手邊聽課邊實現
package com.zhibang.student;
/** * 錶數據 * @author 雨落星辰 * */
public class student {
private int id;//學號
private String uname;//用戶名
private String psw;//密碼
public student() {
}
public student(int id2, String uname, String psw) {
super();
this.id = id2;
this.uname = uname;
this.psw = psw;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUname() {
return uname;
}
public void setUname(String uname) {
this.uname = uname;
}
public String getPsw() {
return psw;
}
public void setPsw(String psw) {
this.psw = psw;
}
@Override
public String toString() {
return "student [id=" + id + ", uname=" + uname + ", psw=" + psw + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + id;
result = prime * result + ((psw == null) ? 0 : psw.hashCode());
result = prime * result + ((uname == null) ? 0 : uname.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
student other = (student) obj;
if (id != other.id)
return false;
if (psw == null) {
if (other.psw != null)
return false;
} else if (!psw.equals(other.psw))
return false;
if (uname == null) {
if (other.uname != null)
return false;
} else if (!uname.equals(other.uname))
return false;
return true;
}
}
實現代碼(讀取類)
//拿起你金貴的手邊聽課邊實現
public static List<student> getselect() {
String sql="select * from student";
List<student> li = new ArrayList<student>();
try {
con = Utils.getConnection();
ps = con.prepareStatement(sql);
res = ps.executeQuery();
while (res.next()) {
int id = res.getInt("id");
String uname = res.getNString("username");
String psw = res.getString("password");
li.add(new student(id, uname, psw));
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
Utils.close(con, ps, res);
}
return li;
}
5. PreparedStatement
1. SQL注入問題:在拼接sql時,有一些sql的特殊關鍵字參與字符串的拼接。會造成安全性問題
1. 輸入用戶隨便,輸入密碼:a' or 'a' = 'a
2. sql:select * from user where username = 'fhdsjkf' and password = 'a' or 'a' = 'a'
2. 解决sql注入問題:使用PreparedStatement對象來解决
3. 預編譯的SQL:參數使用?作為占比特符
4. 步驟:
1. 導入驅動jar包 mysql-connector-java-5.1.37-bin.jar
2. 注册驅動
3. 獲取數據庫連接對象 Connection
4. 定義sql
* 注意:sql的參數使用?作為占比特符。 如:select * from user where username = ? and password = ?;
5. 獲取執行sql語句的對象 PreparedStatement Connection.prepareStatement(String sql)
6. 給?賦值:
* 方法: setXxx(參數1,參數2)
* 參數1:?的比特置編號 從1 開始
* 參數2:?的值
7. 執行sql,接受返回結果,不需要傳遞sql語句
8. 處理結果
9. 釋放資源
5. 注意:後期都會使用PreparedStatement來完成增删改查的所有操作
1. 可以防止SQL注入
2. 效率更高
抽取JDBC工具類 : JDBCUtils
說明
* 目的:簡化書寫
* 分析:
1. 注册驅動也叫抽取
2. 抽取一個方法獲取連接對象
* 需求:不想傳遞參數(麻煩),還得保證工具類的通用性。
* 解决:配置文件
jdbc.properties
url=
user=
password=
3. 抽取一個方法釋放資源
具體實現
注册驅動
public class JDBCUtils {
private static String url;
private static String user;
private static String password;
private static String driver;
/** * 文件的讀取,只需要讀取一次即可拿到這些值。使用靜態代碼塊 */
static{
//讀取資源文件,獲取值。
try {
//1. 創建Properties集合類。
Properties pro = new Properties();
//獲取src路徑下的文件的方式--->ClassLoader 類加載器
ClassLoader classLoader = JDBCUtils.class.getClassLoader();
URL res = classLoader.getResource("jdbc.properties");
String path = res.getPath();
System.out.println(path);
//2. 加載文件
// pro.load(new FileReader("E:\\eclipse-workspace\\First\\src\\jdbc.properties"));
pro.load(new FileReader(path));
//3. 獲取數據,賦值
url = pro.getProperty("url");
user = pro.getProperty("user");
password = pro.getProperty("password");
driver = pro.getProperty("driver");
//4. 注册驅動
Class.forName(driver);
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
}
// IO流的方式加載properties文件
InputStream inputStream = ClassLoader.getSystemResourceAsStream("/jdbc.properties");
// InputStream inputStream = LoadPropertiesFile.class.getResourceAsStream("/jdbc.properties");
Properties prop = new Properties();
prop.load(inputStream);
抽取一個方法獲取連接對象
/** * 獲取連接 * @return 連接對象 */
public static Connection getConnection() throws SQLException {
return DriverManager.getConnection(url, user, password);
}
/** * 釋放資源 * @param stmt * @param conn */
public static void close(Statement stmt,Connection conn){
if( stmt != null){
try {
stmt.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
if( conn != null){
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
抽取一個方法釋放資源
/** * 釋放資源 * @param stmt * @param conn */
public static void close(ResultSet rs,Statement stmt, Connection conn){
if( rs != null){
try {
rs.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
if( stmt != null){
try {
stmt.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
if( conn != null){
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
}
練習
* 練習:
* 需求:
1. 通過鍵盤錄入用戶名和密碼
2. 判斷用戶是否登錄成功
* select * from user where username = "" and password = "";
* 如果這個sql有查詢結果,則成功,反之,則失敗
* 步驟:
1. 創建數據庫錶 user
CREATE TABLE USER(
id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(32),
PASSWORD VARCHAR(32)
);
INSERT INTO USER VALUES(NULL,'zhangsan','123');
INSERT INTO USER VALUES(NULL,'lisi','234');
2. 代碼實現
代碼實現
//加載驅動,連接數據庫,釋放資源
package com.zhibang.utils;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Properties;
/** * 加載驅動,連接數據庫,釋放資源 * @author 雨落星辰 * */
public class Utils {
private static String driver = "com.mysql.jdbc.Driver";//加載驅動包
private static String url = "jdbc:mysql://localhost:3306/girls";//連接數據庫 localhost為本地id girls為數據庫錶名
private static String urname = "root";//用戶名
private static String pass = "3306";//密碼
/** * 加載驅動包 */
static {
try {
Class.forName(driver);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/** * 連接數據庫 * @return */
public static Connection getConnection() {
Connection con = null;
try {
con = DriverManager.getConnection(url,urname,pass);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return con;
}
/** * 釋放 Connection,PreparedStatement,ResultSet 資源 * @param con * @param ps * @param rst */
public static void close(Connection con,PreparedStatement ps,ResultSet res) {
try {
if(con!=null) {
con.close();
}
if(ps!=null) {
ps.close();
}
if(res!=null) {
res.close();
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/** * 釋放 Connection,PreparedStatement 資源 * @param con * @param ps */
public static void close_1(Connection con,PreparedStatement ps) {
try {
if(con!=null) {
con.close();
}
if(ps!=null) {
ps.close();
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
//根據用戶名和密碼
public static boolean getnamepass(String name,String pass) {
if(name==null&&pass==null) {
return false;
}
try {
con = Utils.getConnection();
// String sql = "select * from admin where username='"+ name +"' and password='"+ pass +"'";
//防止sql注入
String sql = "select * from admin where username=? and password=?";
ps = con.prepareStatement(sql);
ps.setString(1, name);
ps.setString(2, pass);
res = ps.executeQuery();
return res.next();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
Utils.close(con, ps, res);
}
return false;
}
//實現類
Scanner sc = new Scanner(System.in);
System.out.println("請輸入用戶名:");
String name = sc.next();
System.out.println("請輸入密碼:");
String pass = sc.next();
boolean getnamepass = UserDao.getnamepass(name, pass);
if(getnamepass) {
System.out.println("登錄成功!!!");
}else {
System.out.println("用戶名或密碼錯誤!!!");
}
JDBC控制事務
說明
1. 事務:一個包含多個步驟的業務操作。如果這個業務操作被事務管理,則這多個步驟要麼同時成功,要麼同時失敗。
2. 操作:
1. 開啟事務
2. 提交事務
3. 回滾事務
3. 使用Connection對象來管理事務
* 開啟事務:setAutoCommit(boolean autoCommit) :調用該方法設置參數為false,即開啟事務
* 在執行sql之前開啟事務
* 提交事務:commit()
* 當所有sql都執行完提交事務
* 回滾事務:rollback()
* 在catch中回滾事務
實現
public class AccountDao {
/* * 修改指定用戶的餘額 */
public void updateBalance(Connection con, String name,double balance) {
try {
String sql = "UPDATE account SET balance=balance+? WHERE name=?";
PreparedStatement pstmt = con.prepareStatement(sql);
pstmt.setDouble(1,balance);
pstmt.setString(2,name);
pstmt.executeUpdate();
}catch (Exception e) {
throw new RuntimeException(e);
}
}
}
public class Demo1 {
/* * 演示轉賬方法 * 所有對Connect的操作都在Service層進行的處理 * 把所有connection的操作隱藏起來,這需要使用自定義的小工具(day19_1) * */
public void transferAccounts(String from,String to,double money) {
//對事務的操作
Connection con = null;
try{
con = JdbcUtils.getConnection();
con.setAutoCommit(false);
AccountDao dao = new AccountDao();
dao.updateBalance(con,from,-money);//給from减去相應金額
if (true){
throw new RuntimeException("不好意思,轉賬失敗");
}
dao.updateBalance(con,to,+money);//給to加上相應金額
//提交事務
con.commit();
} catch (Exception e) {
try {
con.rollback();
} catch (SQLException e1) {
e.printStackTrace();
}
throw new RuntimeException(e);
}
}
@Test
public void fun1() {
transferAccounts("zs","ls",100);
}
}
}
dao.updateBalance(con,to,+money);//給to加上相應金額
//提交事務
con.commit();
} catch (Exception e) {
try {
con.rollback();
} catch (SQLException e1) {
e.printStackTrace();
}
throw new RuntimeException(e);
}
}
@Test
public void fun1() {
transferAccounts("zs","ls",100);
}
}
边栏推荐
- MySQL transaction introduction and transaction isolation level
- Guitar Pro tutorial how to set up a MIDI keyboard
- LCD参数解释及计算
- Tensorflow prompts typeerror: unsupported operand type (s) for *: 'float' and 'nonetype‘
- Arm64 Stack backtrack
- Recognize function originality
- Is Huishang futures company reliable in opening accounts and safe in trading?
- Goframe gredis configuration management | comparison of configuration files and configuration methods
- Implementation of asynchronous query of Flink dimension table and troubleshooting
- R语言计算data.table在一个分组变量的值固定的情况下另外一个分组变量下指定数值变量的均值
猜你喜欢

Application case of smart micro 32-bit MCU for server application cooling control

WinForm, crystal report making

Microsoft Office MSDT Code Execution Vulnerability (cve-2022-30190) vulnerability recurrence

内核中断整体流程图

"Upgrade strategy" of two new committers

Volcano engine held a video cloud technology force summit and released a new experience oriented video cloud product matrix

1.5 什么是架构师(连载)

5、Embedding

Interesting LD_ PRELOAD

R language arma-garch-copula model and financial time series case
随机推荐
The R language uses the aggregate The plot function visualizes the summary statistical information of each subset (visualization is based on the probability value and its 95% confidence interval of th
DRM 驱动 mmap 详解:(一)预备知识
SSM集成FreeMarker以及常用语法
R language calculates data Table specifies the mean value of a numeric variable when the value of one grouped variable is fixed and another grouped variable
Learn the mitmproxy packet capturing tool from scratch
(3) Golang - data type
Use the official go Library of mongodb to operate the original mongodb
R语言使用epiDisplay包的tabpct函数生成二维列联表并使用马赛克图可视化列联表(二维列联表、边际频数、以及按行、按列的比例)、自定义设置cex.axis参数改变轴标签数值的大小
Channel Original
118. Yanghui triangle (dynamic planning)
电控学习 第二周
A variety of Qt development methods, which do you choose?
JDBC几个坑
Arm64棧回溯
Project training of Software College of Shandong University - Innovation Training - network attack and defense shooting range experimental platform of Software College of Shandong University (XXV) - p
Tensorflow reads data from the network
Figma from getting started to giving up
Enterprise internal online training system source code
First acquaintance with go language
I heard that distributed IDS cannot be incremented globally?