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
/** | |
* from Flare demo | |
* Demos/uutils/GraphUtils.as | |
*/ | |
/** | |
* Create a diamond tree, with a given branching factor at | |
* each level, and depth levels for the two main branches. | |
* @param b the number of children of each branch node | |
* @param d1 the length of the first (left) branch |
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
<html> | |
<head> | |
<script> | |
// only works with firefox 3.5 | |
if (navigator.geolocation) { | |
var watchID = navigator.geolocation.watchPosition(function(position) { | |
do_something(position.coords.latitude, position.coords.longitude); | |
} | |
); | |
} else { |
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 java.io.*; | |
import java.net.*; | |
class SimpleServer | |
{ | |
private static SimpleServer server; | |
ServerSocket socket; | |
Socket incoming; | |
BufferedReader readerIn; | |
PrintStream printOut; |
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
(setq load-path (append '("~/.emacs.d") load-path)) | |
;;'side line number' | |
(require 'linum) | |
(global-linum-mode) | |
;;;Clearing Shell Mode Output | |
;;http://www.emacswiki.org/emacs/ShellMode#toc11 | |
(defun clear-shell () |
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
# File: .bash_profile | |
# Author: Seung-jin Kim <http://www.github.com/seungjin> | |
# Last Change: 8/5/2010 | |
# Download: | |
# Home: | |
# License: | |
# Disclaimer: Published as-is, no support, no warranty | |
export PATH=$HOME/Applications/emacs/bin:$HOME/Applications/scala-2.7.7.final/bin:/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:$PATH | |
#export DISPLAY=:0.0 |
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/bash | |
function ll { | |
ls -lFh | awk '{if ($9) print $9}' | |
} | |
function lla { | |
ls -lFha | awk '{if ($9) print $9}' | |
} |
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/env python | |
import MySQLdb | |
MySQLdb.escape_string("'") |
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
require 'Database_connection' | |
require 'rubygems' #ruby 1.9 does not need it | |
require 'builder' | |
require 'iconv' | |
$KCODE = "UTF-8" | |
$dbcon = Database_connection.new().seungjin() | |
$builder = Builder::XmlMarkup.new(:target=>$resultxml="", :indent=>2, :encoding=>'UTF-8') | |
$builder.instruct!(:xml, :version => "1.0", :encoding => "UTF-8") |
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 | |
## | |
## sexpr.py - by Yusuke Shinyama | |
## | |
## * public domain * | |
## | |
from abstfilter import AbstractFeeder, AbstractFilter, AbstractConsumer | |
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 | |
## $Id: abstfilter.py,v 1.1.1.1 2003/07/01 23:28:27 euske Exp $ | |
## | |
## abstfilter.py - A framework for cascade filters. | |
## | |
## AbstractFeeder | |
## | |
class AbstractFeeder: |