摘要: public static int maxProfit(int k, int[] prices) { if (0 >= k || null == prices || 1 >= prices.length) return 0; int r = 0, plen = 0; if (k >= (plen = prices.leng... 阅读全文
posted @ 2018-11-28 15:56 飞叶子 阅读(229) 评论(0) 推荐(0) 编辑
摘要: ._rebate { display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -moz-flex; display: -ms-flexbox; display: flex !important; flex-flow: row wrap; ... 阅读全文
posted @ 2018-11-22 14:43 飞叶子 阅读(175) 评论(0) 推荐(0) 编辑
摘要: static ZoneId ZONEID_BJ = ZoneId.of("GMT+08:00"); private boolean sameDate(Date d1, Date d2){ try { return ZonedDateTime.ofInstant(d1.toInstant(), ZONEID_BJ).toLocalDate().isEq... 阅读全文
posted @ 2018-11-20 18:19 飞叶子 阅读(4871) 评论(0) 推荐(0) 编辑
摘要: /** * 将一个指定类型对象的集合按照自定义的一个操作分组; 每组对应一个List、最终返回结果类型是:List> * * @param */ static class GroupToList implements Collector>, List>> { /** * 集合中对象两两比较,满足自定义的条... 阅读全文
posted @ 2018-11-06 11:34 飞叶子 阅读(3680) 评论(0) 推荐(0) 编辑
摘要: /* *js格式化数字代码 * *value: 要格式化的数字值 *scale: 最多保留几位小数 *zeroed: 是否保留尾0 *percented: 是否转称百分比形式 * */ function formatNumber(value, scale, zeroed, percented){ i 阅读全文
posted @ 2018-11-05 09:59 飞叶子 阅读(7684) 评论(0) 推荐(0) 编辑