PDF完整版:https://github.com/huangjunsen/GooFlow/files/2078684/_.Issue.12.sdlddr_Gooflow.pdf
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 cv = document.getElementById('cv'); | |
var c = cv.getContext('2d'); | |
var txtDiv = document.getElementById('txt'); | |
var fileBtn = document.getElementById("up-button"); | |
var img = new Image(); | |
img.src = 'a.jpg'; | |
img.onload = init; // 图片加载完开始转换 | |
fileBtn.onchange = getImg; | |
// 根据灰度生成相应字符 |
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 ids = document.querySelectorAll(".member_id"); | |
var names = document.querySelectorAll(".member_name"); | |
var output = "", length = ids.length; | |
for(var i=0; i<length; i++){ | |
output += ids[i].innerHTML.slice(1,-1) + ":" + names[i].innerHTML + "\n"; | |
} | |
console.log(output); |
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 strict"; | |
var _asyncGenerator = function () { function AwaitValue(value) { this.value = value; } function AsyncGenerator(gen) { var front, back; function send(key, arg) { return new Promise(function (resolve, reject) { var request = { key: key, arg: arg, resolve: resolve, reject: reject, next: null }; if (back) { back = back.next = request; } else { front = back = request; resume(key, arg); } }); } function resume(key, arg) { try { var result = gen[key](arg); var value = result.value; if (value instanceof AwaitValue) { Promise.resolve(value.value).then(function (arg) { resume("next", arg); }, function (arg) { resume("throw", arg); }); } else { settle(result.done ? "return" : "normal", result.value); } } catch (err) { settle("throw", err); } } function settle(type, value) { switch (type) { case "return": front.resolve({ value: value, done: true }); break; case "throw": front.reject(value); break; default: front.resolve({ value: value, done: false }); break; } front = front.next; if (front) { resume(front. |
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 strict"; | |
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); | |
function fn() { | |
var _data = data, | |
_data2 = _slicedToArray(_data, 1), | |
c = _data2[0]; | |
return c; |
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 strict"; | |
class Point { | |
getX() { | |
console.log(this.x); // C | |
} | |
} | |
class ColorPoint extends Point { | |
constructor() { |
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
// https://github.com/chaosbot/Chaos/blob/master/server/static/js/chaos.js | |
var canvas = document.createElement("canvas"); | |
document.getElementsByClassName("content")[0].appendChild(canvas); | |
var ctx = canvas.getContext("2d"); | |
canvas.width = 400; | |
canvas.height = 200; | |
ctx.fillStyle = "#000000"; | |
ctx.fillRect(0, 0, canvas.width, canvas.height); |
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 test() { | |
const a = new Int32Array(10); | |
for (let i = 0; i < 1e6; i++) { | |
a.set([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); | |
} | |
return a; | |
} | |
console.time('test'); | |
test(); |
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 reslt, x; | |
reslt = [...null]; // TypeError: null is not iterable | |
reslt = [...undefined]; // TypeError: undefined is not iterable | |
reslt = {...null}; // {} | |
reslt = {...undefined}; // {} | |
if (x in null) {} | |
// TypeError: Cannot use 'in' operator to search for 'undefined' in null |
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
{"sig":"32a34af259b837df4e02abb1a71bfefe6de6637a393fd3b6194a3578ede5fcb28306c9e1da1ba29ee71c3450331e960a946823525cef5eb8a8ada9a32de65f080","msghash":"f2f38ac068f4440b69248eea0bf2d8be85aa6eb9f233ca92239e28d721cbe188"} |
OlderNewer