Java项目:养老院管理系统(java+SSM+JSP+Easyui+maven+mysql)
源码获取:博客首页 "资源" 里下载!
运行环境:
JDK1.8、tomcat8、eclipse、mysql5.6、Navicat
功能实现:
用户: 用户名,登录密码,姓名,性别,出生日期,用户照片,联系电话,邮箱,家庭地址,注册时间
老人: 老人编号,姓名,性别,年龄,老人照片,老人介绍,登记用户,登记时间
房间类型: 房间类型id,房间类型名称
房间: 房间编号,房间类型,房间名称,房间主图,房间价格,房间详情,房间状态
订单: 订单编号,入住房间,入住老人,入住日期,入住时间,订单总金额,订单状态,订单费用明细,订单时间
老人看护: 记录id,信息类别,信息标题,信息内容,发布时间
接待: 接待记录id,接待类别,接待主题,接待内容,接待日期
部门: 部门编号,部门名称,成立日期,负责人
员工: 用户名,登录密码,所在部门,姓名,性别,出生日期,员工照片,联系电话,家庭地址
工资: 工资id,员工,工资年份,工资月份,工资金额,发放日期,工资备注
用户管理控制层:
//UserInfo管理控制层
@Controller
@RequestMapping("/UserInfo")
public class UserInfoController extends BaseController {/*业务层对象*/@Resource UserInfoService userInfoService;@InitBinder("userInfo")public void initBinderUserInfo(WebDataBinder binder) {binder.setFieldDefaultPrefix("userInfo.");}/*跳转到添加UserInfo视图*/@RequestMapping(value = "/add", method = RequestMethod.GET)public String add(Model model,HttpServletRequest request) throws Exception {model.addAttribute(new UserInfo());return "UserInfo_add";}/*客户端ajax方式提交添加用户信息*/@RequestMapping(value = "/add", method = RequestMethod.POST)public void add(@Validated UserInfo userInfo, BindingResult br,Model model, HttpServletRequest request,HttpServletResponse response) throws Exception {String message = "";boolean success = false;if (br.hasErrors()) {message = "输入信息不符合要求!";writeJsonResponse(response, success, message);return ;}if(userInfoService.getUserInfo(userInfo.getUser_name()) != null) {message = "用户名已经存在!";writeJsonResponse(response, success, message);return ;}try {userInfo.setUserPhoto(this.handlePhotoUpload(request, "userPhotoFile"));} catch(UserException ex) {message = "图片格式不正确!";writeJsonResponse(response, success, message);return ;}userInfoService.addUserInfo(userInfo);message = "用户添加成功!";success = true;writeJsonResponse(response, success, message);}/*ajax方式按照查询条件分页查询用户信息*/@RequestMapping(value = { "/list" }, method = {RequestMethod.GET,RequestMethod.POST})public void list(String user_name,String name,String birthDate,String telephone,Integer page,Integer rows, Model model, HttpServletRequest request,HttpServletResponse response) throws Exception {if (page==null || page == 0) page = 1;if (user_name == null) user_name = "";if (name == null) name = "";if (birthDate == null) birthDate = "";if (telephone == null) telephone = "";if(rows != 0)userInfoService.setRows(rows);List<UserInfo> userInfoList = userInfoService.queryUserInfo(user_name, name, birthDate, telephone, page);/*计算总的页数和总的记录数*/userInfoService.queryTotalPageAndRecordNumber(user_name, name, birthDate, telephone);/*获取到总的页码数目*/int totalPage = userInfoService.getTotalPage();/*当前查询条件下总记录数*/int recordNumber = userInfoService.getRecordNumber();response.setContentType("text/json;charset=UTF-8");PrintWriter out = response.getWriter();//将要被返回到客户端的对象JSONObject jsonObj=new JSONObject();jsonObj.accumulate("total", recordNumber);JSONArray jsonArray = new JSONArray();for(UserInfo userInfo:userInfoList) {JSONObject jsonUserInfo = userInfo.getJsonObject();jsonArray.put(jsonUserInfo);}jsonObj.accumulate("rows", jsonArray);out.println(jsonObj.toString());out.flush();out.close();}/*ajax方式按照查询条件分页查询用户信息*/@RequestMapping(value = { "/listAll" }, method = {RequestMethod.GET,RequestMethod.POST})public void listAll(HttpServletResponse response) throws Exception {List<UserInfo> userInfoList = userInfoService.queryAllUserInfo();response.setContentType("text/json;charset=UTF-8"); PrintWriter out = response.getWriter();JSONArray jsonArray = new JSONArray();for(UserInfo userInfo:userInfoList) {JSONObject jsonUserInfo = new JSONObject();jsonUserInfo.accumulate("user_name", userInfo.getUser_name());jsonUserInfo.accumulate("name", userInfo.getName());jsonArray.put(jsonUserInfo);}out.println(jsonArray.toString());out.flush();out.close();}/*前台按照查询条件分页查询用户信息*/@RequestMapping(value = { "/frontlist" }, method = {RequestMethod.GET,RequestMethod.POST})public String frontlist(String user_name,String name,String birthDate,String telephone,Integer currentPage, Model model, HttpServletRequest request) throws Exception {if (currentPage==null || currentPage == 0) currentPage = 1;if (user_name == null) user_name = "";if (name == null) name = "";if (birthDate == null) birthDate = "";if (telephone == null) telephone = "";List<UserInfo> userInfoList = userInfoService.queryUserInfo(user_name, name, birthDate, telephone, currentPage);/*计算总的页数和总的记录数*/userInfoService.queryTotalPageAndRecordNumber(user_name, name, birthDate, telephone);/*获取到总的页码数目*/int totalPage = userInfoService.getTotalPage();/*当前查询条件下总记录数*/int recordNumber = userInfoService.getRecordNumber();request.setAttribute("userInfoList", userInfoList);request.setAttribute("totalPage", totalPage);request.setAttribute("recordNumber", recordNumber);request.setAttribute("currentPage", currentPage);request.setAttribute("user_name", user_name);request.setAttribute("name", name);request.setAttribute("birthDate", birthDate);request.setAttribute("telephone", telephone);return "UserInfo/userInfo_frontquery_result"; }/*前台查询UserInfo信息*/@RequestMapping(value="/{user_name}/frontshow",method=RequestMethod.GET)public String frontshow(@PathVariable String user_name,Model model,HttpServletRequest request) throws Exception {/*根据主键user_name获取UserInfo对象*/UserInfo userInfo = userInfoService.getUserInfo(user_name);request.setAttribute("userInfo", userInfo);return "UserInfo/userInfo_frontshow";}/*ajax方式显示用户修改jsp视图页*/@RequestMapping(value="/{user_name}/update",method=RequestMethod.GET)public void update(@PathVariable String user_name,Model model,HttpServletRequest request,HttpServletResponse response) throws Exception {/*根据主键user_name获取UserInfo对象*/UserInfo userInfo = userInfoService.getUserInfo(user_name);response.setContentType("text/json;charset=UTF-8");PrintWriter out = response.getWriter();//将要被返回到客户端的对象 JSONObject jsonUserInfo = userInfo.getJsonObject();out.println(jsonUserInfo.toString());out.flush();out.close();}/*ajax方式更新用户信息*/@RequestMapping(value = "/{user_name}/update", method = RequestMethod.POST)public void update(@Validated UserInfo userInfo, BindingResult br,Model model, HttpServletRequest request,HttpServletResponse response) throws Exception {String message = "";boolean success = false;if (br.hasErrors()) { message = "输入的信息有错误!";writeJsonResponse(response, success, message);return;}String userPhotoFileName = this.handlePhotoUpload(request, "userPhotoFile");if(!userPhotoFileName.equals("upload/NoImage.jpg"))userInfo.setUserPhoto(userPhotoFileName); try {userInfoService.updateUserInfo(userInfo);message = "用户更新成功!";success = true;writeJsonResponse(response, success, message);} catch (Exception e) {e.printStackTrace();message = "用户更新失败!";writeJsonResponse(response, success, message); }}/*删除用户信息*/@RequestMapping(value="/{user_name}/delete",method=RequestMethod.GET)public String delete(@PathVariable String user_name,HttpServletRequest request) throws UnsupportedEncodingException {try {userInfoService.deleteUserInfo(user_name);request.setAttribute("message", "用户删除成功!");return "message";} catch (Exception e) { e.printStackTrace();request.setAttribute("error", "用户删除失败!");return "error";}}/*ajax方式删除多条用户记录*/@RequestMapping(value="/deletes",method=RequestMethod.POST)public void delete(String user_names,HttpServletRequest request,HttpServletResponse response) throws IOException, JSONException {String message = "";boolean success = false;try { int count = userInfoService.deleteUserInfos(user_names);success = true;message = count + "条记录删除成功";writeJsonResponse(response, success, message);} catch (Exception e) { //e.printStackTrace();message = "有记录存在外键约束,删除失败";writeJsonResponse(response, success, message);}}/*按照查询条件导出用户信息到Excel*/@RequestMapping(value = { "/OutToExcel" }, method = {RequestMethod.GET,RequestMethod.POST})public void OutToExcel(String user_name,String name,String birthDate,String telephone, Model model, HttpServletRequest request,HttpServletResponse response) throws Exception {if(user_name == null) user_name = "";if(name == null) name = "";if(birthDate == null) birthDate = "";if(telephone == null) telephone = "";List<UserInfo> userInfoList = userInfoService.queryUserInfo(user_name,name,birthDate,telephone);ExportExcelUtil ex = new ExportExcelUtil();String _title = "UserInfo信息记录"; String[] headers = { "用户名","姓名","性别","出生日期","用户照片","联系电话","邮箱","注册时间"};List<String[]> dataset = new ArrayList<String[]>(); for(int i=0;i<userInfoList.size();i++) {UserInfo userInfo = userInfoList.get(i); dataset.add(new String[]{userInfo.getUser_name(),userInfo.getName(),userInfo.getGender(),userInfo.getBirthDate(),userInfo.getUserPhoto(),userInfo.getTelephone(),userInfo.getEmail(),userInfo.getRegTime()});}/*OutputStream out = null;try {out = new FileOutputStream("C://output.xls");ex.exportExcel(title,headers, dataset, out);out.close();} catch (Exception e) {e.printStackTrace();}*/OutputStream out = null;//创建一个输出流对象 try { out = response.getOutputStream();//response.setHeader("Content-disposition","attachment; filename="+"UserInfo.xls");//filename是下载的xls的名,建议最好用英文 response.setContentType("application/msexcel;charset=UTF-8");//设置类型 response.setHeader("Pragma","No-cache");//设置头 response.setHeader("Cache-Control","no-cache");//设置头 response.setDateHeader("Expires", 0);//设置日期头 String rootPath = request.getSession().getServletContext().getRealPath("/");ex.exportExcel(rootPath,_title,headers, dataset, out);out.flush();} catch (IOException e) { e.printStackTrace(); }finally{try{if(out!=null){ out.close(); }}catch(IOException e){ e.printStackTrace(); } }}
}
管理员管理控制层:
@Controller
@SessionAttributes("username")
public class SystemController { @Resource AdminService adminService; @Resource UserInfoService userInfoService; @RequestMapping(value="/login",method=RequestMethod.GET)public String login(Model model) {model.addAttribute(new Admin());return "login";}//前台用户登录@RequestMapping(value="/frontLogin",method=RequestMethod.POST)public void frontLogin(@RequestParam("userName")String userName,@RequestParam("password")String password,HttpServletResponse response,HttpSession session) throws Exception { boolean success = true;String msg = ""; if (!userInfoService.checkLogin(userName, password)) { msg = userInfoService.getErrMessage();success = false; } if(success) {session.setAttribute("user_name", userName); }response.setContentType("text/json;charset=UTF-8"); PrintWriter out = response.getWriter(); //将要被返回到客户端的对象 JSONObject json=new JSONObject(); json.accumulate("success", success);json.accumulate("msg", msg);out.println(json.toString()); out.flush(); out.close(); }@RequestMapping(value="/login",method=RequestMethod.POST)public void login(@Validated Admin admin,BindingResult br,Model model,HttpServletRequest request,HttpServletResponse response,HttpSession session) throws Exception { boolean success = true;String msg = ""; if(br.hasErrors()) {msg = br.getAllErrors().toString();success = false; } if (!adminService.checkLogin(admin)) { msg = adminService.getErrMessage();success = false; } if(success) {session.setAttribute("username", admin.getUsername()); } response.setContentType("text/json;charset=UTF-8"); PrintWriter out = response.getWriter(); //将要被返回到客户端的对象 JSONObject json=new JSONObject(); json.accumulate("success", success);json.accumulate("msg", msg);out.println(json.toString()); out.flush(); out.close(); }@RequestMapping("/logout")public String logout(Model model,HttpSession session) {model.asMap().remove("username"); session.invalidate();return "redirect:/login";}@RequestMapping(value="/changePassword",method=RequestMethod.POST)public String ChangePassword(String oldPassword,String newPassword,String newPassword2,HttpServletRequest request,HttpSession session) throws Exception { if(oldPassword.equals("")) throw new UserException("请输入旧密码!");if(newPassword.equals("")) throw new UserException("请输入新密码!");if(!newPassword.equals(newPassword2)) throw new UserException("两次新密码输入不一致"); String username = (String)session.getAttribute("username");if(username == null) throw new UserException("session会话超时,请重新登录系统!");Admin admin = adminService.findAdminByUserName(username); if(!admin.getPassword().equals(oldPassword)) throw new UserException("输入的旧密码不正确!");try { adminService.changePassword(username,newPassword);request.setAttribute("message", java.net.URLEncoder.encode("密码修改成功!", "GBK"));return "message";} catch (Exception e) {e.printStackTrace();request.setAttribute("error", java.net.URLEncoder.encode("密码修改失败!","GBK"));return "error";} }}
房间管理控制层:
//Room管理控制层
@Controller
@RequestMapping("/Room")
public class RoomController extends BaseController {/*业务层对象*/@Resource RoomService roomService;@Resource RoomTypeService roomTypeService;@InitBinder("roomTypeObj")public void initBinderroomTypeObj(WebDataBinder binder) {binder.setFieldDefaultPrefix("roomTypeObj.");}@InitBinder("room")public void initBinderRoom(WebDataBinder binder) {binder.setFieldDefaultPrefix("room.");}/*跳转到添加Room视图*/@RequestMapping(value = "/add", method = RequestMethod.GET)public String add(Model model,HttpServletRequest request) throws Exception {model.addAttribute(new Room());/*查询所有的RoomType信息*/List<RoomType> roomTypeList = roomTypeService.queryAllRoomType();request.setAttribute("roomTypeList", roomTypeList);return "Room_add";}/*客户端ajax方式提交添加房间信息*/@RequestMapping(value = "/add", method = RequestMethod.POST)public void add(@Validated Room room, BindingResult br,Model model, HttpServletRequest request,HttpServletResponse response) throws Exception {String message = "";boolean success = false;if (br.hasErrors()) {message = "输入信息不符合要求!";writeJsonResponse(response, success, message);return ;}if(roomService.getRoom(room.getRoomNo()) != null) {message = "房间编号已经存在!";writeJsonResponse(response, success, message);return ;}try {room.setMainPhoto(this.handlePhotoUpload(request, "mainPhotoFile"));} catch(UserException ex) {message = "图片格式不正确!";writeJsonResponse(response, success, message);return ;}roomService.addRoom(room);message = "房间添加成功!";success = true;writeJsonResponse(response, success, message);}/*ajax方式按照查询条件分页查询房间信息*/@RequestMapping(value = { "/list" }, method = {RequestMethod.GET,RequestMethod.POST})public void list(String roomNo,@ModelAttribute("roomTypeObj") RoomType roomTypeObj,String roomName,String roomState,Integer page,Integer rows, Model model, HttpServletRequest request,HttpServletResponse response) throws Exception {if (page==null || page == 0) page = 1;if (roomNo == null) roomNo = "";if (roomName == null) roomName = "";if (roomState == null) roomState = "";if(rows != 0)roomService.setRows(rows);List<Room> roomList = roomService.queryRoom(roomNo, roomTypeObj, roomName, roomState, page);/*计算总的页数和总的记录数*/roomService.queryTotalPageAndRecordNumber(roomNo, roomTypeObj, roomName, roomState);/*获取到总的页码数目*/int totalPage = roomService.getTotalPage();/*当前查询条件下总记录数*/int recordNumber = roomService.getRecordNumber();response.setContentType("text/json;charset=UTF-8");PrintWriter out = response.getWriter();//将要被返回到客户端的对象JSONObject jsonObj=new JSONObject();jsonObj.accumulate("total", recordNumber);JSONArray jsonArray = new JSONArray();for(Room room:roomList) {JSONObject jsonRoom = room.getJsonObject();jsonArray.put(jsonRoom);}jsonObj.accumulate("rows", jsonArray);out.println(jsonObj.toString());out.flush();out.close();}/*ajax方式按照查询条件分页查询房间信息*/@RequestMapping(value = { "/listAll" }, method = {RequestMethod.GET,RequestMethod.POST})public void listAll(HttpServletResponse response) throws Exception {List<Room> roomList = roomService.queryAllRoom();response.setContentType("text/json;charset=UTF-8"); PrintWriter out = response.getWriter();JSONArray jsonArray = new JSONArray();for(Room room:roomList) {JSONObject jsonRoom = new JSONObject();jsonRoom.accumulate("roomNo", room.getRoomNo());jsonRoom.accumulate("roomName", room.getRoomName());jsonArray.put(jsonRoom);}out.println(jsonArray.toString());out.flush();out.close();}/*前台按照查询条件分页查询房间信息*/@RequestMapping(value = { "/frontlist" }, method = {RequestMethod.GET,RequestMethod.POST})public String frontlist(String roomNo,@ModelAttribute("roomTypeObj") RoomType roomTypeObj,String roomName,String roomState,Integer currentPage, Model model, HttpServletRequest request) throws Exception {if (currentPage==null || currentPage == 0) currentPage = 1;if (roomNo == null) roomNo = "";if (roomName == null) roomName = "";if (roomState == null) roomState = "";List<Room> roomList = roomService.queryRoom(roomNo, roomTypeObj, roomName, roomState, currentPage);/*计算总的页数和总的记录数*/roomService.queryTotalPageAndRecordNumber(roomNo, roomTypeObj, roomName, roomState);/*获取到总的页码数目*/int totalPage = roomService.getTotalPage();/*当前查询条件下总记录数*/int recordNumber = roomService.getRecordNumber();request.setAttribute("roomList", roomList);request.setAttribute("totalPage", totalPage);request.setAttribute("recordNumber", recordNumber);request.setAttribute("currentPage", currentPage);request.setAttribute("roomNo", roomNo);request.setAttribute("roomTypeObj", roomTypeObj);request.setAttribute("roomName", roomName);request.setAttribute("roomState", roomState);List<RoomType> roomTypeList = roomTypeService.queryAllRoomType();request.setAttribute("roomTypeList", roomTypeList);return "Room/room_frontquery_result"; }/*前台查询Room信息*/@RequestMapping(value="/{roomNo}/frontshow",method=RequestMethod.GET)public String frontshow(@PathVariable String roomNo,Model model,HttpServletRequest request) throws Exception {/*根据主键roomNo获取Room对象*/Room room = roomService.getRoom(roomNo);List<RoomType> roomTypeList = roomTypeService.queryAllRoomType();request.setAttribute("roomTypeList", roomTypeList);request.setAttribute("room", room);return "Room/room_frontshow";}/*ajax方式显示房间修改jsp视图页*/@RequestMapping(value="/{roomNo}/update",method=RequestMethod.GET)public void update(@PathVariable String roomNo,Model model,HttpServletRequest request,HttpServletResponse response) throws Exception {/*根据主键roomNo获取Room对象*/Room room = roomService.getRoom(roomNo);response.setContentType("text/json;charset=UTF-8");PrintWriter out = response.getWriter();//将要被返回到客户端的对象 JSONObject jsonRoom = room.getJsonObject();out.println(jsonRoom.toString());out.flush();out.close();}/*ajax方式更新房间信息*/@RequestMapping(value = "/{roomNo}/update", method = RequestMethod.POST)public void update(@Validated Room room, BindingResult br,Model model, HttpServletRequest request,HttpServletResponse response) throws Exception {String message = "";boolean success = false;if (br.hasErrors()) { message = "输入的信息有错误!";writeJsonResponse(response, success, message);return;}String mainPhotoFileName = this.handlePhotoUpload(request, "mainPhotoFile");if(!mainPhotoFileName.equals("upload/NoImage.jpg"))room.setMainPhoto(mainPhotoFileName); try {roomService.updateRoom(room);message = "房间更新成功!";success = true;writeJsonResponse(response, success, message);} catch (Exception e) {e.printStackTrace();message = "房间更新失败!";writeJsonResponse(response, success, message); }}/*删除房间信息*/@RequestMapping(value="/{roomNo}/delete",method=RequestMethod.GET)public String delete(@PathVariable String roomNo,HttpServletRequest request) throws UnsupportedEncodingException {try {roomService.deleteRoom(roomNo);request.setAttribute("message", "房间删除成功!");return "message";} catch (Exception e) { e.printStackTrace();request.setAttribute("error", "房间删除失败!");return "error";}}/*ajax方式删除多条房间记录*/@RequestMapping(value="/deletes",method=RequestMethod.POST)public void delete(String roomNos,HttpServletRequest request,HttpServletResponse response) throws IOException, JSONException {String message = "";boolean success = false;try { int count = roomService.deleteRooms(roomNos);success = true;message = count + "条记录删除成功";writeJsonResponse(response, success, message);} catch (Exception e) { //e.printStackTrace();message = "有记录存在外键约束,删除失败";writeJsonResponse(response, success, message);}}/*按照查询条件导出房间信息到Excel*/@RequestMapping(value = { "/OutToExcel" }, method = {RequestMethod.GET,RequestMethod.POST})public void OutToExcel(String roomNo,@ModelAttribute("roomTypeObj") RoomType roomTypeObj,String roomName,String roomState, Model model, HttpServletRequest request,HttpServletResponse response) throws Exception {if(roomNo == null) roomNo = "";if(roomName == null) roomName = "";if(roomState == null) roomState = "";List<Room> roomList = roomService.queryRoom(roomNo,roomTypeObj,roomName,roomState);ExportExcelUtil ex = new ExportExcelUtil();String _title = "Room信息记录"; String[] headers = { "房间编号","房间类型","房间名称","房间主图","房间价格","房间状态"};List<String[]> dataset = new ArrayList<String[]>(); for(int i=0;i<roomList.size();i++) {Room room = roomList.get(i); dataset.add(new String[]{room.getRoomNo(),room.getRoomTypeObj().getTypeName(),room.getRoomName(),room.getMainPhoto(),room.getPrice() + "",room.getRoomState()});}/*OutputStream out = null;try {out = new FileOutputStream("C://output.xls");ex.exportExcel(title,headers, dataset, out);out.close();} catch (Exception e) {e.printStackTrace();}*/OutputStream out = null;//创建一个输出流对象 try { out = response.getOutputStream();//response.setHeader("Content-disposition","attachment; filename="+"Room.xls");//filename是下载的xls的名,建议最好用英文 response.setContentType("application/msexcel;charset=UTF-8");//设置类型 response.setHeader("Pragma","No-cache");//设置头 response.setHeader("Cache-Control","no-cache");//设置头 response.setDateHeader("Expires", 0);//设置日期头 String rootPath = request.getSession().getServletContext().getRealPath("/");ex.exportExcel(rootPath,_title,headers, dataset, out);out.flush();} catch (IOException e) { e.printStackTrace(); }finally{try{if(out!=null){ out.close(); }}catch(IOException e){ e.printStackTrace(); } }}
}
源码获取:博客首页 "资源" 里下载!
相关文章:

Linux访问Windows磁盘实现共享
业务需求说明:公司在部署hadoop集群和DB server与SAN存储,公司的想法是前端通过DB Server能够将非结构化的数据能放进SAN存储当中,而hadoop集群也能够访问这个SAN存储。因此需要在SAN磁盘阵列中开辟一个共享区域,这个区域技能让DB…

ubuntu环境ceph配置入门(一)
为什么80%的码农都做不了架构师?>>> 环境:ubuntu server 14.04 64bit,安装ceph版本0.79 正常情况下应有多个主机,这里为了快速入门以一台主机为例,多台主机配置方式类似。 1. 配置静态IP及主机名 静态IP配…

mysql查看当前实时连接数
静态查看: SHOW PROCESSLIST; SHOW FULL PROCESSLIST; SHOW VARIABLES LIKE %max_connections%; SHOW STATUS LIKE %Connection%; 实时查看: mysql> show status like Threads%; -------------------------- | Variable_name | Value | ------------…

lsof 简介
lsof简介 lsof(listopen files)是一个列出当前系统打开文件的工具。在linux环境下,任何事物都以文件的形式存在,通过文件不仅仅可以访问常规数据,还可以访问网络连接和硬件。所以如传输控制协议 (TCP) 和用户数据报协…

Java项目:健身器材商城系统(java+Jdbc+Servlet+Ajax+Fileupload+mysql)
源码获取:博客首页 "资源" 里下载! 一、项目运行 环境配置: Jdk1.8 Tomcat8.5 mysql Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持) 项目技术: Jdbc Servlert html css JavaScrip…

Xcode中如何解决无法使用svn命令行的问题
今天在自己机器上安装了xp虚拟机,然后在xp虚拟机上安装了svn的服务器.发现原本Xcode5以后就自带的svn竟然在终端无法使用命令行,出现了以下的错误: xcrun: error: active developer path ("/Volumes/Xcode/Xcode.app/Contents/Developer") does not exist, use xcode…

查看和设置MySQL数据库字符集(转)
查看和设置MySQL数据库字符集作者:scorpio 2008-01-21 10:05:17 标签: 杂谈 Liunx下修改MySQL字符集:1.查找MySQL的cnf文件的位置find / -iname *.cnf -print /usr/share/mysql/my-innodb-heavy-4G.cnf/usr/share/mysql/my-large.cnf/usr/sha…

数据库管理工具dbeaver
https://dbeaver.io/ 转载于:https://www.cnblogs.com/mingzhang/p/11016229.html

linux文件权限详解
linux文件权限详解 一、文件和目录权限概述在linux中的每一个文件或目录都包含有访问权限,这些访问权限决定了谁能访问和如何访问这些文件和目录。通过设定权限可以从以下三种访问方式限制访问权限:只允许用户自己访问;允许一个预先指定的用户…

linux定时器(crontab)实例
linux实验示例----实现每2分钟将“/etc”下面的文件打包存储到“/usr/lobal”目录下 Step1:编辑当前用户的crontab并保存终端输入:>crontab -u root -l #查看root用户设置的定时器>crontab -u root -e #进入vi编译模式 00-59/2 * * * * /bin/bash …

Java项目:晚会抽奖系统(java+Jdbc+Servlet+Ajax+mysql)
源码获取:博客首页 "资源" 里下载! 一、项目运行 环境配置: Jdk1.8 Tomcat8.5 mysql Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持) 项目技术: Jdbc Servlert html css JavaScrip…

hdu 4587 2013南京邀请赛B题/ / 求割点后连通分量数变形。
题意:求一个无向图的,去掉两个不同的点后最多有几个连通分量。 思路:枚举每个点,假设去掉该点,然后对图求割点后连通分量数,更新最大的即可。算法相对简单,但是注意几个细节: 1&…

javascript中 (function(){})();如何理解?
javascript中 (function(){})();如何理解? javascript中: (function(){})()是匿名函数,主要利用函数内的变量作用域,避免产生全局变量,影响整体页面环境,增加代码的兼容性。 (function(){})是一个标准的函数定义,但是…
通过IP地址和子网掩码与运算计算相关地址
知道ip地址和子网掩码后可以算出: 1、网络地址 2、广播地址 3、地址范围 4、本网有几台主机 例1:下面例子IP地址为1921681005子网掩码是2552552550。算出网络地址、广播地址、地址范围、主机数。 一)分步骤计算 1) 将IP地址和子网掩码换算为二进制…

Java项目:兼职平台系统(java+Springboot+ssm+HTML+maven+Ajax+mysql)
源码获取:博客首页 "资源" 里下载! 一、项目运行 环境配置: Jdk1.8 Tomcat8.5 mysql Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持) 项目技术: HTML Springboot SpringMVC MyBatis…

java实现时间的比较
时间大小的比较以及把String类型的时间转换为Date类是时间在开发中是非常常见的,下面的主要是一个工具方法 public class Test {public static void main(String[] args) {// TODO Auto-generated method stubString sTime "2015-07-13";String fTime &…

在eclipse中通过基于spring data的easyrest风格的maven项目操纵cassandra和lucene
一、项目前提步骤1>、创建键空间CREATE KEYSPACE mykeyspaceWITH REPLICATION { class : SimpleStrategy, replication_factor : 1 };2>、创建表和关系数据库一样,开发前需要先建表,再操纵CREATE TABLE tweet (id uuid PRIMARY KEY,nickName text…

JAVA 多线程实现包子铺(买包子,吃包子)
1 package baozi;2 3 /*4 生产者(包子铺)类:是一个 线程类,继承Thread5 设置线程任务(run):生产包子6 对包子 进行判断7 true:有包子8 包子铺调用wait方法进…

字符串面试题(一)字符串逆序
字符串逆序可以说是最经常考的题目。这是一道入门级的题目,相信80%的程序员经历过这道题。给定一个字符串s,将s中的字符顺序颠倒过来,比如s"abcd",逆序后变成s"dcba"。 普通逆序 基本上没有这么考的…

Java项目:在线淘房系统(租房、购房)(java+SpringBoot+Redis+MySQL+Vue+SpringSecurity+JWT+ElasticSearch+WebSocket)
源码获取:博客首页 "资源" 里下载! 该系统有三个角色,分别是:普通用户、房屋中介、管理员。普通用户的功能:浏览房屋信息、预约看房、和中介聊天、申请成为中介等等。房屋中介的功能:发布房屋信息…

Be a person
做人不能太实诚 尤其是干我们这行的 多久时间能做完 你自己心里要有个估算 然后把时间再往后延 别他妈给自己找罪受 转载于:https://www.cnblogs.com/wskgjmhh/p/4644840.html

Solr配置文件分析与验证
前面一篇开始学习solr的时候,做了个入门的示例http://6738767.blog.51cto.com/6728767/1401865。虽然可以检索出内容,但总和想象的结果有差异——比如,检索“天龙”两个字,按常规理解,就应该只出来《天龙八部》才对&am…

oracle启用归档日志
一、开启归档 1、查看归档信息 SQL> archive log list Database log mode No Archive Mode Automatic archival Disabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 244 Current log sequence …

C++派生类与基类构造函数调用次序
本文用来测试C基类和派生类构造函数,析构函数,和拷贝构造函数的调用次序。运行环境:SUSE Linux Enterprise Server 11 SP2 (x86_64) #include <iostream>using namespace std;class Base{public:Base(){cout << "Base Cons…

Java项目:在线点餐系统(java+Springboot+Maven+mybatis+Vue+mysql+Redis)
源码获取:博客首页 "资源" 里下载! 项目描述: 这是一个基于SpringBootVue框架开发的在线点餐系统。首先,这是一个前后端分离的项目。具有一个在线点餐系统该有的所有功能。 项目功能: 此项目分为两个角色&…

js 打开窗口window.open
js改变原有的地址 window.open(webPath/index?codecode,_self); 转载于:https://www.cnblogs.com/hwaggLee/p/4645680.html

中兴SDH原理介绍及中兴E300网管介绍
姓名苟忠兴培训课程中兴SDH原理介绍及中兴E300网管介绍培训心得1、 SDH概念:SDH(Synchronous Digital Hierarchy,同步数字体系)是一种将复接、线路传输及交换功能融为一体、并由统一网管系统操作的综合信息传送网络。2、 PDH缺点&…

bootstrap 冻结表格,冻结表头
需要的文件下载: bootstrap-table:https://github.com/wenzhixin/bootstrap-table bootstrap-table-fiex-column:https://github.com/wenzhixin/bootstrap-table-fixed-columns 参考来源:https://www.cnblogs.com/Kyaya/p/9004237.html 1.引入文件 2. bo…

Linux多线程与同步
作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明。谢谢! 典型的UNIX系统都支持一个进程创建多个线程(thread)。在Linux进程基础中提到,Linux以进程为单位组织操作,Linux中的线程也…

Java项目:校园外卖点餐系统(java+SSM+JSP+maven+mysql)
源码获取:博客首页 "资源" 里下载! 一、项目简述 环境配置: Jdk1.8 Tomcat8.5 mysql Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持) 项目技术: JSP Spring SpringMVC MyBatis cs…