十、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;}
}

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

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

相关文章

QSqlRelationalTableModel 关系表格模型

一、 1.1 QSqlRelationalTableModel继承自QSqlTableModel&#xff0c;并且对其进行了扩展&#xff0c;提供了对外键的支持。一个外键就是一个表中的一个字段 和 其他表中的主键字段之间的一对一的映射。例如&#xff0c;“studInfo”表中的departID字段对应的是“departments…

计算机视觉-PCV包、Vlfeat库、Graphviz库的下载安装配置及问题解决(使用anaconda3 python 3.8.5)

目录 一、PCV包配置 二、Vlfeat配置 三、在PCV包的sift.py文件中对路径进行修改 四、以上步骤所需注意的错误 五、Graphviz配置 一、PCV包配置 1.下载PCV包,点开网址直接下载安装包(不用解压),下载之后将安装包放在任意目录位置https://codeload.github.com/Li-Shu14…

wasm 在web中最小胶水代码; 报错Imports argument must be present and must be an object

加载和运行 WebAssembly 代码 我试过了没成功&#xff0c;代码裁剪有点严重 加载WebAssembly的两个新的API 新的 WebAssembly.compileStreaming/WebAssembly.instantiateStreaming 方法更加高效——它们直接在来自网络的原始字节流上执行操作&#xff0c;省去了 ArrayBuffer 步…

网络原理TCP/IP(2)

文章目录 TCP协议确认应答超时重传连接管理断开连接 TCP协议 TCP全称为"传输控制协议(Transmission Control Protocol").⼈如其名,要对数据的传输进⾏⼀个详细 的控制; TCP协议段格式 • 源/目的端口号:表⽰数据是从哪个进程来,到哪个进程去; • 32位序号/32位确认…

ClickHouse基于数据分析常用函数

文章标题 一、WITH语法-定义变量1.1 定义变量1.2 调用函数1.3 子查询 二、GROUP BY子句&#xff08;结合WITH ROLLUP、CUBE、TOTALS&#xff09;三、FORM语法3.1表函数3.1.1 file3.1.2 numbers3.1.3 mysql3.1.4 hdfs 四、ARRAY JOIN语法&#xff08;区别于arrayJoin(arr)函数&a…

12个RAG常见痛点及解决方案

Barnett等人的论文《Seven Failure Points When Engineering a Retrieval Augmented Generation System》介绍了RAG的七个痛点&#xff0c;我们将其延申扩展再补充开发RAG流程中常遇到的另外五个常见问题。并且将深入研究这些RAG痛点的解决方案&#xff0c;这样我们能够更好地在…

导出pdf 加密、加水印、加页脚

1.依赖 <dependency> <groupId>com.itextpdf</groupId> <artifactId>itextpdf</artifactId> <version>5.5.10</version> </dependency> <dependency> …

cnpm : 无法加载文件 C:\Users\xxx\AppData\Roaming\npm\cnpm.ps1

cnpm命令被禁止使用 我已经安装cnpm &#xff0c;但是使用不了&#xff0c;重新安装也没用。 报错如下图&#xff1a; cnpm无法使用报错 解决问题 1、打开系统Windows PowerShell,使用管理员身份运行。 打开Windows PowerShell 2、输入set-ExecutionPolicy RemoteSigned&a…

第三篇:跨平台QT开发-元对象系统

元对象系统 元对象系统是一个基于 标准 C的扩展 &#xff0c;为 Qt 提供了信号与槽机制、实时类型信息,动态属性系统 元对象系统的三个基本条件&#xff1a;类必须继承自 QObject、类声明 Q_OBJECT 宏&#xff08;默认私有 有&#xff09;、元对象编译器 moc。 class ExamDia…

Matplotlib雷达图教程:学会绘制炫酷多彩的多维数据可视化【第53篇—python:Seaborn大全】

文章目录 Matplotlib雷达图绘制指南&#xff1a;炫酷雷达图参数解析与实战1. 普通雷达图2. 堆叠雷达图3. 多个雷达图4. 矩阵雷达图5. 极坐标雷达图6. 定制化雷达图外观7. 调整雷达图坐标轴范围8. 雷达图的子图布局9. 导出雷达图总结 Matplotlib雷达图绘制指南&#xff1a;炫酷雷…

在flutter中集成Excel导入和导出

flutter中集成Excel导入和导出功能 1、需要的依赖 在pubspec.yaml #excel导出syncfusion_flutter_xlsio: ^24.1.45open_file: ^3.0.1#导入excelflutter_excel: ^1.0.1#选择文件的依赖file_picker: ^6.1.1&#xff08;1&#xff09;依赖说明 在测试时&#xff0c;我们在使用导…

spring问题点

1.事务 1.1.事务传播 同一个类中 事务A调非事务B B抛异常 AB事务生效&#xff08;具有传播性&#xff09; 同一个类中 事务A调非事务B A抛异常 AB事务生效 也就是主方法加了事务注解 则方法内调用的其他本类方法无需加事务注解&#xff0c; 发生异常时可以保证事务的回滚 最常…

Docker极速入门掌握基本概念和用法

1、Docker概念 1.1什么是docker Docker是一个快速交付应用、运行应用的技术&#xff0c;具备以下优势 可将程序及其依赖、运行环境一起打包为一个镜像&#xff0c;可以迁移到任意Linux操作系统运行时利用沙箱机制形成隔离容器&#xff0c;各个应用互不干扰启动、移除都可以通…

【PTA浙大版《C语言程序设计(第4版)》编程题】练习7-4 找出不是两个数组共有的元素(附测试点)

目录 输入格式: 输出格式: 输入样例: 输出样例: 代码呈现 测试点 给定两个整型数组&#xff0c;本题要求找出不是两者共有的元素。 输入格式: 输入分别在两行中给出两个整型数组&#xff0c;每行先给出正整数N&#xff08;≤20&#xff09;&#xff0c;随后是N个整数&a…

小鱼深度产品测评之:阿里云一键部署幻兽帕鲁,真正1分钟部署,3分钟进入游戏,无限畅玩,双倍快乐。

阿里云一键部署幻兽帕鲁 一、 引言二、 部署过程2.1 进入游戏联机服务专题页2.2 服务购买2.3 服务创建 三、游戏体验3.1 进入Palword3.2 游戏体验3.3 服务器更新3.4 定时备份存档 三、 总结3.1 部署体验3.2 游戏体验 一、 引言 首先。感谢阿里云的运营小姐姐定邀我来参与这次幻…

机器学习 | 如何构建自己的决策树算法?

决策树思想的来源非常朴素&#xff0c;程序设计中的条件分支结构就是if-else结构&#xff0c;最早的决策树就是利用这类结构分割数据的一种分类学习方法 目录 初识决策树 决策树原理 cart剪枝 特征提取 泰坦尼克号乘客生存预测(实操) 回归决策树 初识决策树 决策树是一种…

idea 中 tomcat 乱码问题修复

之前是修改 Tomcat 目录下 conf/logging.properties 的配置&#xff0c;将 UTF-8 修改为 GBK&#xff0c;现在发现不用这样修改了。只需要修改 IDEA 中 Tomcat 的配置就可以了。 修改IDEA中Tomcat的配置&#xff1a;添加-Dfile.encodingUTF-8 本文结束

嵌入式软件中常见的 8 种数据结构

数据结构是一种特殊的组织和存储数据的方式&#xff0c;可以使我们可以更高效地对存储的数据执行操作。数据结构在计算机科学和软件工程领域具有广泛而多样的用途。 几乎所有已开发的程序或软件系统都使用数据结构。此外&#xff0c;数据结构属于计算机科学和软件工程的基础。当…

pytorch创建tensor

目录 1. 从numpy创建2. 从list创建3. 创建未初始化tensor4. 设置默认tensor创建类型5. rand/rand_like, randint6. randn生成正态分布随机数7. full8. arange/range9. linspace/logspace10. Ones/zeros/eye11. randperm 1. 从numpy创建 2. 从list创建 3. 创建未初始化tensor T…

【iOS ARKit】2D肢体动作捕捉

人体肢体动作捕捉在动漫影视制作、游戏CG 动画、实时模型驱动中有着广泛的应用&#xff0c;利用 ARKit&#xff0c;无须额外的硬件设备即可实现 2D和3D人体一系列关节和骨骼的动态捕捉&#xff0c;由于移动AR 的便携性及低成本&#xff0c;必将促进相关产业的发展。 ARBody Tr…