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

EasyExcel设置表头上面的那种大标题(前端传递来的大标题)

1、首先得先引用easyExcel的版本依赖,我那

<dependency><groupId>com.alibaba</groupId><artifactId>easyexcel</artifactId><version>2.2.6</version>
</dependency>

2、然后得弄直接的实体类,(这个实体类是关键,主要的功能就是为了导出的表头还有大标题做准备)

解释:   @ExcelProperty(value ={"${bigHead}","区划名称"},index = 0) 

这个主要 ${bigHead} 这个是 大标题 ,这个标题是动态生成的,

package com.inspur.grp.hrss.labour.project.labourReport;import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.inspur.grp.hrss.labour.framework.base.BaseDomain;
import lombok.EqualsAndHashCode;/*** 每日更新统计记录(这个是是抽取出来的)对象 labour_day_updatetime**/
@EqualsAndHashCode
public class LabourDayUpdatetime extends BaseDomain {/** 主键 */@ExcelIgnoreprivate String id;@ExcelProperty(value ={"${bigHead}","区划名称"},index = 0)private String mc;/** 区的编码 */@ExcelIgnoreprivate String area;/** 镇的编码 */@ExcelIgnoreprivate String town;/** 村的编码 */@ExcelIgnoreprivate String community;/** 就业去向 */@ExcelIgnoreprivate String employDestination;/** 人员类别 */@ExcelIgnoreprivate String category;/** 是否就业 */@ExcelIgnoreprivate String isEmployed;/** 农村劳动力人数 */@ExcelProperty(value ={"${bigHead}","农村劳动力人数"},index = 1)private String ncldlrs;/** 更新人数 */@ExcelProperty(value ={"${bigHead}","农村劳动力更新人数"},index = 2)private String gxrsa;@ExcelProperty(value ={"${bigHead}","更新率"},index = 3)private String gxla;/** 就业人数 */@ExcelProperty(value ={"${bigHead}","就业人数"},index = 4)private String jyrsa;@ExcelProperty(value ={"${bigHead}","国外务工(劳动力)"},index = 5)private String guowaiwug;@ExcelProperty(value ={"${bigHead}","省外务工(劳动力)"},index = 6)private String shengwai;@ExcelProperty(value ={"${bigHead}","省外市内务工(劳动力)"},index = 7)private String shiwaishengnei;@ExcelProperty(value ={"${bigHead}","县外市内务工(劳动力)"},index = 8)private String xianwaishinwug;@ExcelProperty(value ={"${bigHead}","乡(镇)外县内务工(劳动力)"},index = 9)private String xiangzhenwaixianneiwug;@ExcelProperty(value ={"${bigHead}","乡(镇)内务工(劳动力)"},index = 10)private String xiangzhennwug;@ExcelProperty(value ={"${bigHead}","就业率(劳动力)"},index = 11)private String jyla;/** 脱贫劳动力人数 */@ExcelProperty(value ={"${bigHead}","脱贫劳动力人数"},index = 12)private String tpldlrs;@ExcelProperty(value ={"${bigHead}","更新人数(脱贫)"},index = 13)private String gxrsb;@ExcelProperty(value ={"${bigHead}","更新率(脱贫)"},index = 14)private String gxlb;@ExcelProperty(value ={"${bigHead}","就业人数(脱贫)"},index = 15)private String jyrsb;@ExcelProperty(value ={"${bigHead}","国外务工(脱贫)"},index = 16)private String tpguowaiwug;@ExcelProperty(value ={"${bigHead}","省外务工(脱贫)"},index = 17)private String tpshengwai;@ExcelProperty(value ={"${bigHead}","市外省内务工(脱贫)"},index = 18)private String tpshiwaishengnei;@ExcelProperty(value ={"${bigHead}","县外市内务工(脱贫)"},index = 19)private String tpxianwaishinwug;@ExcelProperty(value ={"${bigHead}","乡(镇)外县内务工(脱贫)"},index = 20)private String tpxiangzhenwaixianneiwug;@ExcelProperty(value ={"${bigHead}","乡(镇)内务工(脱贫)"},index = 21)private String tpxiangzhennwug;@ExcelProperty(value ={"${bigHead}","就业率(脱贫)"},index = 22)private String jylb;@ExcelProperty(value ={"${bigHead}","易迁劳动力人数"},index = 23)private String yqldlrs;@ExcelProperty(value ={"${bigHead}","更新人数(易迁)"},index = 24)private String gxrsc;@ExcelProperty(value ={"${bigHead}","更新率(易迁)"},index = 25)private String gxlc;@ExcelProperty(value ={"${bigHead}","就业人数(易迁)"},index = 26)private String jyrsc;@ExcelProperty(value ={"${bigHead}","国外务工(易迁)"},index = 27)private String yqguowaiwug;@ExcelProperty(value ={"${bigHead}","省外务工(易迁)"},index = 28)private String yqshengwai;@ExcelProperty(value ={"${bigHead}","市外省内(易迁)"},index = 29)private String yqshiwaishengnei;@ExcelProperty(value ={"${bigHead}","县外市内务工(易迁)"},index = 30)private String yqxianwaishinwug;@ExcelProperty(value ={"${bigHead}","乡(镇)外县内务工(易迁)"},index = 31)private String yqxiangzhenwaixianneiwug;@ExcelProperty(value ={"${bigHead}","乡(镇)内务工(易迁)"},index = 32)private String yqxiangzhennwug;@ExcelProperty(value ={"${bigHead}","就业率(易迁)"},index = 33)private String jylc;@ExcelProperty(value ={"${bigHead}","未更新的人数"},index = 34)private String xtzwgxdldlrs;public String getMc() {return mc;}public void setMc(String mc) {this.mc = mc;}public String getGxla() {return gxla;}public void setGxla(String gxla) {this.gxla = gxla;}public String getJyla() {return jyla;}public void setJyla(String jyla) {this.jyla = jyla;}public String getGxlb() {return gxlb;}public void setGxlb(String gxlb) {this.gxlb = gxlb;}public String getJylb() {return jylb;}public void setJylb(String jylb) {this.jylb = jylb;}public String getGxlc() {return gxlc;}public void setGxlc(String gxlc) {this.gxlc = gxlc;}public String getJylc() {return jylc;}public void setJylc(String jylc) {this.jylc = jylc;}public String getXtzwgxdldlrs() {return xtzwgxdldlrs;}public void setXtzwgxdldlrs(String xtzwgxdldlrs) {this.xtzwgxdldlrs = xtzwgxdldlrs;}public void setId(String id){this.id = id;}public String getId() {return id;}public void setArea(String area){this.area = area;}public String getArea() {return area;}public void setTown(String town) {this.town = town;}public String getTown() {return town;}public void setCommunity(String community) {this.community = community;}public String getCommunity() {return community;}public void setEmployDestination(String employDestination) {this.employDestination = employDestination;}public String getEmployDestination() {return employDestination;}public void setCategory(String category) {this.category = category;}public String getCategory() {return category;}public void setIsEmployed(String isEmployed) {this.isEmployed = isEmployed;}public String getIsEmployed() {return isEmployed;}public void setNcldlrs(String ncldlrs) {this.ncldlrs = ncldlrs;}public String getNcldlrs() {return ncldlrs;}public void setGxrsa(String gxrsa) {this.gxrsa = gxrsa;}public String getGxrsa() {return gxrsa;}public void setJyrsa(String jyrsa) {this.jyrsa = jyrsa;}public String getJyrsa() {return jyrsa;}public void setTpldlrs(String tpldlrs) {this.tpldlrs = tpldlrs;}public String getTpldlrs() {return tpldlrs;}public void setGxrsb(String gxrsb) {this.gxrsb = gxrsb;}public String getGxrsb() {return gxrsb;}public void setJyrsb(String jyrsb) {this.jyrsb = jyrsb;}public String getJyrsb() {return jyrsb;}public void setYqldlrs(String yqldlrs) {this.yqldlrs = yqldlrs;}public String getYqldlrs() {return yqldlrs;}public void setGxrsc(String gxrsc) {this.gxrsc = gxrsc;}public String getGxrsc() {return gxrsc;}public void setJyrsc(String jyrsc) {this.jyrsc = jyrsc;}public String getJyrsc() {return jyrsc;}public void setShengwai(String shengwai) {this.shengwai = shengwai;}public String getShengwai() {return shengwai;}public void setShiwaishengnei(String shiwaishengnei) {this.shiwaishengnei = shiwaishengnei;}public String getShiwaishengnei() {return shiwaishengnei;}public void setTpshengwai(String tpshengwai) {this.tpshengwai = tpshengwai;}public String getTpshengwai() {return tpshengwai;}public void setTpshiwaishengnei(String tpshiwaishengnei) {this.tpshiwaishengnei = tpshiwaishengnei;}public String getTpshiwaishengnei() {return tpshiwaishengnei;}public void setYqshengwai(String yqshengwai) {this.yqshengwai = yqshengwai;}public String getYqshengwai() {return yqshengwai;}public void setYqshiwaishengnei(String yqshiwaishengnei) {this.yqshiwaishengnei = yqshiwaishengnei;}public String getYqshiwaishengnei() {return yqshiwaishengnei;}public void setGuowaiwug(String guowaiwug) {this.guowaiwug = guowaiwug;}public String getGuowaiwug() {return guowaiwug;}public void setXianwaishinwug(String xianwaishinwug) {this.xianwaishinwug = xianwaishinwug;}public String getXianwaishinwug() {return xianwaishinwug;}public void setXiangzhennwug(String xiangzhennwug) {this.xiangzhennwug = xiangzhennwug;}public String getXiangzhennwug() {return xiangzhennwug;}public void setXiangzhenwaixianneiwug(String xiangzhenwaixianneiwug) {this.xiangzhenwaixianneiwug = xiangzhenwaixianneiwug;}public String getXiangzhenwaixianneiwug() {return xiangzhenwaixianneiwug;}public void setTpguowaiwug(String tpguowaiwug) {this.tpguowaiwug = tpguowaiwug;}public String getTpguowaiwug() {return tpguowaiwug;}public void setTpxianwaishinwug(String tpxianwaishinwug) {this.tpxianwaishinwug = tpxianwaishinwug;}public String getTpxianwaishinwug() {return tpxianwaishinwug;}public void setTpxiangzhennwug(String tpxiangzhennwug) {this.tpxiangzhennwug = tpxiangzhennwug;}public String getTpxiangzhennwug() {return tpxiangzhennwug;}public void setTpxiangzhenwaixianneiwug(String tpxiangzhenwaixianneiwug) {this.tpxiangzhenwaixianneiwug = tpxiangzhenwaixianneiwug;}public String getTpxiangzhenwaixianneiwug() {return tpxiangzhenwaixianneiwug;}public void setYqguowaiwug(String yqguowaiwug) {this.yqguowaiwug = yqguowaiwug;}public String getYqguowaiwug() {return yqguowaiwug;}public void setYqxianwaishinwug(String yqxianwaishinwug) {this.yqxianwaishinwug = yqxianwaishinwug;}public String getYqxianwaishinwug() {return yqxianwaishinwug;}public void setYqxiangzhennwug(String yqxiangzhennwug) {this.yqxiangzhennwug = yqxiangzhennwug;}public String getYqxiangzhennwug() {return yqxiangzhennwug;}public void setYqxiangzhenwaixianneiwug(String yqxiangzhenwaixianneiwug) {this.yqxiangzhenwaixianneiwug = yqxiangzhenwaixianneiwug;}public String getYqxiangzhenwaixianneiwug() {return yqxiangzhenwaixianneiwug;}}

3、然后定义一个接口接收的DTO类

package com.inspur.grp.hrss.labour.project.labourReport.dto;import com.inspur.grp.hrss.labour.project.labourReport.LabourDayUpdatetime;import java.util.List;public class ExportDataRequestDto {private List<LabourDayUpdatetime> labourDayUpdatetimeList;private String addressName; // 这个是前端传递的过了的标题名称// Getters and Setterspublic List<LabourDayUpdatetime> getLabourDayUpdatetimeList() {return labourDayUpdatetimeList;}public void setLabourDayUpdatetimeList(List<LabourDayUpdatetime> labourDayUpdatetimeList) {this.labourDayUpdatetimeList = labourDayUpdatetimeList;}public String getAddressName() {return addressName;}public void setAddressName(String addressName) {this.addressName = addressName;}
}

4、封装标题工具类

package com.inspur.grp.hrss.labour.util.IDCardUtils;import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.write.handler.CellWriteHandler;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.metadata.holder.WriteTableHolder;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.springframework.util.PropertyPlaceholderHelper;import java.util.List;
import java.util.Properties;public class ExcelTitleHandler implements CellWriteHandler {/**错误信息处理时正则表达式的格式*/private final String EXCEL_ERROR_REG = "^(.*)(\\(错误:)(.*)(\\))$";private String bigHead;PropertyPlaceholderHelper placeholderHelper = new PropertyPlaceholderHelper("${", "}");public ExcelTitleHandler( String bigHead) {this.bigHead = bigHead; //表头1}@Overridepublic void beforeCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Head head, Integer columnIndex, Integer relativeRowIndex, Boolean isHead) {// 动态设置表头字段if (!ObjectUtil.isEmpty(head)) {List<String> headNameList = head.getHeadNameList();if (CollectionUtil.isNotEmpty(headNameList)) {Properties properties = new Properties();properties.setProperty("bigHead", bigHead);for (int i = 0 ; i < headNameList.size() ; i++){// 循环遍历替换headNameList.set(i, placeholderHelper.replacePlaceholders(headNameList.get(i), properties));}}}}@Overridepublic void afterCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Cell cell, Head head, Integer relativeRowIndex, Boolean isHead) {}@Overridepublic void afterCellDataConverted(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, CellData cellData, Cell cell, Head head, Integer integer, Boolean aBoolean) {}@Overridepublic void afterCellDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, List<CellData> list, Cell cell, Head head, Integer integer, Boolean aBoolean) {}
}

5、开始接口请求

   //每日更新统计导出@PostMapping("/exportDataUpdate")public void exportDataUpdate(@RequestBody ExportDataRequestDto exportDataRequestDto, HttpServletResponse response) {labourDayUpdatetimeService.exportDataUpdate(exportDataRequestDto, response);}

6、service层

void exportDataUpdate(ExportDataRequestDto exportDataRequestDto, HttpServletResponse response);

7、serviceImpl实现类

 private void setIntValueFromDoubleString(LabourDayUpdatetime recode, String value, Consumer<String> setter) {if (value != null && !value.isEmpty()) {try {int intValue = (int) Double.parseDouble(value);setter.accept(String.valueOf(intValue));} catch (NumberFormatException e) {setter.accept("0");}} else {setter.accept("0");}}private void setFormattedPercentage(LabourDayUpdatetime recode, String value, Consumer<String> setter) {if (value != null && !value.isEmpty()) {try {double doubleValue = Double.parseDouble(value);String formattedValue = String.format("%.2f%%", doubleValue * 100);setter.accept(formattedValue);} catch (NumberFormatException e) {setter.accept("0.00%");}} else {setter.accept("0.00%");}}@Overridepublic void exportDataUpdate(ExportDataRequestDto exportDataRequestDto, HttpServletResponse response) {String bigHead=exportDataRequestDto.getAddressName()+"劳动力更新报表";List<LabourDayUpdatetime> labourDayUpdatetimeList = exportDataRequestDto.getLabourDayUpdatetimeList();labourDayUpdatetimeList.stream().forEach(recode->{setIntValueFromDoubleString(recode, recode.getNcldlrs(), recode::setNcldlrs);setIntValueFromDoubleString(recode, recode.getGxrsa(), recode::setGxrsa);setFormattedPercentage(recode, recode.getGxla(), recode::setGxla);setIntValueFromDoubleString(recode, recode.getJyrsa(), recode::setJyrsa);setIntValueFromDoubleString(recode, recode.getGuowaiwug(), recode::setGuowaiwug);setIntValueFromDoubleString(recode, recode.getShengwai(), recode::setShengwai);setIntValueFromDoubleString(recode, recode.getShiwaishengnei(), recode::setShiwaishengnei);setIntValueFromDoubleString(recode, recode.getXianwaishinwug(), recode::setXianwaishinwug);setIntValueFromDoubleString(recode, recode.getXiangzhennwug(), recode::setXiangzhenwaixianneiwug);setIntValueFromDoubleString(recode, recode.getXiangzhennwug(), recode::setXiangzhennwug);setFormattedPercentage(recode, recode.getJyla(), recode::setJyla);setIntValueFromDoubleString(recode, recode.getTpldlrs(), recode::setTpldlrs);setIntValueFromDoubleString(recode, recode.getGxrsb(), recode::setGxrsb);setFormattedPercentage(recode, recode.getGxlb(), recode::setGxlb);setIntValueFromDoubleString(recode, recode.getJyrsb(), recode::setJyrsb);setIntValueFromDoubleString(recode, recode.getTpguowaiwug(), recode::setTpguowaiwug);setIntValueFromDoubleString(recode, recode.getTpshengwai(), recode::setTpshengwai);setIntValueFromDoubleString(recode, recode.getTpshiwaishengnei(), recode::setTpshiwaishengnei);setIntValueFromDoubleString(recode, recode.getTpxianwaishinwug(), recode::setTpxianwaishinwug);setIntValueFromDoubleString(recode, recode.getTpxiangzhenwaixianneiwug(), recode::setTpxiangzhenwaixianneiwug);setIntValueFromDoubleString(recode, recode.getTpxiangzhennwug(), recode::setTpxiangzhennwug);setFormattedPercentage(recode, recode.getJylb(), recode::setJylb);setIntValueFromDoubleString(recode, recode.getYqldlrs(), recode::setYqldlrs);setIntValueFromDoubleString(recode, recode.getGxrsc(), recode::setGxrsc);setFormattedPercentage(recode, recode.getGxlc(), recode::setGxlc);setIntValueFromDoubleString(recode, recode.getJyrsc(), recode::setJyrsc);setIntValueFromDoubleString(recode, recode.getYqguowaiwug(), recode::setYqguowaiwug);setIntValueFromDoubleString(recode, recode.getYqshengwai(), recode::setYqshengwai);setIntValueFromDoubleString(recode, recode.getYqshiwaishengnei(), recode::setYqshiwaishengnei);setIntValueFromDoubleString(recode, recode.getYqxianwaishinwug(), recode::setYqxianwaishinwug);setIntValueFromDoubleString(recode, recode.getYqxiangzhenwaixianneiwug(), recode::setYqxiangzhenwaixianneiwug);setIntValueFromDoubleString(recode, recode.getYqxiangzhennwug(), recode::setYqxiangzhennwug);setFormattedPercentage(recode, recode.getJylc(), recode::setJylc);setIntValueFromDoubleString(recode, recode.getXtzwgxdldlrs(), recode::setXtzwgxdldlrs);});try {response.setContentType("application/vnd.ms-excel");response.setCharacterEncoding("utf-8");response.setHeader("Content-disposition", "attachment;filename=" + "数据" + ".xlsx");WriteCellStyle contentWriteCellStyle = new WriteCellStyle();contentWriteCellStyle.setBorderLeft(BorderStyle.THIN);contentWriteCellStyle.setBorderTop(BorderStyle.THIN);contentWriteCellStyle.setBorderRight(BorderStyle.THIN);contentWriteCellStyle.setBorderBottom(BorderStyle.THIN);contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);WriteCellStyle headWriteCellStyle = new WriteCellStyle();headWriteCellStyle.setBorderLeft(BorderStyle.THIN);headWriteCellStyle.setBorderTop(BorderStyle.THIN);headWriteCellStyle.setBorderRight(BorderStyle.THIN);headWriteCellStyle.setBorderBottom(BorderStyle.THIN);//设置头部标题居中headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);// 这个策略是 头是头的样式 内容是内容的样式 其他的策略可以自己实现HorizontalCellStyleStrategy horizontalCellStyleStrategy =new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle);EasyExcel.write(response.getOutputStream(), LabourDayUpdatetime.class).sheet("数据").registerWriteHandler(new ExcelTitleHandler(bigHead)).registerWriteHandler(new SimpleColumnWidthStyleStrategy(20)).registerWriteHandler(horizontalCellStyleStrategy).doWrite(labourDayUpdatetimeList);}catch (Exception e){throw new RuntimeException(e);}}

7、前端vue的接口

具体代码就不列出了,这个   daochu 就是一个按钮button

daochu(){if(this.tableData.length==0){this.$message({ message: '请确保有数据进行导出', type: 'warning' });return;}else{const loading = this.$loading({lock: true,text: '导出中',spinner: 'el-icon-loading',background: ' rgba(255, 255, 255, 0.6)'});var data = {labourDayUpdatetimeList: this.tableData, // 这个tableData 这个是你要导出的数据addressName: this.addressName // 这个是你要给你的excel设置的大标题}//发送接口请求labourReportApi.exportDataUpdate(data).then(res => { const url = window.URL.createObjectURL(new Blob([res]));const link = document.createElement('a');link.href = url;link.setAttribute('download', '每日更新情况调度统计.xlsx');document.body.appendChild(link);link.click();document.body.removeChild(link);window.URL.revokeObjectURL(url);this.$message({message: '导出数据成功', type: 'success' });setTimeout(() => {loading.close();}, 1000);})}},

8、具体vue请求

这个是一个js,你可以赋值到你自己的接口js里面去

import request from "@/util/request";
var prefixD = customConfig.VUE_APP_CLIENT_ID + "/labourReport/updatetimeDayTj";
export default {//每日更新导出exportDataUpdate: async function (params) {return request({url: prefixD + "/exportDataUpdate",method: "post",data: params,responseType: "arraybuffer",headers: {'Content-Type': 'application/json'}})},}

9、导出已经完成了,展示效果

因为数据量很多,就展示部分

相关文章:

EasyExcel设置表头上面的那种大标题(前端传递来的大标题)

1、首先得先引用easyExcel的版本依赖&#xff0c;我那 <dependency><groupId>com.alibaba</groupId><artifactId>easyexcel</artifactId><version>2.2.6</version> </dependency> 2、然后得弄直接的实体类&#xff0c;&…...

【Linux网络编程】第十弹---打造初级网络计算器:从协议设计到服务实现

✨个人主页&#xff1a; 熬夜学编程的小林 &#x1f497;系列专栏&#xff1a; 【C语言详解】 【数据结构详解】【C详解】【Linux系统编程】【Linux网络编程】 目录 1、Protocol.hpp 1.1、Request类 1.1.1、基本结构 1.1.2、构造析构函数 1.1.3、序列化函数 1.1.4、反…...

无限弹窗?无限重启?

Windows开机自启目录&#xff1a; "%USERPROFILE%\AppData\Roaming\Microsoft\windows\StartMenu\Programs\Startup" 基于这个和 start 命令&#xff0c; shutdown 命令&#xff0c; 编写 bat 病毒程序。 无限弹窗 echo start cmd > hack.txt echo %0 >>…...

深入详解人工智能机器学习常见算法中的K-means聚类

目录 引言 1. K-means聚类的基本概念 1.1 K-means聚类的定义 1.2 K-means聚类的核心思想 1.3 K-means聚类的目标函数 2. K-means聚类的核心原理 2.1 初始化 2.2 分配 2.3 更新 2.4 迭代 3. K-means聚类的具体实现 3.1 K-means聚类的算法流程 3.2 K-means聚类的Pyt…...

lc146LRU缓存——模仿LinkedHashMap

146. LRU 缓存 - 力扣&#xff08;LeetCode&#xff09; 法1&#xff1a; 调用java现有的LinkedHashMap的方法&#xff0c;但不太理解反正都不需要扩容&#xff0c;super(capacity, 1F, true);不行吗&#xff0c;干嘛还弄个装载因子0.75还中途扩容一次浪费时间。 class LRUC…...

全面深入解析:C语言动态库

引言 动态库&#xff08;Dynamic Library&#xff09;是现代软件开发中不可或缺的一部分&#xff0c;它们不仅提高了代码的重用性和维护性&#xff0c;还显著提升了系统的性能和资源利用率。本文将全面探讨C语言中的动态库&#xff0c;从基础概念到高级应用&#xff0c;通过丰…...

运用 SSM 实现垃圾分类系统智能化升级

目 录 摘 要 1 前 言 3 第1章 概述 4 1.1 研究背景 4 1.2 研究目的 4 1.3 研究内容 4 第二章 开发技术介绍 5 2.1Java技术 6 2.2 Mysql数据库 6 2.3 B/S结构 7 2.4 SSM框架 8 第三章 系统分析 9 3.1 可行性分析 9 3.1.1 技术可行性 9 3.1.2 经济可行性 10 3.1.3 操作可行性 10 …...

LeNet-5:深度学习与卷积神经网络的里程碑

目录 ​编辑 引言 LeNet-5的结构与原理 输入层 C1层&#xff1a;卷积层 S2层&#xff1a;池化层 C3层&#xff1a;卷积层 S4层&#xff1a;池化层 C5层&#xff1a;卷积层 F6层&#xff1a;全连接层 输出层 LeNet-5的算法基础 LeNet-5的优点 LeNet-5的现代应用 …...

从资产流动分析WIF市场潜力X.game深究其他未知因素

近日&#xff0c;两则关于WIF最新消息引起了投资者们的注意。据报道&#xff0c;11月28日Vintermute在过去13小时内累计从Binance交易所提取了价值533万美元的WIF&#xff0c;此举不仅彰显了其强大的资金实力&#xff0c;更在某种程度上推动了WIF币价的反弹&#xff1b;另一方面…...

深入解析Vue3响应式系统:从Proxy实现到依赖收集的核心原理

深入解析Vue3响应式系统&#xff1a;从Proxy实现到依赖收集的核心原理 响应式系统的基本原理 作为一个热门的JavaScript框架&#xff0c;Vue在3.x版本中引入了基于Proxy的响应式系统。这个系统的核心思想是利用Proxy对象拦截对数据的访问和修改&#xff0c;从而实现数据的自动更…...

FPGA实现GTP光口数据回环传输,基于Aurora 8b/10b编解码架构,提供2套工程源码和技术支持

目录 1、前言工程概述免责声明 2、相关方案推荐我已有的所有工程源码总目录----方便你快速找到自己喜欢的项目我这里已有的 GT 高速接口解决方案 3、工程详细设计方案工程设计原理框图用户数据发送模块基于GTP高速接口的数据回环传输架构GTP IP 简介GTP 基本结构GTP 发送和接收…...

Linux网络 UDP socket

背景知识 我们知道&#xff0c; IP 地址用来标识互联网中唯一的一台主机&#xff0c; port 用来标识该主机上唯一的一个网络进程&#xff0c;IPPort 就能表示互联网中唯一的一个进程。所以通信的时候&#xff0c;本质是两个互联网进程代表人来进行通信&#xff0c;{srcIp&…...

如何持续优化呼叫中心大模型呼入机器人的性能?

如何持续优化呼叫中心大模型呼入机器人的性能&#xff1f; 原作者&#xff1a;开源呼叫中心FreeIPCC&#xff0c;其Github&#xff1a;https://github.com/lihaiya/freeipcc 持续优化呼叫中心大模型呼入机器人的性能是一个复杂而细致的过程&#xff0c;它涉及到数据、模型结构…...

鸿蒙项目云捐助第四讲鸿蒙App应用的登陆注册页实现

根据app的操作流程可以知道&#xff0c;当启动页启动后&#xff0c;点击启动页中的页面就进入到了登录页。本讲就是针对于登录注册页的实现&#xff0c;实现的界面参考下图。 这里根据这个素材的参考实现鸿蒙Next云捐助的登录页。 一、鸿蒙Next云捐助登录页的实现 在项目中继…...

Windows本地搭建Redis集群(集群模式)

手打不易&#xff0c;如果转摘&#xff0c;请注明出处&#xff01; 注明原文&#xff1a;https://blog.csdn.net/q258523454/article/details/144477957 前言 Redis版本&#xff1a;redis 5.0.14.1 Windows版本&#xff1a;Windows10 本文只讲集群模式 1. 安装Redis 1.1 …...

使用FastGPT制做一个AI网站日志分析器

越来越的多网站面临每天上千次的扫描和各类攻击&#xff0c;及时发现攻击IP&#xff0c;并有效的屏蔽不良访问成为网站安全的重要保障&#xff0c;这里我们使用AI来完成对网站日志的日常分析。 我们来使用FastGPT来制做一个AI网站日志析器&#xff0c;下面就开始&#xff1a; …...

探索 Echarts 绘图:数据可视化的奇妙之旅

目录 一、Echarts 初印象 二、搭建 Echarts 绘图环境 三、绘制第一个图表&#xff1a;柱状图的诞生 四、图表的美化与定制&#xff1a;让数据更具吸引力 1. 主题切换&#xff1a;一键变换风格 2. 颜色调整&#xff1a;色彩搭配的艺术 3. 标签与提示框&#xff1a;丰富信…...

网络基础(IP和端口)

网络连接的核心-TCP/IP体系结构&#xff08;IP和端口&#xff09; 什么是IP地址 1.IP地址是电子设备&#xff08;计算机&#xff09;在互联网上的唯一标识 2.用来在互联网中寻找电脑 IP 地址就像是你家的地址一样&#xff0c;不过它是在网络世界里用来找到一台电脑或者其他网…...

UE4与WEB-UI通信

前端HTML代码 <!DOCTYPE html><html><head><meta charset"utf-8"><meta name"viewport" content"widthdevice-width, initial-scale1"><title>test web ui</title><script src"https://cdn.b…...

前缀和与差分算法详解

定义 前缀和是一种数据预处理技术&#xff0c;它指的是从数组的第一个元素开始&#xff0c;到当前元素为止的所有元素的和。这种技术可以快速计算任意区间内元素的和&#xff0c;而不需要每次都从头开始累加。 差分则是前缀和的逆运算&#xff0c;它主要用于处理对数组某个区…...

未来机器人的大脑:如何用神经网络模拟器实现更智能的决策?

编辑&#xff1a;陈萍萍的公主一点人工一点智能 未来机器人的大脑&#xff1a;如何用神经网络模拟器实现更智能的决策&#xff1f;RWM通过双自回归机制有效解决了复合误差、部分可观测性和随机动力学等关键挑战&#xff0c;在不依赖领域特定归纳偏见的条件下实现了卓越的预测准…...

使用VSCode开发Django指南

使用VSCode开发Django指南 一、概述 Django 是一个高级 Python 框架&#xff0c;专为快速、安全和可扩展的 Web 开发而设计。Django 包含对 URL 路由、页面模板和数据处理的丰富支持。 本文将创建一个简单的 Django 应用&#xff0c;其中包含三个使用通用基本模板的页面。在此…...

前端导出带有合并单元格的列表

// 导出async function exportExcel(fileName "共识调整.xlsx") {// 所有数据const exportData await getAllMainData();// 表头内容let fitstTitleList [];const secondTitleList [];allColumns.value.forEach(column > {if (!column.children) {fitstTitleL…...

MODBUS TCP转CANopen 技术赋能高效协同作业

在现代工业自动化领域&#xff0c;MODBUS TCP和CANopen两种通讯协议因其稳定性和高效性被广泛应用于各种设备和系统中。而随着科技的不断进步&#xff0c;这两种通讯协议也正在被逐步融合&#xff0c;形成了一种新型的通讯方式——开疆智能MODBUS TCP转CANopen网关KJ-TCPC-CANP…...

Java 加密常用的各种算法及其选择

在数字化时代&#xff0c;数据安全至关重要&#xff0c;Java 作为广泛应用的编程语言&#xff0c;提供了丰富的加密算法来保障数据的保密性、完整性和真实性。了解这些常用加密算法及其适用场景&#xff0c;有助于开发者在不同的业务需求中做出正确的选择。​ 一、对称加密算法…...

ios苹果系统,js 滑动屏幕、锚定无效

现象&#xff1a;window.addEventListener监听touch无效&#xff0c;划不动屏幕&#xff0c;但是代码逻辑都有执行到。 scrollIntoView也无效。 原因&#xff1a;这是因为 iOS 的触摸事件处理机制和 touch-action: none 的设置有关。ios有太多得交互动作&#xff0c;从而会影响…...

MySQL用户和授权

开放MySQL白名单 可以通过iptables-save命令确认对应客户端ip是否可以访问MySQL服务&#xff1a; test: # iptables-save | grep 3306 -A mp_srv_whitelist -s 172.16.14.102/32 -p tcp -m tcp --dport 3306 -j ACCEPT -A mp_srv_whitelist -s 172.16.4.16/32 -p tcp -m tcp -…...

Mac下Android Studio扫描根目录卡死问题记录

环境信息 操作系统: macOS 15.5 (Apple M2芯片)Android Studio版本: Meerkat Feature Drop | 2024.3.2 Patch 1 (Build #AI-243.26053.27.2432.13536105, 2025年5月22日构建) 问题现象 在项目开发过程中&#xff0c;提示一个依赖外部头文件的cpp源文件需要同步&#xff0c;点…...

Mobile ALOHA全身模仿学习

一、题目 Mobile ALOHA&#xff1a;通过低成本全身远程操作学习双手移动操作 传统模仿学习&#xff08;Imitation Learning&#xff09;缺点&#xff1a;聚焦与桌面操作&#xff0c;缺乏通用任务所需的移动性和灵活性 本论文优点&#xff1a;&#xff08;1&#xff09;在ALOHA…...

NXP S32K146 T-Box 携手 SD NAND(贴片式TF卡):驱动汽车智能革新的黄金组合

在汽车智能化的汹涌浪潮中&#xff0c;车辆不再仅仅是传统的交通工具&#xff0c;而是逐步演变为高度智能的移动终端。这一转变的核心支撑&#xff0c;来自于车内关键技术的深度融合与协同创新。车载远程信息处理盒&#xff08;T-Box&#xff09;方案&#xff1a;NXP S32K146 与…...