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
.codehilite { | |
pre, code { | |
color: #fdce93; | |
background-color: #2b2b2b; | |
} | |
.hll { background-color: #222222 } | |
.c { color: #7f9f7f } /* Comment */ | |
.err { color: #e37170; background-color: #3d3535; } /* Error */ |
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 : Chen,Hao | |
# Email : [email protected] | |
# Site : http://haoch.me | |
# | |
# Based on jekyll-bootstrap's Rakefile. | |
# Thanks, @plusjade | |
# https://github.com/plusjade/jekyll-bootstrap | |
### |
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
.highlight { | |
margin-bottom: 1.5em; | |
.font(12); | |
color: #d0d0d0; | |
border: 1px solid darken(@body-color, 5); | |
background-color: #272822; | |
.rounded(3px); | |
pre { | |
position: relative; | |
margin: 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
// Solution 1 | |
// {code} | |
db.coll.find().addOption(16).forEach() | |
// {code} | |
// Solution 2 | |
// {code} | |
db.coll.find().noTimeout().forEach() | |
// {code} |
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 constructor_func = function(){ | |
// codes | |
} | |
var class_name = function(){ | |
this.attr=null; // instance variable | |
this.attr2=null; // instance variable | |
} | |
class_name.prototype = { |
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(){ | |
// TODO evironment logic | |
OBJECT_NAME=function(){ | |
var that = { | |
init:function(){ | |
that.func_name() | |
return that | |
}, | |
func_name:function(){ | |
// do func1 |
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
@************************************************************************ | |
* Base Page Template * | |
* * | |
* Parameters * | |
* pageid -- page id, for menu/page index,etc. * | |
* title -- page tile * | |
* styles -- page additional styles * | |
* scripts -- page additionalscripts,placed on the bottom of page * | |
* content -- page content,in the "container" * | |
* Description * |
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
log4j.rootLogger=DEBUG,console,stdLog,errorLog | |
#console appender | |
log4j.appender.console = org.apache.log4j.ConsoleAppender | |
log4j.appender.console.layout = org.apache.log4j.PatternLayout | |
log4j.appender.console.layout.ConversionPattern = [%d{ISO8601}] %5p %6.6r [%t]%x %c - %m%n | |
#file appender | |
log4j.appender.stdLog=org.apache.log4j.DailyRollingFileAppender | |
log4j.appender.stdLog.DatePattern = '.'yyyy-MM-dd |
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 encodeURI(params){ | |
var request_url=[]; | |
for(var i in params){ | |
var target = params[i]; | |
if(typeof target =='object'){ // when is list | |
for(var j in target){ | |
request_url.push(i+"="+target[j]); | |
} | |
}else{ | |
request_url.push(i+"="+params[i]) |