java中%-30.12f是什么意思

时间: 2023-04-27 15:04:16 浏览: 175
%-30.12f是Java中格式化输出浮点数的一种方式。其中%表示格式化输出的开始,-表示左对齐,30表示输出的总宽度为30个字符,.12表示小数点后保留12位,f表示输出的是浮点数。因此,%-30.12f表示输出一个左对齐、总宽度为30个字符、小数点后保留12位的浮点数。
相关问题

"C:\Program Files\Java\jdk-1.8\bin\java.exe" -Dmaven.multiModuleProjectDirectory=F:\workmode\h5xjxj\ech-log-server\ech-log-api -Djansi.passthrough=true -Dmaven.home=F:\dev_software\apache-maven-3.6.3 -Dclassworlds.conf=F:\dev_software\apache-maven-3.6.3\bin\m2.conf "-Dmaven.ext.class.path=F:\idea2023\IntelliJ IDEA 2023.1.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:F:\idea2023\IntelliJ IDEA 2023.1.2\lib\idea_rt.jar=53993:F:\idea2023\IntelliJ IDEA 2023.1.2\bin" -Dfile.encoding=UTF-8 -classpath F:\dev_software\apache-maven-3.6.3\boot\plexus-classworlds-2.6.0.jar;F:\dev_software\apache-maven-3.6.3\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2023.1.2 -s C:\Users\田文成\.m2\settings_XJ_git.xml -Dmaven.repo.local=F:\dev_software\repository\localRepository\localRepository install [INFO] Scanning for projects... [INFO] [INFO] -----------------------< com.ai.ecs:ech-log-api >----------------------- [INFO] Building ech-log-api 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- Downloading from nexus1: http://mgr.devstone.cn:18080/nexus/content/groups/public/org/apache/maven/plugins/maven-compiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 22.280 s [INFO] Finished at: 2023-07-12T16:30:43+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to nexus1 (http://mgr.devstone.cn:18080/nexus/content/groups/public): Transfer failed for http://mgr.devstone.cn:18080/nexus/content/groups/public/org/apache/maven/plugins/maven-compiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.pom: Connect to mgr.devstone.cn:18080 [mgr.devstone.cn/218.94.91.233] failed: Connection timed out: connect -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException 刚导入项目依赖报错

根据错误提示,你的项目在下载依赖时遇到了问题。具体来说,它无法解析或下载以下插件及其依赖项: ``` Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to nexus1 (http://mgr.devstone.cn:18080/nexus/content/groups/public): Transfer failed for http://mgr.devstone.cn:18080/nexus/content/groups/public/org/apache/maven/plugins/maven-compiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.pom: Connect to mgr.devstone.cn:18080 [mgr.devstone.cn/218.94.91.233] failed: Connection timed out: connect -> [Help 1] ``` 根据错误信息,问题可能是由于以下原因之一引起的: 1. 网络连接问题:由于连接超时导致无法从指定的URL下载所需的插件和依赖项。请确保你的网络连接正常,并且可以访问指定的URL(http://mgr.devstone.cn:18080)。 2. 仓库配置问题:你的项目可能配置了一个不可用的仓库(nexus1),导致无法下载插件和依赖项。请检查你的项目配置文件(如settings.xml)或构建脚本,确保仓库配置正确。 3. Maven中心仓库问题:如果你使用的是默认的Maven中心仓库(https://repo1.maven.org/maven2/),请尝试清理Maven本地仓库缓存(通常位于`~/.m2/repository/`目录下),然后重新构建项目。 解决这个问题的方法包括: 1. 检查网络连接:确保你的网络连接正常,并且可以访问指定的URL(http://mgr.devstone.cn:18080)。 2. 检查仓库配置:检查你的项目配置文件(如settings.xml)或构建脚本,确保仓库配置正确,并且指向可用的仓库。 3. 清理本地仓库缓存:如果你使用的是默认的Maven中心仓库,尝试清理Maven本地仓库缓存,然后重新构建项目。 如果问题仍然存在,建议进一步排查网络连接问题,或联系你的开发团队或仓库管理员以获取更多帮助。

|original SQL: DELETE FROM t_nwaf_device_state WHERE time < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 30 DAY), '%Y-%m-%d') 2023-06-12 14:30:00.006|57f6c9a9a02f4636b3910fbf4639fe92.141.16865514000000069|scheduling-1|DEBUG|c.d.w.i.MybatisPlusOperationLogInterceptor|SQL to parse, SQL: DELETE FROM t_nwaf_device_state WHERE time < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 30 DAY), '%Y-%m-%d') 2023-06-12 14:30:00.006|57f6c9a9a02f4636b3910fbf4639fe92.141.16865514000000069|scheduling-1|INFO |com.damddos.waf.task.DeleteStateTask|nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: java.lang.UnsupportedOperationException ### Cause: java.lang.UnsupportedOperationException

根据您提供的信息,这是一个 MyBatisPlus 操作日志拦截器的输出,其中 SQL 语句是删除操作,删除表 t_nwaf_device_state 中时间字段小于当前时间 30 天之前的记录。异常提示是 org.apache.ibatis.exceptions.PersistenceException: Error updating database. Cause: java.lang.UnsupportedOperationException。这可能是由于对不支持的数据库操作进行了更新操作,或者数据库的驱动程序版本不兼容导致的。建议检查数据库操作是否正确,并确保使用的驱动程序版本与数据库兼容。

相关推荐

1 package com.alibaba.traffic.web; 2 3 import java.io.UnsupportedEncodingException; 4 import java.security.InvalidKeyException; 5 import java.security.NoSuchAlgorithmException; 6 7 import javax.crypto.Mac; 8 import javax.crypto.SecretKey; 9 import javax.crypto.spec.SecretKeySpec; 10 11 import org.apache.commons.codec.binary.Hex; 12 特别注意 附件 6 13 /** 14 * @author dongdong.fdd 15 * @date 2018/9/27 上午11:29 16 */ 17 public class T { 18 public static void main(String[] args) 19 throws InvalidKeyException, UnsupportedEncodingException, No SuchAlgorithmException { 20 long timestamp = System.currentTimeMillis() / 1000; 21 String paramValuesStr = "allAMAP-TRAFFIC-BRAIN10" + timestam p;//该值为排好序的参数的参数值拼接结果 22 String clientSecret = "testclientsecret";//该值为申请到的client Secret 23 24 Mac mac = Mac.getInstance("HmacSHA256"); 25 byte[] secretByte = clientSecret.getBytes("UTF-8"); 26 byte[] dataBytes = paramValuesStr.getBytes("UTF-8"); 27 28 SecretKey secretKey = new SecretKeySpec(secretByte,"HMACSHA2 56"); 29 mac.init(secretKey); 30 31 byte[] doFinal = mac.doFinal(dataBytes); 32 byte[] hexB = new Hex().encode(doFinal); 33 34 String digest = new String(hexB, "utf-8");//计算好的签名 26f2042cde2e9ca01d41ecdb27a91fd9b84f0263c411bcb13b195ec589096885 35 System.out.println(digest); 36 37 String resultUrl = "http://et-api.amap.com/index/cityRankin g?adcodes=all&clientKey=AMAP-TRAFFIC-BRAIN&size=10×tamp="+times tamp+"&digest=" + digest; 38 System.out.println(resultUrl); 39 } 将这段代码使用python实现

机试题:现有远传设备上行传输原始报文如下,请按照报文解析说明,使用Java语言进行编程,实现对原始报文的解析并能够以键值对的形式输出数据类型名称和数据解析值。(鼓励使用多种语言)。 原始报文:68 11 02 11 11 01 50 00 01 02 0C 98 3B 02 00 00 10 0C 94 3C 72 78 28 00 0C 3A 79 35 83 01 0B 69 62 32 01 06 6D 00 DE 31 CC 25 00 0C 98 3B 03 00 00 10 0C 94 3C 72 78 28 00 0C 3A 19 34 83 01 0B 69 91 32 01 06 6D 00 C0 32 CC 25 00 0F 报文解析说明: 数据开始 68h 固定68h表示数据开始 设备 ID 11h 01h 11h 11h 01h 50h 00h 00h 01h 设备 ID 例110111110150000001 正累积流量 0Ch DIF:8位BCD码,瞬时值 94h VIF:有副VIF,单位 0.01 m³ 3Bh VIFE:正向流量 78h 56h 34h 12h 123456.78 m³ 负累积流量 0Ch DIF:8位BCD码,瞬时值 94h VIF:有副VIF,单位 0.01 m³ 3Ch VIFE:反向流量 78h 56h 34h 12h 123456.78 m³ 水温 0Bh DIF:6位BCD码,瞬时值 59h VIF:进水温度,单位 0.01℃ 56h 34h 12h 1234.56℃ 瞬时流量 0Ch DIF:8位BCD码,瞬时值 3Ah VIF:体积流量(单位:1/10000 m³/h) 78h 56h 34h 12h 1234.5678 m³/h 负瞬时流量 0Ch DIF:8位BCD码,瞬时值 3Bh VIF:体积流量(单位:1/10000 m³/h) 78h 56h 34h 12h -1234.5678 m³/h 压力 0Bh DIF:6位BCD码,瞬时值 69h VIF:压力(单位:1/100bar = 1kPa) 56h 34h 12h 1234.56 kPa 累积运行时间 0Ch DIF:8位BCD码,瞬时值 26h VIF:工作时间(单位:h) 78h 56h 34h 12h 12345678h 实际日期时间 06h DIF:F 型数据,瞬时值 6Dh VIF:日期时间 0C 0E 30 87 28 00 2020-08-07T16:14:12Z 数据结束 0Fh 固定0F表示数据结束 注: 1、表中标红部分为设备可能上传的所有数据类型,但是所有数据数据类型不一定在一条报文中同时上传,而且在原始报文中数据类型也不一定按照表中顺序排列。 2、表中的实际日期时间,第一字节(标红部分)0C为秒,中间四个字节按下图解析,最后一个字节代表时区,下图为国标26831截图。

补全以下代码private String cid;// Course id, e.g., CS110. private String name;// Course name, e.g., Introduce to Java Programming. private Integer credit;// Credit of this course private GradingSchema gradingSchema; //Grading schema of this course // enum GradingSchema{FIVE_LEVEL, PASS_FAIL} private Integer capacity;// Course capacity. private Integer leftCapacity;// Course capacity left. You should update the left capacity when enrolling students. private Set<Timeslot> timeslots;// One course may have one or more timeslots. e.g., a lecture in Monday's 10:20-12:10, and a lab in Tuesday's 14:00-15:50. public Course(String cid, String name, Integer credit, GradingSchema gradingSchema, Integer capacity) // constructor public void addTimeslot(Timeslot timeslot) //Record a timeslot for this course private Integer id;// A unique student id, should be an 8-digit integer: Undergraduates' ids should start with 1; Postgraduates' ids should start with 3. e.g., 12213199. private String name;// Student’s name private Map<Course, Grade> courses;// Enrolled courses, using Map structure to store course and its grade as a pair. Grade is an enum type enum Grade{PASS,FAIL,A,B,C,D,F}with an attribute: Double gradePoint protected Student(Integer id, String name) // constructor public abstract boolean canGraduate() // Checks if this student satisfies all the graduating conditions. Hint: you are allowed to change this abstract method into non-abstract to check if the student satisfies the common graduation conditions. public void enroll(Course course) // Tries to enroll the course, do some checks before enrolling. public void recordGrade(Course course, Grade grade)// Records the grade of a course that is current learning. public double getGpa() // Calculates the GPA for this student. public UndergraduateStudent(Integer id, String name)// constructor public boolean canGraduate() //Additional graduating conditions for undergraduate students public PostgraduateStudent(Integer id, String name)// constructor public boolean canGraduate() //Additional graduating conditions for postgraduate students

最新推荐

recommend-type

GP-卡规范V2.1.1

5.4. 卡的生命周期和AP生命周期状态的演示 30 6. 卡的管理者(CM) 32 6.1. 概述 32 6.1.1. OPEN 32 6.1.2. 发行者安全域 33 6.1.3. CVM处理者 34 6.2. CM的服务 34 6.2.1. 应用访问OPEN服务 34 6.2.2. 应用访问CVM...
recommend-type

组成原理课程实验:MIPS 流水线CPU、实现36条指令、转发、冒险检测-内含源码和说明书.zip

组成原理课程实验:MIPS 流水线CPU、实现36条指令、转发、冒险检测-内含源码和说明书.zip
recommend-type

setuptools-50.0.2-py3-none-any.whl

Python库是一组预先编写的代码模块,旨在帮助开发者实现特定的编程任务,无需从零开始编写代码。这些库可以包括各种功能,如数学运算、文件操作、数据分析和网络编程等。Python社区提供了大量的第三方库,如NumPy、Pandas和Requests,极大地丰富了Python的应用领域,从数据科学到Web开发。Python库的丰富性是Python成为最受欢迎的编程语言之一的关键原因之一。这些库不仅为初学者提供了快速入门的途径,而且为经验丰富的开发者提供了强大的工具,以高效率、高质量地完成复杂任务。例如,Matplotlib和Seaborn库在数据可视化领域内非常受欢迎,它们提供了广泛的工具和技术,可以创建高度定制化的图表和图形,帮助数据科学家和分析师在数据探索和结果展示中更有效地传达信息。
recommend-type

zigbee-cluster-library-specification

最新的zigbee-cluster-library-specification说明文档。
recommend-type

管理建模和仿真的文件

管理Boualem Benatallah引用此版本:布阿利姆·贝纳塔拉。管理建模和仿真。约瑟夫-傅立叶大学-格勒诺布尔第一大学,1996年。法语。NNT:电话:00345357HAL ID:电话:00345357https://theses.hal.science/tel-003453572008年12月9日提交HAL是一个多学科的开放存取档案馆,用于存放和传播科学研究论文,无论它们是否被公开。论文可以来自法国或国外的教学和研究机构,也可以来自公共或私人研究中心。L’archive ouverte pluridisciplinaire
recommend-type

实现实时数据湖架构:Kafka与Hive集成

![实现实时数据湖架构:Kafka与Hive集成](https://img-blog.csdnimg.cn/img_convert/10eb2e6972b3b6086286fc64c0b3ee41.jpeg) # 1. 实时数据湖架构概述** 实时数据湖是一种现代数据管理架构,它允许企业以低延迟的方式收集、存储和处理大量数据。与传统数据仓库不同,实时数据湖不依赖于预先定义的模式,而是采用灵活的架构,可以处理各种数据类型和格式。这种架构为企业提供了以下优势: - **实时洞察:**实时数据湖允许企业访问最新的数据,从而做出更明智的决策。 - **数据民主化:**实时数据湖使各种利益相关者都可
recommend-type

用 Python 画一个可以动的爱心

好的,我可以帮助您使用Python来绘制一个动态的爱心。您可以使用turtle库来实现。以下是实现代码: ```python import turtle import math # 设置画布和画笔 canvas = turtle.Screen() canvas.bgcolor("black") pencil = turtle.Turtle() pencil.speed(0) pencil.color("red", "pink") pencil.pensize(3) # 定义爱心函数 def draw_love(heart_size, x_offset=0, y_offset=0):
recommend-type

JSBSim Reference Manual

JSBSim参考手册,其中包含JSBSim简介,JSBSim配置文件xml的编写语法,编程手册以及一些应用实例等。其中有部分内容还没有写完,估计有生之年很难看到完整版了,但是内容还是很有参考价值的。
recommend-type

"互动学习:行动中的多样性与论文攻读经历"

多样性她- 事实上SCI NCES你的时间表ECOLEDO C Tora SC和NCESPOUR l’Ingén学习互动,互动学习以行动为中心的强化学习学会互动,互动学习,以行动为中心的强化学习计算机科学博士论文于2021年9月28日在Villeneuve d'Asq公开支持马修·瑟林评审团主席法布里斯·勒菲弗尔阿维尼翁大学教授论文指导奥利维尔·皮耶昆谷歌研究教授:智囊团论文联合主任菲利普·普雷教授,大学。里尔/CRISTAL/因里亚报告员奥利维耶·西格德索邦大学报告员卢多维奇·德诺耶教授,Facebook /索邦大学审查员越南圣迈IMT Atlantic高级讲师邀请弗洛里安·斯特鲁布博士,Deepmind对于那些及时看到自己错误的人...3谢谢你首先,我要感谢我的两位博士生导师Olivier和Philippe。奥利维尔,"站在巨人的肩膀上"这句话对你来说完全有意义了。从科学上讲,你知道在这篇论文的(许多)错误中,你是我可以依
recommend-type

实现实时监控告警系统:Kafka与Grafana整合

![实现实时监控告警系统:Kafka与Grafana整合](https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tbWJpei5xcGljLmNuL21tYml6X2pwZy9BVldpY3ladXVDbEZpY1pLWmw2bUVaWXFUcEdLT1VDdkxRSmQxZXB5R1lxaWNlUjA2c0hFek5Qc3FyRktudFF1VDMxQVl3QTRXV2lhSWFRMEFRc0I1cW1ZOGcvNjQw?x-oss-process=image/format,png) # 1.1 Kafka集群架构 Kafka集群由多个称为代理的服务器组成,这