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

图书管理系统(JDBC)

AdminUser是管理员类

NormalUser是用户类

AddOperation是增加图书类

BorrowOperation是借书类

DelOperation是删除图书类

ExitOperation是退出类

FindOperation是查找图书类

IOPeration是接口

ReturnOperation是还书类

ShowOperation是显示所有图书类

注意:我的数据库有个cnm数据库,如果你没有的话,需要先创建一个cnm数据库

sql建表语句:

drop table if exists book;
create table book
(	id			   	 bigint  auto_increment,name              varchar(255), author            varchar(255),price             int,type              varchar(255),isBorrowed        varchar(255),primary key (id)
);insert book(name,author,price,type,isBorrowed) values('西游记','吴承恩',35,'小说','未借阅');
insert book(name,author,price,type,isBorrowed) values('活着','余华',40,'文学','未借阅');
commit;
select * from book;

Book类

package book;public class Book {private String name;//书名private String author;//作者private int price;//价格private String type;//类型private boolean isBorrowed;//是否被借出,初始值是false,在构造方法中不用写public String getName() {return name;}public void setName(String name) {this.name = name;}public String getAuthor() {return author;}public void setAuthor(String author) {this.author = author;}public int getPrice() {return price;}public void setPrice(int price) {this.price = price;}public String getType() {return type;}public void setType(String type) {this.type = type;}public boolean isBorrowed() {return isBorrowed;}public void setBorrowed(boolean borrowed) {isBorrowed = borrowed;}public Book(String name, String author, int price, String type) {this.name = name;this.author = author;this.price = price;this.type = type;}@Overridepublic String toString() {return "Book{" +"name:" + name +",  author:" + author +",  price:" + price +",  type=:" + type +",  isBorrowed:" +(isBorrowed==true?"  已借出":"  未借出") +'}';}
}

BookList类

package book;public class BookList {private static final int DEFAULT_SIZE=10;//该常量定义一个书架有多少本书private  Book[] books=new  Book[DEFAULT_SIZE];private int usedSize;//记录下当前book数组中有几本书public int getUsedSize() {return usedSize;}public void setUsedSize(int usedSize) {this.usedSize = usedSize;}}

User类

package user;import book.BookList;
import opera.IOPeration;public abstract class User {//抽象类protected String name;//名字.这边的protect代表的是名字的权限。如果是private,它只能在同一个包的同一类使用。就不能让AdminUser类继承了。写public的话//权限太大了,不是很好。protected IOPeration[] ioPerations;public User(String name) {//构造方法this.name = name;}public abstract int menu();//抽象方法,打印菜单,因为有了choice返回值int类型,所以void改成intpublic void doWork(int choice, BookList bookList){//通过选择的操作,去选择执行数组下的哪个操作this.ioPerations[choice].work(bookList);}
}

AdminUser类

package user;import opera.*;import java.util.Scanner;public class AdminUser extends User{public AdminUser(String name) {super(name);this.ioPerations=new IOPeration[]{new ExitOperation(),new FindOperation(),new AddOperation(),new DelOperation(),new ShowOperation()};System.out.println("欢迎管理员:"+name);}@Overridepublic int menu() {//因为返回值choice是int类型的System.out.println("____________________________________");System.out.println("1.查找图书");System.out.println("2.新增图书");System.out.println("3.删除图书");System.out.println("4.显示图书");System.out.println("0.退出系统");System.out.println("请选择你需要的功能:");Scanner scanner=new Scanner(System.in);int choice=scanner.nextInt();return choice;}}

NormalUser类

package user;import opera.*;import java.util.Scanner;public class NormalUser extends User {public NormalUser(String name) {super(name);this.ioPerations = new IOPeration[]{//引用,这边用super也可以,因为这里没有同名的,不需要做区分。用this最好new ExitOperation(),new FindOperation(),new BorrowOperation(),new ReturnOperation()};System.out.println("欢迎用户:"+name);}@Overridepublic int menu() {System.out.println("_________________");System.out.println("1.查找图书!");System.out.println("2.借阅图书!");System.out.println("3.归还图书!");System.out.println("0.退出系统!");Scanner scanner = new Scanner(System.in);int choice = scanner.nextInt();return choice;}}

IOPeration接口

package opera;import book.BookList;public interface IOPeration {//创建接口void work(BookList bookList);//抽象方法//功能主要是针对图书的,也就是针对书架。
}

AddOperation类

package opera;import book.Book;
import book.BookList;import java.sql.*;
import java.util.Scanner;public class AddOperation implements IOPeration {public void work(BookList bookList) {System.out.println("新增图书!");Scanner scanner = new Scanner(System.in);System.out.println("请输入新增图书名字:");String name = scanner.nextLine();System.out.println("请输入新增图书作者:");String author = scanner.nextLine();System.out.println("请输入价格");int price = scanner.nextInt();//吸收回车符号scanner.nextLine();System.out.println("请输入图书类型:");String type = scanner.nextLine();//添加到数据库//定义3个变量Connection conn = null;Statement stmt = null;ResultSet rs = null;try {//1.注册驱动Class.forName("com.mysql.cj.jdbc.Driver");//2.获取连接conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/cnm", "root", "123456");//3.获取数据库操作对象(执行sql语句的对象)stmt = conn.createStatement();//4.执行sql语句String sql = "select * from book where name='"+name+"'";rs = stmt.executeQuery(sql);if(!rs.next()) {String s = "insert into book avalues('"+name+"','"+author+"','"+price+"','"+type+"','未借阅')";int x= stmt.executeUpdate(s);if(x>0)System.out.println("新增图书成功!");elseSystem.out.println("新增图书失败");}else{System.out.println("已经有这本书了");}}catch (Exception e) {e.printStackTrace();} finally {//6.释放资源if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}if (stmt != null) {try {stmt.close();} catch (SQLException e) {e.printStackTrace();}}if (conn != null) {try {conn.close();} catch (SQLException e) {e.printStackTrace();}}}}}

DelOperation类

package opera;import book.Book;
import book.BookList;import java.sql.*;
import java.util.Scanner;public class DelOperation implements IOPeration{@Overridepublic void work(BookList bookList) {System.out.println("删除图书!");System.out.println("请输入要删除图书的名称");Scanner scanner=new Scanner(System.in);String name=scanner.nextLine();//添加到数据库//定义3个变量Connection conn = null;Statement stmt = null;ResultSet rs = null;try {//1.注册驱动Class.forName("com.mysql.cj.jdbc.Driver");//2.获取连接conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/cnm", "root", "123456");//3.获取数据库操作对象(执行sql语句的对象)stmt = conn.createStatement();//4.执行sql语句String sql = "select * from book where name='"+name+"'";rs = stmt.executeQuery(sql);if(rs.next()) {String s = "delete from book where name='"+name+"'";int x = stmt.executeUpdate(s);if(x>0)System.out.println("删除成功!");elseSystem.out.println("删除失败!");}else{System.out.println("没有这本书");}}catch (Exception e) {e.printStackTrace();} finally {//6.释放资源if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}if (stmt != null) {try {stmt.close();} catch (SQLException e) {e.printStackTrace();}}if (conn != null) {try {conn.close();} catch (SQLException e) {e.printStackTrace();}}}}}

FindOperation类

package opera;import book.Book;
import book.BookList;import java.sql.*;
import java.util.Scanner;public class FindOperation implements IOPeration{//继承@Overridepublic void work(BookList bookList) {//重写IOPeration类中的work方法System.out.println("查找图书!");System.out.println("请输入要查找的图书名字");Scanner scanner=new Scanner(System.in);String name=scanner.nextLine();//添加到数据库//定义3个变量Connection conn = null;Statement stmt = null;ResultSet rs = null;try {//1.注册驱动Class.forName("com.mysql.cj.jdbc.Driver");//2.获取连接conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/cnm", "root", "123456");//3.获取数据库操作对象(执行sql语句的对象)stmt = conn.createStatement();//4.执行sql语句String sql = "select * from book where name='"+name+"'";rs = stmt.executeQuery(sql);if(rs.next()) {while (true) {String s1 = rs.getString("name");String s2 = rs.getString("author");int s3 = rs.getInt("price");String s4 = rs.getString("type");String s5 = rs.getString("isBorrowed");System.out.print("name: " + s1);System.out.print(",author:" + s2);System.out.print(",price:" + s3);System.out.print(",type:" + s4);System.out.print(",isBorrowed:" + s5);System.out.println();if(!rs.next())break;}}else{System.out.println("没有这本书");}}catch (Exception e) {e.printStackTrace();} finally {//6.释放资源if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}if (stmt != null) {try {stmt.close();} catch (SQLException e) {e.printStackTrace();}}if (conn != null) {try {conn.close();} catch (SQLException e) {e.printStackTrace();}}}}}

ShowOperation类

package opera;import book.BookList;import java.sql.*;public class ShowOperation implements IOPeration{@Overridepublic void work(BookList bookList) {//添加到数据库//定义3个变量Connection conn = null;Statement stmt = null;ResultSet rs = null;try {//1.注册驱动Class.forName("com.mysql.cj.jdbc.Driver");//2.获取连接conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/cnm", "root", "123456");//3.获取数据库操作对象(执行sql语句的对象)stmt = conn.createStatement();//4.执行sql语句String sql = "select * from book ";rs = stmt.executeQuery(sql);if(rs.next()) {while (true) {String s1 = rs.getString("name");String s2 = rs.getString("author");int s3 = rs.getInt("price");String s4 = rs.getString("type");String s5 = rs.getString("isBorrowed");System.out.print("name: " + s1);System.out.print(",author:" + s2);System.out.print(",price:" + s3);System.out.print(",type:" + s4);System.out.print(",isBorrowed:" + s5);System.out.println();if(!rs.next())break;}}else{System.out.println("没有这本书");}}catch (Exception e) {e.printStackTrace();} finally {//6.释放资源if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}if (stmt != null) {try {stmt.close();} catch (SQLException e) {e.printStackTrace();}}if (conn != null) {try {conn.close();} catch (SQLException e) {e.printStackTrace();}}}}
}

BorrowOperation类

package opera;import book.Book;
import book.BookList;import java.sql.*;
import java.util.Scanner;public class BorrowOperation implements IOPeration{@Overridepublic void work(BookList bookList) {System.out.println("借阅图书!");System.out.println("请输入要借阅的图书名字:");Scanner scanner=new Scanner(System.in);String name=scanner.nextLine();//添加到数据库//定义3个变量Connection conn = null;Statement stmt = null;ResultSet rs = null;try {//1.注册驱动Class.forName("com.mysql.cj.jdbc.Driver");//2.获取连接conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/cnm", "root", "123456");//3.获取数据库操作对象(执行sql语句的对象)stmt = conn.createStatement();//4.执行sql语句String sql = "select * from book where name='"+name+"'";rs = stmt.executeQuery(sql);if(rs.next()) {String s1 = "select isBorrowed from book where name='"+name+"'";rs = stmt.executeQuery(s1);if(rs.next()){String str = rs.getString("isBorrowed");if(str.equals("未借阅")) {String s2 = "update book set isBorrowed='已借阅' where name='" + name + "'";int x = stmt.executeUpdate(s2);if (x > 0)System.out.println("借阅成功!");elseSystem.out.println("借阅失败");}}}else{System.out.println("没有这本书");}}catch (Exception e) {e.printStackTrace();} finally {//6.释放资源if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}if (stmt != null) {try {stmt.close();} catch (SQLException e) {e.printStackTrace();}}if (conn != null) {try {conn.close();} catch (SQLException e) {e.printStackTrace();}}}}
}

ReturnOperation类

package opera;import book.Book;
import book.BookList;import java.sql.*;
import java.util.Scanner;public class ReturnOperation implements IOPeration{@Overridepublic void work(BookList bookList) {System.out.println("归还图书!");System.out.println("请输入要归还的图书名字:");Scanner scanner=new Scanner(System.in);String name=scanner.nextLine();//添加到数据库//定义3个变量Connection conn = null;Statement stmt = null;ResultSet rs = null;try {//1.注册驱动Class.forName("com.mysql.cj.jdbc.Driver");//2.获取连接conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/cnm", "root", "123456");//3.获取数据库操作对象(执行sql语句的对象)stmt = conn.createStatement();//4.执行sql语句String sql = "select * from book where name='"+name+"'";rs = stmt.executeQuery(sql);if(rs.next()) {String s1 = "select isBorrowed from book where name='"+name+"'";rs = stmt.executeQuery(s1);if(rs.next()){String str = rs.getString("isBorrowed");if(str.equals("已借阅")) {String s2 = "update book set isBorrowed='未借阅' where name='" + name + "'";int x = stmt.executeUpdate(s2);if (x > 0)System.out.println("归还成功!");elseSystem.out.println("归还失败");}}}else{System.out.println("没有这本书");}}catch (Exception e) {e.printStackTrace();} finally {//6.释放资源if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}if (stmt != null) {try {stmt.close();} catch (SQLException e) {e.printStackTrace();}}if (conn != null) {try {conn.close();} catch (SQLException e) {e.printStackTrace();}}}}
}

ExitOperation类

package opera;import book.BookList;public class ExitOperation implements IOPeration{@Overridepublic void work(BookList bookList) {System.out.println("退出系统!");System.exit(0);//退出系统。0代表正常退出}
}

Main类

import book.BookList;
import user.AdminUser;
import user.NormalUser;
import user.User;import java.util.Scanner;public class Main {//登录public static User login() {System.out.println("请输入你的姓名:");Scanner scanner = new Scanner(System.in);String name = scanner.nextLine();System.out.println("请选择你的身份:1->管理员 0->普通用户");int choice = scanner.nextInt();if (choice == 1) {//说明是管理员//由于有返回值,所以我们的方法返回值就不能写void了。但是我们也无法确定返回值是什么,可能是管理员,可能是用户。所以,用向上转型,写User.return new AdminUser(name);//返回实例化一个管理员对象} else {return new NormalUser(name);//返回实例化一个用户对象}}public static void main(String[] args) {User user = login();//执行上面的login方法BookList bookList = new BookList();while (true) {int choice = user.menu();//实现打印菜单user.doWork(choice, bookList);}}
}

相关文章:

图书管理系统(JDBC)

AdminUser是管理员类 NormalUser是用户类 AddOperation是增加图书类 BorrowOperation是借书类 DelOperation是删除图书类 ExitOperation是退出类 FindOperation是查找图书类 IOPeration是接口 ReturnOperation是还书类 ShowOperation是显示所有图书类 注意&#xff1a…...

模板初阶及STL简介

目录 一.模板初阶 1.泛型函数 2.函数模板 1.函数模板概念 2.函数模板使用格式 3.函数模板的原理 4.函数模板的实例化 5.模板参数的匹配原则 3.类模板 1.类模板的定义格式 2.类模板的实例化 二.STL简介 1.什么是STL 2.STL的版本 3.STL的六大组件 4.如何学习STL …...

UE5 不同的编译模式下,module的组织形式

由于最近在琢磨UE5.4这个引擎,在学习过程中,碰到了一些非常有意思的事情,我在尝试把之前写的一些底层库搬到UE里面,比如底层库,网络库等等,我通过建立module,将这些库用源代码的方式整合进了UE5…...

【ms-swift 大模型微调实战】

安装环境 pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simplepip install modelscope vllm ‘ms-swift[llm]’ -U 下载模型 modelscope download --model Qwen/Qwen2.5-7B-Instruct --local_dir ./Qwen2.5-7B-Instruct 微调 实验环境:…...

Linux:网络基础

计算机是人的工具,人需要协作,于是有了网络 专用服务器->专用计算机 局域网:随着计算机的数量增加,通过交换机和路由器连接计算机 广域网:将远隔千里的计算机都连在一起 协议 协议就是约定俗成 计算机之间用光信号…...

mysql 的内连接、左连接、右连接有什么区别?

在MySQL中,内连接、左连接和右连接是三种常见的连接类型,它们用于通过共享一个或多个字段的值,将两个或多个表组合在一起进行查询。以下是这三种连接类型的详细区别: 一、内连接(INNER JOIN) 定义&#x…...

update-alternatives(选择工具)

0 Preface/foreword 1 update-alternatives介绍 1.1 选项和用法 1.2 install用法 update-alternatives --install <link> <name> <path> <priority> [--slave <link> <name> <path>] link&#xff1a;符号链接&#xff08;软链…...

php解密,sg11解密-sg15解密 如何由sourceGuardian11-sourceGuardian15加密(sg11加密~sg15加密)的源码

sg11加密~sg11加密的PHP文件运行需安装SG11加密-SG15加密组件使用、支持WINDOW及LINUX各版本 sg11解密(SourceGuardian)-sg15解密(SourceGuardian)&#xff0c;号称目前最安全的组件加密已可以解密&#xff0c;解密率99.9%&#xff0c;基本可以直接使用&#xff0c;代码特征是…...

b站小土堆PyTorch视频学习笔记(二)

Dataloader:提供不同类型的数据集&#xff1b;为后面的网络提供不同的数据形式 Dataset&#xff1a;提供一种方式去获取数据及其label&#xff08;标签&#xff09; 主要实现以下两个功能&#xff1a; {如何获取每一个数据及其lable&#xff1b;告诉我们总共有多少数据} fr…...

Linux的压缩及其解压命令

1、zip文件 压缩 zip linux.zip linux 解压 unzip linux.zip 2、gz文件 压缩 gzip 1.tar 解压 gzip -d 1.tar.gz 3、tar文件(tar可打/解包&#xff0c;压缩/解压文件) 打包 tar -cf 1.rar test 解包 tar -xf 1.tar 解压gz并解包 tar -xjvf archive_name.tar.bz2&#…...

GXYCTF2019:gakki

把题目给的附件解压后给了张图片&#xff0c;顺带着瞟一眼属性&#xff0c;没有值得注意的 binwalk检测一手&#xff0c;看见有个rar压缩包 提取出来的压缩包是有密码的&#xff0c;但是题目并没有给出获取密码的途径&#xff0c;所以先爆破试试&#xff0c;用最常用的四位数爆…...

顺序表(C 语言)

目录 一、线性表二、顺序表1. 静态顺序表2. 动态顺序表2.1 动态顺序表的实现分析2.2 动态顺序表的实现2.3 动态顺序表存在的问题 三、与数组有关的面试题1. 移除元素2. 删除有序数组中的重复项 一、线性表 线性表&#xff08;linear list&#xff09;是n个具有相同特性的数据元…...

一:时序数据库-Influx应用

目录 0、版本号 1、登录页面 2、账号基本信息 3、数据库案例 4、可视化 5、java案例 0、版本号 InfluxDB v2.4.0 1、登录页面 http://127.0.0.1:8086/signin 账号&#xff1a;自己账号 密码&#xff1a;自己密码 2、账号基本信息 查看用户id和组织id&#xff01;&…...

Word文档丢失抢救方法:15 个 Word 文档恢复工具

MS Word 文档恢复的重要性 对于严重依赖 Microsoft Word 创建和编辑文档的个人和企业来说&#xff0c;MS Word 文档恢复是一个至关重要的方面。 文件损坏、系统崩溃和其他意外事件可能会导致 Word 文档中存储的重要数据丢失。 及时恢复这些文档有助于节省时间、精力和资源。 本…...

关于自动驾驶等级相关知识

本文主要介绍自动驾驶等级的一下知识&#xff0c;在介绍之前&#xff0c;首先要介绍一些基本知识&#xff0c;然后介绍自动驾驶不同等级 1、自动驾驶相关知识 监控和判断&#xff08;OEDA&#xff09;&#xff1a;指对车辆周围的物体和事件进行检测和感知&#xff0c;并给出应…...

Java中跳转结构

在Java中&#xff0c;跳转结构用于控制程序的执行流程。 2.4.1 break 用途: 用于终止当前循环&#xff08;for、while、do-while&#xff09;或switch语句。 public class BreakExample {public static void main(String[] args) {for (int i 0; i < 10; i) {if (i 5) …...

CNN-Attention分类预测 | Matlab实现多特征分类预测

CNN-Attention分类预测 | Matlab实现多特征分类预测 目录 CNN-Attention分类预测 | Matlab实现多特征分类预测预测效果基本介绍程序设计参考资料 预测效果 基本介绍 1.Matlab实现CNN-Attention卷积神经网络融合注意力机制多特征分类预测&#xff0c;运行环境Matlab2023b及以上…...

[java][基础]JSP

目标&#xff1a; 理解 JSP 及 JSP 原理 能在 JSP中使用 EL表达式 和 JSTL标签 理解 MVC模式 和 三层架构 能完成品牌数据的增删改查功能 1&#xff0c;JSP 概述 JSP&#xff08;全称&#xff1a;Java Server Pages&#xff09;&#xff1a;Java 服务端页面。是一种动态的…...

《测绘学报》

《测绘学报》 办刊宗旨&#xff1a;尊重科学、弘扬学术、追求卓越、求实创新。60多年来&#xff0c;《测绘学报》作为承载着测绘地理信息科学技术和科研成果的载体&#xff0c;作为测绘地理信息行业人才培养和学术交流的阵地&#xff0c;坚持把学术论文的质量放在期刊工作的重要…...

代码随想录之链表刷题总结

目录 1.链表理论基础 2.移除链表元素 3.设计链表 4.翻转链表 5.两两交换链表中的节点 6.删除链表中的第N个节点 7.链表相交 8.环形链表 1.链表理论基础 链表是一种通过指针串联在一起的线性结构&#xff0c;每一个节点由两部分组成&#xff0c;一个是数据域一个是指针域…...

golang循环变量捕获问题​​

在 Go 语言中&#xff0c;当在循环中启动协程&#xff08;goroutine&#xff09;时&#xff0c;如果在协程闭包中直接引用循环变量&#xff0c;可能会遇到一个常见的陷阱 - ​​循环变量捕获问题​​。让我详细解释一下&#xff1a; 问题背景 看这个代码片段&#xff1a; fo…...

在鸿蒙HarmonyOS 5中实现抖音风格的点赞功能

下面我将详细介绍如何使用HarmonyOS SDK在HarmonyOS 5中实现类似抖音的点赞功能&#xff0c;包括动画效果、数据同步和交互优化。 1. 基础点赞功能实现 1.1 创建数据模型 // VideoModel.ets export class VideoModel {id: string "";title: string ""…...

汽车生产虚拟实训中的技能提升与生产优化​

在制造业蓬勃发展的大背景下&#xff0c;虚拟教学实训宛如一颗璀璨的新星&#xff0c;正发挥着不可或缺且日益凸显的关键作用&#xff0c;源源不断地为企业的稳健前行与创新发展注入磅礴强大的动力。就以汽车制造企业这一极具代表性的行业主体为例&#xff0c;汽车生产线上各类…...

【论文笔记】若干矿井粉尘检测算法概述

总的来说&#xff0c;传统机器学习、传统机器学习与深度学习的结合、LSTM等算法所需要的数据集来源于矿井传感器测量的粉尘浓度&#xff0c;通过建立回归模型来预测未来矿井的粉尘浓度。传统机器学习算法性能易受数据中极端值的影响。YOLO等计算机视觉算法所需要的数据集来源于…...

RNN避坑指南:从数学推导到LSTM/GRU工业级部署实战流程

本文较长&#xff0c;建议点赞收藏&#xff0c;以免遗失。更多AI大模型应用开发学习视频及资料&#xff0c;尽在聚客AI学院。 本文全面剖析RNN核心原理&#xff0c;深入讲解梯度消失/爆炸问题&#xff0c;并通过LSTM/GRU结构实现解决方案&#xff0c;提供时间序列预测和文本生成…...

什么是Ansible Jinja2

理解 Ansible Jinja2 模板 Ansible 是一款功能强大的开源自动化工具&#xff0c;可让您无缝地管理和配置系统。Ansible 的一大亮点是它使用 Jinja2 模板&#xff0c;允许您根据变量数据动态生成文件、配置设置和脚本。本文将向您介绍 Ansible 中的 Jinja2 模板&#xff0c;并通…...

xmind转换为markdown

文章目录 解锁思维导图新姿势&#xff1a;将XMind转为结构化Markdown 一、认识Xmind结构二、核心转换流程详解1.解压XMind文件&#xff08;ZIP处理&#xff09;2.解析JSON数据结构3&#xff1a;递归转换树形结构4&#xff1a;Markdown层级生成逻辑 三、完整代码 解锁思维导图新…...

Neko虚拟浏览器远程协作方案:Docker+内网穿透技术部署实践

前言&#xff1a;本文将向开发者介绍一款创新性协作工具——Neko虚拟浏览器。在数字化协作场景中&#xff0c;跨地域的团队常需面对实时共享屏幕、协同编辑文档等需求。通过本指南&#xff0c;你将掌握在Ubuntu系统中使用容器化技术部署该工具的具体方案&#xff0c;并结合内网…...

Java后端检查空条件查询

通过抛出运行异常&#xff1a;throw new RuntimeException("请输入查询条件&#xff01;");BranchWarehouseServiceImpl.java // 查询试剂交易&#xff08;入库/出库&#xff09;记录Overridepublic List<BranchWarehouseTransactions> queryForReagent(Branch…...

Qt Quick Controls模块功能及架构

Qt Quick Controls是Qt Quick的一个附加模块&#xff0c;提供了一套用于构建完整用户界面的UI控件。在Qt 6.0中&#xff0c;这个模块经历了重大重构和改进。 一、主要功能和特点 1. 架构重构 完全重写了底层架构&#xff0c;与Qt Quick更紧密集成 移除了对Qt Widgets的依赖&…...