- TBA
- [wvw group boon share chronomancer][]
- [wvw roaming hybrid mirage][]
upload(files) { | |
const config = { | |
onUploadProgress: function(progressEvent) { | |
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total) | |
console.log(percentCompleted) | |
} | |
} | |
let data = new FormData() | |
data.append('file', files[0]) |
// before | |
// 通常這四個都有個共通的因素,才會被擺在一起 | |
if (rtn == RESULT_A || rtn == RESULT_B || rtn == RESULT_C || rtn == RESULT_D) { | |
Do1(); | |
} else { | |
Do2(); | |
} | |
// after | |
// 所以就把那個因素寫成 function name |
function p2(text){ | |
return text < 10 ? "0"+text : text; | |
} | |
function getContainedNode(node){ | |
var p = node; | |
while(p){ | |
if(p && p.classList){ | |
if(p.classList.contains("UFIComment")){ | |
return {type:"comment",node:p}; |
// # Mocha Guide to Testing | |
// Objective is to explain describe(), it(), and before()/etc hooks | |
// 1. `describe()` is merely for grouping, which you can nest as deep | |
// 2. `it()` is a test case | |
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run | |
// before/after first/each it() or describe(). | |
// | |
// Which means, `before()` is run before first it()/describe() |
x: 1 | |
y: require \./b.json.ls | |
z: require \./c.json.ls |
#proposal #wrapper #comparison .graph { | |
position: relative; | |
height: 4rem; | |
display: block; // make sub div display in this div | |
float: left; // fix the display result | |
width: 25%; // fix the display result | |
} | |
screenshot:http://i.imgur.com/mGKUbzK.png |
// Inspired by this post from CSS-Tricks. | |
// http://css-tricks.com/snippets/css/less-mixin-for-rem-font-sizing/ | |
// | |
// Plays nice with compass/typography/vertical_rhythm | |
// http://compass-style.org/reference/compass/typography/vertical_rhythm/ | |
// | |
// Calculates font size in `rem` (root em). | |
// | |
// Relative values depends on $base-font-size. Pixle value for font-size depends | |
// on $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 |
@main-font-size: 16px; | |
.x-rem (@property, @value) { | |
// This is a workaround, inspired by https://github.com/borodean/less-properties | |
@px-fallback: @value * @main-font-size; | |
-: ~`(function () { return ';@{property}: @{px-fallback}'; }())`; | |
-: ~`(function () { return ';@{property}: @{value}rem'; }())`; | |
} |