js <script language="javascript"> function randomString(len) { len = len || 32; var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/ var maxPos = $chars.length; var pwd = ''; for (i =
# import random# for x in range(10):# i = 0# l = []# while i < 10:# ret = chr(random.randint(33, 126))# if ret not in ['/','\\','@','I','l','o','O']:# i+=1# l.append(ret)# print(''.join(l)) import randomimport stringfor x in range(10): str_source = s
小数,字符串.时间等示例代码 String base = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 public class RandomTest { public static Random rand = new Random(); public static String dateStart = "2017-01-01 00:00:00"; /** * hh 表示12小时制 * HH 表示24小时制
import java.util.UUID; /** * 通过UUID随机生成36位.32位唯一识别码(唯一字符串) * @author [J.H] * */ public class Test { public static void main(String[] args) { int i = 0; while (i<10) { String a = UUID.randomUUID().toString(); System.out.println(a); System.out.println(