什么对象可以作为HashMap的key值? 从HashMap的语法上来讲,一切对象都可以作为Key值。如:Integer、Long、String、Object等。但是在实际工作中,最常用的使用String作为Key值。 原因如下: 1.使用Object作为Key值的时候,如Class Person ...
分类:
其他好文 时间:
2020-03-08 19:45:20
阅读次数:
264
需求:一个表单可以动态添加,修改以及删除,然后提交,如下图实例。 这里只提及两点即可,其他的可以自己现场发挥。 js模板 表单把数据提交到后台如何接收 一,页面可以使用 模板来做,点击 按钮,触发事件,然后把 模板 到一个元素容器中即可,随便选择一个好用的模板就可以。 二,如何提交到后台? 这里打一 ...
分类:
其他好文 时间:
2020-03-08 17:54:11
阅读次数:
73
@ "toc" 捕获全局异常是在项目运行期间如果调用的某一个方法出现了运行时异常,则会捕获,并且给出回馈。 首先需要建一个包,包里新建一个捕获异常类GlobalExceptionHandler。前提是springboot的启动类的扫描注解ComponentScan()要扫描到。 这个捕获异常类可以捕 ...
分类:
编程语言 时间:
2020-03-08 17:23:01
阅读次数:
83
LeetCode 1374. Generate a String With Characters That Have Odd Counts生成每种字符都是奇数个的字符串【Easy】【Python】【字符串】 Problem "LeetCode" Given an integer , return a ...
分类:
编程语言 时间:
2020-03-08 15:46:37
阅读次数:
82
实体类 @XStreamAlias("ROOT") public class VehiclePassInfo { @Id @GeneratedValue(generator = "JDBC") private Integer id; @XStreamAlias("LICENSEKEY") priva ...
分类:
编程语言 时间:
2020-03-07 19:01:55
阅读次数:
91
单天线热点: sudo pistar-mmdvmhshatflash hs_hat 双天线热点: sudo pistar-mmdvmhshatflash hs_dual_hat ...
分类:
其他好文 时间:
2020-03-07 13:17:11
阅读次数:
299
1 package solution45; 2 import java.util.*; 3 class Solution { 4 public int solution(int n, int[] nums) { 5 HashMap<Integer, Integer> map = new HashMa ...
分类:
其他好文 时间:
2020-03-07 10:09:29
阅读次数:
58
1 package solution46; 2 import java.util.*; 3 class Solution { 4 public long solution(int n,long[] nums) { 5 long maxNum = 0; 6 long maxSecNum = 0; 7 ...
分类:
其他好文 时间:
2020-03-07 10:06:52
阅读次数:
102
1 """ 2 Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must ...
分类:
其他好文 时间:
2020-03-07 09:40:06
阅读次数:
81
转自 https://blog.csdn.net/qq_34231010/article/details/82530368 一、集合工具1.Lists List<Integer> list1 = Lists.newArrayList(0, 2, 5);List<Integer> list2 = Li ...
分类:
其他好文 时间:
2020-03-06 17:28:10
阅读次数:
75