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
# Author : Jeeyoung Kim | |
# Convoluted way to check for balanced parenthesis. | |
L = lambda f: lambda x : f(x + 1) | |
R = lambda f: lambda x : not x or f(x - 1) | |
D = {'(':'L', ')':'R'} | |
while True: | |
print 'please input sequence of parenthesises, like ()()((, or ((())())' | |
input = raw_input() |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Venn diagram of order 4</title> | |
</head> | |
<body> | |
<div>Venn Diagram Experiment</div> | |
<div>Use the controls on the bottom left.</div> | |
<div id='canvas'></div> | |
<script src='https://raw.github.com/DmitryBaranovskiy/raphael/master/raphael.js'></script> |
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/env python | |
# pam_notify.py | |
# Author : Jeeyoung Kim | |
# Python script to notify user on login | |
FROM_ADDRESS = 'admin@example.com' | |
TO_ADDRESS = 'you@example.com' | |
def pam_sm_open_session(pamh, flags, args): | |
try: | |
from email.mime.text import MIMEText |
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
alert('foo') |
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
hello, world |
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
mysql> CREATE TABLE temp (col1 INT, col2 INT, col3 INT); | |
Query OK, 0 rows affected (0.02 sec) | |
mysql> | |
mysql> INSERT INTO temp (col1, col2, col3) values (1,2,3); | |
Query OK, 1 row affected (0.01 sec) | |
mysql> INSERT INTO temp (col1, col2, col3) values (1,3,4); | |
Query OK, 1 row affected (0.00 sec) |
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
public class Test { | |
public static void main(String ... args) { | |
System\u002eout\u002eprintln("hello, world"); | |
} | |
} |
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
/** | |
* Permute the given input array, calling callback for each of the | |
* permutation. | |
*/ | |
function permute(input, callback) { | |
var contains = []; // boolean flags. | |
var permutation = []; | |
var N = input.length; | |
for (var i = 0; i < N; i++) { | |
contains.push(false); |
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
/*bin/mkdir /tmp/crazy 2> /dev/null | |
javac -d /tmp/crazy $0 `dirname $0`/Main.java | |
java -cp /tmp/crazy Main "$@" | |
exit | |
*/ | |
import java.util.Calendar; | |
public class Main { | |
public static void main(String... args) { | |
System.out.println(Calendar.getInstance().get(Calendar.YEAR)); |
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
Last login: Sun Jul 27 01:44:08 on ttys001 | |
jeeyoungk@kundera:~$ /Users/jeeyoungk/Desktop/mathworks_downloads/R2011a_Student_Version/install ; exit; | |
Preparing installation files ... | |
Installing ... | |
Exception in thread "main" com.google.inject.ProvisionException: Guice provision errors: | |
1) Error in custom provider, java.lang.RuntimeException: java.lang.reflect.InvocationTargetException | |
at com.mathworks.wizard.WizardModule.provideDisplayProperties(WizardModule.java:61) | |
while locating com.mathworks.instutil.DisplayProperties | |
at com.mathworks.wizard.ui.components.ComponentsModule.providePaintStrategy(ComponentsModule.java:72) |
OlderNewer