hoge
foo
| class Zundoko { | |
| public static void main(String args[]) { | |
| java.util.Random rnd = new java.util.Random(); | |
| int zun; | |
| do { | |
| for (zun = 0; rnd.nextBoolean(); zun++) { | |
| System.out.println("ズン"); | |
| } | |
| System.out.println("ドコ"); | |
| } while (zun < 4); |
| (* How to build: corebuild -pkg lwt.unix,lwt.syntax zundoko.native *) | |
| open Lwt.Infix | |
| let print_zundoko x = | |
| Lwt_io.printl (if x then "Zun" else "Doko") | |
| let print_kiyoshi () = | |
| Lwt_list.iter_s | |
| (fun (d,s) -> Lwt_unix.sleep d >> Lwt_io.print s) |
| package main | |
| type recFunc func(int, recFunc) | |
| func call(n int, f recFunc) { | |
| defer println("r", n) | |
| println(n) | |
| if n > 0 { | |
| f(n-1, f) | |
| } |
| #!/bin/zsh | |
| printf '%d\n' '12+34' | |
| printf '%d\n' '1<<10' | |
| printf '%d\n' '5^11' | |
| printf '%d\n' '3**5' |
| package main | |
| import ( | |
| "fmt" | |
| "syscall" | |
| "unsafe" | |
| ) | |
| type slice struct { | |
| addr uintptr |
| package main | |
| import ( | |
| . "fmt" | |
| log4j "log" | |
| ) | |
| func main() { | |
| Printf("Hello, %s.\n", "today") | |
| log4j.Println("Printing a log.") |
| // http://stackoverflow.com/questions/29005825/how-to-remove-element-of-struct-array-in-loop-in-golang | |
| package main | |
| func correctDeletion() { | |
| var array [10]int | |
| for i, _ := range array { | |
| array[i] = i | |
| } | |
| s := array[:] |
| package main | |
| func main() { | |
| ch := make(chan struct{}) | |
| close(ch) | |
| /* | |
| for _ = range ch { | |
| } | |
| */ |