This file contains hidden or 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
#!/bin/sh | |
# put test.sh ,input files and output files in the same folder. | |
# $ ls | |
# test.sh main.cpp in1 in2 in3 out1 out2 out3 | |
INPUTS=`find . -type f -name "in*" | sort` | |
PROG=$1 |
This file contains hidden or 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
// compile in C++11. use -std=c++11. | |
#include <iostream> | |
#include <iomanip> | |
#include <vector> | |
#include <map> | |
#include <set> | |
#include <list> | |
#include <queue> | |
#include <stack> | |
#include <bitset> |
This file contains hidden or 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
#!/bin/sh | |
INPUTS=`find . -type f -name "in*"` | |
PROG=$1 | |
if [ $# -eq 0 ] | |
then | |
echo "Pass program as first argument." | |
exit 1 | |
fi |
This file contains hidden or 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 SimpleHTTPServer | |
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def send_head(self): | |
"""Common code for GET and HEAD commands. | |
This sends the response code and MIME headers. | |
Return value is either a file object (which has to be copied | |
to the outputfile by the caller unless the command was HEAD, | |
and must be closed by the caller under all circumstances), or |
This file contains hidden or 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
(*simple monad*) | |
module type MONAD = | |
sig | |
(* Type for state.It's Covariant*) | |
type +'a t | |
(* lift up normal value to monaded value.*) | |
val return : 'a -> 'a t | |
(* bind is the function to apply function | |
that take normal value and return monaded value to monaded value*) | |
val bind : 'a t -> ('a -> 'b t) -> 'b t |
This file contains hidden or 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
#lang mzscheme | |
(define-syntax equal?? | |
(syntax-rules () | |
((_ test-exp correct-ans) | |
(let ((observed-ans test-exp)) | |
(if (not (equal? observed-ans correct-ans)) | |
(printf "Failed : ~s returned ~s, should have returned ~s~%" | |
'test-exp | |
observed-ans |
This file contains hidden or 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
set fileencoding=utf-8 | |
set nocompatible | |
set t_Co=256 | |
set ambiwidth=double | |
syntax on | |
filetype plugin indent on | |
set nobackup | |
set noswapfile |
This file contains hidden or 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/env python | |
#coding:utf-8 | |
from __future__ import division | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
from math import * | |
from string import * | |
from fractions import * |
This file contains hidden or 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
// ==UserScript== | |
// @id GooglePlusAutoFuu | |
// @name Google+ Automatic Fuu Extension | |
// @version 0.6.9 | |
// @namespace AutoFuu | |
// @author Jackson Tan | |
// @description Add a Fuu button below each post to help you send a comment with Fuu expression automatically. | |
// @include https://plus.google.com/* | |
// @run-at document-end | |
// ==/UserScript== |
This file contains hidden or 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
{1000000000,999999999,999999998,999999997,999999996, | |
999999995,999999994,999999993,999999992,999999991, | |
123123123,312314123,423423423,123123141,534536456, | |
312423425,645623423,645645675,124234534,756756756, | |
423534645,645745785,234523423,756758567,421232312, | |
1, 423425645,3453 ,423443423,634534534, | |
324, 42342342, 4234, 43423423 ,89999999, | |
242341232,543664564,212312121,423423423,34234234, | |
342342342,423423423,42342342,2323423,2322, | |
6567,4564564} |