Hot to show MySQL database size via SQL statement

Calculate MySQL database size via SQL statementToday, there is only a very short article with an SQL statement which allows you to display the size of a MySQL database, as well as the description of how to read out the database size via phpMyAdmin. Let’s start with the SQL statement. To display the size of a particular MySQL database in MegaByte (MB), use the following SQL command:

SELECT table_schema,
sum( data_length + index_length ) / 1024 / 1024 "Database Size in MB"
FROM information_schema.TABLES WHERE table_schema="{my_database_name}" GROUP BY table_schema

However, within the statement, before the execution, the placeholder {my_database_name} must be replaced by the name of the database whose size is to be determined. If the size of all database should be displayed on the MySQL server, the where clause can be omitted. […]

Fastest padLeft-function in Java

Fastest padLeft function in JavaSince Java does not have a function to pad strings on the left or right side, you either have to program such function yourself or use an existing library, such as Apache Commons. Because I recently needed a function that would pad a numeric string on the left side (= padLeft) with zeros up to a length of 8 characters, but did not want to include a whole library for such a simple task, the only option was to write a padLeft function myself.
However, when researching and implementing, I found various solution approaches and so I ended up with six different padLeft implementations. In order to find the best padLeft function for my use case, I tested all six implementations during a small performance test and found the fastest padLeft function. Before I get […]

Digistore24 – Product catalog as Excel

Digistore Product Catalog as ExcelMost readers of this blog who are on the road to online marketing should have heard about Digistore24. With over 50,000 members and more than 3,500 products, it is probably the largest German marketplace for digital products.
Unfortunately with so many products their product catalog lost the clearness in some way. Although Digistore24 offers detailed information on each product, such as reward, churn rate, average reward per cart, etc., these criteria can not be filtered in the product list. As an affiliate, who is looking for a product which fits the own needs, one is left stranded.
Digistore product catalog as Excel table
That’s why I wrote a small tool, which makes a complete deduction of the listed products and writes them into a sortable and filterable Excel table. Thus, […]

How to install Netis WF2190 driver under Kubuntu

How to install Netis WF2190 in KubuntuThe following article is about how to find and install the appropriate (K)ubuntu driver for the Netis WF2190 WLAN stick. For a few weeks I work mainly under Linux (again) and as with almost every of my attempts trying to switch from Windows to Linux, there were again difficulties with the WiFi this time.
So, to spare you the hassle, I wrote the following short tutorial for you about how to install the Netis WF2190 drivers under Kubuntu.
Finding a Linux driver for a Netis WiFi stick
Before we begin, let’s make a small test by lsusb command. If you enter this command in the terminal, all connected USB devices are listed with fuirther information.

lsusb

As shown in the screenshot below, our WiFi stick is also included in […]

How to convert Audible aax files to mp3 in Linux

 
Convert Audible aax-files to mp3 in LinuxSo far I always assumed that when I buy music or audiobooks on Amazon for download, I’ll get mp3 files for download. Far from it – yesterday I once again bought a an audiobook and had to find out that I was forwarded after the purchase to Audible and there was confronted with a “protected” aax file. If I wanted to buy at Audible, I would have gone to Audible. Thanks for nothing, Amazon!
But now the following question arises: “How do I convert the proprietary aax files into mp3’s, which I can play everywhere?” (aax files are only playable with the official Audible apps which aren’t available on all platforms.) After all, when buying on Amazon, there wasn’t the talk about the fact that the purchased audiobook can […]