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>ABC</title> | |
<style type="text/css"> | |
.round{ | |
display: inline-block; | |
height: 100px; | |
width: 100px; | |
border-radius: 100px; |
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 argsArr = Array.prototype.slice.call(arguments); | |
// changes arguments to "true" array | |
// 把 arguments 转换成一个“真正的”数组 | |
var nodesArr = Array.prototype.slice.call(document.querySelectorAll("div")); | |
// "true" array of DIVs | |
// 得到一个由 div 元素组成的“真正的”数组 | |
// document.querySelectorAll("div")得到的不是一个类数组 |
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
module.exports = function(grunt){ | |
grunt.initConfig({ | |
pkg:grunt.file.readJSON("package.json"), | |
less:{ | |
//必包含的less文件,合并到内的,合并的文件的内容会比component内的文件内容先出现 | |
options:{ | |
concat:true, //合并 | |
paths:"source/less",//路径 | |
imports:{ | |
less:["basic.less"]//需要合并的less文件名 |
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
// Converts a given word cloud to image/png. | |
function downloadPNG() { | |
var canvas = document.createElement("canvas"), | |
c = canvas.getContext("2d"); | |
canvas.width = w; | |
canvas.height = h; | |
c.translate(w >> 1, h >> 1); | |
c.scale(scale, scale); | |
words.forEach(function(word, i) { | |
c.save(); |
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 detect | |
utils.is = function(obj, type) { | |
return Object.prototype.toString.call(obj).slice(8, -1) === type; | |
}; |
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 range(len){ | |
return Array.apply(null, Array(len)).map(function (v,k) { return k }); | |
} |
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
/* | |
* @description 获取一个list孩子随机生成器 | |
* @param {Array} list 列表 | |
* @param {Array} shown 已经显示过的项目 | |
* @return {Function} list随机孩子的列表生成器,执行之后返回一个随机孩子列表 | |
* */ | |
function randomChildGenerator(list) { | |
var listProduct = list, | |
listCustom = []; |
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 playersMap = { | |
"舒克": 1200, | |
"迟伤": 1200, | |
"沙陀": 1200, | |
"皓勋": 1200, | |
"圣耀": 1200, | |
"懂象": 1200, | |
"青也": 1200, | |
"呼荣": 1200 | |
}; |
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
{"lastUpload":"2019-03-11T08:02:17.362Z","extensionVersion":"v3.2.7"} |
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
# custom WebStorm VM options | |
-server | |
-Xms2048m | |
-Xmx4096m | |
-XX:MaxPermSize=1024M | |
-XX:ReservedCodeCacheSize=1024M | |
-XX:+UseCodeCacheFlushing | |
-XX:+UseCompressedOops | |
-XX:+UseConcMarkSweepGC |
OlderNewer