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
public class Utility { | |
public static void printerr(String message) | |
{ | |
StackTraceElement[] st = (new Throwable()).getStackTrace(); | |
String methodName = st[1].getMethodName(); | |
String className = st[1].getClassName(); | |
int line = st[1].getLineNumber(); | |
System.err.println("Err : where=" + className + "." + methodName + "():" + line + ", mes=" + message); |
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
・if , else if, try などでコードを囲む | |
→コマンド+ALT+T | |
・キャレット下のクラス、メソッド定義へジャンプ | |
→コマンド+B | |
・定義から元の位置へジャンプ | |
→コマンド+オプション+左カーソル | |
・最近開いたファイル一覧 |
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
/** | |
* Created by BPK_t on 2015/06/19. | |
*/ | |
object Main { | |
def main(args: Array[String]) { | |
val a = Some(100) | |
val b = Some(200.0) | |
val c = map2(a,b)((x,y)=>x+y) |
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
/** | |
* Created by BPK_t on 2015/06/20. | |
*/ | |
object Main { | |
def main(args: Array[String]) { | |
val x1 = MyLeft("AAA") | |
println(x1.map(x => x)) | |
val x2 = MyRight("AAA") | |
println(x2.map(x => x + "BBB")) |
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
package FPinScala | |
/** | |
* Created by BPK_t on 2015/06/24. | |
*/ | |
object Main { | |
def main(args: Array[String]) { | |
val s = Stream(1,2,3,4) | |
println("toList=" + s.toList) |
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
package FPinScalaExercise6 | |
/** | |
* Created by BPK_t on 2015/07/20. | |
*/ | |
object Main { | |
def main(args: Array[String]) { | |
val rng = SimpleRng(42) | |
val (n1, rng2) = rng.nextInt | |
println(n1) |
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
import java.util.concurrent._ | |
/** | |
* Created by BPK_t on 2015/08/18. | |
*/ | |
object Main { | |
def funcA : Int = { | |
Thread.sleep(1000) | |
10 | |
} |
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
message Test { | |
required map<string, int32> reqMap = 1; | |
} | |
↓これもためした | |
message Test { | |
map<string, int32> reqMap = 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
package FPinScalaExercise7 | |
import java.util.concurrent.{Executors, ExecutorService, CountDownLatch, Callable} | |
import java.util.concurrent.atomic.AtomicReference | |
import fpinscala.parallelism.Actor | |
/** | |
* Created by BPK_t on 2015/09/15. | |
*/ |
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
package FPinScalaExercise8 | |
import scalaz.Scalaz._ | |
/** | |
* Created by BPK_t on 2015/11/05. | |
*/ | |
object Main extends App { | |
} |
OlderNewer