A better google experience

In the old days google was ‘just’ a very good search engine. Nowadays it is moving away from it’s initial goal to provide the best search experience. On an average query you will get ads, newsreports, videos, maps, related queries all making it harder to look at what you were actually trying to find. Using tampermonkey (a browser plugin to […]

Create ranges from an array or list in Javascript

Below a javascript, the function creates logical ranges from an array of integers. I use this script to create filters. The function accepts 4 parameters: array : an array of integers. E.g. [1,50,20,10,23,78] range : Integer. Range of the groups. E.g. 10 return groups of 10: 10,20,30 etc. 100 returns groups of 100: 100,200,300 etc. Any integer is possible divider […]

A large sortable table with rotated column headers

Below an example of a large sortable table with rotated column headers. I also created a jsFiddle you can watch here. By rotating the headers you can add many more columns to the viewport while preserving readability. If you wish to implement something like this yourself there are a few things to consider: The table-layout needs to be fixed. This […]

Convert a SQL table to a JSON object and sort it

Want to convert a SQL table to a javascript object and sort it? This is one way to do this. First, create an array of objects. Each object represents one row. Create a key for the row index (starting at 0) and a key that contains an array of the column values. Now we have converted an SQL table to […]