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
// TODO: | |
// * touch controls | |
// * allow late piece rotation | |
// * code cleanup | |
//--------------------------------------------------// | |
// PAGE OBJECT & LOGIC // | |
//--------------------------------------------------// |
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
<script> | |
try { | |
(function() { | |
if (typeof(lpcurruser) == 'undefined') lpcurruser = ''; | |
if (document.getElementById('lpcurruserelt') && document.getElementById('lpcurruserelt').value != '') { | |
lpcurruser = document.getElementById('lpcurruserelt').value; | |
document.getElementById('lpcurruserelt').value = ''; | |
} | |
if (typeof(lpcurrpass) == 'undefined') lpcurrpass = ''; | |
if (document.getElementById('lpcurrpasselt') && document.getElementById('lpcurrpasselt').value != '') { |
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 add(x,y) { | |
var foo = "function customAdd("; | |
var script = document.createElement('script'); | |
script.setAttribute('type', 'text/javascript'); | |
foo += arguments[0]; | |
for (var i = 1; i < arguments.length; i++){ | |
if(typeof arguments[i] != "number"){ | |
throw new Error("you cheater"); | |
} | |
foo += "," + arguments[i]; |
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
<script> | |
if (typeof module === 'object') { | |
window.module = module; module = undefined; | |
} | |
</script> | |
<script async defer src="https://apis.google.com/js/api.js" onload="this.onload=function(){};handleClientLoad()" onreadystatechange="if (this.readyState === 'complete') this.onload()"></script> | |
<script> | |
if (window.module) |
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 express = require('express') | |
const app = express() | |
const router = express.Router(); | |
const multer = require('multer') | |
const upload = multer({ dest: 'uploads/' }) | |
const Parse = require('csv-parse'); | |
const fs = require('fs'); | |
app.use(express.static(__dirname + '/')); | |
function parseCSVFile(sourceFilePath, columns, onNewRecord, handleError, done){ |
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<input id="filep" type="file" onchange="foo()"> | |
<div id="result"></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
//If a child component wants to communicate back to its parent, it can do so through props, | |
//most commonly by its parent providing a callback property that the child can call when some event happens: | |
const ParentComponent = () => { | |
const letMeKnowAboutSomeThing = () => console.log('something happened!') | |
return ( | |
<ChildComponent letMeKnowAboutSomeThing={letMeKnowAboutSomeThing} /> | |
) | |
} |
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script src="https://code.jquery.com/jquery-3.1.0.js"></script> | |
<div id="root"></div> |
NewerOlder