本次不分享知识分享项目

目录

一、底层代码

1.DBHelper

2.实体类

3.数据库访问层 dao

4.业务逻辑层

5.控制层

二、界面

1.主界面

2.增加界面

3.修改界面

4.查看界面


一、底层代码

1.DBHelper

package com.tsq.util;import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;/*** 提供了一组获得或关闭数据库对象的方法* */
public class DBHelper {private static String driver;private static String url;private static String user;private static String password;static {// 静态块执行一次,加载 驱动一次try {InputStream is = DBHelper.class.getResourceAsStream("config.properties");Properties properties = new Properties();properties.load(is);driver = properties.getProperty("driver");url = properties.getProperty("url");user = properties.getProperty("user");password = properties.getProperty("pwd");Class.forName(driver);} catch (Exception e) {e.printStackTrace();throw new RuntimeException(e);}}/*** 获得数据连接对象* * @return*/public static Connection getConnection() {try {Connection conn = DriverManager.getConnection(url, user, password);return conn;} catch (SQLException e) {e.printStackTrace();throw new RuntimeException(e);}}public static void close(ResultSet rs) {if (null != rs) {try {rs.close();} catch (SQLException e) {e.printStackTrace();throw new RuntimeException(e);}}}public static void close(Statement stmt) {if (null != stmt) {try {stmt.close();} catch (SQLException e) {e.printStackTrace();throw new RuntimeException(e);}}}public static void close(Connection conn) {if (null != conn) {try {conn.close();} catch (SQLException e) {e.printStackTrace();throw new RuntimeException(e);}}}public static void close(Connection conn, Statement stmt, ResultSet rs) {close(rs);close(stmt);close(conn);}public static boolean isOracle() {return "oracle.jdbc.driver.OracleDriver".equals(driver);}public static boolean isSQLServer() {return "com.microsoft.sqlserver.jdbc.SQLServerDriver".equals(driver);}public static boolean isMysql() {return "com.mysql.jdbc.Driver".equals(driver);}public static void main(String[] args) {Connection conn = DBHelper.getConnection();DBHelper.close(conn);System.out.println("isOracle:" + isOracle());System.out.println("isSQLServer:" + isSQLServer());System.out.println("isMysql:" + isMysql());System.out.println("数据库连接(关闭)成功");}
}
#mysql
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/0614?useUnicode=true&characterEncoding=UTF-8&useSSL=false
#jdbc:mysql://localhost:3306/mybatis_ssm
user=root
pwd=123456

2.实体类

package com.tsq.entity;import java.io.Serializable;/*** 爱好类*/
public class Hobby implements Serializable{private static final long serialVersionUID = 1L;private int hid;private String hname;public int getHid() {return hid;}public void setHid(int hid) {this.hid = hid;}public String getHname() {return hname;}public void setHname(String hname) {this.hname = hname;}public Hobby() {// TODO Auto-generated constructor stub}public Hobby(int hid, String hname) {this.hid = hid;this.hname = hname;}@Overridepublic String toString() {return "Hobby [hid=" + hid + ", hname=" + hname + "]";}}
package com.tsq.entity;import java.io.Serializable;/*** 班级实体类*/
public class Class implements Serializable{private static final long serialVersionUID = 1L;private int cid;private String cname;public int getCid() {return cid;}public void setCid(int cid) {this.cid = cid;}public String getCname() {return cname;}public void setCname(String cname) {this.cname = cname;}public Class() {// TODO Auto-generated constructor stub}public Class(int cid, String cname) {this.cid = cid;this.cname = cname;}@Overridepublic String toString() {return "Class [cid=" + cid + ", cname=" + cname + "]";}}
package com.tsq.entity;import java.io.Serializable;
import java.util.List;/*** 学生类*/
public class Student implements Serializable{private static final long serialVersionUID = 1L;private int sid;private String sname;private Class cl;private Theaher th;private List<Hobby> hy;public int getSid() {return sid;}public void setSid(int sid) {this.sid = sid;}public String getSname() {return sname;}public void setSname(String sname) {this.sname = sname;}public Class getCl() {return cl;}public void setCl(Class cl) {this.cl = cl;}public Theaher getTh() {return th;}public void setTh(Theaher th) {this.th = th;}public List<Hobby> getHy() {return hy;}public void setHy(List<Hobby> hy) {this.hy = hy;}public Student() {// TODO Auto-generated constructor stub}public Student(int sid, String sname, Class cl, Theaher th, List<Hobby> hy) {this.sid = sid;this.sname = sname;this.cl = cl;this.th = th;this.hy = hy;}public Student(String sname, Class cl, Theaher th, List<Hobby> hy) {this.sname = sname;this.cl = cl;this.th = th;this.hy = hy;}@Overridepublic String toString() {return "Student [sid=" + sid + ", sname=" + sname + ", cl=" + cl + ", th=" + th + ", hy=" + hy + "]";}}
package com.tsq.entity;import java.io.Serializable;/*** 教师类* @author zjjt**/
public class Theaher implements Serializable{private static final long serialVersionUID = 1L;private int tid;private String tname;public int getTid() {return tid;}public void setTid(int tid) {this.tid = tid;}public String getTname() {return tname;}public void setTname(String tname) {this.tname = tname;}public Theaher() {// TODO Auto-generated constructor stub}public Theaher(int tid, String tname) {this.tid = tid;this.tname = tname;}@Overridepublic String toString() {return "Theaher [tid=" + tid + ", tname=" + tname + "]";}}

3.数据库访问层 dao

package com.tsq.Dao;import java.util.List;import com.tsq.entity.Hobby;/*** hobby类(爱好类*/public interface IHyDao {/*** 爱好集合* @return*/public List<Hobby> getAll();/*** 爱好查询单个* @param hid 爱好编号* @return 返回爱好对象*/public Hobby getdg(int ahbh);
}
package com.tsq.Dao;import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;import com.tsq.entity.Theaher;
import com.tsq.util.DBHelper;public class ThDao implements IThDao{//扩大作用域Connection conn = null;Statement stmt = null;ResultSet rs = null;@Overridepublic List<Theaher> getAll() {List<Theaher> ls = new ArrayList<Theaher>();try {//连接数据库conn = DBHelper.getConnection();//定义sql语句String sql = "select * from tb_theacher";//执行sql语句stmt = conn.prepareStatement(sql);//获得结果集rs = stmt.executeQuery(sql);//遍历结果集while(rs.next()) {//实例化Theaher th = new Theaher(rs.getInt(1),rs.getString(2));//加到集合中ls.add(th);}} catch (Exception e) {e.printStackTrace();} finally {DBHelper.close(conn, stmt, rs);}return ls;}@Overridepublic Theaher getdg(int tid) {//教师Theaher th = new Theaher();try {//连接数据库conn = DBHelper.getConnection();//定义sql语句String sql = "select* from tb_theacher where tid="+tid+"";//执行sql语句stmt = conn.prepareStatement(sql);//获得结果集rs = stmt.executeQuery(sql);//遍历结果集while(rs.next()) {//实例化th = new Theaher(rs.getInt("tid"),rs.getString("tname"));}} catch (Exception e) {e.printStackTrace();} finally {DBHelper.close(conn, stmt, rs);}return th;}// public static void main(String[] args) {
//  System.out.println(new ThDao().getdg(5));
// }}
package com.tsq.Dao;import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import java.sql.Statement;import com.tsq.biz.HyBiz;
import com.tsq.biz.IHyBiz;
import com.tsq.biz.IStuBiz;
import com.tsq.entity.Class;
import com.tsq.entity.Hobby;
import com.tsq.entity.Student;
import com.tsq.entity.Theaher;
import com.tsq.util.DBHelper;public class StuDao implements IStuBiz{//扩大作用域Connection conn = null;Statement stmt = null;ResultSet rs = null;PreparedStatement ps = null;//爱好IHyBiz ihb = new HyBiz();@Overridepublic List<Student> getAll(String cid,String tid,String hid,int pageIndex,int pageSize) {int a = (pageIndex-1)*pageSize;List<Student> ls = new ArrayList<Student>();try {//连接数据库conn = DBHelper.getConnection();//定义sql语句String sql = "select * from (\r\n" + "select * from (\r\n" + "select * from (\r\n" + "select *  from (\r\n" + "select a.*,b.hname,c.cname,d.tname from tb_stu a,tb_hobby b,tb_class c,tb_theacher d where a.cid=c.cid and a.tid=d.tid and a.hid = b.hid\r\n" + ")q  "+cid+"\r\n" + ")w "+tid+"\r\n" + ")e "+hid+"\r\n" + ")r limit "+a+","+pageSize+"";
//          System.out.println(sql);//执行sql语句stmt = conn.prepareStatement(sql);//获得结果集rs = stmt.executeQuery(sql);//遍历结果及while(rs.next()) {List<Hobby> hy = new ArrayList<>();String str = rs.getString("hid");String[] split = str.split(" ");for (String hids : split) {//查询单个Hobby hby = ihb.getdg(Integer.parseInt(hids));hy.add(hby);}//班级Class cl = new Class(rs.getInt("cid"),rs.getString("cname"));//教员Theaher th = new Theaher(rs.getInt("tid"),rs.getString("tname"));//学生Student stu = new Student(rs.getInt("sid"),rs.getString("sname"),cl,th,hy);//加到集合中ls.add(stu);}} catch (Exception e) {e.printStackTrace();} finally {DBHelper.close(conn, stmt, rs);}return ls;}@Overridepublic Student getdg(int sid) {Student stu = new Student();try {//连接数据库conn = DBHelper.getConnection();//定义sql语句String sql = "select * from (\r\n" + "select a.*,b.hname,c.cname,d.tname from tb_stu a,tb_hobby b,tb_class c,tb_theacher d where a.cid=c.cname and a.tid=d.tid and a.hid = b.hid ) e where e.sid="+sid+"";//执行sql语句stmt = conn.prepareStatement(sql);//获得结果集rs = stmt.executeQuery(sql);//遍历结果及while(rs.next()) {List<Hobby> hy = new ArrayList<>();String str = rs.getString("hid");String[] split = str.split(" ");for (String hid : split) {//查询单个Hobby hby = ihb.getdg(Integer.parseInt(hid));hy.add(hby);}//班级Class cl = new Class(rs.getInt("cid"),rs.getString("cname"));//教员Theaher th = new Theaher(rs.getInt("tid"),rs.getString("tname"));//学生stu = new Student(rs.getInt("sid"),rs.getString("sname"),cl,th,hy);}} catch (Exception e) {e.printStackTrace();} finally {DBHelper.close(conn, stmt, rs);}return stu;}@Overridepublic int addStu(String sname, Class cl, Theaher th, List<Hobby> hy) {String hh = "";for (int i = 0; i < hy.size(); i++) {hh+=hy.get(i).getHid()+" ";}int n = 0;try {//连接数据库conn = DBHelper.getConnection();//定义sql语句String sql = "insert into tb_stu(sname,cid,tid,hid) values('"+sname+"',"+cl.getCid()+","+th.getTid()+",'"+hh+"')";//执行sql语句stmt = conn.prepareStatement(sql);//返回执行的行数n = stmt.executeUpdate(sql);} catch (Exception e) {e.printStackTrace();} finally {DBHelper.close(conn, stmt, rs);
//          close(conn, stmt, rs,ps);}return n;}@Overridepublic int delStu(int sid) {int n = 0;try {//连接数据库conn = DBHelper.getConnection();//定义sql语句String sql = "delete from tb_stu where sid="+sid+"";//执行sql语句stmt = conn.prepareStatement(sql);//返回执行的行数n = stmt.executeUpdate(sql);} catch (Exception e) {e.printStackTrace();} finally {DBHelper.close(conn, stmt, rs);}return n;}@Overridepublic int updStu(int sid, String sname, Class cl, Theaher th, List<Hobby> hy) {int n = 0;String hh = "";for (int i = 0; i < hy.size(); i++) {hh+=hy.get(i).getHid()+" ";}try {//连接数据库conn = DBHelper.getConnection();//定义sql语句String sql = "update tb_stu set sname='"+sname+"',cid="+cl.getCid()+",tid="+th.getTid()+",hid='"+hh+"' where sid="+sid+"";//执行sql语句stmt = conn.prepareStatement(sql);//返回执行的行数n = stmt.executeUpdate(sql);} catch (Exception e) {e.printStackTrace();} finally {DBHelper.close(conn, stmt, rs);}return n;}@Overridepublic int count(String cid,String tid,String hid) {int n = 0;try {//连接数据库conn = DBHelper.getConnection();//定义sql语句String sql = "select count(*) from (\r\n" + "select * from (\r\n" + "select * from (\r\n" + "select *  from (\r\n" + "select a.*,b.hname,c.cname,d.tname from tb_stu a,tb_hobby b,tb_class c,tb_theacher d where a.cid=c.cid and a.tid=d.tid and a.hid = b.hid\r\n" + ")q  "+cid+" \r\n" + ")w  "+tid+" \r\n" + ")e  "+hid+" \r\n" + ")t";
//          System.out.println(sql);//执行sql语句stmt = conn.prepareStatement(sql);//结果集rs = stmt.executeQuery(sql);if(rs.next()) {//返回执行的行数n = rs.getInt(1);}} catch (Exception e) {e.printStackTrace();} finally {DBHelper.close(conn, stmt, rs);}return n;}}
package com.tsq.Dao;import java.util.List;/*** * 教室类*/
import com.tsq.entity.Theaher;public interface IThDao {/*** 教员集合* @return*/public List<Theaher> getAll();/*** 查看单个* @param tid* @return*/public Theaher getdg(int tid);}
package com.tsq.Dao;import java.util.List;import com.tsq.entity.Class;
import com.tsq.entity.Hobby;
import com.tsq.entity.Student;
import com.tsq.entity.Theaher;/*** 学生类* * @author zjjt**/
public interface IStuDao {/*** 学生集合* @return*/public List<Student> getAll(String cid,String tid,String hid,int pageIndex,int pageSize);/*** 查询单个学生* @param sid 学生编号* @return 返回单个学生*/public Student getdg(int sid);/*** 增加* @param stu* @return*/public int addStu(String sname, Class cl, Theaher th, List<Hobby> hy);/*** 删除* @param sid 删除id* @return  返回行数*/public int delStu(int sid);/*** 修改* @param sid 学生id* @param sname 学生姓名* @param cl  班级* @param th  教员* @param hy  爱好* @return  返回执行行数*/public int updStu(int sid,String sname, Class cl, Theaher th, List<Hobby> hy);/*** 总数* @return*/public int count(String cid,String tid,String hid);}
package com.tsq.Dao;/*** 班级类*/
import java.util.List;import com.tsq.entity.Class;/*** 班级* @author zjjt**/public interface IClDao {/*** 爱好集合* @return*/public List<Class> getAll();/*** 查询单个* @param cid 班级编号* @return 返回对象*/public Class getdg(int cid);}
package com.tsq.Dao;import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;import com.tsq.entity.Hobby;
import com.tsq.util.DBHelper;public class HyDao implements IHyDao{//扩大作用域Connection conn = null;Statement stmt = null;ResultSet rs = null;@Overridepublic List<Hobby> getAll() {List<Hobby> ls = new ArrayList<Hobby>();try {//连接数据库conn = DBHelper.getConnection();//定义sql语句String sql = "select * from tb_hobby";//执行sql语句stmt = conn.prepareStatement(sql);//获得结果集rs = stmt.executeQuery(sql);//遍历结果集while(rs.next()) {//实例化Hobby hy = new Hobby(rs.getInt(1),rs.getString(2));//加到集合中ls.add(hy);}} catch (Exception e) {e.printStackTrace();} finally {DBHelper.close(conn, stmt, rs);}return ls;}@Overridepublic Hobby getdg(int hid) {Hobby  hy = new Hobby();try {//连接数据库conn = DBHelper.getConnection();//定义sql语句String sql = "select * from tb_hobby where hid="+hid+"";//执行sql语句stmt = conn.prepareStatement(sql);//获得结果集rs = stmt.executeQuery(sql);//遍历结果集while(rs.next()) {//实例化hy = new Hobby(rs.getInt(1),rs.getString(2));}} catch (Exception e) {e.printStackTrace();} finally {DBHelper.close(conn, stmt, rs);}return hy;}}
package com.tsq.Dao;import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;import com.tsq.entity.Class;
import com.tsq.util.DBHelper;public class ClDao implements IClDao{//扩大作用域Connection conn = null;Statement stmt = null;ResultSet rs = null;@Overridepublic List<Class> getAll() {List<Class> ls = new ArrayList<Class>();try {//连接数据库conn = DBHelper.getConnection();//定义sql语句String sql = "select * from tb_class";//执行sql语句stmt = conn.prepareStatement(sql);//获得结果集rs = stmt.executeQuery(sql);//遍历结果集while(rs.next()) {//实例化Class cl = new Class(rs.getInt(1),rs.getString(2));//加到集合中ls.add(cl);}} catch (Exception e) {e.printStackTrace();} finally {DBHelper.close(conn, stmt, rs);}return ls;}@Overridepublic Class getdg(int cid) {Class cl = new Class();try {//连接数据库conn = DBHelper.getConnection();//定义sql语句String sql = "select * from tb_class where cid="+cid+"";//执行sql语句stmt = conn.prepareStatement(sql);//获得结果集rs = stmt.executeQuery(sql);//遍历结果集while(rs.next()) {//实例化cl = new Class(rs.getInt(1),rs.getString(2));}} catch (Exception e) {e.printStackTrace();} finally {DBHelper.close(conn, stmt, rs);}return cl;}//   public static void main(String[] args) {
//      System.out.println(new ClDao().getdg(1));
//  }}

4.业务逻辑层

package com.tsq.biz;import java.util.List;import com.tsq.Dao.IThDao;
import com.tsq.Dao.ThDao;
import com.tsq.entity.Theaher;/*** teacher类(教师类)* @author zjjt**/
public class ThBiz implements IThBiz{//访问数据库IThDao itd = new ThDao();@Overridepublic List<Theaher> getAll() {return itd.getAll();}@Overridepublic Theaher getdg(int tid) {return itd.getdg(tid);}}
package com.tsq.biz;import java.util.List;import com.tsq.Dao.IStuDao;
import com.tsq.Dao.StuDao;
import com.tsq.entity.Class;
import com.tsq.entity.Hobby;
import com.tsq.entity.Student;
import com.tsq.entity.Theaher;public class StuBiz implements IStuBiz{//数据库访问层IStuBiz isd = new StuDao();@Overridepublic List<Student> getAll(String cid,String tid,String hid,int pageIndex,int pageSize) {return isd.getAll(cid, tid, hid, pageIndex, pageSize);}@Overridepublic Student getdg(int sid) {return isd.getdg(sid);}@Overridepublic int addStu(String sname, Class cl, Theaher th, List<Hobby> hy) {return isd.addStu(sname, cl, th, hy);}@Overridepublic int delStu(int sid) {return isd.delStu(sid);}@Overridepublic int updStu(int sid, String sname, Class cl, Theaher th, List<Hobby> hy) {return isd.updStu(sid, sname, cl, th, hy);}@Overridepublic int count(String cid,String tid,String hid) {return isd.count(cid, tid, hid);}
}
package com.tsq.biz;import java.util.List;import com.tsq.entity.ah;
import com.tsq.entity.jy;
import com.tsq.entity.xs;/*** student类(学生类):* @author zjjt**/
public interface IxsBiz {/*** 学生集合* @return*/public List<xs> getAll(String cid,String tid,String hid,int pageIndex,int pageSize);/*** 查询单个学生* @param sid 学生编号* @return 返回单个学生*/public xs getdg(int sid);/*** 增加* @param stu* @return*/public int addStu(String sname, Class cl, jy th, List<ah> hy);/*** 删除* @param sid 删除id* @return  返回行数*/public int delStu(int sid);/*** 修改* @param sid 学生id* @param sname 学生姓名* @param cl  班级* @param th  教员* @param hy  爱好* @return  返回执行行数*/public int updStu(int sid,String sname, Class cl, ah th, List<ah> hy);/*** 总数* @return*/public int count(String cid,String tid,String hid);}
package com.tsq.biz;import java.util.List;import com.tsq.entity.Theaher;public interface IThBiz {/*** 教员集合* @return*/public List<Theaher> getAll();/*** 查看单个* @param tid* @return*/public Theaher getdg(int tid);}
package com.tsq.biz;import java.util.List;import com.tsq.entity.Class;
import com.tsq.entity.Hobby;
import com.tsq.entity.Student;
import com.tsq.entity.Theaher;public interface IStuBiz {/*** 学生集合* @return*/public List<Student> getAll(String cid,String tid,String hid,int pageIndex,int pageSize);/*** 查询单个学生* @param sid 学生编号* @return 返回单个学生*/public Student getdg(int sid);/*** 增加* @param stu* @return*/public int addStu(String sname, Class cl, Theaher th, List<Hobby> hy);/*** 删除* @param sid 删除id* @return  返回行数*/public int delStu(int sid);/*** 修改* @param sid 学生id* @param sname 学生姓名* @param cl  班级* @param th  教员* @param hy  爱好* @return  返回执行行数*/public int updStu(int sid,String sname, Class cl, Theaher th, List<Hobby> hy);/*** 总数* @return*/public int count(String cid,String tid,String hid);}
package com.tsq.biz;import java.util.List;import com.tsq.entity.Hobby;/*** hobby类(爱好类):* @author zjjt**/
public interface IHyBiz {/*** 爱好集合* @return*/public List<Hobby> getAll();/*** 爱好查询单个* @param hid 爱好编号* @return 返回爱好对象*/public Hobby getdg(int hid);
}
package com.tsq.biz;import java.util.List;import com.tsq.entity.Class;/*** Class类(班级类)* @author zjjt**/
public interface IClBiz {/*** 爱好集合* @return*/public List<Class> getAll();/*** 查询单个* @param cid 班级编号* @return 返回对象*/public Class getdg(int cid);}
package com.tsq.biz;import java.util.List;import com.tsq.entity.Class;/*** Class类(班级类)* @author zjjt**/
public interface IClBiz {/*** 爱好集合* @return*/public List<Class> getAll();/*** 查询单个* @param cid 班级编号* @return 返回对象*/public Class getdg(int cid);}
package com.tsq.biz;import java.util.List;import com.tsq.Dao.ClDao;
import com.tsq.Dao.IClDao;
import com.tsq.entity.Class;public class ClBiz implements IClBiz{//访问数据库IClDao icd = new ClDao();@Overridepublic List<Class> getAll() {return icd.getAll();}@Overridepublic Class getdg(int cid) {return icd.getdg(cid);}}

5.控制层

package com.tsq.server;import java.io.IOException;
import java.util.ArrayList;
import java.util.List;import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import com.tsq.biz.ClBiz;
import com.tsq.biz.HyBiz;
import com.tsq.biz.IClBiz;
import com.tsq.biz.IHyBiz;
import com.tsq.biz.IStuBiz;
import com.tsq.biz.IThBiz;
import com.tsq.biz.StuBiz;
import com.tsq.biz.ThBiz;
import com.tsq.entity.Class;
import com.tsq.entity.Hobby;
import com.tsq.entity.Student;
import com.tsq.entity.Theaher;/*** 修改前功能*/
@WebServlet("/XgServlet")
public class XgServlet extends HttpServlet {protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {doPost(request, response);}protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {//设置编码方式request.setCharacterEncoding("utf-8");response.setCharacterEncoding("utf-8");response.setContentType("text/html; charset=UTF-8");//接收表单提交过来的值String sid = request.getParameter("sid");//业务逻辑层IHyBiz ihb = new HyBiz();//爱好IThBiz itb = new ThBiz();//教员IClBiz icb = new ClBiz();//班级IStuBiz isb = new StuBiz();//学生//调用查询全部的方法List<Hobby> hobby1 = ihb.getAll();List<Theaher> theaher1 = itb.getAll();List<Class> clas1 = icb.getAll();Student student1 = isb.getdg(Integer.parseInt(sid));
//      Student student1 = isb.getdg(3);List<Hobby> hy = student1.getHy();String aa = "";for (Hobby hobby : hy) {int hid = hobby.getHid();aa+=hid+" ";}
//      System.out.println(aa);
//      Student student1 = isb.getdg(2);//判断if(hobby1!=null&&theaher1!=null&&clas1!=null&&student1!=null) {//加到集合中request.setAttribute("hobby1", hobby1);request.setAttribute("theaher1", theaher1);request.setAttribute("clas1", clas1);request.setAttribute("student1", student1);request.setAttribute("aa", aa);//转发request.getRequestDispatcher("update.jsp").forward(request, response);}else {System.out.println("集合为空");}}}
package com.tsq.server;import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import com.tsq.biz.ClBiz;
import com.tsq.biz.HyBiz;
import com.tsq.biz.IClBiz;
import com.tsq.biz.IHyBiz;
import com.tsq.biz.IStuBiz;
import com.tsq.biz.IThBiz;
import com.tsq.biz.StuBiz;
import com.tsq.biz.ThBiz;
import com.tsq.entity.Class;
import com.tsq.entity.Hobby;
import com.tsq.entity.Theaher;/*** 修改功能*/
@WebServlet("/UpdateServlet")
public class UpdateServlet extends HttpServlet {protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {doPost(request, response);}protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {//设置编码方式request.setCharacterEncoding("utf-8");response.setCharacterEncoding("utf-8");response.setContentType("text/html; charset=UTF-8");//获取表单提交过来的值String sid = request.getParameter("sid");String sname = request.getParameter("sname");String tid = request.getParameter("tid");String cid = request.getParameter("cid");String [] hids = request.getParameterValues("hid");String hsy = "";//用来拼接for (String str : hids) {hsy+=str+" ";//用空格进行隔开}PrintWriter out = response.getWriter();//业务逻辑层IThBiz itb = new ThBiz();IClBiz icb = new ClBiz();IHyBiz ihb = new HyBiz();IStuBiz isb = new StuBiz();List<Hobby> hy = new ArrayList<>();String[] split = hsy.split(" ");for (String hid : split) {//查询单个Hobby hby = ihb.getdg(Integer.parseInt(hid));hy.add(hby);}//教员查询单个Theaher th = itb.getdg(Integer.parseInt(tid));//班级查询单个Class cl = icb.getdg(Integer.parseInt(cid));//调用增加的方法int n = isb.updStu(Integer.parseInt(sid), sname, cl, th, hy);if(n>0) {out.print("<script>alert('修改成功');location.href='index.jsp'</script>");}else {out.print("<script>alert('修改失败');location.href='XgServlet?sid="+sid+"'</script>");}}}
package com.tsq.server;import java.io.IOException;
import java.util.List;import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import com.tsq.biz.ClBiz;
import com.tsq.biz.HyBiz;
import com.tsq.biz.IClBiz;
import com.tsq.biz.IHyBiz;
import com.tsq.biz.IStuBiz;
import com.tsq.biz.IThBiz;
import com.tsq.biz.StuBiz;
import com.tsq.biz.ThBiz;
import com.tsq.entity.Class;
import com.tsq.entity.Hobby;
import com.tsq.entity.Student;
import com.tsq.entity.Theaher;/*** Servlet implementation class IndexServlet*/
@WebServlet("/IndexServlet")
public class IndexServlet extends HttpServlet {protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {doPost(request, response);}protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {//设置编码方式request.setCharacterEncoding("utf-8");response.setCharacterEncoding("utf-8");response.setContentType("text/html; charset=UTF-8");//扩大作用域int pageIndex = 1;int pageSize = 2;//接收表单String cid = request.getParameter("cid");if(cid==null) {cid="";}String tid= request.getParameter("tid");if(tid==null) {tid="";}String[] hids = request.getParameterValues("hid");String hid = "";String hidd ="";//用来拼接if(hids==null) {hidd=" ";hid="";}else {for (String str : hids) {hidd+=str+" ";//用空格进行隔开hid= " where hid like '%"+hidd+"%' ";}}String pid = request.getParameter("pid");if(pid!=null){//说明点了x页pageIndex = Integer.parseInt(pid);}String gid = request.getParameter("gid");
//      System.out.println("ska:"+gid);if(gid==null) {gid="";}else if(gid=="") {gid="";}else{pageIndex = Integer.parseInt(gid);}//业务逻辑层IStuBiz isb = new StuBiz();IHyBiz ihb = new HyBiz();//爱好IThBiz itb = new ThBiz();//教员IClBiz icb = new ClBiz();//班级//调用查询全部的方法List<Student> stu = isb.getAll(cid, tid,hid, pageIndex, pageSize);List<Hobby> hobby12 = ihb.getAll();List<Theaher> theaher12 = itb.getAll();List<Class> clas12 = icb.getAll();int count = isb.count(cid, tid, hid);int pagecount=0;if(count%pageSize==1) {pagecount=count/pageSize+1;}else {pagecount=count/pageSize;}if(stu.size()!=0) {//加到集合中request.setAttribute("stu", stu);request.setAttribute("hobby12", hobby12);request.setAttribute("theaher12", theaher12);request.setAttribute("clas12", clas12);request.setAttribute("count", count);request.setAttribute("pagecount", pagecount);request.setAttribute("pageIndex", pageIndex);//转发request.getRequestDispatcher("index.jsp").forward(request, response);}else {System.out.println("集合为空");}}}
package com.tsq.server;import java.io.IOException;
import java.util.List;import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import com.tsq.biz.ClBiz;
import com.tsq.biz.HyBiz;
import com.tsq.biz.IClBiz;
import com.tsq.biz.IHyBiz;
import com.tsq.biz.IThBiz;
import com.tsq.biz.ThBiz;
import com.tsq.entity.Class;
import com.tsq.entity.Hobby;
import com.tsq.entity.Theaher;/*** Servlet implementation class FoundServlet*/
@WebServlet("/FoundServlet")
public class FoundServlet extends HttpServlet {protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {doPost(request, response);}protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {//设置编码方式request.setCharacterEncoding("utf-8");response.setCharacterEncoding("utf-8");response.setContentType("text/html; charset=UTF-8");//业务逻辑层IHyBiz ihb = new HyBiz();//爱好IThBiz itb = new ThBiz();//教员IClBiz icb = new ClBiz();//班级//调用查询全部的方法List<Hobby> hobby = ihb.getAll();List<Theaher> theaher = itb.getAll();List<Class> clas = icb.getAll();//判断if(hobby!=null&&theaher!=null&&clas!=null) {//加到集合中request.setAttribute("hobby", hobby);request.setAttribute("theaher", theaher);request.setAttribute("clas", clas);//转发request.getRequestDispatcher("add.jsp").forward(request, response);}else {System.out.println("集合为空");}}}
package com.tsq.server;import java.io.IOException;
import java.io.PrintWriter;import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import com.tsq.biz.IStuBiz;
import com.tsq.biz.StuBiz;/*** 删除功能*/
@WebServlet("/DeleteServlet")
public class DeleteServlet extends HttpServlet {protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {doPost(request, response);}protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {//设置编码方式request.setCharacterEncoding("utf-8");response.setCharacterEncoding("utf-8");response.setContentType("text/html; charset=UTF-8");//outPrintWriter out = response.getWriter();//获取表单提交过来的值String sid = request.getParameter("sid");//业务逻辑IStuBiz isb = new StuBiz();//删除int n = isb.delStu(Integer.parseInt(sid));//判断if(n>0) {out.print("<script>alert('删除成功');location.href='index.jsp'</script>");}else {out.print("<script>alert('删除失败');location.href='index.jsp'</script>");}}}
package com.tsq.server;import java.io.IOException;
import java.util.List;import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import com.tsq.biz.ClBiz;
import com.tsq.biz.HyBiz;
import com.tsq.biz.IClBiz;
import com.tsq.biz.IHyBiz;
import com.tsq.biz.IStuBiz;
import com.tsq.biz.IThBiz;
import com.tsq.biz.StuBiz;
import com.tsq.biz.ThBiz;
import com.tsq.entity.Class;
import com.tsq.entity.Hobby;
import com.tsq.entity.Student;
import com.tsq.entity.Theaher;/*** 查看功能*/
@WebServlet("/CheckServlet")
public class CheckServlet extends HttpServlet {protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {doPost(request, response);}protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {//设置编码方式request.setCharacterEncoding("utf-8");response.setCharacterEncoding("utf-8");response.setContentType("text/html; charset=UTF-8");//接收表单提交过来的值String sid = request.getParameter("sid");//业务逻辑层IHyBiz ihb = new HyBiz();//爱好IThBiz itb = new ThBiz();//教员IClBiz icb = new ClBiz();//班级IStuBiz isb = new StuBiz();//学生//调用查询全部的方法List<Hobby> hobby2 = ihb.getAll();List<Theaher> theaher2 = itb.getAll();List<Class> clas2 = icb.getAll();Student student2 = isb.getdg(Integer.parseInt(sid));List<Hobby> hy = student2.getHy();String bb = "";for (Hobby hobby : hy) {int hid = hobby.getHid();bb+=hid+" ";}
//      Student student2 = isb.getdg(2);//判断if(hobby2!=null&&theaher2!=null&&clas2!=null&&student2!=null) {//加到集合中request.setAttribute("hobby2", hobby2);request.setAttribute("theaher2", theaher2);request.setAttribute("clas2", clas2);request.setAttribute("student2", student2);request.setAttribute("bb", bb);//转发request.getRequestDispatcher("check.jsp").forward(request, response);}else {System.out.println("集合为空");}}}
package com.tsq.server;import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import com.tsq.biz.ClBiz;
import com.tsq.biz.HyBiz;
import com.tsq.biz.IClBiz;
import com.tsq.biz.IHyBiz;
import com.tsq.biz.IStuBiz;
import com.tsq.biz.IThBiz;
import com.tsq.biz.StuBiz;
import com.tsq.biz.ThBiz;
import com.tsq.entity.Class;
import com.tsq.entity.Hobby;
import com.tsq.entity.Student;
import com.tsq.entity.Theaher;/*** 增加功能*/
@WebServlet("/AddServlet")
public class AddServlet extends HttpServlet {protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {doPost(request, response);}protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {//设置编码方式request.setCharacterEncoding("utf-8");response.setCharacterEncoding("utf-8");response.setContentType("text/html; charset=UTF-8");//获取表单提交过来的值String sname = request.getParameter("sname");String tid = request.getParameter("tid");String cid = request.getParameter("cid");String [] hids = request.getParameterValues("hid");String hsy = "";//用来拼接for (String str : hids) {hsy+=str+" ";//用空格进行隔开}PrintWriter out = response.getWriter();//业务逻辑层IThBiz itb = new ThBiz();IClBiz icb = new ClBiz();IHyBiz ihb = new HyBiz();IStuBiz isb = new StuBiz();List<Hobby> hy = new ArrayList<>();String[] split = hsy.split(" ");for (String hid : split) {//查询单个Hobby hby = ihb.getdg(Integer.parseInt(hid));hy.add(hby);}//教员查询单个Theaher th = itb.getdg(Integer.parseInt(tid));//班级查询单个Class cl = icb.getdg(Integer.parseInt(cid));//调用增加的方法int n = isb.addStu(sname, cl, th, hy);      if(n>0) {out.print("<script>alert('增加成功');location.href='index.jsp'</script>");}else {out.print("<script>alert('增加失败');location.href='index.jsp'</script>");}}}

二、界面

1.主界面


<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>主界面</title>
</head><body><c:if test="${empty stu }"><jsp:forward page="IndexServlet"></jsp:forward></c:if><center><h2>主界面</h2><form action="IndexServlet" method="post"><table border="1px"><tr><td colspan="6px">教员:<select name="tid"><option value=""  >请选择</option><c:forEach items="${theaher12 }" var="t"><option value=" where tid='${t.tid }'"  >${t.tname}</option></c:forEach></select>班级:<select name="cid"><option value=""  >请选择</option><c:forEach items="${clas12 }" var="c"><option value=" where cid='${c.cid }'"  >${c.cname}</option></c:forEach></select>爱好:<c:forEach items="${hobby12 }" var="h"><input type="checkbox" name="hid" value="${h.hid }"  >${h.hname}</c:forEach><input type="submit" value="查询"><input type="button" value="增加" onclick="add()"></td></tr><tr><td>学生编号</td><td>学生姓名</td><td>学生教员</td><td>所在班级</td><td>学生爱好</td><td>管理操作</td></tr><c:forEach items="${stu}" var="s"><tr><td>${s.sid }</td><td>${s.sname}</td><td>${s.th.tname}</td><td>${s.cl.cname}</td><td><c:forEach items="${s.hy}" var="x">${x.hname}</c:forEach></td> <td><a href="CheckServlet?sid=${s.sid }">查看</a><a href="XgServlet?sid=${s.sid }">修改</a><a  onclick="return confirm('你确定要删除吗?')"  href="DeleteServlet?sid=${s.sid }">删除</a></td></tr></c:forEach></table><div>第${pageIndex}页,&nbsp;&nbsp;共${pagecount}页,&nbsp;&nbsp;总记录${count}条<a href="IndexServlet?pid=1">首页</a><a href="IndexServlet?pid=${pageIndex>1?pageIndex-1:1}">上一页</a><a>go<input type="text" onblur="go('gid')" style=" width:15px" width="5px" name="gid" id="gid"></a><a href="IndexServlet?pid=${pageIndex<pagecount?pageIndex+1:pagecount}">下一页</a><a href="IndexServlet?pid=${pagecount}">尾页</a></div></form></center><script type="text/javascript">function add() {location.href="FoundServlet";}function go(id){var aa = document.getElementById(id);var bb = aa.value;alert(bb);if(isNaN(bb)||bb<0){alert("请输入正确的数字");}else{location.href="IndexServlet?gid="+bb+"";} }</script></body>
</html>

2.增加界面

<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>增加界面</title>
</head>
<body><center><form action="AddServlet" method="post"><table><tr><td>学生姓名</td><td><input type="text" name="sname"></td></tr><tr><td>学生教员</td><td><select name="tid"><c:forEach items="${theaher }" var="t"><option value="${t.tid }">${t.tname }</option></c:forEach></select></td></tr><tr><td>学生班级</td><td><select name="cid"><c:forEach items="${clas }" var="c"><option value="${c.cid }">${c.cname}</option></c:forEach></select></td></tr><tr><td>学生爱好</td><td><c:forEach items="${hobby }" var="h"><input type="checkbox" name="hid" value="${h.hid }">${h.hname }</c:forEach>    </td></tr></table><input type="submit" value="确定"><input type="reset" value="清空"></form></center>
</body>
</html>

3.修改界面

<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改</title>
</head>
<body><center><form action="UpdateServlet" method="post"><table><tr><td>学生编号</td><td><input type="text" name="sid" value="${student1.sid }" readonly="readonly"></td></tr><tr><td>学生姓名</td><td><input type="text" name="sname" value="${student1.sname }" ></td></tr><tr><td>学生教员</td><td><select name="tid"><c:forEach items="${theaher1 }" var="t"><option value="${t.tid }" <c:if test="${student1.th.tid==t.tid }">selected="selected"</c:if> >${t.tname }</option></c:forEach></select></td></tr><tr><td>学生班级</td><td><select name="cid"><c:forEach items="${clas1 }" var="c"><option value="${c.cid }" <c:if test="${student1.cl.cid==c.cid }">selected="selected"</c:if> >${c.cname}</option></c:forEach></select></td></tr><tr><td>学生爱好</td><td><input type="checkbox" name="hid" value="1"  <c:if test="${aa.contains('1 ') }">checked</c:if>>篮球<input type="checkbox" name="hid" value="2"  <c:if test="${aa.contains('2 ') }">checked</c:if>>足球<input type="checkbox" name="hid" value="3"  <c:if test="${aa.contains('3 ') }">checked</c:if>>唱歌<input type="checkbox" name="hid" value="4"  <c:if test="${aa.contains('4 ') }">checked</c:if>>跳舞</td></tr></table><input type="submit" value="修改"><input type="reset" value="清空"></form></center>
</body>
</html>

4.查看界面

<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查看界面</title>
</head>
<body><center><form action="#" method="post"><table><tr><td>学生编号</td><td><input type="text" name="sid" value="${student2.sid }" readonly="readonly"></td></tr><tr><td>学生姓名</td><td><input type="text" name="sname" value="${student2.sname }" readonly="readonly"></td></tr><tr><td>学生教员</td><td><select name="tid"><c:forEach items="${theaher2 }" var="t"><option value="${t.tid }" <c:if test="${student2.th.tid==t.tid }">selected="selected"</c:if>  disabled="disabled">${t.tname }</option></c:forEach></select></td></tr><tr><td>学生班级</td><td><select name="cid"><c:forEach items="${clas2 }" var="c"><option value="${c.cid }" <c:if test="${student2.cl.cid==c.cid }">selected="selected"</c:if>  disabled="disabled">${c.cname}</option></c:forEach></select></td></tr><tr><td>学生爱好</td><td><input type="checkbox" name="hid" value="1"  <c:if test="${bb.contains('1 ') }">checked</c:if>>篮球<input type="checkbox" name="hid" value="2"  <c:if test="${bb.contains('2 ') }">checked</c:if>>足球<input type="checkbox" name="hid" value="3"  <c:if test="${bb.contains('3 ') }">checked</c:if>>唱歌<input type="checkbox" name="hid" value="4"  <c:if test="${bb.contains('4 ') }">checked</c:if>>跳舞</td></tr></table><a href="index.jsp">返回</a></form></center>
</body>
</html>

Student增删改查相关推荐

  1. 02-CoreData 的增删改查

    CoreData 的增删改查 基本的增删改查的操作 1 数据库的创建 - (void)createDB {// 1.1 创建路径NSURL *modelURL = [[NSBundle mainBun ...

  2. Entity Framework应用:根据实体的EntityState状态实现增删改查

    在上一篇文章中,我们讲解了使用EF实现简单的增删改成,在这篇文章中我们使用实体的EntityState状态来优化数据的增删改查. 一.修改数据 上篇文章中的修改数据的方法是EF官方推荐的方式,即先查询 ...

  3. Python Web实战:Python+Django+MySQL实现基于Web版的增删改查

    本文使用Python Web框架Django连接和操作MySQL数据库学生信息管理系统(SMS),主要包含对学生信息增删改查功能. 1.创建项目(sms) 创建Django项目 django-admi ...

  4. PyCharm Python3操作数据库MySQL增删改查

    核心内容 (1)使用到的模块:PyMySQL 安装: pip3 install pymysql (2)连接数据库 # 连接数据库,地址:localhost,账号:root,密码:root,数据库:sc ...

  5. MVC、JSP实现mysql的增删改查功能的封装和简陋的界面交互

    1.眼见为实 (1)欢迎界面,总索引:带下划线的三个都是链接 : (2)搜索界面:--有颜色的为链接 (3).点击上面图片中的修改链接之后就会弹出下面的修改界面: (4).修改用户信息的界面 (5). ...

  6. shell编程系列22--shell操作数据库实战之shell脚本与MySQL数据库交互(增删改查)

    shell编程系列22--shell操作数据库实战之shell脚本与MySQL数据库交互(增删改查)Shell脚本与MySQL数据库交互(增删改查)# 环境准备:安装mariadb 数据库 [root ...

  7. mongodb基本操作=增删改查

    这两天总算清闲下来了,这里只介绍mongodb的一些基本增删改查,从大到小,从数据库到下面的集合表等,这里推荐一个mongodb的可视化工具Robo3T,在上面操作增删改查使用起来也简单 数据库相关的 ...

  8. asp.net初学习实现简单的增删改查功能

    在学习中发现网页模板可以大大节约重复的页面代码,同时对于WebSite开发的程序在不同的页面直接调用已写好的代码既不方面,只是作为代码量不大的程序进行开发还是比较方便. get和post的区别get是 ...

  9. 通过JDBC进行简单的增删改查(二)

    本章笔记更易理解和学习,也是我第一次初学的笔记. 1 package javastudy; 2 3 import java.sql.Connection; 4 import java.sql.Driv ...

最新文章

  1. MySQL 学习笔记(16)— 子查询(单行单列、一行多列、多行多列、 ALL、ANY、SOME 运算符、EXISTS 操作符)
  2. 关于synchronize与lock的区别
  3. SqlServer学习笔记【暂】
  4. 使用Xcode和Instruments调试解决iOS内存泄露
  5. [转]如何将WCF服务发布到IIS中去VS2010版
  6. mysql 配置多个数据库连接_总结MySQL修改最大连接数的两个方式
  7. java运行python3_python写脚本并用java调用python(三)
  8. php mysql 实现原理_php+mysql分页原理实现
  9. 腾讯智慧出行和现代汽车集团创新中心(北京)正式建立创新战略合作伙伴关系
  10. 晋升,结婚,出书,买房,这就是我的2019年!
  11. 柯洁:我受够了AI围棋;联发科校园招聘,应届生年薪约45万元;Chrome 100发布 | 极客头条...
  12. 验证DG最大性能模式下使用ARCH/LGWR及STANDBY LOG的不同情况
  13. 常见排序算法整理1(C++实现)
  14. 把mdb文件导入SQL Server 软件的解决方法
  15. 2016版excel_15个经典Excel技巧,易学易用,收藏备用!
  16. Dreamweaver简单网页——HTML+CSS小米官网首页的设计与实现
  17. 阿卡迪亚大学计算机专业好考吗,普通高中学生如何考取阿卡迪亚大学?
  18. 2008年顶尖 Web 设计师访谈
  19. 【转载】在Firefox国际版使用中国版账户
  20. 推荐几款jQuery时间轴插件Timeline

热门文章

  1. Oracle数据库之SQL函数
  2. UEBA案例分析系列之检测失陷凭证
  3. 使用 软考免费真题app刷题库 手机小程序版
  4. C++算法设计与分析课后习题(第三章)
  5. 2021-09-252021年中式烹调师(中级)考试技巧及中式烹调师(中级)证考试
  6. c语言解一元二次方程虚根oj,请问怎么用C语言求一元二次方程的虚根
  7. BlazeFace:一种非典型专用检测器
  8. 【游戏策划】消消乐游戏策划案
  9. sqlite优化简单分析
  10. 使用cryptsetup加密硬盘