option={
"color": [
"#fe8463",
"#9bca63",
"#fad860",
"#60c0dd",
"#0084c6",
"#d7504b",
"#c6e579",
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
/* | |
type config = { | |
args: { | |
Query参数名称 : 预定义类型 或 Converter | |
} | |
} | |
type 预定义类型 = 'Int' | 'String' | |
type Converter = function(queryParamValue):Promise |
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
```javascript | |
var tasks = [1, 2, 3, 4, 5]; | |
tasks = tasks.map(function(i) { | |
return function(cb) { | |
setTimeout(function() { | |
console.log(i); | |
cb(); | |
}, Math.random() * 500 | 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta charset=gbk /> | |
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> | |
<style> | |
div{ | |
margin:10 auto; | |
width:200px; |
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 getTime(second) { | |
var s = second % 60; | |
var m = Math.floor(second / 60); | |
var h = m < 60 ? 0 : Math.floor(m / 60); | |
m = m >= 60 ? Math.floor(m % 60) : m; | |
var format = function(num) { | |
return num > 9 ? num : '0' + num; | |
}; | |
return [h, m, s].map(function(t) { |
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 node | |
'use strict' | |
const fs = require('fs') | |
const path = require('path') | |
const blessed = require('blessed') | |
const contrib = require('blessed-contrib') | |
const screen = blessed.screen() | |
const grid = new contrib.grid({rows: 2, cols: 5, screen: screen}) |
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 test = { | |
id: 1, | |
user: { | |
role: [1, 2, 3, 4], | |
userGroup: { | |
id: 1 | |
}, | |
name: { | |
first: "foo", | |
last: "bar" |
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
option = { | |
"title": { | |
"x": "center", | |
"y": "20", | |
"textStyle": { | |
"color": "#999", | |
"fontWeight": "100" | |
}, | |
"text": "来源分析" | |
}, |
A small library for padding strings in JavaScript. Marmalade-free.
![NPM version][shield-npm] ![Node.js version support][shield-node] ![Build status][shield-build] ![Code coverage][shield-coverage]
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
/** | |
* Created by Godfery on 2016/12/8. | |
*/ | |
/** | |
* Created by Godfery on 2016/12/7. | |
*/ | |
var a = [['bj', 1, 'sh', 2, 'wh', 3], ['gz', 4, 'bj', 5], ['sh', 6], ['sh', 5]]; | |
/** | |
* 获取数组聚合 | |
* @param array |
OlderNewer