2016/04/02時点
- ES5までに無い構文
- 何れ覚える必要があるので、ESに関しては学習コストが無いに等しい
- ESには無いTypeScriptの構文理解
| // ==UserScript== | |
| // @name Google search keybord shortcut | |
| // @version 0.1 | |
| // @description Google search shortcuts | |
| // @match http*://www.google.com/* | |
| // @match http*://www.google.co.jp/* | |
| // @copyright 2014+, disc99 | |
| // ==/UserScript== | |
| // 指定のワードを追加/削除したURLへ移動 |
| public class PagingUtil { | |
| public static boolean isDisplayPage(int i, int pageNum, int maxPage) { | |
| int distance = pageNum - i; | |
| int min = 2; | |
| int max = min * 2; | |
| if (distance == 0) { | |
| return true; | |
| } |
| <!DOCTYPE html> | |
| <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <link rel="stylesheet" href="loading.css" /> | |
| </head> | |
| <body> | |
| <div id="global-wait"> | |
| <div class="waitHorizon"> | |
| <div class="waitContainer"> | |
| <div class="sq1"></div> |
| package functionaljava.either; | |
| import java.io.BufferedReader; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.net.URL; | |
| import org.junit.Test; | |
| import com.fasterxml.jackson.databind.JsonNode; |
| @Test | |
| public void Functionのdefaultメソッド() throws Exception { | |
| Function<String, String> s1 = s -> s + "1"; | |
| Function<String, String> s2 = s -> s + "2"; | |
| Function<String, String> s3 = s -> s + "3"; | |
| // andThen | |
| String res1 = s1.andThen(s2).andThen(s3).apply("start:"); | |
| assertThat(res1, is("start:123")); |
| package rxjava; | |
| import com.google.common.base.Stopwatch; | |
| import org.junit.Test; | |
| import org.junit.experimental.runners.Enclosed; | |
| import org.junit.runner.RunWith; | |
| import rx.Notification; | |
| import rx.Observable; | |
| import rx.Observer; | |
| import rx.Subscriber; |
| import java.nio.file.WatchEvent; | |
| public class FileSystemEvent { | |
| WatchEvent<?> watchEvent; | |
| FileSystemEvent(WatchEvent<?> watchEvent) { | |
| this.watchEvent = watchEvent; | |
| } |
| public class FileSystemTest { | |
| @Test | |
| public void t1() throws Exception { | |
| long startModified = f.lastModified(); | |
| Observable.interval(5, TimeUnit.SECONDS) | |
| .map(i -> { | |
| System.out.println("map "); | |
| long l = f.lastModified(); | |
| if (l % 3 == 0) { |
2016/04/02時点