Commits

David Jones committed 1f85501

notes

  • Participants
  • Parent commits 5ee1277

Comments (0)

Files changed (2)

 * FOO
 
 Load function has optional parameters to make it fail quietly.
+
+<example>
+ (global-set-key "\C-h" 'backward-delete-char-untabify)
+ (define-key isearch-mode-map "\C-h" 'isearch-delete-char)
+ (global-set-key [(hyper h)] 'help-command)
+</example>
+
+
+
+** Some first tries at javascript code.
+
+<example>
+  function square(x) { return x*x; }
+  function pow(x,n) {
+      var m,y;
+      if (n <= 0) { return 1;}
+      else if (n == 1) { return x; }
+      else {
+          m = Math.floor(n / 2);
+          y = square(pow(x,m));
+          if (2*m == n) { return y;}
+          else { return y*x;}
+      }
+  }
+  function testPow(x,n) {
+      var i;
+      for(i = -1; i <= n; ++i) {
+          document.write("<li> x = " + x + ", n = " + i + 
+                        ", pow(x,n) = " + pow(x,i));
+      }
+  }
+</example>
+
+<example>
+
+<script src="first_tries.js" type="application/javascript">
+</script>
+
+</example>