table mail {
id int primary key,
from_addr varchar[50],
date datetime,
mailbox varchar[50]
}
UNSORTED = "/Users/yh/unsorted.txt" | |
require "shell" | |
require "find" | |
def emit(path) | |
s = Shell.new | |
s.cd path |
async_core.mli: | |
deferred.mli: value to be determined later (that forms monad) / enable choose mechanism | |
clock.mli: defer until certain times | |
typed_tcp.mli: would be fun to use | |
writer.mli: reducing number of write() calls | |
#use "topfind";; |
import java.io.*; | |
import java.io.BufferedWriter; | |
import java.text.*; | |
import java.util.*; | |
import javax.sound.sampled.*; | |
public class AudioInput implements Runnable{ | |
public static void main(String args[]) { | |
AudioInput audioinput = new AudioInput(); |
#! /usr/local/bin/ruby | |
require 'net/http' | |
Net::HTTP.version_1_2 | |
begin | |
r = Net::HTTP.start('example.com', 80) {|http| | |
res = http.get('/directory/file') | |
} | |
rescue | |
system('echo "NG" | mail -c addr@example.com -s "server faillure" addr2@example.com') |
Parameter person :Set. | |
Parameter thing: Set. | |
Parameter bottle: thing. | |
Parameter own: person -> thing -> Prop. | |
Parameter capitalist: forall (x: thing), { p:person & own p x }. | |
Definition owner: person. | |
generalize (capitalist bottle). | |
intros. |
Parameter person thing : Set. | |
Parameter own: person -> thing -> Prop. | |
Parameter capitalist: forall (x: thing), exists p:person, own p x. | |
Parameter bottle: thing. | |
Definition owner: person. | |
Admitted. |
Require Import ConCaT.CATEGORY_THEORY.FUNCTOR.Functor. | |
Section alg_def. | |
Variables (A : Category) (T : Functor A A). | |
Structure Alg_ob : Type := {Ob_alg_ob : A; Mor_alg_ob : T Ob_alg_ob --> Ob_alg_ob}. | |
Section alg_arrow_def. |
require 'rubygems' | |
require 'grit' | |
include Grit | |
repo = Repo.new(".") | |
def date(head) | |
head.commit.committed_date | |
end |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
enum dir {North, West, East, South, NONE}; | |
unsigned int look_alt(int h, int w, int H, int W, enum dir dir, unsigned int *alt_map) { | |
#define ALT(m,n) *(alt_map + (m) * W + (n)) | |
if (dir == North) { | |
if (h == 0) |