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
<some-long-tag-name> | |
information | |
</some-long-tag-name> |
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
merge :: (Ord a) => [a] -> [a] -> [a] | |
merge [] y = y | |
merge x [] = x | |
merge xxs@(x:xs) yys@(y:ys) | |
| x < y = x : merge xs yys | |
| otherwise = y : merge xxs ys |
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
merge :: (Ord a) => [a] -> [a] -> [a] | |
merge [] y = y | |
merge x [] = x | |
merge xxs@(x:xs) yys@(y:ys) | |
| x < y = x : merge xs yys | |
| otherwise = y : merge xxs ys |
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
$ gem | |
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- rubygems/gem_path_searcher (LoadError) | |
from <internal:lib/rubygems/custom_require>:29:in `require' | |
from /home/alec/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:1087:in `<top (required)>' | |
from <internal:lib/rubygems/custom_require>:29:in `require' | |
from <internal:lib/rubygems/custom_require>:29:in `require' | |
from /home/alec/.rvm/rubies/ruby-1.9.2-p0/bin/gem:13:in `<main>' |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <plot.h> | |
const double PI = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282; | |
const double F = 2; | |
double arr[16]; |
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
redis.zrevrangebyscore(@id_info_key, a, b, {:limit => [0,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
/* | |
LEAST LIKELY TO COMPILE SUCCESSFULLY: | |
Ian Phillipps, Cambridge Consultants Ltd., Cambridge, England | |
*/ | |
#include <stdio.h> | |
main(t,_,a) | |
char | |
* | |
a; |
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
$ ./test | |
./test: error while loading shared libraries: libSDL_draw-1.2.so.0: cannot open shared object file: No such file or directory | |
$ which libSDL_draw-1.2.so.0 | |
/usr/local/lib/libSDL_draw-1.2.so.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
def distance(a,b) | |
matrix = Array.new(a.size + 1) { Array.new(b.size + 1) } | |
(0..a.size).each { |i| matrix[i][0] = i } | |
(0..b.size).each { |j| matrix[0][j] = j } | |
(1..a.size).each do |i| | |
(1..b.size).each do |j| | |
if a[i-1] == b[j-1] | |
matrix[i][j] = matrix[i-1][j-1] | |
else | |
matrix[i][j] = [matrix[i-1][j] + 1,matrix[i][j-1] + 1,matrix[i-1][j-1] + 1].min |
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
#include <stdio.h> | |
#include <unistd.h> | |
int main() | |
{ | |
pid_t pid = fork(); | |
if(pid == -1) | |
fprintf(stderr,"There was an error\n"); | |
else if(pid == 0) | |
printf("I am the child. I do not know my pid.\n"); |
OlderNewer