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 […]

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 […]

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 […]

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 […]

How to disable PHP OPCache for certain directories

Deactivate OPCache per folderIn this article, I want to show you how to disable the OPCache based caching for certain directories. (If you need a short introduction to the subject of OPCache, you should scroll down to the blue box in this article.) Although OPCache is a good idea in almost all cases, there are, as with many thing, situations where you should make an exception. Especially when it comes to the development or if a bugfix is to be tested, it can make sense to disable OPCache.
However, since other projects that benefit from OPCache are often running on the same web server, a complete deactivation of OPCache for such test cases can not be an option. Therefore, this article is about how to disable OPCache on the […]