This file contains hidden or 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
| let f a = | |
| let t0 = Unix.gettimeofday() in | |
| let acc = ref a in | |
| for j = 1 to 10000000 do | |
| acc := !acc +. (float_of_int j) | |
| done; | |
| let t1 = Unix.gettimeofday() in | |
| Printf.printf "Time: %.3f %f\n%!" (t1-.t0) !acc | |
| let _ = |
This file contains hidden or 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
| module A { | |
| export module B { | |
| export var C:any = {} | |
| } | |
| } | |
| module A { | |
| export module B { | |
| console.log("1", C); | |
| function f(B) { |
This file contains hidden or 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 Foo { | |
| public static void main(String[] args) { | |
| try { | |
| if (new javax.script.ScriptEngineManager().getEngineByExtension("js").eval( | |
| "var i = 1\n" + | |
| "while (i < 100) {\n" + | |
| "if (i % 15 == 0) println('FizzBuzz')\n" + | |
| "else if (i % 3 == 0) println('Fizz')\n" + | |
| "else if (i % 5 == 0) println('Buzz')\n" + | |
| "else println(i)\n" + |
This file contains hidden or 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
| open Js | |
| let f1 c = | |
| c##prop1 <- true | |
| (* | |
| Val: val ff1 : < prop1 : < set : bool -> unit; .. > Js.gen_prop; | |
| prop2 : < get : < prop1 : < set : bool -> unit; .. > | |
| Js.gen_prop; | |
| .. > | |
| Js.t; |
This file contains hidden or 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
| /* | |
| $ cat foo.ml | |
| let _ = | |
| [1; 2; 3; 4] | |
| |> List.map (fun a -> a * 2 + 1) | |
| |> List.map string_of_int | |
| |> List.iter print_endline | |
| $ ocamlc foo.ml -output-obj -o foo.c | |
| */ |
This file contains hidden or 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
| (defun _ch_ (to_s_aM_ get_out_b_ outc_c_ outs_d_ flush_e_ k_f_ fmt_g_) | |
| var out_C_=(caml_call_gen1_i_ get_out_b_,fmt_g_); | |
| (defun outs_aj_ (s_a_)(return (caml_call_gen2_m_ outs_d_,out_C_,s_a_))) | |
| (defun pr_aN_ (k_a_ n_b_ fmt_l_ v_aO_) | |
| var len_j_=(fmt_l_.getLen ); | |
| (defun doprn_D_ (n_n_ i_b_) | |
| var i_p_=i_b_; | |
| for(;;) | |
| (progn (if (<= len_j_ i_p_) |
This file contains hidden or 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
| open Batteries | |
| open Deriving_Show | |
| module Show_batSet | |
| (O : Set.OrderedType) | |
| (K : Show with type a = O.t) | |
| : Show with type a = Set.Make(O).t = | |
| Defaults( | |
| struct | |
| module S = Set.Make(O) |
This file contains hidden or 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
| class cs = object | |
| method kuwa = prerr_endline "kuwa" | |
| end | |
| class ca = object | |
| inherit cs | |
| method x = 1 | |
| end | |
| class cb = object |
This file contains hidden or 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
| Index: src/org/swingexplorer/ActRefresh.java | |
| =================================================================== | |
| RCS file: /cvs/swingexplorer/src/org/swingexplorer/ActRefresh.java,v | |
| retrieving revision 1.4 | |
| diff -u -r1.4 ActRefresh.java | |
| --- src/org/swingexplorer/ActRefresh.java 9 May 2009 14:19:04 -0000 1.4 | |
| +++ src/org/swingexplorer/ActRefresh.java 26 Jun 2009 01:14:54 -0000 | |
| @@ -21,36 +21,29 @@ | |
| package org.swingexplorer; | |
This file contains hidden or 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
| object Status extends Enumeration { | |
| type Status = Value | |
| val Waiting = Value("waiting") | |
| val Rendering = Value("rendering") | |
| val Processed = Value("processed") | |
| val Error = Value("error") | |
| } | |
| object Main extends App { | |
| import Status._ |