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
#Here's the command line to build a papervision3d (papervision 3d) swc file | |
#using only the flex 3 sdk. Saved here for posterity and google's benefit. | |
#run this command from the trunk/src directory: | |
compc -source-path=. -include-sources=. -output papervision3d-test.swc |
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
function my_input($data) | |
{ | |
$CI =& get_instance(); | |
$val = $CI->db_session->flashdata($data['name']); | |
//print_r($CI->db_session->userdata()); | |
if ($val) $data['value'] = $val; | |
return form_input($data); | |
} |
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/python | |
import sys, re | |
from os import walk | |
from os.path import join as pathjoin | |
from pprint import pprint as pp | |
def parsef(f): | |
imports = [] | |
notimports = [] | |
for line in file(f): |
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
//imagine you meant to type this: | |
var x:Array = [[],[]]; | |
//But you typed this instead. These are compile-time syntax errors: | |
var x:Array = [[][]]; | |
var x:Array = [["a"][]]; | |
//But these are run-time errors: | |
var x:Array = [[]["b"]]; | |
var x:Array = [["a"]["b"]]; |
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
from __future__ import with_statement | |
from functools import partial | |
import inspect | |
def accepts_block(f): | |
class _accepts_block(object): | |
#use something like this to handle calls without a with()? | |
def __call__(self, *args): | |
self.thefunction = partial(f, *args) | |
return self |
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
These warehouse wages | |
Kill the ends introduction | |
man I should have schooled it up | |
When I was younger should have stuck to plan | |
Always had the dreams of being more self assertive | |
And my kids a teenager now he needs the health insurance | |
So break my body | |
Break break my soul down | |
Just another zombie walking blindly through your ghost town | |
Pull up to the bar to politic and tap the power |
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
function title { | |
echo -ne "\033]0;$1\007" | |
} | |
#put this in your .bashrc, then just type <title my_tab_name> to set the tab title |
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
#demonstrate nested list comprehensions as cartesian set | |
deck_of_cards = [(suit, rank) for suit in ("hearts", "diamonds", "spades", "clubs") | |
for rank in range(13)] | |
####################################### | |
#demonstrate functions as first-class values | |
def double_str(x): | |
return str(x) + str(x) |
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
def parse_name(name): | |
#delete (nicknames) | |
name = re.sub("\(.*?\)", "", name) | |
names = name.split(" ") | |
first_name = names[0] | |
if len(names) > 2: | |
middle_names = [names[1]] | |
for i, n in enumerate(names[2:]): |
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
gzip: stdin: unexpected end of file | |
Pinax-0.7.1-bundle/requirements/0.7.1/Markdown-2.0.1.tar.gz | |
tar: Unexpected EOF in archive | |
tar: Unexpected EOF in archive | |
tar: Error is not recoverable: exiting now |
OlderNewer