added an abstractAlgorithm.js

This commit is contained in:
Jürg Hallenbarter
2026-04-20 09:22:12 +00:00
parent f13cc6b27d
commit d78ef16bff
5 changed files with 142 additions and 49 deletions

View File

@@ -1,35 +0,0 @@
console.log("test");
/*
var fs = require('fs');
var files = fs.readdirSync('.');
*/
liberary = document.getElementById('liberary');
liberary.innerHTML = "<p>title</p>";
liberary.innerHTML += "<div class='item'></div>";
// Source - https://stackoverflow.com/a/72205254
// Posted by Mohammad Ali Rony
// Retrieved 2026-04-01, License - CC BY-SA 4.0
function UrlExists(url)
{
var http = new XMLHttpRequest();
http.open('HEAD', url, false);
http.send();
return http.status!=404;
}
var fileName = "";
var alphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
for (var i = 0; i < alphabet.length*15; i++){
fileName = "";
for (var i = 0; i < i/alphabet.length; i++){
fileName += alphabet[i];
}
fileName = alphabet[i] + ".js";
if (UrlExists("sketches/"+fileName)){
console.log(fileName);
}
}