Tutorial: How to create a simple HTML5 JavaScript based progress bar

JavaScript Progressbar
Since I needed a javascript based progress bar for a Web project and I could not find a component that meets my expectations, I decided to write my own progressbar.
The project was implemented in JavaScript with help of the HTML5 canvas element. The progress bar gets along without any image files, as it is usually the case with other JS / CSS progress bar solutions. By default it can handle 100 states (0-100%) and input errors will be caught and visualized.
Since I like to share my developments I present you the progressbar of course. I’m always open for criticism, praise and suggestions.
For a demo / example click here. The source can be found over here: pbar.js
Below I will show you quickly how to use the progressbar.
At first you have to embed the progress bar script […]

Update: HNBK.plan 1.0.8 released

hnbk.plan-1.0.8_screenshotThe last update for the HNBK.plan app is already again a while. Today I’ll present you a new release. HNBK.plan in version 1.0.8. But please don’t expect great innovations. I only removed one silly bug that has been created through the new year. The current version can be found in the main article for the app. (Follow the link below.)
Download: HNBK.plan 1.0.8
 
For the nerds there’s something to smile. The error, that had crept in, was one to hit your head on the table… But take a look for yourself…
Old line:
String planUrl = "http://217.78.137.198:64004/c/" +kw + "/c" + createClassPath() + ".htm";
Fixed line:
String planUrl = "http://217.78.137.198:64004/c/" + (((kw + "").length() == 1) ? "0"+kw : kw) + "/c" + createClassPath() + ".htm";
Best regards,
Raffi

HNBK.plan – a substitute schedule app for the Heinz-Nixdorf-Berufskolleg

May I introduce to you? HNBK.plan – a substitute schedule app for the HNBK (Heinz-Nixdorf-Berufskolleg) in Essen, NRW. Since the online representation of the plan unfortunately is very awkward to reach and the operation via smartphone resembles a true odyssey, I thought it was time for an app. So I took time to learn the Android app development basics. To put it in a nutshell – I created my first native Android app, which can be downloaded by you from now on.
Screenshots and handling
hnbk.plan-1.0.7_screenshot (1)  hnbk.plan-1.0.7_screenshot (2)  hnbk.plan-1.0.7_screenshot (3)  hnbk.plan-1.0.7_screenshot (4)
(Click on the screenshots to maximize them)

After the initial start you have to select the class whose representation plan you […]

How to use gzip on WordPress

gzipSo far I never worried about the page load speed of this blog. But so far I even thought WordPress would use gzip compression on it’s own. Like I said, so far. Today I realized that WordPress is not just doing exactly that.
For those who are lost in gzip, I’ll give a short explanation at first. Gzip is a compression method in order to minimize the size of a file. Today it is mostly used on Unix systems. In the website context, it is used to reduce the size of data which is transferred from the server to the user’s web browser. This not only reduces the traffic and, by implication, the overheads too, but also it brings a reduction of the […]

C# Random.Next(int, int) – how to define the bounds correctly

The devil is in the detail. Recently I wanted to create random numbers between 0 and 1 in C#. The Visual Studio tells us that we have to use Random.Next (int, int) method, whereby the first integer defines the lower limit and the second integer defines the upper limit. No more and no less. So based on Visual Studio’s description the following function should work:

Random rnd = new Random();
int random = rnd.Next(0,1);

Wrong! So you’ll get only one thing – in fact zeros. So I had to dip into the MSDN library to find a solution. There is explained, on the contrary to IntelliSense from Visual Studio, that the lower bound is inclusive and the upper bound is exclusive.

Parameters

minValue
Type: System.Int32
The inclusive lower bound of the random number returned.

maxValue
Type: System.Int32
The exclusive upper bound of the random number returned. maxValue must be greater than or equal to minValue.

In plain language this means, to […]