Don't you?
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
let interestingNumbers = [ | |
"Prime": [2, 3, 5, 7, 11, 13], | |
"Fibonacci": [1, 1, 2, 3, 5, 8], | |
"Square": [1, 4, 9, 16, 25], | |
] | |
var largest = 0 | |
for (kind, numbers) in interestingNumbers { | |
for number in numbers { | |
if number > largest { | |
largest = number |
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 getTitle(weekday){ | |
var t = new Date(); | |
t = t.getDay(); | |
var title = ''; | |
switch(weekday){ | |
case 1: | |
title = '周一'; | |
break; | |
case 2: | |
title = '周二'; |
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
/*! | |
* mustache.js - Logic-less {{mustache}} templates with JavaScript | |
* http://github.com/janl/mustache.js | |
*/ | |
/*global define: false*/ | |
(function (root, factory) { | |
if (typeof exports === "object" && exports) { | |
factory(exports); // CommonJS |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Parameters:
- page: 分页,默认为 1
- limit: 每页数量,默认为 20
###获取最新状态
GET https://insekai.com/api/latest
TEST OK
###Prepare
0.Install aria
wget http://downloads.sourceforge.net/project/aria2/stable/aria2-1.18.8/aria2-1.18.8-osx-darwin.dmg
or paste the URL in your browser to download it.
1.Install VirtualBox
aria2c -s10 -x10 http://download.virtualbox.org/virtualbox/4.3.20/VirtualBox-4.3.20-96996-OSX.dmg
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
div | |
div(style='width:100%;margin:0;padding:0', width='100%') | |
table(cellpadding='0', border='0', cellspacing='0', style='border-collapse:collapse;background:#eee;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;width:100%;height:100%;text-align:left', width='100%', align='left', height='100%') | |
tbody | |
tr | |
td(style='border-collapse:collapse;padding:32px 0;background-color:#eeeeee', align='center', bgcolor='#eeeeee') | |
table(cellpadding='0', border='0', cellspacing='0', style='border-collapse:collapse') | |
tbody | |
tr | |
td(align='left', style='border-collapse:collapse;background:#fff;padding:32px;min-width:320px;max-width:525px;height:100%', height='100%') |
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 bubbleSort(array) { | |
var temp; | |
for (var i = 0; i < array.length - 1; i++) { | |
for (var j = 0; j < array.length - i - 1; j++) { | |
if (array[j] > array[j+1]) { | |
temp = array[j]; | |
array[j] = array[j+1]; | |
array[j+1] = temp; |
Text / Link / Image / Email
重启万花筒 http://tympanus.net/Development/PseudoElementsAnimationsTransitions/index2.html