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
i = 0 | |
loop { | |
puts i | |
i += 1 | |
sleep(1) | |
} |
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
sudo apt-get install libcurl4-openssl-dev libxml2 libxslt-dev |
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
sudo apt-get install libcurl4-openssl-dev libxml2 libxslt-dev |
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
void foo( int i ) { | |
char temp[ 1024 * 1024 ]; //1Mb of memory will be allocated from the stack-frame | |
printf (” %d n”, i ); | |
foo ( i + 1 ); | |
} | |
int main() { | |
foo( 1 ); | |
} |
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 A( m, n ): | |
if m == 0: | |
return n + 1 | |
elif n == 0: | |
return A ( m - 1, 1 ) | |
else: | |
return A ( m - 1, A ( m, n - 1 ) ) |
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
require 'rubygems' | |
require 'json' | |
def tokenize( str ) | |
return str if str.count('(') == 0 | |
str = str.gsub('(',' ( ').gsub(')',' ) ').split(' ') | |
end | |
def build_tree(list) | |
return list unless list.is_a? Array |
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 flake(self,length): | |
if length <10: | |
self.move_forward(l) | |
self.c.update() | |
return | |
else: | |
self.flake(length/3) | |
self.rotate_left(60) | |
self.flake(length/3) |
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 Tkinter import * | |
from math import * | |
from time import * | |
class TurtleClass(object): | |
"""a turtle class """ | |
def __init__(self,c): | |
self.x,self.y,self.d=100,300,0 | |
self.c = c | |
self.l1,self.l2,self.l3 = 0,0,0 | |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Mathieu 'p01' Henri <http://www.p01.org/releases/> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] | |
680 test.rb:8:String | |
1 test.rb:8:Process::Status | |
1 test.rb:8:Array | |
memprof (0.3.10) |
NewerOlder