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
$("#submit").click(function(){ | |
var bad = false; //the date is good or bad? | |
var end_time = $("#timetext").val().split("-"); //date fomart: 2013-6-6 | |
var begin_time = $("#begin_time").text().split("-"); | |
var diff_year = end_time[0] - begin_time[0]; | |
var diff_mon = end_time[1] - begin_time[1]; | |
var diff_day = end_time[2] - begin_time[2]; | |
if (diff_year < 0) | |
bad = true; | |
else if (diff_year == 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
//author: Sun, Junyi (weibo.com/treapdb) | |
//usage: node --nouse-idle-notification --expose-gc --max-old-space-size=8192 memcached.js | |
var config ={ | |
port: 11211, | |
max_memory: 100 // default 100M bytes | |
} | |
var net = require('net'); | |
var LRU = function (max) { // this LRU implementaion is based on https://github.com/chriso/lru |