摘要:
@Test public void test01() { Double[] a = new Double[]{90D, Double.MAX_VALUE}; Double[] b = new Double[]{10D, 90D}; a = new Double[]{0D, 10D}; boolean 阅读全文
摘要:
public double[] confMatrix(double[] arr1, double[] arr2){ double[] con = new double[2]; if (arr2[0] < arr1[0]){ con[0] = arr1[0]; } else if (arr2[0] > 阅读全文
摘要:
System.out.format()功能与printf()一样,可以使用%d,%f等参数。 使用System.out.format()完成左对齐,补0,千位分隔符,小数点位数,本地化表达 public class TestNumber { public static void main(Strin 阅读全文
摘要:
group_concat函数支持order by内部排序,例如:# 按照id倒序拼接imgSELECT GROUP_CONCAT(img ORDER BY id DESC) FROM `thumb_table`;参考:https://mariadb.com/kb/en/group_concat/ 阅读全文
摘要:
可以用线程来做,每隔几秒开一个线程 代码如下 public void runTask() { final long timeInterval = 120000;// 两分钟运行一次 final ThreadService threadService = new ThreadService(); Ru 阅读全文
摘要:
org.apache.velocity.util.DeprecationAwareExtProperties.warnDeprecated configuration key 'resource.loader' has been deprecated in favor of 'resource.lo 阅读全文
摘要:
Java8在 lambda 表达式中使用局部变量会提示:Local variable flag defined in an enclosing scope must be final or effectively final这是因为你使用的局部变量在初始化后,又对这个变量进行了赋值。赋值后会认为这个 阅读全文
摘要:
public class Java8Test { public static void main(String[] args) { Person p1 = new Person("麻子", 31); Person p2 = new Person("李四", 20); Person p3 = new 阅读全文