MySQL期末答辩—仓库管理系统

news2024/11/20 7:16:32
仓库管理系统:仓库管理系统是一种基于互联网对实际仓库的管理平台,旨在提供一个方便、快捷、安全的存取货物和查询商品信息平台。该系统通过在线用户登录查询,可以线上操作线下具体出/入库操作、查询仓库商品信息、提高仓库运作效率,优化仓库使用流程等功能,实现了用户在网上对仓库操作的全流程。

ER图和数据库模型图

DDL语句

CREATE TABLE products (-- 产品表  
    product_id INT AUTO_INCREMENT PRIMARY KEY COMMENT '商品ID',  
    product_name VARCHAR(255) NOT NULL COMMENT '商品名称',  
    product_category VARCHAR(100) NOT NULL COMMENT '商品类别',  
    specification VARCHAR(255) COMMENT '规格',  
    unit_price DECIMAL(10, 2) NOT NULL COMMENT '单价',  
    stock_quantity INT NOT NULL DEFAULT 0 COMMENT '库存数量'  
);
CREATE TABLE warehouses (-- 仓库表  
    warehouse_id INT AUTO_INCREMENT PRIMARY KEY COMMENT '库房ID',  
    warehouse_name VARCHAR(255) NOT NULL COMMENT '库房名称',  
    location VARCHAR(255) NOT NULL COMMENT '位置',  
    area DECIMAL(10, 2) NOT NULL COMMENT '面积'  
); CREATE TABLE suppliers (-- 供应商表   
    supplier_id INT AUTO_INCREMENT PRIMARY KEY COMMENT '供应商ID',  
    supplier_name VARCHAR(255) NOT NULL COMMENT '供应商名称',  
    contact_person VARCHAR(100) COMMENT '联系人',  
    phone_number VARCHAR(20) COMMENT '联系电话',  
    email VARCHAR(100) COMMENT '电子邮箱',  
    address VARCHAR(255) COMMENT '地址'  
);CREATE TABLE orders (-- 订单表   
    order_id INT AUTO_INCREMENT PRIMARY KEY COMMENT '订单ID',  
    customer_name VARCHAR(255) NOT NULL COMMENT '客户名称',  
    order_date DATE NOT NULL COMMENT '订单日期',  
    total_amount DECIMAL(10, 2) NOT NULL COMMENT '订单总金额',  
    status ENUM('Pending', 'Shipped', 'Delivered', 'Cancelled') NOT NULL COMMENT '订单状态'  
);
CREATE TABLE employees (  
  employee_id int(11) NOT NULL AUTO_INCREMENT COMMENT '员工序号',  
  employee_name varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '员工姓名',  
  department varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属部门',  
  inventory_responsibility varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '员工职责',  
  inventory_count int(11) NULL DEFAULT NULL COMMENT '记录员工的库存数量',  
  employee_phone VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '员工电话',  
  PRIMARY KEY (employee_id) USING BTREE  
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE inventory_transactions (-- 库存表  
    transaction_id INT AUTO_INCREMENT PRIMARY KEY COMMENT '出入库记录ID',  
    product_id INT,  
    warehouse_id INT,  
    employee_id INT,  
    transaction_type ENUM('In', 'Out') NOT NULL COMMENT '出入库类型',  
    quantity INT NOT NULL COMMENT '数量',  
    transaction_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '交易时间',  
    FOREIGN KEY (product_id) REFERENCES products(product_id),  
    FOREIGN KEY (warehouse_id) REFERENCES warehouses(warehouse_id),  
    FOREIGN KEY (employee_id) REFERENCES employees(employee_id)  );DROP TABLE IF EXISTS `users`;-- 用户表
CREATE TABLE `users` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `username` varchar(255) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL COMMENT '电子邮箱',
  `phone_number` varchar(20) DEFAULT NULL COMMENT '联系电话',
  `role` enum('Admin','User') NOT NULL COMMENT '角色',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `email` (`email`),
  UNIQUE KEY `username` (`username`(50))
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
CREATE TABLE return_orders (-- 退货单表  
    return_id INT AUTO_INCREMENT PRIMARY KEY COMMENT '退货单ID',  
    order_id INT NOT NULL COMMENT '原始订单ID',  
    customer_name VARCHAR(255) NOT NULL COMMENT '客户名称',  
    return_date DATE NOT NULL COMMENT '退货日期',  
    status ENUM('Pending', 'Refunded', 'Rejected') NOT NULL COMMENT '退货状态',  
    FOREIGN KEY (order_id) REFERENCES orders(order_id)  );
CREATE TABLE return_details (-- 退货明细表  
    detail_id INT AUTO_INCREMENT PRIMARY KEY COMMENT '退货明细ID',  
    return_id INT NOT NULL COMMENT '退货单ID',  
    product_id INT NOT NULL COMMENT '商品ID',  
    quantity INT NOT NULL COMMENT '退货数量',  
    FOREIGN KEY (return_id) REFERENCES return_orders(return_id),  
    FOREIGN KEY (product_id) REFERENCES products(product_id)  );
CREATE TABLE order_details (-- 订单明细表  
    detail_id INT AUTO_INCREMENT PRIMARY KEY COMMENT '订单明细ID',  
    order_id INT NOT NULL,  
    product_id INT NOT NULL,  
    quantity INT NOT NULL COMMENT '数量',  
    unit_price DECIMAL(10, 2) NOT NULL COMMENT '单价',  
    FOREIGN KEY (order_id) REFERENCES orders(order_id),  
    FOREIGN KEY (product_id) REFERENCES products(product_id)  );
CREATE TABLE purchase_orders (-- 采购单表  
    po_id INT AUTO_INCREMENT PRIMARY KEY COMMENT '采购单ID',  
    supplier_id INT NOT NULL,  
    purchase_date DATE NOT NULL COMMENT '采购日期',  
    total_amount DECIMAL(10, 2) NOT NULL COMMENT '采购总金额',  
    status ENUM('Pending', 'Received', 'Cancelled') NOT NULL COMMENT '采购单状态',  
    FOREIGN KEY (supplier_id) REFERENCES suppliers(supplier_id)  );
CREATE TABLE inventory (-- 库存表  
    inventory_id INT AUTO_INCREMENT PRIMARY KEY COMMENT '库存记录ID',  
    product_id INT NOT NULL COMMENT '商品ID',  
    warehouse_id INT NOT NULL COMMENT '库房ID',  
    quantity INT NOT NULL DEFAULT 0 COMMENT '库存数量',  
    last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',  
    FOREIGN KEY (product_id) REFERENCES products(product_id),  
    FOREIGN KEY (warehouse_id) REFERENCES warehouses(warehouse_id)  );




DML语句

 INSERT INTO products (product_name, product_category, specification, unit_price, stock_quantity)   
VALUES ('iPhone 13', '电子产品', '6.1英寸, 5G', 999.99, 100);  
INSERT INTO products (product_name, product_category, specification, unit_price, stock_quantity)   
VALUES ('MacBook Pro', '电子产品', '16英寸, M1芯片', 2499.99, 50);    
INSERT INTO products (product_name, product_category, specification, unit_price, stock_quantity)   
VALUES ('Nike Air Max', '运动鞋', '男款, 42码', 149.99, 200);   
INSERT INTO products (product_name, product_category, specification, unit_price, stock_quantity)   
VALUES ('Adidas Ultra Boost', '运动鞋', '女款, 38码', 129.99, 150);    
INSERT INTO products (product_name, product_category, specification, unit_price, stock_quantity)   
VALUES ('Sony WH-1000XM4', '音频设备', '无线蓝牙耳机, 降噪', 349.99, 80);   
INSERT INTO warehouses (warehouse_name, location, area)   
VALUES ('一号仓库', '北京市朝阳区', 1000.50);   
INSERT INTO warehouses (warehouse_name, location, area)   
VALUES ('二号仓库', '上海市浦东区', 1500.25);   
INSERT INTO warehouses (warehouse_name, location, area)   
VALUES ('三号仓库', '广州市天河区', 800.75);   
INSERT INTO warehouses (warehouse_name, location, area)   
VALUES ('四号仓库', '深圳市南山区', 1200.00);   
INSERT INTO warehouses (warehouse_name, location, area)   
VALUES ('五号仓库', '杭州市西湖区', 950.30);  
INSERT INTO employees (employee_name, department, inventory_responsibility, inventory_count)   
VALUES ('张三', '销售部', '库存管理', 500);   
INSERT INTO employees (employee_name, department, inventory_responsibility, inventory_count)   
VALUES ('李四', '物流部', '库存盘点', 300);   
INSERT INTO employees (employee_name, department, inventory_responsibility, inventory_count)   
VALUES ('王五', '生产部', '库存补货', 800);  
INSERT INTO employees (employee_name, department, inventory_responsibility, inventory_count)   
VALUES ('赵六', '财务部', '库存成本核算', NULL);   
INSERT INTO employees (employee_name, department, inventory_responsibility, inventory_count)   
VALUES ('孙七', '技术部', '库存系统维护', NULL); 
INSERT INTO employees (employee_name, department, inventory_responsibility, inventory_count)   
VALUES ('周八', '销售部', '库存管理', 650);  
INSERT INTO employees (employee_name, department, inventory_responsibility, inventory_count)   
VALUES ('吴九', '采购部', '库存采购', 400);   
INSERT INTO employees (employee_name, department, inventory_responsibility, inventory_count)   
VALUES ('郑十', '物流部', '库存出库', 250);  
INSERT INTO employees (employee_name, department, inventory_responsibility, inventory_count)   
VALUES ('陈十一', '生产部', '库存监控', 900);   
INSERT INTO employees (employee_name, department, inventory_responsibility, inventory_count)   
VALUES ('卫十二', '行政部', NULL, NULL);  
INSERT INTO inventory_transactions (product_id, warehouse_id, employee_id, transaction_type, quantity)   
VALUES (1, 1, 1, 'In', 10); -- 假设产品ID为1,仓库ID为1,员工ID为1,入库10个产品   
INSERT INTO inventory_transactions (product_id, warehouse_id, employee_id, transaction_type, quantity)   
VALUES (2, 1, 2, 'Out', 5); -- 假设产品ID为2,仓库ID为1,员工ID为2,出库5个产品   
INSERT INTO inventory_transactions (product_id, warehouse_id, employee_id, transaction_type, quantity)   
VALUES (1, 2, 3, 'In', 8); -- 假设产品ID为1,仓库ID为2,员工ID为3,入库8个产品 
INSERT INTO inventory_transactions (product_id, warehouse_id, employee_id, transaction_type, quantity)   
VALUES (3, 2, 4, 'Out', 3); -- 假设产品ID为3,仓库ID为2,员工ID为4,出库3个产品    
INSERT INTO inventory_transactions (product_id, warehouse_id, employee_id, transaction_type, quantity)   
VALUES (2, 3, 5, 'In', 15); -- 假设产品ID为2,仓库ID为3,员工ID为5,入库15个产品   
INSERT INTO inventory_transactions (product_id, warehouse_id, employee_id, transaction_type, quantity)   
VALUES (1, 3, 6, 'Out', 7); -- 假设产品ID为1,仓库ID为3,员工ID为6,出库7个产品  
INSERT INTO inventory_transactions (product_id, warehouse_id, employee_id, transaction_type, quantity)   
VALUES (4, 1, 7, 'In', 20); -- 假设产品ID为4,仓库ID为1,员工ID为7,入库20个产品
INSERT INTO suppliers (supplier_name, contact_person, phone_number, email, address)   
VALUES ('供应商A', '张三', '1234567890', 'supplierA@example.com', '北京市朝阳区');   
INSERT INTO suppliers (supplier_name, contact_person, phone_number, email, address)   
VALUES ('供应商B', '李四', '0987654321', 'supplierB@example.com', '上海市黄浦区');   
INSERT INTO suppliers (supplier_name, contact_person, phone_number, email, address)   
VALUES ('供应商C', '王五', '1112223333', 'supplierC@example.com', '广州市天河区');   
INSERT INTO suppliers (supplier_name, contact_person, phone_number, email, address)   
VALUES ('供应商D', '赵六', '2223334444', 'supplierD@example.com', '深圳市南山区');  
INSERT INTO suppliers (supplier_name, contact_person, phone_number, email, address)   
VALUES ('供应商E', '孙七', '3334445555', 'supplierE@example.com', '杭州市西湖区');   
INSERT INTO suppliers (supplier_name, contact_person, phone_number, email, address)   
VALUES ('供应商F', '周八', '4445556666', 'supplierF@example.com', '成都市武侯区');
INSERT INTO orders (customer_name, order_date, total_amount, status)   
VALUES ('王五', '2023-01-03', 220.75, 'Delivered');   
INSERT INTO orders (customer_name, order_date, total_amount, status)   
VALUES ('赵六', '2023-01-04', 75.25, 'Pending');   
INSERT INTO orders (customer_name, order_date, total_amount, status)   
VALUES ('孙七', '2023-01-05', 300.00, 'Shipped’);   
INSERT INTO orders (customer_name, order_d
INSERT INTO orders (customer_name, order_date, total_amount, status)   
VALUES ('张三', '2023-01-01', 100.00, 'Pending');   
INSERT INTO orders (customer_name, order_date, total_amount, status)   
VALUES ('李四', '2023-01-02', 150.50, 'Shipped');  
ate, total_amount, status)   
VALUES ('周八', '2023-01-06', 125.50, 'Delivered');    
INSERT INTO orders (customer_name, order_date, total_amount, status)   
VALUES ('吴九', '2023-01-07', 80.00, 'Cancelled');    
INSERT INTO orders (customer_name, order_date, total_amount, status)   
VALUES ('陈十', '2023-01-08', 180.25, 'Pending’); 
INSERT INTO orders (customer_name, order_date, total_amount, status)   
VALUES ('郑十一', '2023-01-09', 250.00, 'Shipped');  
INSERT INTO order_details (order_id, product_id, quantity, unit_price)   
VALUES (6, 1001, 1, 50.00);
INSERT INTO purchase_orders (supplier_id, purchase_date, total_amount, status)   
VALUES (1, '2023-01-01', 500.00, 'Pending');  
INSERT INTO purchase_orders (supplier_id, purchase_date, total_amount, status)   
VALUES (2, '2023-01-05', 700.50, 'Pending');  
INSERT INTO purchase_orders (supplier_id, purchase_date, total_amount, status)   
VALUES (1, '2023-01-10', 300.25, 'Received');   
INSERT INTO purchase_orders (supplier_id, purchase_date, total_amount, status)   
VALUES (3, '2023-01-15', 800.00, 'Pending');  
INSERT INTO purchase_orders (supplier_id, purchase_date, total_amount, status)   
VALUES (2, '2023-01-20', 650.75, 'Received');  
INSERT INTO purchase_orders (supplier_id, purchase_date, total_amount, status)   
VALUES (1, '2023-01-25', 400.00, 'Cancelled’);  
INSERT INTO inventory (product_id, warehouse_id, quantity)   
VALUES (1001, 1, 10);  
INSERT INTO inventory (product_id, warehouse_id, quantity)   
VALUES (1002, 2, 5);    
INSERT INTO inventory (product_id, warehouse_id, quantity)   
VALUES (1003, 1, 20);  
INSERT INTO inventory (product_id, warehouse_id, quantity)   
VALUES (1004, 3, 8);  
INSERT INTO inventory (product_id, warehouse_id, quantity)   
VALUES (1001, 2, 15);
INSERT INTO users (username, password, email, phone_number, role)   
VALUES ('adminuser1', 'encrypted_password1', 'adminuser1@example.com', '1234567890', 'Admin');  
INSERT INTO users (username, password, email, phone_number, role)   
VALUES ('standarduser1', 'encrypted_password2', 'standarduser1@example.com', '0987654321', 'User');   
INSERT INTO users (username, password, email, phone_number, role)   
VALUES ('alice', 'encrypted_password3', 'alice@alice.com', '5551234567', 'User');  
INSERT INTO users (username, password, email, phone_number, role)   
VALUES ('bob', 'encrypted_password4', 'bob@bob.com', '5557654321', 'User');    
INSERT INTO users (username, password, email, phone_number, role)   
VALUES ('charlie', 'encrypted_password5', 'charlie@charlie.com', '5556543210', 'Admin');   
INSERT INTO users (username, password, email, phone_number, role)   
VALUES ('david', 'encrypted_password6', 'david@david.com', '5551112222', 'User');   
INSERT INTO users (username, password, email, phone_number, role)   
VALUES ('eve', 'encrypted_password7', 'eve@example.net', '5559876543', 'Admin');   
INSERT INTO users (username, password, email, phone_number, role)   
VALUES ('frank', 'encrypted_password8', 'frank@example.org', '5553334444', 'User');    
INSERT INTO users (username, password, email, phone_number, role)   
VALUES ('george', 'encrypted_password9', 'george@george.com', '5558887777', 'User');   
INSERT INTO users (username, password, email, phone_number, role)   
VALUES ('helen', 'encrypted_password10', 'helen@helen.com', '5555678901', 'Admin');    
INSERT INTO users (username, password, email, phone_number, role)   
VALUES ('ian', 'encrypted_password11', 'ian@ian.com', '5552345678', 'User');  
INSERT INTO users (username, password, email, phone_number, role)   
VALUES ('jane', 'encrypted_password12', 'jane@jane.com', '5559012345', 'User’);
INSERT INTO return_orders (order_id, customer_name, return_date, status)   
VALUES (1001, 'John Doe', '2023-01-01', 'Pending');  
INSERT INTO return_orders (order_id, customer_name, return_date, status)   
VALUES (1002, 'Jane Smith', '2023-01-05', 'Refunded');   
INSERT INTO return_orders (order_id, customer_name, return_date, status)   
VALUES (1003, 'Bob Johnson', '2023-01-10', 'Rejected');  
INSERT INTO return_orders (order_id, customer_name, return_date, status)   
VALUES (1004, 'Alice Brown', '2023-01-15', 'Pending');   
INSERT INTO return_orders (order_id, customer_name, return_date, status)   
VALUES (1005, 'Mike Williams', '2023-01-20', 'Refunded');
INSERT INTO return_details (return_id, product_id, quantity)   
VALUES (1, 1001, 2); -- 假设退货单ID为1,商品ID为1001,退货数量为2  
INSERT INTO return_details (return_id, product_id, quantity)   
VALUES (1, 1002, 1); -- 假设退货单ID为1,商品ID为1002,退货数量为1   
INSERT INTO return_details (return_id, product_id, quantity)   
VALUES (2, 1001, 3); -- 假设退货单ID为2,商品ID为1001,退货数量为3  
INSERT INTO return_details (return_id, product_id, quantity)   
VALUES (2, 1003, 1); -- 假设退货单ID为2,商品ID为1003,退货数量为1   
INSERT INTO return_details (return_id, product_id, quantity)   
VALUES (3, 1004, 2); -- 假设退货单ID为3,商品ID为1004,退货数量为2  

查询

--基础查询:
SELECT username AS '姓名', phone_number AS '手机号' FROM users;
--模糊查询:
CREATE INDEX idx_product_name ON products(product_name);
--统计用户订单信息,查询所有用户的下单数量,并进行倒序排列
SELECT customer_name, COUNT(order_id) AS order_count FROM orders GROUP BY customer_name ORDER BY order_count DESC;
--查询用户的基本信息使用多表联合查询
SELECT user_id, username, email, phone_number, role FROM users;
--查看订单中下单最多的产品对应的类别
SELECT p.product_category, SUM(od.quantity) AS total_quantity FROM products p JOIN order_details od ON p.product_id = od.product_id GROUP BY p.product_category ORDER BY total_quantity DESC LIMIT 1;
--查询下单总金额最多的用户
SELECT u.*  
FROM users u  
JOIN (  
    SELECT customer_name, SUM(total_amount) AS total_spent  
    FROM orders  
    GROUP BY customer_name  
    ORDER BY total_spent DESC  
    LIMIT 1  
) AS top_spender ON u.username = top_spender.customer_name;

Trigger触发器

-- 触发器:当新增用户时,在inventory_transactions表中为该用户创建一个初始的库存记录(假设)  
DELIMITER //  
CREATE TRIGGER after_user_insert  
AFTER INSERT ON users  
FOR EACH ROW  
BEGIN  
    INSERT INTO inventory_transactions (employee_id, transaction_type, quantity, transaction_date)  
    VALUES (NEW.user_id, 'In', 0, NOW());  -- 这里假设员工ID和用户ID是相同的,并且只是作为一个演示,数量为0  
END;  
//  
DELIMITER ;
--产品表修改语句添加触发器
DELIMITER //  
CREATE TRIGGER before_product_update  
BEFORE UPDATE ON products  
FOR EACH ROW  
BEGIN  
    IF NEW.unit_price < OLD.unit_price * 0.9 OR NEW.unit_price > OLD.unit_price * 1.1 THEN  
        SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = '商品售价上下浮动不能超过10%';  
    END IF;  
END;  
//  
DELIMITER ;
-- 触发器:当删除订单时,先删除订单详情表中的相关记录  
DELIMITER //  
CREATE TRIGGER before_order_delete  
BEFORE DELETE ON orders  
FOR EACH ROW  
BEGIN  
    DELETE FROM order_details WHERE order_id = OLD.order_id;  
END;  
//  
DELIMITER ;

存储过程

--查询产品库存是否符合所需产品数量,并统计订单总金额
DELIMITER //  
  CREATE PROCEDURE create_order_infos(  
    IN p_customer_name VARCHAR(255),  
    IN p_product_id INT,  
    IN p_quantity INT,  
    IN p_warehouse_id INT  )  
BEGIN  
    -- 声明变量  
    DECLARE v_order_id INT;  
    DECLARE v_product_stock INT;  
    DECLARE v_remaining_stock INT;  
   -- 开始事务  
    START TRANSACTION;  
  -- 1. 插入订单记录到orders表  
    INSERT INTO orders (customer_name, order_date, total_amount, status)  
    VALUES (p_customer_name, NOW(), 0, 'Pending');  
  -- 获取新订单的ID  
    SET v_order_id = LAST_INSERT_ID();  
  -- 2. 检查产品库存是否足够  
    SELECT quantity INTO v_product_stock FROM inventory WHERE product_id = p_product_id AND warehouse_id = p_warehouse_id FOR UPDATE;  
  IF v_product_stock >= p_quantity THEN  
        -- 3. 更新库存数量  
        SET v_remaining_stock = v_product_stock - p_quantity;  
        UPDATE inventory SET quantity = v_remaining_stock WHERE product_id = p_product_id AND warehouse_id = p_warehouse_id;  
        -- 假设这里还需要更新产品表的库存(不常见,但为了示例)  
        -- UPDATE products SET stock_quantity = stock_quantity - p_quantity WHERE product_id = p_product_id;  
        -- 4. 插入订单明细到order_details表  
        INSERT INTO order_details (order_id, product_id, quantity, unit_price)  
        SELECT v_order_id, p.product_id, p_quantity, p.unit_price  
        FROM products p  
        WHERE p.product_id = p_product_id;  
        -- 5. 计算订单总金额并更新orders表(假设单价不会变)  
        UPDATE orders o  
        JOIN (  
            SELECT order_id, SUM(quantity * unit_price) AS total_amount  
            FROM order_details  
            WHERE order_id = v_order_id  
        ) od ON o.order_id = od.order_id  
        SET o.total_amount = od.total_amount  
        WHERE o.order_id = v_order_id;  
-- 提交事务  
        COMMIT;  
        SELECT 'Order created successfully.' AS message;  
    ELSE  
        -- 库存不足,回滚事务  
        ROLLBACK;  
        SELECT 'Insufficient stock for the order.' AS message;  
    END IF;  
END //  
  
DELIMITER ;

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

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

相关文章

SPI 通信 协议

介绍&#xff1a; SPI&#xff08;Serial Peripheral Interface&#xff09;是由摩托罗拉公司开发的一种通用数据总线 四根通信线&#xff1a; SCK&#xff08;Serial Clock&#xff09; 时钟线MOSI&#xff08;Master Output Slave Input&…

粗糙度轮廓仪功能简介:一体型轮廓仪功能亮点

在精密制造和质量控制领域&#xff0c;表面粗糙度和轮廓的精确测量是至关重要的。一体型轮廓仪为这一需求提供了全面的解决方案。它采用超高精度纳米衍射光学测量系统、超高直线度研磨级摩擦导轨、高性能直流伺服驱动系统、高性能计算机控制系统技术&#xff0c;为用户提供了一…

90后懒人带娃的福音,小学生古诗词的神器——ChatMoney全能知识库AI软件

本文由 ChatMoney团队出品 因为工作需要&#xff0c;浅尝辄止般的用了一下ChatMoney全能知识库AI软件。一些长期积存的问题迎刃而解&#xff0c;但这只是一款企业级大模型功能的冰山一角。让自己尤为惊奇的是里面涵盖的各类资料系统&#xff0c;居然能助力宝妈宝爸带娃脱困。只…

AIGC对设计行业的影响与启发:AIGC设计能替代真正的设计师吗?

随着科技的飞速发展&#xff0c;人工智能生成内容&#xff08;AIGC&#xff09;技术在设计行业的应用日益广泛&#xff0c;引发了广泛的讨论和关注。AIGC以其高效、多样化的生成能力&#xff0c;为设计行业带来了前所未有的变革。然而&#xff0c;关于AIGC是否能替代真正的设计…

Rustdesk如何编译代码实现安装后不会显示主界面,不会在右下角出现托盘图标,作为后台服务运行

环境&#xff1a; Rustdesk1.1.9 问题描述&#xff1a; Rustdesk如何编译代码实现安装后不会显示主界面&#xff0c;不会在右下角出现托盘图标&#xff0c;作为后台服务运行 解决方案&#xff1a; 可以自定义进程名称和图标&#xff0c;不会显示主界面&#xff0c;不会在…

uboo对内存操作读写命令的基本使用

内存操作命令 直接对DRAM进行读写的操作,uboot常用的内存操作命令有md,nm,mm,mw,cp和cmp. md命令: 显示内存值 # md md - memory display Usage: md [.b, .w, .l, .q] address [# of objects] b:1个字节 byte w:2个字节 world l:4个字节 long of objects 以word 为单位的1…

搭建个人博客及错误记录

搭建个人博客及错误记录 文章目录 搭建个人博客及错误记录需要用到的网址2.推荐两个参考教学视频3.发布一篇博客个人主题配置的提醒localhost拒绝连接问题解决办法ssh -T gitgithub.com失败问题解决Deployer not found:git解决 可以根据目录解决遇到的相同问题 需要用到的网址 …

昇思25天学习打卡营第3天|yulang

今天主要学习03-张量Tensor&#xff0c;主要包含了处理创建张量、张量的属性、张量索引和张量运算&#xff0c;稀疏张量&#xff0c;有点看不太懂&#xff0c;感觉要开始入门到放弃了&#xff1f;张量在构建和训练深度学习模型中的实际应用&#xff0c;如卷积神经网络。 张量&a…

Vue入门-如何创建一个Vue实例

创建一个一个Vue实例总共分为四步&#xff1a; 1.创建一个容器 2.引包&#xff1a;地址栏搜索v2.cn.vuejs.org这是vue2的官网地址&#xff0c;把2去掉就是vue3的官网地址&#xff0c;我们的包分为开发版本和生产版本&#xff0c;开发版本包含完整的警告和调试模式生产版本删除…

【Python机器学习】算法链与管道——用预处理进行参数选择的注意项

对于许多机器学习算法&#xff0c;提供的特定数据表示非常重要。比如&#xff0c;首先对数据进行缩放&#xff0c;然后手动合并特征&#xff0c;再利用无监督机器学习来学习特征。因此&#xff0c;大多数机器学习应用不仅需要应用多个算法&#xff0c;而且还需要将许多不同的处…

BIOS中的设置虽然不少,但其实大部分时候只需进行一些简单的调整

序言 浏览BIOS可能会让人感到不知所措,因为要考虑的设置太多了。但是,你应该在BIOS中进行一些简单的调整,以提高系统的性能和稳定性。我们将向你展示其中的一些调整,并解释你可能想要使用它们的时间和原因。 用密码保护你的BIOS 虽然我们很小心地对用户帐户进行密码保护…

打卡第一天

今天是参加算法训练营的第一天&#xff0c;希望我能把这个训练营坚持下来&#xff0c;希望我的算法编程题的能力有所提升&#xff0c;不再面试挂了&#xff0c;面试总是挂编程题&#xff0c;记录我leetcode刷题数量&#xff1a; 希望我通过这个训练营能够实现两份工作的无缝衔接…

【Spring Boot】Java 持久层 API:JPA

Java 持久层 API&#xff1a;JPA 1.Spring Data1.1 主要模块1.2 社区模块 2.JPA3.使用 JPA3.1 添加 JPA 和 MySQL 数据库的依赖3.2 配置数据库连接信息 4.了解 JPA 注解和属性4.1 常用注解4.2 映射关系的注解4.3 映射关系的属性 5.用 JPA 构建实体数据表 1.Spring Data Spring…

【Linux】多线程(一万六千字)

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 目录 文章目录 前言 线程的概念 线程的理解(Linux系统为例) 在Linux系统里如何保证让正文部分的代码可以并发的去跑呢&#xff1f; 为什么要有多进程呢&#xff1f; 为…

统计信号处理基础 习题解答11-13

题目 如果是一个2x1的随机矢量&#xff0c;具有PDF 证明的PDF是一个随机变量。提可以因式分解成&#xff0c;其中是一个在4.5节描述的白化变换。 解答 首先&#xff1a; 因此&#xff0c;存在&#xff1a; 也就是是Hermitian矩阵。详细的性质可以参考&#xff1a; https://z…

linux系统中的各种命令的解释和帮助(含内部命令、外部命令)

目录 一、说明 二、命令详解 1、帮助命令的种类 &#xff08;1&#xff09;help用法 &#xff08;2&#xff09;--help用法 2、如何区别linux内部命令和外部命令 三、help和—help 四、man 命令 1、概述 2、语法和命令格式 &#xff08;1&#xff09;man命令的格式&…

数据库组成及原理

属性&#xff1a; 把数据库中的一个表类比成一个公司&#xff0c;那么公司里的每个人都是一个“属性”&#xff08;表中的一个字段视为一个属性&#xff09;&#xff0c;不管老板还是员工&#xff0c;只要是公司里的人&#xff0c;就都是一个属性。 主键&#xff1a; 老板就是“…

带安全启动—Ubuntu系统—手动安装Nvidia驱动

教程1&#xff1a;在启用安全启动的 Fedora 中安装英伟达驱动 教程2&#xff1a;UEFI安全启动模式下安装Ubuntu的NVIDIA显卡驱动 1. 搜索合适的驱动 Nvidia驱动官网 选择这个 驱动(.run)链接 2. 安装必要的软件依赖 CUDA底层用C写的&#xff0c;因此导入编译器 sudo apt i…

智慧课堂基于YOLOv8的学生上课行为检测

数据集 学生上课行为检测&#xff0c;我们直接使用公开数据集 共三类行为&#xff1a;举手、读书、写字 数据集已经按照YOLO格式配置好&#xff0c;数据内容如下 模型训练 ​ 采用YOLOv8模型进行训练&#xff0c;官方代码 首先是划分数据集&#xff0c;分为训练集、验证&a…

Linux-gdb

目录 1.-g 生成含有debug信息的可执行文件 2.gdb开始以及gdb中的常用执行指令 3.断点的本质用法 4.快速跳出函数体 5.其他 1.-g 生成含有debug信息的可执行文件 2.gdb开始以及gdb中的常用执行指令 3.断点的本质用法 断点的本质是帮助我们缩小出问题的范围 比如&#xff0c;…