- 博客(470)
- 资源 (36)
- 收藏
- 关注
原创 Java 8 获取当前日期
yy-MM-dd HH:mm:ss"); return LocalDateTime.now().format(formatter);}public static String getCurrentDateTime(String format) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format); return LocalDateTime.now().format(forma
2018-12-12 14:38:14
4863
原创 MySQL索引最左匹配原则
, `b` varchar(32) NOT NULL, `c` varchar(64) NOT NULL, `d` varchar(128) NOT NULL, `e` varchar(256) NOT NULL, `create_time` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `update_time` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(
2018-11-14 12:44:18
3435
原创 MySQL SQL Create demo
signed NOT NULL DEFAULT '1', `is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0', `create_time` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `update_time` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAM
2018-10-22 15:10:18
139
原创 homebrew源更新
mote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git 重置brew.git:cd "$(brew --repo)"git remote set-url origin https://github.com/Homebrew/brew.git 重置homebrew-core.git:cd "$(brew --repo)/Library/Taps/homebrew/home
2018-09-18 09:27:08
84
原创 springboot mybatis crud
che.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion&g
2018-08-26 14:55:52
154
原创 CompletableFuture - 常用API( 下)
read.currentThread().getName() + " is running"); return 1; }).runAfterBoth(CompletableFuture.supplyAsync(() -> { System.out.println(Thread.currentThread().getName() + " is running"); return 2; }), () -> System
2018-07-25 22:03:16
151
原创 CompletableFuture - 常用API(上)
rt java.util.Random;import java.util.concurrent.CompletableFuture;import java.util.concurrent.ExecutionException;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;import java.util.stream.Stream;import static ja
2018-07-25 21:21:18
117
原创 CompletableFuture - Hello World
rt java.util.concurrent.CompletableFuture;import java.util.concurrent.ExecutionException;public class CompletableFutureTest0 { private final static Random RANDOM = new Random(System.currentTimeMillis()); public static void main(String[]
2018-07-17 23:27:57
129
原创 Collectors - The Collector interface
lt;A, T> accumulator(); BinaryOperator<A> combiner(); Function<A, R> finisher(); Set<Collector.Characteristics> characteristics();}Note:T is the generic type of the items in the st
2018-07-01 22:53:56
121
原创 Collectors - Demo4
oncurrentMapWithBinaryOperator();testToConcurrentMapWithBinaryOperatorAndSupplier();testToList();testToSet();testToMap();testToMapWithBinaryOperator();testToMapWithBinaryOperatorAndSupplier(); SRCpackage org.fool.java8.collector;impor
2018-07-01 22:40:03
193
原创 Collectors - Demo3
estReducingBinaryOperatorAndIdentity();testReducingBinaryOperatorAndIdentityAndFunction();testSummarizingInt();testSummarizingLong();testSummarizingDouble(); SRCpackage org.fool.java8.collector;import java.util.Arrays;import java.util.C
2018-07-01 22:32:41
93
原创 Collectors - Demo2
en2();testCounting();testGroupingByFunction1();testGroupingByFunction2();testGroupingByFunction3();testSummarizingInt(); SRCpackage org.fool.java8.collector;import java.util.Arrays;import java.util.Collections;import java.util.IntSu
2018-07-01 22:32:23
88
原创 Collectors - Demo1
ctionAndSupplierAndCollector();testJoining();testJoiningWithDelimiter();testJoiningWithDelimiterAndPrefixAndSuffix();testMapping();testMaxBy();testMinBy(); SRCpackage org.fool.java8.collector;import java.util.Arrays;import java.util
2018-07-01 22:26:35
175
原创 Stream - Reduce
, 4, 5, 6, 7}); Integer reduce = stream.reduce(0, (i, j) -> i + j); System.out.println(reduce);}private static void reduceSumTest2() { Stream<Integer> stream = Arrays.stream(new Integer[]{1, 2, 3, 4, 5, 6, 7});
2018-06-19 22:21:56
147
原创 Stream - Match
6, 7}); boolean result = stream.allMatch(i -> i > 0); System.out.println(result);} anyMatchprivate static void anyMatch() { Stream<Integer> stream = Arrays.stream(new Integer[]{1, 2, 3, 4, 5, 6, 7});
2018-06-19 21:52:57
156
原创 Stream - Find
, 3, 4, 5, 6, 7}); Optional<Integer> optional = stream.filter(i -> i % 2 == 0).findAny(); System.out.println(optional.get());}Console Output2 optional.orElseprivate static void optionalOrElseTest() { Str
2018-06-19 21:51:12
379
原创 Stream - Map
teger> result = list.stream().map(i -> i * 2).collect(Collectors.toList()); System.out.println(result);}Console Output[2, 4, 6, 8, 10, 12, 14] flatMapprivate static void flatMapTest() { String[] words = {"Hello&q
2018-06-19 21:46:18
119
原创 Stream - Filter
<Integer> result = list.stream().filter(i -> i % 2 == 0).collect(Collectors.toList()); System.out.println(result);} Distinctprivate static void distinctTest() { List<Integer> list = Arrays.asList(1, 2,
2018-06-19 21:34:18
126
原创 Stream - Hello World
quence of elements — Like a collection, a stream provides an interface to a sequenced set of values of a specific element type. Because collections are data structures, they’re mostly about storing and accessing elements with specific time/space complexiti
2018-06-13 21:41:49
100
原创 Lambda Expression - Method Reference
reference to a static method(for example, the method parseInt of Integer, written Integer::parseInt)2. A method reference to an instance method of an arbitrary type(for example, the method length of a String, written String::length)3. A method refe
2018-06-12 21:23:39
118
原创 Lambda Expression - Supplier
ic class SupplierTest { private static class Person { private String name; private Integer age; public Person(String name, Integer age) { this.name = name; this.age = age; } pu
2018-06-11 21:58:08
108
原创 Lambda Expression - Consumer
rg.fool.java8;import java.util.Arrays;import java.util.List;import java.util.function.BiConsumer;import java.util.function.Consumer;public class ConsumerTest { private static class Person { private String name; privat
2018-06-11 21:50:34
94
原创 Lambda Expression -Function
e.g.package org.fool.java8;import java.util.function.BiFunction;import java.util.function.Function;import java.util.function.IntFunction;public class FunctionTest { private static class Person { private String name; pri
2018-06-11 21:41:48
84
原创 Lambda Expression - Predicate
e.g.package org.fool.java8;import java.util.ArrayList;import java.util.Arrays;import java.util.List;import java.util.function.BiPredicate;import java.util.function.IntPredicate;import java.util.function.Predicate;public class PredicateT
2018-06-11 21:35:56
160
原创 Lambda Expression 定义
oesn’t have a name, but it has a list of parameters, a body, a return type, and also possibly a list of exceptions that can be thrown. That’s one big definition;let’s break it down:Anonymous— We say anonymous because it doesn’t have an explicit name l
2018-06-11 21:05:22
86
原创 Maven打包可执行jar
pache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion&
2018-03-27 10:05:32
97
原创 curl常用命令
curl -d "args" protocol://address:port/urlcurl -d "username=hello&password=world" http://127.0.0.1:8080/login POST with json bodycurl -H "Content-Type: application/json" -X POST --data (json.data) protocol://ad
2018-01-05 13:36:40
111
原创 JedisCommand接口说明
nterface JedisCommands { /** * 存储数据到缓存中,若key已存在则覆盖 value的长度不能超过1073741824 bytes (1 GB) * * @param key * @param value * @return */ String set(String key, String value); /** * 存储数据到缓存中,并制定过期时间和当Key
2017-10-22 23:10:46
77
原创 Runtime.getRuntime().addShutdownHook用法
ng[] args) { Thread thread1 = new Thread(() -> System.out.println("Thread1...")); Thread thread2 = new Thread(() -> System.out.println("Thread2...")); Thread thread3 = new Thread(() -> Sys
2017-10-11 16:11:00
78
原创 Protobuff Maven整合
che.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion&g
2017-09-29 21:26:44
210
MyEclipseStruts1.x教程 刘长炯
2010-02-17
设计模式:可复用面向对象软件的基础
2009-12-23
Java Web应用开发项目教程(附电子教案,程序源代码,习题答案)
2009-10-17
java聊天室程序--基于Socket的网络编程
2009-10-11
dom4j 2.0.0-ALPHA-2 API
2011-02-28
spring-security-3.0.5帮助文档
2011-02-25
Struts2.1.8.1和Struts2.2.1.1帮助文档
2011-02-24
blazeds-bin-4.0.0.14931
2010-12-09
北风网--Extjs项目之个人理财项目(Extjs+S2SH+Mysql) 源代码
2010-11-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人