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、導出已經完成了,展示效果

因為數據量很多,就展示部分

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/62837.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/62837.shtml
英文地址,請注明出處:http://en.pswp.cn/web/62837.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

純血鴻蒙崛起,原生Android挑戰?兩大操作系統巔峰對決,智能設備未來誰主沉浮?

鴻蒙HarmonyOS和原生Android系統雖然在一些方面相似&#xff0c;但在架構、設計理念、API、開發工具等方面存在一些差異。鴻蒙系統的目標是跨設備、分布式的操作系統&#xff0c;強調多設備協同和資源共享&#xff0c;而Android則主要集中在智能手機和移動設備領域。 下面將從…

計算機網絡:傳輸層、應用層、網絡安全、視頻/音頻/無線網絡、下一代因特網

目錄 &#xff08;五&#xff09;傳輸層 1&#xff0e;傳輸層尋址與端口 2&#xff0e;無連接服務與面向連接服務 3. 傳輸連接的建立與釋放 4. UDP 的優點 5. UDP 和 TCP 報文段報頭格式 6. TCP 的流量控制 7&#xff0e;TCP 的擁塞控制 8. TCP 傳送連接的管理 &#…

【前端開發】HTML+CSS網頁,可以拿來當作業(免費開源)

HTML代碼 <!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8"><meta name"viewport" content_lizhongyu"widthdevice-width, initial-scale1.0"><title>小兔鮮兒-新鮮、惠民、快捷<…

CV(4)--邊緣提取和相機模型

前言 僅記錄學習過程&#xff0c;有問題歡迎討論 邊緣提取&#xff08;涉及語義分割&#xff09;&#xff1a; 圖象的邊緣是指圖象局部區域亮度變化顯著的部分,也有正負之分&#xff0c;暗到亮為正 求邊緣的幅度&#xff1a;sobel&#xff0c;Canny算子 圖像分高頻分量和低…

【信息系統項目管理師】高分論文:論信息系統項目的整合管理(陽光信訪工作平臺)

更多內容請見: 備考信息系統項目管理師-專欄介紹和目錄 文章目錄 正文一、明確目標,制定項目章程二、精心規劃,制定項目管理計劃三、細心嚴謹,指導和管理項目執行四、組織學習,管理項目知識五、多措并舉,對項目進行有效的監控六、規范流程,控制項目整體變更七、嚴謹高效…

智能技術引領未來:自動圖像標注的創新應用與發展

&#x1f351;個人主頁&#xff1a;Jupiter. &#x1f680; 所屬專欄&#xff1a;傳知代碼 歡迎大家點贊收藏評論&#x1f60a; 目錄 概述算法原理核心邏輯效果演示使用方式參考文獻 參考文獻&#xff1a;需要本文的詳細復現過程的項目源碼、數據和預訓練好的模型可從該地址處獲…

C語言-排序

常見的排序算法分為以下四種&#xff0c;插入排序&#xff0c;選擇排序&#xff0c;交換排序&#xff0c;歸并排序。 一、插入排序 (一)直接插入排序 直接插入排序&#xff0c;將一段數組看做被分成已排序序列和未排序序列&#xff0c;排序過程是從未排序序列的元素開始&…

【Java筆記】LinkedList 底層結構

一、LinkedList 的全面說明 LinkedList底層實現了雙向鏈表和雙端隊列特點可以添加任意元素(元素可以重復)&#xff0c;包括null線程不安全&#xff0c;沒有實現同步 二、LinkedList 的底層操作機制 三、LinkedList的增刪改查案例 public class LinkedListCRUD { public stati…

網管平臺(基礎篇):路由器的介紹與管理

路由器簡介 路由器&#xff08;Router&#xff09;是一種計算機網絡設備&#xff0c;它的主要作用是將數據通過打包&#xff0c;并按照一定的路徑選擇算法&#xff0c;將網絡傳送至目的地。路由器能夠連接兩個或更多個網絡&#xff0c;并根據信道的情況自動選擇和設定路由&…

排序算法(2):選擇排序

問題 排序 [30, 24, 5, 58, 18, 36, 12, 42, 39] 選擇排序 選擇排序每次從待排序序列中選出最小&#xff08;或最大&#xff09;的元素&#xff0c;將其放到序列的起始位置&#xff0c;然后&#xff0c;再從剩余未排序元素中繼續尋找最小&#xff08;或最大&#xff09;元素…

Tongweb8命令行使用收集(by lqw)

文章目錄 聲明對應版本修改thanos用戶密碼部署應用到默認實例節點相關操作新增節點(一般一個服務器ip只能裝一個節點)啟動節點(需確認節點沒有運行)停止節點刪除節點節點新增應用節點查看應用節點啟動應用節點停止應用節點卸載應用(謹慎操作,卸載后應用就沒有了,建議備份后…

Artec Leo3D掃描儀在重型機械設備定制中的應用【滬敖3D】

挑戰&#xff1a;一家加拿大制造商需要有效的方法&#xff0c;為富于變化且難度較高的逆向工程&#xff0c;快速、安全、準確地完成重型機械幾何采集。 解決方案&#xff1a;Artec Leo, Artec Studio, Geomagic for SOLIDWORKS 效果&#xff1a;Artec Leo三維掃描代替過去的手動…

Nginx 限制只能白名單 uri 請求的配置

實際生產項目中&#xff0c;大多數時候我們會將后端的 http 接口通過前置 nginx 進行反向代理&#xff0c;對互聯網用戶提供服務。往往我們后端服務所能提供的接口服務是大于互聯網用戶側的實際請求的接口地址數量的&#xff08;例如后端服務一共有100個api接口&#xff0c;經過…

題海拾貝:力扣 141.環形鏈表

Hello大家好&#xff01;很高興我們又見面啦&#xff01;給生活添點passion&#xff0c;開始今天的編程之路&#xff01; 我的博客&#xff1a;<但凡. 我的專欄&#xff1a;《編程之路》、《數據結構與算法之美》、《題海拾貝》 歡迎點贊&#xff0c;關注&#xff01; 1、題…

Vite快速構建Vue教程

步驟 1: 初始化項目目錄 創建一個名為 projects 的文件夾&#xff0c;作為存放所有 Vite 項目的根目錄。這個文件夾將容納多個獨立的 Vite 項目。 步驟 2: 創建 Vite 項目 右鍵點擊 projects 文件夾并選擇“在此處打開終端”或使用您偏好的代碼編輯器&#xff08;如 VSCode&…

深入理解 CSS 文本換行: overflow-wrap 和 word-break

前言 正常情況下&#xff0c;在固定寬度的盒子中的中文會自動換行。但是&#xff0c;當遇到非常長的英文單詞或者很長的 URL 時&#xff0c;文本可能就不會自動換行&#xff0c;而會溢出所在容器。幸運的是&#xff0c;CSS 為我們提供了一些和文本換行相關的屬性&#xff1b;今…

【NumPy進階】:內存視圖、性能優化與高級線性代數

目錄 1. 深入理解 NumPy 的內存視圖與拷貝1.1 內存視圖&#xff08;View&#xff09;1.1.1 創建視圖1.1.2 視圖的特點 1.2 數組拷貝&#xff08;Copy&#xff09;1.2.1 創建拷貝1.2.2 拷貝的特點 1.3 視圖與拷貝的選擇 2. NumPy 的優化與性能提升技巧2.1 向量化操作示例&#x…

HarmonyOS 5.0應用開發——屬性動畫

【高心星出品】 文章目錄 屬性動畫animateTo屬性動畫animation屬性動畫 屬性動畫 屬性接口&#xff08;以下簡稱屬性&#xff09;包含尺寸屬性、布局屬性、位置屬性等多種類型&#xff0c;用于控制組件的行為。針對當前界面上的組件&#xff0c;其部分屬性&#xff08;如位置屬…

機器學習支持向量機(SVM)算法

一、引言 在當今數據驅動的時代&#xff0c;機器學習算法在各個領域發揮著至關重要的作用。支持向量機&#xff08;Support Vector Machine&#xff0c;SVM&#xff09;作為一種強大的監督學習算法&#xff0c;以其在分類和回歸任務中的卓越性能而備受矚目。SVM 具有良好的泛化…

介紹一款docker ui 管理工具

http://vm01:18999/main.html 管理員登陸賬號 jinghan/123456 ui啟動命令所在文件夾目錄 /work/docker/docker-ui 參考鏈接 DockerUI&#xff1a;一款功能強大的中文Docker可視化管理工具_docker ui-CSDN博客