Java Swing + MySQL图书借阅管理系统

系列文章目录

Java Swing + MySQL 图书管理系统
Java Swing + MySQL 图书借阅管理系统


文章目录

  • 系列文章目录
  • 前言
  • 一、项目展示
  • 二、部分代码
    • 1.Book
    • 2.BookDao
    • 3.DBUtil
    • 4.BookAddInternalFrame
    • 5.Login
  • 三、配置


前言

项目是使用Java swing开发,界面设计比较简洁、适合作为Java课设设计以及学习技术使用。

  • 语言:Java
  • 界面:JavaSwing
  • 数据库:MySQL 8.x

具体功能如下:
1、基础功能
(1)系统登录功能:用户可以通过用户名和密码登录系统。
(2)图书分类管理功能:管理员可以对于图书的类别进行增、删、改、查操作。
(3)图书信息管理功能:能够增、删图书,修改图书名称、类别、价格等信息。
(4)图书借阅管理功能:包括图书借出和图书归还等操作,设计功能时需要考虑逾期情况的判别和处理。
2、可选加分功能
(1)借阅记录查询功能:学生可以查看自己在某时间段之内的借阅记录;管理员可以按照学号查询学生的借阅记录。(ps:只有管理员能够增删改查图书内容,用户只有查找书的信息的权限)

一、项目展示

image-20240527010008617

image-20240527010154137

image

image-20240527010339195

image-20240527010419245

image-20240527010455653

image-20240527010518137

image-20240527010632545

image-20240527010649613
image-20240527011013968

二、部分代码

1.Book

代码如下(示例):

package entity;/*** BookManagementSystem* 图书** @author PlutoCtx* @version 2024/5/26 1:07* @email ctx195467@163.com* @since JDK17*/public class Book {/*** 图书id*/private int id;/*** 书名*/private String bookName;/*** 作者*/private String author;/*** 图书数量*/private int number;/*** 价格*/private Float price;/*** 图书类别*/private Integer bookTypeId;/*** 图书类别*/private String bookTypeName;/*** 描述*/private String bookDesc;public Book(String bookName, String author, Integer number, Float price, Integer bookTypeId, String bookDesc) {super();this.bookName = bookName;this.author = author;this.number = number;this.price = price;this.bookTypeId = bookTypeId;this.bookDesc = bookDesc;}public Book(int id, String bookName, String author, Integer number, Float price, Integer bookTypeId, String bookDesc) {super();this.id = id;this.bookName = bookName;this.author = author;this.number = number;this.price = price;this.bookTypeId = bookTypeId;this.bookDesc = bookDesc;}public Book(String bookName, String author, Integer bookTypeId) {super();this.bookName = bookName;this.author = author;this.bookTypeId = bookTypeId;}public int getId() {return id;}public void setId(int id) {this.id = id;}public String getBookName() {return bookName;}public void setBookName(String bookName) {this.bookName = bookName;}public String getAuthor() {return author;}public void setAuthor(String author) {this.author = author;}public int getNumber() {return number;}public void setNumber(int number) {this.number = number;}public Float getPrice() {return price;}public void setPrice(Float price) {this.price = price;}public Integer getBookTypeId() {return bookTypeId;}public void setBookTypeId(Integer bookTypeId) {this.bookTypeId = bookTypeId;}public String getBookTypeName() {return bookTypeName;}public void setBookTypeName(String bookTypeName) {this.bookTypeName = bookTypeName;}public String getBookDesc() {return bookDesc;}public void setBookDesc(String bookDesc) {this.bookDesc = bookDesc;}public Book() {}public Book(int id,String bookName,String author,Integer number,Float price,Integer bookTypeId,String bookTypeName,String bookDesc) {this.id = id;this.bookName = bookName;this.author = author;this.number = number;this.price = price;this.bookTypeId = bookTypeId;this.bookTypeName = bookTypeName;this.bookDesc = bookDesc;}}

2.BookDao

代码如下(示例):

package dao;import entity.Book;import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;/*** BookManagementSystem** @author PlutoCtx* @version 2024/5/26 9:27* @email ctx195467@163.com* @since JDK17*/public class BookDao {/*** 添加图书* @param connection    连接数据库* @param book  书籍* @return  preparedStatement.executeUpdate(),int* @throws Exception    how do I know*/public int add(Connection connection, Book book)throws Exception{String sql = "INSERT INTO book VALUES (null, ?, ?, ?, ?, ?, ?)";PreparedStatement preparedStatement = connection.prepareStatement(sql);preparedStatement.setString(1, book.getBookName());preparedStatement.setString(2, book.getAuthor());preparedStatement.setInt(3, book.getNumber());preparedStatement.setFloat(4, book.getPrice());preparedStatement.setInt(5, book.getBookTypeId());preparedStatement.setString(6, book.getBookDesc());return preparedStatement.executeUpdate();}/*** 查找书籍* @param connection    连接数据库* @param book  书籍* @return  preparedStatement.executeUpdate(), int* @throws Exception    how do I know*/public ResultSet list(Connection connection, Book book)throws Exception{StringBuilder stringBuffer = new StringBuilder("SELECT * FROM book b,bookType bt WHERE b.bookTypeId = bt.id");if(book.getBookName() != null &&!book.getBookName().equals("")){stringBuffer.append(" and b.bookName like '%").append(book.getBookName()).append("%'");}if(book.getAuthor() != null &&!book.getAuthor().equals("")){stringBuffer.append(" and b.author like '%").append(book.getAuthor()).append("%'");}if(book.getBookTypeId() != null && book.getBookTypeId()!=-1){stringBuffer.append(" and b.bookTypeId=").append(book.getBookTypeId());}PreparedStatement preparedStatement = connection.prepareStatement(stringBuffer.toString());return preparedStatement.executeQuery();}/*** 删除书籍* @param connection    连接数据库* @param id 书籍id号* @return  preparedStatement.executeUpdate(), int* @throws Exception    how do I know*/public int delete(Connection connection,String id)throws Exception{String sql = "DELETE FROM book " +"WHERE id = ?";PreparedStatement preparedStatement = connection.prepareStatement(sql);preparedStatement.setString(1, id);return preparedStatement.executeUpdate();}/*** 更新书籍* @param connection    连接数据库* @param book  书籍* @return  preparedStatement.executeUpdate(),int* @throws Exception    how do I know*/public int update(Connection connection,Book book) throws Exception{String sql = "UPDATE book " +"SET bookName = ?, author = ?, number = ?, price = ?, bookDesc = ?, bookTypeId = ? " +"WHERE id = ?";PreparedStatement preparedStatement = connection.prepareStatement(sql);preparedStatement.setString(1, book.getBookName());preparedStatement.setString(2, book.getAuthor());preparedStatement.setInt(3, book.getNumber());preparedStatement.setFloat(4, book.getPrice());preparedStatement.setString(5, book.getBookDesc());preparedStatement.setInt(6, book.getBookTypeId());preparedStatement.setInt(7, book.getId());return preparedStatement.executeUpdate();}/*** 判断书籍是否存在* @param connection    数据库连接* @param bookTypeId    书类号* @return  存在与否* @throws Exception    异常多了什么都有可能*/public boolean existBookByBookTypeId(Connection connection,String bookTypeId)throws Exception{String sql = "SELECT * FROM book WHERE bookTypeId = ?";PreparedStatement preparedStatement = connection.prepareStatement(sql);preparedStatement.setString(1, bookTypeId);ResultSet rs = preparedStatement.executeQuery();return rs.next();}}

3.DBUtil

package utils;import java.sql.Connection;
import java.sql.DriverManager;/*** BookManagementSystem* 数据库连接** @author PlutoCtx* @version 2024/5/26 8:06* @email ctx195467@163.com* @since JDK17*/public class DBUtil {/**数据库*/private String url = "jdbc:mysql://localhost:3306/BookBorrowingManagementSystem";/*** 用户名*/private String username = "root";/*** 密码*/private String password = "Shangxiao111";/*** 驱动名称*/private String jdbcName = "com.mysql.cj.jdbc.Driver";/*** 获取数据库连接* @return  返回连接* @throws Exception 没连上*/public Connection getConnection() throws Exception{Class.forName(jdbcName);Connection connection = DriverManager.getConnection(url, username, password);return connection;}/*** 关闭数据库连接* @param connection    数据库连接* @throws Exception    异常*/public void closeConnection(Connection connection) throws Exception{if (connection != null){connection.close();}}}

4.BookAddInternalFrame

package view.adminOperation;import dao.BookDao;
import dao.BookTypeDao;
import entity.Book;
import entity.BookType;
import utils.DBUtil;import javax.swing.*;
import javax.swing.border.LineBorder;
import java.awt.event.ActionEvent;
import java.sql.Connection;
import java.sql.ResultSet;
import java.util.Objects;
import java.util.logging.Logger;/*** BookManagementSystem* 图书添加界面** @author PlutoCtx* @version 2024/5/26 9:08* @email ctx195467@163.com* @since JDK17*/public class BookAddInternalFrame extends JInternalFrame {private final JTextField bookNameTxt;private final JTextField authorTxt;private final JTextField bookNumberTxt;private final ButtonGroup buttonGroup = new ButtonGroup();private final JTextField priceTxt;private final JComboBox bookTypeJcb;private final JTextArea bookDescTxt;private final DBUtil dbUtil = new DBUtil();private final BookTypeDao bookTypeDao = new BookTypeDao();private final BookDao bookDao = new BookDao();/*** Create the frame.*/public BookAddInternalFrame() {setClosable(true);setIconifiable(true);setTitle("图书添加");setBounds(100, 100, 450, 467);JLabel label = new JLabel("图书名称:");bookNameTxt = new JTextField();bookNameTxt.setColumns(10);JLabel label1 = new JLabel("图书作者:");authorTxt = new JTextField();authorTxt.setColumns(10);JLabel label2 = new JLabel("图书数量:");bookNumberTxt = new JTextField();bookNumberTxt.setColumns(10);JLabel label3 = new JLabel("图书价格:");priceTxt = new JTextField();priceTxt.setColumns(10);JLabel label4 = new JLabel("图书描述:");bookDescTxt = new JTextArea();JLabel label5 = new JLabel("图书类别:");bookTypeJcb = new JComboBox();JButton button = new JButton("添加");button.addActionListener(this::bookAddActionPerformed);button.setIcon(new ImageIcon(Objects.requireNonNull(BookAddInternalFrame.class.getResource("/add.png"))));JButton button1 = new JButton("重置");button1.addActionListener(this::resetValueActionPerformed);button1.setIcon(new ImageIcon(Objects.requireNonNull(BookAddInternalFrame.class.getResource("/reset.png"))));GroupLayout groupLayout = new GroupLayout(getContentPane());groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayout.createSequentialGroup().addGap(42).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayout.createSequentialGroup().addComponent(button).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(button1).addGap(232)).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(label5).addGroup(groupLayout.createSequentialGroup().addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(label4).addComponent(label2).addComponent(label)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayout.createSequentialGroup().addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false).addComponent(bookNameTxt, GroupLayout.PREFERRED_SIZE, 88, GroupLayout.PREFERRED_SIZE).addComponent(bookNumberTxt, GroupLayout.PREFERRED_SIZE, 88, GroupLayout.PREFERRED_SIZE).addComponent(bookTypeJcb, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addGap(35).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false).addGroup(groupLayout.createSequentialGroup().addComponent(label1).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(authorTxt, GroupLayout.PREFERRED_SIZE, 91, GroupLayout.PREFERRED_SIZE)).addGroup(groupLayout.createSequentialGroup().addComponent(label3).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(priceTxt)))).addComponent(bookDescTxt)).addContainerGap(44, Short.MAX_VALUE))))));groupLayout.setVerticalGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayout.createSequentialGroup().addGap(42).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(label).addComponent(bookNameTxt, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addComponent(label1).addComponent(authorTxt, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGap(29).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(label2).addComponent(bookNumberTxt).addComponent(label3).addComponent(priceTxt, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGap(33).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(label5).addComponent(bookTypeJcb, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGap(30).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(label4).addComponent(bookDescTxt, GroupLayout.PREFERRED_SIZE, 137, GroupLayout.PREFERRED_SIZE)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE).addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(button).addComponent(button1)).addGap(42)));getContentPane().setLayout(groupLayout);/** 设置文本域边框*/bookDescTxt.setBorder(new LineBorder(new java.awt.Color(127,157,185), 1, false));fillBookType();}/*** 重置事件处理* @param e event*/private void resetValueActionPerformed(ActionEvent e) {this.resetValue();}/*** 图书添加事件处理* @param event event*/private void bookAddActionPerformed(ActionEvent event) {String bookName = this.bookNameTxt.getText();String author = this.authorTxt.getText();String price = this.priceTxt.getText();String bookDesc = this.bookDescTxt.getText();if(bookName == null || "".equals(bookName.trim())){JOptionPane.showMessageDialog(null, "图书名称不能为空");return;}if(author == null || "".equals(author.trim())){JOptionPane.showMessageDialog(null, "图书作者不能为空");return;}if(price == null || "".equals(price.trim())){JOptionPane.showMessageDialog(null, "图书价格不能为空");return;}String bookNumber = bookNumberTxt.getText();int numberOfBook = bookNumber.isEmpty() ? 0 : Integer.parseInt(bookNumber);BookType bookType = (BookType) bookTypeJcb.getSelectedItem();int bookTypeId = bookType.getId();Book book = new Book(bookName,author, numberOfBook, Float.parseFloat(price) , bookTypeId,  bookDesc);Connection con = null;try{con = dbUtil.getConnection();int addNum = bookDao.add(con, book);if(addNum == 1){JOptionPane.showMessageDialog(null, "图书添加成功");resetValue();}else{JOptionPane.showMessageDialog(null, "图书添加失败");}}catch(Exception e){e.printStackTrace();JOptionPane.showMessageDialog(null, "图书添加失败");}finally{try {dbUtil.closeConnection(con);} catch (Exception e) {e.printStackTrace();}}}/*** 重置表单*/private void resetValue(){this.bookNameTxt.setText("");this.authorTxt.setText("");this.priceTxt.setText("");this.bookNumberTxt.setText("");this.bookDescTxt.setText("");if(this.bookTypeJcb.getItemCount()>0){this.bookTypeJcb.setSelectedIndex(0);}}/*** 初始化图书类别下拉框*/private void fillBookType(){Connection con = null;BookType bookType = null;try{con = dbUtil.getConnection();ResultSet rs = bookTypeDao.list(con, new BookType());while(rs.next()){bookType = new BookType();bookType.setId(rs.getInt("id"));bookType.setBookTypeName(rs.getString("bookTypeName"));this.bookTypeJcb.addItem(bookType);}}catch(Exception e){e.printStackTrace();}finally{Logger.getGlobal().info("finished!");}}
}

5.Login

package view;import dao.UserDao;
import entity.User;
import utils.DBUtil;import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.FontUIResource;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.sql.Connection;
import java.util.Enumeration;
import java.util.Objects;/*** BookManagementSystem* 登录界面** @author PlutoCtx* @version 2024/5/26 8:17* @email ctx195467@163.com* @since JDK17*/public class Login extends JFrame {private JPanel contentPane;private final JTextField userNameText;private final JPasswordField passwordText;private final DBUtil dbUtil = new DBUtil();private final UserDao userDao = new UserDao();/*** Create the frame*/public Login(){//改变系统默认字体Font font = new Font("Dialog", Font.PLAIN, 12);Enumeration<Object> keys = UIManager.getDefaults().keys();while (keys.hasMoreElements()){Object key = keys.nextElement();Object value = UIManager.get(key);if (value instanceof FontUIResource){UIManager.put(key, font);}}setResizable(false);// 用户登录setTitle("用户登录");setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);setBounds(500,250,450,343);contentPane = new JPanel();contentPane.setBorder(new EmptyBorder(5,5,5,5));setContentPane(contentPane);JLabel lblNewLabel = new JLabel("图书管理系统");lblNewLabel.setFont(new Font("宋体", Font.BOLD, 23));lblNewLabel.setIcon(new ImageIcon(Objects.requireNonNull(getClass().getResource("/logo.png"))));JLabel lblNewLabel1 = new JLabel("用户名:");lblNewLabel1.setIcon(new ImageIcon(Objects.requireNonNull(getClass().getResource("/userName.png"))));JLabel lblNewLabel2 = new JLabel("密  码:");lblNewLabel2.setIcon(new ImageIcon(Objects.requireNonNull(getClass().getResource("/password.png"))));userNameText = new JTextField();userNameText.setColumns(10);passwordText = new JPasswordField();JButton btnNewButton1 = new JButton("登录");btnNewButton1.addActionListener(this::loginActionPerformed);btnNewButton1.setIcon(new ImageIcon(Objects.requireNonNull(getClass().getResource("/login.png"))));JButton btnNewButton2 = new JButton("重置");btnNewButton2.addActionListener(this::resetValueActionPerformed);btnNewButton2.setIcon(new ImageIcon(Objects.requireNonNull(getClass().getResource("/reset.png"))));GroupLayout groupLayoutContentPane = new GroupLayout(contentPane);groupLayoutContentPane.setHorizontalGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayoutContentPane.createSequentialGroup().addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayoutContentPane.createSequentialGroup().addGap(111).addComponent(lblNewLabel)).addGroup(groupLayoutContentPane.createSequentialGroup().addGap(101).addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(lblNewLabel1).addComponent(lblNewLabel2).addComponent(btnNewButton1)).addGap(32).addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(btnNewButton2).addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING, false).addComponent(passwordText).addComponent(userNameText, GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE))))).addContainerGap(111, Short.MAX_VALUE)));groupLayoutContentPane.setVerticalGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayoutContentPane.createSequentialGroup().addGap(30).addComponent(lblNewLabel).addGap(26).addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(groupLayoutContentPane.createSequentialGroup().addComponent(lblNewLabel1).addGap(29).addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(lblNewLabel2).addComponent(passwordText, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))).addComponent(userNameText, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGap(36).addGroup(groupLayoutContentPane.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(btnNewButton1).addComponent(btnNewButton2)).addContainerGap(60, Short.MAX_VALUE)));contentPane.setLayout(groupLayoutContentPane);// 居中this.setLocationRelativeTo(null);}/*** 登录事件处理* @param evt action*/private void loginActionPerformed(ActionEvent evt) {String userName = this.userNameText.getText();String password = new String(this.passwordText.getPassword());if (userName == null || userName.equals("")){JOptionPane.showMessageDialog(null, "用户名不能为空");return;}if (password == null || password.equals("")){JOptionPane.showMessageDialog(null, "密码不能为空");return;}// 调用dao层方法User user = new User(userName, password);Connection con = null;try {con = dbUtil.getConnection();User currentUser = userDao.login(con, user);if (currentUser != null){dispose();if (currentUser.getStatus() == 1) {new AdminMainFrame(currentUser).setVisible(true);JOptionPane.showMessageDialog(null, "登录成功");} else {new UserMainFrame(currentUser).setVisible(true);JOptionPane.showMessageDialog(null, "登录成功");}}else {JOptionPane.showMessageDialog(null, "用户名或密码错误");}} catch (Exception e) {e.printStackTrace();}finally {try {dbUtil.closeConnection(con);}catch (Exception e){e.printStackTrace();}}}/*** 重置事件处理* @param evt action*/private void resetValueActionPerformed(ActionEvent evt){this.userNameText.setText("");this.passwordText.setText("");}}

三、配置

1、idea直接导入解压文件夹
2、打开navicat等数据库可视化软件,运行sql文件夹下的数据库文件
3、修改DBUtil.java中的用户名、连接、密码(如果有必要的话)
4、运行Main

如有购买需求,请移步到 面包多 进行购买,CSDN的收费太黑了

面包多中提供了几种不同的版本代码:

  • JavaSwing+MySQL图书管理系统 有数据库版,提供MySQL支持,数据能够实现增删改查
  • JavaSwing+MySQL图书管理系统 无数据库版,仅提供界面和部分鼠标点击事件,数据内容无法被修改
  • JavaSwing+MySQL图书借阅管理系统 有数据库版,提供MySQL支持,数据能够实现增删改查

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/16573.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Qt中信号和槽解决了什么问题

信号和槽解决了什么问题 Qt 中的信号和槽机制是一种用于处理对象之间通信的重要机制,它解决了以下几个问题: 对象之间的解耦(Decoupling): 问题: 在一个系统中,如果对象之间直接调用彼此的方法,就会形成紧密耦合的结构。这样的耦合使得对象难以独立地变更和维护,而且…

react-d3-tree:React组件创建交互式D3树形图

在这里插入代码片import React from "react"; import ReactDOM from "react-dom"; import Tree from "react-d3-tree";import "./styles.css";const myTreeData [{name: "Gaurang Torvekar",attributes: {keyA: "val …

【软考】2024年5月系统架构设计师考试感受

一 考试时间 5🈷️25日上午: 8点30-12点30: 综合知识和案例分析💚 5🈷️25日下午: 14点30-16点30: 论文📃 二 考试感受 2024年5月25日早上5点多一点,我就起床了👉🏻。简单洗漱后,就准备出门。可是,天呐,我的手机📱忘记充电了,所以就赶紧应急充会电😱…

基于Llama 3搭建中文版(Llama3-Chinese-Chat)大模型对话聊天机器人

前面两篇博文&#xff0c;我们分别在个人笔记本电脑部署了Llama 3 8B参数大模型&#xff0c;并使用Ollama搭建了基于 Web 可视化对话聊天机器人&#xff0c;可以在自己电脑上愉快的与Llama大模型 Web 机器人对话聊天了。但在使用过程中&#xff0c;笔者发现Llama大模型经常出现…

汇编一:汇编语言前的基础知识

计算机的工作原理就是取址执行,在哪儿执行呢,在cpu里面执行,从哪里面去取址呢?从内存中去取址,内存又被叫做存储器 可是,cpu和存储器是2个分开的硬件设备,那么是怎么做到把存储器里面的东西传给cpu呢,这就需要总线了 1.总线 总线一共可以分为3种, 一种是数据总线,一种是控制总…

OpenWrt U盘安装使用 详细教程 x86/64平台 软路由实测 系列一

1 官方稳定 版:OpenWrt 23.05 OpenWrt Downloads #根据实际情况选择 PC支持uefi,选择版本&#xff1a;https://downloads.openwrt.org/releases/23.05.3/targets/x86/64/openwrt-23.05.3-x86-64-generic-ext4-combined-efi.img.gz 2 rufus 制作U盘启动 3 制作好的U盘,接入主…

Redux基础

简介 状态管理工具&#xff0c;集中式管理react、vue、angular等应用中多个组件的状态&#xff0c;是一个库,使用之后可以清晰的知道应用里发生了什么以及数据是如何修改&#xff0c;如何更新的 在项目中添加 Redux 并不是必须的,根据项目需求选择是否引入 Redux 三个原则 …

Linux部分漏洞处理

1、ICMP timestamp请求响应漏洞 ICMP timestamp请求响应漏洞是指&#xff0c;当网络设备接收到ICMP timestamp请求时&#xff0c;它会返回当前时间戳作为响应&#xff0c;这可能导致设备的时间戳被暴露&#xff0c;进而可能被用于计算机时间戳协议&#xff08;TLS&#xff09;的…

PDF.js

什么是 PDF.js&#xff1f; PDF.js 是由 Mozilla 开发的一个用于呈现 PDF 文件的 JavaScript 库。它允许开发者将 PDF 文件直接嵌入到网页中&#xff0c;而无需使用插件或其他外部工具。PDF.js 使用 HTML5 技术&#xff0c;利用 Canvas 元素来呈现 PDF 内容&#xff0c;并提供…

基于集成经验模态分解的心电信号降噪和基于希尔伯特变换的R峰检测(MATLAB R2018)

近年来&#xff0c;心脏病已成为危害人类健康最常见的疾病。为了有效预防心脏疾病的发生&#xff0c;往往需要更加准确地采集与诊断心电信号&#xff0c;以便于更好地反映心脏情况。心电信号作为人体生理信号&#xff0c;对于识别心脏异常和心脏疾病具有重要的参考价值。心电信…

ubuntu如何安装gitlab runner

一、什么是GitLab Runner GitLab Runner 是 GitLab 提供的一个开源工具,用于在构建、测试和部署过程中执行作业。它是 GitLab 持续集成和持续部署(CI/CD)工作流的核心组件之一。 GitLab Runner 有以下主要功能: 作业执行:GitLab Runner 会接收来自 GitLab 的作业请求,并在指定…

ROS基础学习-ROS通信机制研究

研究ROS通信机制 研究ROS通信机制 0.前言1.话题通信1.1 理论模型1.2 话题通讯的基本操作1.2.1 C++1.2.2 Python0.前言 机器人是一种高度复杂的系统性实现,在机器人上可能集成各种传感器(雷达、摄像头、GPS…)以及运动控制实现,为了解耦合,在ROS中每一个功能点都是一个单独的…

从File类开始,学习Java文件操作

哈喽&#xff0c;各位小伙伴们&#xff0c;你们好呀&#xff0c;我是喵手。运营社区&#xff1a;C站/掘金/腾讯云&#xff1b;欢迎大家常来逛逛 今天我要给大家分享一些自己日常学习到的一些知识点&#xff0c;并以文字的形式跟大家一起交流&#xff0c;互相学习&#xff0c;一…

windows安装SQL Server

1、下载 下载网页&#xff1a;SQL Server 下載 | Microsoft 2022版下载地址&#xff1a;https://go.microsoft.com/fwlink/p/?linkid2215158&clcid0x404&culturezh-tw&countrytw 下载结果&#xff1a;SQL2022-SSEI-Dev.exe 打开选第三个&#xff0c;下载介质&…

自定义Linux命令,显示docker镜像、容器信息

1、修改环境变量&#xff08;仅对当前用户有效&#xff09; vim ~/.bashrc2、给命令取别名 alias dpsdocker ps --format "table{{.ID}}\t{{.Names}}\t{{.Status}}\t{{.Ports}}" alias disdocker images#保存并退出 :wq3、让配置重新生效 source ~/.bashrc4、测试&…

ChatGPT技术演进简介

chatGPT&#xff08;chat generative pre-train transformer&#xff0c; 可以对话的预训练trasformer模型&#xff09;&#xff0c;讨论点&#xff1a; 1、chatGPT为什么突然火了 2、GPT 1.0、2.0、3.0、3.5 、4和4o区别和特性&#xff0c;在不同应用场景中如何选对模型 3、未…

基于ESP8266的无线通信系统设计

本文介绍了一种基于ESP8266的无线通信系统设计方案。ESP8266是一款功能强大且成本低廉的WiFi模块&#xff0c;非常适合用于构建无线通信系统。本设计主要围绕ESP8266模块的功能特点&#xff0c;阐述了系统的硬件组成、软件设计以及实际应用示例。 关键词&#xff1a;ESP8266&a…

【docker】仓库harbor的部署

harbor介绍 Harbor 是一个用于存储和管理 Docker 镜像的开源仓库。它提供了一系列的功能&#xff0c;比如用户管理、访问控制、镜像管理、日志审计和安全扫描等。Harbor 可以作为私有仓库来使用&#xff0c;也可以与公有仓库&#xff08;如 Docker Hub&#xff09;集成使用。 …

python数据分析——apply 1

参考资料&#xff1a;活用pandas库 apply是指把函数同时作用于DataFrame的每一行或每一列。类似于编写一些跨每行或每列的for循环&#xff0c;并同时调用apply函数。 1、函数 函数是对python代码进行分组和复用的一种方法。如果某段代码会被多次使用&#xff0c;并且使用时是需…

JS Lab

如何用 JavaScript 在浏览器中弹窗如何在 JavaScript 中制作鼠标滑过按钮改变背景颜色如何在 JS 中点击按钮使数字增加如何在 JS 中循环打印多少次 HTML <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><title…