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 <stdlib.h> | |
#include <stdio.h> | |
// How it should look like: | |
/** | |
class Point { | |
int x,y; | |
new(int, int) {...}; | |
void moveBy(Point) {...}; |
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
/* $Id: parser.y,v 1.4 1997/11/23 12:52:22 sandro Exp $ */ | |
/* | |
* Copyright (c) 1997 Sandro Sigala <ssigala@globalnet.it>. | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* 1. Redistributions of source code must retain the above copyright |
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
/* category.js */ | |
var mongoose = require('mongoose') | |
, Schema = mongoose.Schema | |
, ObjectId = Schema.ObjectId; | |
var Category = new Schema({ | |
... | |
}); | |
Category.statics.foobar = function() { |
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
"Ostatni Deadline" (w oparciu o "Ostatnia Nocka" by Maciej Maleńczuk & Yugopolis) | |
słowa: Marcin Gasperowicz | |
Boli mnie głowa a nie mogę spać, a GC | |
chociaż dokoła wszyscy już posnęli, F E | |
nie mogę siedzieć a nie mogę wstać, | |
mija ostatni termin beznadziei. | |
ref.: | |
Tylko kod, kod, kod, płoną światła lamp, |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var id; | |
var Robot = function(robot) { | |
id = this.id; | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; |
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 macro(mfun) { | |
var fstr = mfun.toString(), | |
params = fstr | |
.match(/^function\s*\((.*)\)/)[1] | |
.replace(/\s+/,'').split(','), | |
msrc = fstr.match(/^function\s*\(.*\)\s*\{((?:.|\n)*)\}\s*$/)[1]; | |
console.log(fstr, params, msrc); | |
return function() { |
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
var q = require('q'); | |
function jednaDroga(p) { | |
//.... | |
p.resolve(wartosc); | |
//.... | |
} | |
function drugaDroga(p) { | |
//.... |
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
+ Setting up common submodule | |
fatal: Not a git repository (or any of the parent directories): .git | |
fatal: Not a git repository (or any of the parent directories): .git | |
There is something wrong with your source tree. | |
You are missing common/gst-autogen.sh |
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
// save as humble.js | |
//$ node humble.js | |
// and then open http://localhost:9000/ in your browser (except Opera ;D) | |
var r = typeof require != "undefined" ? require : null, i = 1 | |
a = function(l) { return l[0] }, d = function(l) { return l.slice(1) }, | |
c = function(a,d) { return d.unshift(a) && d }, | |
o = function(f,g) { return function(x) {return f(g(x))} }, | |
m = function(f,l) { return a(l)?c(o(f,a)(l), m(f,d(l))):[] }, | |
n = function(f,a,b) { return f(a)+f(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
function parse(text) { | |
return text.split('\n') | |
.map(function(l) { | |
return l.split(/\s+/).map(Number) | |
}) }; | |
var fs = require('fs') | |
, filename = "myfile.txt" | |
, data = fs.readFileSync(filename, { encoding: 'utf8'} ); |
OlderNewer