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
# sending { "Connection": "close" } | |
# wget 0.0.0.0:8000 | |
HELLO.... | |
HELLO.... | |
HELLO.... | |
HELLO.... | |
HELLO.... | |
HTTP/1.1 200 OK |
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
diff --git a/src/node_http.cc b/src/node_http.cc | |
index 5ccc53b..d01912b 100644 | |
--- a/src/node_http.cc | |
+++ b/src/node_http.cc | |
@@ -277,8 +277,13 @@ HTTPConnection::on_headers_complete (http_parser *parser) | |
message_info->Set(version_minor_symbol, | |
Integer::New(connection->parser_.http_minor)); | |
- message_info->Set(should_keep_alive_symbol, | |
- http_should_keep_alive(&connection->parser_) ? True() : False()); |
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
import re | |
# http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone | |
from metaphone import dm as double_metaphone | |
# get the Redis connection | |
from jellybean.core import redis | |
import models | |
# Words which should not be indexed |
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 spawnLs() { | |
function innerSpawnLs(arg) { | |
// spawns ls + args, then use callback: | |
function() { | |
setTimeout(innerSpawnLs, 0, newArg); | |
} | |
} | |
setTimeout(innerSpawnLs, 0, firstArg); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Web.Mvc; | |
using System.Web.Routing; | |
namespace MyApp | |
{ |
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 configuration file example | |
# Note on units: when memory size is needed, it is possible to specifiy | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |
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
*2 | |
$6 | |
SELECT | |
$1 | |
0 | |
*3 | |
$3 | |
SET | |
$4 | |
test |
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
private Size shrinkSize(Size origSize) | |
{ | |
const int maxWidth = 900; | |
const int maxHeight = 700; | |
const double flipRatio = (double)maxWidth / maxHeight; | |
if (origSize.Width < maxWidth && | |
origSize.Height < maxHeight) | |
return origSize; |
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
import java.util.Timer; | |
import java.util.TimerTask; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.PointF; | |
import android.graphics.Rect; | |
import android.graphics.RectF; | |
import android.util.AttributeSet; |
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
//------------------------------------------------------------------------------ | |
// <auto-generated> | |
// This code was generated by a tool. | |
// Runtime Version:2.0.50727.4952 | |
// | |
// Changes to this file may cause incorrect behavior and will be lost if | |
// the code is regenerated. | |
// </auto-generated> | |
//------------------------------------------------------------------------------ |
OlderNewer