Wasserfall in Saarburg, Deutschland

0

Montagne de Bueren à Liège, Belgique

0

Kurfürstliches Palais und Konstantin Basilika in Trier, Deutschland

0

Blick von der Cloef auf die Saarschleife, Deutschland

0

How to make candles

0

1. Slowly heat up the wax in the waterbath

2. Humidify sand or colored broken glass and press a form

3. Fill the hot wax into the form

4. Place the wick into the middle of the form and let it cool down.

5. After cooling down, the candle is ready to take out of the humidified sand or colored broken glass.

The origin of “Knigge”

0

Lately I paid for my meal in a restaurant in Vienna. In Austria, it is often said that one should give a tip of about 10% of the invoice amount.  Well, I wondered why… not only because the waitress was neither friendly nor polite…

Guidelines called “Knigge” tell us how to act in society in different situations. What is the origin of these “Knigge” guidelines?

And then I found this article about a German writer called Adolph Freiherr Knigge. He is best remembered for his book Über den Umgang mit Menschen (On Human Relations). Well, this book was not at all about good manners in the first place. Mistakenly, Knigge’s work was misinterpreted and is only known today as guidelines for good manners.

What makes the chili peppers so spicy?

0

While eating my delicious pizza I wondered what makes the chili peppers so hot. And the answer is quite interesting.

Chili peppers contain an alcaloid which is named capsaicin. This compound belongs to the capsaicinoids and is also the primary ingredient in pepper spray. When it comes in contact with mucous membranes, it gives you a burning sensation. Interestingly, it does not bind to taste receptors but to pain receptors in the mouth and throat.

And why is water not effective to clear this burning sensation? Capsaicin is not soluble in water.

Data Versioning using Triggers in MySQL

0

At any time during database driven development you ask yourself how to keep track of the changes made to your data in your database. I asked myself the same question. And I came up with a simple solution using triggers.

A trigger is a small function stored inside your database that gets triggered on a event in your database. Like, the moment you add or update a row in your table.

For versioning we need 2 things:

- a few extra fields in your table
- a copy of the table structure of the table you want versioning turned on

First, let’s define 2 extra fields:

- enuVersionStatus (ENUM) = ‘INSERT’, ‘UPDATE’, ‘DELETE’
- tsVersionStatus (timestamp) = current_timestamp & on update current_timestamp

enuVersionStatus is defined as a enumerable field that holds the state of the data
tsVersionStatus is defined as a timestamp and holds the timestamp when the data has been edited

Now we copy the entire structure of our table to a log, or history table. Let’s just append a “_log” to this table and remove any indexes or auto_increment statements. And lastly we create a new trigger:

DELIMITER $$
CREATE TRIGGER myTable_Trigger
BEFORE UPDATE ON myTable
FOR EACH ROW
BEGIN
INSERT INTO myTable_log (SELECT * FROM myTable WHERE id = OLD.id);
END$$

What the trigger does is very simple. Just before doing any update on the table, the “old” entry is being written into the log table. The data in myTable holds the live data and the myTable_log holds all the old entries.

Impressions of Austria

0

It’s time to dedicate a photo album to the time span I’ve already spent in this beautiful country Austria…

Impress yourself :)

Picture of the week #4

0

After a few weeks of tranquility :) , here we are again in the New Year!!

This picture was made last year in Hurghada (Egypt). Enjoy the impressive colors of the Red Sea :)

Go to Top