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

十、Qt三维图表

一、Data Visualization模块概述

Data Visualization的三维显示功能主要有三种三维图形来实现,三各类的父类都是QAbstract3DGraph,从QWindow继承而来。这三类分别是:
  • 三维柱状图Q3DBar
  • 三维空间散点Q3DScatter
  • 三维曲面Q3DSurface

1、相关类的继承关系

(1)图形类

QWindowQAbstract3DGraphQ3DBarQ3DScatterQ3DSurface

(2)数据序列类

QAbstract3DSeriesQBar3DSeriesQScatter3DSeriesQSurface3DSeries

(3)轴类

QAbstract3DAxisQCategory3DAxisQValue3DAxis

(4)数据代理类

数据代理类与序列对应,用于存储序列的数据的类。
QAbstractDataProxyQBarDataProxyQItemModelBarDataProxyQScatterDataProxyQItemModelScatterDataProxyQSurfaceDataProxyQHeightMapSurfaceDataProxyQItemModelSurfaceDataProxy

2、使用方法

(1)工程添加

QT += datavisualization

(2)代码中添加头文件与命名空间

#include <QtDataVisualization>
using namespace QtDataVisualization;

二、三维柱状图

1、实现程序

在这里插入图片描述

(1)创建项目,基于QMainWindow

(2)添加组件

在这里插入图片描述

(3)初始化

MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow)
{ui->setupUi(this);QSplitter *splitter = new QSplitter(Qt::Horizontal);splitter->addWidget(ui->groupBox);initGraph3D();splitter->addWidget(createWindowContainer(graph3D));setCentralWidget(splitter);
}MainWindow::~MainWindow()
{delete ui;
}void MainWindow::initGraph3D()
{graph3D = new Q3DBars;// 创建坐标系统QStringList rowLabs, colLabs;rowLabs << "row1" << "row2" << "row3";colLabs << "col1" << "col2" << "col3" << "col4" << "col5";QValue3DAxis *axisV = new QValue3DAxis;axisV->setTitle("Value");axisV->setTitleVisible(true);QCategory3DAxis * axisCol = new QCategory3DAxis;axisCol->setTitle("Column");axisCol->setTitleVisible(true);axisCol->setLabels(colLabs);QCategory3DAxis * axisRow = new QCategory3DAxis;axisRow->setTitle("Row");axisRow->setTitleVisible(true);axisRow->setLabels(rowLabs);graph3D->setValueAxis(axisV);graph3D->setColumnAxis(axisCol);graph3D->setRowAxis(axisRow);// 创建数据序列QBar3DSeries *series = new QBar3DSeries;series->setMesh(QAbstract3DSeries::MeshCylinder); // 形状series->setItemLabelFormat("(@rowLabel,@colLabel):%.1f");// 添加数据QBarDataArray *dataArray = new QBarDataArray;dataArray->reserve(rowLabs.count()); // 三行数据qsrand(QTime::currentTime().second());for (int i = 0; i < rowLabs.count(); ++i){QBarDataRow *dataRow = new QBarDataRow;for (int j = 0; j < 5; ++j){(*dataRow) << (qrand() % 10);}dataArray->append(dataRow);}series->dataProxy()->resetArray(dataArray);graph3D->addSeries(series);
}

在这里插入图片描述

(4)实现功能

void MainWindow::on_cboxCarmera_currentIndexChanged(int index)
{graph3D->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPreset(index));
}void MainWindow::on_hSliderLevel_valueChanged(int value)
{Q_UNUSED(value);int xRot = ui->hSliderLevel->value();int yRot = ui->hSliderVertical->value();int zoom = ui->hSliderScale->value();graph3D->scene()->activeCamera()->setCameraPosition(xRot, yRot, zoom);
}void MainWindow::on_hSliderVertical_valueChanged(int value)
{Q_UNUSED(value);int xRot = ui->hSliderLevel->value();int yRot = ui->hSliderVertical->value();int zoom = ui->hSliderScale->value();graph3D->scene()->activeCamera()->setCameraPosition(xRot, yRot, zoom);
}void MainWindow::on_hSliderScale_valueChanged(int value)
{Q_UNUSED(value);int xRot = ui->hSliderLevel->value();int yRot = ui->hSliderVertical->value();int zoom = ui->hSliderScale->value();graph3D->scene()->activeCamera()->setCameraPosition(xRot, yRot, zoom);
}void MainWindow::on_cboxTheme_currentIndexChanged(int index)
{graph3D->activeTheme()->setType(Q3DTheme::Theme(index));
}void MainWindow::on_cboxStyle_currentIndexChanged(int index)
{QBar3DSeries *series = graph3D->seriesList().at(0);series->setMesh(QAbstract3DSeries::Mesh(index));
}void MainWindow::on_cboxMode_currentIndexChanged(int index)
{graph3D->setSelectionMode(QAbstract3DGraph::SelectionFlags(index));
}void MainWindow::on_spinBoxFontSize_valueChanged(int arg1)
{QFont font = graph3D->activeTheme()->font();font.setPointSize(arg1);graph3D->activeTheme()->setFont(font);
}#include <QColorDialog>
void MainWindow::on_btnItemColor_clicked()
{QBar3DSeries *series = graph3D->seriesList().at(0);QColor color = series->baseColor();color = QColorDialog::getColor(color);if(color.isValid()){series->setBaseColor(color);}
}void MainWindow::on_checkBoxBack_clicked(bool checked)
{graph3D->activeTheme()->setBackgroundEnabled(checked);
}void MainWindow::on_checkBoxBackNetwork_clicked(bool checked)
{graph3D->activeTheme()->setGridEnabled(checked);
}void MainWindow::on_checkBoxSmooth_clicked(bool checked)
{QBar3DSeries *series = graph3D->seriesList().at(0);series->setMeshSmooth(checked);
}void MainWindow::on_checkBoxReflection_clicked(bool checked)
{graph3D->setReflection(checked);
}void MainWindow::on_checkBoxValueAxis_clicked(bool checked)
{graph3D->valueAxis()->setReversed(checked);
}void MainWindow::on_checkBoxItemLabel_clicked(bool checked)
{QBar3DSeries *series = graph3D->seriesList().at(0);series->setItemLabelVisible(checked);
}void MainWindow::on_checkBoxAxisBack_clicked(bool checked)
{graph3D->valueAxis()->setTitleVisible(checked);graph3D->rowAxis()->setTitleVisible(checked);graph3D->columnAxis()->setTitleVisible(checked);
}void MainWindow::on_checkBoxAxisLabelBack_clicked(bool checked)
{graph3D->activeTheme()->setLabelBackgroundEnabled(checked);
}

三、三维散点图

1、实现程序

在这里插入图片描述

(1)创建项目,基于QMainWindow

(2)实现功能

#include "mainwindow.h"
#include "ui_mainwindow.h"#include <QSplitter>MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow)
{ui->setupUi(this);QSplitter *splitter = new QSplitter(Qt::Horizontal);splitter->addWidget(ui->groupBox);initGraph3D();splitter->addWidget(createWindowContainer(graph3D));setCentralWidget(splitter);
}MainWindow::~MainWindow()
{delete ui;
}void MainWindow::initGraph3D()
{graph3D = new Q3DScatter;// 创建坐标系统graph3D->axisX()->setTitle("X轴");graph3D->axisX()->setTitleVisible(true);graph3D->axisY()->setTitle("Y轴");graph3D->axisY()->setTitleVisible(true);graph3D->axisZ()->setTitle("Z轴");graph3D->axisZ()->setTitleVisible(true);// 创建数据序列QScatterDataProxy *porxy = new QScatterDataProxy;QScatter3DSeries *series = new QScatter3DSeries(porxy);//    series->setMesh(QAbstract3DSeries::MeshCylinder); // 形状series->setItemLabelFormat("(@rowLabel,@colLabel):%.1f");series->setItemSize(0.2);graph3D->addSeries(series);// 添加数据int N = 41;QScatterDataArray *dataArray = new QScatterDataArray;dataArray->resize(N * N);QScatterDataItem *item = &dataArray->first();// 摩西跟草帽算法float x, y, z;x = -10;for (int i = 0; i < N; ++i){y = -10;for (int j = 1; j <= N; ++j){z = qSqrt(x * x + y * y);if(z != 0){z = 10 * qSin(z) / z;}else{z = 10;}// 图形库的坐标系item->setPosition(QVector3D(x, z, y));item++;y += 0.5;}x += 0.5;}series->dataProxy()->resetArray(dataArray);
}void MainWindow::on_cboxCarmera_currentIndexChanged(int index)
{graph3D->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPreset(index));
}void MainWindow::on_hSliderLevel_valueChanged(int value)
{Q_UNUSED(value);int xRot = ui->hSliderLevel->value();int yRot = ui->hSliderVertical->value();int zoom = ui->hSliderScale->value();graph3D->scene()->activeCamera()->setCameraPosition(xRot, yRot, zoom);
}void MainWindow::on_hSliderVertical_valueChanged(int value)
{Q_UNUSED(value);int xRot = ui->hSliderLevel->value();int yRot = ui->hSliderVertical->value();int zoom = ui->hSliderScale->value();graph3D->scene()->activeCamera()->setCameraPosition(xRot, yRot, zoom);
}void MainWindow::on_hSliderScale_valueChanged(int value)
{Q_UNUSED(value);int xRot = ui->hSliderLevel->value();int yRot = ui->hSliderVertical->value();int zoom = ui->hSliderScale->value();graph3D->scene()->activeCamera()->setCameraPosition(xRot, yRot, zoom);
}void MainWindow::on_cboxTheme_currentIndexChanged(int index)
{graph3D->activeTheme()->setType(Q3DTheme::Theme(index));
}void MainWindow::on_cboxStyle_currentIndexChanged(int index)
{QScatter3DSeries *series = graph3D->seriesList().at(0);series->setMesh(QAbstract3DSeries::Mesh(index));
}void MainWindow::on_cboxMode_currentIndexChanged(int index)
{graph3D->setSelectionMode(QAbstract3DGraph::SelectionFlags(index));
}void MainWindow::on_spinBoxFontSize_valueChanged(int arg1)
{QFont font = graph3D->activeTheme()->font();font.setPointSize(arg1);graph3D->activeTheme()->setFont(font);
}#include <QColorDialog>
void MainWindow::on_btnItemColor_clicked()
{QScatter3DSeries *series = graph3D->seriesList().at(0);QColor color = series->baseColor();color = QColorDialog::getColor(color);if(color.isValid()){series->setBaseColor(color);}
}void MainWindow::on_checkBoxBack_clicked(bool checked)
{graph3D->activeTheme()->setBackgroundEnabled(checked);
}void MainWindow::on_checkBoxBackNetwork_clicked(bool checked)
{graph3D->activeTheme()->setGridEnabled(checked);
}void MainWindow::on_checkBoxSmooth_clicked(bool checked)
{QScatter3DSeries *series = graph3D->seriesList().at(0);series->setMeshSmooth(checked);
}void MainWindow::on_checkBoxReflection_clicked(bool checked)
{graph3D->setReflection(checked);
}void MainWindow::on_checkBoxValueAxis_clicked(bool checked)
{graph3D->axisY()->setReversed(checked);
}void MainWindow::on_checkBoxItemLabel_clicked(bool checked)
{QScatter3DSeries *series = graph3D->seriesList().at(0);series->setItemLabelVisible(checked);
}void MainWindow::on_checkBoxAxisBack_clicked(bool checked)
{graph3D->axisY()->setTitleVisible(checked);graph3D->axisX()->setTitleVisible(checked);graph3D->axisZ()->setTitleVisible(checked);
}void MainWindow::on_checkBoxAxisLabelBack_clicked(bool checked)
{graph3D->activeTheme()->setLabelBackgroundEnabled(checked);
}

四、三维曲面图

1、实现程序

在这里插入图片描述

(1)创建项目,基于QMainWindow

(2)添加组件

在这里插入图片描述

(3)初始化

MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow)
{ui->setupUi(this);QSplitter *splitter = new QSplitter;splitter->addWidget(ui->groupBox);init3DGraph();splitter->addWidget(createWindowContainer(graph3D));setCentralWidget(splitter);// 设置按钮的渐变色QLinearGradient lgColor1(0, 0, 100, 0);lgColor1.setColorAt(1.0, Qt::black);lgColor1.setColorAt(0.67, Qt::blue);lgColor1.setColorAt(0.33, Qt::red);lgColor1.setColorAt(0, Qt::yellow);QPixmap mp(160, 20);QPainter painter(&mp);painter.setBrush(lgColor1);painter.drawRect(0, 0, 160, 20);ui->btnColors1->setIcon(QIcon(mp));ui->btnColors1->setIconSize(QSize(160, 20));lgColor1.setColorAt(1.0, Qt::darkBlue);lgColor1.setColorAt(0.5, Qt::yellow);lgColor1.setColorAt(0.2, Qt::red);lgColor1.setColorAt(0, Qt::darkRed);painter.setBrush(lgColor1);painter.drawRect(0, 0, 160, 20);ui->btnColors2->setIcon(QIcon(mp));ui->btnColors2->setIconSize(QSize(160, 20));
}MainWindow::~MainWindow()
{delete ui;
}void MainWindow::init3DGraph()
{graph3D = new Q3DSurface;graph3D->axisX()->setTitle("X轴");graph3D->axisX()->setTitleVisible(true);graph3D->axisX()->setRange(-11, 11);graph3D->axisY()->setTitle("Y轴");graph3D->axisY()->setTitleVisible(true);graph3D->axisZ()->setTitle("Z轴");graph3D->axisZ()->setTitleVisible(true);graph3D->axisZ()->setRange(-11, 11);QSurfaceDataProxy *proxy = new QSurfaceDataProxy;series = new QSurface3DSeries(proxy);series->setDrawMode(QSurface3DSeries::DrawSurface);series->setMeshSmooth(true); // 光滑曲面graph3D->addSeries(series);QSurfaceDataArray *dataArray = new QSurfaceDataArray;// 摩西跟草帽算法int N = 41;dataArray->reserve(N);float x, y, z;x = -10;for (int i = 0; i < N; ++i){QSurfaceDataRow *newRow = new QSurfaceDataRow(N);y = -10;int index = 0;for (int j = 1; j <= N; ++j){z = qSqrt(x * x + y * y);if(z != 0){z = 10 * qSin(z) / z;}else{z = 10;}// 图形库的坐标系(*newRow)[index++].setPosition(QVector3D(x, z, y));y += 0.5;}x += 0.5;*dataArray << newRow;}series->dataProxy()->resetArray(dataArray);}

(4)设置颜色

#include <QColorDialog>
void MainWindow::on_btnOneColor_clicked()
{QColor color = series->baseColor();color = QColorDialog::getColor(color);if(color.isValid()){series->setBaseColor(color);series->setColorStyle(Q3DTheme::ColorStyleUniform);}
}void MainWindow::on_btnColors1_clicked()
{QLinearGradient lgColor1(0, 0, 100, 0);lgColor1.setColorAt(1.0, Qt::black);lgColor1.setColorAt(0.67, Qt::blue);lgColor1.setColorAt(0.33, Qt::red);lgColor1.setColorAt(0, Qt::yellow);series->setBaseGradient(lgColor1);series->setColorStyle(Q3DTheme::ColorStyleRangeGradient); //设置渐变色
}void MainWindow::on_btnColors2_clicked()
{QLinearGradient lgColor1(0, 0, 100, 0);lgColor1.setColorAt(1.0, Qt::darkBlue);lgColor1.setColorAt(0.5, Qt::yellow);lgColor1.setColorAt(0.2, Qt::red);lgColor1.setColorAt(0, Qt::darkRed);series->setBaseGradient(lgColor1);series->setColorStyle(Q3DTheme::ColorStyleRangeGradient);
}

五、三维地形图

1、实现程序

在这里插入图片描述

(1)拷贝上一个项目

(2)添加图片资源文件

(3)实现功能

#include "mainwindow.h"
#include "ui_mainwindow.h"#include <QSplitter>MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow)
{ui->setupUi(this);QSplitter *splitter = new QSplitter;splitter->addWidget(ui->groupBox);init3DGraph();splitter->addWidget(createWindowContainer(graph3D));setCentralWidget(splitter);// 设置按钮的渐变色QLinearGradient lgColor1(0, 0, 100, 0);lgColor1.setColorAt(1.0, Qt::black);lgColor1.setColorAt(0.67, Qt::blue);lgColor1.setColorAt(0.33, Qt::red);lgColor1.setColorAt(0, Qt::yellow);QPixmap mp(160, 20);QPainter painter(&mp);painter.setBrush(lgColor1);painter.drawRect(0, 0, 160, 20);ui->btnColors1->setIcon(QIcon(mp));ui->btnColors1->setIconSize(QSize(160, 20));lgColor1.setColorAt(1.0, Qt::darkBlue);lgColor1.setColorAt(0.5, Qt::yellow);lgColor1.setColorAt(0.2, Qt::red);lgColor1.setColorAt(0, Qt::darkRed);painter.setBrush(lgColor1);painter.drawRect(0, 0, 160, 20);ui->btnColors2->setIcon(QIcon(mp));ui->btnColors2->setIconSize(QSize(160, 20));
}MainWindow::~MainWindow()
{delete ui;
}void MainWindow::init3DGraph()
{graph3D = new Q3DSurface;graph3D->axisX()->setTitle("东--西");graph3D->axisX()->setTitleVisible(true);graph3D->axisX()->setLabelFormat("%.2f米");graph3D->axisZ()->setTitle("南--北");graph3D->axisZ()->setTitleVisible(true);graph3D->axisY()->setTitle("海拔");graph3D->axisY()->setTitleVisible(true);QImage mapImage(":/images/images/map.png");QHeightMapSurfaceDataProxy *proxy = new QHeightMapSurfaceDataProxy(mapImage);proxy->setValueRanges(-5000, 5000, -5000, 5000);series = new QSurface3DSeries(proxy);series->setDrawMode(QSurface3DSeries::DrawSurface);graph3D->addSeries(series);
}void MainWindow::on_cboxSurfaceStyle_currentIndexChanged(int index)
{series->setDrawMode(QSurface3DSeries::DrawFlags(index + 1));
}#include <QColorDialog>
void MainWindow::on_btnOneColor_clicked()
{QColor color = series->baseColor();color = QColorDialog::getColor(color);if(color.isValid()){series->setBaseColor(color);series->setColorStyle(Q3DTheme::ColorStyleUniform);}
}void MainWindow::on_btnColors1_clicked()
{QLinearGradient lgColor1(0, 0, 100, 0);lgColor1.setColorAt(1.0, Qt::black);lgColor1.setColorAt(0.67, Qt::blue);lgColor1.setColorAt(0.33, Qt::red);lgColor1.setColorAt(0, Qt::yellow);series->setBaseGradient(lgColor1);series->setColorStyle(Q3DTheme::ColorStyleRangeGradient); //设置渐变色
}void MainWindow::on_btnColors2_clicked()
{QLinearGradient lgColor1(0, 0, 100, 0);lgColor1.setColorAt(1.0, Qt::darkBlue);lgColor1.setColorAt(0.5, Qt::yellow);lgColor1.setColorAt(0.2, Qt::red);lgColor1.setColorAt(0, Qt::darkRed);series->setBaseGradient(lgColor1);series->setColorStyle(Q3DTheme::ColorStyleRangeGradient);
}void MainWindow::on_cboxMode_currentIndexChanged(int index)
{switch (index){case 0:graph3D->setSelectionMode(QAbstract3DGraph::SelectionNone);break;case 1:graph3D->setSelectionMode(QAbstract3DGraph::SelectionItem);break;case 2:graph3D->setSelectionMode(QAbstract3DGraph::SelectionRow |QAbstract3DGraph::SelectionSlice);break;case 3:graph3D->setSelectionMode(QAbstract3DGraph::SelectionColumn |QAbstract3DGraph::SelectionSlice);break;default:break;}
}

相关文章:

十、Qt三维图表

一、Data Visualization模块概述 Data Visualization的三维显示功能主要有三种三维图形来实现&#xff0c;三各类的父类都是QAbstract3DGraph&#xff0c;从QWindow继承而来。这三类分别是&#xff1a;三维柱状图Q3DBar三维空间散点Q3DScatter三维曲面Q3DSurface 1、相关类的…...

CMake官方教程中文翻译 Step 6: Adding Support for a Testing Dashboard

鉴于自己破烂的英语&#xff0c;所以把cmake的官方文档用 谷歌翻译 翻译下来方便查看。 英语好的同学建议直接去看cmake官方文档&#xff08;英文&#xff09;学习&#xff1a;地址 点这里 或复制&#xff1a;https://cmake.org/cmake/help/latest/guide/tutorial/index.html …...

【leetcode】完全背包总结

本文内容参考了代码随想录&#xff0c;并进行了自己的总结。 完全背包 关键点 ● 每件物品有若干种状态&#xff1a;不选、选 1 件、选 2 件、…、选 n 件 代码 在代码上&#xff0c;只有重量的遍历方向和 01 背包不一样&#xff1a; for(int i 0; i < nums.length; i…...

【Linux】理解系统中一个被打开的文件

文件系统 前言一、C语言文件接口二、系统文件接口三、文件描述符四、struct file 对象五、stdin、stdout、stderr六、文件描述符的分配规则七、重定向1. 重定向的原理2. dup23. 重谈 stderr 八、缓冲区1. 缓冲区基础2. 深入理解缓冲区3. 用户缓冲区和内核缓冲区4. FILE 前言 首…...

k8s kubeadm部署安装详解

目录 kubeadm部署流程简述 环境准备 步骤简述 关闭 防火墙规则、selinux、swap交换 修改主机名 配置节点之间的主机名解析 调整内核参数 所有节点安装docker 安装依赖组件 配置Docker 所有节点安装kubeadm&#xff0c;kubelet和kubectl 定义kubernetes源并指定版本…...

RT-DETR算法优化改进: 下采样系列 | 一种新颖的基于 Haar 小波的下采样HWD,有效涨点系列

💡💡💡本文独家改进:HWD的核心思想是应用Haar小波变换来降低特征图的空间分辨率,同时保留尽可能多的信息,与传统的下采样方法相比,有效降低信息不确定性。 💡💡💡使用方法:代替原始网络的conv,下采样过程中尽可能包括更多信息,从而提升检测精度。 RT-DET…...

CocosCreator3.8源码分析

Cocos Creator架构 Cocos Creator 拥有两套引擎内核&#xff0c;C 内核 和 TypeScript 内核。C 内核用于原生平台&#xff0c;TypeScript 内核用于 Web 和小游戏平台。 在引擎内核之上&#xff0c;是用 TypeScript 编写的引擎框架层&#xff0c;用以统一两套内核的差异&#xf…...

(已解决)spingboot 后端发送QQ邮箱验证码

打开QQ邮箱pop3请求服务&#xff1a;&#xff08;按照QQ邮箱引导操作&#xff09; 导入依赖&#xff08;不是maven项目就自己添加jar包&#xff09;&#xff1a; <!-- 邮件发送--><dependency><groupId>org.springframework.boot</groupId><…...

【蓝桥杯冲冲冲】[NOIP2001 普及组] 装箱问题

蓝桥杯备赛 | 洛谷做题打卡day26 文章目录 蓝桥杯备赛 | 洛谷做题打卡day26题目描述输入格式输出格式样例 #1样例输入 #1样例输出 #1 提示思路 题解代码我的一些话 [NOIP2001 普及组] 装箱问题 题目描述 有一个箱子容量为 V V V&#xff0c;同时有 n n n 个物品&#xff0c;每…...

2024牛客寒假算法基础集训营1

文章目录 A DFS搜索M牛客老粉才知道的秘密G why外卖E 本题又主要考察了贪心B 关鸡C 按闹分配 今天的牛客&#xff0c;说是都是基础题&#xff0c;头昏昏的&#xff0c;感觉真不会写&#xff0c;只能赛后补题了 A DFS搜索 写的时候刚开始以为还是比较难的&#xff0c;和dfs有关…...

元素的显示与隐藏,精灵图,字体图标,CSSC三角

元素的显示与隐藏 类似网站广告&#xff0c;当我们点击关闭就不见了&#xff0c;但是我们重新刷新页面&#xff0c;会重新出现 本质&#xff1a;让元素在页面中隐藏或者显示出来。 1.display显示隐藏 2.visibility显示隐藏 3.overflow溢出显示隐藏 1.display属性&#xff08;…...

最新!2024顶级SCI优化!TTAO-CNN-BiGRU-MSA三角拓扑聚合优化、双向GRU融合注意力的多变量回归预测程序!

适用平台&#xff1a;Matlab 2023版及以上 TTOA三角聚合优化算法&#xff0c;将在2024年3月正式发表在中科院1区顶级SCI期刊《Expert Systems with Applications》上。 该算法提出时间极短&#xff0c;目前以及近期内不会有套用这个算法的文献。新年伊始&#xff0c;尽快拿下…...

Flink SQL Client 安装各类 Connector、组件的方法汇总(持续更新中....)

一般来说&#xff0c;在 Flink SQL Client 中使用各种 Connector 只需要该 Connector 及其依赖 Jar 包部署到 ${FLINK_HOME}/lib 下即可。但是对于某些特定的平台&#xff0c;如果 AWS EMR、Cloudera CDP 等产品会有所不同&#xff0c;主要是它们中的某些 Jar 包可能被改写过&a…...

React18-模拟列表数据实现基础表格功能

文章目录 分页功能分页组件有两种接口参数分页类型用户列表参数类型 模拟列表数据分页触发方式实现目录 分页功能 分页组件有两种 table组件自带分页 <TableborderedrowKey"userId"rowSelection{{ type: checkbox }}pagination{{position: [bottomRight],pageSi…...

MySQL查询数据(十)

MySQL查询数据&#xff08;十&#xff09; 一、SELECT基本查询 1.1 SELECT语句的功能 SELECT 语句从数据库中返回信息。使用一个 SELECT 语句&#xff0c;可以做下面的事&#xff1a; **列选择&#xff1a;**能够使用 SELECT 语句的列选择功能选择表中的列&#xff0c;这些…...

AJAX-常用请求方法和数据提交

常用请求方法 请求方法&#xff1a;对服务器资源&#xff0c;要执行的操作 axios请求配置 url&#xff1a;请求的URL网址 method&#xff1a;请求的方法&#xff0c;如果是GET可以省略&#xff1b;不用区分大小写 data&#xff1a;提交数据 axios({url:目标资源地址,method…...

2024美国大学生数学建模竞赛美赛B题matlab代码解析

2024美赛B题Searching for Submersibles搜索潜水器 因为一些不可抗力&#xff0c;下面仅展示部分代码&#xff08;很少部分部分&#xff09;和部分分析过程&#xff0c;其余代码看文末 Dthxlsread(C:\Users\Lenovo\Desktop\Ionian.xlsx); DpDth(:,3:5); dy0.0042; dx0.0042; …...

【DouYing Desktop】

I) JD 全日制大专及以上学历&#xff1b; 2. 3年以上的IT服务支持相关工作经验 3. 有较强的桌面相关trouble shooting与故障解决能力&#xff0c;能够独立应对各类型桌面问题&#xff1b; 4. 具备基础的网络、系统知识&#xff0c;能够独立解决常见的网络、系统等问题&#xf…...

正则表达式与文本处理工具

目录 引言 一、正则表达式基础 &#xff08;一&#xff09;字符匹配 1.基本字符 2.特殊字符 3.量词 4.边界匹配 &#xff08;二&#xff09;进阶用法 1.组与引用 2.选择 二、命令之-----grep &#xff08;一&#xff09;基础用法 &#xff08;二&#xff09;高级用…...

IDEA中的Run Dashboard

Run Dashboard是IntelliJ IDEA中的工具【也就是View中的Services】&#xff0c;提供一个可视化界面&#xff0c;用于管理控制应用程序的运行和调试过程。 在Run DashBoard中&#xff0c;可以看到所有的运行配置&#xff0c;以及每个配置的运行状态&#xff08;正在运行&#xf…...

RestClient

什么是RestClient RestClient 是 Elasticsearch 官方提供的 Java 低级 REST 客户端&#xff0c;它允许HTTP与Elasticsearch 集群通信&#xff0c;而无需处理 JSON 序列化/反序列化等底层细节。它是 Elasticsearch Java API 客户端的基础。 RestClient 主要特点 轻量级&#xff…...

Qt/C++开发监控GB28181系统/取流协议/同时支持udp/tcp被动/tcp主动

一、前言说明 在2011版本的gb28181协议中&#xff0c;拉取视频流只要求udp方式&#xff0c;从2016开始要求新增支持tcp被动和tcp主动两种方式&#xff0c;udp理论上会丢包的&#xff0c;所以实际使用过程可能会出现画面花屏的情况&#xff0c;而tcp肯定不丢包&#xff0c;起码…...

2025年能源电力系统与流体力学国际会议 (EPSFD 2025)

2025年能源电力系统与流体力学国际会议&#xff08;EPSFD 2025&#xff09;将于本年度在美丽的杭州盛大召开。作为全球能源、电力系统以及流体力学领域的顶级盛会&#xff0c;EPSFD 2025旨在为来自世界各地的科学家、工程师和研究人员提供一个展示最新研究成果、分享实践经验及…...

uni-app学习笔记二十二---使用vite.config.js全局导入常用依赖

在前面的练习中&#xff0c;每个页面需要使用ref&#xff0c;onShow等生命周期钩子函数时都需要像下面这样导入 import {onMounted, ref} from "vue" 如果不想每个页面都导入&#xff0c;需要使用node.js命令npm安装unplugin-auto-import npm install unplugin-au…...

【Redis技术进阶之路】「原理分析系列开篇」分析客户端和服务端网络诵信交互实现(服务端执行命令请求的过程 - 初始化服务器)

服务端执行命令请求的过程 【专栏简介】【技术大纲】【专栏目标】【目标人群】1. Redis爱好者与社区成员2. 后端开发和系统架构师3. 计算机专业的本科生及研究生 初始化服务器1. 初始化服务器状态结构初始化RedisServer变量 2. 加载相关系统配置和用户配置参数定制化配置参数案…...

定时器任务——若依源码分析

分析util包下面的工具类schedule utils&#xff1a; ScheduleUtils 是若依中用于与 Quartz 框架交互的工具类&#xff0c;封装了定时任务的 创建、更新、暂停、删除等核心逻辑。 createScheduleJob createScheduleJob 用于将任务注册到 Quartz&#xff0c;先构建任务的 JobD…...

镜像里切换为普通用户

如果你登录远程虚拟机默认就是 root 用户&#xff0c;但你不希望用 root 权限运行 ns-3&#xff08;这是对的&#xff0c;ns3 工具会拒绝 root&#xff09;&#xff0c;你可以按以下方法创建一个 非 root 用户账号 并切换到它运行 ns-3。 一次性解决方案&#xff1a;创建非 roo…...

苍穹外卖--缓存菜品

1.问题说明 用户端小程序展示的菜品数据都是通过查询数据库获得&#xff0c;如果用户端访问量比较大&#xff0c;数据库访问压力随之增大 2.实现思路 通过Redis来缓存菜品数据&#xff0c;减少数据库查询操作。 缓存逻辑分析&#xff1a; ①每个分类下的菜品保持一份缓存数据…...

DIY|Mac 搭建 ESP-IDF 开发环境及编译小智 AI

前一阵子在百度 AI 开发者大会上&#xff0c;看到基于小智 AI DIY 玩具的演示&#xff0c;感觉有点意思&#xff0c;想着自己也来试试。 如果只是想烧录现成的固件&#xff0c;乐鑫官方除了提供了 Windows 版本的 Flash 下载工具 之外&#xff0c;还提供了基于网页版的 ESP LA…...

相机从app启动流程

一、流程框架图 二、具体流程分析 1、得到cameralist和对应的静态信息 目录如下: 重点代码分析: 启动相机前,先要通过getCameraIdList获取camera的个数以及id,然后可以通过getCameraCharacteristics获取对应id camera的capabilities(静态信息)进行一些openCamera前的…...