j3pydev's public fiddles
-
International String Decomposition
Testing different ways to decompose unicode strings.
-
Godel Numbering
Convert String to a single BigInt based on Godel numbering. Convert BigInt to String based on Godel numbering. String length arbitrarily capped at ten characters and BigInt at 256 digits (the number of digits in the number corresponding to the string of ten z's).
-
Typing Effect 2
Using CSS animation to simulate a typewriter head and JavaScript setTimeout + await to reveal already present letters one-at-a-time.
-
Typing Effect 1
Using CSS animation to simulate a typewriter head and JavaScript setTimeout + await to add letters one-at-a-time.
-
Fermat's Little Theorem primality test
The idea here is to do a probabilistic primality check of an integer via Fermat's Little Theorem. Note: I'm not a mathematician.
-
TOTP with UI
WARNING: for security reasons, do not enter a real secret key into this webpage.
-
Escape string json
Turns your json into a string with escaped double quotes.
-
-
-
-
Rainbow v3: VR edition
A-Frame VR version of my D3js bar chart, with a totally distracting rainbow color show, which outlines my kilobytes of code per language when you look directly at each particular bar. The gray rectangular on the "ground" is actually a button, which requires movement to press (if I recall correctly) and which toggles the color changing on/off.
-
Random Korean Sentence Generator
Very first pass at a random Korean sentence generator. Note: the words and sentences are gibberish! They follow one of the basic Korean sentence patterns, but otherwise are entirely random.
-
Rainbow v2: My Github Language Stats
D3js bar chart, interactive with tooltips and a totally distracting rainbow color show, which outlines my lines of code per language with a log scale.
-
Rainbow Bar Graph
Example of a D3 (D3.js) bar graph that changes color in a rotating fashion and has a toggle to turn it on and off.
-
Playing an Audio Element
Adding an Audio HTML element with a source and autoplay attribute set to true will cause the sound to play (if autoplay is allowed). This function adds one on a click (or removes the previous one and adds a new one).
-
Rounded select element
Answer to this question: http://stackoverflow.com/questions/42323189/border-radius-not-working-in-macos-chrome#42323189
-
Importance of loading order.
Answer to http://stackoverflow.com/questions/42289942/javascript-show-hide-play-pause-buttons Note: the original post on Stack Overflow also didn't display anything visually on the page (the code here is taken directly from the original question). The problem the user had was that his script was in the page's Head element which gets run before the rest of the page is rendered which meant that there was a race condition where their script ran before there were any A elements on the page to attach to. Moving the script to the bottom of the Body element prevents the race condition.
-
xw28yypp
No-Library (pure JS), HTML, CSS, JavaScript
-
Truncated Primes
This checks for truncatable primes - primes that are prime even as you consecutively remove the digit on the far left. This is computationally expensive to do on large numbers so I spin up a web worker (that's why the UI doesn't freeze during the duration of the computation). TODO: refactor for ES2023 and BigInt!
-
Multi-Select in React (Example)
How to implement muli-select in an html Select element via class-based React 15.1.