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
// This example shows that in javascript even | |
// the case expressions in the switch is dynamic | |
'use strict'; | |
let prefix = 'label'; | |
function getLabel(n) { return prefix + n }; | |
console.log(getLabel(1)); // prints "label1" |
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 stats = [ { "Begin": 4, "HeadersDone": 13469, "BodyDone": 21017 }, { "Begin": 3823, "HeadersDone": 13479, "BodyDone": 20963 }, { "Begin": 3861, "HeadersDone": 13626, "BodyDone": 21167 }, { "Begin": 3874, "HeadersDone": 34103, "BodyDone": 34190 }, { "Begin": 4140, "HeadersDone": 13544, "BodyDone": 20847 }, { "Begin": 4339, "HeadersDone": 13523, "BodyDone": 20886 }, { "Begin": 4432, "HeadersDone": 13564, "BodyDone": 20848 }, { "Begin": 4537, "HeadersDone": 21229, "BodyDone": 21292 }, { "Begin": 4748, "HeadersDone": 13502, "BodyDone": 21143 }, { "Begin": 4940, "HeadersDone": 21299, "BodyDone": 27684 }, { "Begin": 5178, "HeadersDone": 21334, "BodyDone": 27647 }, { "Begin": 5415, "HeadersDone": 13577, "BodyDone": 20864 }, { "Begin": 5427, "HeadersDone": 21275, "BodyDone": 21316 }, { "Begin": 5432, "HeadersDone": 13610, "BodyDone": 21035 }, { "Begin": 5438, "HeadersDone": 13589, "BodyDone": 20856 }, { "Begin": 5444, "HeadersDone": 28828, "BodyDone": 28862 }, { "Begin": 5449, "HeadersDone": 28921, "BodyDone": 28 |
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
<style type="text/css"> | |
#dropArea{ | |
min-width:400px; | |
min-height:400px; | |
border:2px dashed #ccc; | |
border-radius:4px; | |
font-family:sans-serif; | |
display:flex; | |
align-items:center; | |
justify-content:center; |
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
<!-- a very basic code quality reporter --> | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<script> | |
document.addEventListener('DOMContentLoaded', main); | |
function escape(line){ | |
return line |
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
const { exec } = require('child_process'); | |
const readline = require('readline').createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}) | |
const exe = (command, success, error, after) => exec(command, (err, stdout, stderr) => { | |
if (stderr || err) { |
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
// AMD module loader for common js (node) | |
// relative paths not supported | |
const amdmodules={}; | |
let amdcontext=null; | |
// global amd's define | |
define=function(dependencies, factory) { | |
if (typeof dependencies==='function'){ | |
factory = dependencies; | |
dependencies = []; |
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
{} |