摘要: public static void main(String[] args) { String value = UUID.randomUUID() + ":" + Thread.currentThread().getName(); long tryTime = 100000L; long expir 阅读全文
posted @ 2021-06-14 21:22 爱上胡萝卜的猴子 阅读(417) 评论(0) 推荐(0) 编辑
摘要: import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; public class Main { public static 阅读全文
posted @ 2020-04-06 21:01 爱上胡萝卜的猴子 阅读(141) 评论(0) 推荐(0) 编辑
摘要: /** * * @param repeating * @param separate * @return */ public static String Repeating2Smallest(String repeating, String separate){ String separate_l 阅读全文
posted @ 2020-04-06 20:28 爱上胡萝卜的猴子 阅读(143) 评论(0) 推荐(0) 编辑
摘要: import java.util.Stack; import java.util.StringTokenizer; /** * 逆波兰式计算 * java 运算公式运算得出结果 可以计算负数,保留小数位数 * @Date: 2018/9/6 11:41 * @Description: */ publ 阅读全文
posted @ 2020-04-05 15:15 爱上胡萝卜的猴子 阅读(271) 评论(0) 推荐(0) 编辑
摘要: /** * @des 找出n以内的质数 20 * 2 3 5 7 9 11 13 15 17 19 * @param n */ private static void print(int n) { if (n<2){ return; } System.out.print("2 "); for (in 阅读全文
posted @ 2020-04-05 15:04 爱上胡萝卜的猴子 阅读(272) 评论(0) 推荐(0) 编辑
摘要: /** * @des 一个数的最小因子的连乘 * 2*2*2*2*2*2*5*5*5*5*5*5*=1000000 * @param a */ private static void min(int a) { int b =a; StringBuilder stringBuilder = new S 阅读全文
posted @ 2020-04-05 14:46 爱上胡萝卜的猴子 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 1 public static void main(String[] args) { 2 int[] data = new int[10]; 3 for (int i = 0; i < 10; i++) { 4 data[i] = i+1; 5 } 6 int temp; 7 for (int i 阅读全文
posted @ 2020-03-29 15:39 爱上胡萝卜的猴子 阅读(174) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { char buf[] = { 'a', 'b', 'c','d','e'}; Set<String> set = new HashSet<>(); perm(buf, 0, buf.length-1,set); Sys 阅读全文
posted @ 2020-03-29 15:10 爱上胡萝卜的猴子 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 数组下标i = (n - 1) & hash 其中hash 是 阅读全文
posted @ 2019-11-20 10:22 爱上胡萝卜的猴子 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 1.1 undo是什么 undo日志用于存放数据修改被修改前的值,假设修改 tba 表中 id=2的行数据,把Name='B1' 修改为Name = 'B2' ,那么undo日志就会用来存放Name='B'的记录,如果这个修改出现异常,可以使用undo日志来实现回滚操作,保证事务的一致性。 1.2 阅读全文
posted @ 2019-11-10 22:20 爱上胡萝卜的猴子 阅读(1196) 评论(0) 推荐(1) 编辑