当前位置: 首页 > article >正文

基于Springmvc+MyBatis+Spring+Bootstrap+EasyUI+Mysql的个人博客系统

基于Springmvc+MyBatis+Spring+Bootstrap+EasyUI+Mysql的个人博客系统

1.项目介绍

  1. 使用Maven3+Spring4+Springmvc+Mybatis3架构;数据库使用Mysql,数据库连接池使用阿里巴巴的Druid;
  2. 使用Bootstrap3 UI框架实现博客的分页显示,博客分类,文章归类显示;完成用户评论和分享功能;
  3. 使用EasyUI实现后台对博客、博客类别、用户评论、博主信息的管理,包括增删改查,文件上传等;实现刷新后台缓存等功能;
  4. 使用Shiro作为项目安全框架,验证不同url的请求,包括后台博主的登陆;
  5. 实现Lucene对全站的检索功能,对检索出的博客标题和内容实现高亮显示;
  6. 使用百度的Ueditor编辑器实现写博客功能,支持单图、多图上传,支持截图上传,支持代码高亮特性等。

2.数据库设计

2.1表结构

博客表

博主表

博客类型表

评论表

友情链接表

2.2ER图

3.项目设计

3.1项目配置

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"xsi:schemaLocation="    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd  http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd  http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.0.xsd  http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd"><!-- 鑷姩鎵弿鍖呬腑鐨刡ean --><context:component-scan base-package="ssm.blog.*" /><!-- 閰嶇疆鏁版嵁婧愶紝浣跨敤闃块噷宸村反杩炴帴姹燚ruid --><bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"><property name="url" value="jdbc:mysql://localhost:3306/db_blog"/><property name="username" value="root"/><property name="password" value="root"/></bean><!-- 閰嶇疆mybatis鐨剆qlSessionFactory --><bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"><property name="dataSource" ref="dataSource" /><!-- 鑷姩鎵弿mappers.xml鏂囦欢 --><property name="mapperLocations" value="classpath:ssm/blog/mappers/*.xml"></property><!-- 鍔犺浇mybatis鍏ㄥ眬閰嶇疆鏂囦欢 --><property name="configLocation" value="classpath:mybatis-config.xml"></property></bean><!-- 鎵弿mapper鎺ュ彛锛堝嵆dao锛夛紝Spring浼氳嚜鍔ㄦ煡鎵惧叾涓嬬殑绫?--><bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"><property name="basePackage" value="ssm.blog.dao" /><property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property></bean><!-- 浜嬪姟绠$悊锛坱ransaction manager锛?--><bean id="transactionManager"class="org.springframework.jdbc.datasource.DataSourceTransactionManager"><property name="dataSource" ref="dataSource" /></bean><!-- 鑷畾涔塕ealm --><bean id="myRealm" class="ssm.blog.realm.MyRealm" /><!-- 瀹夊叏绠$悊鍣?--><bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager"><property name="realm" ref="myRealm" /></bean><!-- Shiro杩囨护鍣?--><bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean"><!-- Shiro鐨勬牳蹇冨畨鍏ㄦ帴鍙?杩欎釜灞炴ф槸蹇呴』鐨?--><property name="securityManager" ref="securityManager" /><!-- 韬唤璁よ瘉澶辫触锛屽垯璺宠浆鍒扮櫥褰曢〉闈㈢殑閰嶇疆 --><property name="loginUrl" value="/login.jsp" /><!-- 鏉冮檺璁よ瘉澶辫触锛屽垯璺宠浆鍒版寚瀹氶〉闈紝鍥犱负涓汉鍗氬灏变竴涓汉鐧婚檰锛屽氨涓嶉渶瑕佹潈闄愪簡 --><!-- <property name="unauthorizedUrl" value="/unauthorized.jsp" />  --><!-- Shiro杩炴帴绾︽潫閰嶇疆,鍗宠繃婊ら摼鐨勫畾涔?--><property name="filterChainDefinitions"><value>/login=anon/admin/**=authc</value></property></bean><!-- 淇濊瘉瀹炵幇浜哠hiro鍐呴儴lifecycle鍑芥暟鐨刡ean鎵ц --><bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor" /><!-- 寮鍚疭hiro娉ㄨВ --><beanclass="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"depends-on="lifecycleBeanPostProcessor" /><beanclass="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor"><property name="securityManager" ref="securityManager" /></bean><!-- 閰嶇疆浜嬪姟閫氱煡灞炴?--><tx:advice id="txAdvice" transaction-manager="transactionManager"><!-- 瀹氫箟浜嬪姟浼犳挱灞炴?--><tx:attributes><tx:method name="insert*" propagation="REQUIRED" /><tx:method name="update*" propagation="REQUIRED" /><tx:method name="edit*" propagation="REQUIRED" /><tx:method name="save*" propagation="REQUIRED" /><tx:method name="add*" propagation="REQUIRED" /><tx:method name="new*" propagation="REQUIRED" /><tx:method name="set*" propagation="REQUIRED" /><tx:method name="remove*" propagation="REQUIRED" /><tx:method name="delete*" propagation="REQUIRED" /><tx:method name="change*" propagation="REQUIRED" /><tx:method name="check*" propagation="REQUIRED" /><tx:method name="get*" propagation="REQUIRED" read-only="true" /><tx:method name="find*" propagation="REQUIRED" read-only="true" /><tx:method name="load*" propagation="REQUIRED" read-only="true" /><tx:method name="*" propagation="REQUIRED" read-only="true" /></tx:attributes></tx:advice><!-- 閰嶇疆浜嬪姟鍒囬潰 --><aop:config><aop:pointcut id="pointCut" expression="execution(* ssm.blog.service.*.*(..))" /><aop:advisor advice-ref="txAdvice" pointcut-ref="pointCut" /></aop:config></beans>

3.2监听器

package ssm.blog.listener;import java.util.List;import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;import ssm.blog.entity.Blog;
import ssm.blog.entity.BlogType;
import ssm.blog.entity.Blogger;
import ssm.blog.entity.Link;
import ssm.blog.service.BlogService;
import ssm.blog.service.BlogTypeService;
import ssm.blog.service.BloggerService;
import ssm.blog.service.LinkService;@Component
public class InitBloggerData implements ServletContextListener, ApplicationContextAware {private static ApplicationContext applicationContext;public void contextInitialized(ServletContextEvent sce) {System.out.println(applicationContext);//先获取servlet上下文ServletContext application = sce.getServletContext();//根据spring的上下文获取bloggerService这个beanBloggerService bloggerService = (BloggerService) applicationContext.getBean("bloggerService");//获取博主信息Blogger blogger = bloggerService.getBloggerData();//由于密码也获取到了,比较敏感,我们也不需要这个,所以把密码清空掉blogger.setPassword(null);//将博主信息存入application域中application.setAttribute("blogger", blogger);//同上,获取友情链接信息LinkService linkService = (LinkService) applicationContext.getBean("linkService");List<Link> linkList = linkService.getLinkData(); application.setAttribute("linkList", linkList);//同上,获取博客类别信息BlogTypeService blogTypeService = (BlogTypeService) applicationContext.getBean("blogTypeService");List<BlogType> blogTypeList = blogTypeService.getBlogTypeData();application.setAttribute("blogTypeList", blogTypeList);//同上,获取博客信息,按照时间分类的BlogService blogService = (BlogService) applicationContext.getBean("blogService");List<Blog> blogTimeList = blogService.getBlogData();application.setAttribute("blogTimeList", blogTimeList);}public void contextDestroyed(ServletContextEvent sce) {// TODO Auto-generated method stub}public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {InitBloggerData.applicationContext = applicationContext;}}

3.3博客全文索引

/*** @Description 博客索引类* @author Ni Shengwu**/
public class BlogIndex {private Directory dir;private IndexWriter getWriter() throws Exception {		dir = FSDirectory.open(Paths.get("D:\\blog_index"));SmartChineseAnalyzer analyzer = new SmartChineseAnalyzer();IndexWriterConfig config = new IndexWriterConfig(analyzer);IndexWriter writer = new IndexWriter(dir, config);	return writer;}//添加博客索引public void addIndex(Blog blog)  throws Exception {IndexWriter writer = getWriter();Document doc = new Document();doc.add(new StringField("id", String.valueOf(blog.getId()), Field.Store.YES));doc.add(new TextField("title", blog.getTitle(), Field.Store.YES));doc.add(new StringField("releaseDate", DateUtil.formatDate(new Date(), "yyyy-MM-dd"), Field.Store.YES));		doc.add(new TextField("content", blog.getContentNoTag(), Field.Store.YES));		writer.addDocument(doc);writer.close();}//删除指定博客的索引public void deleteIndex(String blogId) throws Exception {IndexWriter writer = getWriter();writer.deleteDocuments(new Term("id", blogId));writer.forceMergeDeletes();//强制删除writer.commit();writer.close();}//更新博客索引public void updateIndex(Blog blog) throws Exception {IndexWriter writer = getWriter();Document doc = new Document();doc.add(new StringField("id", String.valueOf(blog.getId()), Field.Store.YES));doc.add(new TextField("title", blog.getTitle(), Field.Store.YES));doc.add(new StringField("releaseDate", DateUtil.formatDate(new Date(), "yyyy-MM-dd"), Field.Store.YES));		doc.add(new TextField("content", blog.getContentNoTag(), Field.Store.YES));		writer.updateDocument(new Term("id", String.valueOf(blog.getId())), doc);writer.close();}//查询博客索引信息public List<Blog> searchBlog(String q) throws Exception {dir = FSDirectory.open(Paths.get("D:\\blog_index"));IndexReader reader = DirectoryReader.open(dir);IndexSearcher search = new IndexSearcher(reader);BooleanQuery.Builder booleanQuery = new BooleanQuery.Builder();SmartChineseAnalyzer analyzer = new SmartChineseAnalyzer();QueryParser parser1 = new QueryParser("title", analyzer); //查询标题Query query1 = parser1.parse(q);QueryParser parser2 = new QueryParser("content", analyzer); //查询内容Query query2 = parser2.parse(q);booleanQuery.add(query1, BooleanClause.Occur.SHOULD);booleanQuery.add(query2, BooleanClause.Occur.SHOULD);TopDocs hits = search.search(booleanQuery.build(), 100);QueryScorer scorer = new QueryScorer(query1);//使用title得分高的排前面Fragmenter fragmenter = new SimpleSpanFragmenter(scorer); //得分高的片段SimpleHTMLFormatter simpleHTMLFormatter = new SimpleHTMLFormatter("<b><font color='red'>", "</font></b>");Highlighter highlighter = new Highlighter(simpleHTMLFormatter, scorer); //高亮显示highlighter.setTextFragmenter(fragmenter); //将得分高的片段设置进去List<Blog> blogIndexList = new LinkedList<Blog>(); //用来封装查询到的博客for(ScoreDoc score : hits.scoreDocs) {Document doc = search.doc(score.doc);Blog blog = new Blog();blog.setId(Integer.parseInt(doc.get("id")));blog.setReleaseDateStr(doc.get("releaseDate"));String title = doc.get("title");String content = doc.get("content");if(title != null) {TokenStream tokenStream = analyzer.tokenStream("title", new StringReader(title));String hTitle = highlighter.getBestFragment(tokenStream, title);if(StringUtil.isEmpty(hTitle)) {blog.setTitle(title);} else {blog.setTitle(hTitle);}}if(content != null) {TokenStream tokenStream = analyzer.tokenStream("content", new StringReader(content));String hContent = highlighter.getBestFragment(tokenStream, content);if(StringUtil.isEmpty(hContent)) {if(content.length() > 100) { //如果没查到且content内容又大于100的话blog.setContent(content.substring(0, 100)); //截取100个字符} else {blog.setContent(content);}} else {blog.setContent(hContent);}}blogIndexList.add(blog);}return blogIndexList;}
}

3.4工具类

md5加密工具类


/*** md5加密工具类* @author Administrator**/
public class CryptographyUtil {/*** @Description 使用Shiro中的md5加密* @param str* @param salt* @return*/public static String md5(String str,String salt){//Md5Hash是Shiro中的一个方法return new Md5Hash(str, salt).toString();}//我自己生成一下测试用的public static void main(String[] args) {String password="123456";System.out.println("Md5加密:"+CryptographyUtil.md5(password, "javacoder"));}
}

分页工具类

/*** 分页工具类* @author Administrator**/
public class PageUtil {/*** 生成分页代码* @param targetUrl 目标地址* @param totalNum 总记录数* @param currentPage 当前页* @param pageSize 每页大小* @return*/public static String genPagination(String targetUrl, //目标urllong totalNum,    //总记录数int currentPage,  //当前页int pageSize,     //每页显示记录数String param) {   //参数//计算总页数long totalPage = totalNum % pageSize==0 ? totalNum/pageSize : totalNum/pageSize+1; if(totalPage == 0){return "未查询到数据";}else{StringBuffer pageCode = new StringBuffer();if(currentPage > 1) {pageCode.append("<li><a href='" + targetUrl + "?page=1&" + param + "'>首页</a></li>");pageCode.append("<li><a href='" + targetUrl + "?page=" + (currentPage-1) + "&" + param + "'>上一页</a></li>");			}else{pageCode.append("<li class='disabled'><a>首页</a></li>");pageCode.append("<li class='disabled'><a>上一页</a></li>");		}for(int i = currentPage - 2; i <= currentPage + 2; i++) {if(i < 1 || i > totalPage) {continue;}if(i == currentPage) {pageCode.append("<li class='active'><a href='" + targetUrl + "?page=" + i + "&" + param + "'>" + i + "</a></li>");	}else{pageCode.append("<li><a href='" + targetUrl + "?page=" + i + "&" + param + "'>" + i + "</a></li>");	}}if(currentPage < totalPage) {pageCode.append("<li><a href='" + targetUrl + "?page=" + (currentPage+1) + "&" + param + "'>下一页</a></li>");pageCode.append("<li><a href='" + targetUrl + "?page=" + totalPage + "&" + param + "'>尾页</a></li>");}else{pageCode.append("<li class='disabled'><a>下一页</a></li>");	pageCode.append("<li class='disabled'><a>尾页</a></li>");}return pageCode.toString();}}public static String getPrevAndNextPageCode(Blog prev, Blog next, String projectContent) {StringBuffer pageCode = new StringBuffer();if(prev == null || prev.getId() == null) {pageCode.append("<p>上一篇:无</P>");} else {pageCode.append("<p>上一篇:<a href='" + projectContent + "/blog/articles/" + prev.getId() + ".html'>" + prev.getTitle() + "</a></p>");}if(next == null || next.getId() == null) {pageCode.append("<p>下一篇:无</P>");} else {pageCode.append("<p>上一篇:<a href='" + projectContent + "/blog/articles/" + next.getId() + ".html'>" + next.getTitle() + "</a></p>");}return pageCode.toString();}//Lucence搜索博客结果的分页public static String getUpAndDownPageCode (Integer page, Integer totalNum, String q, Integer pageSize, String projectContext) {//计算总页数long totalPage = totalNum % pageSize==0 ? totalNum/pageSize : totalNum/pageSize+1; StringBuffer pageCode = new StringBuffer();if(totalPage == 0) {return "";} else {pageCode.append("<nav>");pageCode.append("<ul class='pager'>");if(page > 1) {pageCode.append("<li><a href='"+projectContext+"/blog/search.html?page="+(page-1)+"&q="+q+"'>上一页</a></li>");} else {pageCode.append("<li class='disabled'><a>上一页</a></li>");}if(page < totalPage) {pageCode.append("<li><a href='"+projectContext+"/blog/search.html?page="+(page+1)+"&q="+q+"'>下一页</a></li>");} else {pageCode.append("<li class='disabled'><a>下一页</a></li>");}pageCode.append("</ul>");pageCode.append("<nav>");pageCode.append("<nav>");pageCode.append("<nav>");}return pageCode.toString();}}

4.项目展示

4.1前台效果展示

1. 博客主页显示

2. 侧边栏显示

3. 博客内容显示

4. 搜索结果显示

5. 评论模块显示

4.2后台效果展示

1. 博主登陆

2. 修改博主信息

3. 写博客功能

4. 博客管理

5. 添加博客类别等等

5.总结

后台的其他功能就不一个个展示了,都差不多。

相关文章:

基于Springmvc+MyBatis+Spring+Bootstrap+EasyUI+Mysql的个人博客系统

基于SpringmvcMyBatisSpringBootstrapEasyUIMysql的个人博客系统 1.项目介绍 使用Maven3Spring4SpringmvcMybatis3架构&#xff1b;数据库使用Mysql&#xff0c;数据库连接池使用阿里巴巴的Druid&#xff1b;使用Bootstrap3 UI框架实现博客的分页显示&#xff0c;博客分类&am…...

Vision Transformer:打破CNN垄断,全局注意力机制重塑计算机视觉范式

目录 引言 一、ViT模型的起源和历史 二、什么是ViT&#xff1f; 图像处理流程 图像切分 展平与线性映射 位置编码 Transformer编码器 分类头&#xff08;Classification Head&#xff09; 自注意力机制 注意力图 三、Coovally AI模型训练与应用平台 四、ViT与图像…...

Tailwind CSS 的核心理念

实用优先&#xff08;Utility-First&#xff09; Tailwind CSS 的最核心理念是"实用优先"。这种方法颠覆了传统的 CSS 开发方式&#xff0c;不再编写自定义的类名和样式规则&#xff0c;而是通过组合预定义的工具类来构建界面。这种方式带来了以下优势&#xff1a; …...

软考高级《系统架构设计师》知识点(二)

操作系统知识 操作系统概述 操作系统定义&#xff1a;能有效地组织和管理系统中的各种软/硬件资源&#xff0c;合理地组织计算机系统工作流程&#xff0c;控制程序的执行&#xff0c;并且向用户提供一个良好的工作环境和友好的接口。操作系统有三个重要的作用&#xff1a; 管理…...

DeepSeek的魔法:如何让复杂概念变得通俗易懂?

日常生活中&#xff0c;常常会被复杂的概念所困扰。怎么样将这些晦涩难懂的概念变得通俗易懂&#xff1f;当然是利用大模型帮我们解答&#xff0c;不过让大模型解答也需要有好的沟通提示词。  我收集整理了 2 套提示词&#xff0c;大家一起学习一下。  一、用推理模型解释概…...

地弹噪声【信号完整性】

地弹、振铃、串扰、信号反射 地弹,就是地噪声! 低频时,地噪声主要是因为构成地线的导体有“电阻”,电路系统的电流都要流经地线而产生的电势差波动。 高频时,地噪声主要是因为构成地线的导体有“电感”,电路系统的电流快速变化地经过这个“电感”时,“电感”两端激发…...

【大模型】阿里云百炼平台对接DeepSeek-R1大模型使用详解

目录 一、前言 二、DeepSeek简介 2.1 DeepSeek 是什么 2.2 DeepSeek R1特点 2.2.1 DeepSeek-R1创新点 2.3 DeepSeek R1应用场景 2.4 与其他大模型对比 三、阿里云百炼大平台介绍 3.1 阿里云百炼大平台是什么 3.2 阿里云百炼平台主要功能 3.2.1 应用场景 3.3 为什么选…...

如何在 React 中使用 CSS Modules?

在 React 中使用 CSS Modules 是一种模块化 CSS 的方式,可以避免类名冲突,并为每个组件提供独立的样式。以下是如何在 React 项目中使用 CSS Modules 的步骤: 1. 创建 React 应用 如果你还没有创建一个 React 应用,可以使用 Create React App: npx create-react-app my…...

技术革新让生活更便捷

量子通信是一种利用量子力学原理进行信息传递的技术。它的基本原理是量子纠缠和量子密钥分发。量子纠缠指两个粒子即使相隔很远&#xff0c;一个粒子的状态改变会立刻引起另一个粒子状态的相应变化。量子密钥分发则是通过量子态传输实现加密密钥的安全交换。 在信息安全领域&a…...

但书条款与格式条款

但书条款与格式条款 一、定义 但书条款&#xff1a; 但书条款是指在法律条文中&#xff0c;对一般规定作出例外或补充说明的条款。通常以“但”字开头&#xff0c;表示在特定情况下不适用一般规定。例如&#xff0c;《民法典》第465条第二款规定&#xff1a;“依法成立的合同…...

相似性图相关性重构网络用于无监督跨模态哈希

《Similarity Graph-correlation Reconstruction Network for unsupervised cross-modal hashing》 摘要1. 引言2. 相关工作2.1. 监督跨模态哈希方法2.2. 无监督跨模态哈希方法 3. 方法论3.1 问题定义3.2 特征提取3.3 模态内关系图构建3.4. 局部关系图重置3.5. 跨模态关系图构建…...

问卷数据分析|SPSS实操之单因素方差分析

适用条件&#xff1a; 检验分类变量和定量变量之间的差异 分类变量数量要大于等于三 具体操作&#xff1a; 1.选择分析--比较平均值--单因素ANOVA检验 2. 下方填分类变量&#xff0c;上方为各个量表数据Z1-Y2 3. 点击选项&#xff0c;选择描述和方差齐性检验 4.此处为结果数…...

并发编程---多线程不安全示例以及解决,多线程创建方式

文章目录 并发并行多线程为什么需要多线程线程不安全示例并发出现问题的根源: 并发三要素可见性: CPU 缓存引起原子性&#xff1a;分时复用引起有序性: 重排序引起 线程不安全示例的解决方法使用AtomicLong类使用synchronized 关键字 改进代码避免不必要的延迟join()方法为什么…...

多模态模型详解

多模态模型是什么 多模态模型是一种能够处理和理解多种数据类型&#xff08;如文本、图像、音频、视频等&#xff09;的机器学习模型&#xff0c;通过融合不同模态的信息来提升任务的性能。其核心在于利用不同模态之间的互补性&#xff0c;增强模型的鲁棒性和准确性。 如何融合…...

从零到一:开发并上线一款极简记账本小程序的完整流程

从零到一&#xff1a;开发并上线一款极简记账本小程序的完整流程 目录 前言需求分析与功能设计 2.1 目标用户分析2.2 核心功能设计2.3 技术栈选择 开发环境搭建 3.1 微信开发者工具安装与配置3.2 项目初始化3.3 版本控制与协作工具 前端开发 4.1 页面结构与布局4.2 组件化开发…...

更加通用的Hexo多端部署原理及实现,适用于各种系统之间

本文推荐在作者的个人博客网站阅读&#xff1a;shenying.online 一、故事背景 故事发生在大学上学期间&#xff08;而不是寒假&#xff09;。上学期间&#xff0c;宿舍条件极其恶劣&#xff0c;半夜断电、空间狭小。我们大学垃圾条件使用游戏本的种种弊端被无限放大&#xff1…...

5g基站测试要求和关键点

5G基站的测试要求涉及多个方面&#xff0c;以确保其性能、覆盖能力、稳定性和合规性。以下是5G基站测试的主要要求和关键点&#xff1a; 一、基础性能测试 射频&#xff08;RF&#xff09;性能测试 发射机性能&#xff1a;验证基站的发射功率、频率误差、调制质量&#xff08;E…...

算法——搜索算法:原理、类型与实战应用

搜索算法&#xff1a;开启高效信息检索的钥匙 在信息爆炸的时代&#xff0c;搜索算法无疑是计算机科学领域中熠熠生辉的存在&#xff0c;它就像一把神奇的钥匙&#xff0c;为我们打开了高效信息检索的大门。无论是在日常生活中&#xff0c;还是在专业的工作场景里&#xff0c;…...

PlantUML 总结

PlantUML 总结 1. 概述 PlantUML 是一个开源工具&#xff0c;允许用户通过简单的文本描述来生成各种UML图表。它支持多种图表类型&#xff0c;包括但不限于序列图、用例图、类图、活动图等。 2. 基本概念 2.1 开始和结束标记 startuml 和 enduml&#xff1a;用于标记Plant…...

C++ 相对的字符串,判断却不相对

一、场景 在做项目的时候&#xff0c;有这样一个场景&#xff0c;根据字符串名称&#xff0c;给对应的变量赋值。传递的字符串跟对比的字符串是一样的&#xff0c;判断的时候却不相等&#xff0c;导致变量未正确附上值。 二、解决 经过查找&#xff0c;发现是字符串编码的问题…...

【嵌入式Linux应用开发基础】open函数与close函数

目录 一、open函数 1.1. 函数原型 1.2 参数说明 1.3 返回值 1.4. 示例代码 二、close函数 2.1. 函数原型 2.2. 示例代码 三、关键注意事项 3.1. 资源管理与泄漏防范 3.2. 错误处理的严谨性 3.3. 标志&#xff08;flags&#xff09;与权限&#xff08;mode&#xff…...

在实体机和wsl2中安装docker、使用GPU

正常使用docker和gpu&#xff0c;直接命令行安装dcoker和&#xff0c;nvidia-container-toolkit。区别在于&#xff0c;后者在于安装驱动已经cuda加速时存在系统上的差异。 1、安装gpu驱动 在实体机中&#xff0c;安装cuda加速包&#xff0c;我们直接安装 driver 和 cuda 即可…...

Unity3D实现显示模型线框(shader)

系列文章目录 unity工具 文章目录 系列文章目录👉前言👉一、效果展示👉二、第一种方式👉二、第二种方式👉壁纸分享👉总结👉前言 在 Unity 中显示物体线框主要基于图形渲染管线和特定的渲染模式。 要显示物体的线框,通常有两种常见的方法:一种是利用内置的渲染…...

解释和对比“application/octet-stream“与“application/x-protobuf“

介绍 在现代 Web 和分布式系统的开发中&#xff0c;数据的传输和交换格式扮演着关键角色。为了确保数据在不同系统之间的传输过程中保持一致性&#xff0c;MIME 类型&#xff08;Multipurpose Internet Mail Extensions&#xff09;被广泛应用于描述数据的格式和内容类型。在 …...

VAD端到端系列梳理以及阅读

0. 简介 最近VAD v2论文出来了&#xff0c;又掀起了一波该系列模型的热点。我们先看一下蒋博的文章&#xff0c;然后再来看一下《VADv2: End-to-End Vectorized Autonomous Driving via Probabilistic Planning》这篇文章&#xff0c;代码目前还没开源&#xff0c;可以期待一波…...

MySQL中类似PostgreSQL中的string_agg函数--GROUP_CONCAT函数的使用

文章目录 结论&#xff1a;MySQL没有string_agg&#xff0c;但有GROUP_CONCATGROUP_CONCAT函数的基本用法示例注意事项 系统变量 group_concat_max_len 如何查看和设置查看当前的group_concat_max_len值设置group_concat_max_len值 相关源码相关链接 结论&#xff1a;MySQL没有…...

在vmd中如何渲染透明水分子

1.设置背景为白色 依次点击Graphics>>Colors... 2. 改变渲染模式 依次点击Display>>rendermode>>GLSL 3. 渲染水分子 选中水分子&#xff0c;显色方式改为ColorID, 编号10的颜色&#xff1b; 选择材质为GlassBubble; 绘图方式为QuickSurf. 若水盒子显示效…...

每日十题八股-补充材料-2025年2月12日

1.从输入URL到页面展示发生了什么&#xff1f; 每日十题八股-2025年1月6日-8&#xff08;整体的回答&#xff09; 解析URL&#xff08;判断URL合不合法&#xff0c;不合法直接跳转搜索引擎进行搜索&#xff09;。判断浏览器中是否有缓存&#xff0c;有缓存则直接返回。获得IP…...

springboot+mybatis进行普通事务操作transaction

文章目录 背景前置环境准备关于 configuration 代码关于 transaction 使用其他 背景 你使用 springboot 和 mybatis/mybatis plus 来进行 web 开发&#xff0c;但是你发现你需要使用到事务操作 前置环境准备 首先你得在 application.yml 中配置好 mysql 数据源&#xff0c;这…...

DeepSeek-R1技术革命:用强化学习重塑大语言模型的推理能力

引言&#xff1a;低成本高性能的AI新范式 在2025年1月&#xff0c;中国AI公司DeepSeek发布了两个标志性模型——DeepSeek-R1-Zero与DeepSeek-R1&#xff0c;以仅600万美元的训练成本实现了与OpenAI O1系列&#xff08;开发成本约5亿美元&#xff09;相当的推理性能&#xff0c…...