sxt_(011_014)_显示添加书籍
一、数据库设计
create table book(
bookid int auto_increment primary key,
bookname varchar(16),
bookprice double,
bookauthor varchar(10),
bookdate date ); insert into book(bookname,bookprice,bookauthor,bookdate) values('java1',88.01,'akr1','2018-6-1');
insert into book(bookname,bookprice,bookauthor,bookdate) values('java2',88.02,'akr2','2018-6-2');
insert into book(bookname,bookprice,bookauthor,bookdate) values('java3',88.03,'akr3','2018-6-3');
insert into book(bookname,bookprice,bookauthor,bookdate) values('java4',88.04,'akr4','2018-6-4');
insert into book(bookname,bookprice,bookauthor,bookdate) values('java5',88.05,'akr5','2018-6-5');
二、显示书籍demo
2.1 新建一个web项目
2.2 导入所需要的jar包
2.3 book实体类
package edu.aeon.booksys.entity; import java.util.Date;
/**
* [说明]:book实体类
* @author qq1584875179
*
*/
public class Book {
private int bookId;
private String bookName;
private double bookPrice;
private String bookAuthor;
private Date bookDate;
public Book() {
} public Book(String bookName, double bookPrice, String bookAuthor, Date bookDate) {
super();
this.bookName = bookName;
this.bookPrice = bookPrice;
this.bookAuthor = bookAuthor;
this.bookDate = bookDate;
} public Book(int bookId, String bookName, double bookPrice, String bookAuthor, Date bookDate) {
super();
this.bookId = bookId;
this.bookName = bookName;
this.bookPrice = bookPrice;
this.bookAuthor = bookAuthor;
this.bookDate = bookDate;
} public int getBookId() {
return bookId;
}
public void setBookId(int bookId) {
this.bookId = bookId;
}
public String getBookName() {
return bookName;
}
public void setBookName(String bookName) {
this.bookName = bookName;
}
public double getBookPrice() {
return bookPrice;
}
public void setBookPrice(double bookPrice) {
this.bookPrice = bookPrice;
}
public String getBookAuthor() {
return bookAuthor;
}
public void setBookAuthor(String bookAuthor) {
this.bookAuthor = bookAuthor;
}
public Date getBookDate() {
return bookDate;
}
public void setBookDate(Date bookDate) {
this.bookDate = bookDate;
} }
2.4 DBUtils工具类
package edu.aeon.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.sql.Statement;
import java.util.Properties; /**
* [说明]:jdbc工具类
* 封装了jdbc里面的重复步骤:数据库的连接和数据库资源的释放
* @author qq1584875179
* @version 1.2(该版本将连接数据库的各种数据库配置信息(用户名、密码、驱动及url)单独提取到配置文件中)
*/
public class DBUtils {
private static String username;
private static String password;
private static String driverClass;
private static String url;
private Connection connection;
private PreparedStatement preparedStatement;
private ResultSet resultSet;
/**
* 静态代码块处理读取之前的数据
*/
static{
InputStream inputStream = DBUtils.class.getClassLoader().getResourceAsStream("config/database/database.properties");
Properties properties=new Properties();
try {
properties.load(inputStream);
username = properties.getProperty("username");
password = properties.getProperty("password");
driverClass = properties.getProperty("driverClass");
url = properties.getProperty("url");
} catch (IOException e) {
System.out.println("初始化读取数据库配置文件--->database.properties失败!");
e.printStackTrace();
}
}
/**
* 连接数据库
* @throws ClassNotFoundException
* @throws SQLException
*/
public void getMySqlConnection(){
try {
Class.forName(driverClass);
connection=DriverManager.getConnection(url, username, password);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* [说明]:更新:(增加、删除、改)
* @param sql sql语句
* @param objects 可变参数数组
* @return updateNum:所更新后影响的行数
*/
public int executeUpdate(String sql,Object...objects){
this.getMySqlConnection();
int updateNum = 0;
try {
preparedStatement=connection.prepareStatement(sql);
if(objects!=null){
for(int i=0;i<objects.length;i++){
preparedStatement.setObject((i+1), objects[i]);
}
}
updateNum=preparedStatement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}finally {
this.closeDB(resultSet, preparedStatement, connection);
}
return updateNum;
} public ResultSet getAll(String sql,Object...objects){
this.getMySqlConnection();
try {
preparedStatement=connection.prepareStatement(sql);
if(objects!=null){
for(int i=0;i<objects.length;i++){
preparedStatement.setObject((i+1), objects[i]);
}
}
resultSet=preparedStatement.executeQuery();
} catch (SQLException e) {
e.printStackTrace();
}/*finally {//为什么不能关掉:因为关掉之后查不到数据了
this.closeDB(resultSet, preparedStatement, connection);
}*/
return resultSet;
}
/**
* 释放数据库资源
* @param resultSet 结果集
* @param statement 执行sql语句的对象
* @param connection 数据库连接对象
*/
public static void closeDB(ResultSet resultSet,Statement statement,Connection connection){
if(null!=resultSet){
try {
resultSet.close();
} catch (SQLException e) {
System.out.println("释放数据库资源失败!--->resultSet");
e.printStackTrace();
}
}
if(null!=statement){
try {
statement.close();
} catch (SQLException e) {
System.out.println("释放数据库资源失败!--->statement");
e.printStackTrace();
}
}
if(null!=connection){
try {
connection.close();
} catch (SQLException e) {
System.out.println("释放数据库资源失败!--->connection");
e.printStackTrace();
}
}
}
}
2.5database.properties
username=root
password=root
driverClass=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/booksys
2.6 BookDao
package edu.aeon.booksys.dao; import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import edu.aeon.booksys.entity.Book;
import edu.aeon.utils.DBUtils;
/**
* [说明]:dao
* @author qq:1584875179
*
*/
public class BookDao extends DBUtils{
public List<Book> getAll(){
List<Book> bookList=new ArrayList<Book>();
ResultSet resultSet=this.getAll("select * from book");
try {
while(resultSet.next()){
bookList.add(new Book(resultSet.getInt(1), resultSet.getString(2), resultSet.getDouble(3), resultSet.getString(4), resultSet.getDate(5)));
}
} catch (SQLException e) {
e.printStackTrace();
}
return bookList;
}
//测试
public static void main(String[] args) {
BookDao bookDao=new BookDao();
List<Book> bookList=bookDao.getAll();
for (Book book : bookList) {
System.out.println(book.getBookId()+"\t"+book.getBookName());
}
}
}
2.7 显示书籍列表的servlet:ListBookServlet
package edu.aeon.booksys.servlet; import java.io.IOException;
import java.io.PrintWriter;
import java.util.List; import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import edu.aeon.booksys.dao.BookDao;
import edu.aeon.booksys.entity.Book;
/**
* [说明]:查询书籍列表的servlet
* @author qq:1584875179
*
*/
public class ListServlet extends HttpServlet { @Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
this.doPost(request, response);
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
BookDao bookDao=new BookDao();
List<Book> bookList=bookDao.getAll();
response.setContentType("text/html;charset=utf-8");
PrintWriter printWriter=response.getWriter();
printWriter.print("<html>");
printWriter.print("<head><title>显示书籍列表</title></head>");
printWriter.print("<body>");
printWriter.print("<table border='1' align='center' width='60%'>");
printWriter.print("<th>书籍号</th>");
printWriter.print("<th>书籍名</th>");
printWriter.print("<th>书籍价格</th>");
printWriter.print("<th>书籍作者</th>");
printWriter.print("<th>书籍出版日期</th>");
for(int i=0;i<bookList.size();i++){
printWriter.print("<tr>");
printWriter.print("<td>"+bookList.get(i).getBookId()+"</td>");
printWriter.print("<td>"+bookList.get(i).getBookName()+"</td>");
printWriter.print("<td>"+bookList.get(i).getBookPrice()+"</td>");
printWriter.print("<td>"+bookList.get(i).getBookAuthor()+"</td>");
printWriter.print("<td>"+bookList.get(i).getBookDate()+"</td>");
printWriter.print("</tr>");
}
printWriter.print("</table");
printWriter.print("</body>");
printWriter.print("</html>");
}
}
2.8 在web.xml中配置servlet
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>booksys</display-name>
<servlet>
<servlet-name>listServlet</servlet-name>
<servlet-class>edu.aeon.booksys.servlet.ListServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>listServlet</servlet-name>
<url-pattern>/listBookServlet</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
2.9测试结果
三、添加书籍
3.1 添加书籍页面addBook.jsp
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!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>
<form action="addBookServlet">
<table border="1" align="center">
<tr><td colspan="2" align="center">添加书籍</td></tr>
<tr>
<td>书名:</td><td><input type="text" name="bookName"/></td>
</tr>
<tr>
<td>价格:</td><td><input type="text" name="bookPrice"/></td>
</tr>
<tr>
<td>作者:</td><td><input type="text" name="bookAuthor"/></td>
</tr>
<tr>
<td>日期:</td><td><input type="text" name="bookDate"/></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="提交"><input type="reset" value="全部撤销"></td>
</tr>
</table>
</form>
</body>
</html>
3.2 DBUtils
package edu.aeon.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.sql.Statement;
import java.util.Properties; import edu.aeon.booksys.entity.Book; /**
* [说明]:jdbc工具类
* 封装了jdbc里面的重复步骤:数据库的连接、资源的释放及通用操作(增删改查)。
* @author qq:1584875179
* @version 1.3(该版本将连接数据库的各种数据库配置信息(用户名、密码、驱动及url)单独提取到配置文件中)
*/
public class DBUtils {
private static String username;
private static String password;
private static String driverClass;
private static String url;
private Connection connection;
private PreparedStatement preparedStatement;
private ResultSet resultSet;
/**
* 静态代码块处理读取之前的数据
*/
static{
InputStream inputStream = DBUtils.class.getClassLoader().getResourceAsStream("config/database/database.properties");
Properties properties=new Properties();
try {
properties.load(inputStream);
username = properties.getProperty("username");
password = properties.getProperty("password");
driverClass = properties.getProperty("driverClass");
url = properties.getProperty("url");
} catch (IOException e) {
System.out.println("初始化读取数据库配置文件--->database.properties失败!");
e.printStackTrace();
}
}
/**
* 连接数据库
* @throws ClassNotFoundException
* @throws SQLException
*/
public void getMySqlConnection(){
try {
Class.forName(driverClass);
connection=DriverManager.getConnection(url, username, password);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* [说明]:更新:(增加、删除、改)
* @param sql sql语句
* @param objects 可变参数数组
* @return updateNum:所更新后影响的行数
*/
public int executeUpdate(String sql,Object...objects){
this.getMySqlConnection();
int updateNum = 0;
try {
preparedStatement=connection.prepareStatement(sql);
if(objects!=null){
for(int i=0;i<objects.length;i++){
preparedStatement.setObject((i+1), objects[i]);
}
}
updateNum=preparedStatement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}finally {
this.closeDB(resultSet, preparedStatement, connection);
}
return updateNum;
}
/**
*
* @param sql sql语句
* @param objects 可变参数
* @return resultSet 查询结果集
*/
public ResultSet getAll(String sql,Object...objects){
this.getMySqlConnection();
try {
preparedStatement=connection.prepareStatement(sql);
if(objects!=null){
for(int i=0;i<objects.length;i++){
preparedStatement.setObject((i+1), objects[i]);
}
}
resultSet=preparedStatement.executeQuery();
} catch (SQLException e) {
e.printStackTrace();
}/*finally {//为什么不能关掉:因为关掉之后查不到数据了
this.closeDB(resultSet, preparedStatement, connection);
}*/
return resultSet;
}
public int addBook(Book book){
this.getMySqlConnection();
int updateNum = 0;
String sql="insert into book(bookName,bookPrice,bookAuthor,bookDate) values(?,?,?,?);";
try {
preparedStatement=connection.prepareStatement(sql);
if(book!=null){
preparedStatement.setObject(1, book.getBookName());
preparedStatement.setObject(2, book.getBookPrice());
preparedStatement.setObject(3, book.getBookAuthor());
preparedStatement.setObject(4, book.getBookDate());
}
updateNum=preparedStatement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}finally {
this.closeDB(resultSet, preparedStatement, connection);
}
return updateNum;
}
/**
* 释放数据库资源
* @param resultSet 结果集
* @param statement 执行sql语句的对象
* @param connection 数据库连接对象
*/
public static void closeDB(ResultSet resultSet,Statement statement,Connection connection){
if(null!=resultSet){
try {
resultSet.close();
} catch (SQLException e) {
System.out.println("释放数据库资源失败!--->resultSet");
e.printStackTrace();
}
}
if(null!=statement){
try {
statement.close();
} catch (SQLException e) {
System.out.println("释放数据库资源失败!--->statement");
e.printStackTrace();
}
}
if(null!=connection){
try {
connection.close();
} catch (SQLException e) {
System.out.println("释放数据库资源失败!--->connection");
e.printStackTrace();
}
}
}
}
3.3 AddBookServlet
package edu.aeon.booksys.servlet; import java.io.IOException;
import java.text.SimpleDateFormat;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import edu.aeon.booksys.dao.BookDao;
import edu.aeon.booksys.entity.Book;
/**
* [说明]:添加书籍servlet
* @author qq:1584875179
*
*/
public class AddBookServlet extends HttpServlet {
private static final long serialVersionUID = 1L; /**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
BookDao bookDao=new BookDao();
response.setContentType("text/html;charset=utf-8");
response.setCharacterEncoding("utf-8");
String bookName=request.getParameter("bookName");
String bookPrice=request.getParameter("bookPrice");
String bookAuthor=request.getParameter("bookAuthor");
String bookDate=request.getParameter("bookDate");
try {
Book book=new Book(bookName, Double.parseDouble(bookPrice), bookAuthor, new SimpleDateFormat("yyyy-MM-dd").parse(bookDate));
int updateNum=bookDao.addBook(book);
if(updateNum>0){
response.getWriter().print("添加成功!");
}else{
response.getWriter().print("添加失败!");
}
} catch (Exception e) {
e.printStackTrace();
}
} /**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
} }
3.4 BookDao
package edu.aeon.booksys.dao; import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import edu.aeon.booksys.entity.Book;
import edu.aeon.utils.DBUtils;
/**
* [说明]:dao
* @author qq:1584875179
*
*/
public class BookDao extends DBUtils{
public List<Book> getAll(){
List<Book> bookList=new ArrayList<Book>();
ResultSet resultSet=this.getAll("select * from book");
try {
while(resultSet.next()){
bookList.add(new Book(resultSet.getInt(1), resultSet.getString(2), resultSet.getDouble(3), resultSet.getString(4), resultSet.getDate(5)));
}
} catch (SQLException e) {
e.printStackTrace();
}
return bookList;
}
public int add(Book book){
int updateNum=this.addBook(book);
return updateNum;
}
//测试
public static void main(String[] args) {
BookDao bookDao=new BookDao();
List<Book> bookList=bookDao.getAll();
for (Book book : bookList) {
System.out.println(book.getBookId()+"\t"+book.getBookName());
}
}
}
3.5 web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>booksys</display-name>
<servlet>
<servlet-name>listServlet</servlet-name>
<servlet-class>edu.aeon.booksys.servlet.ListServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>listServlet</servlet-name>
<url-pattern>/listBookServlet</url-pattern>
</servlet-mapping> <servlet>
<servlet-name>addBookServlet</servlet-name>
<servlet-class>edu.aeon.booksys.servlet.AddBookServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>addBookServlet</servlet-name>
<url-pattern>/addBookServlet</url-pattern>
</servlet-mapping> <welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
3.6 addBook.jsp
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!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>
<form action="addBookServlet">
<table border="1" align="center">
<tr><td colspan="2" align="center">添加书籍</td></tr>
<tr>
<td>书名:</td><td><input type="text" name="bookName"/></td>
</tr>
<tr>
<td>价格:</td><td><input type="text" name="bookPrice"/></td>
</tr>
<tr>
<td>作者:</td><td><input type="text" name="bookAuthor"/></td>
</tr>
<tr>
<td>日期:</td><td><input type="text" name="bookDate"/></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="提交"><input type="reset" value="全部撤销"></td>
</tr>
</table>
</form>
</body>
</html>
3.7 添加页面显示
四、重定向
4.1重定向:由response.sendRendirect("xxxServlet");实现
当使用重定向时,服务器会将重定向的地址("xxxServlet")交给浏览器。浏览器根据新的url,重新发起一次请求。
4.2 重定向的简图:
sxt_(011_014)_显示添加书籍的更多相关文章
- 权限模块_使用权限_实现主页面的效果_显示左侧菜单&只显示有权限的菜单项
权限模块__使用权限__实现主页面的效果 HomeAction.java public class HomeAction extends ActionSupport { public String i ...
- MeteoInfo-Java解析与绘图教程(七)_图层添加站点名称或区域名称
MeteoInfo-Java解析与绘图教程(七)_图层添加站点名称或区域名称 在上文说了用自动站的数据经过插值绘制色斑图,这种一般是在geoserver上叠加图片呈现,但遇到后端导出图片,我们又想添加 ...
- 系统管理模块_部门管理_改进_抽取添加与修改JSP页面中的公共代码_在显示层抽取BaseAction_合并Service层与Dao层
系统管理模块_部门管理_改进1:抽取添加与修改JSP页面中的公共代码 commons.jspf <%@ page language="java" import="j ...
- SQL Server监控报警架构_如何添加报警
一.数据库邮件报警介绍 数据库邮件是从SQL Server数据库引擎发送电子邮件企业解决方案,使用简单传输协议(SMTP)发送邮件.发送邮件进程与数据库的进程隔离,因此可不用担心影响数据库服务器. 数 ...
- ArcMap制图_显示指定区域地图内容
摘要:有一张完整的中国地图,有时仅要求针对某一特定区域制图,那么如何在不进行裁剪的情况下仅显示该区域范围的要素内容? 步骤: 1.打开ArcMap,加载完整的中国地图: 2.将要显示的区域范围制作成一 ...
- Django学习手册 - admin后台 切换成中文显示/添加数据表
Django admin后台管理 切换成中文界面: 站点显示为中文: 在setting 里面修改 LANGUAGE_CORE = 'zh-Hans' 字段名显示中文 class Test(models ...
- 【WPF】在MenuItem中下划线“_”显示不正常
MenuItem的Header显示文字时发现一个问题,字符串中的第一个下划线“_”不能显示.如果该下划线前面是一个英文字母,则下划线会跑到该字母下方.(是中文汉字则不会) 查到原因是第一个下划线“_” ...
- ztree实现根节点右击事件,显示添加删除
需求,右击树节点,出现编辑和删除的提示框 1:在setting 配置里面,给callback设置,右击事件onRightClick: 2:写一个函数onRightClick function onRi ...
- 解决vs2013中MVC/WebApi不显示添加区域菜单选项
在构建项目过程中,安装各种package或者卸载的过程中,导致了添加区域菜单选项不显示,导致后面无法添加区域. 在网上查找各种资料,发现原来是工程文件(项目名.csproj)缺少mvc引用. 工程文件 ...
- VC 静态库与动态库(四)动态库创建与使用_显示调用
在第三章的基础上,接着添加一个显示调用项目 显示调用项目创建: 1.给解决方案添加一个新的控制台项目DisplayCall用于测试动态库,创建完成后设置为启动项目 2.DisplayCall.cpp添 ...
随机推荐
- ECharts 饼图切换数据源bug 开始没数据显示 切换或刷新后显示
1.出现问题原因 一个饼图,右上方两个按钮分别为今天和本月,分别调用不同接口控制,点击则调用不同接口同时饼图绑定数据源刷新:出现此问题原因点击今日按钮有一个饼图区域形没有数据不显示,对应数据值比例都没 ...
- EPICS Archiver Appliance的定制部署1
https://blog.csdn.net/weixin_43767046/article/details/112116112 简单部署试了一下之后,又试了下Site specific install ...
- B端业务中仓库标签打印系统设计方案
需求背景: 仓库在给客户货物打包途中需要在包裹上贴标签,在客户比较多且标签样式多样化的前提下,给仓库人员带来了工作量,为了节约仓库人员工作流程时间,公司开发了一套标签管理系统: 前提条件:选择专属打印 ...
- clicknium-划时代的自动化
说起UI自动化,selenium一直是不可替代的存在,它的安装量.百度数量已经奠定了它在自动化.爬虫等相关领域的霸主低位,可以说,只要涉及到UI自动化,选selenium就对了. 细数过往,相关的UI ...
- 【USACO 2021 February Contest, Platinum】Problem 1 No Time to Dry
\(\text{Solution}\) 一个点可与另一个颜色相同点同时涂色当且仅当两点间颜色都大于等于这两点 那么我们可以预处理一个点向左向右最远能到的位置,记为 \(l_i,r_i)\) 当 \(l ...
- JZOJ 2020.02.16【NOIP提高组】模拟A 组
2020.02.16[NOIP提高组]模拟A 组 呼呼呼呼呼呼呼呼 今天暴力分可真多啊 第一次 \(A\) 组进前 \(5\) ! 呼呼呼呼呼呼呼呼 总有人虐场,总有人在场中被虐······ 总结 3 ...
- 钓鱼攻击之:CHM电子书钓鱼
钓鱼攻击之:CHM电子书钓鱼 目录 钓鱼攻击之:CHM电子书钓鱼 1 CHM简介 2 .Chm文件因何变得危险 3 CHM 后门的优点 4 利用过程 4.1 准备工具 4.2 制作恶意chm文件 4. ...
- js循环判断创建新对象放数组中
原效果 之后效果: <!doctype html> <html lang="en"> <head> <meta charset=" ...
- idea连接数据库,驱动问题
选本地maven仓库的jar包就好
- Python elasticsearch_dsl 报错及解决方法
Exception:maxClauseCount is set to 1024 原因:报错原因是Search限制一个bool查询中最多只能有1024个值或子查询,当超过1024时,会抛出异常. 解决办 ...