Thomas' Playground


Image Comparison

Slide between two different pictures of the same motive to see the how far the spring has evolved in only two weeks the spring of 2018. One picture is take 1. of May and the second 18. of May. Drag the slider from side to side see the difference.
I used some code snippets, especially JavaScript snippets to make it work on iPhone and because I wanted it up and running very fast last the spring of 2018. I understand all the code and considering rewrite it so I can say that I wrote everything entirely, but on the other hand it's important as a developer to be able to use liberaries you haven't wrote yourself. Most developers do use liberaries they find on Internet because it's not necessary to invent the wheel every time.
The pictures are taken by me.


Image Comparison II

I create two versions. This one is much simpler and doesnt work on smartphones. The pictures are taken by me.


Browser benchmark stress test

A simple performance test tool. I made it for fun and to see how well different browsers on different devices handles x-number (deault is 1000) of random color and size ellipses (bubbles) being added on top of each other. Then the canvas is cleared, but this time the bubbles are multiplyed by 0.98, and being drawn and drawn again and again every 60th microsecond when the canvas is redrawn.


Drawing on Canvas

This is in every aspect a very simple drawing app for free-hand drawing. It is currently right under 100 lines of code, and I could probably have written it with less than half of the chars. I have probably started over 20 drawing applications, and never finished any of them. They were all just proof of concept projects. I realized not long ago that If I had written an app with all the features in this 20+ apps, I think it would have been pretty good. A lightweight online drawing tool. This is why I have started some projects using "<canvas></canvas>" lately. One of them being a performance test tool. I made it for fun and to see how well different browsers on different devices handles x-number (deault is 1000) of random color and size ellipses (bubbles) being added on top of each other. Then the canvas is cleared, but this time the bubbles are multiplyed by 0.98, and being drawn and drawn again and again every 60th microsecond when the canvas is redrawn.


Simulate dice tosses

I got a question on Facebook about probability when rolling dice. The case was as follow:

  • Use two dice
  • What is the probability to get to equal values?
  • Second, what is the probability that the the dies is equal and that both are 1.
To test if the calculation was correct, I made a simulation in JavaScript. To get statistically significant data I found that I had to run 2000 tosses. To be able to follow the progress I am using the 'setInterval()' set to run every 20 milliseconds.
It confirmed the theory.

Find prime numbers by using Eratosthenes algorithm

By using the old Greek mathematician algorithm, called Eratosthenes sieve I can calculate
100000 prime numbers on my ten year old desktop.



Unit conversion calculators

Calculate between different measurement units.
I will be adding more measurements units


Your public IP-address and hostname

Returns your IP-address, hostname and location (if your browser accepts it)



Bootstrap Cheat Sheet

It is exactly what the heading is says,
a cheat sheet for the Bootstrap framework.
I also test Bootstrap related things in here so it can look messed up from time to time.



A spider web-ish project using canvas

It's just a few lines of code to make this work. It doesn't do much, but I like it so I include it anyway. After all, it's my playground! :-)



A sound visualizer developed in Flash were I used Flash's sound spectrum output to create the animation

This is one of the last project I worked on as a Flash developer. I still like it so I want to share it with you
even though Flash has been dead for nearly many years now.
My inspiration for the look is an electrodiagram (ECG or EKG) most people have seen in hospitals or in movie scenes from hospitals. It starts as a "flatline" for a few seconds, meaning there is no heart beat or puls, but when the music starts the heart start "beating" as well. I don't remember the name of the author of the sound track I'm using, but I emailed him when I created this project and asked if it was ok if I used it, and I got his permission I will try to find the name of the composer because credits are important, but that means I have to install Outlook and add a database which is huge > 1GB.


PS: It won't start playing before you click "Allow" somewhere in your browser, were this buttons is located depending on your browser.
I have tested it on all major browsers and it works on everyone on my computers.



GuitarPlayer

This is an old Adobe Air app for guitarists that I developed ten years ago. Features: time-stretch, pitch up/down with 1 semitone intervals, user defined loops.

I'm going to port GuitarPlayer back to Java but with the same interface, in the near future. The audio engine is written in Java and was ported to ActionScript so that it could be runned in a browsers. It's working and all you need to do is to install is Adobe Air. If you need a tool to stretch a riff or a guitar solo without changing the pitch, there are many options out there, some of them arewritten in HTML5, CSS and JavaScript and runs in a browser. Before you choose one, make sure that the app is able to pitch up and down with one semitone intervals. Many recordings, especially during more than three decades from the 70s up to the 90s, were pitched one semitone down. I don't know where, who or why it started, but it became very popular. I think it's two reasons for that, one major reason is that it makes it a lot easier for the vokalists reaching the hight note. Especially if the vocalist is pushing the vocal chords to its limit. Another reason I've come across is that even though it's just one semitone down, it makes it sound a little bit more heavy, fuller, more rock 'n roll? I've done some testes with GuitarPlayer - which makes pitching up and down very easy - and I think it some truth in both this teories. IT it was a pain in the ass when we only had vinyl and wanted pick a riff or something, especially if the riff was written in E and recorded one semitone down...