第九次作业
BookInfoMapper.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.rabbiter.bms.mapper.BookInfoMapper"><resultMap id="BaseResultMap" type="com.rabbiter.bms.model.BookInfo"><id column="bookId" jdbcType="INTEGER" property="bookid" /><result column="bookName" jdbcType="VARCHAR" property="bookname" /><result column="bookAuthor" jdbcType="VARCHAR" property="bookauthor" /><result column="bookPrice" jdbcType="DECIMAL" property="bookprice" /><result column="bookTypeId" jdbcType="INTEGER" property="booktypeid" /><result column="bookTypeName" jdbcType="INTEGER" property="booktypename" /><result column="bookDesc" jdbcType="VARCHAR" property="bookdesc" /><result column="isBorrowed" jdbcType="TINYINT" property="isborrowed" /><result column="bookImg" jdbcType="TINYINT" property="bookimg" /></resultMap><sql id="Base_Column_List">bookId, bookName, bookAuthor, bookPrice, bookTypeId, bookDesc, isBorrowed, bookImg</sql><select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from book_infowhere bookId = #{bookid,jdbcType=INTEGER}</select><delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">delete from book_infowhere bookId = #{bookid,jdbcType=INTEGER}</delete><insert id="insert" parameterType="com.rabbiter.bms.model.BookInfo">insert into book_info (bookId, bookName, bookAuthor, bookPrice, bookTypeId, bookDesc, isBorrowed, bookImg)values (#{bookid,jdbcType=INTEGER}, #{bookname,jdbcType=VARCHAR}, #{bookauthor,jdbcType=VARCHAR}, #{bookprice,jdbcType=DECIMAL}, #{booktypeid,jdbcType=INTEGER}, #{bookdesc,jdbcType=VARCHAR}, #{isborrowed,jdbcType=TINYINT}, #{bookimg,jdbcType=TINYINT})</insert><insert id="insertSelective" parameterType="com.rabbiter.bms.model.BookInfo">insert into book_info<trim prefix="(" suffix=")" suffixOverrides=","><if test="bookid != null">bookId,</if><if test="bookname != null">bookName,</if><if test="bookauthor != null">bookAuthor,</if><if test="bookprice != null">bookPrice,</if><if test="booktypeid != null">bookTypeId,</if><if test="bookdesc != null">bookDesc,</if><if test="isborrowed != null">isBorrowed,</if><if test="bookimg != null">bookImg,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="bookid != null">#{bookid,jdbcType=INTEGER},</if><if test="bookname != null">#{bookname,jdbcType=VARCHAR},</if><if test="bookauthor != null">#{bookauthor,jdbcType=VARCHAR},</if><if test="bookprice != null">#{bookprice,jdbcType=DECIMAL},</if><if test="booktypeid != null">#{booktypeid,jdbcType=INTEGER},</if><if test="bookdesc != null">#{bookdesc,jdbcType=VARCHAR},</if><if test="isborrowed != null">#{isborrowed,jdbcType=TINYINT},</if><if test="bookimg != null">#{bookimg,jdbcType=TINYINT},</if></trim></insert><update id="updateByPrimaryKeySelective" parameterType="com.rabbiter.bms.model.BookInfo">update book_info<set><if test="bookname != null">bookName = #{bookname,jdbcType=VARCHAR},</if><if test="bookauthor != null">bookAuthor = #{bookauthor,jdbcType=VARCHAR},</if><if test="bookprice != null">bookPrice = #{bookprice,jdbcType=DECIMAL},</if><if test="booktypeid != null">bookTypeId = #{booktypeid,jdbcType=INTEGER},</if><if test="bookdesc != null">bookDesc = #{bookdesc,jdbcType=VARCHAR},</if><if test="isborrowed != null">isBorrowed = #{isborrowed,jdbcType=TINYINT},</if><if test="bookimg != null">bookImg = #{bookimg,jdbcType=TINYINT},</if></set>where bookId = #{bookid,jdbcType=INTEGER}</update><update id="updateByPrimaryKey" parameterType="com.rabbiter.bms.model.BookInfo">update book_infoset bookName = #{bookname,jdbcType=VARCHAR},bookAuthor = #{bookauthor,jdbcType=VARCHAR},bookPrice = #{bookprice,jdbcType=DECIMAL},bookTypeId = #{booktypeid,jdbcType=INTEGER},bookDesc = #{bookdesc,jdbcType=VARCHAR},isBorrowed = #{isborrowed,jdbcType=TINYINT},bookImg = #{bookimg,jdbcType=TINYINT}where bookId = #{bookid,jdbcType=INTEGER}</update><select id="selectAllByLimit" resultMap="BaseResultMap">select bookId, bookName, bookAuthor,bookPrice, bookTypeId, bookDesc,isBorrowed, bookImg,(select bookTypeName from book_type where book_type.bookTypeId = book_info.bookTypeId) as bookTypeNamefrom book_infolimit #{begin}, #{size}</select><select id="selectCount" resultType="int">select count(*) from book_info</select><select id="selectCountBySearch" resultType="int">select count(*) from book_info<where><if test="bookname != null and bookname != '' ">and bookName like concat('%',#{bookname},'%')</if><if test="bookauthor != null and bookauthor != '' ">and bookAuthor like concat('%',#{bookauthor},'%')</if><if test="booktypeid != null and booktypeid != '' ">and bookTypeId = #{booktypeid}</if></where></select><select id="selectBySearch" resultMap="BaseResultMap">select bookId, bookName, bookAuthor,bookPrice, bookTypeId, bookDesc,isBorrowed, bookImg,(select bookTypeName from book_type where book_type.bookTypeId = book_info.bookTypeId) as bookTypeNamefrom book_info<where><if test="bookname != null and bookname != '' ">and bookName like concat('%',#{bookname},'%')</if><if test="bookauthor != null and bookauthor != '' ">and bookAuthor like concat('%',#{bookauthor},'%')</if><if test="booktypeid != null and booktypeid != '' ">and bookTypeId = #{booktypeid}</if></where>limit #{begin}, #{size}</select><select id="selectAll" resultMap="BaseResultMap">select bookId, bookName, bookAuthor,bookPrice, bookTypeId, bookDesc,isBorrowed, bookImg,(select bookTypeName from book_type where book_type.bookTypeId = book_info.bookTypeId) as bookTypeNamefrom book_info</select><select id="selectCountByType" resultType="int">select count(*) from book_info<where><if test="booktypeid != null and booktypeid != '' ">and bookTypeId = #{booktypeid}</if></where></select><select id="selectByType" resultMap="BaseResultMap">select bookId, bookName, bookAuthor,bookPrice, bookTypeId, bookDesc,isBorrowed, bookImg,(select bookTypeName from book_type where book_type.bookTypeId = book_info.bookTypeId) as bookTypeNamefrom book_info<where><if test="booktypeid != null and booktypeid != '' ">and bookTypeId = #{booktypeid}</if></where>limit #{begin}, #{size}</select>
</mapper>
BookTypeMapper.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.rabbiter.bms.mapper.BookTypeMapper"><resultMap id="BaseResultMap" type="com.rabbiter.bms.model.BookType"><id column="bookTypeId" jdbcType="INTEGER" property="booktypeid" /><result column="bookTypeName" jdbcType="VARCHAR" property="booktypename" /><result column="bookTypeDesc" jdbcType="VARCHAR" property="booktypedesc" /></resultMap><sql id="Base_Column_List">bookTypeId, bookTypeName, bookTypeDesc</sql><select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from book_typewhere bookTypeId = #{booktypeid,jdbcType=INTEGER}</select><delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">delete from book_typewhere bookTypeId = #{booktypeid,jdbcType=INTEGER}</delete><insert id="insert" parameterType="com.rabbiter.bms.model.BookType">insert into book_type (bookTypeId, bookTypeName, bookTypeDesc)values (#{booktypeid,jdbcType=INTEGER}, #{booktypename,jdbcType=VARCHAR}, #{booktypedesc,jdbcType=VARCHAR})</insert><insert id="insertSelective" parameterType="com.rabbiter.bms.model.BookType">insert into book_type<trim prefix="(" suffix=")" suffixOverrides=","><if test="booktypeid != null">bookTypeId,</if><if test="booktypename != null">bookTypeName,</if><if test="booktypedesc != null">bookTypeDesc,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="booktypeid != null">#{booktypeid,jdbcType=INTEGER},</if><if test="booktypename != null">#{booktypename,jdbcType=VARCHAR},</if><if test="booktypedesc != null">#{booktypedesc,jdbcType=VARCHAR},</if></trim></insert><update id="updateByPrimaryKeySelective" parameterType="com.rabbiter.bms.model.BookType">update book_type<set><if test="booktypename != null">bookTypeName = #{booktypename,jdbcType=VARCHAR},</if><if test="booktypedesc != null">bookTypeDesc = #{booktypedesc,jdbcType=VARCHAR},</if></set>where bookTypeId = #{booktypeid,jdbcType=INTEGER}</update><update id="updateByPrimaryKey" parameterType="com.rabbiter.bms.model.BookType">update book_typeset bookTypeName = #{booktypename,jdbcType=VARCHAR},bookTypeDesc = #{booktypedesc,jdbcType=VARCHAR}where bookTypeId = #{booktypeid,jdbcType=INTEGER}</update><select id="selectAllByLimit" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from book_typelimit #{begin}, #{size}</select><select id="selectCount" resultType="int">select count(*) from book_type</select><select id="selectAll" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from book_type</select><select id="selectCountBySearch" resultType="int">select count(*) from book_type<where><if test="booktypename != null and booktypename != '' ">and bookTypeName like concat('%',#{booktypename},'%')</if></where></select><select id="selectBySearch" resultMap="BaseResultMap">select bookTypeId, bookTypeName, bookTypeDescfrom book_type<where><if test="booktypename != null and booktypename != '' ">and bookTypeName like concat('%',#{booktypename},'%')</if></where>limit #{begin}, #{size}</select>
</mapper>
BorrowMapper.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.rabbiter.bms.mapper.BorrowMapper"><resultMap id="BaseResultMap" type="com.rabbiter.bms.model.Borrow"><id column="borrowId" jdbcType="INTEGER" property="borrowid" /><result column="userId" jdbcType="INTEGER" property="userid" /><result column="userName" jdbcType="INTEGER" property="username" /><result column="bookId" jdbcType="INTEGER" property="bookid" /><result column="bookName" jdbcType="INTEGER" property="bookname" /><result column="borrowTime" jdbcType="TIMESTAMP" property="borrowtime" /><result column="returnTime" jdbcType="TIMESTAMP" property="returntime" /></resultMap><sql id="Base_Column_List">borrowId, userId, bookId, borrowTime, returnTime</sql><select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from borrowwhere borrowId = #{borrowid,jdbcType=INTEGER}</select><delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">delete from borrowwhere borrowId = #{borrowid,jdbcType=INTEGER}</delete><insert id="insert" parameterType="com.rabbiter.bms.model.Borrow">insert into borrow (borrowId, userId, bookId, borrowTime, returnTime)values (#{borrowid,jdbcType=INTEGER}, #{userid,jdbcType=INTEGER}, #{bookid,jdbcType=INTEGER}, #{borrowtime,jdbcType=TIMESTAMP}, #{returntime,jdbcType=TIMESTAMP})</insert><insert id="insertSelective" parameterType="com.rabbiter.bms.model.Borrow">insert into borrow<trim prefix="(" suffix=")" suffixOverrides=","><if test="borrowid != null">borrowId,</if><if test="userid != null">userId,</if><if test="bookid != null">bookId,</if><if test="borrowtime != null">borrowTime,</if><if test="returntime != null">returnTime,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="borrowid != null">#{borrowid,jdbcType=INTEGER},</if><if test="userid != null">#{userid,jdbcType=INTEGER},</if><if test="bookid != null">#{bookid,jdbcType=INTEGER},</if><if test="borrowtime != null">#{borrowtime,jdbcType=TIMESTAMP},</if><if test="returntime != null">#{returntime,jdbcType=TIMESTAMP},</if></trim></insert><update id="updateByPrimaryKeySelective" parameterType="com.rabbiter.bms.model.Borrow">update borrow<set><if test="userid != null">userId = #{userid,jdbcType=INTEGER},</if><if test="bookid != null">bookId = #{bookid,jdbcType=INTEGER},</if><if test="borrowtime != null">borrowTime = #{borrowtime,jdbcType=TIMESTAMP},</if><if test="returntime != null">returnTime = #{returntime,jdbcType=TIMESTAMP},</if></set>where borrowId = #{borrowid,jdbcType=INTEGER}</update><update id="updateByPrimaryKey" parameterType="com.rabbiter.bms.model.Borrow">update borrowset userId = #{userid,jdbcType=INTEGER},bookId = #{bookid,jdbcType=INTEGER},borrowTime = #{borrowtime,jdbcType=TIMESTAMP},returnTime = #{returntime,jdbcType=TIMESTAMP}where borrowId = #{borrowid,jdbcType=INTEGER}</update><select id="selectAllByLimit" resultMap="BaseResultMap">select borrowId, userId, bookId, borrowTime, returnTime,(select userName from user where borrow.userId = user.userId) userName,(select bookName from book_info where borrow.bookId = book_info.bookId) bookNamefrom borrowlimit #{begin}, #{size}</select><select id="selectCount" resultType="int">select count(*) from borrow</select><select id="selectCountBySearch" resultType="int">select count(*)from borrow, user, book_infowhere borrow.userId = user.userId and borrow.bookId = book_info.bookId<if test="bookId != null and bookId != '' ">and borrow.bookId like concat('%',#{bookId},'%')</if><if test="username != null and username != '' ">and userName like concat('%',#{username},'%')</if><if test="bookname != null and bookname != '' ">and bookName like concat('%',#{bookname},'%')</if><if test="userid != null and userid != '' ">and borrow.userId = #{userid}</if></select><select id="selectBySearch" resultMap="BaseResultMap">select borrowId, borrow.userId, borrow.bookId, borrowTime, returnTime, userName, bookNamefrom borrow, user, book_infowhere borrow.userId = user.userId and borrow.bookId = book_info.bookId<if test="username != null and username != '' ">and userName like concat('%',#{username},'%')</if><if test="bookname != null and bookname != '' ">and bookName like concat('%',#{bookname},'%')</if><if test="userid != null and userid != '' ">and borrow.userId = #{userid}</if>limit #{begin}, #{size}</select><select id="selectCountByReader" resultType="int">select count(*) from borrowwhere userId = #{userid}</select><select id="selectAllByLimitByReader" resultMap="BaseResultMap">select borrowId, userId, bookId, borrowTime, returnTime,(select userName from user where borrow.userId = user.userId) userName,(select bookName from book_info where borrow.bookId = book_info.bookId) bookNamefrom borrowwhere userId = #{userid}limit #{begin}, #{size}</select>
</mapper>
UserMapper.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.rabbiter.bms.mapper.UserMapper"><resultMap id="BaseResultMap" type="com.rabbiter.bms.model.User"><id column="userId" jdbcType="INTEGER" property="userid" /><result column="userName" jdbcType="VARCHAR" property="username" /><result column="userPassword" jdbcType="VARCHAR" property="userpassword" /><result column="isAdmin" jdbcType="TINYINT" property="isadmin" /></resultMap><sql id="Base_Column_List">userId, userName, userPassword, isAdmin</sql><select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from userwhere userId = #{userid,jdbcType=INTEGER}</select><delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">delete from userwhere userId = #{userid,jdbcType=INTEGER}</delete><insert id="insert" parameterType="com.rabbiter.bms.model.User">insert into user (userId, userName, userPassword, isAdmin)values (#{userid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{userpassword,jdbcType=VARCHAR}, #{isadmin,jdbcType=TINYINT})</insert><insert id="insertSelective" parameterType="com.rabbiter.bms.model.User">insert into user<trim prefix="(" suffix=")" suffixOverrides=","><if test="userid != null">userId,</if><if test="username != null">userName,</if><if test="userpassword != null">userPassword,</if><if test="isadmin != null">isAdmin,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="userid != null">#{userid,jdbcType=INTEGER},</if><if test="username != null">#{username,jdbcType=VARCHAR},</if><if test="userpassword != null">#{userpassword,jdbcType=VARCHAR},</if><if test="isadmin != null">#{isadmin,jdbcType=TINYINT},</if></trim></insert><update id="updateByPrimaryKeySelective" parameterType="com.rabbiter.bms.model.User">update user<set><if test="username != null">userName = #{username,jdbcType=VARCHAR},</if><if test="userpassword != null">userPassword = #{userpassword,jdbcType=VARCHAR},</if><if test="isadmin != null">isAdmin = #{isadmin,jdbcType=TINYINT},</if></set>where userId = #{userid,jdbcType=INTEGER}</update><update id="updateByPrimaryKey" parameterType="com.rabbiter.bms.model.User">update userset userName = #{username,jdbcType=VARCHAR},userPassword = #{userpassword,jdbcType=VARCHAR},isAdmin = #{isadmin,jdbcType=TINYINT}where userId = #{userid,jdbcType=INTEGER}</update><select id="selectByUsernameAndPasswordAndIsAdmin" resultMap="BaseResultMap">select<include refid="Base_Column_List" />from userwhere userName = #{username}and userPassword = #{password}and isAdmin = #{isAdmin}limit 1</select><select id="selectByUsername" resultMap="BaseResultMap">select<include refid="Base_Column_List" />from userwhere userName = #{username}limit 1</select><select id="selectAllByLimit" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from userlimit #{begin}, #{size}</select><select id="selectCount" resultType="int">select count(*) from user</select><select id="selectAll" resultMap="BaseResultMap">select <include refid="Base_Column_List" />from user</select><select id="selectCountBySearch" resultType="int">select count(*) from user<where><if test="username != null and username != '' ">and userName like concat('%',#{username},'%')</if></where></select><select id="selectBySearch" resultMap="BaseResultMap">select userId, userName, userPassword, isAdminfrom user<where><if test="username != null and username != '' ">and userName like concat('%',#{username},'%')</if></where>limit #{begin}, #{size}</select>
</mapper>
创建Git仓库
相关文章:

第九次作业
BookInfoMapper.xml <?xml version"1.0" encoding"UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace"com.rabbite…...

A股探底回升,跑出惊天大阳,你们知道为什么吗?
今天的A股,探底回升,让人惊呆了,你们知道是为什么吗?盘面上出现3个重要信号,一起来看看: 1、今天A股市场炸锅了,AI人工智能、国产软件、存储芯片迎来了涨停潮,惊呆了,科技…...

jenkins nginx自动化部署 php项目
在当今快速发展的IT领域,自动化部署已成为提高工作效率和减少错误的关键。Jenkins作为持续集成/持续部署(CI/CD)的佼佼者,结合Docker容器技术和PHP编程语言,以及Ansible自动化工具,可以实现高效、可靠的自动…...

海外代理IP哪个可靠?如何测试代理的稳定性?
在数字化时代,互联网已成为我们日常生活的重要组成部分。然而,随着网络活动的增加,我们面临的安全威胁也随之增加。 黑客攻击、数据泄露、网络钓鱼等安全事件频发,严重威胁着我们的个人隐私和网络安全。代理服务器在当今的互联网世…...

MySQL之可扩展性(四)
可扩展性 向外扩展 分片?还是不分片? 这是一个问题,对吧?答案很简单:如非必要,尽量不分片。首先看是否能通过性能调优或者更好的应用或数据库设计来推迟分片。如果能足够长时间地推迟分片,也许可以直接购买更大地服…...

JupyterLab使用指南(三):JupyterLab的Cell详细介绍
JupyterLab Cell 使用教程 JupyterLab 的 cell 是一种强大的工具,提供了编写、执行、展示和记录的全方位支持,使得复杂的计算任务变得简单直观。通过熟练掌握 cell 的各种操作和快捷键,用户可以显著提高工作效率,专注于解决实际问…...

solidity智能合约如何实现跨合约调用函数
背景 比如现在有一个需求、我需要通过外部合约获取BRC20 token的总交易量。那么我需要在brc20的转账函数里面做一些调整,主要是两个函数内统计转移量。然后再提供外部获取函数。 /*** dev Sets amount as the allowance of spender over the callers tokens.** Ret…...
关于Vue2的生命周期会问到哪些面试题?
在Vue2的面试中,关于生命周期的问题通常会涉及以下几个方面: 一、Vue2的生命周期概述 Vue2的生命周期是什么? Vue2的生命周期是指从Vue实例的创建、初始化数据、编译模板、挂载Dom、渲染、更新、卸载等一系列过程。 二、生命周期钩子函数 …...

尚品汇-(七)
(1)在网关中实现跨域 全局配置类实现 包名:com.atguigu.gmall.gateway.config 创建CorsConfig类 Configuration public class CorsConfig {Beanpublic CorsWebFilter corsWebFilter(){// cors跨域配置对象CorsConfiguration configuration…...

【Python datetime模块精讲】:时间旅行者的日志,精准操控日期与时间
文章目录 前言一、datetime模块简介二、常用类和方法三、date类四、time类五、datetime类六、timedelta类七、常用的函数和属性八、代码及其演示 前言 Python的datetime模块提供了日期和时间的类,用于处理日期和时间的算术运算。这个模块包括date、time、datetime和…...
keepalived 服务高可用(简约版)
本文基于centos 7记述如何使用keepalived 背景 为生产环境准备一台备机是极其必要的,防止主机宕掉无服务可用的情况出现。但是同一局域网内每台主机都分配了一个唯一IP,这些IP既然相互不同,那么服务请求的时候岂不是要切换IP地址?…...

【前端】Vue项目和微信小程序生成二维码和条形码
前言:哈喽,大家好,我是前端菜鸟的自我修养!今天给大家分享Vue项目和微信小程序如何生成二维码和条形码,介绍了JsBarcode、wxbarcode等插件,并提供具体代码帮助大家深入理解,彻底掌握!…...

同时使用接口文档swagger和knife4j
项目场景: springboot项目中同时使用接口文档swagger和knife4j 问题描述 在实体类中设置了字段必填的属性,在访问接口文档时出现异常 实体类关键代码片段 /*** 部门表 sys_dept*/ public class SysDept extends BaseEntity {private static final lo…...
Compose - 权限申请
官方介绍 一、概念 二、使用 Accompanist Permissions 官方介绍 不同版本中,权限状态(如PermissionState)中获取属性的方法不同,例如在“0.23.1”中,通过 PermissionState.hasPermission 属性拿到是否通过的 Boole…...
第十九条:要么为继承而设计并提供文档说明,要么就禁止继承
在前面一条中,我们已经知道了David写了A类被Tom拿去继承了,导致了A类的封装性遭到了破坏,那么有没有可能做点事情避免此事发生呢?第十九条孕育而生!David在创建A类的时候写上文档说明,说Al类不允许任何类来…...

Node.js全栈指南:浏览器显示一个网页
上一章,我们了解到,如何通过第二章的极简 Web 的例子来演示如何查看官方文档。为什么要把查阅官方文档放在前面的章节说明呢?因为查看文档是一个很重要的能力,就跟查字典一样。 回想一下,我们读小学,初中的…...

Linux远程桌面(Ubuntu/Deepin)——安装和使用 VNC 及通过 noVNC 实现浏览器实现远程桌面访问教程
在 Linux 上安装和使用 VNC 及通过 noVNC 实现浏览器远程访问教程 Windows上通常会自带xrdp远程桌面,但是当我们使用 Deepin 或 Ubuntu 系统作为开发机器且需要图形化界面的时候,就需要安装和配置 VNC(Virtual Network Computing)…...

2024年最新通信安全员考试题库
61.架设架空光缆,可使用吊板作业的情况是()。 A.在2.2/7规格的电杆与墙壁之间的吊线上,吊线高度5m B.在2.2/7规格的墙壁与墙壁之间的吊线上,吊线高度6m C.在2.2/7规格的电杆与电杆之间的吊线上,吊线高度…...

SpringMVC系列八: 手动实现SpringMVC底层机制-下
手动实现SpringMVC底层机制-下 实现任务阶段五🍍完成Spring容器对象的自动装配-Autowired 实现任务阶段六🍍完成控制器方法获取参数-RequestParam1.🥦将 方法的 HttpServletRequest 和 HttpServletResponse 参数封装到数组, 进行反射调用2.&a…...
【昇思初学入门】第八天打卡-模型保存与加载
模型保存与加载 学习心得 保存 CheckPoint 格式文件,在模型训练过程中,可以添加检查点(CheckPoint)用于保存模型的参数,以便进行推理及再训练使用。如果想继续在不同硬件平台上做推理,可通过网络和CheckPoint格式文件生成对应的…...
变量 varablie 声明- Rust 变量 let mut 声明与 C/C++ 变量声明对比分析
一、变量声明设计:let 与 mut 的哲学解析 Rust 采用 let 声明变量并通过 mut 显式标记可变性,这种设计体现了语言的核心哲学。以下是深度解析: 1.1 设计理念剖析 安全优先原则:默认不可变强制开发者明确声明意图 let x 5; …...
web vue 项目 Docker化部署
Web 项目 Docker 化部署详细教程 目录 Web 项目 Docker 化部署概述Dockerfile 详解 构建阶段生产阶段 构建和运行 Docker 镜像 1. Web 项目 Docker 化部署概述 Docker 化部署的主要步骤分为以下几个阶段: 构建阶段(Build Stage):…...
在软件开发中正确使用MySQL日期时间类型的深度解析
在日常软件开发场景中,时间信息的存储是底层且核心的需求。从金融交易的精确记账时间、用户操作的行为日志,到供应链系统的物流节点时间戳,时间数据的准确性直接决定业务逻辑的可靠性。MySQL作为主流关系型数据库,其日期时间类型的…...
Cursor实现用excel数据填充word模版的方法
cursor主页:https://www.cursor.com/ 任务目标:把excel格式的数据里的单元格,按照某一个固定模版填充到word中 文章目录 注意事项逐步生成程序1. 确定格式2. 调试程序 注意事项 直接给一个excel文件和最终呈现的word文件的示例,…...
Qt Widget类解析与代码注释
#include "widget.h" #include "ui_widget.h"Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget) {ui->setupUi(this); }Widget::~Widget() {delete ui; }//解释这串代码,写上注释 当然可以!这段代码是 Qt …...

【机器视觉】单目测距——运动结构恢复
ps:图是随便找的,为了凑个封面 前言 在前面对光流法进行进一步改进,希望将2D光流推广至3D场景流时,发现2D转3D过程中存在尺度歧义问题,需要补全摄像头拍摄图像中缺失的深度信息,否则解空间不收敛…...
macOS多出来了:Google云端硬盘、YouTube、表格、幻灯片、Gmail、Google文档等应用
文章目录 问题现象问题原因解决办法 问题现象 macOS启动台(Launchpad)多出来了:Google云端硬盘、YouTube、表格、幻灯片、Gmail、Google文档等应用。 问题原因 很明显,都是Google家的办公全家桶。这些应用并不是通过独立安装的…...
基于数字孪生的水厂可视化平台建设:架构与实践
分享大纲: 1、数字孪生水厂可视化平台建设背景 2、数字孪生水厂可视化平台建设架构 3、数字孪生水厂可视化平台建设成效 近几年,数字孪生水厂的建设开展的如火如荼。作为提升水厂管理效率、优化资源的调度手段,基于数字孪生的水厂可视化平台的…...
【Go】3、Go语言进阶与依赖管理
前言 本系列文章参考自稀土掘金上的 【字节内部课】公开课,做自我学习总结整理。 Go语言并发编程 Go语言原生支持并发编程,它的核心机制是 Goroutine 协程、Channel 通道,并基于CSP(Communicating Sequential Processes࿰…...

CMake 从 GitHub 下载第三方库并使用
有时我们希望直接使用 GitHub 上的开源库,而不想手动下载、编译和安装。 可以利用 CMake 提供的 FetchContent 模块来实现自动下载、构建和链接第三方库。 FetchContent 命令官方文档✅ 示例代码 我们将以 fmt 这个流行的格式化库为例,演示如何: 使用 FetchContent 从 GitH…...