Java课程设计:基于Javaweb的超市商品管理系统

news2025/2/23 10:30:04

文章目录

  • 一、项目介绍
  • 二、项目展示
  • 三、源码展示
  • 四、源码获取

一、项目介绍

  • 管理员用户:需要能够添加商品类型以及商品,能够对商品进行管理,能够查询用户信息,能够查询出售记录;
  • 普通用户:需要能够搜索商品并执行购买商品操作。能够查询购买记录,能够对余额进行充值。
  • 注册:能够进行新用户的注册。

在这里插入图片描述
功能

1.注册、登录功能。
2.管理员有商品类别管理、商品管理、用户管理、出售记录查询等功能。
3.普通用户有查看购物车、购物卡充值、修改密码、购买商品等功能。

二、项目展示

登录
在这里插入图片描述
主页
在这里插入图片描述
全部商品类
在这里插入图片描述
商品添加类
在这里插入图片描述
查询页面
在这里插入图片描述
用户列表
在这里插入图片描述

三、源码展示

连接数据库

public class JDBCUtils {
    private static String driver;
    private static String url;
    private static String username;
    private static String password;
    private static ResourceBundle bundle;
   
    
    static{
        bundle = ResourceBundle.getBundle("db");
        driver = bundle.getString("jdbc.driverClass");
        url = bundle.getString("jdbc.jdbcUrl");
        username = bundle.getString("jdbc.username");
        password = bundle.getString("jdbc.password");
    }
 
    /**
     * 
     *
     * @return
     */
    public static Connection getConnection() {
        Connection conn = null;
        try {
            Class.forName(driver);
            conn = DriverManager.getConnection(url, username, password);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return conn;
    }

   
    public static void release(Connection conn) {
        if (conn != null) {
            try {
                conn.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
    }
  

    public static void release(Connection conn, PreparedStatement pstmt) {
        if (pstmt != null) {
            try {
                pstmt.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        if (conn != null) {
            try {
                conn.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
    }

    public static void release(Connection conn, PreparedStatement pstmt, ResultSet rs) {
        if (rs != null) {
            try {
                rs.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        if (pstmt != null) {
            try {
                pstmt.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        if (conn != null) {
            try {
                conn.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
    }
    
}

登录类

public class Login extends JFrame {

	private JPanel contentPane;
	private JTextField txtT;
	private JPasswordField passwordField;

	private UserDao userDao = new UserDao();
	
	/**
	 * Create the frame.
	 */
	public Login() {
		setResizable(false);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 542, 482);
		contentPane = new JPanel();
		contentPane.setBackground(SystemColor.menu);
		contentPane.setForeground(Color.LIGHT_GRAY);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		
		JLabel lblNewLabel_1 = new JLabel("密码");
		lblNewLabel_1.setFont(new Font("微软雅黑", Font.BOLD, 15));
		
		JButton btnNewButton = new JButton("登录");
		btnNewButton.setFont(new Font("微软雅黑", Font.BOLD, 15));
		
		
		txtT = new JTextField();
		txtT.setFont(new Font("微软雅黑", Font.BOLD, 15));
		txtT.setColumns(10);
		
		JButton btnNewButton_1 = new JButton("注册");
		
		btnNewButton_1.setFont(new Font("微软雅黑", Font.BOLD, 15));
		
		JButton btnNewButton_2 = new JButton("重置");
		
		btnNewButton_2.setFont(new Font("微软雅黑", Font.BOLD, 15));
		
		passwordField = new JPasswordField();
		
		
		JLabel lblNewLabel = new JLabel("用户名:");
		lblNewLabel.setFont(new Font("微软雅黑", Font.BOLD, 15));
		GroupLayout gl_contentPane = new GroupLayout(contentPane);
		
		gl_contentPane.setHorizontalGroup(
			gl_contentPane.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_contentPane.createSequentialGroup()
					.addGap(108)
					.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING, false)
						.addGroup(gl_contentPane.createSequentialGroup()
							.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
								.addGroup(gl_contentPane.createSequentialGroup()
									.addGap(8)
									.addComponent(lblNewLabel_1))
								.addGroup(gl_contentPane.createSequentialGroup()
									.addPreferredGap(ComponentPlacement.RELATED)
									.addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 60, GroupLayout.PREFERRED_SIZE)))
							.addGap(18)
							.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
								.addComponent(passwordField, GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)
								.addComponent(txtT, GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)))
						.addGroup(gl_contentPane.createSequentialGroup()
							.addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, 71, GroupLayout.PREFERRED_SIZE)
							.addGap(33)
							.addComponent(btnNewButton_1, GroupLayout.PREFERRED_SIZE, 71, GroupLayout.PREFERRED_SIZE)
							.addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
							.addComponent(btnNewButton_2, GroupLayout.PREFERRED_SIZE, 71, GroupLayout.PREFERRED_SIZE)))
					.addContainerGap(141, Short.MAX_VALUE))
		);
		gl_contentPane.setVerticalGroup(
			gl_contentPane.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_contentPane.createSequentialGroup()
					.addContainerGap(150, Short.MAX_VALUE)
					.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 38, GroupLayout.PREFERRED_SIZE)
						.addComponent(txtT, GroupLayout.PREFERRED_SIZE, 31, GroupLayout.PREFERRED_SIZE))
					.addGap(33)
					.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblNewLabel_1, GroupLayout.PREFERRED_SIZE, 38, GroupLayout.PREFERRED_SIZE)
						.addComponent(passwordField, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
					.addGap(41)
					.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
						.addComponent(btnNewButton)
						.addComponent(btnNewButton_2)
						.addComponent(btnNewButton_1))
					.addContainerGap(108, Short.MAX_VALUE))
		);
		contentPane.setLayout(gl_contentPane);
		 ImageIcon bg=new ImageIcon(Login.class.getResource("/image/login.jpg"));
		  this.setSize(bg.getIconWidth(),bg.getIconHeight());
		  JLabel label=new JLabel(bg); 
		  label.setSize(bg.getIconWidth(),bg.getIconHeight());
		  JPanel pan=(JPanel)this.getContentPane();
		  pan.setOpaque(false); 
		  this.getLayeredPane().add(label,new Integer(Integer.MIN_VALUE));
		 
		  this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		  this.setLocationRelativeTo(null);
		  
		  /**
		   * 点击方法
		   */
		  btnNewButton.addActionListener(new ActionListener() {
				@Override
				public void actionPerformed(ActionEvent e) {
					check();
				}
			});
		  btnNewButton_1.addActionListener(new ActionListener() {
				@Override
				public void actionPerformed(ActionEvent e) {
					
					dispose();
					new FirstLogin().setVisible(true);
				}
			});
		  btnNewButton_2.addActionListener(new ActionListener() {
				@Override
				public void actionPerformed(ActionEvent e) {
					txtT.setText("");
					passwordField.setText("");
				}
			});
		  passwordField.addKeyListener(new KeyAdapter() {
				@Override
				public void keyPressed(KeyEvent e) {
					if(e.getKeyCode()==10) {
						check();
					}
				}
			});
		
	}
	/**
	 * 登录检查
	 */
	private void check() {
		String userName = txtT.getText();
		String password = passwordField.getText();
		Connection conn = JDBCUtils.getConnection();
		if(StringUtils.isEmpty(userName, password)) {
			JOptionPane.showMessageDialog(null, "用户名或密码不能为空");
			return;
		}
		User user = new User(userName,password);
		UserId userid = null;
		try {
			userid = userDao.login(conn,user);//返回权限
			if(userid!=null) {
				if(userid.getUserid()==1) {
					LoginConfig.writeUser(userName,userid.getId().toString(),password,userid.getMoney().toString());
					JOptionPane.showMessageDialog(null, "欢迎你管理员");
					dispose();
					AdminFrm adminfrm = new AdminFrm();
					adminfrm.setVisible(true);
					return;
				}else if(userid.getUserid()==0){
					LoginConfig.writeUser(userName,userid.getId().toString(),password,userid.getMoney().toString());
					JOptionPane.showMessageDialog(null, "登录成功");
					dispose();
					UserFrm userfrm = new UserFrm();
					userfrm.setVisible(true);
					return;
				}
			}else {
				JOptionPane.showMessageDialog(null, "登录失败");
				return;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}
}

登录主页

public class AdminFrm extends JFrame {

    private JMenu mnNewMenu;
    private JPanel contentPane;
    public JDesktopPane desk = new JDesktopPane();
    //为了实现一次点击只能打开一个窗口,打开变为false,关闭变为true
    public static boolean flagGoodsTypeAdd = true;
    public static boolean flagIntroduce = true;
    public static boolean flagGoodsAll = true;
    public static boolean flagGoodsTypeAll = true;
    public static boolean flagUserList = true;
    public static boolean flagUserShopHistory = true;
    public static boolean flagUpdatePassword = true;
    public static boolean flagChongMoney = true;

    /**
     * Create the frame.
     */
    public AdminFrm() {
        setTitle("管理员界面");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(893, 813);

        JMenuBar menuBar = new JMenuBar();
        setJMenuBar(menuBar);

        mnNewMenu = new JMenu("");
        menuBar.add(mnNewMenu);

        mnNewMenu = new JMenu();
        mnNewMenu.setIcon(new ImageIcon(UserFrm.class.getResource("/image/user2.jpg")));
        mnNewMenu.setFont(new Font("Microsoft YaHei UI", Font.BOLD | Font.ITALIC, 15));
        //mnNewMenu.setBackground(new Color(0, 204, 255));
        menuBar.add(mnNewMenu);


        JMenuItem paswordUpd = new JMenuItem("修改密码");
        paswordUpd.setIcon(new ImageIcon(UserFrm.class.getResource("/image/password.jpg")));
        paswordUpd.setFont(new Font("Microsoft YaHei UI", Font.BOLD, 15));
        mnNewMenu.add(paswordUpd);


        JMenuItem logout = new JMenuItem("退出登录");
        logout.setIcon(new ImageIcon(UserFrm.class.getResource("/image/logout.jpg")));
        logout.setFont(new Font("Microsoft YaHei UI", Font.BOLD, 15));
        mnNewMenu.add(logout);

        JMenu mnNewMenu_1 = new JMenu("商品维护");
        //mnNewMenu_1.setBackground(Color.ORANGE);
        mnNewMenu_1.setFont(new Font("Microsoft YaHei UI", Font.BOLD | Font.ITALIC, 15));
        menuBar.add(mnNewMenu_1);

        JMenu menu = new JMenu("商品类别管理");
        menu.setFont(new Font("Microsoft YaHei UI", Font.BOLD, 15));
        mnNewMenu_1.add(menu);

        JMenuItem typeAll = new JMenuItem("商品类别维护");

        typeAll.setFont(new Font("Microsoft YaHei UI", Font.BOLD, 15));
        menu.add(typeAll);

        JMenuItem typeAdd = new JMenuItem("商品类别添加");

        typeAdd.setFont(new Font("Microsoft YaHei UI", Font.BOLD, 15));
        menu.add(typeAdd);

        JMenu menu_1 = new JMenu("商品管理");
        menu_1.setFont(new Font("Microsoft YaHei UI", Font.BOLD, 15));
        mnNewMenu_1.add(menu_1);

        JMenuItem shopAll = new JMenuItem("商品维护");

        shopAll.setFont(new Font("Microsoft YaHei UI", Font.BOLD, 15));
        menu_1.add(shopAll);

        JMenuItem shopAdd = new JMenuItem("商品添加");

        shopAdd.setFont(new Font("Microsoft YaHei UI", Font.BOLD, 15));
        menu_1.add(shopAdd);

        JMenu mnNewMenu_3 = new JMenu("出售情况");
        mnNewMenu_3.setFont(new Font("Microsoft YaHei UI", Font.BOLD | Font.ITALIC, 15));
        menuBar.add(mnNewMenu_3);

        JMenuItem mntmNewMenuItem_1 = new JMenuItem("用户列表");

        mntmNewMenuItem_1.setFont(new Font("Microsoft YaHei UI", Font.BOLD, 15));
        mnNewMenu_3.add(mntmNewMenuItem_1);

        JMenuItem mntmNewMenuItem_2 = new JMenuItem("出售记录");

        mntmNewMenuItem_2.setFont(new Font("Microsoft YaHei UI", Font.BOLD, 15));
        mnNewMenu_3.add(mntmNewMenuItem_2);

        JMenu mnNewMenu_2 = new JMenu("关于我们");
        mnNewMenu_2.setFont(new Font("Microsoft YaHei UI", Font.BOLD | Font.ITALIC, 15));
        menuBar.add(mnNewMenu_2);
        JMenuItem mntmNewMenuItem = new JMenuItem("介绍");
        mntmNewMenuItem.setFont(new Font("Microsoft YaHei UI", Font.BOLD, 15));
        mnNewMenu_2.add(mntmNewMenuItem);
        contentPane = new JPanel();
        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
        setContentPane(contentPane);
        contentPane.setLayout(new BorderLayout(0, 0));
        desk.setBackground(new Color(72, 209, 204));
        contentPane.add(desk, BorderLayout.CENTER);

        this.setExtendedState(JFrame.MAXIMIZED_BOTH);


        /**
         * 点击生成界面
         */
        //介绍界面
        mntmNewMenuItem.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Introduce introduce = Introduce.getIntroduce();
                if (flagIntroduce) {
                    introduce.setVisible(true);
                    desk.add(introduce);
                    flagIntroduce = false;
                }
            }
        });
        //商品类别管理界面
        typeAll.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                GoodsTypeAll goodsTypeAll = GoodsTypeAll.getGoodsTypeAll();
                if (flagGoodsTypeAll) {
                    goodsTypeAll.setVisible(true);
                    goodsTypeAll.fillJComboBox2();
                    desk.add(goodsTypeAll);
                    flagGoodsTypeAll = false;
                }
            }
        });
        //商品添加界面
        typeAdd.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                GoodsTypeAdd goodsTypeAdd = GoodsTypeAdd.getGoodsTypeAdd();
                if (flagGoodsTypeAdd) {
                    goodsTypeAdd.setVisible(true);
                    desk.add(goodsTypeAdd);
                    flagGoodsTypeAdd = false;
                }
            }
        });
        //商品管理界面
        shopAll.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                GoodsAll goodsAll = GoodsAll.getGoodsAll();
                if (flagGoodsAll) {
                    goodsAll.setVisible(true);
                    goodsAll.fillJComboBox2();
                    desk.add(goodsAll);
                    flagGoodsAll = false;
                }

            }
        });
        //商品添加界面
        shopAdd.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                GoodsAdd goodsAdd = GoodsAdd.getGoodsAdd();
                goodsAdd.setVisible(true);
                goodsAdd.fillJComboBox();
                desk.add(goodsAdd);
            }
        });
        //用户列表界面
        mntmNewMenuItem_1.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                UserList userlist = UserList.getUserList();
                if (flagUserList) {
                    userlist.setVisible(true);
                    userlist.fillTable(null);
                    desk.add(userlist);
                    flagUserList = false;
                }
            }
        });
        //销售记录界面
        mntmNewMenuItem_2.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                UserShopHistory usershophistory = UserShopHistory.getShopHistory();
                if (flagUserShopHistory) {
                    usershophistory.setVisible(true);
                    usershophistory.fillTable();
                    desk.add(usershophistory);
                    flagUserShopHistory = false;
                }
            }
        });
        this.fillName();

        //修改密码界面
        paswordUpd.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                UpdatePassword updatePassword = UpdatePassword.getUpdatePassword();
                updatePassword.setVisible(true);
                desk.add(updatePassword);
            }
        });
        //充值界面
        mntmNewMenuItem.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                ChongMoney chongMoney = ChongMoney.getChongMoney();
                if (flagChongMoney) {
                    chongMoney.setMoney();
                    chongMoney.setVisible(true);
                    desk.add(chongMoney);
                    flagChongMoney = false;
                }

            }
        });
        //退出登录
        logout.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                JOptionPane.showMessageDialog(null, "退出成功");
                dispose();
                new Login().setVisible(true);
            }
        });
//		logout.addMouseListener(new MouseAdapter() {
//			@Override
//			public void mouseClicked(MouseEvent mouseEvent) {
//				JOptionPane.showMessageDialog(null, "退出成功");
//				dispose();
//				new Login().setVisible(true);
//			}
//		});
    }

    private void fillName() {
        ArrayList useList = LoginConfig.getUserList();
        String userName = useList.get(0).toString();
        mnNewMenu.setText(userName);
    }
}

四、源码获取

因为页面与源码太多了,所以页面与源码只展示了一部分,完整源码已经打包了,点击下面蓝色链接获取!

点我获取源码

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

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

相关文章

Perl语言入门指南:掌握文本处理与系统管理的利器!

Perl是一种高级的、解释型的编程语言,具有强大的文本处理能力,被广泛用于文本处理、系统管理、网络编程等多种任务。本文将全面介绍Perl的基本概念、语法规则、主要用途以及如何开始学习Perl。 一、Perl语言简介 1. Perl的历史 Perl由Larry Wall在1987…

ERP、CRM、MRP、PLM、APS、MES、WMS、SRM系统介绍

一、ERP系统 ERP系统,即企业资源计划(Enterprise Resource Planning)系统,是一种集成管理软件系统,旨在帮助企业实现资源的有效管理和优化。以下是对ERP系统的详细介绍: 1、定义与功能 ERP是企业资源计划…

HTC-Net

表1 复现结果–Dice:0.8995476149550329,mIOU:0.8395136164423699,Recall:0.8688330349167194,F1-score:0.8573282647143806,PA:0.9356796542306741 与原文结果差不多 表…

2024黄河流域比赛的复现

目录 WEB [GKCTF 2021]easynode unser 知识点 WEB 根据此题先复现[GKCTF 2021]easynode这个题,这两个题类似 [GKCTF 2021]easynode 1.打开页面发现是登录页面,找到源文件里面的代码,分析如何进行登录,发现经过safeQuery()函…

FreeRTOS简单内核实现4 临界段

文章目录 0、思考与回答0.1、思考一0.2、思考二0.3、思考三 1、关中断1.1、带返回值1.2、不带返回值 2、开中断3、临界段4、应用 0、思考与回答 0.1、思考一 为什么需要临界段? 有时候我们需要部分代码一旦这开始执行,则不允许任何中断打断&#xff0…

GMT6绘制北半球

设置绘制区域及投影方式 投影方式选择立体等角投影,在GMT6中的命令是-Js # 定义区域变量和投影变量,纬度从北纬30度到极点 region-180/180/30/90 projection0/90/1:60000000 gmt set PROJ_ELLIPSOID WGS-84定义CPT及地形展示 现在定义一个CPT用于显示…

彻底理解 C 语言的数组在内存中到底是怎么存放的!

在C语言中,数组是经常被用到的重要数据类型,但在实际使用时,往往有很多工程师会出现各种各样的问题,如内存越界、错误的访问、初始化不当等。这其中有很大一个原因是没有彻底理解数组的存储机制,出现了一些非法地址或者…

基于springboot实现农产品直卖平台系统项目【项目源码+论文说明】计算机毕业设计

基于springboot实现农产品直卖平台系统的设计演示 摘要 计算机网络发展到现在已经好几十年了,在理论上面已经有了很丰富的基础,并且在现实生活中也到处都在使用,可以说,经过几十年的发展,互联网技术已经把地域信息的隔…

英语学习笔记36——Where ... ?

Where … ? ……在哪里? 词汇 Vocabulary beside prep. 在……旁边 同义词: near by 构成:be side side n. 边 搭配:side walk 人行道 例句:Bobby在我旁边。    Bobby is beside me. off prep. 离开&#xff…

Excel使用技巧(一)

一. 快速调整数据位置 已经录入数据的表格,要调整某一列的位置怎么办? 只要选中要调整的数据区域,然后按住Shift键不放,光标放到绿色边框位置后,按下鼠标左键不放拖动即可: 二. 取消合并单元格并恢复数据…

java反序列化---cc6链

目录 Transformer[]数组分析 链条代码跟进 ChainedTransformer.transform() LazyMap.get() TiedMapEntry.getValue() TiedMapEntry.hashCode() HashMap.hash() HashMap.put()的意外触发 LazyMap.get()中key的包含问题 cc6的payload如下 import org.apache.commons.co…

AI绘画入门教学:ComfyUI工作流安装教程

ComfyUI 是专为 Stable Diffusion 打造的图形用户界面(GUI),采用了基于节点的操作方式。用户可以通过连接不同的模块(即节点)来创建复杂的图像生成流程。这些节点涵盖了多样的功能,包括加载检查点模型、输入…

CSS从入门到精通——背景样式

目录 背景颜色 任务描述 相关知识 背景色 编程要求 背景图片 任务描述 相关知识 背景图片 设置背景图片 平铺背景图像 任务要求 背景定位与背景关联 任务描述 相关知识 背景定位 背景关联 简写背景 编程要求 背景颜色 任务描述 本关任务:在本关…

在不损失质量的情况下减小PDF 文件大小的 6 种方法

PDF 文件通常带有大量图形和图像,这可能会使 PDF 文件大小相当大。而当我们通过电子邮件上传或发送具有大小限制的 PDF 时,大型 PDF 经常会带来麻烦,或者大文件占用了太多空间。在这种情况下,在不损失质量的情况下减小 PDF 文件大…

文章MSM_metagenomics(一):介绍

介绍 欢迎大家关注全网生信学习者系列: WX公zhong号:生信学习者Xiao hong书:生信学习者知hu:生信学习者CDSN:生信学习者2 用于复现Huang et al. [huang2024establishment]研究分析的计算工作流程,所有复…

基于51单片机的智能水表

一.硬件方案 本设计主要以51单片机作为主控处理器的智能水表,该水表能够记录总的用水量和单次用水量,当用水量超出设定值时系统发出声光报警提醒,水量报警值能够通过按键进行自行设置,并且存储于AT24C02中,并且可以测…

法国恐脱欧、陷金融危机!股指本周跌6.2%,创三年多最大跌幅

内容提要 法国财政部长警告称,左翼政党联盟若上台可能导致法国脱欧,而且无论极右翼还是左翼上台,都可能导致法国爆发金融危机。由于政坛风险高企,法国股市周五延续跌势,本周已经抹掉2100亿美元市值,几乎回…

RabbitMQ实践——利用一致性Hash交换器做带权重的调度

在《RabbitMQ实践——利用一致性Hash交换器做负载均衡》一文中,我们介绍了如何开启一致性hash交换器,并实现了消息的负载均衡,以达到横向扩展消费者数量的能力。 但是现实中,可能存在这样的场景:一些队列所在的机器配置…

ComfyUI 宝藏插件之辅助工具

今天我们就来分享下这个 ComfyUI 辅助脚本工具的功能。 插件安装,小伙伴们直接在管理器里搜索「ComfyUI-Custom-Scripts」,点击安装就可以了,这里再告诉小伙伴们一个小技巧,点击名称可以跳转到插件所在的官网哦。 没有安装管理器…

linux中DNS域名解析服务(后续补充)

分离解析简介: 分离解析的域名服务器实际也是主域名服务器,这里主要是指根据不同的客户端提供不同的域名解析记录。比如来自内网和外网的不同网段地址的客户机请求解析同一域名时,为其提供不同的解析结果。 实验要求:防火墙要么关…