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(
//四舍五入保留2位小数(若第二位小数为0,则保留一位小数) function keepTwoDecimal(num) { var result = parseFloat(num); if (isNaN(result)) { console.error('参数非数值,无法四舍五入保留两位小数!'); return false; } result = Math.round(num * 100) / 100; return result; } //四舍五入保留2位小数(不够位数,则用0替补) fun