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

Java项目:朴素风个人博客系统(前后端分离+java+vue+Springboot+ssm+mysql+maven+redis)

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

一、项目简述

本系统功能包括: 基于vue + Springboo痼J后端分离项目个人博客系统,注册 登录,首页展示,喜爰图书展示,后台图书维护,个人文 章展示,后台文章上传等等。

二、项目运行

环境配置: Jdk1.8 + Tomcat8.5 + Mysql + HBuilderX (Webstorm也 行)+ Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts都支 持)。

项目技术: Springboot + Maven + Mybatis + Vue + Redis^K, B/S 模式+ Maven等等。

博客首页:

/*** @author yy*/
@Controller
public class MyblogController {//    public static String theme = "default";public static String theme = "amaze";@Resourceprivate BlogService blogService;@Resourceprivate TagService tagService;@Resourceprivate CommentService commentService;@Resourceprivate ConfigService configService;@Resourceprivate CategoryService categoryService;/*** 首页** @param request http请求* @return java.lang.String*/@GetMapping({"/", "/index", "index.html"})public String index(HttpServletRequest request) {return this.page(request, 1);}/*** 首页(带页码)** @param request http请求* @param pageNum 页码* @return java.lang.String*/@GetMapping({"/page/{pageNum}"})public String page(HttpServletRequest request, @PathVariable("pageNum") int pageNum) {PageResult blogPageResult = blogService.getBlogsForIndexPage(pageNum);if (blogPageResult == null) {return "error/error_404";}request.setAttribute("blogPageResult", blogPageResult);request.setAttribute("newBlogs", blogService.getBlogListForIndexPage(1));request.setAttribute("hotBlogs", blogService.getBlogListForIndexPage(0));request.setAttribute("hotTags", tagService.getBlogTagCountForIndex());request.setAttribute("pageName", "首页");request.setAttribute("configurations", configService.getAllConfigs());return "blog/" + theme + "/index";}/*** Categories页面(包括分类数据和标签数据)** @param request http请求* @return java.lang.String*/@GetMapping({"/categories"})public String categories(HttpServletRequest request) {request.setAttribute("hotTags", tagService.getBlogTagCountForIndex());request.setAttribute("categories", categoryService.getAllCategories());request.setAttribute("pageName", "分类页面");request.setAttribute("configurations", configService.getAllConfigs());return "blog/" + theme + "/category";}/*** 详情页** @param request     http请求* @param blogId      博客id* @param commentPage 评论页* @return java.lang.String*/@GetMapping({"/blog/{blogId}", "/article/{blogId}"})public String detail(HttpServletRequest request, @PathVariable("blogId") Long blogId, @RequestParam(value = "commentPage", required = false, defaultValue = "1") Integer commentPage) {BlogDetailVO blogDetailVO = blogService.getBlogDetail(blogId);if (blogDetailVO != null) {request.setAttribute("blogDetailVO", blogDetailVO);request.setAttribute("commentPageResult", commentService.getCommentPageByBlogIdAndPageNum(blogId, commentPage));}request.setAttribute("pageName", "详情");request.setAttribute("configurations", configService.getAllConfigs());return "blog/" + theme + "/detail";}/*** 标签列表页** @param request http请求* @param tagName 标签名称* @return java.lang.String*/@GetMapping({"/tag/{tagName}"})public String tag(HttpServletRequest request, @PathVariable("tagName") String tagName) {return tag(request, tagName, 1);}/*** 标签列表页(带页码)** @param request http请求* @param tagName 标签名称* @param page    页码* @return java.lang.String*/@GetMapping({"/tag/{tagName}/{page}"})public String tag(HttpServletRequest request, @PathVariable("tagName") String tagName, @PathVariable("page") Integer page) {PageResult blogPageResult = blogService.getBlogsPageByTag(tagName, page);request.setAttribute("blogPageResult", blogPageResult);request.setAttribute("pageName", "标签");request.setAttribute("pageUrl", "tag");request.setAttribute("keyword", tagName);request.setAttribute("newBlogs", blogService.getBlogListForIndexPage(1));request.setAttribute("hotBlogs", blogService.getBlogListForIndexPage(0));request.setAttribute("hotTags", tagService.getBlogTagCountForIndex());request.setAttribute("configurations", configService.getAllConfigs());return "blog/" + theme + "/list";}/*** 分类列表页** @param request      http请求* @param categoryName 类别名称* @return java.lang.String*/@GetMapping({"/category/{categoryName}"})public String category(HttpServletRequest request, @PathVariable("categoryName") String categoryName) {return category(request, categoryName, 1);}/*** 分类列表页(带页码)** @param request      http请求* @param categoryName 类别名称* @param page         页码* @return java.lang.String*/@GetMapping({"/category/{categoryName}/{page}"})public String category(HttpServletRequest request, @PathVariable("categoryName") String categoryName, @PathVariable("page") Integer page) {PageResult blogPageResult = blogService.getBlogsPageByCategory(categoryName, page);request.setAttribute("blogPageResult", blogPageResult);request.setAttribute("pageName", "分类");request.setAttribute("pageUrl", "category");request.setAttribute("keyword", categoryName);request.setAttribute("newBlogs", blogService.getBlogListForIndexPage(1));request.setAttribute("hotBlogs", blogService.getBlogListForIndexPage(0));request.setAttribute("hotTags", tagService.getBlogTagCountForIndex());request.setAttribute("configurations", configService.getAllConfigs());return "blog/" + theme + "/list";}/*** 搜索列表页** @param request http请求* @param keyword 关键词* @return java.lang.String*/@GetMapping({"/search/{keyword}"})public String search(HttpServletRequest request, @PathVariable("keyword") String keyword) {return search(request, keyword, 1);}/*** 搜索列表页(带页码)** @param request http请求* @param keyword 关键词* @param page    页码* @return java.lang.String*/@GetMapping({"/search/{keyword}/{page}"})public String search(HttpServletRequest request, @PathVariable("keyword") String keyword, @PathVariable("page") Integer page) {PageResult blogPageResult = blogService.getBlogsPageBySearch(keyword, page);request.setAttribute("blogPageResult", blogPageResult);request.setAttribute("pageName", "搜索");request.setAttribute("pageUrl", "search");request.setAttribute("keyword", keyword);request.setAttribute("newBlogs", blogService.getBlogListForIndexPage(1));request.setAttribute("hotBlogs", blogService.getBlogListForIndexPage(0));request.setAttribute("hotTags", tagService.getBlogTagCountForIndex());request.setAttribute("configurations", configService.getAllConfigs());return "blog/" + theme + "/list";}/*** 评论留言** @param request     http请求* @param session     session* @param blogId      博客id* @param verifyCode  验证码* @param commentator 评论者昵称* @param email       邮箱* @param websiteUrl  留言者的网站* @param commentBody 评论内容* @return com.hbu.myblog.util.Result*/@PostMapping(value = "/blog/comment")@ResponseBodypublic Result comment(HttpServletRequest request, HttpSession session,@RequestParam Long blogId, @RequestParam String verifyCode,@RequestParam String commentator, @RequestParam String email,@RequestParam String websiteUrl, @RequestParam String commentBody) {if (StringUtils.isEmpty(verifyCode)) {return ResultGenerator.genFailResult("验证码不能为空");}String kaptchaCode = session.getAttribute("verifyCode") + "";if (StringUtils.isEmpty(kaptchaCode)) {return ResultGenerator.genFailResult("非法请求");}if (!verifyCode.equals(kaptchaCode)) {return ResultGenerator.genFailResult("验证码错误");}String ref = request.getHeader("Referer");if (StringUtils.isEmpty(ref)) {return ResultGenerator.genFailResult("非法请求");}if (null == blogId || blogId < 0) {return ResultGenerator.genFailResult("非法请求");}if (StringUtils.isEmpty(commentator)) {return ResultGenerator.genFailResult("请输入称呼");}if (StringUtils.isEmpty(email)) {return ResultGenerator.genFailResult("请输入邮箱地址");}if (!PatternUtil.isEmail(email)) {return ResultGenerator.genFailResult("请输入正确的邮箱地址");}if (StringUtils.isEmpty(commentBody)) {return ResultGenerator.genFailResult("请输入评论内容");}if (commentBody.trim().length() > 200) {return ResultGenerator.genFailResult("评论内容过长");}BlogComment comment = new BlogComment();comment.setBlogId(blogId);comment.setCommentator(MyBlogUtils.cleanString(commentator));comment.setEmail(email);if (PatternUtil.isURL(websiteUrl)) {comment.setWebsiteUrl(websiteUrl);}comment.setCommentBody(MyBlogUtils.cleanString(commentBody));return ResultGenerator.genSuccessResult(commentService.addComment(comment));}
}

验证码控制层:

/*** @author yy*/
@Controller
public class CommonController {@Autowiredprivate DefaultKaptcha captchaProducer;/*** @param httpServletRequest* @param httpServletResponse* @throws Exception*/@GetMapping("/common/kaptcha")public void defaultKaptcha(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {byte[] captchaOutputStream = null;ByteArrayOutputStream imgOutputStream = new ByteArrayOutputStream();try {//生产验证码字符串并保存到session中String verifyCode = captchaProducer.createText();httpServletRequest.getSession().setAttribute("verifyCode", verifyCode);BufferedImage challenge = captchaProducer.createImage(verifyCode);ImageIO.write(challenge, "jpg", imgOutputStream);} catch (IllegalArgumentException e) {httpServletResponse.sendError(HttpServletResponse.SC_NOT_FOUND);return;}captchaOutputStream = imgOutputStream.toByteArray();httpServletResponse.setHeader("Cache-Control", "no-store");httpServletResponse.setHeader("Pragma", "no-cache");httpServletResponse.setDateHeader("Expires", 0);httpServletResponse.setContentType("image/jpeg");ServletOutputStream responseOutputStream = httpServletResponse.getOutputStream();responseOutputStream.write(captchaOutputStream);responseOutputStream.flush();responseOutputStream.close();}
}

处理管理员界面请求:

/*** 处理管理员界面请求**/
@Controller
@RequestMapping("/admin")
public class AdminController {@Resourceprivate AdminUserService adminUserService;@Resourceprivate BlogService blogService;@Resourceprivate CategoryService categoryService;@Resourceprivate TagService tagService;@Resourceprivate CommentService commentService;/*** 处理登录请求** @return java.lang.String*/@GetMapping({"/login"})public String login() {return "admin/login";}/*** 主页** @param request http请求* @return java.lang.String*/@GetMapping({"", "/", "/index", "/index.html"})public String index(HttpServletRequest request) {request.setAttribute("path", "index");request.setAttribute("categoryCount", categoryService.getTotalCategories());request.setAttribute("blogCount", blogService.getTotalBlogs());request.setAttribute("tagCount", tagService.getTotalTags());request.setAttribute("commentCount", commentService.getTotalComments());return "admin/index";}/*** 登录界面** @param userName   用户名* @param password   密码* @param verifyCode 验证码* @param session    session* @return java.lang.String*/@PostMapping(value = "/login")public String login(@RequestParam("userName") String userName,@RequestParam("password") String password,@RequestParam("verifyCode") String verifyCode,HttpSession session) {if (StringUtils.isEmpty(verifyCode)) {session.setAttribute("errorMsg", "验证码不能为空");return "admin/login";}if (StringUtils.isEmpty(userName) || StringUtils.isEmpty(password)) {session.setAttribute("errorMsg", "用户名或密码不能为空");return "admin/login";}String kaptchaCode = session.getAttribute("verifyCode") + "";if (StringUtils.isEmpty(kaptchaCode) || !verifyCode.equals(kaptchaCode)) {session.setAttribute("errorMsg", "验证码错误");return "admin/login";}AdminUser adminUser = adminUserService.login(userName, password);if (adminUser != null) {session.setAttribute("loginUser", adminUser.getNickName());session.setAttribute("loginUserId", adminUser.getAdminUserId());//session过期时间设置为7200秒 即两小时//session.setMaxInactiveInterval(60 * 60 * 2);return "redirect:/admin/index";} else {session.setAttribute("errorMsg", "登陆失败");return "admin/login";}}/*** 修改个人信息** @param request http请求* @return java.lang.String*/@GetMapping("/profile")public String profile(HttpServletRequest request) {Integer loginUserId = (int) request.getSession().getAttribute("loginUserId");AdminUser adminUser = adminUserService.getUserDetailById(loginUserId);if (adminUser == null) {return "admin/login";}request.setAttribute("path", "profile");request.setAttribute("loginUserName", adminUser.getLoginUserName());request.setAttribute("nickName", adminUser.getNickName());return "admin/profile";}/*** 修改密码** @param request          http请求* @param originalPassword 原始密码* @param newPassword      新密码* @return java.lang.String*/@PostMapping("/profile/password")@ResponseBodypublic String passwordUpdate(HttpServletRequest request, @RequestParam("originalPassword") String originalPassword,@RequestParam("newPassword") String newPassword) {if (StringUtils.isEmpty(originalPassword) || StringUtils.isEmpty(newPassword)) {return "参数不能为空";}Integer loginUserId = (int) request.getSession().getAttribute("loginUserId");if (adminUserService.updatePassword(loginUserId, originalPassword, newPassword)) {//修改成功后清空session中的数据,前端控制跳转至登录页request.getSession().removeAttribute("loginUserId");request.getSession().removeAttribute("loginUser");request.getSession().removeAttribute("errorMsg");return "success";} else {return "修改失败";}}/*** 修改登录名,昵称** @param request       http请求* @param loginUserName 登录名* @param nickName      昵称* @return java.lang.String*/@PostMapping("/profile/name")@ResponseBodypublic String nameUpdate(HttpServletRequest request, @RequestParam("loginUserName") String loginUserName,@RequestParam("nickName") String nickName) {if (StringUtils.isEmpty(loginUserName) || StringUtils.isEmpty(nickName)) {return "参数不能为空";}Integer loginUserId = (int) request.getSession().getAttribute("loginUserId");if (adminUserService.updateName(loginUserId, loginUserName, nickName)) {return "success";} else {return "修改失败";}}/*** 管理员退出** @param request http请求* @return java.lang.String*/@GetMapping("/logout")public String logout(HttpServletRequest request) {request.getSession().removeAttribute("loginUserId");request.getSession().removeAttribute("loginUser");request.getSession().removeAttribute("errorMsg");return "admin/login";}
}

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

相关文章:

NodeJS+Mongodb+Express做CMS博客系统

楼主正在用业余时间开发中…… &#xff0c;目前的版本仅支持会员系统&#xff0c;尝鲜一下吧~ hi-blog 一个 nodejsexpressmongodb 的 cms 系统怎么启动 默认你已经安装了 mongodb &#xff1b;那么你得这样操作&#xff1a;安装项目 -> 初始化管理员 -> 运行项目 1、请…

Piranha实验总结

操作系统&#xff1a;rhel5.8分别在DirectorMaster和DirectorBackup上部署浮动资源(VIP IPVS策略)测试2个Director在DR模式下是否都可以正常工作。测试完成后都撤掉浮动资源。DirectorMaster[rootlocalhost ~]#yum install piranha[rootlocalhost ~]#piranha-passwdNew Passwor…

虚IP切换原理

高可用性HA&#xff08;High Availability&#xff09;指的是通过尽量缩短因日常维护操作&#xff08;计划&#xff09;和突发的系统崩溃&#xff08;非计划&#xff09;所导致的停机时间&#xff0c;以提高系统和应用的可用性。HA系统是目前企业防止核心计算机系统因故障停机的…

vim 键盘宏操作 -- 大道至简

最近利用vim做一些文本处理时 发现vim 支持的键盘宏是一个好东西啊&#xff0c;高效优雅得处理大量需要重复性操作的文本&#xff0c;让人爱不释手&#xff01;&#xff01;&#xff01; 希望接下来对键盘宏的分享能够实际帮助到大家。 后文中描述的一些vim操作会汇集成指令字…

Java项目:家居购物商城系统(java+html+jdbc+mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 一、项目简述 功能&#xff1a; Java Web精品项目源码&#xff0c;家居商城分类展示&#xff0c;商品展示&#xff0c; 商品下单&#xff0c;购物车&#xff0c;个人中心&#xff0c;后台管理&#xff0c;用…

leetcode:Search in Rotated Sorted Array

题目要求&#xff1a; Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target value to search. If found in the array return its index, otherwise return -1. You may a…

解决Debian-7.1下Chrome浏览器字体难看的问题

首先在 Advance Setting 的 font 标签页下做如下配置&#xff1a; 然后在用户目录下创建 .fonts.conf 文件&#xff0c;内容如下&#xff1a; <?xml version1.0?> <!DOCTYPE fontconfig SYSTEM fonts.dtd> <fontconfig><match target"font"&g…

HDU.4903.The only survival(组合 计数)

题目链接 惊了 \(Description\) 给定\(n,k,L\)&#xff0c;表示&#xff0c;有一张\(n\)个点的无向完全图&#xff0c;每条边的边权在\([1,L]\)之间。求有多少张无向完全图满足&#xff0c;\(1\)到\(n\)的最短路为\(k\)。\(n,k\leq 12,\ L\leq10^9\)。 \(Solution\) 考虑暴力&a…

Rocksdb 写入数据后 GetApproximateSizes 获取的大小竟然为0?

项目开发中需要从引擎 获取一定范围的数据大小&#xff0c;用作打点上报&#xff0c;测试过程中竟然发现写入了一部分数据之后通过GetApproximateSizes 获取写入的key的范围时取出来的数据大小竟然为0。。。难道发现了一个bug?&#xff08;欣喜&#xff09; 因为写入的数据是…

Java项目:在线婚纱摄影预定系统(java+javaweb+SSM+springboot+mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 一、项目简述 功能&#xff1a; 前后用户的登录注册&#xff0c;婚纱照片分类&#xff0c;查看&#xff0c;摄影师预 订&#xff0c;后台订单管理&#xff0c;图片管理等等。 二、项目运行 环境配置&am…

Linux Terminal 控制终端的使用

1. Open new Terminal&#xff1a;Ctrl Alt T 或者 Ctrl Shift N 2. Open Tab&#xff1a;Ctrl Shift T 3. Close Tab&#xff1a;Ctrl Shift W 4. Close Window&#xff1a;Ctrl Shift Q 5. Copy : Ctrl Shift C 6. Paste: Ctrl Shift V 7. Full Screen: F11 8.…

如何防止代码腐烂

http://blog.jobbole.com/5643/ 很多团队都有这个问题&#xff0c;一个项目的代码本来开始设计得好好的&#xff0c;一段时间以后&#xff0c;代码就会变得难以理解&#xff0c;难以维护&#xff0c;难以修改。为什么&#xff1f;我一直在思考这个问题。 让我们先看一个人的情况…

CORS在Spring中的实现

CORS: 通常情况下浏览器禁止AJAX从外部获取资源&#xff0c;因此就衍生了CORS这一标准体系&#xff0c;来实现跨域请求。 CORS是一个W3C标准&#xff0c;全称是"跨域资源共享"&#xff08;Cross-origin resource sharing&#xff09;。它允许浏览器向跨源(协议 域名…

从BloomFilter到Counter BloomFilter

文章目录前言1. Traditional BloomFilter2. Counter BloomFilter本文traditional bloomfilter 和 counter bloomfilter的C实现 均已上传至&#xff1a; https://github.com/BaronStack/BloomFilter 前言 Bloomfilter 是一个老生常谈的数据结构&#xff0c;应用在存储领域的各…

进程、线程、多线程相关总结

进程、线程、多线程相关总结 一、说说概念 1、进程&#xff08;process&#xff09; 狭义定义&#xff1a;进程就是一段程序的执行过程。 广义定义&#xff1a;进程是一个程序关于某个数据集合的一次运行。它是操作系统动态执行的基本单元&#xff0c;在传统的操作系统中&#…

Java项目:在线蛋糕商城系统(java+jsp+jdbc+mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 一、项目简述 功能&#xff1a; 主页显示热销商品&#xff1b;所有蛋糕商品展示&#xff0c;可进行商品搜 索&#xff1b;点击商品进入商品详情页&#xff0c;具有立即购买和加入购物 车功能&#xff0c;可…

业界对生成图片缩略图的做法归纳

网站如果有很多用户上传图片(相册&#xff0c;商品图片)&#xff0c;一般的做法是将用户图片保存在磁盘上面(数据库中记录图片的地址)。用户上传的时候按照原图、中图、小图等各个尺寸都生成一份保存在磁盘上。比如php的网店系统echsop就是这么做的&#xff0c;而shopex之类也大…

thinkPHP5.0 URL路由优化

在tp中访问页面的时候URL地址是 域名/模块/控制器/方法&#xff0c;在点击首页的时候URL是 域名/index/index/index 而不是只显示域名&#xff0c;这样不利于SEO&#xff0c;而且强迫症的我看着很不爽&#xff0c;这个时候我们需要优化路由 Route::rule(路由表达式,路由地址,请…

Rocksdb 获取当前db内部的有效key个数 (估值)

文章目录1. 基本接口2. Memtable key个数统计3. Immutable Memtable key个数统计4. Sstables key个数统计5. 疑问Rocksdb因为是AppendOnly 方式写入&#xff0c;所以没有办法提供db内部唯一key个数的接口&#xff08;可能存在多版本的key&#xff0c;对用户来说只有一个userkey…

Java项目:网上花店商城系统(java+jsp+servlert+mysql+ajax)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 一、项目简述 功能&#xff1a; 一套完整的网上花店商场系统&#xff0c;系统支持前台会员的注册 登陆系统留言&#xff0c;花朵的品种选择&#xff0c;详情浏览&#xff0c;加入购物 车&#xff0c;购买花…

使用Uboot启动内核并挂载NFS根文件系统

配置编译好内核之后&#xff0c;将生成的内核文件uImage拷贝到/tftpboot/下&#xff0c;通过tftp服务器将内核下载到开发板&#xff0c;使用命令&#xff1a;tftp 31000000 uImage.下载完成之后配置bootargs环境变量&#xff1a;setenv bootargs noinitrd consolettySAC0,11520…

Centos系统上安装php遇到的错误解决方法集锦

Centos系统上安装php遇到的错误解决方法集锦1.configure: error: xml2-config not found. Please check your libxml2 installationyum install libxml2 libxml2-devel2.configure: error: Cannot find OpenSSL’s yum install openssl openssl-devel3.configure: error: Pleas…

2.27 MapReduce Shuffle过程如何在Job中进行设置

一、shuffle过程 总的来说&#xff1a; *分区 partitioner*排序 sort*copy (用户无法干涉) 拷贝*分组 group可设置 *压缩 compress*combiner map task端的Reduce二、示例 package com.ibeifeng.hadoop.senior.mapreduce;import java.io.IOException; import java.util.StringTo…

Rocksdb Slice使用中的一个小坑

本文记录一下使用Rocksdb Slice过程中的一个小小坑&#xff0c;差点没一口老血吐出来。 rocksdb的Slice 数据结构是一个小型得不可变类string数据结构&#xff0c;设计出来的目的是为了保证rocksdb内部处理用户输入的key在从内存到持久化磁盘的整个处理链路是不会被修改的&…

Java项目:仿天猫网上商城项目(java+jsp+servlet+mysql+ajax)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 一、项目简述 功能&#xff1a; 前台&#xff1a; * 用户模块 * 分类模块 * 商品模块 * 购物车模块 * 订单模块 后台&#xff1a; * 管理员模块 * 分类管理模块 * 商品管理模块 * 订单模块…

转--Android如何在java代码中设置margin

3 在Java代码里设置button的margin(外边距)&#xff1f; 1、获取按钮的LayoutParams LinearLayout.LayoutParams layoutParams (LinearLayout.LayoutParams)button.getLayoutParams(); 2、在LayoutParams中设置margin layoutParams.setMargins(100,20,10,5);//4个参数按顺序分…

poj12月其他题解(未完)

最近编程的时间比较少啊…… poj3253 就是个合并果子&#xff0c;各种优先队列即可&#xff08;显然单调队列最优&#xff09; poj3263 线段树统计每个点被覆盖了多少次即可&#xff0c;注意要去重 poj3625 最小生成树 poj3626 bfs poj3624 01背包 poj3615 floyd即可 poj3278 简…

0409-0416的笔记

1 获取前几天&#xff0c;近几个月的时间 function getDay(day) {var today new Date();var targetday_milliseconds today.getTime() 1000 * 60 * 60 * 24 * day;today.setTime(targetday_milliseconds); //注意&#xff0c;这行是关键代码var tYear today.getFullYear();…

Linux NUMA 架构 :基础软件工程师需要知道一些知识

文章目录前言从物理CPU、core到HT(hyper-threading)UMA&#xff08;Uniform memory access&#xff09;NUMA架构NUMA下的内存分配策略1. MPOL_DEFAULT2. MPOL_BIND3. MPOL_INTERLEAVE4. MPOL_PREFERRED5. 一些NUMA架构下的内核配置总结参考前言 NUMA&#xff08;Non-Uniform m…

Java项目:网上书城+后台管理系统(java+jsp+servlert+mysql+ajax)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 一、项目简述(附带IW文档) 功能&#xff1a; 前台&#xff1a; * 用户模块 * 分类模块 * 图书模块 * 购物车模块 * 订单模块 后台&#xff1a; * 管理员模块 * 分类管理模块 * 图书管理模块 * 订单模块 …