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
<!doctype html> | |
<title>Stackgen</title> | |
<script src="stackgen.js"></script> | |
<script> | |
try { | |
stackgen(); | |
} catch(e) { | |
ex = e; | |
throw e; |
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 primes = [2]; | |
var n = 3; // The number we are testing. Will be incremented. | |
function checkNextNumber() { | |
// It's sufficient to check if there are any prime factors up to sqrt(n) | |
n++; | |
var limitForChecking = Math.floor(Math.sqrt(n)); |
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 gulp = require("gulp"), | |
browserify = require("browserify"), | |
source = require("vinyl-source-stream"), | |
buffer = require("vinyl-buffer"), | |
uglify = require("gulp-uglify"), | |
through = require("through2"), | |
port = "/dev/cu.wchusbserial410", | |
espruino = require("node-espruino").espruino({comPort: port}); |
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 wifi = require("Wifi"), | |
ledPin = D14, | |
buttonPin = D0, | |
ssid = "...", | |
password = "..."; | |
var led = (function() { | |
var pulseIntervalHandle, |
OlderNewer