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
# /etc/bash/bashrc | |
# | |
# This file is sourced by all *interactive* bash shells on startup, | |
# including some apparently interactive shells such as scp and rcp | |
# that can't tolerate any output. So make sure this doesn't display | |
# anything or bad things will happen ! | |
# Test for an interactive shell. There is no need to set anything |
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
#!/usr/bin/ruby | |
# | |
require 'mechanize' | |
require 'icalendar' | |
include Icalendar | |
def create_datetime(day_str,time_str) | |
if(time_str.length<4) | |
time_str = "0"+time_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
var results = 5; | |
var slideshow_height; | |
var slideshow_width; | |
var wait_secs = 8; | |
var time_to_fade = 1000.0; | |
var picasa_url = "http://picasaweb.google.com/data/feed/api/user/"+ | |
"[email protected]"+"?"+ | |
"alt=json-in-script"+"&"+ | |
"callback=slideshowRender"+"&"+ | |
"kind=album"+"&"+ |
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
var entries = 4; | |
var months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; | |
var re = /(-)?(\d{4})-(\d{2})-(\d{2})(T(\d{2}):(\d{2}):(\d{2})(\.\d+)?)?(([\+-])((\d{2}):(\d{2})))?/; | |
var cal_url = "http://www.google.com/calendar/feeds/"+ | |
"mayflowerscout.org_slg49dbs6rt290ihtrq9oo8hm8@group.calendar.google.com/"+ | |
"public/full?"+ | |
"alt=json-in-script&"+ | |
"callback=showEvents&"+ | |
"orderby=starttime&"+ | |
"max-results="+entries+"&"+ |
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
# /etc/bash/bashrc | |
# | |
# This file is sourced by all *interactive* bash shells on startup, | |
# including some apparently interactive shells such as scp and rcp | |
# that can't tolerate any output. So make sure this doesn't display | |
# anything or bad things will happen ! | |
# Test for an interactive shell. There is no need to set anything | |
# past this point for scp and rcp, and it's important to refrain from |
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 <string.h> | |
/*Symbol linked list*/ | |
typedef struct Symbol{ | |
char* identifier; | |
int value; | |
struct Symbol* next; | |
} Symbol; |
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
%rotate(rotate(beside(rotate(beside(rotate(rotate(rotate(A))),rotate(rotate(A)))),rotate(beside(Expr,rotate(A)))))) | |
tile(N,A,O):- spinit(N,A,Expr),montage(Expr,O). | |
spinit(0,A,A). | |
spinit(N,A,rotate(rotate(rotate(beside(rotate(beside(rotate(rotate(rotate(A))),rotate(rotate(A)))),rotate(beside(Expr,rotate(A)))))))):- | |
M is N-1,spinit(M,A,Expr),!. | |
ma(X=Expr;Exprs) :- | |
montage(Expr,X), | |
ma(Exprs),!. |
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
fractal(X=Formula,N,L):-frac(X,Formula,N,Formula,L),!. | |
frac(_,_,0,_,L):-write('forward'),write('('),write(L),write(')'),writeln(''). | |
frac(G,X;Xs,N,Formula,L):-frac(G,X,N,Formula,L),frac(G,Xs,N,Formula,L). | |
frac(G,G,N,Formula,L):-N1 is N-1,frac(G,Formula,N1,Formula,L). | |
frac(_,left(D),_,_,_):-write('left('),write(D),write(')'),writeln(''). | |
frac(_,right(D),_,_,_):-write('right('),write(D),write(')'),writeln(''). |
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
import java.text.DecimalFormat; | |
public class Distribution { | |
static char map[][] = { | |
{0,0,0,0}, | |
{0,1,0,0}, | |
{0,0,0,0} | |
}; | |
//i is row |
OlderNewer