Skip to content

Instantly share code, notes, and snippets.

View shimondoodkin's full-sized avatar

Shimon Doodkin shimondoodkin

View GitHub Profile
var sys = require("sys"),
fs = require('fs'),
url = require('url'),
http = require("http"),
multipart = require("./lib/multipart");
var name, filename, file,file2;
http.createServer(function (request, response) {
switch (url.parse(request.url).pathname) {
var sys = require("sys"),
fs = require('fs'),
url = require('url'),
http = require("http"),
multipart = require("./lib/multipart");
http.createServer(function (request, response) {
switch (url.parse(request.url).pathname) {
//thanks to creationix - large protion of the code here is learned from his connect library.
var querystring = require('querystring');
var sys = require('sys');
var multipart = require("deps/multipart-js/lib/multipart");
var fs = require('fs');
this.postdecoders =
{
'application/x-www-form-urlencoded': querystring.parse,
//thanks to creationix - large protion of the code here is learned from his connect library.
var querystring = require('querystring');
var sys = require('sys');
var multipart = require("deps/multipart-js/lib/multipart");
var fs = require('fs');
this.postdecoders =
{
'application/x-www-form-urlencoded': querystring.parse,
@shimondoodkin
shimondoodkin / postproblem.js
Created August 16, 2010 23:33
<shimondoodkin> i have a problem with http if i define the on end and on data callbacks after like 120 ms it does not call callbacks or maybe if it is clouse inside a clousre, the object looks ok but it does not fire the events [01:52] <bradleymeck> is t
var http = require('http');
var url = require('url');
//var sys = require('sys');
var mylog="log:\r\n";
/*
<shimondoodkin> i have a problem with http if i define the on end and on data callbacks after like 120 ms it does not call callbacks or maybe if it is clouse inside a clousre, the object looks ok but it does not fire the events
[01:52] <bradleymeck> is the request done by 120ms?
[01:52] <shimondoodkin> it hangs
[01:52] <shimondoodkin> after a minute it fails
*/
var http = require('http');
var url = require('url');
//var sys = require('sys');
var mylog = "log:\r\n";
/*
<shimondoodkin> i have a problem with http if i define the on end and on data callbacks after like 120 ms it does not call callbacks or maybe if it is clouse inside a clousre, the object looks ok but it does not fire the events
[01:52] <bradleymeck> is the request done by 120ms?
[01:52] <shimondoodkin> it hangs
[01:52] <shimondoodkin> after a minute it fails
/*
It looks like there is a problem with http
If I define the on end and on data callbacks (too late) - like
after like 120 ms (like after all data is transfered)
it does not calls the callbacks (on data, on end).
or maybe because it is clousre inside a clousre,
the request object looks okay, but it does not fire the events,
i can build a simple pango cairo program with
cc -o pangocairo $(pkg-config --cflags --libs pangocairo) pangocairo.c
how to add a lib pangociro to waf script
shimon@shimon-desktop:~/Documents/corcpptest/node-async$ cat wscript
installed package :
sudo apt-get install libpango1.0-dev,
sudo apt-get install libpangomm-1.4-dev
sudo apt-get install libcairo-dev,
sudo apt-get install libcairo2-dev,
sudo apt-get install libcairomm-1.0-dev
links:
http://cairographics.org/
http://library.gnome.org/devel/pango/stable/
We couldn’t find that file to show.