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 Saturn | |
* @since 1.0.0 | |
* @return void | |
*/ | |
var Highlighter={ | |
highlight: | |
function(b,a){ |
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
/* Simple Memcached in Javascript | |
* @Author: Sun, Junyi | |
* @Email: ccnusjy@gmail.com | |
* @Date: 2012-8-3 | |
*/ | |
var net = require('net'); | |
var store = {} | |
function handle_header(header,crlf_len){ | |
var tup = header.split(" ") |
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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => 文件编码选项 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set encoding=utf-8 | |
set fileencoding=chinese | |
set fileencodings=ucs-bom,utf-8,chinese,gb18030,gbk,gb2312,cp936,prc,taiwan,latin-1 | |
"set fileencoding=utf-8 | |
set encoding=utf8 | |
set ffs=unix,dos,mac "设置换行符格式 | |
set ff=unix "设置缓冲区换行符格式 |
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
/* | |
12306 Auto Submit => A javascript snippet to help you auto submit. | |
Copyright (C) 2011 Kevintop | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes 12306.user.js |
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
/* | |
12306 Auto Submit => A javascript snippet to help you auto submit. | |
Copyright (C) 2011 Kevintop | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes 12306.user.js |
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
<?php | |
// vim: set et sw=4 ts=4 sts=4 fdm=marker ff=unix fenc=utf8 | |
* UniqueID 生成唯一的id | |
可用于在分布式服务器下生成唯一的id。 | |
* @author shaojianyi <issuoow@gmail.com> | |
*/ | |
class UniqueID { | |
public $u1; |
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
$(document).ready(function() { | |
var c = {setting: {startline: 20,scrollto: 0,scrollduration: 300,fadeduration: [500, 100]},controlHTML: '<img src="http://www.uloci.com.cn/images/top_btn.png" style="width:70px; height:70px" />',controlattrs: {offsetx: 0,offsety: 35},anchorkeyword: "#top",state: {isvisible: !1,shouldvisible: !1},scrollup: function() { | |
this.cssfixedsupport || this.$control.css({opacity: 0}); | |
var a = isNaN(this.setting.scrollto) ? this.setting.scrollto : parseInt(this.setting.scrollto), a = "string" == typeof a && 1 == jQuery("#" + a).length ? jQuery("#" + a).offset().top : 0; | |
this.$body.animate({scrollTop: a}, this.setting.scrollduration) | |
},keepfixed: function() { | |
var a = jQuery(window), b = (a.scrollLeft() + a.width()) - 85, a = a.scrollTop() + a.height() - this.$control.height() - this.controlattrs.offsety; | |
this.$control.css({left: b + "px",top: a + "px"}) | |
},togglecontrol: function() { | |
var a = jQuery(win |
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
#!/usr/bin/env python2 | |
# vim: set fileencoding=utf8 | |
import os | |
import sys | |
import requests | |
import urllib | |
import json | |
import re | |
import time |
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
// | |
// This is the result of about an hour's delving into PHP's hairy-ass serialization internals. | |
// PHP provides a session_decode function, however, it's only useful for setting the contents of | |
// $_SESSION. Say, for instance, you want to decode the session strings that PHP stores in its | |
// session files -- session_decode gets you nowhere. | |
// | |
// There are a bunch of nasty little solutions on the manual page[1] that use pretty hairy regular | |
// expressions to get the job done, but I found a simple way to use PHP's unserialize and recurse | |
// through the string extracting all of the serialized bits along the way. | |
// |