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

Echars3D 饼图开发

关于vue echart3D 饼图开发

首先要先下载  "echarts-gl", 放在main.js

npm install echarts-gl --save

<template><div class="cointan"><!-- 3d环形图 --><div class="chart" id="cityGreenLand-charts"></div></div></template><script>export default {name: 'rightCenter',props: {msg: String},data() {return {optionData: [{name: '已用空间',height: 5,value: 20,pieValue: 0,itemStyle: {color: '#00D7E9',opacity: 0.6}}, {name: '可用空间',height: 10,value: 12,pieValue: 0,itemStyle: {color: '#FFDE03',opacity: 0.8}}],totalNum:0,//年级总获奖人数}},mounted(){this.getJiang()},methods:{//各年级获奖人数getJiang() {this.$nextTick(function() {this.init();});},init() {//构建3d饼状图let myChart = this.$echarts.init(document.getElementById('cityGreenLand-charts'));// 传入数据生成 optionthis.option = this.getPie3D(this.optionData, 0);myChart.setOption(this.option);//是否需要label指引线,如果要就添加一个透明的2d饼状图并调整角度使得labelLine和3d的饼状图对齐,并再次setOption// this.option.series.push({//   name: 'pie2d',//   type: 'pie',//   labelLine:{//     length:0,//     length2:0//   },//   startAngle: -20 , //起始角度,支持范围[0, 360]。//   clockwise: false,//饼图的扇区是否是顺时针排布。上述这两项配置主要是为了对齐3d的样式//   radius: ['30%', '60%'],//   center: ['10%', '50%'],//没用//   data: this.optionData,//   itemStyle:{//     opacity:0//   }// });myChart.setOption(this.option);this.bindListen(myChart);},getPie3D(pieData, internalDiameterRatio) {//internalDiameterRatio:透明的空心占比let that = this;let series = [];let sumValue = 0;let startValue = 0;let endValue = 0;let legendData = [];let legendBfb = [];let k = 1 - internalDiameterRatio;pieData.sort((a, b) => {return (b.value - a.value);});// 为每一个饼图数据,生成一个 series-surface 配置for (let i = 0; i < pieData.length; i++) {sumValue += pieData[i].value;let seriesItem = {name: typeof pieData[i].name === 'undefined' ? `series${i}` : pieData[i].name,value: typeof pieData[i].value === 'undefined' ? `series${i}` : pieData[i].value,pieValue: typeof pieData[i].pieValue === 'undefined' ? `series${i}` : pieData[i].pieValue,height: 10 * (i),type: 'surface',parametric: true,wireframe: {show: false},pieData: pieData[i],pieStatus: {selected: false,hovered: false,k: k},// radius: ['50%', '80%'],// center: ['30%', '50%']};if (typeof pieData[i].itemStyle != 'undefined') {let itemStyle = {};typeof pieData[i].itemStyle.color != 'undefined' ? itemStyle.color = pieData[i].itemStyle.color : null;typeof pieData[i].itemStyle.opacity != 'undefined' ? itemStyle.opacity = pieData[i].itemStyle.opacity : null;seriesItem.itemStyle = itemStyle;}series.push(seriesItem);}// 使用上一次遍历时,计算出的数据和 sumValue,调用 getParametricEquation 函数,// 向每个 series-surface 传入不同的参数方程 series-surface.parametricEquation,也就是实现每一个扇形。legendData = [];legendBfb = [];for (let i = 0; i < series.length; i++) {endValue = startValue + series[i].pieData.value;series[i].pieData.startRatio = startValue / sumValue;series[i].pieData.endRatio = endValue / sumValue;series[i].parametricEquation = this.getParametricEquation(series[i].pieData.startRatio, series[i].pieData.endRatio,false, false, k, series[i].pieData.value);startValue = endValue;let bfb = that.fomatFloat(series[i].pieData.value / sumValue, 4);legendData.push({name: series[i].name,value: bfb,});legendBfb.push({name: series[i].name,value: bfb,value:series[i].value,});}let boxHeight = this.getHeight3D(series, 3);//通过传参设定3d饼/环的高度,26代表26px// 准备待返回的配置项,把准备好的 legendData、series 传入。let option = {//   legend: {//     data: legendData,//     orient: 'scroll',//     right: 10,//     top: 10,//     itemGap: 10,//     textStyle: {//       color: '#A1E2FF',//     },//     icon:'roundRect',//图形样式//     show: true,//     formatter: function(param) {//       let item = legendBfb.filter(item => item.name == param)[0];//       // let bfs = that.fomatFloat(item.value * 100, 2) + "%";//       return `${item.name}  ${item.value}`;//     }//   },labelLine: {show: true,lineStyle: {color: '#7BC0CB'}},tooltip: {formatter: params => {if (params.seriesName !== 'mouseoutSeries' && params.seriesName !== 'pie2d') {// let bfb = ((option.series[params.seriesIndex].pieData.endRatio - option.series[params.seriesIndex].pieData.startRatio) *//   100).toFixed(2);let bfb = option.series[params.seriesIndex].pieValuereturn `${params.seriesName}<br/>` +`<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${params.color};"></span>` +`${ bfb }G`;}}},xAxis3D: {min: -1,max: 1},yAxis3D: {min: -1,max: 1},zAxis3D: {min: -1,max: 1},grid3D: {show: false,boxHeight: boxHeight, //圆环的高度// innerWidth:'100%',top:'-30%',//3d图位置left:'-10%',//3d图位置height:300,//3d图大小viewControl: { //3d效果可以放大、旋转等,请自己去查看官方配置alpha: 30, //角度distance: 400,//调整视角到主体的距离,类似调整zoomrotateSensitivity: 0, //设置为0无法旋转zoomSensitivity: 0, //设置为0无法缩放panSensitivity: 0, //设置为0无法平移autoRotate: false //自动旋转}},series: series,};return option;},//获取3d丙图的最高扇区的高度getHeight3D(series, height) {series.sort((a, b) => {return (b.pieData.value - a.pieData.value);})return height * 30 / series[0].pieData.value;},// 生成扇形的曲面参数方程,用于 series-surface.parametricEquation// h 高度getParametricEquation(startRatio, endRatio, isSelected, isHovered, k, h) {// 计算let midRatio = (startRatio + endRatio) / 2;let startRadian = startRatio * Math.PI * 2;let endRadian = endRatio * Math.PI * 2;let midRadian = midRatio * Math.PI * 2;// 如果只有一个扇形,则不实现选中效果。if (startRatio === 0 && endRatio === 1) {isSelected = false;}// 通过扇形内径/外径的值,换算出辅助参数 k(默认值 1/3)k = typeof k !== 'undefined' ? k : 1 / 3;// 计算选中效果分别在 x 轴、y 轴方向上的位移(未选中,则位移均为 0)let offsetX = isSelected ? Math.cos(midRadian) * 0.1 : 0;let offsetY = isSelected ? Math.sin(midRadian) * 0.1 : 0;// 计算高亮效果的放大比例(未高亮,则比例为 1)let hoverRate = isHovered ? 1.05 : 1;// 返回曲面参数方程return {u: {min: -Math.PI,max: Math.PI * 3,step: Math.PI / 32},v: {min: 0,max: Math.PI * 2,step: Math.PI / 20},x: function(u, v) {if (u < startRadian) {return offsetX + Math.cos(startRadian) * (1 + Math.cos(v) * k) * hoverRate;}if (u > endRadian) {return offsetX + Math.cos(endRadian) * (1 + Math.cos(v) * k) * hoverRate;}return offsetX + Math.cos(u) * (1 + Math.cos(v) * k) * hoverRate;},y: function(u, v) {if (u < startRadian) {return offsetY + Math.sin(startRadian) * (1 + Math.cos(v) * k) * hoverRate;}if (u > endRadian) {return offsetY + Math.sin(endRadian) * (1 + Math.cos(v) * k) * hoverRate;}return offsetY + Math.sin(u) * (1 + Math.cos(v) * k) * hoverRate;},z: function(u, v) {if (u < -Math.PI * 0.5) {return Math.sin(u);}if (u > Math.PI * 2.5) {return Math.sin(u) * h * .1;}return Math.sin(v) > 0 ? 1 * h * .5 : -1;}};},fomatFloat(num, n) {var f = parseFloat(num);if (isNaN(f)) {return false;}f = Math.round(num * Math.pow(10, n)) / Math.pow(10, n); // n 幂   var s = f.toString();var rs = s.indexOf('.');//判定如果是整数,增加小数点再补0if (rs < 0) {rs = s.length;s += '.';}while (s.length <= rs + n) {s += '0';}return s;},bindListen(myChart) {// 监听鼠标事件,实现饼图选中效果(单选),近似实现高亮(放大)效果。let that = this;let selectedIndex = '';let hoveredIndex = '';// 监听点击事件,实现选中效果(单选)myChart.on('click', function(params) {// 从 option.series 中读取重新渲染扇形所需的参数,将是否选中取反。let isSelected = !that.option.series[params.seriesIndex].pieStatus.selected;let isHovered = that.option.series[params.seriesIndex].pieStatus.hovered;let k = that.option.series[params.seriesIndex].pieStatus.k;let startRatio = that.option.series[params.seriesIndex].pieData.startRatio;let endRatio = that.option.series[params.seriesIndex].pieData.endRatio;// 如果之前选中过其他扇形,将其取消选中(对 option 更新)if (selectedIndex !== '' && selectedIndex !== params.seriesIndex) {that.option.series[selectedIndex].parametricEquation = that.getParametricEquation(that.option.series[selectedIndex].pieData.startRatio, that.option.series[selectedIndex].pieData.endRatio, false, false, k, that.option.series[selectedIndex].pieData.value);that.option.series[selectedIndex].pieStatus.selected = false;}// 对当前点击的扇形,执行选中/取消选中操作(对 option 更新)that.option.series[params.seriesIndex].parametricEquation = that.getParametricEquation(startRatio, endRatio,isSelected,isHovered, k, that.option.series[params.seriesIndex].pieData.value);that.option.series[params.seriesIndex].pieStatus.selected = isSelected;// 如果本次是选中操作,记录上次选中的扇形对应的系列号 seriesIndexisSelected ? selectedIndex = params.seriesIndex : null;// 使用更新后的 option,渲染图表myChart.setOption(that.option);});// 监听 mouseover,近似实现高亮(放大)效果myChart.on('mouseover', function(params) {// 准备重新渲染扇形所需的参数let isSelected;let isHovered;let startRatio;let endRatio;let k;// 如果触发 mouseover 的扇形当前已高亮,则不做操作if (hoveredIndex === params.seriesIndex) {return;// 否则进行高亮及必要的取消高亮操作} else {// 如果当前有高亮的扇形,取消其高亮状态(对 option 更新)if (hoveredIndex !== '') {// 从 option.series 中读取重新渲染扇形所需的参数,将是否高亮设置为 false。isSelected = that.option.series[hoveredIndex].pieStatus.selected;isHovered = false;startRatio = that.option.series[hoveredIndex].pieData.startRatio;endRatio = that.option.series[hoveredIndex].pieData.endRatio;k = that.option.series[hoveredIndex].pieStatus.k;// 对当前点击的扇形,执行取消高亮操作(对 option 更新)that.option.series[hoveredIndex].parametricEquation = that.getParametricEquation(startRatio, endRatio,isSelected,isHovered, k, that.option.series[hoveredIndex].pieData.value);that.option.series[hoveredIndex].pieStatus.hovered = isHovered;// 将此前记录的上次选中的扇形对应的系列号 seriesIndex 清空hoveredIndex = '';}// 如果触发 mouseover 的扇形不是透明圆环,将其高亮(对 option 更新)if (params.seriesName !== 'mouseoutSeries' && params.seriesName !== 'pie2d') {// 从 option.series 中读取重新渲染扇形所需的参数,将是否高亮设置为 true。isSelected = that.option.series[params.seriesIndex].pieStatus.selected;isHovered = true;startRatio = that.option.series[params.seriesIndex].pieData.startRatio;endRatio = that.option.series[params.seriesIndex].pieData.endRatio;k = that.option.series[params.seriesIndex].pieStatus.k;// 对当前点击的扇形,执行高亮操作(对 option 更新)that.option.series[params.seriesIndex].parametricEquation = that.getParametricEquation(startRatio, endRatio,isSelected, isHovered, k, that.option.series[params.seriesIndex].pieData.value + 5);that.option.series[params.seriesIndex].pieStatus.hovered = isHovered;// 记录上次高亮的扇形对应的系列号 seriesIndexhoveredIndex = params.seriesIndex;}// 使用更新后的 option,渲染图表myChart.setOption(that.option);}});// 修正取消高亮失败的 bugmyChart.on('globalout', function() {// 准备重新渲染扇形所需的参数let isSelected;let isHovered;let startRatio;let endRatio;let k;if (hoveredIndex !== '') {// 从 option.series 中读取重新渲染扇形所需的参数,将是否高亮设置为 true。isSelected = that.option.series[hoveredIndex].pieStatus.selected;isHovered = false;k = that.option.series[hoveredIndex].pieStatus.k;startRatio = that.option.series[hoveredIndex].pieData.startRatio;endRatio = that.option.series[hoveredIndex].pieData.endRatio;// 对当前点击的扇形,执行取消高亮操作(对 option 更新)that.option.series[hoveredIndex].parametricEquation = that.getParametricEquation(startRatio, endRatio,isSelected,isHovered, k, that.option.series[hoveredIndex].pieData.value);that.option.series[hoveredIndex].pieStatus.hovered = isHovered;// 将此前记录的上次选中的扇形对应的系列号 seriesIndex 清空hoveredIndex = '';}// 使用更新后的 option,渲染图表myChart.setOption(that.option);});}},}</script><!-- Add "scoped" attribute to limit CSS to this component only --><style scoped lang="scss">.cointan{// width: 450px;// height: 302px;width: 100%;height: 100%;// background-image: url('../assets/index/litterbackground.png');background-size: 100%;}.title1{position: absolute;margin: 9px 0 0 10px;font-size: 20px;font-family : '优设标题黑';color: rgba(255, 255, 255, 1);font-weight: 400;}// 3d环形图.chart{position: absolute;width: 100%;height: 300px;// margin: 90px 0 0 30px;// width: 370px;// height: 400px;}.huannum{position: absolute;margin: 141px 0 0 40px;width: 205px;text-align: center;font-size: 24px;font-weight: 700;line-height: 35.52px;color: rgba(255, 255, 255, 1);}.huantxt{position: absolute;margin: 171px 0 0 120px;font-size: 12px;font-weight: 400;line-height: 17.76px;color: rgba(168, 214, 255, 1);}#cityGreenLand-charts{background: url(@/assets/marsServerMonitor/disk-bg.png) no-repeat;background-size: 37% 50%;background-position: 34% 10px}</style>
传数据和更新组件写法

引入组件

  import charts3DPie from '../components/charts3DPie'

组件绑定ref

<charts3DPie ref="chartPie"> </charts3DPie>

对数据传输、更新数据

  let optionData = that.$refs.chartPie.optionData || []optionData.forEach(item => {if (item.name == '可用空间') {item.value = parseInt(that.serverData.diskUnused)item.pieValue = that.serverData.diskUnused} else {//已用空间item.value = parseInt(that.serverData.diskAlready)item.pieValue = that.serverData.diskAlready}})that.$refs.chartPie.optionData = optionData
效果

相关文章:

Echars3D 饼图开发

关于vue echart3D 饼图开发 首先要先下载 "echarts-gl", 放在main.js npm install echarts-gl --save <template><div class"cointan"><!-- 3d环形图 --><div class"chart" id"cityGreenLand-charts"><…...

【PaddleSpeech】语音合成-男声

环境安装 系统&#xff1a;Ubuntu > 16.04 源码下载 使用apt安装 build-essential sudo apt install build-essential 克隆 PaddleSpeech 仓库 # github下载 git clone https://github.com/PaddlePaddle/PaddleSpeech.git # 也可以从gitee下载 git clone https://gite…...

AI-数学-高中-17-三角函数的定义

原作者视频&#xff1a;三角函数】4三角函数的定义&#xff08;易&#xff09;_哔哩哔哩_bilibili 初中&#xff1a; 高中&#xff1a;三角函数就是单位圆上的点的横纵坐标(x0,y0)。 示例1&#xff1a; 规则&#xff1a; 示例2&#xff1a; 示例3.1&#xff1a; 示例3.2 示例4…...

centOS/Linux系统安全加固方案手册

服务器系统:centos8.1版本 说明:该安全加固手册最适用版本为centos8.1版本,其他服务器系统版本可作为参考。 1.账号和口令 1.1 禁用或删除无用账号 减少系统无用账号,降低安全风险。 操作步骤  使用命令 userdel <用户名> 删除不必要的账号。  使用命令 passwd…...

编程实例分享,眼镜店电脑系统软件,配件验光管理顾客信息记录查询系统软件教程

编程实例分享&#xff0c;眼镜店电脑系统软件&#xff0c;配件验光管理顾客信息记录查询系统软件教程 一、前言 以下教程以 佳易王眼镜店顾客档案管理系统软件V16.0为例说明 如上图&#xff0c; 点击顾客档案&#xff0c;在这里可以对顾客档案信息记录保存查询&#xff0c;…...

完整的 HTTP 请求所经历的步骤及分布式事务解决方案

1. 对分布式事务的了解 分布式事务是企业集成中的一个技术难点&#xff0c;也是每一个分布式系统架构中都会涉及到的一个东西&#xff0c; 特别是在微服务架构中&#xff0c;几乎可以说是无法避免。 首先要搞清楚&#xff1a;ACID、CAP、BASE理论。 ACID 指数据库事务正确执行…...

SpringMVC请求和响应

文章目录 1、请求映射路径2、请求参数3、五种类型参数传递3.1、普通参数3.2、POJO类型参数3.3、嵌套POJO类型参数3.4、数组类型参数3.5、集合类型参数 4、json数据传递4.1、传递json对象4.2、传递json对象数组 5、日期类型参数传递6、响应6.1、响应页面6.2、文本数据6.3、json数…...

AIGC实战——深度学习 (Deep Learning, DL)

AIGC实战——深度学习 0. 前言1. 深度学习基本概念1.1 基本定义1.2 非结构化数据 2. 深度神经网络2.1 神经网络2.2 学习高级特征 3. TensorFlow 和 Keras4. 多层感知器 (MLP)4.1 准备数据4.2 构建模型4.3 检查模型4.4 编译模型4.5 训练模型4.6 评估模型 小结系列链接 0. 前言 …...

Django_基本增删改查

一、前提概述 通过项目驱动来学习&#xff0c;以图书管理系统为例&#xff0c;编写接口来实现对图书信息的查询&#xff0c;图书的添加&#xff0c;图书的修改&#xff0c;图书的删除等功能。&#xff08;不包含多重信息的校验&#xff0c;只为了熟悉增删改查接口的实现流程&a…...

数仓治理-存储资源治理

目录 一、存储资源治理的背景 二、存储资源治理的流程及思路 三、治理前如何评估 3.1 无用数据表/临时数据表下线评估 3.2 表及分区的生命周期评估 3.3 存储及压缩格式评估 3.4 根据业务场景实现节省存储评估 四、治理后的成效如何评估 一、存储资源治理的背景 由于早…...

Linux系统安全:安全技术 和 防火墙

一、安全技术 入侵检测系统&#xff08;Intrusion Detection Systems&#xff09;&#xff1a;特点是不阻断任何网络访问&#xff0c;量化、定位来自内外网络的威胁情况&#xff0c;主要以提供报警和事后监督为主&#xff0c;提供有针对性的指导措施和安全决策依据,类 似于监控…...

3dmatch-toolbox详细安装教程-Ubuntu14.04

3dmatch-toolbox详细安装教程-Ubuntu14.04 前言docker搭建Ubuntu14.04安装第三方库安装cuda/cundnn安装OpenCV安装Matlab 安装以及运行3dmatch-toolbox1.安装测试3dmatch-toolbox(对齐两个点云) 总结 前言 paper:3DMatch: Learning Local Geometric Descriptors from RGB-D Re…...

Hadoop与Spark横向比较【大数据扫盲】

大数据场景下的数据库有很多种&#xff0c;每种数据库根据其数据模型、查询语言、一致性模型和分布式架构等特性&#xff0c;都有其特定的使用场景。以下是一些常见的大数据数据库&#xff1a; NoSQL 数据库&#xff1a;这类数据库通常用于处理大规模、非结构化的数据。它们通常…...

软件工程知识梳理5-实现和测试

编码和测试统称为实现。 编码&#xff1a;把软件设计结果翻译成某种程序设计语言书写的程序。是对设计的进一步具体化&#xff0c;是软件工程过程的一个阶段。 测试&#xff1a;单元测试和集成测试&#xff0c;软件测试往往占软件开发总工作量的40%以上。 编码&#xff1a;选…...

WebRTC系列-自定义媒体数据加密

文章目录 1. 对外加密接口2. 对外加密实现前面的文章都有提过WebRTC使用的加密方式是SRTP这个库提供的,这个三方库这里就不做介绍,主要是对rtp包进行加密;自然的其调用也是WebRTC的rtp相关模块;同时在WebRTC里也提供一个自定义加密的接口,本文将围绕这个接口做介绍及分析;…...

golang的sqlite驱动不使用cgo实现 更换gorm默认的SQLite驱动

golang的sqlite驱动不使用cgo实现 更换gorm默认的SQLite驱动 最近在开发一个边缘物联网程序时使用Golang开发&#xff0c;用到GORM来操作SQLite数据库&#xff0c;GORM默认使用gorm.io/driver/sqlite这个库作为SQLite驱动&#xff0c;该库用CGO实现&#xff0c;在使用过程中遇…...

Linux 系统 ubuntu22.04 发行版本 固定 USB 设备端口号

前言&#xff1a; 项目中为了解决 usb 设备屏幕上电顺序导致屏幕偏移、触屏出现偏移等问题。 一、方法1&#xff1a;使用设备 ID 号 步骤&#xff1a; 查看 USB 设备的供应商ID和产品ID Bus 001 Device 003: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Te…...

Vue - 面试题持续更新

1.Vue路由模式 总共有Hash和History两种模式 Hash模式&#xff1a;在浏览器里面的符号 “#”&#xff0c;以及"#"后面的字符称之为Hash&#xff0c;用window.location.hash读取。 Hash模式的特点&#xff1a;hash是和浏览器对话的&#xff0c;和服务器没有关系&…...

Django的web框架Django Rest_Framework精讲(二)

文章目录 1.自定义校验功能&#xff08;1&#xff09;validators&#xff08;2&#xff09;局部钩子&#xff1a;单字段校验&#xff08;3&#xff09;全局钩子&#xff1a;多字段校验 2.raise_exception 参数3.context参数4.反序列化校验后保存&#xff0c;新增和更新数据&…...

VR视频编辑解决方案,全新视频内容创作方式

随着科技的飞速发展&#xff0c;虚拟现实&#xff08;VR&#xff09;技术正逐渐成为各个领域的创新力量。而美摄科技&#xff0c;作为VR技术的引领者&#xff0c;特别推出了一套全新的VR视频编辑方案&#xff0c;为企业提供了一个全新的视频内容创作方式。 美摄科技的VR视频编…...

HTML 语义化

目录 HTML 语义化HTML5 新特性HTML 语义化的好处语义化标签的使用场景最佳实践 HTML 语义化 HTML5 新特性 标准答案&#xff1a; 语义化标签&#xff1a; <header>&#xff1a;页头<nav>&#xff1a;导航<main>&#xff1a;主要内容<article>&#x…...

CVPR 2025 MIMO: 支持视觉指代和像素grounding 的医学视觉语言模型

CVPR 2025 | MIMO&#xff1a;支持视觉指代和像素对齐的医学视觉语言模型 论文信息 标题&#xff1a;MIMO: A medical vision language model with visual referring multimodal input and pixel grounding multimodal output作者&#xff1a;Yanyuan Chen, Dexuan Xu, Yu Hu…...

【人工智能】神经网络的优化器optimizer(二):Adagrad自适应学习率优化器

一.自适应梯度算法Adagrad概述 Adagrad&#xff08;Adaptive Gradient Algorithm&#xff09;是一种自适应学习率的优化算法&#xff0c;由Duchi等人在2011年提出。其核心思想是针对不同参数自动调整学习率&#xff0c;适合处理稀疏数据和不同参数梯度差异较大的场景。Adagrad通…...

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

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

Frozen-Flask :将 Flask 应用“冻结”为静态文件

Frozen-Flask 是一个用于将 Flask 应用“冻结”为静态文件的 Python 扩展。它的核心用途是&#xff1a;将一个 Flask Web 应用生成成纯静态 HTML 文件&#xff0c;从而可以部署到静态网站托管服务上&#xff0c;如 GitHub Pages、Netlify 或任何支持静态文件的网站服务器。 &am…...

华为云Flexus+DeepSeek征文|DeepSeek-V3/R1 商用服务开通全流程与本地部署搭建

华为云FlexusDeepSeek征文&#xff5c;DeepSeek-V3/R1 商用服务开通全流程与本地部署搭建 前言 如今大模型其性能出色&#xff0c;华为云 ModelArts Studio_MaaS大模型即服务平台华为云内置了大模型&#xff0c;能助力我们轻松驾驭 DeepSeek-V3/R1&#xff0c;本文中将分享如何…...

学习STC51单片机32(芯片为STC89C52RCRC)OLED显示屏2

每日一言 今天的每一份坚持&#xff0c;都是在为未来积攒底气。 案例&#xff1a;OLED显示一个A 这边观察到一个点&#xff0c;怎么雪花了就是都是乱七八糟的占满了屏幕。。 解释 &#xff1a; 如果代码里信号切换太快&#xff08;比如 SDA 刚变&#xff0c;SCL 立刻变&#…...

基于TurtleBot3在Gazebo地图实现机器人远程控制

1. TurtleBot3环境配置 # 下载TurtleBot3核心包 mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3.git git clone -b noetic https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git git clone -b noetic-dev…...

【网络安全】开源系统getshell漏洞挖掘

审计过程&#xff1a; 在入口文件admin/index.php中&#xff1a; 用户可以通过m,c,a等参数控制加载的文件和方法&#xff0c;在app/system/entrance.php中存在重点代码&#xff1a; 当M_TYPE system并且M_MODULE include时&#xff0c;会设置常量PATH_OWN_FILE为PATH_APP.M_T…...

MacOS下Homebrew国内镜像加速指南(2025最新国内镜像加速)

macos brew国内镜像加速方法 brew install 加速formula.jws.json下载慢加速 &#x1f37a; 最新版brew安装慢到怀疑人生&#xff1f;别怕&#xff0c;教你轻松起飞&#xff01; 最近Homebrew更新至最新版&#xff0c;每次执行 brew 命令时都会自动从官方地址 https://formulae.…...