Robert Eisele
Systems Engineer, Architect and DBA

Improving Interval Conditions

Checking if a certain number \(x\) falls into a given range between \(a\) and \(b\) is a quite easy task:

Calculate the intersection points of two Circles

How can you find the intersection points of two circles, given by the two center points and their radii? More formally: Given two circles with their center points \(\vec{A}\) and \(\vec{B}\) and their radii \(A_r\) and \(B_r\), we want to find the points \(\vec{P}_1\) and \(\vec{P}_2\) which represent the intersection points of both circles. Obviously, there can be one, two, infinity or no intersections at all, namely when one circle is completely within the other or the areas of the circles does not overlap.

Store a tag-cloud in MySQL

There was a time when tag-clouds were the thing for website owners to fancy oneself. These clouds are mostly gone, but seen from the perspective of how to implement such a thing, one can learn quite a lot, especially with large amounts of links. Anyway, imagine you publish some articles on your website, which are stored in a table "post" and you want to to add tags to every post in order to print a tag-cloud.

Simultaneously set and delete bit flags in a database

Imagine, we store bit-flags in a database as integers and want to update the bit-set by simultaneously deleting and updating the bits. An expression like this can quickly become unhandy. However, I wanted to make this solution pretty and after some tinkering I came up with a quite nice solution.

Using GPS with node.js and JavaScript

GPS is probably the best known global positioning system, even if there are other countries besides America who built up their own, like Europe with Galileo, Russia with GLONASS and the newest, BeiDou in China. All are based on the same technique, a triangulation of spheres, whose radius is the signal transfer time, given by an atomic clock on the satellite. In general, the more satellites you use this way, the better the accuracy of the determination of the location and some receivers already combine the varying systems.

Calculate the argmin of the sum of absolute values

Imagine, you have a coordinate system with some points. Parallel to the x-axis is a line, which is connected to each of the points. Your goal is to figure out what the minimum accumulated distance of the points to the line is by moving the horizontal line up and down. Look at this illustration and use the mouse to get a feeling for it:

Complex numbers in JavaScript

Complex numbers sound complex, but in fact they are the most natural numbers - even if the name is a bit misleading. When extending the natural numbers to integers, to rational numbers, to real numbers and finally to complex numbers; it's the first field in which every operation is well defined.