部门信息管理系统

实现对部门信息的分类管理,对不同部门人员的管理(增删改查),新用户的注册和登陆等

功能分析:

  1. 实现用户的登陆
  2. 实现用户的注册(注册不同的部门和职位)
  3. 登陆之后会显示所有员工和经理的信息
  4. 实现对这些信息的删除和更新操作

下面看一下效果图吧

登陆页面
在这里插入图片描述
注册页面
在这里插入图片描述
登陆之后页面
在这里插入图片描述
点击删除ID为10之后的页面
在这里插入图片描述
点击更新之后的页面
在这里插入图片描述

这个系统一共有两大步

1 . 数据库
2 . 后台功能的实现

下面我们将实现这两大步

一 数据库内容

在这里插入图片描述
数据库内容自行设计和填充数据!!!

二 后台功能代码

目录结构图
在这里插入图片描述

下面正式欣赏代码

@1 bean包

bean包里的Department.java代码

package com.hnpi.bean;public class Department {private int id;private String branch;public int getId() {return id;}public void setId(int id) {this.id = id;}public String getBranch() {return branch;}public void setBranch(String branch) {this.branch = branch;}public Department() {super();// TODO Auto-generated constructor stub}public Department(int id, String branch) {super();this.id = id;this.branch = branch;}}

bean包里的User.java代码

package com.hnpi.bean;public class User {private int id;private String name;private String pwd;private String rname;private String branch;private String role;public int getId() {return id;}public void setId(int id) {this.id = id;}public String getName() {return name;}public void setName(String name) {this.name = name;}public String getPwd() {return pwd;}public void setPwd(String pwd) {this.pwd = pwd;}public String getRname() {return rname;}public void setRname(String rname) {this.rname = rname;}public String getBranch() {return branch;}public void setBranch(String branch) {this.branch = branch;}public String getRole() {return role;}public void setRole(String role) {this.role = role;}public User() {super();// TODO Auto-generated constructor stub}public User(int id, String name, String pwd, String rname, String branch,String role) {super();this.id = id;this.name = name;this.pwd = pwd;this.rname = rname;this.branch = branch;this.role = role;}}

@2 servlet包

servlet 包里的LoginServlet.java代码

package com.hnpi.servlet;import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import com.hnpi.util.DBUtil;public class LoginServlet extends HttpServlet {public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {doPost(request, response);}public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {String name = request.getParameter("name");String pwd = request.getParameter("pwd");request.setCharacterEncoding("utf-8");response.setContentType("text/html");boolean flag = false;Connection conn = DBUtil.getConn();PreparedStatement ps = null;ResultSet rs = null;String sql = "select * from users where name = ? and pwd = ?";try {ps = conn.prepareStatement(sql);ps.setString(1, name);ps.setString(2, pwd);rs = ps.executeQuery();if(rs.next()){flag = true;}else{flag = false;}} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();}finally{DBUtil.closeConn(conn, ps, rs);}if(flag){response.sendRedirect("list");}else{response.sendRedirect("login.jsp");}}}

servlet 包里的RegisterServlet.java代码

package com.hnpi.servlet;import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import com.hnpi.util.DBUtil;public class RegisterServlet extends HttpServlet {public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {doPost(request, response);}public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {request.setCharacterEncoding("utf-8");response.setContentType("text/html");String name = request.getParameter("name");String pwd = request.getParameter("pwd");String rname = request.getParameter("rname");String branch = request.getParameter("branch");String role = request.getParameter("role");Connection conn = DBUtil.getConn();PreparedStatement ps = null;String sql = "insert into users(name,pwd,rname,branch,role) values(?,?,?,?,?)";try {ps = conn.prepareStatement(sql);ps.setString(1, name);ps.setString(2, pwd);ps.setString(3, rname);ps.setString(4, branch);ps.setString(5, role);ps.executeUpdate();} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();}finally{DBUtil.closeConn(conn, ps, null);}response.sendRedirect("login.jsp");}}

servlet 包里的ToRegisterServlet.java代码

package com.hnpi.servlet;import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;import com.hnpi.bean.Department;
import com.hnpi.util.DBUtil;public class ToRegisterServlet extends HttpServlet {public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {doPost(request, response);}public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {request.setCharacterEncoding("utf-8");response.setContentType("text/html");Connection conn = DBUtil.getConn();PreparedStatement ps = null;ResultSet rs = null;String sql = "select * from department";List<Department> depts = new ArrayList<Department>();try {ps = conn.prepareStatement(sql);rs = ps.executeQuery();while(rs.next()){Department dept = new Department();dept.setId(rs.getInt(1));dept.setBranch(rs.getString(2));depts.add(dept);}} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();}finally{DBUtil.closeConn(conn, ps, rs);}HttpSession session = request.getSession();session.setAttribute("deptList", depts);response.sendRedirect("register.jsp");}}

servlet 包里的UserDelServlet.java代码

package com.hnpi.servlet;import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import com.hnpi.util.DBUtil;public class UserDelServlet extends HttpServlet {public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {doPost(request, response);}public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {String id = request.getParameter("id");request.setCharacterEncoding("utf-8");response.setContentType("text/html");Connection conn = DBUtil.getConn();PreparedStatement ps = null;String sql = "delete from users where id = ?";try {ps = conn.prepareStatement(sql);ps.setString(1, id);ps.executeUpdate();} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();}finally{DBUtil.closeConn(conn, ps, null);}response.sendRedirect("list");}}

servlet 包里的UserListServlet.java代码

package com.hnpi.servlet;import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;import com.hnpi.bean.Department;
import com.hnpi.bean.User;
import com.hnpi.util.DBUtil;public class UserListServlet extends HttpServlet {public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {doPost(request, response);}public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {request.setCharacterEncoding("utf-8");response.setContentType("text/html");Connection conn = DBUtil.getConn();PreparedStatement ps = null;ResultSet rs = null;String sql = "select * from users";List<User> users = new ArrayList<User>();try {ps = conn.prepareStatement(sql);rs = ps.executeQuery();while(rs.next()){User user = new User();user.setId(rs.getInt(1));user.setName(rs.getString(2));user.setPwd(rs.getString(3));user.setRname(rs.getString(4));user.setBranch(rs.getString(5));user.setRole(rs.getString(6));users.add(user);}} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();}finally{DBUtil.closeConn(conn, ps, rs);}HttpSession session = request.getSession();session.setAttribute("userList", users);response.sendRedirect("userList.jsp");}}

servlet 包里的UserUpdateServlet.java代码

package com.hnpi.servlet;import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import com.hnpi.util.DBUtil;public class UserUpdateServlet extends HttpServlet {public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {doPost(request, response);}public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {request.setCharacterEncoding("utf-8");response.setContentType("text/html");String id = request.getParameter("id");String name = request.getParameter("name");String pwd = request.getParameter("pwd");String rname = request.getParameter("rname");String branch = request.getParameter("branch");String role = request.getParameter("role");Connection conn = DBUtil.getConn();PreparedStatement ps = null;String sql = "update users set name = ?, pwd = ?, rname = ?, branch = ?, role = ? where id = ?";try {ps = conn.prepareStatement(sql);ps.setString(1, name);ps.setString(2, pwd);ps.setString(3, rname);ps.setString(4, branch);ps.setString(5, role);ps.setInt(6, Integer.parseInt(id));ps.executeUpdate();} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();}finally{DBUtil.closeConn(conn, ps, null);}response.sendRedirect("list");}}

@3 util包

DBUtil.java

package com.hnpi.util;import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;public class DBUtil {public static Connection getConn(){String url = "jdbc:sqlserver://localhost:1433;databaseName=Staff";String user = "sa";String pwd = "1";Connection conn = null;try {Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");conn = DriverManager.getConnection(url, user, pwd);} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (ClassNotFoundException e) {// TODO Auto-generated catch blocke.printStackTrace();}return conn;}public static void closeConn(Connection conn, PreparedStatement ps, ResultSet rs){if(conn!=null){try {conn.close();} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();}}if(ps!=null){try {ps.close();} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();}}if(rs!=null){try {rs.close();} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();}}}}

@4 JSP页面

login.jsp页面

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><base href="<%=basePath%>"><title>My JSP 'index.jsp' starting page</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0">    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><!--<link rel="stylesheet" type="text/css" href="styles.css">--></head><body><form action="login" method="post">账号:<input type="text" name="name"><br>密码:<input type="password" name="pwd"><br><input type="submit" value="登陆"><a href="toRegister">注册</a></form></body>
</html>

register.jsp页面

<%@page import="com.hnpi.bean.Department"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><base href="<%=basePath%>"><title>My JSP 'register.jsp' starting page</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0">    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><!--<link rel="stylesheet" type="text/css" href="styles.css">--></head><body><form action="register" method="post">账号:<input type="text" name="name"><br>密码:<input type="password" name="pwd"><br>真实姓名:<input type="text" name="rname"><br>部门:<select name="branch"><%List<Department> depts = (List)session.getAttribute("deptList");for(Department dept : depts){%><option id="<%=dept.getId()  %>"><%=dept.getBranch() %></option><%}%></select><br>角色:<select name="role"><option>经理</option><option>员工</option></select><input type="submit" value="注册"></form></body>
</html>

userList.jsp页面

<%@page import="com.hnpi.bean.User"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><base href="<%=basePath%>"><title>My JSP 'userList.jsp' starting page</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0">    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><!--<link rel="stylesheet" type="text/css" href="styles.css">--></head><body><table><thead><tr><th>ID</th><th>账号</th><th>密码</th><th>真实姓名</th><th>部门</th><th>角色</th><th colspan="2">操作</th></tr></thead><tbody><%List<User> users = (List)session.getAttribute("userList");for(User user : users){%><tr><td><%=user.getId() %></td><td><%=user.getName() %></td><td><%=user.getPwd() %></td><td><%=user.getRname() %></td><td><%=user.getBranch() %></td><td><%=user.getRole() %></td><td><a href="del?id=<%=user.getId() %>">删除</a></td><td><a href="userUpdate.jsp?id=<%=user.getId() %>">更新</a></td></tr><%}%></tbody></table></body>
</html>

userUpdate.jsp页面

<%@page import="com.hnpi.bean.Department"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.SQLException"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="com.hnpi.util.DBUtil"%>
<%@page import="java.sql.Connection"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><base href="<%=basePath%>"><title>My JSP 'userUpdate.jsp' starting page</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0">    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><!--<link rel="stylesheet" type="text/css" href="styles.css">--></head><body><%String id = request.getParameter("id");Connection conn = DBUtil.getConn();PreparedStatement ps = null;ResultSet rs = null;String sql = "select * from users where id = ?";try {ps = conn.prepareStatement(sql);ps.setInt(1, Integer.parseInt(id));rs = ps.executeQuery();while(rs.next()){String name = rs.getString("name");String pwd = rs.getString("pwd");String rname = rs.getString("rname");String branch = rs.getString("branch");String role = rs.getString("role");%><form action="update" method="post">ID:<input type="text" readonly="readonly" name="id" value="<%=id %>"><br>账号:<input type="text" name="name" value="<%=name %>"><br>密码:<input type="password" name="pwd" value="<%=pwd %>"><br>真实姓名:<input type="text" name="rname" value="<%=rname %>"><br>部门:<select name="branch"><option value="生产部"<%if(branch.equals("生产部")){%>selected<%}%>>生产部</option><option value="销售部"<%if(branch.equals("销售部")){%>selected<%}%>>销售部</option><option value="研发部"<%if(branch.equals("研发部")){%>selected<%}%>>研发部</option></select><br>角色:<select name="role"><option>经理</option><option>员工</option></select><br><input type="submit" value="注册"></form><%}} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();}finally{DBUtil.closeConn(conn, ps, rs);}%></body>
</html>

看到这里相信你已经有深刻的了解,快去尝试一下吧。

获取更多关注我呦!!!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/565909.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【OpenCV 例程200篇】60. 非线性滤波—联合双边滤波

【OpenCV 例程200篇】60. 非线性滤波—联合双边滤波&#xff08;Joint bilateral filter&#xff09; 欢迎关注 『OpenCV 例程200篇』 系列&#xff0c;持续更新中 欢迎关注 『Python小白的OpenCV学习课』 系列&#xff0c;持续更新中 图像滤波是在尽可能保留图像细节特征的条件…

租车系统

为了资源的节约有效利用&#xff0c;使车辆发挥更大的作用&#xff0c;我在此做了一个租车系统。 功能分析&#xff1a; 1&#xff1a;登录功能 2&#xff1a;后台管理功能 3&#xff1a;车辆管理功能 4&#xff1a;用户管理功能 5&#xff1a;前台用户功能 6&#xff1a;查看…

【OpenCV 例程200篇】61. 导向滤波(Guided filter)

【OpenCV 例程200篇】61. 导向滤波&#xff08;Guided filter&#xff09; 欢迎关注 『OpenCV 例程200篇』 系列&#xff0c;持续更新中 欢迎关注 『Python小白的OpenCV学习课』 系列&#xff0c;持续更新中 图像滤波是在尽可能保留图像细节特征的条件下对目标图像的噪声进行抑…

使用MATLAB GUI创建图形用户界面GUI

MATLAB是众多理工科学生及工程师经常使用的一款数学软件&#xff0c;除了可以实现数据处理&#xff0c;矩阵运算、函数绘制等功能外&#xff0c;MATLAB还可以实现图形用户界面的设计。 下面介绍如何让小白也能用GUI创建最基本的用户界面&#xff0c;并帮助大家学会在今后的…

【OpenCV 例程200篇】62. 图像锐化——钝化掩蔽

【OpenCV 例程200篇】62. 图像锐化——钝化掩蔽 欢迎关注 『OpenCV 例程200篇』 系列&#xff0c;持续更新中 欢迎关注 『Python小白的OpenCV学习课』 系列&#xff0c;持续更新中 3. 空间域锐化滤波&#xff08;高通滤波&#xff09; 图像模糊通过平滑&#xff08;加权平均&a…

AJAX基本用法

在工作中和一些大项目制作的时候&#xff0c;许多人都会选择使用前后端分离技术即AJAX进行项目的制作&#xff0c;使用AJAX不仅能提高效率而且更容易修改&#xff0c;使我们制作项目的时候更加的得心应手。 在此给大家讲解一下AJAX的用法&#xff0c;一共有五个核心内容&#…

【OpenCV 例程200篇】63. 图像锐化之 Laplacian 算子

【OpenCV 例程200篇】63. 图像锐化之 Laplacian 算子 欢迎关注 『OpenCV 例程200篇』 系列&#xff0c;持续更新中 欢迎关注 『Python小白的OpenCV学习课』 系列&#xff0c;持续更新中 3. 空间域锐化滤波&#xff08;高通滤波&#xff09; 图像模糊通过平滑&#xff08;加权平…

秒表计时器

使用Jquery制作了一个漂亮的秒表计时器。 效果图 原始样式 点击开始之后 点击停止再点击清零之后 有没有一种心动的感觉呢&#xff0c;下面看代码。 代码演示 首先注意哦&#xff1a;引入相对应的Jquery架包。 代码 <!DOCTYPE html> <html><head>&l…

【OpenCV 例程200篇】64. 图像锐化——Sobel 算子

【OpenCV 例程200篇】64. 图像锐化——Sobel 算子 欢迎关注 『OpenCV 例程200篇』 系列&#xff0c;持续更新中 欢迎关注 『Python小白的OpenCV学习课』 系列&#xff0c;持续更新中 3. 空间域锐化滤波&#xff08;高通滤波&#xff09; 图像模糊通过平滑&#xff08;加权平均…

sklearn特征工程

本文转载 使用sklearn做单机特征工程 目录 1 特征工程是什么&#xff1f; 2 数据预处理   2.1 无量纲化     2.1.1 标准化     2.1.2 区间缩放法     2.1.3 标准化与归一化的区别   2.2 对定量特征二值化   2.3 对定性特征哑编码   2.4 缺失值计算   …

秒表倒计时

使用JavaScript实现秒表的倒计时。 我设置的是五分钟倒计时&#xff0c;倒计时时间是可以自己随意设置的。 效果图 代码演示 <!DOCTYPE html> <html><head><meta charset"utf-8" /><title></title></head><style>…

【OpenCV 例程200篇】65. 图像锐化——Scharr 算子

【OpenCV 例程200篇】65. 图像锐化——Scharr 算子 欢迎关注 『OpenCV 例程200篇』 系列&#xff0c;持续更新中 欢迎关注 『Python小白的OpenCV学习课』 系列&#xff0c;持续更新中 3. 空间域锐化滤波&#xff08;高通滤波&#xff09; 图像模糊通过平滑&#xff08;加权平均…

【转】常用的风控算法模型评价指标

1. 基本概念 FNTPTNFP TP —— True Positive &#xff08;真正, TP&#xff09;被模型预测为正的正样本&#xff1b;可以称作判断为真的正确率 TN —— True Negative&#xff08;真负 , TN&#xff09;被模型预测为负的负样本 &#xff1b;可以称作判断为假的正确率 FP ——…

【OpenCV 例程200篇】66. 图像滤波之低通/高通/带阻/带通

【OpenCV 例程200篇】66. 图像滤波之低通/高通/带阻/带通 欢迎关注 『OpenCV 例程200篇』 系列&#xff0c;持续更新中 欢迎关注 『Python小白的OpenCV学习课』 系列&#xff0c;持续更新中 4. 低通、高通、带阻、带通 图像滤波是在尽可能保留图像细节特征的条件下对目标图像的…

滑动登录

鼠标点击拖动滑块即可快速完成登录。 程序分析&#xff1a; 鼠标点击鼠标点击后拖动滑块鼠标点击取消滑块水平移动 效果图演示 初始页面 点击滑块进行拖动 此时的你是不是急于想实现它呢&#xff1f;&#xff1f;&#xff1f; 代码演示 <!DOCTYPE html><html …

Jupyter 快速入门

前言 之前一直在断断续续使用jupyter&#xff0c;感觉是时间来整理一下快速入门的办法了&#xff0c;方便实施建模使用。 1 Jupyter介绍 Jupyter Notebook是一个交互式笔记本编译器&#xff0c;支持在网页端运行多种编程语言&#xff0c;其本质就是一个基于web交互的程序编译…

【课题总结】OpenCV 抠图项目实战(1)目录摘要

Python 小白的课题报告—OpenCV 抠图项目实战&#xff08;1&#xff09;目录摘要 本系列是 Python 小白的课题作业《基于OpenCV 的图像分割和抠图》。 需要说明的是&#xff0c;本系列并不能算是 OpenCV 的抠图项目教程&#xff0c;只是以此为主题的课题报告。其中包括了一个较…

Vue 滑动验证

用Vue实现滑动验证码&#xff0c;鼠标点击滑动验证&#xff0c;验证成功之后会显示验证通过。 程序分析 鼠标的点击滑块的拖动未验证之前滑动条上显示的文字滑块箭头指向Vue函数判断是否拖动完毕拖动完毕时改变背景色并显示验证成功 效果图演示 原始状态 点击之后拖动 拖…

【课题总结】OpenCV 抠图项目实战(2)抠图绪论

Python 小白的课题报告&#xff1a;OpenCV 抠图项目实战&#xff08;2&#xff09;抠图绪论 本系列是 Python 小白的课题作业《基于OpenCV 的图像分割和抠图》。 需要说明的是&#xff0c;本系列并不能算是 OpenCV 的抠图项目教程&#xff0c;只是以此为主题的课题报告。其中包…

滑动解锁

模仿手机解锁滑动&#xff0c;点击向右滑动完毕即可显示解锁成功。 程序详解 1.点击和松开事件 2. 未解锁之前显示的样式和背景色 3. 解锁之后显示的样式和背景色 4. 滑动完毕后才能解锁 图片演示 原始界面 点击滑动后 解锁成功 下面我们跟随我一起来欣赏一下代码 代码…