This file contains hidden or 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
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "testing" | |
| ) | |
| var m = [...]string{ | |
| "AAAAAAAAA", |
This file contains hidden or 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 convert = (a) => { | |
| var r = [] | |
| if (a.firstChild === null) { | |
| r.push(a) | |
| } | |
| else if (a.childNodes.length > 0) { | |
| var c = a.childNodes | |
| Array.from(c).forEach(function (v) { | |
| if (v.firstChild === null) { | |
| r.push(v) |
This file contains hidden or 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 r = [] | |
| const flatten = (a) => { | |
| if (a.firstChild === null) { | |
| r.push(a) | |
| } | |
| else if (a.childNodes.length > 0) { | |
| var c = a.childNodes | |
| Array.from(c).forEach(function (v) { | |
| if (v.firstChild === null) { | |
| r.push(v) |
This file contains hidden or 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
| addCssToHead (css) { | |
| var head = document.getElementsByTagName('head')[0] | |
| var s = document.createElement('style') | |
| s.setAttribute('type', 'text/css') | |
| if (s.styleSheet) { // IE | |
| s.styleSheet.cssText = css | |
| } else { // the world | |
| s.appendChild(document.createTextNode(css)) | |
| } | |
| head.appendChild(s) |
This file contains hidden or 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* f() { | |
| yield 9 | |
| yield 'home' | |
| yield 'do not miss it!' | |
| } | |
| var bind = f() | |
| console.log(bind.next(),bind.next(),bind.next(),bind.next()) |
This file contains hidden or 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 child = document.getElementById("id").childNodes | |
| var length=child.length,start=0; | |
| var MAX_EXECUTION_COUNT=100; | |
| setImmediate(function loop(){ | |
| for(var i=start;(i<start+MAX_EXECUTION_COUNT) && i<length ;i=(i+1)|0){ | |
| console.log(child[i]) | |
| } | |
| if(i<length){ | |
| start += MAX_EXECUTION_COUNT; | |
| setImmediate(loop,0); |
This file contains hidden or 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 len = obj.length | |
| for (var i= 0; i < len; i=(i+1)|0) { | |
| console.log(obj[i]) | |
| } |
This file contains hidden or 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
| input { | |
| border-right: 1px solid transparent; | |
| } | |
| input:focus { | |
| animation: PulseAttention 1.5s cubic-bezier(.215, .61, .355, 1) forwards infinite; | |
| } | |
| @keyframes PulseAttention { | |
| 50% { | |
| border-color: red; | |
| } |
This file contains hidden or 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
| const panic = () => { | |
| return new Promise((resolve) => { | |
| throw new Error("throw.. ") | |
| }) | |
| } | |
| const sleep = () => { | |
| return new Promise((resolve) => { | |
| setTimeout(function() { | |
| console.log("fin.") |
This file contains hidden or 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
| { | |
| "matches": [ | |
| "*://www.google.com/*", | |
| "*://www.google.ad/*", | |
| "*://www.google.ae/*", | |
| "*://www.google.com.af/*", | |
| "*://www.google.com.ag/*", | |
| "*://www.google.com.ai/*", | |
| "*://www.google.am/*", | |
| "*://www.google.co.ao/*", |
OlderNewer