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
| async function* getStocksStream() { | |
| var reader = new AsyncFileReader(“stocks.txt”); | |
| try { | |
| while(!reader.eof) { | |
| var line = await reader.readLine(); | |
| await yield JSON.parse(line); | |
| } | |
| } | |
| finally { | |
| await reader.close(); |
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
| { | |
| "name": "jsdomdataset", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "polyfill-jsdom.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "", | |
| "license": "GPL-3.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
| /* | |
| * Emulates H5Forms placeholders on legacy browsers | |
| * | |
| * <input placeholder="Search" /> | |
| * | |
| * @author $Author: sheiko $ | |
| * @license MIT | |
| * @copyright (c) Dmitry Sheiko http://www.dsheiko.com | |
| */ |
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
| /** | |
| * Prototypal Inheritance for Modules | |
| * | |
| * Prototypal inheritance in its generic case was described by Douglas Crockford at http://javascript.crockford.com/prototypal.html | |
| * However it doesn't work with modules (http://addyosmani.com/largescalejavascript/). This implementation allows to inherit from modules | |
| * | |
| * @author Dmitry Sheiko | |
| * @version object-create-from-module.js, v 1.0 | |
| * @license MIT | |
| * @copyright (c) Dmitry Sheiko http://dsheiko.com |
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
| /** | |
| * strtr() for JavaScript | |
| * Translate characters or replace substrings | |
| * | |
| * @author Dmitry Sheiko | |
| * @version strtr.js, v 1.0.2 | |
| * @license MIT | |
| * @copyright (c) Dmitry Sheiko http://dsheiko.com | |
| **/ |
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 sleep = function(millis) { | |
| var date = new Date(); | |
| var curDate = null; | |
| do { curDate = new Date(); } | |
| while(curDate-date < millis); | |
| return this; | |
| } | |
| sleep(1500).alert("Script is released"); |
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( $, document, window ) { | |
| var _isPropertySupported = function(prop) { | |
| var vendorProp, supportedProp, | |
| capProp = prop.charAt(0).toUpperCase() + prop.slice(1), | |
| prefixes = [ "Moz", "Webkit", "O", "ms", "Khtml", "Icab" ], | |
| div = document.createElement( "div" ); | |
| if ( prop in div.style ) { | |
| supportedProp = prop; | |
| } else { |
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
| body { padding: 100px; } | |
| div { | |
| display: inline-block; | |
| width: auto; | |
| text-align: center; | |
| background-color: red; | |
| color: white; | |
| padding: 10px; | |
| box-shadow: 0 0 0 5px white, 0 0 0 10px black, 0 0 0 15px gold; | |
| } |
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
| body { | |
| padding: 50px; | |
| font-family: Arial; | |
| } | |
| a { | |
| display: inline-block; | |
| color: black; | |
| font-weight: bold; | |
| text-decoration: none; | |
| padding: 5px 10px; |
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
| body { | |
| padding: 50px; | |
| font-family: Arial; | |
| } | |
| div { | |
| color: white; | |
| border: 2px solid white; | |
| background: red; | |
| border-radius: 50%; | |
| width: 200px; |
NewerOlder