Skip to content

Instantly share code, notes, and snippets.

function get(uri) {
return http(uri,'GET');
}
function post(uri,data) {
if(typeof data === 'object' && !(data instanceof String || (FormData && data instanceof FormData))) {
var params = [];
for(var p in data) {
if(data[p] instanceof Array) {
for(var i = 0; i < data[p].length; i++) {
params.push( encodeURIComponenet(p) + '[]=' + encodeURIComponenet(data[p][i]);
#!/usr/bin/env python
# coding=utf8
# author=evi1m0
# website=linux.im
'''
12306 Captcha Picture:
author: Evi1m0@20150316
1. Download Captcha
2. Pic Conver Text
@alankell
alankell / demo.js
Last active August 29, 2015 14:16 — forked from zry656565/demo.js
function a(x, y){
var x = x; //这句加了和没加效果一样,但也许能帮助你理解
y = function() { x = 2; };
return function(){
var x = 3;
y();
console.log(x);
}.apply(this, arguments);
}
@alankell
alankell / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
------------------------- 前端
/**
* 前端公共函数方法整理
* @author Weige
* 备注: 配合jqury.js 使用
* 2012-04
*/
//获取字符串长度
function getWordSize(str)