(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
var parser = function(url) { | |
var a = document.createElement('a'); | |
a.href = url; | |
var search = function(search) { | |
if(!search) return {}; | |
var ret = {}; | |
search = search.slice(1).split('&'); | |
for(var i = 0, arr; i < search.length; i++) { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/******************************************* | |
* 实际使用展示,用户配置文件 fis-conf.js | |
*******************************************/ | |
//后缀映射 | |
fis.config.merge({ | |
roadmap : { | |
ext : { | |
coffee : 'js', | |
less : 'css', |
//需要安装两个依赖包 | |
// npm install mongoskin | |
// npm install moment | |
// 根目录建立一个 markdown 目录保存文章 | |
var mongo = require('mongoskin'); | |
var moment = require('moment'); | |
var fs = require('fs'); | |
//这里需要数据库连接串 | |
var db = mongo.db("mongodb://", {native_parser: true}); |
var https = require('https'), | |
user = process.argv[2], | |
opts = parseOpts(process.argv.slice(3)) | |
request('/users/' + user, function (res) { | |
if (!res.public_repos) { | |
console.log(res.message) | |
return | |
} | |
var pages = Math.ceil(res.public_repos / 100), |
var numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | |
var total = []; | |
var testCount = 10000; | |
for (var i = 0; i < numbers.length; i++) { | |
total[i] = []; | |
for (var j = 0; j < numbers.length; j++) { | |
total[i][j] = 0; | |
} | |
}; |
// Support routines for automatically reporting user timing for common analytics platforms | |
// Currently supports Google Analytics, Boomerang and SOASTA mPulse | |
// In the case of boomerang, you will need to map the event names you want reported | |
// to timer names (for mPulse these need to be custom0, custom1, etc) using a global variable: | |
// rumMapping = {'aft': 'custom0'}; | |
(function() { | |
var wtt = function(n, t, b) { | |
t = Math.round(t); | |
if (t >= 0 && t < 3600000) { | |
// Google Analytics |
# coding=utf-8 | |
__author__ = 'Vincent Ting' | |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__author__ = 'Vincent Ting' | |
import cookielib | |
import urllib2 |