Permalink
Browse files

End of reorganisation

Now:
- try-ocaml contains the toplevel for Try OCaml
- try-js_of_ocaml contains the toplevel for Try Js_of_ocaml
  • Loading branch information...
1 parent 352ddbd commit a985e78908285a190468f9d5c80bfbba86e5cbd1 @lefessan lefessan committed May 10, 2012
Showing with 784 additions and 908 deletions.
  1. +20 −4 Makefile
  2. +1 −1 Makefile.tryocaml
  3. +1 −1 js_of_ocaml-lessons/lesson1/lesson.html
  4. +0 −1 js_of_ocaml-lessons/lesson1/lesson.html.fr
  5. +24 −17 js_of_ocaml-lessons/lesson1/step1/step.html
  6. +0 −19 js_of_ocaml-lessons/lesson1/step1/step.html.fr
  7. +2 −1 js_of_ocaml-lessons/lesson1/step1/step.ml
  8. +22 −7 js_of_ocaml-lessons/lesson1/step2/step.html
  9. +0 −9 js_of_ocaml-lessons/lesson1/step2/step.html.fr
  10. +0 −26 js_of_ocaml-lessons/lesson1/step3/step.html
  11. +0 −26 js_of_ocaml-lessons/lesson1/step3/step.html.fr
  12. +0 −2 js_of_ocaml-lessons/lesson1/step3/step.ml
  13. +0 −16 js_of_ocaml-lessons/lesson1/step4/step.html
  14. +0 −37 js_of_ocaml-lessons/lesson1/step4/step.html.fr
  15. +0 −3 js_of_ocaml-lessons/lesson1/step4/step.ml
  16. +0 −16 js_of_ocaml-lessons/lesson1/step5/step.html
  17. +0 −37 js_of_ocaml-lessons/lesson1/step5/step.html.fr
  18. +0 −3 js_of_ocaml-lessons/lesson1/step5/step.ml
  19. +0 −15 js_of_ocaml-lessons/lesson1/step6/step.html
  20. +0 −16 js_of_ocaml-lessons/lesson1/step6/step.html.fr
  21. +0 −1 js_of_ocaml-lessons/lesson1/step6/step.ml
  22. +18 −14 js_of_ocaml-lessons/lesson2/step1/step.html
  23. +0 −24 js_of_ocaml-lessons/lesson2/step2/step.html
  24. +0 −3 js_of_ocaml-lessons/lesson2/step2/step.ml
  25. +0 −24 js_of_ocaml-lessons/lesson2/step3/step.html
  26. +0 −3 js_of_ocaml-lessons/lesson2/step3/step.ml
  27. +0 −34 js_of_ocaml-lessons/lesson2/step4/step.html
  28. +0 −3 js_of_ocaml-lessons/lesson2/step4/step.ml
  29. +0 −31 js_of_ocaml-lessons/lesson2/step5/step.html
  30. +0 −2 js_of_ocaml-lessons/lesson2/step5/step.ml
  31. +0 −20 js_of_ocaml-lessons/lesson2/step6/step.html
  32. +0 −4 js_of_ocaml-lessons/lesson2/step6/step.ml
  33. +0 −20 js_of_ocaml-lessons/lesson2/step7/step.html
  34. +0 −3 js_of_ocaml-lessons/lesson2/step7/step.ml
  35. +0 −12 js_of_ocaml-lessons/lesson2/step8/step.html
  36. +0 −3 js_of_ocaml-lessons/lesson2/step8/step.ml
  37. +1 −1 js_of_ocaml-lessons/lesson3/lesson.html
  38. +3 −17 js_of_ocaml-lessons/lesson3/step1/step.html
  39. +0 −18 js_of_ocaml-lessons/lesson3/step1/step.html.fr
  40. +2 −2 js_of_ocaml-lessons/lesson3/step1/step.ml
  41. +0 −17 js_of_ocaml-lessons/lesson3/step2/step.html
  42. +0 −20 js_of_ocaml-lessons/lesson3/step2/step.html.fr
  43. +0 −2 js_of_ocaml-lessons/lesson3/step2/step.ml
  44. +0 −17 js_of_ocaml-lessons/lesson3/step3/step.html
  45. +0 −19 js_of_ocaml-lessons/lesson3/step3/step.html.fr
  46. +0 −2 js_of_ocaml-lessons/lesson3/step3/step.ml
  47. +0 −28 js_of_ocaml-lessons/lesson3/step4/step.html
  48. +0 −28 js_of_ocaml-lessons/lesson3/step4/step.html.fr
  49. +0 −2 js_of_ocaml-lessons/lesson3/step4/step.ml
  50. +0 −11 js_of_ocaml-lessons/lesson3/step5/step.html
  51. +0 −11 js_of_ocaml-lessons/lesson3/step5/step.html.fr
  52. +0 −2 js_of_ocaml-lessons/lesson3/step5/step.ml
  53. +0 −35 js_of_ocaml-lessons/lesson3/step6/step.html
  54. +0 −36 js_of_ocaml-lessons/lesson3/step6/step.html.fr
  55. +0 −2 js_of_ocaml-lessons/lesson3/step6/step.ml
  56. +1 −1 js_of_ocaml-lessons/lesson4/lesson.html
  57. +3 −26 js_of_ocaml-lessons/lesson4/step1/step.html
  58. +1 −1 js_of_ocaml-lessons/lesson4/step1/step.ml
  59. +0 −21 js_of_ocaml-lessons/lesson4/step2/step.html
  60. +0 −2 js_of_ocaml-lessons/lesson4/step2/step.ml
  61. +0 −32 js_of_ocaml-lessons/lesson4/step3/step.html
  62. +0 −3 js_of_ocaml-lessons/lesson4/step3/step.ml
  63. +0 −33 js_of_ocaml-lessons/lesson4/step4/step.html
  64. +0 −2 js_of_ocaml-lessons/lesson4/step4/step.ml
  65. +0 −17 js_of_ocaml-lessons/lesson4/step5/step.html
  66. +0 −2 js_of_ocaml-lessons/lesson4/step5/step.ml
  67. +0 −22 js_of_ocaml-lessons/lesson4/step6/step.html
  68. +0 −2 js_of_ocaml-lessons/lesson4/step6/step.ml
  69. +8 −5 ocp-jslib/cookie.ml
  70. +1 −3 ocp-jslib/cookie.mli
  71. +19 −0 ocp-jslib/utils.ml
  72. +7 −4 ocp-jslib/utils.mli
  73. +6 −0 try-js_of_ocaml/Makefile
  74. +356 −0 try-js_of_ocaml/bootstrap.css
  75. 0 {toplevel → try-js_of_ocaml}/images/arrow.png
  76. 0 {toplevel → try-js_of_ocaml}/images/delicious.png
  77. 0 {toplevel → try-js_of_ocaml}/images/digg.png
  78. 0 {toplevel → try-js_of_ocaml}/images/facebook.png
  79. 0 {toplevel → try-js_of_ocaml}/images/flickr.png
  80. 0 {toplevel → try-js_of_ocaml}/images/friendfeed.png
  81. 0 {toplevel → try-js_of_ocaml}/images/github.png
  82. 0 {toplevel → try-js_of_ocaml}/images/left1.png
  83. 0 {toplevel → try-js_of_ocaml}/images/left2.png
  84. 0 {toplevel → try-js_of_ocaml}/images/linkedin.png
  85. 0 {toplevel → try-js_of_ocaml}/images/myspace.png
  86. 0 {toplevel → try-js_of_ocaml}/images/ocaml_code.png
  87. 0 {toplevel → try-js_of_ocaml}/images/reddit.png
  88. 0 {toplevel → try-js_of_ocaml}/images/right1.png
  89. 0 {toplevel → try-js_of_ocaml}/images/right2.png
  90. 0 {toplevel → try-js_of_ocaml}/images/rssfeed.png
  91. 0 {toplevel → try-js_of_ocaml}/images/slashdot.png
  92. 0 {toplevel → try-js_of_ocaml}/images/stumbleupon.png
  93. 0 {toplevel → try-js_of_ocaml}/images/technorati.png
  94. 0 {toplevel → try-js_of_ocaml}/images/twitter.png
  95. +130 −0 try-js_of_ocaml/index.html
  96. +155 −0 try-js_of_ocaml/style.css
  97. BIN try-ocaml/images/arrow.png
  98. BIN try-ocaml/images/delicious.png
  99. BIN try-ocaml/images/digg.png
  100. BIN try-ocaml/images/facebook.png
  101. BIN try-ocaml/images/flickr.png
  102. BIN try-ocaml/images/friendfeed.png
  103. BIN try-ocaml/images/github.png
  104. BIN try-ocaml/images/left1.png
  105. BIN try-ocaml/images/left2.png
  106. BIN try-ocaml/images/linkedin.png
  107. BIN try-ocaml/images/myspace.png
  108. BIN try-ocaml/images/ocaml_code.png
  109. BIN try-ocaml/images/reddit.png
  110. BIN try-ocaml/images/right1.png
  111. BIN try-ocaml/images/right2.png
  112. BIN try-ocaml/images/rssfeed.png
  113. BIN try-ocaml/images/slashdot.png
  114. BIN try-ocaml/images/stumbleupon.png
  115. BIN try-ocaml/images/technorati.png
  116. BIN try-ocaml/images/twitter.png
  117. +3 −4 tutorial/Makefile
View
24 Makefile
@@ -10,11 +10,27 @@ all:
$(MAKE) -C try-js_of_ocaml
clean:
- $(MAKE) -C tryocaml clean
+ $(MAKE) -C js_of_ocaml clean
+ $(MAKE) -C cmicomp clean
+ $(MAKE) -C ocp-jslib clean
+ $(MAKE) -C toplevel clean
+ $(MAKE) -C ocaml-num clean
+ $(MAKE) -C tutorial clean
+ $(MAKE) -C try-ocaml clean
+ $(MAKE) -C try-js_of_ocaml clean
+
depend:
- $(MAKE) -C depend
+ $(MAKE) -C js_of_ocaml depend
+ $(MAKE) -C cmicomp depend
+ $(MAKE) -C ocp-jslib depend
+ $(MAKE) -C toplevel depend
+ $(MAKE) -C ocaml-num depend
+ $(MAKE) -C tutorial depend
+ $(MAKE) -C try-ocaml depend
+ $(MAKE) -C try-js_of_ocaml depend
update-lessons:
- touch lessons/goodies.ml
- $(MAKE) -C tryocaml tuto tryocaml
+ touch ocaml-lessons/goodies.ml
+ $(MAKE) -C try-ocaml
+
View
2 Makefile.tryocaml
@@ -104,5 +104,5 @@ $(TRYOCAML_NAME).byte: $(TOPLEVEL_CMIS) $(TOPLEVEL_CMOS) $(TOPLEVEL_CMAS) \
$(EXPUNGE) $@.tmp $@ $(TOPLEVEL_MODULES) $(TRYOCAML_EXTRA_MODULES)
rm -f $@.tmp
-byte: lessons.cmo try-ocaml.byte
+byte: lessons.cmo $(TRYOCAML_NAME).byte
View
2 js_of_ocaml-lessons/lesson1/lesson.html
@@ -1 +1 @@
-<h3>Simple Expressions</h3>
+<h3>A moving box</h3>
View
1 js_of_ocaml-lessons/lesson1/lesson.html.fr
@@ -1 +0,0 @@
-<h3>Expressions Simples</h3>
View
41 js_of_ocaml-lessons/lesson1/step1/step.html
@@ -1,17 +1,24 @@
-<h3>Simple Expressions</h3>
-
-<p>Numerical expressions are easy to compute in OCaml. For example:</p>
-
-<p><code>1+2</code></p>
-
-<br/>
-
-<p>Strings are also easy to define. For example, you can define a string with your name:</p>
-
-<p><code>"Mary"</code></p>
-
-<br/>
-
-<p>The basic element of a string is a char:</p>
-
-<p><code>'a'</code></p>
+<h3>A moving box</h3>
+
+<pre><code>
+open Utils
+
+let canvas = Dom_html.createCanvas doc
+let body = get_element_by_id "main-title"
+let context = canvas##getContext (Dom_html._2d_)
+
+let x = ref 10.
+let y = ref 60.
+
+let redraw _ =
+ context##clearRect (!x, !y, 20., 20. );
+ x := if !x > 400. then 0. else !x +. 2.;
+ y := if !y > 150. then 0. else !y +. 1.;
+ context##fillStyle <- Js.string "red";
+ context##fillRect (!x,!y, 20., 20.)
+
+let _ =
+ Dom.appendChild body canvas;
+ let _ = window##setInterval (_f redraw, 2.5) in
+ ()
+</code></pre>
View
19 js_of_ocaml-lessons/lesson1/step1/step.html.fr
@@ -1,19 +0,0 @@
-<h3>Expressions Simples</h3>
-
-<p>Les expressions numeriques sont faciles à écrire en OCaml. Par
-exemple :</p>
-
-<p><code>1+2</code></p>
-
-<br/>
-
-<p>Les chaînes (<em>string</em>) sont aussi faciles à créer. Par
-exemple, vous pouvez créer une chaîne avec votre prénom :</p>
-
-<p><code>"Mary"</code></p>
-
-<br/>
-
-<p>L'élément de base d'une chaîne est le caractère (<em>char</em>) :</p>
-
-<p><code>'a'</code></p>
View
3 js_of_ocaml-lessons/lesson1/step1/step.ml
@@ -1,2 +1,3 @@
fun input output ->
- find_in "- : char =" output
+ false
+
View
29 js_of_ocaml-lessons/lesson1/step2/step.html
@@ -1,9 +1,24 @@
-<h3>Lists and arrays</h3>
+<h3>A moving box</h3>
-<p>Lists and arrays are predefined data structures, for
-example you can have a list of integers:</p>
-<p><code>[ 42; 1; 55 ]</code></p>
+<pre><code>
+open Utils
+let canvas = Dom_html.createCanvas doc
+let body = get_element_by_id "main-title"
+let context = canvas##getContext (Dom_html._2d_)
-<br />
-<p>An array of strings:<p>
-<p><code>[|"John"; "Doe"|]</code></p>
+let x = ref 10.
+let y = ref 60.
+
+let redraw _ =
+ context##clearRect (!x, !y, 20., 20. );
+ x := if !x > 400. then 0. else !x +. 2.;
+ y := if !y > 150. then 0. else !y +. 1.;
+ context##fillStyle <- Js.string "red";
+ context##fillRect (!x,!y, 20., 20.)
+
+let _ =
+ Dom.appendChild body canvas;
+ let stop = setInterval redraw 2.5 in
+ Dom.appendChild body (Button.create "Stop" stop);
+ setTimeout stop 50000.
+</code></pre>
View
9 js_of_ocaml-lessons/lesson1/step2/step.html.fr
@@ -1,9 +0,0 @@
-<h3>Listes et tableaux</h3>
-
-<p>Les listes et tableaux sont des structures de données
- prédéfinies. Par exemple on peut avoir une liste d'entier:</p>
-<p><code>[ 42; 1; 55 ]</code></p>
-
-<br />
-<p>Un tableau de chaîne de caractères:<p>
-<p><code>[|"John"; "Doe"|]</code></p>
View
26 js_of_ocaml-lessons/lesson1/step3/step.html
@@ -1,26 +0,0 @@
-<h3>Operations on lists</h3>
-
-<p>You can use some predefined functions on lists such as reversing the list</p>
-<p><code>List.rev [1; 2; 3]</code></p>
-
-<br />
-<p>Get the first element of the list:</p>
-<p><code>List.hd [1; 2; 3]</code></p>
-
-<br />
-<h3>Operations on arrays</h3>
-
-<p>You can also use some predefined functions on arrays such as
-concatenate two arrays</p>
-<p><code>Array.append [| 1; 2 |] [| 3; 4; 5 |]</code></p>
-
-<br />
-<p>To get the element number <code>i</code> of an array, you have two
-ways to do this (don't forget, the first element has number <code>0</code>):</p>
-<p><code>Array.get [| 42; 51; 32 |] 2 </code></p>
-
-<p>or</p>
-
-<p><code>[| 42; 51; 32 |].(2) </code></p>
-
-
View
26 js_of_ocaml-lessons/lesson1/step3/step.html.fr
@@ -1,26 +0,0 @@
-<h3>Opérations sur les listes</h3>
-
-<p><p>On retrouve des fonctions prédéfinies sur les listes tels que le
- renversement d'une liste:</p>
-<p><code>List.rev [1; 2; 3]</code></p>
-
-<br />
-<p>Récupérer le premier élement d'une liste:</p>
-<p><code>List.hd [1; 2; 3]</code></p>
-
-<br />
-<h3>Opérations sur les tableaux</h3>
-
-<p><p>On a également des fonctions prédéfinies sur les tableaux, comme
- la concaténation de deux tableaux:</p>
-<p><code>Array.append [| 1; 2 |] [| 3; 4; 5 |]</code></p>
-
-<br />
-<p>Il existe deux façons de faire pour récupérer le ième
- d'une tableau: (ne pas oublier que le premier élément est à la
- position <code>0</code>):</p>
-<p><code>Array.get [| 42; 51; 32 |] 2 </code></p>
-
-<p>ou</p>
-
-<p><code>[| 42; 51; 32 |].(2) </code></p>
View
2 js_of_ocaml-lessons/lesson1/step3/step.ml
@@ -1,2 +0,0 @@
-fun input output ->
- find_in "- : int = 32" output
View
16 js_of_ocaml-lessons/lesson1/step4/step.html
@@ -1,16 +0,0 @@
-<h3>Basic operations on strings</h3>
-
-<p>Strings are sequences of chars. It is possible to create a
-string from just one char, using:</p>
-<p><code>String.make 10 'x'</code></p>
-
-<br />
-<p>Strings can also be created by joining other strings:</p>
-<p><code>"Mary" ^ " and " ^ "John"</code></p>
-
-<br />
-<p>It might also be interesting to get the length of a string:</p>
-
-<p><code>String.length "abcdefghijklmnopqstuvwxyz"</code></p>
-
-<p>(and yes, one character is missing !)</p>
View
37 js_of_ocaml-lessons/lesson1/step4/step.html.fr
@@ -1,37 +0,0 @@
-<h3>Opérations sur les chaînes de caractères</h3>
-
-<p>Les chaînes de caractères sont des séquences de caractères. Il est
- tout à fait possible de créer une chaîne de caractère à partir d'un
- seul caractère, en utilisant:</p>
-<p><code>String.make 10 'x'</code></p>
-
-<br />
-
-<p>Les chaînes de caractères peuvent également être créér en
- concaténant plusieurs autres chaînes:</p>
-<p><code>"Mary" ^ " and " ^ "John"</code></p>
-
-<br />
-<p>Il peut être intéressant de récuperer la taille d'une chaîne de
- caractère:</p>
-
-<p><code>String.length "abcdefghijklmnopqstuvwxyz"</code></p>
-
-<p>(et oui, il manque un caractère !)</p>
-
-<br />
-<p>Il y a bien sûr d'autres opérations disponibles sur les chaînes de
- caractères, comme une fonction qui retourne une copie de l'argument,
- avec toutes les majuscules transformées en minuscules:</p>
-<p><code>String.lowercase "MARY"</code></p>
-
-<br />
-<p>Voyons un exemple plus pratique, qui génère un nom de fichier à
- partir d'un composant:</p>
-<p><code>String.concat "/" [""; "usr"; "local"; "bin"]</code></p>
-<p>Notez que le second argument est une liste de chaînes de caractères</p>
-
-<br />
-<p>Il peut être parfois utile d'extraire un entier depuis une chaîne
- de caractères. Pour cela rien de plus simple:</p>
-<p><code>int_of_string "546"</code></p>
View
3 js_of_ocaml-lessons/lesson1/step4/step.ml
@@ -1,3 +0,0 @@
-fun input output ->
- find_in "- : int =" output
-
View
16 js_of_ocaml-lessons/lesson1/step5/step.html
@@ -1,16 +0,0 @@
-<h3>More operations on strings</h3>
-
-<p>There are many operations available on strings, like a function
-which returns a copy of the argument, with all uppercase letters
-translated to lowercase:</p>
-<p><code>String.lowercase "MARY"</code></p>
-
-<br />
-<p>Here's a more practical example, generating a filename from components: </p>
-<p><code>String.concat "/" [""; "usr"; "local"; "bin"]</code></p>
-<p>Note that the second argument is a list of strings.</p>
-
-<br />
-<p>It is sometimes useful to extract an integer from a string. This is
-easy in OCaml:</p>
-<p><code>int_of_string "546"</code></p>
View
37 js_of_ocaml-lessons/lesson1/step5/step.html.fr
@@ -1,37 +0,0 @@
-<h3>Opérations sur les chaînes de caractères</h3>
-
-<p>Les chaînes de caractères sont des séquences de caractères. Il est
- tout à fait possible de créer une chaîne de caractère à partir d'un
- seul caractère, en utilisant:</p>
-<p><code>String.make 10 'x'</code></p>
-
-<br />
-
-<p>Les chaînes de caractères peuvent également être créér en
- concaténant plusieurs autres chaînes:</p>
-<p><code>"Mary" ^ " and " ^ "John"</code></p>
-
-<br />
-<p>Il peut être intéressant de récuperer la taille d'une chaîne de
- caractère:</p>
-
-<p><code>String.length "abcdefghijklmnopqstuvwxyz"</code></p>
-
-<p>(et oui, il manque un caractère !)</p>
-
-<br />
-<p>Il y a bien sûr d'autres opérations disponibles sur les chaînes de
- caractères, comme une fonction qui retourne une copie de l'argument,
- avec toutes les majuscules transformées en minuscules:</p>
-<p><code>String.lowercase "MARY"</code></p>
-
-<br />
-<p>Voyons un exemple plus pratique, qui génère un nom de fichier à
- partir d'un composant:</p>
-<p><code>String.concat "/" [""; "usr"; "local"; "bin"]</code></p>
-<p>Notez que le second argument est une liste de chaînes de caractères</p>
-
-<br />
-<p>Il peut être parfois utile d'extraire un entier depuis une chaîne
- de caractères. Pour cela rien de plus simple:</p>
-<p><code>int_of_string "546"</code></p>
View
3 js_of_ocaml-lessons/lesson1/step5/step.ml
@@ -1,3 +0,0 @@
-fun input output ->
- find_in "- : int =" output
-
View
15 js_of_ocaml-lessons/lesson1/step6/step.html
@@ -1,15 +0,0 @@
-<h3>Operations on Tuples</h3>
-
-<p>A tuple consists of values (zero or more), enclosed in parentheses
-and separated by commas. Note that you can have differents types for
-each element, remember</p>
-<p><code>(42, "John", true)</code></p>
-
-<br />
-<p>When you have a pair (a tuple with two elements), you can use some
-predefined functions like get the first element:</p>
-<p><code>fst (42, "John")</code></p>
-
-<br />
-<p>Or the second element:</p>
-<p><code>snd (42, "John")</code></p>
View
16 js_of_ocaml-lessons/lesson1/step6/step.html.fr
@@ -1,16 +0,0 @@
-<h3>Operations sur les tuples</h3>
-
-<p>Un tuple est constitué de valeurs (zéro ou plus), entre parenthèses
-et séparés par des virgules. Notez que vous pouvez avoir différents types pour
-chaque élément, par exemple :<p>
-<p><code>(42, "John", true)</code></p>
-
-<br />
-<p>Quand vous avez une pair (un tuple avec deux éléments), il existe
- quelques fonctions prédéfinies, comme une fonction pour récupérer le
- premier élément:</p>
-<p><code>fst (42, "John")</code></p>
-
-<br />
-<p>Ou le second élément:</p>
-<p><code>snd (42, "John")</code></p>
View
1 js_of_ocaml-lessons/lesson1/step6/step.ml
@@ -1 +0,0 @@
-fun input output -> find_in "- : string =" output
View
32 js_of_ocaml-lessons/lesson2/step1/step.html
@@ -1,17 +1,21 @@
-<h3>Variables</h3>
+<h3>Play with Cookies</h3>
-<p>As in other languages, you can associate a name to a value. To do
-that, we use the <code>let</code> syntax which associates the result
-of some computation with a name:</p>
+<pre><code>
+open Utils
-<p><code>let x = 6 * 7</code></p>
+let _ =
+ let title = get_element_by_id "main-title" in
+ let v = try
+ int_of_string (List.assoc "counter" (Cookie.get_cookie () ))
+ with Not_found -> 0 in
-<br />
-
-<p>We can now check the value associated with <code>x</code> in the
-toplevel:</p>
-<p><code>x</code></p>
-
-<br />
-<p>And we can use the name where we would like the value:</p>
-<p><code>let y = x + 1</code></p>
+ let v = v + 1 in
+ Cookie.set_cookie "counter" (string_of_int v);
+ title##innerHTML <- _s (
+ Printf.sprintf "This is your %s time in TryOCaml"
+ (match v with
+ 1 -> "first"
+ | 2 -> "second"
+ | 3 -> "third"
+ | _ -> string_of_int v ^ "th"))
+</code></pre>
View
24 js_of_ocaml-lessons/lesson2/step2/step.html
@@ -1,24 +0,0 @@
-<h3>Mutable Variables</h3>
-
-<p>In OCaml, you cannot change the value associated with a name after
-its definition. Trying to do so will trigger a compilation error:</p>
-<p><code>x <- x + 1</code></p>
-
-<p>You will better understand the error message later.</p>
-
-<br />
-<p>If you really want to modify the value associated with a name, you
-must use a trick. OCaml provides a function <code>ref</code> that
-creates a special value that can be modified later (a reference):</p>
-<p><code>let x = ref 42</code></p>
-
-<br />
-<p>You can then change the value of the reference associated
-with <code>x</code> using the <code>:=</code> operator:</p>
-<p><code>x := 100 / 4</code></p>
-
-<br />
-<p>You can also access the value contained in the reference using the
-operator <code>!</code>:</p>
-
-<p><code>let y = !x + 1</code></p>
View
3 js_of_ocaml-lessons/lesson2/step2/step.ml
@@ -1,3 +0,0 @@
-fun input output ->
- find_in " : int = " output && find_in " !" input
-
View
24 js_of_ocaml-lessons/lesson2/step3/step.html
@@ -1,24 +0,0 @@
-<h3>Sequences and Printing</h3>
-
-<p>OCaml provides different functions to print basic types. For
-example:</p>
-
-<p><code>print_int 3</code></p><br/>
-
-<p>and:</p>
-
-<p><code>print_string "Hello"</code></p><br/>
-
-<p>Sequences of expressions are separated by <code>;</code>:</p>
-
-<pre><code>print_string "x = ";
-print_int !x;
-print_newline ()</code></pre>
-
-<p>A more powerful method to print values
-is <code>Printf.printf</code>, whose behavior is similar
-to <code>printf</code> in C:</p>
-
-<p><code>Printf.printf "x = %d. Bye %s\n" !x "John"</code></p>
-
-<br/>
View
3 js_of_ocaml-lessons/lesson2/step3/step.ml
@@ -1,3 +0,0 @@
-fun input output ->
- find_in " : unit = " output && find_in "Printf.printf" input
-
View
34 js_of_ocaml-lessons/lesson2/step4/step.html
@@ -1,34 +0,0 @@
-<h3>For loops</h3>
-
-<p>Let's define a reference on a list:</p>
-
-<p><code>let xl = ref []</code></p>
-<br/>
-
-<p>OCaml provides a simple <code>for</code> loop to iterate on
-integers in a range:</p>
-
-<pre><code>for i = 1 to 10 do
- xl := i :: !xl;
-done;
-!xl
-</code></pre><br/>
-
-<p>Here, for each value between 1 and 10, we have added it in this
-order at the head of the reference.</p>
-
-<p>Of course, if we want them in the correct order, we need to reverse
-the list:</p>
-
-<p><code>List.rev !xl</code></p>
-<br/>
-<p>Or we can just execute the loop directly from the upper bound to the
-lower bound:</p>
-
-<pre><code>for i = 10 downto 1 do
- xl := i :: !xl
-done;
-!xl</code></pre>
-<br/>
-
-<p>
View
3 js_of_ocaml-lessons/lesson2/step4/step.ml
@@ -1,3 +0,0 @@
-fun input output ->
- find_in "4; 5" output && find_in " downto" input
-
View
31 js_of_ocaml-lessons/lesson2/step5/step.html
@@ -1,31 +0,0 @@
-<h3>Computing Conditions</h3>
-
-<p>Boolean values in OCaml can be either <code>true</code>
-or <code>false</code>. They are often created from comparing other
-values. For example:</p>
-
-<p><code>1 &gt; 2</code></p>
-<br />
-
-<p>OCaml's comparison operators can be used on values of any type,
-not only on numerical values. We can compare strings and characters
-too:</p>
-
-<p><code>"aaaaaa" &lt; "bbb"</code></p>
-<p><code>"3" &lt;= "22"</code></p>
-<p><code>22 &gt;= 3</code></p>
-<br />
-
-<p>To test equality, you can use <quote>=</quote>, and for inequality, there
-is <quote>&lt;&gt;</quote>. For example:</p>
-
-<p><code>1 = 1</code></p>
-<p><code>1 &lt;&gt; 1</code></p>
-<p><code>"1" = 1</code></p>
-
-<br />
-
-<p>Oops, OCaml does not allow you to compare values with different
-types, so we must be more careful:</p>
-
-<p><code>"1" = string_of_int 1</code></p>
View
2 js_of_ocaml-lessons/lesson2/step5/step.ml
@@ -1,2 +0,0 @@
-fun input output ->
- find_in "string_of_int" input && find_in "- : bool" output
View
20 js_of_ocaml-lessons/lesson2/step6/step.html
@@ -1,20 +0,0 @@
-<h3>If then else</h3>
-
-<p>Now that we know how to test conditions, we can use them to choose
-between computations. Let's define two values : </p>
-
-<p><code>let a = 1 and b = 2</code></p><br/>
-
-<p>We can compute the minimum of them:</p>
-
-<pre><code>Printf.printf "min(%d,%d) = %d\n" a b
- (if a &lt; b then a else b)</code></pre><br/>
-
-<p>We can of course execute sequences within branches:</p>
-
-<pre><code>let z = if a &lt; 100 then begin
- print_string "return at least 100 !";
- print_newline ();
- 100
- end else a
-</code></pre>
View
4 js_of_ocaml-lessons/lesson2/step6/step.ml
@@ -1,4 +0,0 @@
-fun input output ->
- find_in " : int = 100" output
-
-
View
20 js_of_ocaml-lessons/lesson2/step7/step.html
@@ -1,20 +0,0 @@
-<h3>While loops</h3>
-
-<p>OCaml also provides a <code>while</code> loop, to execute some code
-as long as an expression is true:</p>
-
-<pre><code>while !x &gt; 20 do
- print_int !x; print_newline ();
- x := !x - 2
-done</code></pre>
-
-<!---
-<p>For example, the following code will wait for you to say "yes":</p>
-
-<pre><code>let cond = ref true;;
-while !cond do
- print_string "Say 'yes':";
- cond := ( input_line stdin <> "yes" )
-done;;
-</code></pre>
---->
View
3 js_of_ocaml-lessons/lesson2/step7/step.ml
@@ -1,3 +0,0 @@
-fun input output ->
- find_in "while" input
-
View
12 js_of_ocaml-lessons/lesson2/step8/step.html
@@ -1,12 +0,0 @@
-<h3>Congratulations</h3>
-
-<p>You have seen that OCaml allows you to use some imperative style of
-programming. Some functional programmers will tell you that
-side-effects are bad: they are right, in many cases, but don't listen
-to them too early !</p>
-
-
-<p>In the next lessons, you will see that by combining both imperative
-and functional programming styles, you can do wonders !</p>
-
-<p>Use <code>next()</code> to go to the next lesson !</p>
View
3 js_of_ocaml-lessons/lesson2/step8/step.ml
@@ -1,3 +0,0 @@
-fun input output ->
- find_in " : unit" output && find_in "next" input
-
View
2 js_of_ocaml-lessons/lesson3/lesson.html
@@ -1 +1 @@
-<h3>Functions</h3>
+<h3>-</h3>
View
20 js_of_ocaml-lessons/lesson3/step1/step.html
@@ -1,18 +1,4 @@
-<h3>Defining a one-argument function</h3>
+<h3>This lesson is not yet available</h3>
-<p>In OCaml defining a function with one argument, will look like this:</p>
-<p><code>let incr n = n + 1</code></p>
-
-
-<br />
-<p>You can also use tuples:<p>
-<p><code>let plus_and_divide (x, y, z) = (x + y) / z</code></p>
-<p>Note that even you have <code>x</code>, <code>y</code> and <code>z</code> as
-arguments, this syntax with tuples means that you call the function
-plus_and_divide with <strong>one</strong> argument which is a triple in
-this case.<p>
-
-<br />
-<p>To call a function, nothing is simpler:</p>
-<p><code>incr 42</code></p>
-<p><code>plus_and_divide (10, 20, 2)</code></p>
+<p>Use <code>lessons ()</code> to get the list of all lessons.
+Use <code>back ()</code> to return to the previous step.</p>
View
18 js_of_ocaml-lessons/lesson3/step1/step.html.fr
@@ -1,18 +0,0 @@
-<h3>Définir une fonction avec un argument</h3>
-
-<p>En OCaml, il existe différente mannière de définir une fonction
- avec un seul argument. Par exemple on peut utiliser le mot-clé <code>function</code>:</p>
-<p><code>let incr_v1 = function n -> n + 1</code></p>
-
-<br />
-<p>On peut également utiliser les tuples comme argument::<p>
-<p><code>let plus_and_divide (x, y, z) = (x + y) / z</code></p>
-<p>Notez que malgré les trois
- variables <code>x</code>, <code>y</code> and <code>z</code>, le
- triplet est vu comme <strong>un</strong> seul argument de la
- fonction.<p>
-
-<br />
-<p>Pour appeler une fonction, rien de plus simple:</p>
-<p><code>incr 42</code></p>
-<p><code>plus_and_divide (10, 20, 2)</code></p>
View
4 js_of_ocaml-lessons/lesson3/step1/step.ml
@@ -1,2 +1,2 @@
-fun _ output ->
- find_in "- : int = 15" output
+fun input output ->
+ find_in "- : char =" output
View
17 js_of_ocaml-lessons/lesson3/step2/step.html
@@ -1,17 +0,0 @@
-<h3>Defining a multiple-arguments function</h3>
-
-<p>In C or Java, a function <code>plus</code>, will look like:
-<p><code>int plus (int x, int y) { return x + y; }</code></p>
-
-<br />
-<p>Then the call to this function, will be:</p>
-<p><code>plus (1, 2);</code></p>
-
-<br />
-<p>In OCaml, the same function <code>plus</code> will be define like follow:</p>
-<p><code>let plus x y = x + y</code></p>
-
-<br />
-<p>To call this function, nothing is simpler:</p>
-<p><code>plus 1 2</code></p>
-<p>Note that there is no need to bracket or comma between function's parameters.</p>
View
20 js_of_ocaml-lessons/lesson3/step2/step.html.fr
@@ -1,20 +0,0 @@
-<h3>Définir une fonction avec plusieurs arguments</h3>
-
-<p>En C ou Java, pour définir une fonction <code>plus</code>, on
-écrirait quelque chose come:
-<p><code>int plus (int x, int y) { return x + y; }</code></xp>
-
-<br />
-<p>L'appel à cette fonction, ressemblerait donc à:</p>
-<p><code>plus (1, 2);</code></p>
-
-<br />
-<p>En OCaml, la même fonction <code>plus</code> serait définie comme
- suit:</p>
-<p><code>let plus x y = x + y</code></p>
-
-<br />
-<p>Pour utiliser cette fonction, rien de plus simple :</p>
-<p><code>plus 1 2</code></p>
-<p>On remarque ici aussi qu'il n'y a pas de parenthèses ni de virgules
- entre les paramètres de la fonction.</p>
View
2 js_of_ocaml-lessons/lesson3/step2/step.ml
@@ -1,2 +0,0 @@
-fun _ output ->
- find_in "- : int =" output
View
17 js_of_ocaml-lessons/lesson3/step3/step.html
@@ -1,17 +0,0 @@
-<h3>Returning multiple values</h3>
-
-<p>You will notice that in OCaml, there is no <code>return</code>
-statement; to return a value, the whole body expression is implicitly returned.</p>
-
-<br />
-<p>To return multiple values, we will use tuples. For example:</p>
-<p><code>(2, 3, 4, 5)</code></p>
-
-<br />
-<p>We can write functions which will return multiple values thanks to
-tuples. For example:</p>
-<p><code>let divide x y = (x / y, x mod y)</code></p>
-
-<br />
-<p>Then we get:</p>
-<p><code>divide 10 3</code></p>
View
19 js_of_ocaml-lessons/lesson3/step3/step.html.fr
@@ -1,19 +0,0 @@
-<h3>Retourner plusieurs valeurs</h3>
-
-<p>Vous aurez remarqué qu'en OCaml, nous n'utilisons pas de
-mot-clé <code>return</code> pour retourner une valeur, la valeur de
-l'ensemble du corps est implicitement ce qui est retourné.</p>
-
-<br />
-<p>Pour retourner donc plusieurs valeurs, nous allons utiliser les
-tuples. Par exemple:</p>
-<p><code>(2, 3, 4, 5)</code></p>
-
-<br />
-<p>On peut alors écrire des fonctions qui retournent plusieurs
- valeurs. Par exemple:</p>
-<p><code>let division x y = (x / y, x mod y)</code></p>
-
-<br />
-<p>On obtient alors:</p>
-<p><code>division 10 3</code></p>
View
2 js_of_ocaml-lessons/lesson3/step3/step.ml
@@ -1,2 +0,0 @@
-fun _ output ->
- find_in "- : int * int =" output
View
28 js_of_ocaml-lessons/lesson3/step4/step.html
@@ -1,28 +0,0 @@
-<h3>Partial application</h3>
-
-<p>It is possible to apply a number of parameters less than what is
-required by a function. The result would be a partial application of a
-function.</p>
-
-
-<br />
-<p>Let's take the <code>plus</code> example:</p>
-<p><code>let plus x y = x + y</code></p>
-
-<br />
-<p>Using the partial application, we could rewrite the function
-<code>incr</code>, by giving just one argument to the
-function <code>plus</code>:</p>
-<p><code>let incr = plus 1</code></p>
-
-<br />
-<p>In this way, <code>plus 1</code> will return a function arity 1: <code> val incr : int -> int = &lt;fun&gt;</code><p>
-<p>To increment an integer by one, you can now use the function <code>incr</code>:</p>
-<p><code>incr 42</code></p>
-
-<br />
-<p>Similarly, we can define a function which double each integer
-passed as argument of the function:</p>
-<p><code>let mul x y = x * y </code><p>
-<p><code>let double = mul 2</code><p>
-<p><code>double 8</code><p>
View
28 js_of_ocaml-lessons/lesson3/step4/step.html.fr
@@ -1,28 +0,0 @@
-<h3>Application partielle</h3>
-
-<p>Il est possible d'appliquer un nombre de paramètres inférieur à ce
- qui est demandé par une fonction. Le résultat est une expression
- fonctionnelle, c'est ce qu'on appelle une application partielle.</p>
-
-<br />
-<p>Prenons l'exemple de la fonction <code>plus</code>:</p>
-<p><code>let plus x y = x + y</code></p>
-
-<br />
-<p>À l'aide de l'application partielle, nous pourrions réécrire la
-fonction <code>incr</code>, en n'appliquant seulement qu'un argument</p>
-<p><code>let incr = plus 1</code></p>
-
-<br />
-<p>De cette manière <code>plus 1</code> renvoie une fonction d'arité 1
-<code> val incr : int -> int = &lt;fun&gt;</code><p>
-<p>Il suffira donc de donner un entier à <code>incr</code> pour obtenir
-l'addition entre cet entier et <code>1</code>:</p>
-<p><code>incr 42</code></p>
-
-<br />
-<p>De la même manière on peut définir une fonction qui multiplie par
-<code>2</code> chaque entier:</p>
-<p><code>let mul x y = x * y </code><p>
-<p><code>let double = mul 2</code><p>
-<p><code>double 8</code><p>
View
2 js_of_ocaml-lessons/lesson3/step4/step.ml
@@ -1,2 +0,0 @@
-fun _ output ->
- find_in "- : int = 16" output
View
11 js_of_ocaml-lessons/lesson3/step5/step.html
@@ -1,11 +0,0 @@
-<h3>Anonymous functions</h3>
-
-<p>In OCaml, we can write anonymous functions, functions defined
-without being bound to an identifier. For example:</p>
-<p><code>(fun x -> x + 1) 42</code></p>
-
-<br />
-<p>We can bound an anonymous function to an identifier. That's way, we
-have severals ways to define functions:</p>
-<p><code>let incr = fun x -> x + 1</code></p>
-<p><code>incr 42</code></p>
View
11 js_of_ocaml-lessons/lesson3/step5/step.html.fr
@@ -1,11 +0,0 @@
-<h3>Fonctions anonymes</h3>
-
-<p>En OCaml, on peut écrire des fonctions anonymes, des fonctions sans
-nom.</p>
-<p><code>(fun x -> x + 1) 42</code></p>
-
-<br />
-<p>On peut également nommer des fonctions anonymes. Grâce à cela, on
- a donc une autre façon de définir des fonctions:</p>
-<p><code>let incr = fun x -> x + 1</code></p>
-<p><code>incr 42</code></p>
View
2 js_of_ocaml-lessons/lesson3/step5/step.ml
@@ -1,2 +0,0 @@
-fun input _ ->
- find_in "incr 42;;" input
View
35 js_of_ocaml-lessons/lesson3/step6/step.html
@@ -1,35 +0,0 @@
-<h3>Iterators</h3>
-
-<p>What is really fun is that you can now mix anonymous functions and
-iterators.
-Let's take an example with list. If you want to increment all elements
-of a list, you will use <code>List.map</code>:</p>
-<p><code>List.map (fun x -> x + 1) [ 1; 2; 3; 4 ]</code></p>
-<br />
-<p>Here, <code>x</code> is an element of the list, <code>x + 1</code>
-is the operation that will be done on <code>x</code>. The result will
-be a list with all its elements incremented by 1.</p>
-
-<br />
-<p>Here is an example with <code>fold_left</code>. If you want to
-compute the sum of all elements of a list:</p>
-<pre><code>List.fold_left
- (fun acc x -> acc + x)
- 0
- [ 1; 2; 3; 4 ]
-</code></pre>
-
-<p>If we have :</p>
-<p><code>let plus = fun acc x -> acc + x</code></p>
-<p>then:</p>
-<p><code>List.fold_left plus 0 [ 1; 2; 3; 4 ]</code></p>
-<p>is equivalent to:</p>
-<p><code>plus (plus (plus (plus 0 1) 2) 3) 4</code></p>
-
-<br />
-<p>To finish, you may need to print values from a list:</p>
-<p><code>List.iter print_int [ 1; 2; 3; 4 ]</code></p>
-
-
-<br />
-<p>You can do the same sort of things on arrays too.</p>
View
36 js_of_ocaml-lessons/lesson3/step6/step.html.fr
@@ -1,36 +0,0 @@
-<h3>Les itérateurs</h3>
-
-<p>On peut maintenant combiner les fonctions anonymes avec les
- itérateurs prédéfinis.
-Prenons un exemple avec les listes. Si on veut incrémenter tous les
- éléments d'une liste, on utilisera <code>List.map</code>:</p>
-<p><code>List.map (fun x -> x + 1) [ 1; 2; 3; 4 ]</code></p>
-<br />
-<p>Ici, <code>x</code> est un élément de la liste, <code>x + 1</code>
- est l'opération qui sera effectuée sur <code>x</code>. Le résultat
- sera une liste dont tous ses éléments seront incrémentés de 1.</p>
-
-<br />
-<p>Un exemple avec <code>fold_left</code>. Si on veut faire la somme
- de tous les éléments d'une liste : </p>
-<pre><code>List.fold_left
- (fun acc x -> acc + x)
- 0
- [ 1; 2; 3; 4 ]
-</code></pre>
-
-<p>Si on a :</p>
-<p><code>let plus = fun acc x -> acc + x</code></p>
-<p>alors:</p>
-<p><code>List.fold_left plus 0 [ 1; 2; 3; 4 ]</code></p>
-<p>est équivalent à:</p>
-<p><code>plus (plus (plus (plus 0 1) 2) 3) 4</code></p>
-
-<br />
-<p>Pour finir, on peut avoir besoin d'afficher les valeurs d'une
- liste, pour cela on utilisera <code>List.iter</code>:</p>
-<p><code>List.iter print_int [ 1; 2; 3; 4 ]</code></p>
-
-
-<br />
-<p>On peut faire les mêmes opérations sur les tableaux.</p>
View
2 js_of_ocaml-lessons/lesson3/step6/step.ml
@@ -1,2 +0,0 @@
-fun _ output ->
- find_in "- : unit = ()" output
View
2 js_of_ocaml-lessons/lesson4/lesson.html
@@ -1 +1 @@
-<h3>Pattern-matching</h3>
+<h3>-</h3>
View
29 js_of_ocaml-lessons/lesson4/step1/step.html
@@ -1,27 +1,4 @@
-<h3>Pattern-matching on integers</h3>
-
-<p>A powerful feature of OCaml is pattern-matching.
-
- For simple values as integers, pattern-matching is quite similar to
- case switches in other languages (<em>_</em> corresponds to the
- default case). Moreover, each case is handled in chronological order:
-
-<pre><code>let string_of_int x = match x with
- | 0 -> "zero"
- | 1 -> "one"
- | 2 -> "two"
- | _ -> "many"
-</code></pre>
-
-In this case, the pattern matching is done on the last function
-argument, so this function can be rewritten in a shorter form:
-
-<pre><code>let string_of_int = function
- | 0 -> "zero"
- | 1 -> "one"
- | 2 -> "two"
- | _ -> "many"
-</code></pre>
-
-</p>
+<h3>This lesson is not yet available</h3>
+<p>Use <code>lessons ()</code> to get the list of all lessons.
+Use <code>back ()</code> to return to the previous step.</p>
View
2 js_of_ocaml-lessons/lesson4/step1/step.ml
@@ -1,2 +1,2 @@
fun input output ->
- find_in "string_of_int : int -> string =" output
+ find_in "- : char =" output
View
21 js_of_ocaml-lessons/lesson4/step2/step.html
@@ -1,21 +0,0 @@
-<h3>Pattern-matching on chars</h3>
-
-<p>Pattern-matching on characters is also possible, with a special
- syntax to denote character ranges:
-
-<pre><code>let is_capital = function
- | 'a' .. 'z' -> false
- | 'A' .. 'Z' -> true
- | _ -> failwith "Not a valid letter"
-</code></pre>
-
-It is possible to give a name the value which is matched using the
-keyword <em>as</em>:
-
-<pre><code>let capitalize = function
- | 'a' .. 'z' as letter -> Char.uppercase letter
- | 'A' .. 'Z' as letter -> letter
- | _ -> failwith "Not a valid letter"
-</code></pre>
-
-</p>
View
2 js_of_ocaml-lessons/lesson4/step2/step.ml
@@ -1,2 +0,0 @@
-fun input output ->
- find_in "val capitalize : char -> char =" output
View
32 js_of_ocaml-lessons/lesson4/step3/step.html
@@ -1,32 +0,0 @@
-<h3>Pattern-matching on tuples</h3>
-
-<p>Pattern-matching is also possible on tuples:
-
-<pre><code>let fit str len = match (str,len) with
- | ("foo", 51) -> true
- | ("bar", 51) -> true
- | (_ , 42) -> false
- | _ -> (String.length str) = len
-</code></pre>
-
-In case multiple patterns return a similar value, it is possible to
-omit the first occurrences of the value:
-
-<pre><code>let fit str len = match (str,len) with
- | ("foo", 51)
- | ("bar", 51) -> true
- | (_ , 42) -> false
- | _ -> (String.length str) = len
-</code></pre>
-
-Furthermore, it is possible to guard each of the pattern with some
-condition which will be computed when the pattern is evaluated, using
-the keyword <em>when</em>:
-
-<pre><code>let fit str len = match (str,len) with
- | (_,51) when (str="foo" || str="bar") -> true
- | (_, x) when x=42 -> false
- | _ -> (String.length str) = len
-</code></pre>
-
-</p>
View
3 js_of_ocaml-lessons/lesson4/step3/step.ml
@@ -1,3 +0,0 @@
-fun input output ->
- find_in " | (_, x) when x=42 -> false" input &&
- find_in "val fit : string -> int -> bool =" output
View
33 js_of_ocaml-lessons/lesson4/step4/step.html
@@ -1,33 +0,0 @@
-<h3>Pattern-matching on lists</h3>
-
-<p>
- However, the real power of pattern-matching appears when we start
- using more structured values, when we start needing giving a name to
- matched patterns. For instance, a list is either the empty
- list <em>[]</em> or a head and a tail, denoted by the
- pattern <em>h::t</em> where <em>h</em> and <em>t</em> are fresh
- variables bound to the matched patterns:
-
-<pre><code>let head = function
- | [] -> failwith "empty list"
- | h::t -> h
-</code></pre>
-
-More complex patterns can be written, for instance to look at the head
-of the tail:
-
-<pre><code>let second_element = function
- | [] -> failwith "the list is empty"
- | [_] -> failwith "the list contains only one element"
- | _::e::_ -> e
-</code></pre>
-
-Or to look deeper into the matched list:
-
-<pre><code>let head_head = function
- | [] -> failwith "the list is empty"
- | []::_ -> failwith "the head is the empty list"
- | (h::_)::_ -> h
-</code></pre>
-</p>
-
View
2 js_of_ocaml-lessons/lesson4/step4/step.ml
@@ -1,2 +0,0 @@
-fun input output ->
- find_in "val head_head : 'a list list -> 'a =" output
View
17 js_of_ocaml-lessons/lesson4/step5/step.html
@@ -1,17 +0,0 @@
-<h3>Pattern-matching on arrays</h3>
-
-<p>You can also pattern match on arrays:
-
-<pre><code>let has_size_two = function
- | [| _; _ |] -> true
- | _ -> false
-</code></pre>
-
-And you can mix all the kind of values:
-
-<pre><code>let f = function
- | [] -> failwith "empty list"
- | [| _; (_, x) |]::_ -> x
- | _ -> failwith "the first array should be of size two"
-</code></pre>
-</p>
View
2 js_of_ocaml-lessons/lesson4/step5/step.ml
@@ -1,2 +0,0 @@
-fun input output ->
- find_in "val f : ('a * 'b) array list -> 'b =" output
View
22 js_of_ocaml-lessons/lesson4/step6/step.html
@@ -1,22 +0,0 @@
-<h3>Exhaustiveness</h3>
-
-<p>One of the benefit of pattern-matching is the exhaustiveness check
- done by the compiler statically. Indeed, the OCaml compiler can
- verify that all the cases are handled. For instance, when
- pattern-matching on a list, the compiler will warn
- the user if she forgets to handle the empty list case:
-
-<pre><code>let head_partial = function
- | h::_ -> h
-</code></pre>
-
-Moreover, the compiler will also warm the user when a case is handled
-multiple times or when a case is unused:
-
-<pre><code>let head = function
- | [] -> failwith "empty list"
- | h::_ -> h
- | [h] -> h
-</code></pre>
-
-</p>
View
2 js_of_ocaml-lessons/lesson4/step6/step.ml
@@ -1,2 +0,0 @@
-fun input output ->
- find_in "val head : 'a list -> 'a =" output
View
13 ocp-jslib/cookie.ml
@@ -1,3 +1,4 @@
+
let get_cookie () =
let reg1 = Regexp.regexp "; " in
let list = Regexp.split reg1 (Js.to_string Dom_html.document##cookie) in
@@ -8,17 +9,19 @@ let get_cookie () =
| [] -> ("", "")
) list
+let initial_cookies = get_cookie ()
+
let set_cookie key value =
let today = jsnew Js.date_now () in
- let expire_date = jsnew Js.date_ms
- (today##getFullYear () + 1, today##getMonth (), today##getDay (),
- today##getHours (), today##getMinutes (), today##getSeconds (),
+ let expire_date = jsnew Js.date_ms
+ (today##getFullYear () + 1, today##getMonth (), today##getDay (),
+ today##getHours (), today##getMinutes (), today##getSeconds (),
today##getMilliseconds ()) in
let expire_time = Js.to_string expire_date##toUTCString () in
- Dom_html.document##cookie <-
+ Dom_html.document##cookie <-
Js.string (Printf.sprintf "%s=%s;expires=%s" key value expire_time)
let set_cookie_with_timeout key value date =
let expire_time = Js.to_string date##toUTCString () in
- Dom_html.document##cookie <-
+ Dom_html.document##cookie <-
Js.string (Printf.sprintf "%s=%s;expires=%s" key value expire_time)
View
4 ocp-jslib/cookie.mli
@@ -10,7 +10,5 @@ val set_cookie_with_timeout : string -> string -> Js.date Js.t -> unit
-
-
-
+val initial_cookies : (string * string) list
View
19 ocp-jslib/utils.ml
@@ -49,3 +49,22 @@ let jsnew3 (constr : ('a -> 'b -> 'c -> 'z Js.t) Js.constr) (a,b,c) =
Js.Unsafe.inject (b : 'b);
Js.Unsafe.inject (c : 'c);
|] : 'z Js.t)
+
+let setIntervalUntilFalse f time =
+ let interval_id = ref None in
+ let f () =
+ if not (f ()) then
+ match !interval_id with
+ None -> ()
+ | Some interval_id ->
+ window##clearInterval (interval_id)
+ in
+ interval_id := Some (window##setInterval (_f f, time))
+
+let setInterval f time =
+ let interval_id = window##setInterval (_f f, time) in
+ (fun _ -> window##clearInterval (interval_id))
+
+let setTimeout f time =
+ let interval_id = window##setTimeout (_f f, time) in
+ (fun _ -> window##clearTimeout (interval_id))
View
11 ocp-jslib/utils.mli
@@ -21,19 +21,22 @@ val get_by_name : string -> string
(** {2 Constructors} *)
-(** [jsnew0] is a syntax extension to build an object using contructor [constr]
+(** [jsnew0] is a function to build an object using contructor [constr]
without arguments. *)
val jsnew0 : 'a Js.t Js.constr -> unit -> 'a Js.t
-(** [jsnew1] is a syntax extension to build an object using contructor [constr]
+(** [jsnew1] is a function to build an object using contructor [constr]
and argument [a].*)
val jsnew1 : ('a -> 'b Js.t) Js.constr -> 'a -> 'b Js.t
-(** [jsnew2] is a syntax extension to build an object using contructor [constr]
+(** [jsnew2] is a function to build an object using contructor [constr]
and arguments [a] and [b].*)
val jsnew2 : ('a -> 'b -> 'c Js.t) Js.constr -> 'a * 'b -> 'c Js.t
-(** [jsnew3] is a syntax extension to build an object using contructor [constr]
+(** [jsnew3] is a function to build an object using contructor [constr]
and arguments [a], [b] and [c].*)
val jsnew3 : ('a -> 'b -> 'c -> 'd Js.t) Js.constr -> 'a * 'b * 'c -> 'd Js.t
+val setIntervalUntilFalse : (unit -> bool) -> float -> unit
+val setInterval : (unit -> unit) -> float -> (unit -> unit)
+val setTimeout : (unit -> unit) -> float -> (unit -> unit)
View
6 try-js_of_ocaml/Makefile
@@ -4,6 +4,7 @@ LESSON_SET=$(ROOT)/js_of_ocaml-lessons
TRYOCAML_EXTRA_CMIS=
TRYOCAML_EXTRA_CMAS=
+TRYOCAML_EXTRA_INCLUDES=-I $(OCPJSLIB_DIR)
TRYOCAML_EXTRA_MODULES= \
css \
dom \
@@ -20,6 +21,11 @@ TRYOCAML_EXTRA_MODULES= \
regexp \
url \
xmlHttpRequest \
+ \
+ utils \
+ button \
+ cookie \
+ dragnDrop
include $(ROOT)/Makefile.config
include $(ROOT)/Makefile.tryocaml
View
356 try-js_of_ocaml/bootstrap.css
@@ -0,0 +1,356 @@
+html,body{margin:0;padding:0;}
+h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;}
+table{border-collapse:collapse;border-spacing:0;}
+ol,ul{list-style:none;}
+q:before,q:after,blockquote:before,blockquote:after{content:"";}
+html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
+a:focus{outline:thin dotted;}
+a:hover,a:active{outline:0;}
+article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
+audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
+audio:not([controls]){display:none;}
+sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
+sup{top:-0.5em;}
+sub{bottom:-0.25em;}
+img{border:0;-ms-interpolation-mode:bicubic;}
+button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}
+button,input{line-height:normal;*overflow:visible;}
+button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
+button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
+input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
+input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}
+textarea{overflow:auto;vertical-align:top;}
+body{background-color:#ffffff;margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#404040;}
+.container{width:940px;margin-left:auto;margin-right:auto;zoom:1;}.container:before,.container:after{display:table;content:"";zoom:1;}
+.container:after{clear:both;}
+.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;}
+.container-fluid:after{clear:both;}
+.container-fluid>.sidebar{position:absolute;top:0;left:20px;width:220px;}
+.container-fluid>.content{margin-left:240px;}
+a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;}
+.pull-right{float:right;}
+.pull-left{float:left;}
+.hide{display:none;}
+.show{display:block;}
+.row{zoom:1;margin-left:-20px;}.row:before,.row:after{display:table;content:"";zoom:1;}
+.row:after{clear:both;}
+.row>[class*="span"]{display:inline;float:left;margin-left:20px;}
+.span1{width:40px;}
+.span2{width:100px;}
+.span3{width:160px;}
+.span4{width:220px;}
+.span5{width:280px;}
+.span6{width:340px;}
+.span7{width:400px;}
+.span8{width:460px;}
+.span9{width:520px;}
+.span10{width:580px;}
+.span11{width:640px;}
+.span12{width:700px;}
+.span13{width:760px;}
+.span14{width:820px;}
+.span15{width:880px;}
+.span16{width:940px;}
+.span17{width:1000px;}
+.span18{width:1060px;}
+.span19{width:1120px;}
+.span20{width:1180px;}
+.span21{width:1240px;}
+.span22{width:1300px;}
+.span23{width:1360px;}
+.span24{width:1420px;}
+.row>.offset1{margin-left:80px;}
+.row>.offset2{margin-left:140px;}
+.row>.offset3{margin-left:200px;}
+.row>.offset4{margin-left:260px;}
+.row>.offset5{margin-left:320px;}
+.row>.offset6{margin-left:380px;}
+.row>.offset7{margin-left:440px;}
+.row>.offset8{margin-left:500px;}
+.row>.offset9{margin-left:560px;}
+.row>.offset10{margin-left:620px;}
+.row>.offset11{margin-left:680px;}
+.row>.offset12{margin-left:740px;}
+.span-one-third{width:300px;}
+.span-two-thirds{width:620px;}
+.row>.offset-one-third{margin-left:340px;}
+.row>.offset-two-thirds{margin-left:660px;}
+p{font-size:13px;font-weight:normal;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;}
+h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;}
+h1{margin-bottom:18px;font-size:30px;line-height:36px;}h1 small{font-size:18px;}
+h2{font-size:24px;line-height:36px;}h2 small{font-size:14px;}
+h3,h4,h5,h6{line-height:36px;}
+h3{font-size:18px;}h3 small{font-size:14px;}
+h4{font-size:16px;}h4 small{font-size:12px;}
+h5{font-size:14px;}
+h6{font-size:13px;color:#bfbfbf;text-transform:uppercase;}
+ul,ol{margin:0 0 18px 25px;}
+ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
+ul{list-style:disc;}
+ol{list-style:decimal;}
+li{line-height:18px;color:#808080;}
+ul.unstyled{list-style:none;margin-left:0;}
+dl{margin-bottom:18px;}dl dt,dl dd{line-height:18px;}
+dl dt{font-weight:bold;}
+dl dd{margin-left:9px;}
+hr{margin:20px 0 19px;border:0;border-bottom:1px solid #eee;}
+strong{font-style:inherit;font-weight:bold;}
+em{font-style:italic;font-weight:inherit;line-height:inherit;}
+.muted{color:#bfbfbf;}
+blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px;}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0;}
+blockquote small{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf;}blockquote small:before{content:'\2014 \00A0';}
+address{display:block;line-height:18px;margin-bottom:18px;}
+code,pre{padding:0 3px 2px;font-family:Monaco, Andale Mono, Courier New, monospace;font-size:12px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+code{background-color:#fee9cc;color:rgba(0, 0, 0, 0.75);padding:1px 3px;}
+pre{background-color:#f5f5f5;display:block;padding:8.5px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre;white-space:pre-wrap;word-wrap:break-word;}
+form{margin-bottom:18px;}
+fieldset{margin-bottom:18px;padding-top:18px;}fieldset legend{display:block;padding-left:150px;font-size:19.5px;line-height:1;color:#404040;*padding:0 0 5px 145px;*line-height:1.5;}
+form .clearfix{margin-bottom:18px;zoom:1;}form .clearfix:before,form .clearfix:after{display:table;content:"";zoom:1;}
+form .clearfix:after{clear:both;}
+label,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:normal;}
+label{padding-top:6px;font-size:13px;line-height:18px;float:left;width:130px;text-align:right;color:#404040;}
+form .input{margin-left:150px;}
+input[type=checkbox],input[type=radio]{cursor:pointer;}
+input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;font-size:13px;line-height:18px;color:#808080;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+select{padding:initial;}
+input[type=checkbox],input[type=radio]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:none;}
+input[type=file]{background-color:#ffffff;padding:initial;border:initial;line-height:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;}
+select,input[type=file]{height:27px;*height:auto;line-height:27px;*margin-top:4px;}
+select[multiple]{height:inherit;background-color:#ffffff;}
+textarea{height:auto;}
+.uneditable-input{background-color:#ffffff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
+:-moz-placeholder{color:#bfbfbf;}
+::-webkit-input-placeholder{color:#bfbfbf;}
+input,textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);}
+input:focus,textarea:focus{outline:0;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);}
+input[type=file]:focus,input[type=checkbox]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:1px dotted #666;}
+form .clearfix.error>label,form .clearfix.error .help-block,form .clearfix.error .help-inline{color:#b94a48;}
+form .clearfix.error input,form .clearfix.error textarea{color:#b94a48;border-color:#ee5f5b;}form .clearfix.error input:focus,form .clearfix.error textarea:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
+form .clearfix.error .input-prepend .add-on,form .clearfix.error .input-append .add-on{color:#b94a48;background-color:#fce6e6;border-color:#b94a48;}
+form .clearfix.warning>label,form .clearfix.warning .help-block,form .clearfix.warning .help-inline{color:#c09853;}
+form .clearfix.warning input,form .clearfix.warning textarea{color:#c09853;border-color:#ccae64;}form .clearfix.warning input:focus,form .clearfix.warning textarea:focus{border-color:#be9a3f;-webkit-box-shadow:0 0 6px #e5d6b1;-moz-box-shadow:0 0 6px #e5d6b1;box-shadow:0 0 6px #e5d6b1;}
+form .clearfix.warning .input-prepend .add-on,form .clearfix.warning .input-append .add-on{color:#c09853;background-color:#d2b877;border-color:#c09853;}
+form .clearfix.success>label,form .clearfix.success .help-block,form .clearfix.success .help-inline{color:#468847;}
+form .clearfix.success input,form .clearfix.success textarea{color:#468847;border-color:#57a957;}form .clearfix.success input:focus,form .clearfix.success textarea:focus{border-color:#458845;-webkit-box-shadow:0 0 6px #9acc9a;-moz-box-shadow:0 0 6px #9acc9a;box-shadow:0 0 6px #9acc9a;}
+form .clearfix.success .input-prepend .add-on,form .clearfix.success .input-append .add-on{color:#468847;background-color:#bcddbc;border-color:#468847;}
+.input-mini,input.mini,textarea.mini,select.mini{width:60px;}
+.input-small,input.small,textarea.small,select.small{width:90px;}
+.input-medium,input.medium,textarea.medium,select.medium{width:150px;}
+.input-large,input.large,textarea.large,select.large{width:210px;}
+.input-xlarge,input.xlarge,textarea.xlarge,select.xlarge{width:270px;}
+.input-xxlarge,input.xxlarge,textarea.xxlarge,select.xxlarge{width:530px;}
+textarea.xxlarge{overflow-y:auto;}
+input.span1,textarea.span1{display:inline-block;float:none;width:30px;margin-left:0;}
+input.span2,textarea.span2{display:inline-block;float:none;width:90px;margin-left:0;}
+input.span3,textarea.span3{display:inline-block;float:none;width:150px;margin-left:0;}
+input.span4,textarea.span4{display:inline-block;float:none;width:210px;margin-left:0;}
+input.span5,textarea.span5{display:inline-block;float:none;width:270px;margin-left:0;}
+input.span6,textarea.span6{display:inline-block;float:none;width:330px;margin-left:0;}
+input.span7,textarea.span7{display:inline-block;float:none;width:390px;margin-left:0;}
+input.span8,textarea.span8{display:inline-block;float:none;width:450px;margin-left:0;}
+input.span9,textarea.span9{display:inline-block;float:none;width:510px;margin-left:0;}
+input.span10,textarea.span10{display:inline-block;float:none;width:570px;margin-left:0;}
+input.span11,textarea.span11{display:inline-block;float:none;width:630px;margin-left:0;}
+input.span12,textarea.span12{display:inline-block;float:none;width:690px;margin-left:0;}
+input.span13,textarea.span13{display:inline-block;float:none;width:750px;margin-left:0;}
+input.span14,textarea.span14{display:inline-block;float:none;width:810px;margin-left:0;}
+input.span15,textarea.span15{display:inline-block;float:none;width:870px;margin-left:0;}
+input.span16,textarea.span16{display:inline-block;float:none;width:930px;margin-left:0;}
+input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;}
+.actions{background:#f5f5f5;margin-top:18px;margin-bottom:18px;padding:17px 20px 18px 150px;border-top:1px solid #ddd;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;}.actions .secondary-action{float:right;}.actions .secondary-action a{line-height:30px;}.actions .secondary-action a:hover{text-decoration:underline;}
+.help-inline,.help-block{font-size:13px;line-height:18px;color:#bfbfbf;}
+.help-inline{padding-left:5px;*position:relative;*top:-5px;}
+.help-block{display:block;max-width:600px;}
+.inline-inputs{color:#808080;}.inline-inputs span{padding:0 2px 0 1px;}
+.input-prepend input,.input-append input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
+.input-prepend .add-on,.input-append .add-on{position:relative;background:#f5f5f5;border:1px solid #ccc;z-index:2;float:left;display:block;width:auto;min-width:16px;height:18px;padding:4px 4px 4px 5px;margin-right:-1px;font-weight:normal;line-height:18px;color:#bfbfbf;text-align:center;text-shadow:0 1px 0 #ffffff;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.input-prepend .active,.input-append .active{background:#a9dba9;border-color:#46a546;}
+.input-prepend .add-on{*margin-top:1px;}
+.input-append input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
+.input-append .add-on{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:0;margin-left:-1px;}
+.inputs-list{margin:0 0 5px;width:100%;}.inputs-list li{display:block;padding:0;width:100%;}
+.inputs-list label{display:block;float:none;width:auto;padding:0;margin-left:20px;line-height:18px;text-align:left;white-space:normal;}.inputs-list label strong{color:#808080;}
+.inputs-list label small{font-size:11px;font-weight:normal;}
+.inputs-list .inputs-list{margin-left:25px;margin-bottom:10px;padding-top:0;}
+.inputs-list:first-child{padding-top:6px;}
+.inputs-list li+li{padding-top:2px;}
+.inputs-list input[type=radio],.inputs-list input[type=checkbox]{margin-bottom:0;margin-left:-20px;float:left;}
+.form-stacked{padding-left:20px;}.form-stacked fieldset{padding-top:9px;}
+.form-stacked legend{padding-left:0;}
+.form-stacked label{display:block;float:none;width:auto;font-weight:bold;text-align:left;line-height:20px;padding-top:0;}
+.form-stacked .clearfix{margin-bottom:9px;}.form-stacked .clearfix div.input{margin-left:0;}
+.form-stacked .inputs-list{margin-bottom:0;}.form-stacked .inputs-list li{padding-top:0;}.form-stacked .inputs-list li label{font-weight:normal;padding-top:0;}
+.form-stacked div.clearfix.error{padding-top:10px;padding-bottom:10px;padding-left:10px;margin-top:0;margin-left:-10px;}
+.form-stacked .actions{margin-left:-20px;padding-left:20px;}
+table{width:100%;margin-bottom:18px;padding:0;font-size:13px;border-collapse:collapse;}table th,table td{padding:10px 10px 9px;line-height:18px;text-align:left;}
+table th{padding-top:9px;font-weight:bold;vertical-align:middle;}
+table td{vertical-align:top;border-top:1px solid #ddd;}
+table tbody th{border-top:1px solid #ddd;vertical-align:top;}
+.condensed-table th,.condensed-table td{padding:5px 5px 4px;}
+.bordered-table{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.bordered-table th+th,.bordered-table td+td,.bordered-table th+td{border-left:1px solid #ddd;}
+.bordered-table thead tr:first-child th:first-child,.bordered-table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}
+.bordered-table thead tr:first-child th:last-child,.bordered-table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
+.bordered-table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}
+.bordered-table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;}
+table .span1{width:20px;}
+table .span2{width:60px;}
+table .span3{width:100px;}
+table .span4{width:140px;}
+table .span5{width:180px;}
+table .span6{width:220px;}
+table .span7{width:260px;}
+table .span8{width:300px;}
+table .span9{width:340px;}
+table .span10{width:380px;}
+table .span11{width:420px;}
+table .span12{width:460px;}
+table .span13{width:500px;}
+table .span14{width:540px;}
+table .span15{width:580px;}
+table .span16{width:620px;}
+.zebra-striped tbody tr:nth-child(odd) td,.zebra-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
+.zebra-striped tbody tr:hover td,.zebra-striped tbody tr:hover th{background-color:#f5f5f5;}
+table .header{cursor:pointer;}table .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;}
+table .headerSortUp,table .headerSortDown{background-color:rgba(141, 192, 219, 0.25);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);}
+table .header:hover:after{visibility:visible;}
+table .headerSortDown:after,table .headerSortDown:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;}
+table .headerSortUp:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;}
+table .blue{color:#049cdb;border-bottom-color:#049cdb;}
+table .headerSortUp.blue,table .headerSortDown.blue{background-color:#ade6fe;}
+table .green{color:#46a546;border-bottom-color:#46a546;}
+table .headerSortUp.green,table .headerSortDown.green{background-color:#cdeacd;}
+table .red{color:#9d261d;border-bottom-color:#9d261d;}
+table .headerSortUp.red,table .headerSortDown.red{background-color:#f4c8c5;}
+table .yellow{color:#ffc40d;border-bottom-color:#ffc40d;}
+table .headerSortUp.yellow,table .headerSortDown.yellow{background-color:#fff6d9;}
+table .orange{color:#f89406;border-bottom-color:#f89406;}
+table .headerSortUp.orange,table .headerSortDown.orange{background-color:#fee9cc;}
+table .purple{color:#7a43b6;border-bottom-color:#7a43b6;}
+table .headerSortUp.purple,table .headerSortDown.purple{background-color:#e2d5f0;}
+.topbar{height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible;}.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
+.topbar h3 a:hover,.topbar .brand:hover,.topbar ul .active>a{background-color:#333;background-color:rgba(255, 255, 255, 0.05);color:#ffffff;text-decoration:none;}
+.topbar h3{position:relative;}
+.topbar h3 a,.topbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#ffffff;font-size:20px;font-weight:200;line-height:1;}
+.topbar p{margin:0;line-height:40px;}.topbar p a:hover{background-color:transparent;color:#ffffff;}
+.topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}
+.topbar form.pull-right{float:right;}
+.topbar input{background-color:#444;background-color:rgba(255, 255, 255, 0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;padding:4px 9px;color:#ffffff;color:rgba(255, 255, 255, 0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.topbar input:-moz-placeholder{color:#e6e6e6;}
+.topbar input::-webkit-input-placeholder{color:#e6e6e6;}
+.topbar input:hover{background-color:#bfbfbf;background-color:rgba(255, 255, 255, 0.5);color:#ffffff;}
+.topbar input:focus,.topbar input.focused{outline:0;background-color:#ffffff;color:#404040;text-shadow:0 1px 0 #ffffff;border:0;padding:5px 10px;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);}
+.topbar-inner,.topbar .fill{background-color:#222;background-color:#222222;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}
+.topbar div>ul,.nav{display:block;float:left;margin:0 10px 0 0;position:relative;left:0;}.topbar div>ul>li,.nav>li{display:block;float:left;}
+.topbar div>ul a,.nav a{display:block;float:none;padding:10px 10px 11px;line-height:19px;text-decoration:none;}.topbar div>ul a:hover,.nav a:hover{color:#ffffff;text-decoration:none;}
+.topbar div>ul .active>a,.nav .active>a{background-color:#222;background-color:rgba(0, 0, 0, 0.5);}
+.topbar div>ul.secondary-nav,.nav.secondary-nav{float:right;margin-left:10px;margin-right:0;}.topbar div>ul.secondary-nav .menu-dropdown,.nav.secondary-nav .menu-dropdown,.topbar div>ul.secondary-nav .dropdown-menu,.nav.secondary-nav .dropdown-menu{right:0;border:0;}
+.topbar div>ul a.menu:hover,.nav a.menu:hover,.topbar div>ul li.open .menu,.nav li.open .menu,.topbar div>ul .dropdown-toggle:hover,.nav .dropdown-toggle:hover,.topbar div>ul .dropdown.open .dropdown-toggle,.nav .dropdown.open .dropdown-toggle{background:#444;background:rgba(255, 255, 255, 0.05);}
+.topbar div>ul .menu-dropdown,.nav .menu-dropdown,.topbar div>ul .dropdown-menu,.nav .dropdown-menu{background-color:#333;}.topbar div>ul .menu-dropdown a.menu,.nav .menu-dropdown a.menu,.topbar div>ul .dropdown-menu a.menu,.nav .dropdown-menu a.menu,.topbar div>ul .menu-dropdown .dropdown-toggle,.nav .menu-dropdown .dropdown-toggle,.topbar div>ul .dropdown-menu .dropdown-toggle,.nav .dropdown-menu .dropdown-toggle{color:#ffffff;}.topbar div>ul .menu-dropdown a.menu.open,.nav .menu-dropdown a.menu.open,.topbar div>ul .dropdown-menu a.menu.open,.nav .dropdown-menu a.menu.open,.topbar div>ul .menu-dropdown .dropdown-toggle.open,.nav .menu-dropdown .dropdown-toggle.open,.topbar div>ul .dropdown-menu .dropdown-toggle.open,.nav .dropdown-menu .dropdown-toggle.open{background:#444;background:rgba(255, 255, 255, 0.05);}
+.topbar div>ul .menu-dropdown li a,.nav .menu-dropdown li a,.topbar div>ul .dropdown-menu li a,.nav .dropdown-menu li a{color:#999;text-shadow:0 1px 0 rgba(0, 0, 0, 0.5);}.topbar div>ul .menu-dropdown li a:hover,.nav .menu-dropdown li a:hover,.topbar div>ul .dropdown-menu li a:hover,.nav .dropdown-menu li a:hover{background-color:#191919;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));background-image:-moz-linear-gradient(top, #292929, #191919);background-image:-ms-linear-gradient(top, #292929, #191919);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919));background-image:-webkit-linear-gradient(top, #292929, #191919);background-image:-o-linear-gradient(top, #292929, #191919);background-image:linear-gradient(top, #292929, #191919);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0);color:#ffffff;}
+.topbar div>ul .menu-dropdown .active a,.nav .menu-dropdown .active a,.topbar div>ul .dropdown-menu .active a,.nav .dropdown-menu .active a{color:#ffffff;}
+.topbar div>ul .menu-dropdown .divider,.nav .menu-dropdown .divider,.topbar div>ul .dropdown-menu .divider,.nav .dropdown-menu .divider{background-color:#222;border-color:#444;}
+.topbar ul .menu-dropdown li a,.topbar ul .dropdown-menu li a{padding:4px 15px;}
+li.menu,.dropdown{position:relative;}
+a.menu:after,.dropdown-toggle:after{width:0;height:0;display:inline-block;content:"&darr;";text-indent:-99999px;vertical-align:top;margin-top:8px;margin-left:4px;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #ffffff;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;}
+.menu-dropdown,.dropdown-menu{background-color:#ffffff;float:left;display:none;position:absolute;top:40px;z-index:900;min-width:160px;max-width:220px;_width:160px;margin-left:0;margin-right:0;padding:6px 0;zoom:1;border-color:#999;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:0 1px 1px;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.menu-dropdown li,.dropdown-menu li{float:none;display:block;background-color:none;}
+.menu-dropdown .divider,.dropdown-menu .divider{height:1px;margin:5px 0;overflow:hidden;background-color:#eee;border-bottom:1px solid #ffffff;}
+.topbar .dropdown-menu a,.dropdown-menu a{display:block;padding:4px 15px;clear:both;font-weight:normal;line-height:18px;color:#808080;text-shadow:0 1px 0 #ffffff;}.topbar .dropdown-menu a:hover,.dropdown-menu a:hover,.topbar .dropdown-menu a.hover,.dropdown-menu a.hover{background-color:#dddddd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));background-image:-moz-linear-gradient(top, #eeeeee, #dddddd);background-image:-ms-linear-gradient(top, #eeeeee, #dddddd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));background-image:-webkit-linear-gradient(top, #eeeeee, #dddddd);background-image:-o-linear-gradient(top, #eeeeee, #dddddd);background-image:linear-gradient(top, #eeeeee, #dddddd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);color:#404040;text-decoration:none;-webkit-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);}
+.open .menu,.dropdown.open .menu,.open .dropdown-toggle,.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);}
+.open .menu-dropdown,.dropdown.open .menu-dropdown,.open .dropdown-menu,.dropdown.open .dropdown-menu{display:block;}
+.tabs,.pills{margin:0 0 18px;padding:0;list-style:none;zoom:1;}.tabs:before,.pills:before,.tabs:after,.pills:after{display:table;content:"";zoom:1;}
+.tabs:after,.pills:after{clear:both;}
+.tabs>li,.pills>li{float:left;}.tabs>li>a,.pills>li>a{display:block;}
+.tabs{border-color:#ddd;border-style:solid;border-width:0 0 1px;}.tabs>li{position:relative;margin-bottom:-1px;}.tabs>li>a{padding:0 15px;margin-right:2px;line-height:34px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.tabs>li>a:hover{text-decoration:none;background-color:#eee;border-color:#eee #eee #ddd;}
+.tabs .active>a,.tabs .active>a:hover{color:#808080;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
+.tabs .menu-dropdown,.tabs .dropdown-menu{top:35px;border-width:1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
+.tabs a.menu:after,.tabs .dropdown-toggle:after{border-top-color:#999;margin-top:15px;margin-left:5px;}
+.tabs li.open.menu .menu,.tabs .open.dropdown .dropdown-toggle{border-color:#999;}
+.tabs li.open a.menu:after,.tabs .dropdown.open .dropdown-toggle:after{border-top-color:#555;}
+.pills a{margin:5px 3px 5px 0;padding:0 15px;line-height:30px;text-shadow:0 1px 1px #ffffff;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}.pills a:hover{color:#ffffff;text-decoration:none;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);background-color:#00438a;}
+.pills .active a{color:#ffffff;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);background-color:#0069d6;}
+.pills-vertical>li{float:none;}
+.tab-content>.tab-pane,.pill-content>.pill-pane,.tab-content>div,.pill-content>div{display:none;}
+.tab-content>.active,.pill-content>.active{display:block;}
+.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#f5f5f5;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #ffffff;}
+.breadcrumb .divider{padding:0 5px;color:#bfbfbf;}
+.breadcrumb .active a{color:#404040;}
+.hero-unit{background-color:#f5f5f5;margin-bottom:30px;padding:60px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;}
+.hero-unit p{font-size:18px;font-weight:200;line-height:27px;}
+footer{margin-top:17px;padding-top:17px;border-top:1px solid #eee;}
+.page-header{margin-bottom:17px;border-bottom:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}.page-header h1{margin-bottom:8px;}
+.btn.danger,.alert-message.danger,.btn.danger:hover,.alert-message.danger:hover,.btn.error,.alert-message.error,.btn.error:hover,.alert-message.error:hover,.btn.success,.alert-message.success,.btn.success:hover,.alert-message.success:hover,.btn.info,.alert-message.info,.btn.info:hover,.alert-message.info:hover{color:#ffffff;}
+.btn .close,.alert-message .close{font-family:Arial,sans-serif;line-height:18px;}
+.btn.danger,.alert-message.danger,.btn.error,.alert-message.error{background-color:#c43c35;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#c43c35 #c43c35 #882a25;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
+.btn.success,.alert-message.success{background-color:#57a957;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#57a957 #57a957 #3d773d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
+.btn.info,.alert-message.info{background-color:#339bb9;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#339bb9 #339bb9 #22697d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
+.btn{cursor:pointer;display:inline-block;background-color:#e6e6e6;background-repeat:no-repeat;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);background-image:-ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);padding:5px 14px 6px;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);color:#333;font-size:13px;line-height:normal;border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-webkit-transition:0.1s linear all;-moz-transition:0.1s linear all;-ms-transition:0.1s linear all;-o-transition:0.1s linear all;transition:0.1s linear all;}.btn:hover{background-position:0 -15px;color:#333;text-decoration:none;}
+.btn:focus{outline:1px dotted #666;}
+.btn.primary{color:#ffffff;background-color:#0064cd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));background-image:-moz-linear-gradient(top, #049cdb, #0064cd);background-image:-ms-linear-gradient(top, #049cdb, #0064cd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));background-image:-webkit-linear-gradient(top, #049cdb, #0064cd);background-image:-o-linear-gradient(top, #049cdb, #0064cd);background-image:linear-gradient(top, #049cdb, #0064cd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#0064cd #0064cd #003f81;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
+.btn.active,.btn:active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);}
+.btn.disabled{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+.btn[disabled]{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+.btn.large{font-size:15px;line-height:normal;padding:9px 14px 9px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
+.btn.small{padding:7px 9px 7px;font-size:11px;}
+:root .alert-message,:root .btn{border-radius:0 \0;}
+button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0;}
+.close{float:right;color:#000000;font-size:20px;font-weight:bold;line-height:13.5px;text-shadow:0 1px 0 #ffffff;filter:alpha(opacity=25);-khtml-opacity:0.25;-moz-opacity:0.25;opacity:0.25;}.close:hover{color:#000000;text-decoration:none;filter:alpha(opacity=40);-khtml-opacity:0.4;-moz-opacity:0.4;opacity:0.4;}
+.alert-message{position:relative;padding:7px 15px;margin-bottom:18px;color:#404040;background-color:#eedc94;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));background-image:-moz-linear-gradient(top, #fceec1, #eedc94);background-image:-ms-linear-gradient(top, #fceec1, #eedc94);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));background-image:-webkit-linear-gradient(top, #fceec1, #eedc94);background-image:-o-linear-gradient(top, #fceec1, #eedc94);background-image:linear-gradient(top, #fceec1, #eedc94);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#eedc94 #eedc94 #e4c652;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);border-width:1px;border-style:solid;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);}.alert-message .close{margin-top:1px;*margin-top:0;}
+.alert-message a{font-weight:bold;color:#404040;}
+.alert-message.danger p a,.alert-message.error p a,.alert-message.success p a,.alert-message.info p a{color:#ffffff;}
+.alert-message h5{line-height:18px;}
+.alert-message p{margin-bottom:0;}
+.alert-message div{margin-top:5px;margin-bottom:2px;line-height:28px;}
+.alert-message .btn{-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);}
+.alert-message.block-message{background-image:none;background-color:#fdf5d9;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);padding:14px;border-color:#fceec1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}.alert-message.block-message ul,.alert-message.block-message p{margin-right:30px;}
+.alert-message.block-message ul{margin-bottom:0;}
+.alert-message.block-message li{color:#404040;}
+.alert-message.block-message .alert-actions{margin-top:5px;}
+.alert-message.block-message.error,.alert-message.block-message.success,.alert-message.block-message.info{color:#404040;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
+.alert-message.block-message.error{background-color:#fddfde;border-color:#fbc7c6;}
+.alert-message.block-message.success{background-color:#d1eed1;border-color:#bfe7bf;}
+.alert-message.block-message.info{background-color:#ddf4fb;border-color:#c6edf9;}
+.alert-message.block-message.danger p a,.alert-message.block-message.error p a,.alert-message.block-message.success p a,.alert-message.block-message.info p a{color:#404040;}
+.pagination{height:36px;margin:18px 0;}.pagination ul{float:left;margin:0;border:1px solid #ddd;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
+.pagination li{display:inline;}
+.pagination a{float:left;padding:0 14px;line-height:34px;border-right:1px solid;border-right-color:#ddd;border-right-color:rgba(0, 0, 0, 0.15);*border-right-color:#ddd;text-decoration:none;}
+.pagination a:hover,.pagination .active a{background-color:#c7eefe;}
+.pagination .disabled a,.pagination .disabled a:hover{background-color:transparent;color:#bfbfbf;}
+.pagination .next a{border:0;}
+.well{background-color:#f5f5f5;margin-bottom:20px;padding:19px;min-height:20px;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
+.modal-backdrop{background-color:#000000;position:fixed;top:0;left:0;right:0;bottom:0;z-index:10000;}.modal-backdrop.fade{opacity:0;}
+.modal-backdrop,.modal-backdrop.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}
+.modal{position:fixed;top:50%;left:50%;z-index:11000;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal .close{margin-top:7px;}
+.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
+.modal.fade.in{top:50%;}
+.modal-header{border-bottom:1px solid #eee;padding:5px 15px;}
+.modal-body{padding:15px;}
+.modal-body form{margin-bottom:0;}
+.modal-footer{background-color:#f5f5f5;padding:14px 15px 15px;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;zoom:1;margin-bottom:0;}.modal-footer:before,.modal-footer:after{display:table;content:"";zoom:1;}
+.modal-footer:after{clear:both;}
+.modal-footer .btn{float:right;margin-left:5px;}
+.modal .popover,.modal .twipsy{z-index:12000;}
+.twipsy{display:block;position:absolute;visibility:visible;padding:5px;font-size:11px;z-index:1000;filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}.twipsy.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}
+.twipsy.above .twipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
+.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
+.twipsy.below .twipsy-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
+.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
+.twipsy-inner{padding:3px 8px;background-color:#000000;color:white;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.twipsy-arrow{position:absolute;width:0;height:0;}
+.popover{position:absolute;top:0;left:0;z-index:1000;padding:5px;display:none;}.popover.above .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
+.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
+.popover.below .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
+.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
+.popover .arrow{position:absolute;width:0;height:0;}
+.popover .inner{background:#000000;background:rgba(0, 0, 0, 0.8);padding:3px;overflow:hidden;width:280px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);}
+.popover .title{background-color:#f5f5f5;padding:9px 15px;line-height:1;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border-bottom:1px solid #eee;}
+.popover .content{background-color:#ffffff;padding:14px;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover .content p,.popover .content ul,.popover .content ol{margin-bottom:0;}
+.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;}
+.label{padding:1px 3px 2px;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;white-space:nowrap;background-color:#bfbfbf;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.label.important{background-color:#c43c35;}
+.label.warning{background-color:#f89406;}
+.label.success{background-color:#46a546;}
+.label.notice{background-color:#62cffc;}
+.media-grid{margin-left:-20px;margin-bottom:0;zoom:1;}.media-grid:before,.media-grid:after{display:table;content:"";zoom:1;}
+.media-grid:after{clear:both;}
+.media-grid li{display:inline;}
+.media-grid a{float:left;padding:4px;margin:0 0 18px 20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);}.media-grid a img{display:block;}
+.media-grid a:hover{border-color:#0069d6;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);}
View
0 toplevel/images/arrow.png → try-js_of_ocaml/images/arrow.png
File renamed without changes
View
0 toplevel/images/delicious.png → try-js_of_ocaml/images/delicious.png
File renamed without changes
View
0 toplevel/images/digg.png → try-js_of_ocaml/images/digg.png
File renamed without changes
View
0 toplevel/images/facebook.png → try-js_of_ocaml/images/facebook.png
File renamed without changes
View
0 toplevel/images/flickr.png → try-js_of_ocaml/images/flickr.png
File renamed without changes
View
0 toplevel/images/friendfeed.png → try-js_of_ocaml/images/friendfeed.png
File renamed without changes
View
0 toplevel/images/github.png → try-js_of_ocaml/images/github.png
File renamed without changes
View
0 toplevel/images/left1.png → try-js_of_ocaml/images/left1.png
File renamed without changes
View
0 toplevel/images/left2.png → try-js_of_ocaml/images/left2.png
File renamed without changes
View
0 toplevel/images/linkedin.png → try-js_of_ocaml/images/linkedin.png
File renamed without changes
View
0 toplevel/images/myspace.png → try-js_of_ocaml/images/myspace.png
File renamed without changes
View
0 toplevel/images/ocaml_code.png → try-js_of_ocaml/images/ocaml_code.png
File renamed without changes
View
0 toplevel/images/reddit.png → try-js_of_ocaml/images/reddit.png
File renamed without changes
View
0 toplevel/images/right1.png → try-js_of_ocaml/images/right1.png
File renamed without changes
View
0 toplevel/images/right2.png → try-js_of_ocaml/images/right2.png
File renamed without changes
View
0 toplevel/images/rssfeed.png → try-js_of_ocaml/images/rssfeed.png
File renamed without changes
View
0 toplevel/images/slashdot.png → try-js_of_ocaml/images/slashdot.png
File renamed without changes
View
0 toplevel/images/stumbleupon.png → try-js_of_ocaml/images/stumbleupon.png
File renamed without changes
View
0 toplevel/images/technorati.png → try-js_of_ocaml/images/technorati.png
File renamed without changes
View
0 toplevel/images/twitter.png → try-js_of_ocaml/images/twitter.png
File renamed without changes
View
130 try-js_of_ocaml/index.html
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Try OCaml</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link type="text/css" href="bootstrap.css" rel="stylesheet" />
+ <link type="text/css" href="style.css" rel="stylesheet" />
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-22552764-4']);
+ _gaq.push(['_trackPageview']);
+ (function() {
+ var ga = document.createElement('script');
+ ga.type = 'text/javascript';
+ ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(ga, s);
+ })();
+ </script>
+ </head>
+ <body>
+ <div class="content">
+ <div class="container">
+ <div class="row">
+ <div class="span7">
+ <h1 id="main-title">Try js_of_ocaml</h1>
+ <p id="short-intro">OCaml is a strongly typed functional language. It is concise
+ and fast, enabling you to improve your coding efficiency
+ while producing code with higher quality.</p>
+ <div id="lesson-position">
+ <span id="lesson-left-button"></span>
+ <span id="lesson-number"></span>
+ <span id="lesson-right-button"></span>
+ <span id="lesson-step-spacer"></span>
+ <span id="step-left-button"></span>
+ <span id="lesson-step"></span>
+ <span id="step-right-button"></span>
+ </div>
+ <div class="alert-message block-message info" id="lesson-text">
+ Type <code>lesson 1</code> to start the tutorial. <br />
+ <em>(click on the code to insert)</em>
+ </div>
+ <div id="lesson-message"></div>
+ <div id="languages"></div>
+ <div id="menu-lessons"></div>
+
+<script type="text/javascript" src="http://widgets.twimg.com/j/2/widget.js"></script>
+<script type="text/javascript">
+new TWTR.Widget({
+ version: 2,
+ type: 'profile',
+ rpp: 4,
+ interval: 30000,
+ width: 'auto',
+ height: 300,
+ theme: {
+ shell: {
+ background: '#ffffff',
+ color: '#000000'
+ },
+ tweets: {
+ background: '#ddf4fb',
+ color: '#15156b',
+ links: '#0a0f07'
+ }
+ },
+ features: {
+ scrollbar: true,
+ loop: false,
+ live: false,
+ behavior: 'default'
+ }
+}).render().setUser('tryocaml').start();
+</script>
+
+ </div>
+
+ <div class="span9 ocaml">
+ <div id="toplevel-container">
+ <div id="dragndrop"><img src="images/arrow.png" width="140" height="70"/></div>
+ <pre id="output"></pre>
+ <div id="sharp">#</div>
+ <div id="toplevel"></div>
+ </div>
+ <div id="buttons"></div>
+
+ <table class="zebra-striped">
+ <thead><tr><th id="text-commands">Commands</th><th id="text-effects">Effects</th></tr></thead>
+ <tr><td id="text-enter">Enter / Return</td> <td id="text-submit">Submit code</td></tr>
+ <tr><td id="text-arrows">Up / Down</td><td id="text-history">Cycle through history</td></tr>
+ <tr><td id="text-newline">Shift + Enter</td><td id="text-multiline">Multiline edition</td></tr>
+ <tr><td><code>lesson 1</code></td> <td id="text-lesson-1">Move to lesson 1</td></tr>
+ <tr><td><code>step 1</code></td> <td id="text-step-1">Move to step 1 of the current lesson</td></tr>
+ <tr><td><code>lessons ()</code></td> <td id="text-lessons">See available lessons</td></tr>
+ <tr><td><code>steps ()</code></td> <td id="text-steps">See available steps in the current lesson</td></tr>
+ </table>
+
+ <div>All Try OCaml sites:
+ <ul>
+ <li><a href="/">Official Try OCaml site</a></li>
+ <li><a href="/js_of_ocaml/">Try OCaml with Js_of_ocaml modules</a></li>
+ </ul>
+ </div>
+ </div>
+
+ </div>
+ </div></div>
+
+ <div class="footer">
+ <div class="container">
+ <div class="ressources">
+ <a href="https://github.com/OCamlPro/tryocaml">Contribute</a>
+ (<a href="https://github.com/OCamlPro/tryocaml/issues/new">Submit a bug report</a>)
+ |
+ <a href="http://www.ocaml-lang.org/">OCaml</a> |
+ <a href="http://www.ocamlpro.com/">OCamlPro</a> |
+ <a href="http://ocsigen.org/js_of_ocaml/">Js_of_ocaml</a>
+ </div>
+ <div class="copyright">
+ © 2011 <a href="http://ocamlpro.com/">OCamlPro</a> SAS, All rights reserved.
+ <a href="mailto:contact@ocamlpro.com">Contact an administrator</a>
+ </div>
+ </div>
+ </div>
+ <script type="text/javascript" src="try-js_of_ocaml.js"></script>
+ </body>
+</html>
View
155 try-js_of_ocaml/style.css
@@ -0,0 +1,155 @@
+body {
+ font-family: "DejaVu Sans",sans-serif;
+ background-color: #EEE;
+}
+
+#toplevel {
+ margin-left: 5px;
+ width: 300px;
+ height: 50px;
+ float: left;
+}
+
+#sharp {
+ text-width: 10px;
+ margin-left: 8px;
+ float: left;
+ color: #CCC;
+}
+
+#toplevel textarea {
+ border: 0;
+ background: transparent;
+ padding-top: 0;
+ padding-bottom: 0;
+ resize: none;
+ outline: none;
+ font-size: 12px;
+ color: white;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ font-family: Monaco, Andale Mono, Courier New, monospace;
+}
+
+#toplevel-container {
+ padding: 10px;
+ height: 500px;
+ width: 600px;
+ overflow: auto;
+ overflow-x: hidden;
+ color: #CCC;
+ background-color: black;
+ -moz-border-radius: 20px;
+ -webkit-border-radius: 20px;
+ -khtml-border-radius: 20px;
+ border-radius: 20px;
+}
+
+.content {
+ padding-top: 50px;
+ padding-bottom: 50px;
+ min-height: 600px;
+ background-color: white;
+}
+
+.footer {
+ border-top: 1px #CCC solid;
+ padding-top: 10px;
+ padding-bottom: 10px;
+}
+
+pre {
+ background: transparent;
+ color: #CCC;
+ margin-bottom: 0;
+ padding-bottom: 0;
+}
+
+table td {
+ font-size: 12px;
+ padding-top: 5px;
+ padding-bottom: 5px;
+}
+
+table {
+ margin-top: 20px;
+ margin-bottom: 20px;
+}
+
+.copyright, .ressources {
+ width: auto;
+ text-align: center;
+}
+
+.copyright {
+ padding-top: 30px;
+ font-size: 10px;
+}
+
+.copyright a {
+ color: black;
+}
+
+#lesson-step-spacer {
+ margin-left: 20px;
+}
+
+.menu-lessons {
+ overflow: hidden;
+ width: 100%;
+ height: 500px;
+}
+
+dl dt {
+ font-weight: normal;
+}
+
+#lesson-position {
+ text-align: center;
+}
+
+#lesson-text h3 {
+ font-size: 14px;
+ color: #404040;
+}
+
+#lesson-text pre {
+ font-family: Monaco, Andale Mono, Courier New, monospace;
+ font-size: 12px;
+ border: 0;
+ color: rgba(0, 0, 0, 0.75);
+ background-color: #FEE9CC;
+ padding: 5px;
+ margin-bottom: 10px;
+ margin-top: 10px;
+}
+
+.lesson {
+ font-weight: bold;
+ color: #404040;
+ font-size: 16px;
+ line-height: 36px;
+}
+
+.step {
+ font-weight: bold;
+ color: #808080;
+ font-size: 12px;
+}
+
+#buttons button {
+ margin-top: 10px;
+ margin-right: 10px;
+ padding: 7px;
+ }
+
+#buttons {
+ text-align: center;
+}
+
+#dragndrop {
+ position: absolute;
+ top: 2%;
+ float: left
+ }
View
BIN try-ocaml/images/arrow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN try-ocaml/images/delicious.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN try-ocaml/images/digg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN try-ocaml/images/facebook.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN try-ocaml/images/flickr.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN try-ocaml/images/friendfeed.png
Diff not rendered.
View
BIN try-ocaml/images/github.png
Diff not rendered.
View
BIN try-ocaml/images/left1.png
Diff not rendered.
View
BIN try-ocaml/images/left2.png
Diff not rendered.
View
BIN try-ocaml/images/linkedin.png
Diff not rendered.
View
BIN try-ocaml/images/myspace.png
Diff not rendered.
View
BIN try-ocaml/images/ocaml_code.png
Diff not rendered.
View
BIN try-ocaml/images/reddit.png
Diff not rendered.
View
BIN try-ocaml/images/right1.png
Diff not rendered.
View
BIN try-ocaml/images/right2.png
Diff not rendered.
View
BIN try-ocaml/images/rssfeed.png
Diff not rendered.
View
BIN try-ocaml/images/slashdot.png
Diff not rendered.
View
BIN try-ocaml/images/stumbleupon.png
Diff not rendered.
View
BIN try-ocaml/images/technorati.png
Diff not rendered.
View
BIN try-ocaml/images/twitter.png
Diff not rendered.
View
7 tutorial/Makefile
@@ -3,17 +3,16 @@ all: byte
ROOT=..
include ../Makefile.config
-include ../Makefile.rules
-SOURCES= lessons.mli n.ml tutorial.ml
+SOURCES= lessons.mli
TARGETS=make_lessons
all: byte