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

Qt PCL学习(三):点云滤波

注意事项

  • 版本一览:Qt 5.15.2 + PCL 1.12.1 + VTK 9.1.0
  • 前置内容:Qt PCL学习(一):环境搭建、Qt PCL学习(二):点云读取与保存、PCL学习六:Filtering-滤波

0. 效果演示

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

1. voxel_filtering.pro

QT       += core guigreaterThan(QT_MAJOR_VERSION, 4): QT += widgets// 添加下行代码(根据自己安装目录进行修改)
include(D:/PCL1.12.1/pcl1.12.1.pri)

2. mainwindow.h

#ifndef MAINWINDOW_H
#define MAINWINDOW_H#include <voxel_filtering.h>
#include <vector>
#include <QMainWindow>
#include <QDebug>
#include <QColorDialog>
#include <QMessageBox>
#include <QFileDialog>
#include <QTime>
#include <QDir>
#include <QFile>
#include <QtMath>
#include <QWindow>
#include <QAction>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QIcon>
#include <QMenuBar>
#include <QMenu>
#include <QToolBar>
#include <QStatusBar>
#include <QFont>
#include <QString>
#include <QTextBrowser>
#include <QDirIterator>
#include <QStandardItemModel>
#include <QModelIndex>#include "QVTKOpenGLNativeWidget.h"
#include <vtkSphereSource.h>
#include <vtkPolyDataMapper.h>
#include <vtkActor.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkGenericOpenGLRenderWindow.h>
#include <vtkNamedColors.h>
#include <vtkProperty.h>
#include <vtkSmartPointer.h>
#include "vtkAutoInit.h"VTK_MODULE_INIT(vtkRenderingOpenGL2);
VTK_MODULE_INIT(vtkInteractionStyle);
VTK_MODULE_INIT(vtkRenderingVolumeOpenGL2);
VTK_MODULE_INIT(vtkRenderingFreeType);#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/io/ply_io.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/filters/voxel_grid.h>#ifndef TREE_ITEM_ICON_DataItem
#define TREE_ITEM_ICON_DataItem QStringLiteral("treeItem_folder")
#endiftypedef pcl::PointXYZ PointT;
typedef pcl::PointCloud<PointT> PointCloudT;
typedef pcl::visualization::PCLVisualizer PCLViewer;
typedef std::shared_ptr<PointCloudT> PointCloudPtr;QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACEclass MainWindow : public QMainWindow {Q_OBJECTpublic:MainWindow(QWidget *parent = nullptr);~MainWindow();PointCloudT::Ptr pcl_voxel_filter(PointCloudT::Ptr cloud_in, float leaf_size);void view_updata(std::vector<PointCloudT::Ptr> vector_cloud, std::vector<int> index);private slots:void open_clicked();  // 打开文件void save_clicked();  // 保存文件void on_treeView_clicked(const QModelIndex &index);// 点云滤波void pressBtn_voxel();void voxel_clicked(QString data);private:Ui::MainWindow *ui;QMap<QString, QIcon> m_publicIconMap;   // 存放公共图标QStandardItemModel* model;QStandardItem* itemFolder;QModelIndex index_cloud;std::vector<PointCloudT::Ptr> cloud_vec;std::vector<int> cloud_index;// 点云名称std::vector<std::string> cloud_name{"0", "1", "2"};int point_size = 1;PointCloudPtr cloudptr;PCLViewer::Ptr cloud_viewer;voxel_filtering *dialog_voxel;
};
#endif // MAINWINDOW_H

3. mainwindow.cpp

#pragma execution_character_set("utf-8")#include "mainwindow.h"
#include "ui_mainwindow.h"MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) {ui->setupUi(this);// 设置窗口标题和 logothis->setWindowTitle("CloudOne");this->setWindowIcon(QIcon(":/resourse/icon.ico"));m_publicIconMap[TREE_ITEM_ICON_DataItem] = QIcon(QStringLiteral(":/resourse/folder.png"));model = new QStandardItemModel(ui->treeView);model->setHorizontalHeaderLabels(QStringList()<<QStringLiteral("--cloud--DB-Tree--"));ui->treeView->setHeaderHidden(true);ui->treeView->setModel(model);ui->treeView->setSelectionMode(QAbstractItemView::ExtendedSelection);  // 设置多选cloudptr.reset(new PointCloudT);cloud_viewer.reset(new pcl::visualization::PCLVisualizer("viewer", false));vtkNew<vtkGenericOpenGLRenderWindow> window;window->AddRenderer(cloud_viewer->getRendererCollection()->GetFirstRenderer());ui->openGLWidget->setRenderWindow(window.Get());cloud_viewer->setupInteractor(ui->openGLWidget->interactor(), ui->openGLWidget->renderWindow());ui->openGLWidget->update();// 创建菜单栏QMenuBar *menu_bar = new QMenuBar(this);this->setMenuBar(menu_bar);menu_bar->setStyleSheet("font-size : 16px");// 1、File 下拉列表QMenu *file_menu = new QMenu("File", menu_bar);QAction *open_action = new QAction("Open File");QAction *save_action = new QAction("Save File");QAction *exit_action = new QAction("Exit");// 添加动作到文件菜单file_menu->addAction(open_action);file_menu->addAction(save_action);file_menu->addSeparator();  // 添加菜单分隔符将 exit 单独隔离开file_menu->addAction(exit_action);// 把 File 添加到菜单栏menu_bar->addMenu(file_menu);// 2、Filter 下拉列表QMenu *filter_menu = new QMenu("Filter", menu_bar);QAction *voxel_action = new QAction("Voxel Filtering");filter_menu->addAction(voxel_action);menu_bar->addMenu(filter_menu);// 信号与槽函数链接connect(open_action, SIGNAL(triggered()), this, SLOT(open_clicked()));  // 打开文件connect(save_action, SIGNAL(triggered()), this, SLOT(save_clicked()));  // 保存文件connect(exit_action, SIGNAL(triggered()), this, SLOT(close()));         // 退出connect(voxel_action, SIGNAL(triggered()), this, SLOT(pressBtn_voxel()));
}MainWindow::~MainWindow() {delete ui;
}PointCloudT::Ptr MainWindow::pcl_voxel_filter(PointCloudT::Ptr cloud_in, float leaf_size) {pcl::VoxelGrid<PointT> voxel_grid;voxel_grid.setLeafSize(leaf_size, leaf_size, leaf_size);voxel_grid.setInputCloud(cloud_in);PointCloudT::Ptr cloud_out (new PointCloudT()) ;voxel_grid.filter(*cloud_out);return cloud_out;
}void MainWindow::pressBtn_voxel() {dialog_voxel = new voxel_filtering();connect(dialog_voxel, SIGNAL(sendData(QString)), this, SLOT(voxel_clicked(QString)));if (dialog_voxel->exec() == QDialog::Accepted){}delete dialog_voxel;
}// 体素采样
void MainWindow::voxel_clicked(QString data) {if (cloudptr->empty()) {QMessageBox::warning(this, "Warning", "None point cloud!");return;} else {if (data.isEmpty()) {QMessageBox::warning(this, "Warning", "Wrong format!");return;}float size = data.toFloat();auto cloud_out = pcl_voxel_filter(cloudptr, size);cloudptr = cloud_out;int size1 = static_cast<int>(cloudptr->size());QString PointSize = QString("%1").arg(size1);ui->textBrowser_2->clear();ui->textBrowser_2->insertPlainText("PCD number: " + PointSize);ui->textBrowser_2->setFont(QFont("Arial", 9, QFont::Normal));cloud_viewer->removeAllPointClouds();cloud_viewer->removeAllShapes();cloud_viewer->addPointCloud<pcl::PointXYZ>(cloudptr->makeShared(), std::to_string(cloud_vec.size()-1));cloud_viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, point_size, std::to_string(cloud_vec.size()-1));cloud_viewer->resetCamera();// 设置颜色处理器,将点云数据添加到 cloud_viewer 中const std::string axis = "z";pcl::visualization::PointCloudColorHandlerGenericField<PointT> color_handler(cloudptr, axis);cloud_viewer->addPointCloud(cloudptr, color_handler, "cloud");cloud_viewer->addPointCloud(cloudptr, "cloud");}
}void MainWindow::open_clicked() {// this:代表当前对话框的父对象;tr("open file"):作为对话框的标题显示在标题栏中,使用 tr 函数表示这是一个需要翻译的文本// "":代表对话框的初始目录,这里为空表示没有指定初始目录// tr("pcb files(*.pcd *.ply *.txt) ;;All files (*.*)"):过滤器,决定在对话框中只能选择指定类型的文件QString fileName = QFileDialog::getOpenFileName(this, tr("open file"), "", tr("point cloud files(*.pcd *.ply) ;; All files (*.*)"));if (fileName.isEmpty()) {return;}if (fileName.endsWith("ply")) {qDebug() << fileName;if (pcl::io::loadPLYFile(fileName.toStdString(), *cloudptr) == -1) {qDebug() << "Couldn't read .ply file \n";return ;}} else if (fileName.endsWith("pcd")) {qDebug() << fileName;if (pcl::io::loadPCDFile(fileName.toStdString(), *cloudptr) == -1) {qDebug() << "Couldn't read .pcd file \n";return;}} else {QMessageBox::warning(this, "Warning", "Wrong format!");}cloud_vec.push_back(cloudptr->makeShared());cloud_index.push_back(1);itemFolder = new QStandardItem(m_publicIconMap[QStringLiteral("treeItem_folder")], QStringLiteral("cloud%1").arg(cloud_vec.size()-1));itemFolder->setCheckable(true);itemFolder->setCheckState(Qt::Checked);  // 获取选中状态model->appendRow(itemFolder);int size = static_cast<int>(cloudptr->size());QString PointSize = QString("%1").arg(size);ui->textBrowser_2->clear();ui->textBrowser_2->insertPlainText("PCD number: " + PointSize);ui->textBrowser_2->setFont(QFont("Arial", 9, QFont::Normal));cloud_viewer->addPointCloud<pcl::PointXYZ>(cloudptr->makeShared(), std::to_string(cloud_vec.size()-1));// 设置点云大小cloud_viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, point_size, std::to_string(cloud_vec.size()-1));cloud_viewer->resetCamera();ui->openGLWidget->renderWindow()->Render();ui->openGLWidget->update();// 设置颜色处理器,将点云数据添加到 cloud_viewer 中const std::string axis = "z";pcl::visualization::PointCloudColorHandlerGenericField<PointT> color_handler(cloudptr, axis);cloud_viewer->addPointCloud(cloudptr, color_handler, "cloud");cloud_viewer->addPointCloud(cloudptr, "cloud");
}void MainWindow::save_clicked() {int return_status;QString filename = QFileDialog::getSaveFileName(this, tr("Open point cloud"), "", tr("Point cloud data (*.pcd *.ply)"));if (cloudptr->empty()) {return;} else {if (filename.isEmpty()) {return;}if (filename.endsWith(".pcd", Qt::CaseInsensitive)) {return_status = pcl::io::savePCDFileBinary(filename.toStdString(), *cloudptr);} else if (filename.endsWith(".ply", Qt::CaseInsensitive)) {return_status = pcl::io::savePLYFileBinary(filename.toStdString(), *cloudptr);} else {filename.append(".ply");return_status = pcl::io::savePLYFileBinary(filename.toStdString(), *cloudptr);}if (return_status != 0) {PCL_ERROR("Error writing point cloud %s\n", filename.toStdString().c_str());return;}}
}void MainWindow::view_updata(std::vector<PointCloudT::Ptr> vector_cloud, std::vector<int> index) {cloud_viewer.reset(new pcl::visualization::PCLVisualizer("viewer", false));vtkNew<vtkGenericOpenGLRenderWindow> window;window->AddRenderer(cloud_viewer->getRendererCollection()->GetFirstRenderer());ui->openGLWidget->setRenderWindow(window.Get());cloud_viewer->removeAllPointClouds();cloud_viewer->removeAllShapes();for (int i = 0; i<vector_cloud.size(); i++) {if (index[i] == 1) {pcl::visualization::PointCloudColorHandlerGenericField<pcl::PointXYZ>render(vector_cloud[i], "intensity");cloud_viewer->addPointCloud<pcl::PointXYZ>(vector_cloud[i], render, std::to_string(i));cloud_viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, point_size, std::to_string(i));}}cloud_viewer->resetCamera();ui->openGLWidget->update();
}// 确定 index
void MainWindow::on_treeView_clicked(const QModelIndex &index) {QStandardItem* item = model->itemFromIndex(index);// 点云数量更改QStandardItemModel* model = static_cast<QStandardItemModel*>(ui->treeView->model());QModelIndex index_temp = ui->treeView->currentIndex();int size = static_cast<int>(cloud_vec[index_temp.row()]->size());QString PointSize = QString("%1").arg(size);ui->textBrowser_2->clear();ui->textBrowser_2->insertPlainText("Point cloud number: " + PointSize);ui->textBrowser_2->setFont(QFont("Arial", 9, QFont::Normal));// 可视化更改if (item == nullptr)return;if (item->isCheckable()) {//判断状态Qt::CheckState state = item->checkState();  // 获取当前的选择状态if (Qt::Checked == state) {cloud_index[index.row()] = 1;}if (Qt::Unchecked == state) {cloud_index[index.row()] = 0;}view_updata(cloud_vec, cloud_index);}
}

4. voxel_filtering.h

#ifndef VOXEL_FILTERING_H
#define VOXEL_FILTERING_H#include <QDialog>
#include <QString>namespace Ui {
class voxel_filtering;
}class voxel_filtering : public QDialog {Q_OBJECTsignals:void sendData(QString data);public:explicit voxel_filtering(QWidget *parent = nullptr);~voxel_filtering();private slots:void on_buttonBox_accepted();private:Ui::voxel_filtering *ui;
};#endif // VOXEL_FILTERING_H

5. voxel_filtering.cpp

#include "voxel_filtering.h"
#include "ui_voxel_filtering.h"voxel_filtering::voxel_filtering(QWidget *parent) : QDialog(parent), ui(new Ui::voxel_filtering) {ui->setupUi(this);
}voxel_filtering::~voxel_filtering() {delete ui;
}void voxel_filtering::on_buttonBox_accepted() {emit sendData(ui->lineEdit->text());this->close();
}

相关文章:

Qt PCL学习(三):点云滤波

注意事项 版本一览&#xff1a;Qt 5.15.2 PCL 1.12.1 VTK 9.1.0前置内容&#xff1a;Qt PCL学习&#xff08;一&#xff09;&#xff1a;环境搭建、Qt PCL学习&#xff08;二&#xff09;&#xff1a;点云读取与保存、PCL学习六&#xff1a;Filtering-滤波 0. 效果演示 1. vo…...

Ainx-V0.2-简单的连接封装与业务绑定

&#x1f4d5;作者简介&#xff1a; 过去日记&#xff0c;致力于Java、GoLang,Rust等多种编程语言&#xff0c;热爱技术&#xff0c;喜欢游戏的博主。 &#x1f4d7;本文收录于Ainx系列&#xff0c;大家有兴趣的可以看一看 &#x1f4d8;相关专栏Rust初阶教程、go语言基础系列…...

《杨绛传:生活不易,保持优雅》读书摘录

目录 书简介 作者成就 书中内容摘录 良好的家世背景&#xff0c;书香门第为求学打基础 求学相关 念大学 清华研究生 自费英国留学 法国留学自学文学 战乱时期回国 当校长 当小学老师 创造话剧 支持钱锺书写《围城》 出任震旦女子文理学院的教授 接受清华大学的…...

ChatGPT在肾脏病学领域的专业准确性评估

ChatGPT在肾脏病学领域的专业表现评估 随着人工智能技术的飞速发展&#xff0c;ChatGPT作为一个先进的机器学习模型&#xff0c;在多个领域显示出了其对话和信息处理能力的潜力。近期发表在《美国肾脏病学会临床杂志》&#xff08;影响因子&#xff1a;9.8&#xff09;上的一项…...

Centos7.9安装SQLserver2017数据库

Centos7.9安装SQLserver2017数据库 一、安装前准备 挂载系统盘 安装依赖 yum install libatomic* -y 二、yum方式安装 # 配置 yum 源 wget -O /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repoyum clean all yum…...

spring boot和spring cloud项目中配置文件application和bootstrap中的值与对应的配置类绑定处理

在前面的文章基础上 https://blog.csdn.net/zlpzlpzyd/article/details/136065211 加载完文件转换为 Environment 中对应的值之后&#xff0c;接下来需要将对应的值与对应的配置类进行绑定&#xff0c;方便对应的组件取值处理接下来的操作。 对应的配置值与配置类绑定通过 Con…...

每天一个数据分析题(一百五十四)

给定下面的Python代码片段&#xff0c;哪个选项正确描述了代码可能存在的问题&#xff1f; from scipy import stats 返回异常值的索引 z stats.zscore(data_raw[‘Age’]) z_outlier (z > 3) | (z < -3) z_outlier.tolist().index(1) A. 代码将返回数据集Age列中第…...

Django从入门到放弃

Django从入门到放弃 Django最初被设计用于具有快速开发需求的新闻类站点&#xff0c;目的是实现简单快捷的网站开发。 安装Django 使用anaconda创建环境 conda create -n django_env python3.10 conda activate django_env使用pip安装django python -m pip install Django查…...

C++中类的6个默认成员函数【构造函数】 【析构函数】

文章目录 前言构造函数构造函数的概念构造函数的特性 析构函数 前言 在学习C我们必须要掌握的6个默认成员函数&#xff0c;接下来本文讲解2个默认成员函数 构造函数 如果一个类中什么成员都没有&#xff0c;简称为空类。 空类中真的什么都没有吗&#xff1f;并不是&#xff0c…...

06-Java适配器模式 ( Adapter Pattern )

原型模式 摘要实现范例 适配器模式&#xff08;Adapter Pattern&#xff09;是作为两个不兼容的接口之间的桥梁 适配器模式涉及到一个单一的类&#xff0c;该类负责加入独立的或不兼容的接口功能 举个真实的例子&#xff0c;读卡器是作为内存卡和笔记本之间的适配器。您将内…...

C# CAD交互界面-自定义面板集-添加快捷命令(五)

运行环境 vs2022 c# cad2016 调试成功 一、引用 using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.Runtime; using Autodesk.AutoCAD.Windows; using System; using System.Drawing; using System.Windows.Forms; 二、代码说明 [CommandMethod("Cre…...

Spring boot集成各种数据源操作数据库

一、最基础的数据源方式 1.导入maven依赖 <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-jdbc</artifactId></dependency <dependency><groupId>com.mysql</groupId><art…...

K8s环境下rook-v1.13.3部署Ceph-v18.2.1集群

文章目录 1.K8s环境搭建2.Ceph集群部署2.1 部署Rook Operator2.2 镜像准备2.3 配置节点角色2.4 部署operator2.5 部署Ceph集群2.6 强制删除命名空间2.7 验证集群 3.Ceph界面 1.K8s环境搭建 参考&#xff1a;CentOS7搭建k8s-v1.28.6集群详情&#xff0c;把K8s集群完成搭建&…...

【JavaEE】传输层网络协议

传输层网络协议 1. UDP协议 1.1 特点 面向数据报&#xff08;DatagramSocket&#xff09;数据报大小限制为64k全双工不可靠传输有接收缓冲区&#xff0c;无发送缓冲区 UDP的特点&#xff0c;我理解起来就是工人组成的**“人工传送带”**&#xff1a; 面向数据报&#xff08;…...

08-Java过滤器模式 ( Filter Pattern )

Java过滤器模式 实现范例 过滤器模式&#xff08;Filter Pattern&#xff09;或允许开发人员使用不同的标准来过滤一组对象&#xff0c;通过逻辑运算以解耦的方式把它们连接起来 过滤器模式&#xff08;Filter Pattern&#xff09; 又称 标准模式&#xff08;Criteria Pattern…...

ChatGPT高效提问—prompt常见用法(续篇八)

ChatGPT高效提问—prompt常见用法(续篇八) 1.1 对抗 ​ 对抗是一个重要主题,深入探讨了大型语言模型(LLM)的安全风险。它不仅反映了人们对LLM可能出现的风险和安全问题的理解,而且能够帮助我们识别这些潜在的风险,并通过切实可行的技术手段来规避。 ​ 截至目前,网络…...

微软.NET6开发的C#特性——接口和属性

我是荔园微风&#xff0c;作为一名在IT界整整25年的老兵&#xff0c;看到不少初学者在学习编程语言的过程中如此的痛苦&#xff0c;我决定做点什么&#xff0c;下面我就重点讲讲微软.NET6开发人员需要知道的C#特性&#xff0c;然后比较其他各种语言进行认识。 C#经历了多年发展…...

容器基础知识:容器和虚拟化的区别

虚拟化与容器化对比 容器化和虚拟化都是用于优化资源利用率并实现高效应用程序部署的技术。然而&#xff0c;它们在方法和关键特征上存在差异&#xff1a; 虚拟化: 可以理解为创建虚拟机 (VM)。虚拟机模拟一台拥有自己硬件&#xff08;CPU、内存、存储&#xff09;和操作系统…...

【Linux】vim的基本操作与配置(下)

Hello everybody!今天我们继续讲解vim的操作与配置&#xff0c;希望大家在看过这篇文章与上篇文章后都能够轻松上手vim! 1.补充 在上一篇文章中我们说过了&#xff0c;在底行模式下set nu可以显示行号。今天补充一条&#xff1a;set nonu可以取消行号。这两条命令大家看看就可…...

[office] 图文演示excel怎样给单元格添加下拉列表 #知识分享#经验分享

图文演示excel怎样给单元格添加下拉列表 在Excel表格中输入数据的时候&#xff0c;为了简便快捷的输入&#xff0c;经常需要给Excel单元格添加一个下拉菜单&#xff0c;这样在输入数据时不必按键盘&#xff0c;只是用鼠标选择选项就可以了。 比的位置。 4、可以看到一个预览的…...

业务系统对接大模型的基础方案:架构设计与关键步骤

业务系统对接大模型&#xff1a;架构设计与关键步骤 在当今数字化转型的浪潮中&#xff0c;大语言模型&#xff08;LLM&#xff09;已成为企业提升业务效率和创新能力的关键技术之一。将大模型集成到业务系统中&#xff0c;不仅可以优化用户体验&#xff0c;还能为业务决策提供…...

中南大学无人机智能体的全面评估!BEDI:用于评估无人机上具身智能体的综合性基准测试

作者&#xff1a;Mingning Guo, Mengwei Wu, Jiarun He, Shaoxian Li, Haifeng Li, Chao Tao单位&#xff1a;中南大学地球科学与信息物理学院论文标题&#xff1a;BEDI: A Comprehensive Benchmark for Evaluating Embodied Agents on UAVs论文链接&#xff1a;https://arxiv.…...

ESP32读取DHT11温湿度数据

芯片&#xff1a;ESP32 环境&#xff1a;Arduino 一、安装DHT11传感器库 红框的库&#xff0c;别安装错了 二、代码 注意&#xff0c;DATA口要连接在D15上 #include "DHT.h" // 包含DHT库#define DHTPIN 15 // 定义DHT11数据引脚连接到ESP32的GPIO15 #define D…...

微服务商城-商品微服务

数据表 CREATE TABLE product (id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 商品id,cateid smallint(6) UNSIGNED NOT NULL DEFAULT 0 COMMENT 类别Id,name varchar(100) NOT NULL DEFAULT COMMENT 商品名称,subtitle varchar(200) NOT NULL DEFAULT COMMENT 商…...

Maven 概述、安装、配置、仓库、私服详解

目录 1、Maven 概述 1.1 Maven 的定义 1.2 Maven 解决的问题 1.3 Maven 的核心特性与优势 2、Maven 安装 2.1 下载 Maven 2.2 安装配置 Maven 2.3 测试安装 2.4 修改 Maven 本地仓库的默认路径 3、Maven 配置 3.1 配置本地仓库 3.2 配置 JDK 3.3 IDEA 配置本地 Ma…...

服务器--宝塔命令

一、宝塔面板安装命令 ⚠️ 必须使用 root 用户 或 sudo 权限执行&#xff01; sudo su - 1. CentOS 系统&#xff1a; yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh2. Ubuntu / Debian 系统…...

iOS性能调优实战:借助克魔(KeyMob)与常用工具深度洞察App瓶颈

在日常iOS开发过程中&#xff0c;性能问题往往是最令人头疼的一类Bug。尤其是在App上线前的压测阶段或是处理用户反馈的高发期&#xff0c;开发者往往需要面对卡顿、崩溃、能耗异常、日志混乱等一系列问题。这些问题表面上看似偶发&#xff0c;但背后往往隐藏着系统资源调度不当…...

LLMs 系列实操科普(1)

写在前面&#xff1a; 本期内容我们继续 Andrej Karpathy 的《How I use LLMs》讲座内容&#xff0c;原视频时长 ~130 分钟&#xff0c;以实操演示主流的一些 LLMs 的使用&#xff0c;由于涉及到实操&#xff0c;实际上并不适合以文字整理&#xff0c;但还是决定尽量整理一份笔…...

MySQL 部分重点知识篇

一、数据库对象 1. 主键 定义 &#xff1a;主键是用于唯一标识表中每一行记录的字段或字段组合。它具有唯一性和非空性特点。 作用 &#xff1a;确保数据的完整性&#xff0c;便于数据的查询和管理。 示例 &#xff1a;在学生信息表中&#xff0c;学号可以作为主键&#xff…...

水泥厂自动化升级利器:Devicenet转Modbus rtu协议转换网关

在水泥厂的生产流程中&#xff0c;工业自动化网关起着至关重要的作用&#xff0c;尤其是JH-DVN-RTU疆鸿智能Devicenet转Modbus rtu协议转换网关&#xff0c;为水泥厂实现高效生产与精准控制提供了有力支持。 水泥厂设备众多&#xff0c;其中不少设备采用Devicenet协议。Devicen…...