This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.o | |
rpsls | |
*.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFLAGS = -std=c99 -Wall -g3 | |
main : main.o sstack.o | |
main.o : main.c sstack.h | |
sstack.o : sstack.c sstack.h dlist.h | |
run : main | |
./$^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* https://oeis.org/A072841 | |
* This is free and unencumbered software released into the public domain. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#define MAX(a, b) ((b) > (a) ? (b) : (a)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/time.h> | |
#include <gmp.h> | |
#define S(n) mpz_get_str(NULL, 10, n) | |
#define EQ(z, n) (mpz_cmp_ui(z, n) == 0) | |
/* Print out collatz path for given number. */ | |
int path(char *str) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build | |
dist | |
cache.properties | |
TAGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
#include <float.h> | |
#define N 3 | |
typedef struct { | |
double x[N]; | |
} vector; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.svg | |
*.txt | |
*.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; with-alist-access.el --- a better alist macro | |
;; This is free and unencumbered software released into the public domain. | |
;;; Commentary: | |
;; Usage example: | |
;; (let ((student '((id . 1332412) | |
;; (name . ((first . "Student") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Minefield(width, height, mines) { | |
this.width = width; | |
this.height = height; | |
this.grid = Minefield.make2dArray(width, height, 0); | |
this.seen = Minefield.make2dArray(width, height, false); | |
this.marked = Minefield.make2dArray(width, height, false); | |
var rand = function(n) { | |
return Math.floor(Math.random() * n); | |
}; | |
while(mines > 0) { |
OlderNewer