Skip to content

Instantly share code, notes, and snippets.

module Hello
val factorial: x:int{x>=0} -> Tot int (*factorial is a totalfunction over non negative ints*)
val length: list 'a -> Tot nat
let rec length l = match l with
| [] -> 0
| _ :: tl -> 1 + length tl
@jeb2239
jeb2239 / 0_reuse_code.js
Created October 3, 2015 15:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
package de.devsurf.html.tail;
import java.io.IOException;
import java.util.Date;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
U =
2.0000 -1.0000 0 0 0
0 1.5000 -1.0000 0 0
0 0 1.3333 -1.0000 0
0 0 0 1.2500 -1.0000
0 0 0 0 1.2000
2.000000 -1.000000 0.000000 0.000000 0.000000 1.000000
-1.000000 1.500000 -1.000000 0.000000 0.000000 3.000000
0.000000 -1.000000 1.333333 -1.000000 0.000000 7.000000
0.000000 0.000000 -1.000000 1.250000 -1.000000 11.500000
0.000000 0.000000 0.000000 -1.000000 1.200000 11.200000
2.000000 -1.000000 0.000000 0.000000 0.000000 1.000000
0.000000 1.500000 -1.000000 0.000000 0.000000 3.000000
0.000000 0.000000 1.333333 -1.000000 0.000000 7.000000
0.000000 0.000000 0.000000 1.250000 -1.000000 11.500000
0.000000 0.000000 0.000000 0.000000 1.200000 11.200000
void gaussElim(int n, int m, double** A,double* x) {
int k, i, j,s=0;
//double x;
for (k = 0; k <n-1; k++) {
for (i = k + 1; i < n; i++) {
for (j = k+1; j < n; j++) {