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

php和网站开发/网络营销 长沙

php和网站开发,网络营销 长沙,无锡网站营销公司,网红营销也称为QtExa001自动包装流水线的框架设计 工程代码: https://download.csdn.net/download/txwtech/89636815https://download.csdn.net/download/txwtech/89636815 主界面: 设置:进行参数配置,保存ini文件 调试:tcp/ip&…

QtExa001自动包装流水线的框架设计

工程代码:

https://download.csdn.net/download/txwtech/89636815icon-default.png?t=N7T8https://download.csdn.net/download/txwtech/89636815

主界面:

设置:进行参数配置,保存ini文件

调试:tcp/ip,串口,modbus tcp/RTU,http进行调试

查询:通过连接mysql数据库实现增删改查操作

登录界面:tt,密码1登录后,设置与调试显示可用

多线程的操作:点击开始后,启动任务,对主界面相关控件进行信息更新

底部实时显示当前时间,配置的IP与端口信息

实现整体流水线任务时,根据项目业务逻辑,通过调试通信的代码一起放到线程中运行

鼠标移动到按钮工具提示,信息提示

程序启动,初始化部分 

void auto_pack_line_demo::InitInterface()
{AddToMainLog("程序启动");AddToMainLog("developed by cdtxw@foxmail");ui.pushButton_setting->setEnabled(false);ui.pushButton_debug->setEnabled(false);std::shared_ptr<CFile_Operation> ptr1 = std::make_shared<CFile_Operation>();//make_shared函数创建std::shared_ptr<CFile_Operation> ptr2 = std::shared_ptr<CFile_Operation>(); //构造函数创建ptr1->AddToLoginfo("smart ptr test");ptr2->AddToLoginfo("smart ptr test2");serial_modbus_ptr = std::make_shared<SerialModbus>();cfile_operation = new CFile_Operation();main_thread = new MainTaskThread();c_op->ReadAllMainConfig();tcp_Client = new tcp_client();http_req = new http_request();tcp_client_modbus = new TcpClientModbus();tcp_Client->Connect(c_op->vision_ip, c_op->vision_port);tcp_client_modbus->Connect(c_op->plc1_ip,c_op->plc1_port);serial_modbus_ptr->SerialConnect(c_op->serial_port_read_weight,c_op->baudrate_read_weight.toInt());//SerialModbus* bb = serial_modbus_ptr.get();//bb->SerialConnect("aa",11);QString tcp_msg=tcp_client_modbus->GetConnectInfo();QTimer* timer2 = new QTimer(this);connect(timer2, &QTimer::timeout, this, &auto_pack_line_demo::TimerUpdate);timer2->start(1000);ui.lineEdit_PLC_IP->setText(c_op->plc1_ip);ui.lineEdit_PLC_port->setText(c_op->plc1_port);ui.lineEdit_vision_IP->setText(c_op->vision_ip);ui.lineEdit_vision_port->setText(c_op->vision_port);QToolTip::setFont(font3); //按钮提示信息通用设置// QPalette toolTipPalette= QToolTip::palette();//    toolTipPalette.setColor(QPalette::Text, Qt::white);       // 设置文本颜色为红色//    toolTipPalette.setColor(QPalette::WindowText, Qt::blue); // 设置窗口文本颜色为蓝色//    toolTipPalette.setColor(QPalette::Background, Qt::yellow); // 设置背景颜色为黄色QPalette pal = QToolTip::palette();// 修改背景色,工具提示,按钮信息提示pal.setColor(QPalette::Inactive,QPalette::ToolTipBase,// QColor("darkblue")QColor("blue"));// 修改文本颜色pal.setColor(QPalette::Inactive,QPalette::ToolTipText,//QColor("lightyellow")QColor("black"));QToolTip::setPalette(pal);setWindowIcon(QIcon("box_1a.png")); // 使用文件系统路径table_view_msg = ui.tableView_lot_information;//table_view_box_label = ui->tableView_box_label_info;//QPixmap pixmap(":/auto_pack_line_demo/pics/box_1a.png");//代码设置图片路径// ui.label_main_box->setPixmap(pixmap); //设置图片ui.label_main_box->setScaledContents(true); //适应控件大小QString msg = "";// ui->plainTextEdit_log_msg->appendPlainText(msg);btn_start = ui.pushButton_start;btn_pause = ui.pushButton_pause;btn_inspection = ui.pushButton_inspection;btn_exit = ui.pushButton_system_exit;btn_prod_precheck = ui.pushButton_inspection;btn_logoff = ui.pushButton_user_logoff;// lineedit_yinzi = ui->lineEdit_yinzi_check;btn_setting = ui.pushButton_setting;btn_debug = ui.pushButton_debug;// btn_camera_debug = ui->pushButton_camera_debug;btn_database = ui.pushButton_query;btn_log_in = ui.pushButton_user;//btn_log_info = ui->pushButton_log_info;connect(this, &auto_pack_line_demo::Thread3Finished, this, [=](int value) {ui.lineEdit_vision_info->setText(QString::number(value));});connect(ui.pushButton_system_exit, (SIGNAL(clicked())), this, SLOT(CloseWindow()));connect(ui.pushButton_start, (SIGNAL(clicked())), this, SLOT(StartTask()));connect(ui.lineEdit_equ_comm, &QLineEdit::textChanged, this, [=] {if (ui.lineEdit_equ_comm->text() == "OK"){QString green = QString("background-color: rgb(85, 255, 0);");ui.lineEdit_equ_comm->setStyleSheet(green);}else{QString red = QString("background-color: rgb(255, 0, 0);");QString yellow = QString("background-color: rgb(255, 255, 0);");ui.lineEdit_equ_comm->setStyleSheet(yellow);}});connect(btn_setting, (SIGNAL(clicked())), this, SLOT(OpenSettingWindow()));connect(btn_debug, (SIGNAL(clicked())), this, SLOT(OpenDebugWindow()));//宏定义方式,QT4.0connect(ui.pushButton_query, &QPushButton::clicked, this, [=] {Dialog_DataBase2* dialog_database = new Dialog_DataBase2(this);dialog_database->setModal(true);dialog_database->show();});connect(table_view_msg, &QTableView::clicked, this, &auto_pack_line_demo::GetTableViewLotSelectedText); //QT5connect(lineedit_yinzi, &QLineEdit::textChanged, this, [=](QString input_msg) {if (input_msg.length() > 3){AddToMainLog("已输入印字信息:" + lineedit_yinzi->text());}});connect(ui.pushButton_user, &QPushButton::clicked, this, [=] {dialog_login = new Dialog_LogIn(this);dialog_login->setModal(true);dialog_login->show();connect(dialog_login, &Dialog_LogIn::LoginRet, this, [=](bool value) {if (value == true){ui.pushButton_setting->setEnabled(true);ui.pushButton_debug->setEnabled(true);btn_setting->setStyleSheet(styleSheet_setting);btn_debug->setStyleSheet(styleSheet_debug);AddToMainLog("登录成功");}else{btn_setting->setStyleSheet(sytleSheet_gray_font);btn_debug->setStyleSheet(sytleSheet_gray_font);ui.pushButton_setting->setEnabled(false);ui.pushButton_debug->setEnabled(false);AddToMainLog("登录失败");}});});connect(ui.pushButton_pause, &QPushButton::clicked, this, [=] {AddToMainLog("点击了暂停"); //cdtxw});connect(ui.pushButton_inspection, &QPushButton::clicked, this, [=] {AddToMainLog("点击了检测"); //cdtxw});connect(ui.pushButton_user_logoff, &QPushButton::clicked, this, [=] {AddToMainLog("点击了注销"); //cdtxw});// connect(btn_camera_debug, &QPushButton::clicked, this, [=] {// Dialog_camera_debug* camera_debug = new Dialog_camera_debug();//   camera_debug->setModal(true);//  camera_debug->showNormal();//  });// connect(ui->pushButton_exit,(SIGNAL(clicked())),this,SLOT(close()));btn_start->setToolTip(("启动程序")); //按钮提示信息btn_pause->setToolTip(("系统暂停")); //按钮提示信息btn_exit->setToolTip(("退出程序")); //按钮提示信息btn_logoff->setToolTip(("注销用户")); //按钮提示信息btn_prod_precheck->setToolTip(("产品检测")); //按钮提示信息btn_setting->setToolTip(("参数配置")); //按钮提示信息btn_debug->setToolTip(("输入输出调试")); //按钮提示信息//btn_camera_debug->setToolTip(("相机调试")); //按钮提示信息btn_database->setToolTip(("数据库查询")); //按钮提示信息btn_log_in->setToolTip(("权限登录")); //按钮提示信息//btn_log_info->setToolTip(("日志查询")); //按钮提示信息// start_value = ("开始");start_value = "开始";stop_value = "停止";QString pic_path_start = tr(":/auto_pack_line_demo/pics/button_start_icon.png");QString pic_path_pause = tr(":/auto_pack_line_demo/pics/button_pause_icon.png");QString pic_path_user_change = tr(":/auto_pack_line_demo/pics/button_bg.png");QString pic_path_setting_icon = tr(":/auto_pack_line_demo/pics/setting_icon2.png");QString pic_path_debug_icon = tr(":/auto_pack_line_demo/pics/button_debug_icon_副本.png");QString pic_path_camera_icon = tr(":/auto_pack_line_demo/pics/摄像头图像采集_副本2.png");QString pic_path_database_icon = tr(":/auto_pack_line_demo/pics/button_calibration_icon_副本.png");QString pic_path_user_icon = tr(":/auto_pack_line_demo/pics/button_user_icon_副本.png");QString pic_path_logInfo_icon = tr(":/auto_pack_line_demo/pics/button_Log_icon.png");QString color_white = tr("rgb(255, 255, 255);");QString color_black = tr("rgb(0, 0, 0);");QString color_gray = tr("rgb(192,192,192);");QString styleSheet_start = QString("QPushButton{border-image:url(%1);background-color:transparent;border:none;font: 28pt \"Microsoft YaHei UI\";color:%2}""QPushButton:hover{background-color:transparent;font: 28pt \"Microsoft YaHei UI\";color:%3}""QPushButton:pressed{border-image:none;background-color: rgb(0, 170, 0);font: 28pt \"Microsoft YaHei UI\";}").arg(pic_path_start, color_white, color_black);QString styleSheet_pause = QString("QPushButton{border-image:url(%1);background-color:transparent;border:none;font: 28pt \"Microsoft YaHei UI\";color:%2}""QPushButton:hover{background-color:transparent;font: 28pt \"Microsoft YaHei UI\";color:%3}""QPushButton:pressed{border-image:none;background-color: rgb(0, 170, 0);font: 28pt \"楷体\";}").arg(pic_path_pause, color_white, color_black);QString styleSheet_exit = QString("QPushButton{border-image:url(%1);border:none;font: 28pt \"Microsoft YaHei UI\";color:%2}""QPushButton:hover{background-color:transparent;font: 28pt \"Microsoft YaHei UI\";color:%3}""QPushButton:pressed{border-image:none;background-color: rgb(0, 170, 0);font: 28pt \"楷体\";}").arg(pic_path_user_change, color_white, color_black);styleSheet_debug = QString("QPushButton{border-image:url(%1);border:none;font: 28pt \"Microsoft YaHei UI\";color:%2}""QPushButton:hover{background-color:transparent;font: 28pt \"Microsoft YaHei UI\";color:%3}""QPushButton:pressed{border-image:none;background-color: rgb(0, 170, 0);font: 28pt \"Microsoft YaHei UI\";}""QPushButton{image:url(%4);image-position: left center;text-align:center}").arg(pic_path_user_change, color_white, color_black, pic_path_debug_icon);QString styleSheet_camera = QString("QPushButton{border-image:url(%1);border:none;font: 28pt \"Microsoft YaHei UI\";color:%2}""QPushButton:hover{background-color:transparent;font: 28pt \"Microsoft YaHei UI\";color:%3}""QPushButton:pressed{border-image:none;background-color: rgb(0, 170, 0);font: 28pt \"Microsoft YaHei UI\";}""QPushButton{image:url(%4);image-position: left center;text-align:center}").arg(pic_path_user_change, color_white, color_black, pic_path_camera_icon);QString styleSheet_database = QString("QPushButton{border-image:url(%1);border:none;font: 28pt \"Microsoft YaHei UI\";color:%2}""QPushButton:hover{background-color:transparent;font: 28pt \"Microsoft YaHei UI\";color:%3}""QPushButton:pressed{border-image:none;background-color: rgb(0, 170, 0);font: 28pt \"Microsoft YaHei UI\";}""QPushButton{image:url(%4);image-position: left center;text-align:center}").arg(pic_path_user_change, color_white, color_black, pic_path_database_icon);QString styleSheet_user = QString("QPushButton{border-image:url(%1);border:none;font: 28pt \"Microsoft YaHei UI\";color:%2}""QPushButton:hover{background-color:transparent;font: 28pt \"Microsoft YaHei UI\";color:%3}""QPushButton:pressed{border-image:none;background-color: rgb(0, 170, 0);font: 28pt \"Microsoft YaHei UI\";}""QPushButton{image:url(%4);image-position: left center;text-align:center}").arg(pic_path_user_change, color_white, color_black, pic_path_user_icon);QString styleSheet_loginfo = QString("QPushButton{border-image:url(%1);border:none;font: 28pt \"Microsoft YaHei UI\";color:%2}""QPushButton:hover{background-color:transparent;font: 28pt \"Microsoft YaHei UI\";color:%3}""QPushButton:pressed{border-image:none;background-color: rgb(0, 170, 0);font: 28pt \"Microsoft YaHei UI\";}""QPushButton{image:url(%4);image-position: left center;text-align:center}").arg(pic_path_user_change, color_white, color_black, pic_path_logInfo_icon);//image: url(:/img/pics/auto_pack_main2.ico);// image-position: left center;btn_start->setStyleSheet(styleSheet_start);btn_logoff->setStyleSheet(styleSheet_start);btn_pause->setStyleSheet(styleSheet_pause);btn_prod_precheck->setStyleSheet(styleSheet_pause);btn_exit->setStyleSheet(styleSheet_exit);sytleSheet_gray_font = QString("QPushButton:hover{background-color:transparent;font: 28pt \"Microsoft YaHei UI\";color:%1}").arg(color_gray);styleSheet_setting = QString("QPushButton{border-image:url(%1);border:none;font: 28pt \"Microsoft YaHei UI\";color:%2}""QPushButton:hover{background-color:transparent;font: 28pt \"Microsoft YaHei UI\";color:%3}""QPushButton:pressed{border-image:none;background-color: rgb(0, 170, 0);font: 28pt \"Microsoft YaHei UI\";}""QPushButton{image:url(%4);image-position: left center;text-align:center}").arg(pic_path_user_change, color_white, color_black, pic_path_setting_icon);btn_setting->setStyleSheet(sytleSheet_gray_font);btn_debug->setStyleSheet(sytleSheet_gray_font);//btn_camera_debug->setStyleSheet(styleSheet_camera);btn_database->setStyleSheet(styleSheet_database);btn_log_in->setStyleSheet(styleSheet_user);//btn_log_info->setStyleSheet(styleSheet_loginfo);QString space2 = "     ";btn_debug->setText(space2 + btn_debug->text());//btn_camera_debug->setText(space2 + btn_camera_debug->text());btn_database->setText(space2 + btn_database->text());btn_log_in->setText(space2 + btn_log_in->text());//btn_log_info->setText(space2 + btn_log_info->text());QStringList list;// list.append("aa");// list.append("bb");// list.append("cc");list << "aa" << "bb" << "cc";// QTableView aa;//table_view_msg->setModel(&model2);model = new QStandardItemModel(this);QStandardItemModel* model_box_label = new QStandardItemModel(this);//QStandardItem aa = new QStandardItem();model->setColumnCount(8);model->setHeaderData(0, Qt::Horizontal, ("序号"));model->setHeaderData(1, Qt::Horizontal, ("批次"));model->setHeaderData(2, Qt::Horizontal, ("类型"));model->setHeaderData(3, Qt::Horizontal, ("刻字"));model->setHeaderData(4, Qt::Horizontal, ("数量(总)"));model->setHeaderData(5, Qt::Horizontal, ("数量(单盘)"));model->setHeaderData(6, Qt::Horizontal, ("卷盘总数"));model->setHeaderData(7, Qt::Horizontal, ("入站时间"));model->setItem(0, 0, new QStandardItem(("1")));model->setItem(0, 1, new QStandardItem(("ABC2345670")));model->setItem(0, 2, new QStandardItem(("SS355")));model->setItem(0, 3, new QStandardItem(("A1")));model->setItem(0, 4, new QStandardItem(("150000")));model->setItem(0, 5, new QStandardItem(("1500")));model->setItem(0, 6, new QStandardItem(("10")));model->setItem(0, 7, new QStandardItem(("2024/4/22 11:20:30")));model->setItem(1, 0, new QStandardItem(("2")));model->setItem(1, 1, new QStandardItem(("CBC2345670")));model->setItem(1, 2, new QStandardItem(("SS358")));model->setItem(1, 3, new QStandardItem(("A2")));model->setItem(1, 4, new QStandardItem(("150000")));model->setItem(1, 5, new QStandardItem(("1500")));model->setItem(1, 6, new QStandardItem(("10")));model->setItem(1, 7, new QStandardItem(("2024/4/22 11:20:30")));QList<QStandardItem*> qq1;for (int i = 0; i < 6; i++){QString value = "aa" + QString::number(i + 1); //数字转字符qq1.append(new QStandardItem(value));}QString aa = "111";int aa_int = aa.toInt();//字符转数字model->appendRow(qq1);table_view_msg->setModel(model);table_view_msg->verticalHeader()->setVisible(false);model_box_label->setColumnCount(6);model_box_label->setHeaderData(0, Qt::Horizontal, ("序号"));model_box_label->setHeaderData(1, Qt::Horizontal, ("批次"));model_box_label->setHeaderData(2, Qt::Horizontal, ("类型"));model_box_label->setHeaderData(3, Qt::Horizontal, ("dateCode"));model_box_label->setHeaderData(4, Qt::Horizontal, ("数量(盒)"));model_box_label->setHeaderData(5, Qt::Horizontal, ("查询时间"));model_box_label->setItem(0, 0, new QStandardItem(("1")));model_box_label->setItem(0, 1, new QStandardItem(("LA12345670")));model_box_label->setItem(0, 2, new QStandardItem(("SOT23")));model_box_label->setItem(0, 3, new QStandardItem(("DTE2351")));model_box_label->setItem(0, 4, new QStandardItem(("10")));model_box_label->setItem(0, 5, new QStandardItem(("2024/4/22 11:20:30")));model_box_label->setItem(1, 0, new QStandardItem(("2")));model_box_label->setItem(1, 1, new QStandardItem(("LA12345671")));model_box_label->setItem(1, 2, new QStandardItem(("SOT123")));model_box_label->setItem(1, 3, new QStandardItem(("DTE2351")));model_box_label->setItem(1, 4, new QStandardItem(("10")));model_box_label->setItem(1, 5, new QStandardItem(("2024/4/22 11:20:30")));//table_view_box_label->setModel(model_box_label);//table_view_box_label->verticalHeader()->setVisible(false);}

 设置:参数配置

调试界面测试:TCP通信

模拟连接PLC进行modbus TCP通信,线圈与寄存器的读写操作

 http的get应用

串口RS485 modbus RTU通信

  普通串口通信:

多线程的操作:

通过两种方法创建了多个线程,同时运行,实时更新主界面控件

void auto_pack_line_demo::StartTask()
{// QMessageBox::information(this,"提示","ab");// QMessageBox::information(this,"提示1","baaa");AddToTableView_lot_info();if (btn_start->text() == start_value){QMessageBox::StandardButton select_ret = QMessageBox::information(this, ("提示"), (" 确认启动设备吗? "), QMessageBox::Yes, QMessageBox::No);if (select_ret == ret_yes){b_main_thread = true;btn_start->setText(stop_value);AddToMainLog("点击开始");connect(main_thread, &MainTaskThread::sig_update_main_loginfo, this, &auto_pack_line_demo::AddToMainLog);connect(main_thread, &MainTaskThread::sig_update_main_equ_info, this, &auto_pack_line_demo::EquStateChanged);connect(main_thread, &MainTaskThread::sig_update_main_ocr_info, this, &auto_pack_line_demo::OcrChanged);connect(main_thread, &MainTaskThread::sig_update_main_label_process_info, this, &auto_pack_line_demo::ProcessStateChanged);main_thread->start();QFuture<void> future1 = QtConcurrent::run(this, &auto_pack_line_demo::UpdateVisionComm); //窗口按钮里面写法//QFuture<void> future1 = QtConcurrent::run(UpdateVisionComm); //控制台的代码// future1.waitForFinished(); //表示阻塞模式QFuture<void> future2 = QtConcurrent::run(this, &auto_pack_line_demo::UpdateVisionComm2); //窗口按钮里面写法//QFuture<void> future1 = QtConcurrent::run(UpdateVisionComm); //控制台的代码// future1.waitForFinished();//QMessageBox::information(this, (" 提示 "), btn_start->text() + (",选择了是"));QFuture<int> future3 = QtConcurrent::run(this, &auto_pack_line_demo::UpdateVisionComm3);//future3.waitForFinished();//表示阻塞模式//int fu3 = future3.result();// qDebug() << "fu3的结果:" << QString::number(fu3);}else{QMessageBox::information(this, (" 提示 "), btn_start->text() + (",选择了否"));}}else if (btn_start->text() == stop_value){btn_start->setText(start_value);disconnect(main_thread,nullptr, nullptr, nullptr);AddToMainLog("已点击停止");main_thread->stop();b_main_thread = false;}
}

 

数据库的查询:

相关文章:

QtExa001自动包装流水线的框架设计vs2019QT

QtExa001自动包装流水线的框架设计 工程代码&#xff1a; https://download.csdn.net/download/txwtech/89636815https://download.csdn.net/download/txwtech/89636815 主界面&#xff1a; 设置&#xff1a;进行参数配置&#xff0c;保存ini文件 调试&#xff1a;tcp/ip&…...

SpringBoot拦截器的使用介绍

SpringBoot拦截器的使用介绍 本篇文章主要讲的是 SpringBoot 拦截器的使用介绍。 1、定义拦截器 拦截器&#xff1a;所谓拦截器&#xff0c;就是能够在进行某个操作之前拦截请求&#xff0c;如果请求符合条件就允许在往下执行。 定义拦截器的几种方式。 1.1 实现HandleInt…...

Spring Boot应用中的资源分离与高效打包实践

在电商网站项目中&#xff0c;前端资源通常包括HTML、CSS、JavaScript、图片、字体等静态文件&#xff0c;以及Thymeleaf或Freemarker等模板引擎渲染的页面。将这些资源从Spring Boot主应用中分离出来&#xff0c;不仅有利于前后端团队的并行开发&#xff0c;还能提高应用的加载…...

分析 avformat_open_input 数据读取过程

------------------------------------------------------------ author: hjjdebug date: 2024年 08月 13日 星期二 17:31:43 CST descriptor: 分析 avformat_open_input 数据读取过程 ------------------------------------------------------------ avformat_open_input 中读…...

Apache HOP (Hop Orchestration Platform) VS Data Integration (通常被称为 Kettle)

Apache HOP (Hop Orchestration Platform) 和 Data Integration (通常被称为 Kettle) 都是强大的 ETL (Extract, Transform, Load) 工具&#xff0c; 它们都由 Hitachi Vantara 开发和支持。尽管它们有着相似的目标&#xff0c;即帮助用户进行数据集成任务&#xff0c;但它们在…...

如何判断一个dll/exe是32位还是64位

通过记事本判断&#xff08;可判断C或者C#&#xff09; 64位、将dll用记事本打开&#xff0c;可以看到一堆乱码&#xff0c;但是找到乱码行的第一个PE&#xff0c;如果后面是d?则为64位 32位、将dll用记事本打开&#xff0c;可以看到一堆乱码&#xff0c;但是找到乱码行的第…...

加速网页加载,提升用户体验:HTML、JS 和 Vue 项目优化全攻略

在信息爆炸的时代&#xff0c;网页加载速度成为了用户体验的重中之重。试想一下&#xff0c;如果一个页面加载超过 3 秒&#xff0c;你还有耐心等待吗&#xff1f; 为了留住用户&#xff0c;提升转化率&#xff0c;网页优化势在必行&#xff01; 本文将从 HTML、JavaScript 和…...

LVS服务器基础环境配置

环境配置 1 基础服务关闭 setenforce 0 # 临时关闭selinuxvi /etc/sysconfig/selinux # 永久关闭selinuxsystemctl disable --now firewalld # 关闭防火墙systemctl disable --now NetworkManager # 关闭网络管理器2 centos7软件仓库的配置 mount /dev/cdrom /media以防万一&…...

【Python OpenCV】使用OpenCV实现两张图片拼接

问题引入&#xff1a; 如何使用Python OpenCV实现两张图片的水平拼接和垂直拼接 代码实现&#xff1a; import cv2 import numpy as npdef image_hstack(image_path_1, image_path_2):"""两张图片左右拼接"""img1 cv2.imread(image_path_1)img…...

springboot jar -jar centos后台运行的几种方式

在CentOS系统中&#xff0c;如果你想要在后台运行一个Spring Boot应用程序&#xff0c;你可以使用nohup命令或者使用screen会话。以下是两种常用的方法&#xff1a; 1. **使用nohup命令**&#xff1a; nohup命令可以使进程在你退出SSH会话后继续运行。它还会把标准输出和标…...

【GitLab】使用 Docker 安装 GitLab:配置 SSH 端口

使用 Docker 安装 GitLab 要求修改ssh端口 GitLab 使用 SSH 通过 SSH 与 Git 交互。默认情况下,GitLab 使用端口22。 要在使用 GitLab Docker 映像时使用其他端口,您可以执行以下操作之一: 更改服务器的 SSH 端口(推荐)。 更改 GitLab Shell SSH 端口。 更改服务器的 SSH …...

【pdf文件生成】如何将盖章的文件生成PDF文件

一、提出问题 在我们的工作中&#xff0c;有时候上级让下级将盖章的文件生成PDF文件通过内部平台发送到上级邮箱&#xff0c;那如何解决呢&#xff1f;是去找一个扫描仪&#xff0c;还是用手机拍图转。用Python基实就能实现。 二、分析问题 现在网上好多的软件都是收费的&am…...

铝壳电阻在电路中的作用和影响是什么?

铝壳电阻&#xff0c;顾名思义&#xff0c;就是用铝材料制成的电阻。在电路中&#xff0c;它主要起到限流、分压、负载等作用。下面详细介绍铝壳电阻在电路中的作用和影响。 1. 限流作用&#xff1a;铝壳电阻可以限制电流的大小&#xff0c;防止电流过大而损坏电路。当电路中的…...

# Python 判断入参日期是周几

在数据分析和软件开发中&#xff0c;经常需要判断某个特定日期是星期几。Python 提供了强大的日期时间处理功能&#xff0c;可以轻松实现这一功能。本篇文章将介绍如何使用 Python 的内置库来判断给定日期是星期几&#xff0c;并提供具体实例。 1. 使用 datetime 模块 Python…...

井字棋游戏(HTML+CSS+JavaScript)

&#x1f30f;个人博客主页&#xff1a;心.c 前言&#xff1a;这两天在写植物大战僵尸&#xff0c;写不动了&#xff0c;现在和大家分享一下之前我写的一个很简单的小游戏井字棋&#xff0c;这个没有AI&#xff0c;可以两个人一起玩&#xff0c;如果大家觉得我哪里写的有一些问…...

HTML 列表和容器元素——WEB开发系列10

HTML 提供了多种方式来组织和展示内容&#xff0c;其中包括无序列表、有序列表、分区元素 ​​<div>​​ 和内联元素 ​​<span>​​、以及如何使用 ​​<div>​​​ 进行布局和表格布局。 一、HTML 列表 1. 无序列表 (​​<ul>​​) 无序列表用于展…...

Java数组的高级使用技巧与性能优化

Java数组的高级使用技巧与性能优化 大家好&#xff0c;我是微赚淘客返利系统3.0的小编&#xff0c;是个冬天不穿秋裤&#xff0c;天冷也要风度的程序猿&#xff01; Java数组是程序设计中的基础数据结构&#xff0c;提供了一种存储固定大小的同类型元素的方式。本文将介绍Jav…...

python spyne报No module named ‘http.cookies‘的解决

python spyne报No module named ‘http.cookies’ python实现webservice服务端时&#xff0c;会使用spyne这个库&#xff0c;安装后&#xff0c;运行会提示No module named ‘http.cookies’。 尝试过不行的方法 pip install http.cookiespip install http.cookiejar 可行的…...

vmware虚拟机玩GPU显卡直通

安装好exsi以后&#xff0c;找到管理----硬件-----PCI设备&#xff0c;勾选想要直通的显卡&#xff0c;然后点击“切换直通” 切换以后可以看到列表中的直通列显示为活动就对了。 然后编辑虚拟机设置&#xff0c;CPU关闭硬件虚拟化&#xff08;向客户机操作系统公开硬件辅助的…...

Linux下Oracle 11g升级19c实录

1.组件信息 source /home/oracle/.bash_profile11g && sqlplus "/ as sysdba"<<EOF set line 200 col COMP_NAME for a40 select comp_name,VERSION,STATUS from dba_registry; exit; EOF COMP_NAME VERSION …...

haproxy实验-2

haproxy中的算法 静态算法&#xff1a;按照事先定义好的规则轮询公平调度&#xff0c;不关心后端服务器的当前负载、连接数和响应速度 等&#xff0c;且无法实时修改权重(只能为0和1,不支持其它值)&#xff0c;只能靠重启HAProxy生效。 static-rr&#xff1a;基于权重的轮询…...

動態PPTP代理IP是什麼?

PPTP即Point-to-Point Tunneling Protocol&#xff0c;點對點隧道協議&#xff0c;是一種常用的VPN協議&#xff0c;主要用於創建虛擬專用網路。通過將用戶的網路流量加密並通過一個中間伺服器傳輸&#xff0c;實現了對用戶IP地址的隱藏和數據的保護。而動態PPTP代理IP則是在傳…...

《全面解析 Nginx:从下载安装到高级应用与问题解决》

Nginx 一、Nginx 简介 什么是 Nginx 以及其功能 Nginx 是一款高性能的 HTTP 和反向代理的 Web 服务器&#xff0c;在处理高并发方面表现卓越&#xff0c;具备强大的能力来承受高负载&#xff0c;有相关报告指出其能够支持高达 50,000 个并发连接数。其显著特点为占用内存少、…...

python获取视频时长

今天有个需求&#xff0c;需要获取视频时长&#xff1a; 方法一&#xff1a;使用moviepy库打开视频文件并获取视频剪辑对象&#xff0c;然后通过剪辑对象获得视频时长。方法二&#xff1a;使用cv2库通过打开视频文件并获取帧率和总帧数两个属性&#xff0c;计算视频时长。 请…...

php-xlswriter实现数据导出excel单元格合并,内容从指定行开始写

最终效果图&#xff1a; 代码&#xff1a; public function export_data() {$list $this->get_list_organ();$content [];$content[] []; // 第2行不设置内容&#xff0c;设置为空foreach ($list as $key > $value) {$content[] [$value[organ_name], $value[clas…...

注意力模型QKV矩阵与位置向量计算

注意力模型QKV矩阵计算 在注意力机制中&#xff0c;Query (Q)、Key (K) 和 Value (V) 矩阵是通过对输入向量进行线性变换得到的&#xff0c;而这些矩阵的初始化与更新与神经网络的权重类似。 1. Q, K, V矩阵的初始化 线性变换&#xff1a;在注意力机制中&#xff0c;输入序列…...

glm4-9B-chat,使用提示工程激活模型最大潜力

文章目录 安全与免责申明简介GLM4-9B直接问答提示工程 激活能力 安全与免责申明 本文旨在研究大模型的安全&#xff0c;交流大模型目前安全方面的一些不足。 所有的实验与讨论的目的均是在进行科学研究的实验的需要。 简介 本文使用Ollama和LangChain&#xff0c;通过提示词…...

[Linux]在Ubuntu中如何正确安装python

一、在Ubuntu中python常见的安装方式 在Ubuntu中我们常用的python安装方式有使用包管理工具安装或者使用源码安装&#xff0c;下面我们来讲解一下这两种安装方式的优缺点。首先是使用包管理工具安装&#xff0c;我们可以直接使用“apt install python3.9”来安装一个我们想要的…...

[Vue3 + TS + Vite]文件选择器-组件

文件选择器组件代码 <script setup lang"ts"> import { ref, onMounted, defineProps, defineEmits, computed, toRaw } from vue;// 定义props interface Props {buttonTextUnactive?: string;buttonTextActive?: string;onFatherClick?: boolean; }// 定…...

Chrome书签搜索插件

效果展示 这是一个chroma插件&#xff0c;可以按住 ctrl/command B 进行搜索您的书签&#xff0c;并且点击打开您的书签。支持上下切换回车打开新页面。 扩展下载地址 bookmark-search 欢迎有任何问题给我提 issues...