Springboot3+EasyExcel由浅入深

环境介绍

技术栈

springboot3+easyexcel

软件

版本

IDEA

IntelliJ IDEA 2022.2.1

JDK

17

Spring Boot

3

EasyExcel是一个基于Java的、快速、简洁、解决大文件内存溢出的Excel处理工具。

他能让你在不用考虑性能、内存的等因素的情况下,快速完成Excel的读、写等功能。

官网https://easyexcel.opensource.alibaba.com/

Sheet工作簿

Row,行,索引从0开始

Column,列,索引从0开始

Cell,单元格

目录

Read

Read1

Read2

异常处理

读sheet

自定义格式转换 日期,数字-Read

自定义转换器-Read

读指定行

Write

Write1

Write2

写入指定列

多级列名

自定义格式转换 日期,数字-Write

自定义转换器-Write

指定列宽行高

批量写入excel方法

自定义模板写入excel

自定义监听器

Web上传下载


Read

Read1

List<Corrdinate> newlist =new ArrayList<>();String fileName="C:\\Users\\Administrator\\Desktop\\demofile\\坐标测试.xlsx";EasyExcel.read(fileName, Corrdinate.class, new ReadListener<Corrdinate>() {@Overridepublic void invoke(Corrdinate corrdinate, AnalysisContext analysisContext) {try {if (11<=Double.parseDouble(corrdinate.getX()) && Double.parseDouble(corrdinate.getX())<120&& 2<=Double.parseDouble(corrdinate.getY()) && Double.parseDouble(corrdinate.getY())<244 ){corrdinate.setZ(true);}else {corrdinate.setZ(false);}newlist.add(corrdinate);}catch (Exception e){System.out.println(e);corrdinate.setDesc("类型转换失败");newlist.add(corrdinate);}}@Overridepublic void doAfterAllAnalysed(AnalysisContext analysisContext) {System.out.println("读取完成");}}).sheet().doRead();

Read2

String fileName="C:\\Users\\Administrator\\Desktop\\demofile\\坐标测试.xlsx";EasyExcel.read(fileName, Corrdinate.class,new PageReadListener<Corrdinate>(corrdinates -> {for (Corrdinate corrdinate : corrdinates) {try {if (1<=Double.parseDouble(corrdinate.getX()) && Double.parseDouble(corrdinate.getX())<110&& 2<=Double.parseDouble(corrdinate.getY()) && Double.parseDouble(corrdinate.getY())<240 ){corrdinate.setZ(true);}else {corrdinate.setZ(false);}newlist.add(corrdinate);}catch (Exception e){System.out.println(e);corrdinate.setDesc("类型转换失败");newlist.add(corrdinate);}}})).sheet().doRead();

异常处理

重写onException方法

@Test
void readException() {List<Corrdinate> oldlist =new ArrayList<>();List<Corrdinate> newlist =new ArrayList<>();String fileName="C:\\Users\\Administrator\\Desktop\\坐标测试.xlsx";EasyExcel.read(fileName, Corrdinate.class, new ReadListener<Corrdinate>() {@Overridepublic void invoke(Corrdinate corrdinate, AnalysisContext analysisContext) {if (1<=Double.parseDouble(corrdinate.getX()) && Double.parseDouble(corrdinate.getX())<110&& 2<=Double.parseDouble(corrdinate.getY()) && Double.parseDouble(corrdinate.getY())<240 ){corrdinate.setZ(true);}else {corrdinate.setZ(false);}newlist.add(corrdinate);}@Overridepublic void doAfterAllAnalysed(AnalysisContext analysisContext) {System.out.println("读取完成");}@Overridepublic void onException(Exception exception, AnalysisContext context) throws Exception {System.out.println(exception);}}).sheet().doRead();for (Corrdinate corrdinate : newlist) {System.out.println(corrdinate.toString());}
}

try- catch

@Test
void read1() {List<Corrdinate> oldlist =new ArrayList<>();List<Corrdinate> newlist =new ArrayList<>();String fileName="C:\\Users\\Administrator\\Desktop\\测试.xlsx";EasyExcel.read(fileName, Corrdinate.class, new ReadListener<Corrdinate>() {@Overridepublic void invoke(Corrdinate corrdinate, AnalysisContext analysisContext) {try {if (1<=Double.parseDouble(corrdinate.getX()) && Double.parseDouble(corrdinate.getX())<200&& 20<=Double.parseDouble(corrdinate.getY()) && Double.parseDouble(corrdinate.getY())<300 ){corrdinate.setZ(true);}else {corrdinate.setZ(false);}newlist.add(corrdinate);}catch (Exception e){System.out.println(e);corrdinate.setDesc("类型转换失败");newlist.add(corrdinate);}}@Overridepublic void doAfterAllAnalysed(AnalysisContext analysisContext) {System.out.println("读取完成");}}).sheet().doRead();for (Corrdinate corrdinate : newlist) {System.out.println(corrdinate.toString());}
}

读sheet

读所有工作簿

@Test
void readManyShoot() {String fileName="C:\\Users\\Administrator\\Desktop\\demofile\\坐标测试.xlsx";EasyExcel.read(fileName, Corrdinate.class,new PageReadListener<>(corrdinates -> {corrdinates.forEach(System.out::println);})).doReadAll();
}

读任意工作簿

@Test
void readAppointSheet() {try (ExcelReader excelReader = EasyExcel.read("C:\\Users\\Administrator\\Desktop\\demofile\\坐标测试.xlsx").build();){//创建工作簿对象sheet1ReadSheet sheet1 = EasyExcel.readSheet(0).head(Corrdinate.class).registerReadListener(new PageReadListener<>(corrdinates -> {corrdinates.forEach(System.out::println);})).build();//创建工作簿对象sheet2ReadSheet sheet2 = EasyExcel.readSheet("Sheet2").head(Corrdinate.class).registerReadListener(new PageReadListener<>(corrdinates -> {corrdinates.forEach(System.out::println);})).build();excelReader.read(sheet1,sheet2);}
}

自定义格式转换 日期,数字-Read

@Data
public class man {
    @ExcelProperty("姓名")
    private String name;
    @ExcelProperty("日期")
    @DateTimeFormat("yyyy年mm月dd日")
    private Date date;
    @ExcelProperty("成功率")
    private BigDecimal successrate;
}

自定义转换器-Read

public class StringConverterString implements Converter<String> {//支持java类型@Overridepublic Class<?> supportJavaTypeKey() {return String.class;}//支持Excel单元格类型@Overridepublic CellDataTypeEnum supportExcelTypeKey() {return CellDataTypeEnum.STRING;}//读的数据符合类型@Overridepublic String convertToJavaData(ReadConverterContext<?> context) throws Exception {//转换return "姓名:"+context.getReadCellData().getStringValue();}//写的数据符合类型@Overridepublic WriteCellData<?> convertToExcelData(WriteConverterContext<String> context) throws Exception {return new WriteCellData<>(context.getValue());}
}@Data
public class man {@ExcelProperty(converter = StringConverterString.class)private String name;@ExcelProperty("日期")@DateTimeFormat("yyyy年mm月dd日")private Date date;@ExcelProperty("成功率")private BigDecimal successrate;
}

读指定行

EasyExcel默认从第一行开始读取,第0行默认为列头

@Test
void selectRead(){String fileName="C:\\Users\\Administrator\\Desktop\\demofile\\坐标测试.xlsx";EasyExcel.read(fileName, man.class,new PageReadListener<>(mans -> {mans.forEach(System.out::println);})).sheet("Sheet3").headRowNumber(2)//第几行,0-n.doRead();
}

Write

实体类

@Datapublic class Corrdinate {private long id;@ExcelProperty("x")private String x;private String y;@ExcelProperty("是否匹配")private boolean z;@ExcelProperty("描述")private String desc;@ExcelIgnore//忽略字段private String de;}

Write1

//生成数据方法private List<Corrdinate> getData(int count) {List<Corrdinate> list = ListUtils.newArrayList();for (int i = 0; i < count; i++) {Corrdinate corrdinate = new Corrdinate();//生成10-100随机数corrdinate.setId(RandomUtil.randomInt(10, 100));corrdinate.setX(String.valueOf(RandomUtil.randomInt(10, 100)));corrdinate.setY(String.valueOf(RandomUtil.randomInt(10, 100)));list.add(corrdinate);}return list;}@Testvoid write1(){EasyExcel.write("C:\\Users\\Administrator\\Desktop\\demofile\\test01.xlsx", Corrdinate.class).sheet()//指定工作簿

Write2

//生成数据方法private List<Corrdinate> getData(int count) {List<Corrdinate> list = ListUtils.newArrayList();for (int i = 0; i < count; i++) {Corrdinate corrdinate = new Corrdinate();corrdinate.setId(Long.parseLong(String.valueOf(RandomUtil.randomInt(10, 100))));//生成10-100随机数corrdinate.setX(String.valueOf(RandomUtil.randomInt(10, 100)));corrdinate.setY(String.valueOf(RandomUtil.randomInt(10, 100)));//随机生成MD5corrdinate.setDesc(DigestUtils.md5Hex("hello"));list.add(corrdinate);}return list;}

@Testvoid write2(){try (ExcelWriter excelWriter = EasyExcel.write("C:\\Users\\Administrator\\Desktop\\demofile\\test01.xlsx", Corrdinate.class).build();){WriteSheet sheet2 = EasyExcel.writerSheet("Sheet2").build();WriteSheet sheet1 =EasyExcel.writerSheet("Sheet1").build();excelWriter.write(getData(10),sheet1);excelWriter.write(getData(10),sheet2);}

写入指定列

实体类

@Datapublic class Corrdinate {private long id;@ExcelProperty(value = "x",index = 1)//指定列名和顺序private String x;private String y;@ExcelProperty("是否匹配")private boolean z;@ExcelProperty("描述")private String desc;@ExcelIgnore//忽略字段private String de;}

生成数据方法

//生成数据方法private List<Corrdinate> getData(int count) {List<Corrdinate> list = ListUtils.newArrayList();for (int i = 0; i < count; i++) {Corrdinate corrdinate = new Corrdinate();corrdinate.setId(Long.parseLong(String.valueOf(RandomUtil.randomInt(10, 100))));//生成10-100随机数corrdinate.setX(String.valueOf(RandomUtil.randomInt(10, 100)));corrdinate.setY(String.valueOf(RandomUtil.randomInt(10, 100)));//随机生成MD5corrdinate.setDesc(DigestUtils.md5Hex("hello"));corrdinate.setDe(DigestUtils.md5Hex("de"));list.add(corrdinate);}return list;}

写测试

@Testvoid writeColumn(){Set<String> set = new TreeSet<>();set.add("de");EasyExcel.write("C:\\Users\\Administrator\\Desktop\\demofile\\test01.xlsx", Corrdinate.class).excludeColumnFieldNames(set).sheet("Sheet2")//指定工作簿.doWrite(getData(10));//写入10个数据}

多级列名

实体类

@Datapublic class Corrdinate {private long id;@ExcelProperty(value = "x",index = 1)//指定列名和顺序private String x;private String y;@ExcelProperty({"一级列名","是否匹配"})private boolean z;@ExcelProperty({"一级列名","描述"})private String desc;//@ExcelIgnore//忽略字段//设置一级列名,二级列名@ExcelProperty({"一级列名","二级列名"})private String de;}

写测试

@Testvoid writeDemo(){EasyExcel.write("C:\\Users\\Administrator\\Desktop\\demofile\\test01.xlsx", Corrdinate.class).sheet("Sheet3")//指定工作簿.doWrite(getData(10));//写入10个数据}

自定义格式转换 日期,数字-Write

实体类

@Datapublic class man {@ExcelProperty(converter = StringConverterString.class)private String name;@ExcelProperty("日期")@DateTimeFormat("yyyy年mm月dd日")private Date date;@NumberFormat("#.##%")private BigDecimal successrate;}

生成数据并测试写入

//生成数据方法private List<Man> getData2(int count) {List<Man> list = ListUtils.newArrayList();for (int i = 0; i < count; i++) {Man m = new Man();m.setName("张三"+i);m.setSuccessrate(BigDecimal.valueOf(RandomUtil.randomDouble(0.0, 1)));m.setDate(new Date());list.add(m);}return list;
}@Testvoid writeDemo(){EasyExcel.write("C:\\Users\\Administrator\\Desktop\\demofile\\test01.xlsx", Man.class).sheet("Sheet3")//指定工作簿.doWrite(getData2(10));//写入10个数据}}

自定义转换器-Write

自定义转换器

public class StringConverterString implements Converter<String> {//支持java类型@Overridepublic Class<?> supportJavaTypeKey() {return String.class;}//支持Excel单元格类型@Overridepublic CellDataTypeEnum supportExcelTypeKey() {return CellDataTypeEnum.STRING;}//读的数据符合类型@Overridepublic String convertToJavaData(ReadConverterContext<?> context) throws Exception {//转换return "姓名:"+context.getReadCellData().getStringValue();}//写的数据符合类型@Overridepublic WriteCellData<?> convertToExcelData(WriteConverterContext<String> context) throws Exception {return new WriteCellData<>("写入数据"+context.getValue());}}

生成数据并测试写入

private List<Man> getData2(int count) {List<Man> list = ListUtils.newArrayList();for (int i = 0; i < count; i++) {Man m = new Man();m.setName("张三"+i);m.setSuccessrate(BigDecimal.valueOf(RandomUtil.randomDouble(0.0, 1)));m.setDate(new Date());list.add(m);}return list;}@Testvoid writeDemo(){EasyExcel.write("C:\\Users\\Administrator\\Desktop\\demofile\\test01.xlsx", Man.class).sheet("Sheet3")//指定工作簿.doWrite(getData2(10));//写入10个数据}

指定列宽行高

@Data@HeadRowHeight(30)// 指定列头行高度@ContentRowHeight(15)// 指定内容行高度@ColumnWidth(12)//指定列宽public class Man {@ExcelProperty(converter = StringConverterString.class)private String name;@ExcelProperty("日期")@DateTimeFormat("yyyy年mm月dd日")private Date date;@NumberFormat("#.##%")private BigDecimal successrate;}

批量写入excel方法

编写实体类

@TableName(value ="product")

@Data

@NoArgsConstructor

@AllArgsConstructor

public class Product implements Serializable {

    /**

     * 序号

     */

    @TableId(type = IdType.AUTO)

    @ExcelProperty("序号")

    private Integer number;

    /**

     * 创建时间

     */

    @ExcelProperty("创建时间")

    private Date createtime;

    /**

     * 产品名称

     */

    @ExcelProperty("产品名称")

    private String productname;

    /**

     * 产品编号

     */

    @ExcelProperty("产品编号")

    private String productnumber;

    /**

     * 产品型号

     */

    @ExcelProperty("产品型号")

    private String manufacturer;

    /**

     * 产品位置

     */

    @ExcelProperty("产品位置")

    private String producepath;

    /**

     * 图片位置

     */

    @ExcelProperty("图片位置")

    private String imagepath;

    /**

     * 使用单位

     */

    @ExcelProperty("使用单位")

    private String unit;

    /**

     * 金额

     */

    @ExcelProperty("金额")

    private Integer money;

    /**

     * 入库时间

     */

    @ExcelProperty("入库时间")

    private Date intime;

    /**

     * 出库时间

     */

    @ExcelProperty("出库时间")

    private Date puttime;

    /**

     * 操作人

     */

    @ExcelProperty("操作人")

    private String operator;

    /**

     * 创建人

     */

    @ExcelProperty("创建人")

    private String createduser;

    /**

     * 备注

     */

    @ExcelProperty("备注")

    private String notes;

    /**

     * 产品数量

     */

    @ExcelProperty("产品数量")

    private Integer producedigit;

    /**

     * 产品单位

     */

    @ExcelProperty("产品单位")

    private String productunit;

    @TableField(exist = false)

    private static final long serialVersionUID = 1L;

}

//重复多次写入(写到单个或者多个Sheet)@Testpublic void manyWrite() {// 方法1: 如果写到同一个sheetString fileName = "C:\\Users\\13631\\Desktop\\simpleWriteTest1702391756908.xlsx";// 这里 需要指定写用哪个class去写try (ExcelWriter excelWriter = EasyExcel.write(fileName, Product.class).build()) {// 这里注意 如果同一个sheet只要创建一次WriteSheet writeSheet = EasyExcel.writerSheet("测试").build();long star = System.currentTimeMillis();// 去调用写入,这里我调用了五次,实际使用时根据数据库分页的总的页数来for (int i = 0; i < 5; i++) {// 分页去数据库查询数据 这里可以去数据库查询每一页的数据List<Product> data = getData(1000);excelWriter.write(data, writeSheet);}long end = System.currentTimeMillis();System.out.println("耗时:" + (end - star)/1000 + "秒");}

自定义模板写入excel

填充单行

填充集合

//根据模板填充数据
@Test
public void fillWrite() {// 方案2 分多次 填充 会使用文件缓存(省内存)String fileName = "C:\\Users\\13631\\Desktop\\模板写数据.xlsx";String templateFileName = "C:\\Users\\13631\\Desktop\\模板.xlsx";try (ExcelWriter excelWriter = EasyExcel.write(fileName).withTemplate(templateFileName).build()) {WriteSheet writeSheet = EasyExcel.writerSheet().build();excelWriter.fill(getData2(100), writeSheet);}
}

填充效果

自定义监听器

1、实体类(如上述实体类)

2、自定义监听器

Invoke和doAfterAllAnalysed是必选的

public class MyListener implements ReadListener<Product> {private TestMapper testMapper;private ArrayList<Product> list = new ArrayList<>();int sum=0;public MyListener(TestMapper testMapper) {this.testMapper = testMapper;}//每读一行,则调用该方法@Overridepublic void invoke(Product product, AnalysisContext analysisContext) {sum++;list.add(product);}//每读完整个excel,则调用该方法@Overridepublic void doAfterAllAnalysed(AnalysisContext analysisContext) {System.out.println("读取了"+sum+"行数据");}
}
@Test
void contextLoads() {String fileName = "C:\\Users\\13631\\Desktop\\simpleWriteTest1702391756908.xlsx";// 这里默认每次会读取100条数据 然后返回过来 直接调用使用数据就行// 具体需要返回多少行可以在`PageReadListener`的构造函数设置ExcelReader reader = EasyExcel.read(fileName, Product.class, new MyListener(new TestMapper())).build();ReadSheet sheet = EasyExcel.readSheet().build();reader.read(sheet);
}

Web上传下载

web中的读(上传)

后端

//上传

//上传

    @PostMapping("/upload")

    @ResponseBody

    public String upload(MultipartFile file) throws IOException {

        long start = System.currentTimeMillis();

        EasyExcel.read(file.getInputStream(), Product.class, new MyListener(productService)).sheet().doRead();

        long end = System.currentTimeMillis();

        System.out.println("耗时:"+(end-start)/1000+"秒");

        return "success";

    }

前端(vue2+Element)

<el-upload

  class="upload-demo"

  action="http://192.168.1.8:8007/excel/upload"

  :on-preview="handlePreview"

  :on-remove="handleRemove"

  :before-remove="beforeRemove"

  multiple

  :limit="3"

  :on-exceed="handleExceed"

  :file-list="fileList">

  <el-button size="small" type="primary">点击上传</el-button>

</el-upload>

效果

web中的写(下载)

后端

@GetMapping("download")public void download(HttpServletResponse response) throws IOException {// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postmanresponse.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");response.setCharacterEncoding("utf-8");// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系String fileName = URLEncoder.encode("测试", "UTF-8").replaceAll("\\+", "%20");response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");EasyExcel.write(response.getOutputStream(), Product.class).sheet("模板").doWrite(productService.list());}

前端

<button @click="download">导出Excel</button>methods:{download(){document.location.href="http://192.168.1.8:8007/excel/download";}},

效果

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

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

相关文章

洛阳展馆讲解器,博物馆讲解器,无线讲解器出租,会展讲解器

无线一对多团队解说器的特点比较多&#xff0c;比如&#xff1a;1、声音传输的时分可以反抗噪音等&#xff0c;不会遭到搅扰。2、便利性&#xff0c;像这么细巧的语音导览可以随身携带&#xff0c;十分的便利。3、可以免去很多繁琐的进程&#xff0c;变得简单高效。4、明晰性&a…

mysql索引失效场景与mysql优化方式

索引失效场景 联合索引不满足最左匹配原则 索引列参与了运算&#xff0c;会导致全表扫描&#xff0c;索引失效 索引列参使用了函数 模糊查询时&#xff08;like语句&#xff09;&#xff0c;模糊匹配的占位符位于条件的左侧 like %abc&#xff0c;like %abc% 都会导致失效…

【JVM的相关参数和调优】

文章目录 JVM 调优的参数类型一、标配参数二、X参数三、XX参数 JVM 调优的常用参数 JVM 调优的参数类型 一、标配参数 这类此参数在jdk的各个版本之间很少会变化&#xff0c;基本不改变 java -version&#xff0c;查看当前电脑上的jdk的版本信息 java -help&#xff0c;查看…

安卓(雷电)模拟器清除屏幕密码[亲测可用]

1、设置磁盘可写 启动模拟器&#xff0c;然后在模拟器的设置界面&#xff0c;设置磁盘共享为可写入&#xff0c;重启模拟器&#xff0c;如下图&#xff1a; 2、找到模拟器目录 返回桌面&#xff0c;右键模拟器图标&#xff0c;打开文件所在目录&#xff0c;如下图&#xff1a…

Casper Network (CSPR)2024 年愿景:通过投资促进增长

Casper Network (CSPR&#xff09;是行业领先的 Layer-1 区块链网络之一&#xff0c;通过推出了一系列值得关注的技术改进和倡议&#xff0c;已经为 2024 年做好了准备。 在过去的一年里&#xff0c;Casper Network (CSPR&#xff09;不断取得里程碑式的进展&#xff0c;例如推…

【小程序】微信小程序关联公众号(服务号)推送通知消息

一、背景 最近开发的一个小程序项目需要通过服务号来推送通知。但是在最开始开发小程序的时候并没有考虑到这个功能。 二、准备条件 预备知识&#xff1a; 小程序openid&#xff1a;小程序用户的唯一id 公众号openid&#xff1a;公众号用户的唯一id unionid&#xff1a;同…

Paddle模型转ONNX

深度学习模型在硬件加速器上的部署常常要用到ONNX&#xff08;Open Neural Network Exchange&#xff0c;开放神经网络交换&#xff09;格式&#xff0c;也可以通过ONNX实现不同AI框架&#xff08;如Pytorch、TensorFlow、Caffe2、PaddlePaddle等&#xff09;之间的模型转换。 …

Transformer详解【学习笔记】

文章目录 1、Transformer绪论2、Encoders和Decoder2.1 Encoders2.1.1 输入部分2.1.2 多头注意力机制2.1.3 残差2.1.4 LayNorm&#xff08;Layer Normalization&#xff09;2.1.5 前馈神经网路 2.2 Decoder2.2.1 多头注意力机制2.2.2 交互层 1、Transformer绪论 Transformer在做…

为什么企业容易陷入“自嗨式营销”,媒介盒子分析

互联网时代&#xff0c;各类信息都传播的非常快&#xff0c;同时信息技术的成熟也让许多企业可以监测广告效果&#xff0c;比如曝光、互动、转化等都可以通过数据体现&#xff0c;然而很多企业在营销过程中却发现&#xff0c;大部分的钱、精力、人力等都被浪费了。出现这种情况…

响应式编程WebFlux基础API

WebFlux的工作流程 在WebFlux中&#xff0c;主要的组件包括&#xff1a; Reactor: Reactor是WebFlux底层使用的响应式编程库&#xff0c;提供了Mono和Flux这两种响应式类型&#xff0c;分别用于表示0-1个和0-N个异步序列元素。WebHandler: 是处理请求的核心接口&#xff0c;所…

Git的简单使用说明

Git入门教程 git的最主要的作用&#xff1a;版本控制&#xff0c;协助开发 一.版本控制分类 ​​ 1.本地版本控制 ​​ 2.集中版本控制 ​​ 所有的版本数据都存在服务器上&#xff0c;用户的本地只有自己以前所同步的版本&#xff0c;如果不连网的话&#xff0c;用户就看不…

制作 Kali 可启动 USB 驱动器

Kali USB驱动器&#xff0c;轻松安全&#xff0c;获取最新镜像&#xff0c;开始强大的安全测试&#xff01; Kali 可启动 USB 驱动器的优点&#xff1a; 不会更改主机系统的硬盘驱动器或已安装的操作系统&#xff0c;并且要返回正常操作&#xff0c;您只需删除“Kali Live”U…

模型评估:超参数调优

对于很多算法工程师来说&#xff0c;超参数调优是一件非常头疼的事情。除了根据经验设定所谓的“合理值”之外&#xff0c;一般很难找到合理的方法去寻找超参数的最优取值。而与此同时&#xff0c;超参数对于模型效果的影响又至关重要。有没有一些可行的办法去进行超参数的调优…

Qt 6之七:学习资源

Qt 6之七&#xff1a;学习资源 Qt是一种跨平台的C应用程序开发框架&#xff0c;它提供了一套丰富的工具和库&#xff0c;可以帮助开发者快速构建跨平台的应用程序&#xff0c;用于开发图形用户界面&#xff08;GUI&#xff09;和非GUI应用程序。 Qt 6之一&#xff1a;简介、安…

全国(山东、安徽)职业技能大赛--信息安全管理与评估Apache配置评估题目+WP解析+环境

🍬 博主介绍👨‍🎓 博主介绍:大家好,我是 hacker-routing ,很高兴认识大家~ ✨主攻领域:【渗透领域】【应急响应】 【python】 【VulnHub靶场复现】【面试分析】 🎉点赞➕评论➕收藏 == 养成习惯(一键三连)😋 🎉欢迎关注💗一起学习👍一起讨论⭐️一起进步…

小手也能用的高性能鼠标,自定义空间还挺高,雷柏VT9Pro mini上手

今年搭载PAW3395传感器的电竞鼠标很受欢迎&#xff0c;雷柏就出了不少型号&#xff0c;满足各种喜好的玩家选择&#xff0c;像是近期新出的搭载3395高定版的VT9Pro和VT9Pro mini&#xff0c;就在轻量化的基础上&#xff0c;满足了各种手型的玩家的使用需要&#xff0c;而且价格…

Whale 帷幄创始人叶生晅:AIGC 时代,营销的范式变了丨未来 AI 谈

「未来 AI 谈」是「Marteker 营销技术官」联合「Digital Frontier 首席数字官」共同发起的一档对话栏目&#xff0c;旨在探讨生成式 AI 的崛起对泛营销技术和营销自动化带来的影响&#xff0c;以期帮助全行业探索 AIGC 时代的新营销之路。 本期嘉宾&#xff1a;「Whale 帷幄」创…

Linux中DNS域名解析服务及实验

一、DNS介绍 1、DNS 是域名系统&#xff0c;应用层协议&#xff0c;是互联网的一项服务&#xff0c;是将域名转换成网络可以识别的IP地址&#xff0c;再通过IP地址访问主机。这种由文字组成的名称更容易记忆。 DNS是“域名系统"的英文缩写。它作为将域名和IP地址相互映…

如何提高匹配的精确度(多次学习)

我们工业自动化中&#xff0c;视觉软件匹配&#xff0c;都是学习一次&#xff0c;比如找到轮廓&#xff0c;旋转360度&#xff0c;也就是有360个轮廓&#xff0c;然后到图像中去找任意角度的目标。 这样的学习并不能一而概括全。 所以&#xff0c;我借鉴ai的方法&#xff0c;…

C语言:高地址和低地址、高字节与低字节、大小端模式的转换、存储顺序

https://blog.csdn.net/oqqHuTu12345678/article/details/82823890/ 和另外一篇栈的生长、存放顺序一样&#xff0c;一般描述栈的方向是相反的&#xff0c;即栈底在下&#xff0c;栈顶在上。注意大小端存储方式&#xff0c;简单讲小端是低字节低地址&#xff0c;高字节高地址&…