当前位置: 首页 > 编程日记 > 正文

Java项目:旅游网站管理系统设计和实现(java+springboot+jsp+mysql+spring)

源码获取:博客首页 "资源" 里下载!

运行环境: java jdk 1.8
IDE环境: IDEA
tomcat环境: Tomcat 7.x,8.x,9.x版本均可
主要功能说明: 
管理员角色包含以下功能:管理员登录,用户管理,旅游路线管理,旅游景点管理,酒店管理,旅游攻略管理,车票管理,订单管理,数据分析等功能。
用户角色包含以下功能:用户注册,用户登录,旅游路线预定,旅游景区预定,餐饮住宿,车票预定,旅游保险预定,旅游攻略,我的订单查看,个人资料管理等功能。
用了技术框架: HTML+CSS+JavaScript+jsp+mysql+Spring+Springboot+mybatis+maven+layui
所用的数据库: Mysql数据库

主要功能截图:


用户端:

注册和登录

首页功能菜单展示:

线路管理

旅游景点查看和预订等、预订完成在我的订单查看付款

餐饮查看和预订等、预订完成在我的订单查看付款

车票查看和预订等、预订完成在我的订单查看付款

保险查看和预订等、预订完成在我的订单查看付款

旅游攻略

注意事项:

后台管理员功能:


数据分析:

星级景点业务:

/*** @Author: yy*/
@Controller
@CrossOrigin
@RequestMapping("/travel")
public class RecomTravelController {@Autowiredprivate ScenicService scenicService;@Autowiredprivate ScenicDao scenicDao;@Autowiredprivate HotelService hotelService;@Autowiredprivate HotelDao hotelDao;/***查询星级* @return*/@ResponseBody@RequestMapping(value = "/star",method = RequestMethod.POST)public Result judgeStar(String id,String start){System.out.println(id+"===="+start);Optional<Scenic> s = scenicDao.findById(id);if (s.isPresent()){Scenic scenic = s.get();int valuestar = (Integer.valueOf(start)+Integer.valueOf(scenic.getStart()))/2;scenic.setStart(valuestar);scenicDao.save(scenic);System.out.println("数据不为空!");return new Result(true,1,"","");}else {System.out.println("数据为空!");return new Result(false,0,"","");}}/***查询星级* @return*/@ResponseBody@RequestMapping(value = "/hotel",method = RequestMethod.POST)public Result judgeHotelStar(Long id,String start){Hotel scenic = hotelService.findById(id);if (scenic!=null){int valuestar = (Integer.valueOf(start)+Integer.valueOf(scenic.getStar()))/2;scenic.setStar(valuestar);hotelDao.save(scenic);System.out.println("数据不为空!");return new Result(true,1,"","");}else {System.out.println("数据为空!");return new Result(false,0,"","");}}/*** 查询单个景点* @param model* @param id* @return*/@RequestMapping("/oneAttr")public String One_attr(Model model,Long id){Scenic scenic=scenicService.findById(id);model.addAttribute("oneAttr",scenic);return "page/product";}/*** 景点模糊查询分页* @param model* @param start* @param limit* @param search_key* @return*/@RequestMapping("/search_attrs")public String search_attrs(Model model,@RequestParam(value = "start" ,defaultValue = "0")Integer start,@RequestParam(value = "limit" ,defaultValue = "6")Integer limit,@RequestParam String search_key){start=start<0?0:start;Sort sort=new Sort(Sort.Direction.DESC,"id");Pageable pageable=PageRequest.of(start,limit,sort);Specification specification=new Specification() {@Overridepublic Predicate toPredicate(Root root, CriteriaQuery criteriaQuery, CriteriaBuilder criteriaBuilder) {List<Predicate> scenics=new ArrayList<>();if (StringUtils.isNotBlank(search_key)){scenics.add( criteriaBuilder.like(root.get("name"),"%"+search_key+"%"));}return criteriaBuilder.and(scenics.toArray(new Predicate[scenics.size()]));}};Page<Scenic> page=scenicDao.findAll(specification,pageable);model.addAttribute("name",search_key);model.addAttribute("attrs",page);model.addAttribute("number",page.getNumber());model.addAttribute("numberOfElements",page.getNumberOfElements());model.addAttribute("size",page.getSize());model.addAttribute("totalElements",page.getTotalElements());model.addAttribute("totalPages",page.getTotalPages());model.addAttribute("first",page.isFirst());model.addAttribute("last",page.isLast());return "page/travel";}@RequestMapping("/local")public String localRefresh(Model model,Long id) {Scenic scenic=scenicService.findById(id);System.out.println(scenic.toString());List<Hotel> hotels=hotelService.findByCountryLike(scenic.getContry());Collections.sort(hotels, new Comparator<Hotel>() {@Overridepublic int compare(Hotel o1, Hotel o2) {if (o1.getStar()<o2.getStar()){return 2;}if (o1.getStar().equals(o2.getStar()) ){return 1;}return -1;}});if (hotels.size()>=4){List newList=hotels.subList(0,3);model.addAttribute("scenics",newList);System.out.println("个数:"+newList.size());}else {model.addAttribute("scenics",hotels);System.out.println("个数2:"+hotels.size());}return "page/product::table_refresh";}}

订单控制层:

/*** 控制器层* @author yy**/
@Controller
@CrossOrigin
@RequestMapping("/orders")
public class OrdersController {@Autowiredprivate OrdersService ordersService;@Autowiredprivate HotelOrdersService hotel_ordersService;@Autowiredprivate HotelService hotelService;@Autowiredprivate ScenicService scenicService;/*** 查询全部数据* @return*/@ResponseBody@RequestMapping(value = "/list",method= RequestMethod.GET)public Result findAll(){List<Orders> all = ordersService.findAll();return new Result(true, StatusCode.OK,"查询成功",all,all.size());}/*** 查询全部订单* @return*/@ResponseBody@RequestMapping(value = "/allorders",method = RequestMethod.POST)public String findAllOrders(HttpSession session, Model model) throws ParseException {User user= (User) session.getAttribute("user");model.addAttribute("orders",ordersService.findOrders(user.getId().toString()));return "index_header::table_refresh";}/*** 查询全部订单* @return*/@ResponseBody@RequestMapping(value = "/allorder",method = RequestMethod.POST)public List<Orders> findAllOrder(HttpSession session) throws ParseException {User user= (User) session.getAttribute("user");return ordersService.findOrders(user.getId().toString());}/*** 查询全部订单* @return*/@ResponseBody@RequestMapping(value = "/allorderhotel",method = RequestMethod.POST)public List<HotelOrders> findAllOrderHotel(HttpSession session){User user= (User) session.getAttribute("user");List<HotelOrders> hotel_orders=hotel_ordersService.hotel_orders(user.getId());return hotel_orders;}/*** 根据ID查询* @param id ID* @return*/@ResponseBody@RequestMapping(value="/{id}",method= RequestMethod.GET)public Result findById(@PathVariable Long id){return new Result(true,StatusCode.OK,"查询成功",ordersService.findById(id));}/*** 分页+多条件查询* @param searchMap 查询条件封装* @param page 页码* @param size 页大小* @return 分页结果*/@ResponseBody@RequestMapping(value="/search/{page}/{size}",method=RequestMethod.POST)public Result findSearch(@RequestBody Map searchMap , @PathVariable int page, @PathVariable int size){Page<Orders> pageList = ordersService.findSearch(searchMap, page, size);return  new Result(true,StatusCode.OK,"查询成功",  new PageResult<Orders>(pageList.getTotalElements(), pageList.getContent()) );}/*** 根据条件查询* @param searchMap* @return*/@ResponseBody@RequestMapping(value="/search",method = RequestMethod.POST)public Result findSearch( @RequestBody Map searchMap){return new Result(true,StatusCode.OK,"查询成功",ordersService.findSearch(searchMap));}/*** 订单添加操作* @param orders*/@ResponseBody@RequestMapping(value ="/add",method=RequestMethod.POST)public Result add(Orders orders, HttpSession session){//获取数量User user = (User) session.getAttribute("user");if (user == null){return new Result(false,StatusCode.ACCESSERROR,"请登录");}return ordersService.add(orders,user.getId(),orders.getId(),orders.getQty());}/*** 修改* @param*/@ResponseBody@RequestMapping(value="/{id}",method= RequestMethod.PUT)public Result update(@PathVariable Long id){ordersService.updateStatus(id);return new Result(true,StatusCode.OK,"修改成功");}/*** 删除* @param id*/@ResponseBody@RequestMapping(value="/{id}",method= RequestMethod.DELETE)public Result delete(@PathVariable Long id ){ordersService.deleteById(id);return new Result(true,StatusCode.OK,"删除成功");}@RequestMapping(value = "/ordersList")public String ordersList(){return "admin/ordersmanage/orderslist";}/*** 酒店评分* @param hotel* @return*/@ResponseBody@PostMapping("/hotelOrderStar")public Result hotelOrderStar(Hotel hotel,@RequestParam("orderId")Long orderId){Long id = hotel.getId();Hotel newHotel = hotelService.findById(id);if(newHotel==null){return new Result(false,StatusCode.ERROR,"未找到该酒店!");}Integer currentStar = hotel.getStar();Integer totalStar = newHotel.getStar();if(currentStar<0){return new Result(false,StatusCode.ERROR,"请选择评分!");}Integer commentCount = newHotel.getCommentCount();commentCount=commentCount+1;totalStar=currentStar+totalStar;int avgStar = totalStar / commentCount;hotel.setCommentCount(commentCount);hotel.setStar(avgStar);Integer hotel1 = hotelService.updateStar(hotel);hotel_ordersService.updateStarStatus(orderId);if(hotel1==null){return new Result(false,StatusCode.ERROR,"评分更新失败!");}return new Result(true,StatusCode.OK,"评价成功!");}/*** 景点评分* @param scenic* @return*/@ResponseBody@PostMapping("/travelOrderStar")public Result travelOrderStar(Scenic scenic,@RequestParam("orderId")Long orderId){Long id = scenic.getId();Scenic newScenic = scenicService.findById(id);if(newScenic==null){return new Result(false,StatusCode.ERROR,"未找到该景点!");}Integer totalStar = newScenic.getStart();Integer currentStar = scenic.getStart();if(currentStar<0){return new Result(false,StatusCode.ERROR,"请选择评分!");}Integer commentCount = newScenic.getCommentCount();commentCount=commentCount+1;totalStar=currentStar+totalStar;int avgStar = totalStar / commentCount;scenic.setCommentCount(commentCount);scenic.setStart(avgStar);Integer scenic1 = scenicService.updateStar(scenic);ordersService.updateStarStatus(orderId);if(scenic1==null){return new Result(false,StatusCode.ERROR,"评分更新失败!");}return new Result(true,StatusCode.OK,"评价成功!");}}

酒店信息控制层:

/*** 控制器层* @author yy**/
@Controller
@CrossOrigin
@RequestMapping("/hotel")
public class HotelController {@Autowiredprivate HotelService hotelService;@Autowiredprivate ScenicService scenicService;/*** 查询全部酒店信息* @return*/@ResponseBody@RequestMapping(value = "/list",method= RequestMethod.GET)public Result findAll(){List<Hotel> all = hotelService.findAll();return new Result(true, StatusCode.OK,"查询成功",all,all.size());}/*** 根据ID查询* @param id ID* @return*/@ResponseBody@RequestMapping(value="/{id}",method= RequestMethod.GET)public Result findById(@PathVariable Long id){return new Result(true,StatusCode.OK,"查询成功",hotelService.findById(id));}/*** 酒店添加操作* @param hotel*/@ResponseBody@RequestMapping(value = "/add",method=RequestMethod.POST)public Result add(Hotel hotel){if(StringUtils.isEmpty(hotel.getName())){return new Result(false,StatusCode.ERROR,"请填写酒店名称");}if(StringUtils.isEmpty(hotel.getImg())){return new Result(false,StatusCode.ERROR,"请上传酒店封面图片");}if(StringUtils.isEmpty(hotel.getAddr())){return new Result(false,StatusCode.ERROR,"请填写酒店地址");}if(StringUtils.isEmpty(hotel.getMiaoshu())){return new Result(false,StatusCode.ERROR,"请填写酒店描述");}hotel.setCommentCount(0);hotel.setStar(0);if(hotelService.add(hotel)==null){return new Result(false,StatusCode.ERROR,"酒店添加失败");}return new Result(true,StatusCode.OK,"添加成功");}/*** 分页+多条件查询* @param searchMap 查询条件封装* @param page 页码* @param size 页大小* @return 分页结果*/@ResponseBody@RequestMapping(value="/search/{page}/{size}",method=RequestMethod.POST)public Result findSearch(@RequestBody Map searchMap , @PathVariable int page, @PathVariable int size){Page<Hotel> pageList = hotelService.findSearch(searchMap, page, size);return  new Result(true,StatusCode.OK,"查询成功",  new PageResult<Hotel>(pageList.getTotalElements(), pageList.getContent()) );}/*** 根据条件查询* @param searchMap* @return*/@ResponseBody@RequestMapping(value="/search",method = RequestMethod.POST)public Result findSearch( @RequestBody Map searchMap){return new Result(true,StatusCode.OK,"查询成功",hotelService.findSearch(searchMap));}/*** 修改* @param hotel*/@ResponseBody@RequestMapping(value="/edit",method= RequestMethod.PUT)public Result update(Hotel hotel){Hotel hotelById = hotelService.findById(hotel.getId());if(hotelById==null){return new Result(false,StatusCode.ERROR,"该酒店信息不存在");}if(StringUtils.isEmpty(hotel.getName())){return new Result(false,StatusCode.ERROR,"请填写酒店名称");}BeanUtils.copyProperties(hotel,hotelById,"id","img","miaoshu","day","startdate","addr","commentCount");if(hotelService.update(hotelById)==null){return new Result(false,StatusCode.ERROR,"酒店编辑失败");}return new Result(true,StatusCode.OK,"修改成功");}/*** 删除* @param id*/@ResponseBody@RequestMapping(value="/{id}",method= RequestMethod.DELETE)public Result delete(@PathVariable String id ){hotelService.deleteById(id);return new Result(true,StatusCode.OK,"删除成功");}/*** 酒店列表跳转路径* @return*/@RequestMapping(value = "/hotelList")public String hotelList(){return "admin/hotelmanage/hotelList";}@RequestMapping(value = "/hotelAdd")public String hotelAdd(){return "admin/hotelmanage/hotelAdd";}/*** 查询单个酒店* @param model* @param id* @return*/@RequestMapping("/oneAttr")public String One_attr(Model model, Long id){Hotel scenic=hotelService.findById(id);model.addAttribute("oneAttr",scenic);return "page/hotelDetail";}@RequestMapping("/local")public String localRefresh(Model model,Long id) {Hotel hotel=hotelService.findById(id);//	Sort sort=new Sort(Sort.Direction.DESC,"star");System.out.println("1111"+hotel.toString());List<Scenic> scenics=scenicService.findByCountryLike(hotel.getAddr());System.out.println("2222"+scenics.toString());Collections.sort(scenics, new Comparator<Scenic>() {@Overridepublic int compare(Scenic o1, Scenic o2) {if (o1.getStart()<o2.getStart()){return 2;}if (o1.getStart().equals(o2.getStart()) ){return 1;}return -1;}});if (scenics.size()>=4){List newList=scenics.subList(0,3);model.addAttribute("scenics",newList);}else {model.addAttribute("scenics",scenics);}return "page/hotelDetail::table_refresh";}
}

源码获取:博客首页 "资源" 里下载!

相关文章:

稀疏矩阵十字链表表示

类型定义 #include<stdio.h> #include<malloc.h> #include<stdlib.h> #define MAX 100 /*稀疏矩阵的十字链表表示&#xff1a;非零元素节点与表头节点公用一种类型 */ typedef struct matrixnode {int row,col;struct matrixnode *right,*down;union{int val…

thrift框架使用C++

2019独角兽企业重金招聘Python工程师标准>>> 1. 编写thrift接口文件student.thrift struct Student{1: i32 sno,2: string sname,3: bool ssex,4: i16 sage, } service Serv{i32 put(1: Student s), } 2. 用“thrift -r --gen cpp student.thrift”在gen-cpp文件夹中…

shell编程:实现shell字符串连接功能

功能&#xff1a;实现shell字符串连接功能 a0 s1test. s2.wav s3.mp3 s40 s500str"sox ./${s1}${a}${s2} ./${a}${s3}"./tts -c bcgirl.0.0.4.bin -b 1 -i input.txt -s 1.0 -speed 1.0 $str rm ./*.wav转载于:https://www.cnblogs.com/kay2018/p/10673110.html

一文运维zookeeper

文章目录1. zookeeper生产环境的安装配置1.1 软件配置1.2 硬件配置1.3 日志配置文件1.4 配置三节点的zookeeper集群2. zookeeper的监控方法2.1 four letters命令2.2 JMX 监控方式3. 通过zookeeper observer实现跨地域部署3.1 什么是observer3.2 observer 提升 写性能3.3 observ…

Java项目:电商书城平台系统设计和实现(java+springboot+mysql+spring+jsp)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; JAVA springboot 电商书城平台系统(已调试) 主要实现了书城网站的浏览、加入购物车操作、订单操作、支付操作、分类查看、搜索、以及后台上传图书信息以及订单管理和一些基本操作功能 主要功能截图如下&…

(周三赛)FATE

//题意 打怪的经验值 &#xff0c;消耗忍耐度 看升级后还能保留的最大忍耐度 用 背包去做&#xff0c;不是很会啊 T T Description 最近xhd正在玩一款叫做FATE的游戏&#xff0c;为了得到极品装备&#xff0c;xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感&#…

ASP.NET MVC 3中ViewBag, ViewData和 TempData

ViewBag, ViewData十分类似&#xff0c;都可用于把数据从controller传递到view。 ViewBag是WebViewPage中的一个属性&#xff0c;它的类型是dynamic。dynamic类型可以理解为&#xff0c;编译器在编译到这种类型时&#xff0c;会跳过类型检查&#xff0c;而在运行时做这些事情。…

如何在指定文件夹下进入jupyter notebook

第一步&#xff1a; 打开 Anaconda Prompt 第二步&#xff1a; 查看文件夹所在路径 例如&#xff1a;你有个jupyterwork文件夹在 D:\ 路径下 第三步&#xff1a; 在Anaconda Prompt依次输入一下命令&#xff1a; d:cd jupyterworkjupyter notebook完成。转载于:https://www.cnb…

Go 分布式学习利器(16) -- go中可复用的package构建

通过本文&#xff0c;你将了解go 语言中如何将自己的package构建到项目中 以及如何将远程&#xff08;github&#xff09;的package构建到项目中。 1. 构建本地的package package 是可复用模块的基本单元&#xff0c;以首字母大写的函数实现来表明可被包外代码访问代码的pack…

JQuery UI

//拖拽插件 draggable <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns"http://www.w3.org/1999/xhtml"><head><title>拖曳…

Java项目:房屋租赁系统设计和实现(java+ssm+mysql+spring+jsp)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 主要功能描述&#xff1a; 1.登录管理&#xff1a;主要有管理员登录和租客登录 2.房源列表以及添加房源功能&#xff1a; 3.租赁合同管理以及在租房源和已退租房源信息管理: 4.看房申请和退租申请管理&a…

学习网页制作中如何在正确选取和使用 CSS 单位

在 CSS 测量系统中&#xff0c;有好几种单位&#xff0c;如像素、百分比、英寸、厘米等等&#xff0c;Web 开发人员很难了解哪些单位在何处使用&#xff0c;如何使用。很多人习惯了总是使用同一种单位&#xff0c;但这一决定可能会严重限制你的设计的执行。 这里推荐的《Which …

SPOJ GSS3-Can you answer these queries III-分治+线段树区间合并

Can you answer these queries III SPOJ - GSS3 这道题和洛谷的小白逛公园一样的题目。 传送门&#xff1a; 洛谷 P4513 小白逛公园-区间最大子段和-分治线段树区间合并(单点更新、区间查询) 代码: 1 #include<bits/stdc.h>2 using namespace std;3 typedef long long l…

Zookeeper ZAB协议原理浅析

文章目录前言1. 基本角色和概念2. Leader Election3. Discovery4. Synchronization5. BroadCast后记前言 DTCC 要在下周一到周三要在北京举办&#xff0c;身边有不少人都去参加了&#xff0c;领略中国最为领先的一些公司的自研存储技术。 阿里自研polardb&#xff0c;polardb-…

Java项目:仓库管理系统设计和实现(java+ssm+springboot+layui)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 主要功能模块 1.用户模块管理&#xff1a;用户登录、用户注册、用户的查询、添加、删除操作、 2.客户信息管理&#xff1a;.客户列表的展示、添加、修改、删除操作、 3.供应商管理&#xff1a;供应商详情…

Java Web 中的一些问题

http://localhost:8080/struts2demo/online/userLogin.jsp 请求模式 :// 主机名名称&#xff08;或者服务器名称&#xff09; : 端口 / Servlet容器的名称&#xff08;通常为项目名称&#xff09; / 自定义的网页文件夹名或者映射中的文件包名 / 网页名称及其后缀或者响应动作…

《零成本实现Web自动化测试--基于Selenium》第一章 自动化测试基础

第一篇 Selenium 和WebDriver工具篇 第一章 自动化测试基础 1.1 初识自动化测试 自动化测试有两种常见方式 1.1.1 代码驱动测试&#xff0c;又叫测试驱动开发&#xff08;TDD&#xff09; 1.1.2 图形用户接口测试: 测试框架产生用户接口事件&#xff08;例如键盘敲击&#x…

第11章 AOF持久化

AOF持久化在硬盘上保存的是对Redis进行的逻辑操作&#xff0c;类似InnoDB中的bin log。说白了就是你对一个Redis输入了哪些语句&#xff0c;AOF文件都会原封不动的保存起来&#xff0c;等到需要回复Redis的时候再把这些语句执行一遍。 11.1 AOF持久化的实现 AOF简单的理解是把执…

Go 语言实现字符串匹配算法 -- BF(Brute Force) 和 RK(Rabin Karp)

今天介绍两种基础的字符串匹配算法&#xff0c;当然核心还是熟悉一下Go的语法&#xff0c;巩固一下基础知识 BF(Brute Force)RK(Rabin Karp) 源字符串&#xff1a;src, 目标字符串:dest&#xff1b; 确认dest是否是src 的一部分。 BF算法很简单暴力&#xff0c;维护两个下标…

Java项目:前后端分离网上手机商城平台系统设计和实现(java+vue+redis+springboot+mysql+ssm)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 主要模块设计如下&#xff1a; 前后端主要技术&#xff1a;Java springboot springMVC mybatis mysql vue jquery node.js redis 1) 用户注册和登录功能&#xff1a;。 2) 用户信息的管理以及角色的…

利用AutoSPSourceBuilder和Autospinstaller自动安装SharePoint Server 2013图解教程——Part 1...

这是一篇对之前 《利用AutoSPSourceBuilder和Autospinstaller自动安装SharePoint Server 2013图解教程——Part 2》的补充。本篇博客将对AutoSPSourceBuilder的使用进行说明。 AutoSPSourceBuilder介绍 下载AutoSPSourceBuilder点击进入AutoSPSourceBuilder的官网&#xff0c;找…

Git 版本还原命令

转载&#xff1a;https://blog.csdn.net/yxlshk/article/details/79944535 1.需求场景&#xff1a; 在利用github实现多人协作开发项目的过程中&#xff0c;有时会出现错误提交的情况&#xff0c;此时我们希望能撤销提交操作&#xff0c;让当前版本回到提交前的样子或者某一个版…

NVME CLI -- nvme 命令查看NVME设备内部状态

文章目录NVME 和 AHCI 性能比较NVME-CLI nvme工具使用1. 安装2. 命令综述3. 基本命令演示4. NVME 固件设备升级近期在做一些rocksdb on 新硬件的性能测试&#xff08;flash ssd, nvme ssd , nvme optane ssd, optane persistent memory&#xff09;&#xff0c;由于底层一些设备…

Java项目:网上水果蔬菜项目系统设计和实现(java+springboot+mysql+ssm)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 主主要技术&#xff1a;java springmvc springboot mybatis mysql jquery layui 等技术要模块设计如下&#xff1a; 用户角色的功能&#xff1a; 登录、注册、浏览商品、修改个人信息&#xff08;上传…

POJ 1189 记忆化搜索

钉子和小球Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7218 Accepted: 2164Description 有一个三角形木板,竖直立放&#xff0c;上面钉着n(n1)/2颗钉子&#xff0c;还有(n1)个格子&#xff08;当n5时如图1&#xff09;。每颗钉子和周围的钉子的距离都等于d&am…

Android短信管家视频播放器代码备份

自己保留备份&#xff0c;增强记忆 这是video的类 public class VideoActivity extends Activity {/*** 解析网络页面*/private WebView wv;/*** 进度条类*/private ProgressDialog pd;/*** 异步处理消息*/private Handler handler;private static final int SHOW 0;private s…

Python常用函数--文档字符串DocStrings

Python 有一个甚是优美的功能称作python文档字符串&#xff08;Documentation Strings&#xff09;&#xff0c;在称呼它时通常会使用另一个短一些的名字docstrings。DocStrings 是一款你应当使用的重要工具&#xff0c;它能够帮助你更好地记录程序并让其更加易于理解。令人惊叹…

Go 分布式学习利器(17)-- Go并发编程之协程机制:Grountine 原理及使用

文章目录1. Thread VS Groutine2. Groutine 调度原理3. Groutine 示例代码关于Go的底层实现还需要后续持续研究&#xff0c;文中如有一些原理描述有误&#xff0c;欢迎指证。 1. Thread VS Groutine 这里主要介绍一下Go的并发协程相比于传统的线程 的不同点&#xff1a; 创建…

Java项目:美食菜谱分享平台系统设计和实现(java+springboot+mysql+ssm)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 主要技术实现&#xff1a;spring、 springmvc、 springboot、mybatis 、session、 jquery 、 md5 、bootstarp.js tomcat、拦截器等。 具体主要功能模块如下&#xff1a; 1.用户模块管理&#xff1a;用户…

【leetcode】Roman to Integer

题目描述&#xff1a; Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 解题思路&#xff1a; 首先我们要了解罗马数字怎么写的 个位数举例 I, 1 】II, 2】 III, 3】 IV, 4 】V, 5 】VI, 6】 VII, 7】 VIII,8 】…