1、注册一些用户名时需要不重复的字符串,这时我们急需要一个随机生成字符串确保唯一性,使用随机数RandomString 2、名称介绍:Random string length:字符串随机数长度;Chars to use for random string generation:生成字符串随机数的字符 ...
分类:
其他好文 时间:
2020-07-13 18:11:00
阅读次数:
110
爱好选择(原生) 示例: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>爱好选择(原生)</title> </head> <body> <form method="post" action=""> 你爱好的 ...
分类:
Web程序 时间:
2020-07-13 15:37:21
阅读次数:
75
scanner的基本语法: scannder对象的两个方法: next(): 1、一定要读取到有效字符后才可以结束输入。 2、对输入有效字符之前遇到的空白,next()方法会自动将其去掉。 3、只有输入有效字符后才将其后面输入的空白作为分隔符或者结束符。 4、next()不能得到带有空格的字符串。 ...
分类:
编程语言 时间:
2020-07-13 15:31:49
阅读次数:
63
@NotNull 适用于非空判断 The annotated element must not be {@code null}. CharSequence, Collection, Map 和 Array 对象不能是 null, 但可以是空集(size = 0)。 @NotEmpty 适用于判断集合 ...
分类:
其他好文 时间:
2020-07-13 15:30:22
阅读次数:
76
tooltip: { show: true, trigger: 'axis', formatter: function (param) { console.log(param) // 利用循环更改显示的内容 let list = param.length let Oparam=param conso ...
分类:
微信 时间:
2020-07-13 15:28:00
阅读次数:
93
public class StringAPIDemo1 { public static void main(String[] args) { String str = "HELLO"; char c[] = str.toCharArray(); // 将字符串变为字符数组 for (int i = ...
分类:
编程语言 时间:
2020-07-13 15:21:37
阅读次数:
57
在编写MyBatis的映射语句时,尽量采用“#{xxx}”这样的格式。若不得不使用“${xxx}”这样的参数,要手工地做好过滤工作,来防止SQL注入攻击。 ...
分类:
数据库 时间:
2020-07-13 15:13:47
阅读次数:
61
自己完成了,但是效果好像并不怎么样 public int canCompleteCircuit(int[] gas, int[] cost) { int len = gas.length; if(len == 1){ return gas[0] >= cost[0]?0:-1; } int sum1 ...
分类:
其他好文 时间:
2020-07-13 12:03:19
阅读次数:
57
(注意:下面的date可以加个判断是10位时间戳还是13位时间戳来进行编码是否需要*1000; param为你要转换的时间戳变量 if(param.length == 10){ let date = new Date(parseInt(param) * 1000); }else if(param.l ...
分类:
Web程序 时间:
2020-07-13 11:39:05
阅读次数:
265
用树的结构遍历数组 package com.atguigu.datastructures.binarytree object ArrayTreeDemo { def main(args: Array[String]): Unit = { val arr = Array(1,2,3,4,5,6,7) ...
分类:
其他好文 时间:
2020-07-13 11:30:18
阅读次数:
60