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

关于EasyExcel导入数据时表格日期格式识别为数字问题

参考官方地址

自定义日期转字符串转换器

/*** 自定义excel日期转换器** @author li* @date 2024-05-29*/
public class CustomStringDateConverter implements Converter<String> {@Overridepublic Class<?> supportJavaTypeKey() {return String.class;}@Overridepublic CellDataTypeEnum supportExcelTypeKey() {return CellDataTypeEnum.STRING;}/*** 读调用*/@Overridepublic String convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {Date date = null;//单元格格式为 文本类型if (CellDataTypeEnum.STRING.equals(cellData.getType())) {date = DateTimeUtil.parseMatched(cellData.getStringValue());if(date==null){throw new DmeoException("日期数据解析失败,请检查导入模板数据");}}//单元格格式为标准日期类型try {if (CellDataTypeEnum.NUMBER.equals(cellData.getType())) {if (contentProperty == null || contentProperty.getDateTimeFormatProperty() == null) {date = DateUtils.getJavaDate(cellData.getNumberValue().doubleValue(),globalConfiguration.getUse1904windowing());} else {date = DateUtils.getJavaDate(cellData.getNumberValue().doubleValue(),contentProperty.getDateTimeFormatProperty().getUse1904windowing());}}} catch (Exception e) {throw new DmeoException("日期数据解析失败,请检查导入模板数据");}return DateTimeUtil.format(date, FORMAT_SHORT);}/*** 写调用*/@Overridepublic WriteCellData<?> convertToExcelData(WriteConverterContext<String> context) {return new WriteCellData<>(context.getValue());}}
   @ExcelProperty(value = "日期",converter = CustomStringDateConverter.class)

控制层异常捕获,需要使用 e.getCause().getMessage()才能取到自己抛出的异常信息

       catch (ExcelDataConvertException e) {String msg = "第" + e.getRowIndex() + "行,第" + e.getColumnIndex() + "列"+e.getCause().getMessage()+"," +"解析字符数据为:"+ e.getCellData().getStringValue();} 

官方日期工具类

import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.regex.Pattern;import com.alibaba.excel.util.BooleanUtils;
import com.alibaba.excel.util.MapUtils;
import org.apache.poi.ss.usermodel.DateUtil;
import org.springframework.util.StringUtils;/*** 官方日期工具类***/
public class DateUtils {/*** Is a cache of dates*/private static final ThreadLocal<Map<Short, Boolean>> DATE_THREAD_LOCAL =new ThreadLocal<>();/*** Is a cache of dates*/private static final ThreadLocal<Map<String, SimpleDateFormat>> DATE_FORMAT_THREAD_LOCAL =new ThreadLocal<>();/*** The following patterns are used in {@link #isADateFormat(Short, String)}*/private static final Pattern date_ptrn1 = Pattern.compile("^\\[\\$\\-.*?\\]");private static final Pattern date_ptrn2 = Pattern.compile("^\\[[a-zA-Z]+\\]");private static final Pattern date_ptrn3a = Pattern.compile("[yYmMdDhHsS]");// add "\u5e74 \u6708 \u65e5" for Chinese/Japanese date format:2017 \u5e74 2 \u6708 7 \u65e5private static final Pattern date_ptrn3b =Pattern.compile("^[\\[\\]yYmMdDhHsS\\-T/\u5e74\u6708\u65e5,. :\"\\\\]+0*[ampAMP/]*$");// elapsed time patterns: [h],[m] and [s]private static final Pattern date_ptrn4 = Pattern.compile("^\\[([hH]+|[mM]+|[sS]+)\\]");// for format which start with "[DBNum1]" or "[DBNum2]" or "[DBNum3]" could be a Chinese dateprivate static final Pattern date_ptrn5 = Pattern.compile("^\\[DBNum(1|2|3)\\]");// for format which start with "年" or "月" or "日" or "时" or "分" or "秒" could be a Chinese dateprivate static final Pattern date_ptrn6 = Pattern.compile("(年|月|日|时|分|秒)+");public static final String DATE_FORMAT_10 = "yyyy-MM-dd";public static final String DATE_FORMAT_14 = "yyyyMMddHHmmss";public static final String DATE_FORMAT_16 = "yyyy-MM-dd HH:mm";public static final String DATE_FORMAT_16_FORWARD_SLASH = "yyyy/MM/dd HH:mm";public static final String DATE_FORMAT_17 = "yyyyMMdd HH:mm:ss";public static final String DATE_FORMAT_19 = "yyyy-MM-dd HH:mm:ss";public static final String DATE_FORMAT_19_FORWARD_SLASH = "yyyy/MM/dd HH:mm:ss";private static final String MINUS = "-";public static String defaultDateFormat = DATE_FORMAT_19;public static String defaultLocalDateFormat = DATE_FORMAT_10;private DateUtils() {}/*** convert string to date** @param dateString* @param dateFormat* @return* @throws ParseException*/public static Date parseDate(String dateString, String dateFormat) throws ParseException {if (StringUtils.isEmpty(dateFormat)) {dateFormat = switchDateFormat(dateString);}return getCacheDateFormat(dateFormat).parse(dateString);}/*** convert string to date** @param dateString* @param dateFormat* @param local* @return*/public static LocalDateTime parseLocalDateTime(String dateString, String dateFormat, Locale local) {if (StringUtils.isEmpty(dateFormat)) {dateFormat = switchDateFormat(dateString);}if (local == null) {return LocalDateTime.parse(dateString, DateTimeFormatter.ofPattern(dateFormat));} else {return LocalDateTime.parse(dateString, DateTimeFormatter.ofPattern(dateFormat, local));}}/*** convert string to date** @param dateString* @param dateFormat* @param local* @return*/public static LocalDate parseLocalDate(String dateString, String dateFormat, Locale local) {if (StringUtils.isEmpty(dateFormat)) {dateFormat = switchDateFormat(dateString);}if (local == null) {return LocalDate.parse(dateString, DateTimeFormatter.ofPattern(dateFormat));} else {return LocalDate.parse(dateString, DateTimeFormatter.ofPattern(dateFormat, local));}}/*** convert string to date** @param dateString* @return* @throws ParseException*/public static Date parseDate(String dateString) throws ParseException {return parseDate(dateString, switchDateFormat(dateString));}/*** switch date format** @param dateString* @return*/public static String switchDateFormat(String dateString) {int length = dateString.length();switch (length) {case 19:if (dateString.contains(MINUS)) {return DATE_FORMAT_19;} else {return DATE_FORMAT_19_FORWARD_SLASH;}case 16:if (dateString.contains(MINUS)) {return DATE_FORMAT_16;} else {return DATE_FORMAT_16_FORWARD_SLASH;}case 17:return DATE_FORMAT_17;case 14:return DATE_FORMAT_14;case 10:return DATE_FORMAT_10;default:throw new IllegalArgumentException("can not find date format for:" + dateString);}}/*** Format date* <p>* yyyy-MM-dd HH:mm:ss** @param date* @return*/public static String format(Date date) {return format(date, null);}/*** Format date** @param date* @param dateFormat* @return*/public static String format(Date date, String dateFormat) {if (date == null) {return null;}if (StringUtils.isEmpty(dateFormat)) {dateFormat = defaultDateFormat;}return getCacheDateFormat(dateFormat).format(date);}/*** Format date** @param date* @param dateFormat* @return*/public static String format(LocalDateTime date, String dateFormat, Locale local) {if (date == null) {return null;}if (StringUtils.isEmpty(dateFormat)) {dateFormat = defaultDateFormat;}if (local == null) {return date.format(DateTimeFormatter.ofPattern(dateFormat));} else {return date.format(DateTimeFormatter.ofPattern(dateFormat, local));}}/*** Format date** @param date* @param dateFormat* @return*/public static String format(LocalDate date, String dateFormat) {return format(date, dateFormat, null);}/*** Format date** @param date* @param dateFormat* @return*/public static String format(LocalDate date, String dateFormat, Locale local) {if (date == null) {return null;}if (StringUtils.isEmpty(dateFormat)) {dateFormat = defaultLocalDateFormat;}if (local == null) {return date.format(DateTimeFormatter.ofPattern(dateFormat));} else {return date.format(DateTimeFormatter.ofPattern(dateFormat, local));}}/*** Format date** @param date* @param dateFormat* @return*/public static String format(LocalDateTime date, String dateFormat) {return format(date, dateFormat, null);}/*** Format date** @param date* @param dateFormat* @return*/public static String format(BigDecimal date, Boolean use1904windowing, String dateFormat) {if (date == null) {return null;}LocalDateTime localDateTime = DateUtil.getLocalDateTime(date.doubleValue(),BooleanUtils.isTrue(use1904windowing), true);return format(localDateTime, dateFormat);}private static DateFormat getCacheDateFormat(String dateFormat) {Map<String, SimpleDateFormat> dateFormatMap = DATE_FORMAT_THREAD_LOCAL.get();if (dateFormatMap == null) {dateFormatMap = new HashMap<String, SimpleDateFormat>();DATE_FORMAT_THREAD_LOCAL.set(dateFormatMap);} else {SimpleDateFormat dateFormatCached = dateFormatMap.get(dateFormat);if (dateFormatCached != null) {return dateFormatCached;}}SimpleDateFormat simpleDateFormat = new SimpleDateFormat(dateFormat);dateFormatMap.put(dateFormat, simpleDateFormat);return simpleDateFormat;}/*** Given an Excel date with either 1900 or 1904 date windowing,* converts it to a java.util.Date.** Excel Dates and Times are stored without any timezone* information. If you know (through other means) that your file* uses a different TimeZone to the system default, you can use* this version of the getJavaDate() method to handle it.** @param date             The Excel date.* @param use1904windowing true if date uses 1904 windowing,*                         or false if using 1900 date windowing.* @return Java representation of the date, or null if date is not a valid Excel date*/public static Date getJavaDate(double date, boolean use1904windowing) {//To calculate the Date, in the use of `org.apache.poi.ss.usermodel.DateUtil.getJavaDate(double, boolean,// java.util.TimeZone, boolean), Date when similar `2023-01-01 00:00:00.500`, returns the`2023-01-01// 00:00:01`, but excel in fact shows the `2023-01-01 00:00:00`.// `org.apache.poi.ss.usermodel.DateUtil.getLocalDateTime(double, boolean, boolean)` There is no problem.return Date.from(getLocalDateTime(date, use1904windowing).atZone(ZoneId.systemDefault()).toInstant());}/*** Given an Excel date with either 1900 or 1904 date windowing,* converts it to a java.time.LocalDateTime.** Excel Dates and Times are stored without any timezone* information. If you know (through other means) that your file* uses a different TimeZone to the system default, you can use* this version of the getJavaDate() method to handle it.** @param date             The Excel date.* @param use1904windowing true if date uses 1904 windowing,*                         or false if using 1900 date windowing.* @return Java representation of the date, or null if date is not a valid Excel date*/public static LocalDateTime getLocalDateTime(double date, boolean use1904windowing) {return DateUtil.getLocalDateTime(date, use1904windowing, true);}/*** Given an Excel date with either 1900 or 1904 date windowing,* converts it to a java.time.LocalDate.** Excel Dates and Times are stored without any timezone* information. If you know (through other means) that your file* uses a different TimeZone to the system default, you can use* this version of the getJavaDate() method to handle it.** @param date             The Excel date.* @param use1904windowing true if date uses 1904 windowing,*                         or false if using 1900 date windowing.* @return Java representation of the date, or null if date is not a valid Excel date*/public static LocalDate getLocalDate(double date, boolean use1904windowing) {LocalDateTime localDateTime = getLocalDateTime(date, use1904windowing);return localDateTime == null ? null : localDateTime.toLocalDate();}/*** Determine if it is a date format.** @param formatIndex* @param formatString* @return*/public static boolean isADateFormat(Short formatIndex, String formatString) {if (formatIndex == null) {return false;}Map<Short, Boolean> isDateCache = DATE_THREAD_LOCAL.get();if (isDateCache == null) {isDateCache = MapUtils.newHashMap();DATE_THREAD_LOCAL.set(isDateCache);} else {Boolean isDatecachedDataList = isDateCache.get(formatIndex);if (isDatecachedDataList != null) {return isDatecachedDataList;}}boolean isDate = isADateFormatUncached(formatIndex, formatString);isDateCache.put(formatIndex, isDate);return isDate;}/*** Determine if it is a date format.** @param formatIndex* @param formatString* @return*/public static boolean isADateFormatUncached(Short formatIndex, String formatString) {// First up, is this an internal date format?if (isInternalDateFormat(formatIndex)) {return true;}if (StringUtils.isEmpty(formatString)) {return false;}String fs = formatString;final int length = fs.length();StringBuilder sb = new StringBuilder(length);for (int i = 0; i < length; i++) {char c = fs.charAt(i);if (i < length - 1) {char nc = fs.charAt(i + 1);if (c == '\\') {switch (nc) {case '-':case ',':case '.':case ' ':case '\\':// skip current '\' and continue to the next charcontinue;}} else if (c == ';' && nc == '@') {i++;// skip ";@" dupletscontinue;}}sb.append(c);}fs = sb.toString();// short-circuit if it indicates elapsed time: [h], [m] or [s]if (date_ptrn4.matcher(fs).matches()) {return true;}// If it starts with [DBNum1] or [DBNum2] or [DBNum3]// then it could be a Chinese datefs = date_ptrn5.matcher(fs).replaceAll("");// If it starts with [$-...], then could be a date, but// who knows what that starting bit is all aboutfs = date_ptrn1.matcher(fs).replaceAll("");// If it starts with something like [Black] or [Yellow],// then it could be a datefs = date_ptrn2.matcher(fs).replaceAll("");// You're allowed something like dd/mm/yy;[red]dd/mm/yy// which would place dates before 1900/1904 in red// For now, only consider the first onefinal int separatorIndex = fs.indexOf(';');if (0 < separatorIndex && separatorIndex < fs.length() - 1) {fs = fs.substring(0, separatorIndex);}// Ensure it has some date letters in it// (Avoids false positives on the rest of pattern 3)if (!date_ptrn3a.matcher(fs).find()) {return false;}// If we get here, check it's only made up, in any case, of:// y m d h s - \ / , . : [ ] T// optionally followed by AM/PMboolean result = date_ptrn3b.matcher(fs).matches();if (result) {return true;}result = date_ptrn6.matcher(fs).find();return result;}/*** Given a format ID this will check whether the format represents an internal excel date format or not.** @see #isADateFormat(Short, String)*/public static boolean isInternalDateFormat(short format) {switch (format) {// Internal Date Formats as described on page 427 in// Microsoft Excel Dev's Kit...// 14-22case 0x0e:case 0x0f:case 0x10:case 0x11:case 0x12:case 0x13:case 0x14:case 0x15:case 0x16:// 27-36case 0x1b:case 0x1c:case 0x1d:case 0x1e:case 0x1f:case 0x20:case 0x21:case 0x22:case 0x23:case 0x24:// 45-47case 0x2d:case 0x2e:case 0x2f:// 50-58case 0x32:case 0x33:case 0x34:case 0x35:case 0x36:case 0x37:case 0x38:case 0x39:case 0x3a:return true;}return false;}public static void removeThreadLocalCache() {DATE_THREAD_LOCAL.remove();DATE_FORMAT_THREAD_LOCAL.remove();}
}

相关文章:

关于EasyExcel导入数据时表格日期格式识别为数字问题

参考官方地址 自定义日期转字符串转换器 /*** 自定义excel日期转换器** author li* date 2024-05-29*/ public class CustomStringDateConverter implements Converter<String> {Overridepublic Class<?> supportJavaTypeKey() {return String.class;}Overridep…...

高通Android 12/13打开省电模式宏开关

1、添加到SettingsProvider配置项宏开关 默认节电助手自动开启百分比battery saver frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java private void loadGlobalSettings(SQLiteDatabase db) {在该方法中添加 ......final i…...

2023年西安交通大学校赛(E-雪中楼)

E.雪中楼 如果算出按南北的序列&#xff0c;再转成从低到高的编号序列&#xff0c;岂不是太麻烦了&#xff0c;幸好&#xff0c;没有在这方面费长时间&#xff0c;而是意识到&#xff0c;本质就是要从低到高的编号序列&#xff0c;所以我就按样例模拟了一下&#xff0c;当a[i]0…...

如何在vue2中使用tailwind

查看官方文档&#xff0c;不要去看过时的文章&#xff01; 使用官网推荐的第一个安装方法 Installation - Tailwind CSS vue版本&#xff1a;2.6.10 1. 安装tailwind的包 npm install -D tailwindcss npx tailwindcss init 2. tailwind.config.js 文件中的content是你需要…...

【OrangePi AIpro】开箱初体验以及OAK深度相机测试

1. 简介 Orangepi AIPRO 是一款采用昇腾AI技术路线&#xff0c;集成4核64位处理器AI处理器的单板计算机&#xff0c;集成图形处理器&#xff0c;支持8TOPS AI算力&#xff0c;拥有8GB/16GB LPDDR4X&#xff0c;可以外接eMMC模块&#xff0c;支持双4K高清输出。 Orange Pi AIpr…...

滑动窗口模板(Java)

题目描述 有一个长为 &#x1d45b; 的序列 &#x1d44e;&#xff0c;以及一个大小为 &#x1d458; 的窗口。现在这个从左边开始向右滑动&#xff0c;每次滑动一个单位&#xff0c;求出每次滑动后窗口中的最大值和最小值。 例如&#xff0c;对于序列 [1,3,−1,−3,5,3,6,7] …...

transformers.BertTokenizer入门使用

教程link 示例代码 from transformers import OpenAIGPTLMHeadModel, GPT2LMHeadModel, BertTokenizer import torch tokenizer BertTokenizer.from_pretrained("thu-coai/CDial-GPT_LCCC-large") model OpenAIGPTLMHeadModel.from_pretrained("thu-coai/CD…...

快乐数-力扣

使用一个set来存储遇到的每个数&#xff0c;如果遇到的数在set中&#xff0c;那么说明这个数不是快乐数&#xff0c;否则一直循环下去&#xff0c;直到n 1结束循环&#xff0c;表示这个数是个快乐数。 需要注意的是&#xff0c;给定一个数 n, 怎样对这个数 n 进行每一位求和。…...

Git标签的使用

天行健&#xff0c;君子以自强不息&#xff1b;地势坤&#xff0c;君子以厚德载物。 每个人都有惰性&#xff0c;但不断学习是好好生活的根本&#xff0c;共勉&#xff01; 文章均为学习整理笔记&#xff0c;分享记录为主&#xff0c;如有错误请指正&#xff0c;共同学习进步。…...

【uni-app】Pinia 持久化

小程序端 Pinia 持久化 说明&#xff1a;Pinia 用法与 Vue3 项目完全一致&#xff0c;uni-app 项目仅需解决持久化插件兼容性问题。 持久化存储插件 安装持久化存储插件&#xff1a; pinia-plugin-persistedstate pnpm i pinia-plugin-persistedstate插件默认使用 localStor…...

Flink 窗口

窗口&#xff08;Window&#xff09; 窗口是处理无限流的核心。 窗口将流分割成有限大小的“桶”&#xff0c;我们可以计算窗口中的数据。 窗口程序一般有键控流&#xff08;keyed streams&#xff09;的窗口程序 和 非键控流&#xff08;non-keyed streams&#xff09;的窗口…...

基于大模型和RAG技术实现的开源项目

基于大模型和RAG技术实现的开源项目 为解决大模型的不足&#xff0c;使用RAG技术增强大模型生成内容的针对性和可读性能力&#xff0c;有很多不错的开源项目。例如下面的项目。 1 ragflow 优点&#xff1a;可以对文档和知识库进行管理&#xff0c;构建不同的知识库&#xff…...

mac m1安装homebrew管理工具(brew命令)完整流程

背景 因为mac上的brew很久没用了&#xff0c;版本非常旧&#xff0c;随着mac os的更新&#xff0c;本机的homebrew大部分的功能都无法使用&#xff0c;幸好过去通过brew安装的工具比较少&#xff0c;于是决定重新安装一遍brew。 卸载旧版brew 法一&#xff1a;通过使用线上…...

Liunx学习随笔

Linux学习随笔 Linux学习随笔一.前期准备1.安装Vmware Workstation软件2.下载linux镜像3.安装操作系统4.配置静态ip5.下载安装远程连接工具 二.语法2.1 linux哲学思想(原则)2.2 小命令 夕阳无限好&#xff0c;只是近黄昏&#xff0c;时隔一年&#xff0c;重新提笔 没有比脚更远…...

mac中文件夹怎么显示.git隐藏文件

1. 打开终端应用程序&#xff0c;然后进入到包含.git文件夹的目录&#xff0c;可以使用以下命令来显示隐藏文件和文件夹&#xff1a; defaults write com.apple.finder AppleShowAllFiles YES 2. 然后重启 Finder&#xff1a; killall Finder...

【PB案例学习笔记】-13 徒手做个电子时钟

写在前面 这是PB案例学习笔记系列文章的第11篇&#xff0c;该系列文章适合具有一定PB基础的读者。 通过一个个由浅入深的编程实战案例学习&#xff0c;提高编程技巧&#xff0c;以保证小伙伴们能应付公司的各种开发需求。 文章中设计到的源码&#xff0c;小凡都上传到了gite…...

Java多线程——线程强制执行

Join合并线程&#xff0c;待此线程执行完成后&#xff0c;再执行其他线程&#xff0c;其他线程阻塞。 可以想象成插队。 代码演示&#xff1a; //测试Join方法 //想象为插队 public class TestJoin implements Runnable{Overridepublic void run() {for (int i 0; i < 1…...

虹科Pico汽车示波器 | 免拆诊断案例 | 2017款奔驰E300L车行驶中发动机偶尔无法加速

故障现象 一辆2017款奔驰E300L车&#xff0c;搭载274 920发动机&#xff0c;累计行驶里程约为21万km。车主反映&#xff0c;该车行驶中发动机偶尔无法加速&#xff0c;且车辆发闯。 故障诊断 用故障检测仪检测&#xff0c;发动机控制单元&#xff08;N3/10&#xff09;中存储…...

华发股份:加强业务协同 新政下项目热销

“5.17”楼市政策出台后&#xff0c;各地密集落地执行。5月27—28日&#xff0c;上海、广州、深圳三个一线城市跟进落地“517”新政。上海发布《关于优化本市房地产市场平稳健康发展政策措施的通知》&#xff0c;共计9条调整政策&#xff0c;涵盖外地户籍、人才、单身、婚否、企…...

RedHat9网络配置设计

目录 一、实验目的 二、实验过程 1、配置新网络接口 2、多网卡配置网络 3、网络接口的绑定&#xff0c;进行远程访问 4、配置网络接口的组合 一、实验目的 本次实验的目的是使用nmcli命令工具配置网络&#xff0c;ens160配置多个网卡&#xff0c;进行网络接口的绑定与组合…...

React Native 开发环境搭建(全平台详解)

React Native 开发环境搭建&#xff08;全平台详解&#xff09; 在开始使用 React Native 开发移动应用之前&#xff0c;正确设置开发环境是至关重要的一步。本文将为你提供一份全面的指南&#xff0c;涵盖 macOS 和 Windows 平台的配置步骤&#xff0c;如何在 Android 和 iOS…...

工业安全零事故的智能守护者:一体化AI智能安防平台

前言&#xff1a; 通过AI视觉技术&#xff0c;为船厂提供全面的安全监控解决方案&#xff0c;涵盖交通违规检测、起重机轨道安全、非法入侵检测、盗窃防范、安全规范执行监控等多个方面&#xff0c;能够实现对应负责人反馈机制&#xff0c;并最终实现数据的统计报表。提升船厂…...

【WiFi帧结构】

文章目录 帧结构MAC头部管理帧 帧结构 Wi-Fi的帧分为三部分组成&#xff1a;MAC头部frame bodyFCS&#xff0c;其中MAC是固定格式的&#xff0c;frame body是可变长度。 MAC头部有frame control&#xff0c;duration&#xff0c;address1&#xff0c;address2&#xff0c;addre…...

UE5 学习系列(三)创建和移动物体

这篇博客是该系列的第三篇&#xff0c;是在之前两篇博客的基础上展开&#xff0c;主要介绍如何在操作界面中创建和拖动物体&#xff0c;这篇博客跟随的视频链接如下&#xff1a; B 站视频&#xff1a;s03-创建和移动物体 如果你不打算开之前的博客并且对UE5 比较熟的话按照以…...

STM32F4基本定时器使用和原理详解

STM32F4基本定时器使用和原理详解 前言如何确定定时器挂载在哪条时钟线上配置及使用方法参数配置PrescalerCounter ModeCounter Periodauto-reload preloadTrigger Event Selection 中断配置生成的代码及使用方法初始化代码基本定时器触发DCA或者ADC的代码讲解中断代码定时启动…...

SpringBoot+uniapp 的 Champion 俱乐部微信小程序设计与实现,论文初版实现

摘要 本论文旨在设计并实现基于 SpringBoot 和 uniapp 的 Champion 俱乐部微信小程序&#xff0c;以满足俱乐部线上活动推广、会员管理、社交互动等需求。通过 SpringBoot 搭建后端服务&#xff0c;提供稳定高效的数据处理与业务逻辑支持&#xff1b;利用 uniapp 实现跨平台前…...

Matlab | matlab常用命令总结

常用命令 一、 基础操作与环境二、 矩阵与数组操作(核心)三、 绘图与可视化四、 编程与控制流五、 符号计算 (Symbolic Math Toolbox)六、 文件与数据 I/O七、 常用函数类别重要提示这是一份 MATLAB 常用命令和功能的总结,涵盖了基础操作、矩阵运算、绘图、编程和文件处理等…...

Android第十三次面试总结(四大 组件基础)

Activity生命周期和四大启动模式详解 一、Activity 生命周期 Activity 的生命周期由一系列回调方法组成&#xff0c;用于管理其创建、可见性、焦点和销毁过程。以下是核心方法及其调用时机&#xff1a; ​onCreate()​​ ​调用时机​&#xff1a;Activity 首次创建时调用。​…...

使用Matplotlib创建炫酷的3D散点图:数据可视化的新维度

文章目录 基础实现代码代码解析进阶技巧1. 自定义点的大小和颜色2. 添加图例和样式美化3. 真实数据应用示例实用技巧与注意事项完整示例(带样式)应用场景在数据科学和可视化领域,三维图形能为我们提供更丰富的数据洞察。本文将手把手教你如何使用Python的Matplotlib库创建引…...

人机融合智能 | “人智交互”跨学科新领域

本文系统地提出基于“以人为中心AI(HCAI)”理念的人-人工智能交互(人智交互)这一跨学科新领域及框架,定义人智交互领域的理念、基本理论和关键问题、方法、开发流程和参与团队等,阐述提出人智交互新领域的意义。然后,提出人智交互研究的三种新范式取向以及它们的意义。最后,总结…...