- 関数オブジェクト・TraitをJava8ネイティブ機能で実装
- オプティマイザを見直しして、凄く賢くなった
- 今まで9.9MBあったScalaTest3.0.0のバイナリはScala2.12で6.7MBに減った
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function easeInOutQuad(pos) { | |
if ((pos /= 0.5) < 1) return 0.5 * Math.pow(pos, 2); | |
return -0.5 * ((pos -= 2) * pos - 2); | |
} | |
function scrollTo(element, to, duration) { | |
var start = element.scrollTop; | |
var diff = to - start; | |
var currentTime = 0; | |
var increment = 16; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Interface 1 HID Report Descriptor Mouse | |
Item Tag (Value) Raw Data | |
Usage Page (Generic Desktop) 05 01 | |
Usage (Mouse) 09 02 | |
Collection (Application) A1 01 | |
Report ID (2) 85 02 | |
Usage (Pointer) 09 01 | |
Collection (Physical) A1 00 | |
Report Count (16) 95 10 | |
Report Size (1) 75 01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"a": [ | |
":adobe:", | |
":access:" | |
], | |
"b": [ | |
":bluetooth:" | |
], | |
"c": [ | |
":oic_no_c:", |
Name | Cloud | VPS |
---|---|---|
Dhrystone 2 using register variables | 30,433,071.8 lps | 32,111,159.8 lps |
Double-Precision Whetstone | 3,711.4 MWIPS | 4,241.6 MWIPS |
Execl Throughput | 2,227.2 lps | 2,967.6 lps |
File Copy 1024 bufsize 2000 maxblocks | 319,882.3 KBps | 932,885.8 KBps |
File Copy 256 bufsize 500 maxblocks | 84,508.4 KBps | 259,237.2 KBps |
File Copy 4096 bufsize 8000 maxblocks | 960,184.8 KBps | 1838,138.3 KBps |
Pipe Throughput | 635,363.0 lps | 2130,659.2 lps |
Pipe-based Context Switching | 151,940.0 lps | 241,700.9 lps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var table = "abcdefghijklmnopqrstuvwxyz0123456789".split(""); | |
var rnd = _ => table[Math.random()*table.length|0]; | |
var randomStr = (len) => { var r = rnd().slice(-1); if(len > 0){return r+randomStr(len-1)} else {return ""} }; |
OIC ITCreate Club Advent Calendar 2015 1日目ってことにしておいてください。
HTTPクライアント周りあまり触ったことなかったから触ってみたけどつらい。 これだけ書くのにハマったりしながら3時間位かかった…
試しにPixivのブックマークの1ページ目のイラストを保存するものを書いてみた
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def plus(num1: Int)(num2: Int): Option[Int] = { | |
Some(num1 + num2) | |
} | |
Seq(1,2,3,4) | |
.flatMap(plus(1)) | |
// Intellij Worn: Type missmatch, expected: (Int) => GenTraversableOnce[NotInferedB], autual: (Int) => Option[Int] | |
// Scala Compile: Success | |
Seq(1,2,3,4) | |
.map(plus(1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.apply(null, Array(100)).map(function(){return [null,undefined][Math.random()*2|0];}); |