public function getName() {
$path = explode('\\', __CLASS__);
return array_pop($path);
}
Mittwoch, 29. Januar 2014
PHP get class name without the namespace
This is the easiest way to get the name of the current class without the namespace:
Dienstag, 28. Januar 2014
Bash endless loop one line
while true; sleep 2; done
Labels:
bash endless loop,
bash infinite loop,
bash loop
Donnerstag, 16. Januar 2014
Gender Detection API
To improve the conversions of our registration form we developed a gender detection api. The gender checker only requires a first name or an e-mail address containing a first name. 1000 requests to the gender api are free every month.
What if a name can be male as well as female?
If a country code is provided, the gender detection can be improved. For example: While Andrea is male in Italy, Andrea is a female name in the US and can even be both in Germany. With every query a accuracy value is provided how sure the api is to match the right gender. Here is a list of supported countries.

Is ssl supported?
Yes, to give you the best possible privacy protection ssl up to TLS 1.2 is supportedWhich countries are supported?
The API supports currently 105 countries. If a name is not found in the given country the complete database will be crawled.An accurate gender predictor needs to have multiple decision paths to determine the best gender. Therefore the api uses every data provided by the browser to fetch the best possible result. The API is under heavy development and we try to improve it's quality every month.
Montag, 23. September 2013
Howto install webp on debian squeeze
sudo apt-get install build-essential sudo apt-get install libjpeg-dev sudo apt-get install libpng-dev sudo apt-get install libtiff-dev wget https://code.google.com/p/webp/downloads/detail?name=libwebp-0.3.1.tar.gz&can=2&q= tar -xvf libwebp-0.3.1.tar.gz cd libwebp-0.3.1 ./configure --libdir=/usr/lib make sudo make install
Montag, 15. April 2013
Playing MP3's on a Navigation Business Radio (BMW E60/E61) - Fixing the skip issue
After burning my first MP3 CD for my BMW e60 I was wondering why some titles play flawless and some other files are skipped permanently. So I decided to investigate some time in this issue and create some test to identify which files are playing and which files not.
First of all I googled that issue and found some tips to convert the files to 192 kbps and 44.1 khz. This solution did the trick for some files but the most files still refused to playback so I took a deeper look into it.
For my first test, I took a file which doesn't playback in my car but works great on all other MP3 players and cellphones and converted it with lame (LAME 64bits version 3.99.5) with the following settings:
So what's wrong? Inspecting the file I noticed that in this file a cover image is embedded. Maybe such content causes the player to skip the file? Next, I used the command line tool eyeD3 (http://eyed3.nicfit.net/) to remove the embedded content from this file but keep the ID3-Tag. Now it's getting really weird. The file plays now with different bitrates, but only sometimes :-) Most times the file is still skipped but some times it plays correctly. For my next test, I removed the ID3-Tag completely from the file and these are the results:
After a lot more toasted cd's I can present you my final results, playing MP3 files on a navigation business:
- The bitrate doesn't matter. Everything between 128 and 320 kbps works well
- Either a variable bitrate (vbr) or a constant bitrate (cbr) works
- khz must be 44.1
- Either CD's or DVD's can be used
- Remove all ID3 v1.x/v2.x tags. The player try's to skip this data, but mostly fails und than skips the whole file ($ eyeD3 --remove-all *.mp3).
- only 500 MP3's per disc are recognized. If there are more than 500 files on a disc, even if they are in subfolders, they won't be played
Please don't ask me how the tags can be removed on windows. I have no Windows but I think google can help you or someone can post a comment with a how-to :-)
First of all I googled that issue and found some tips to convert the files to 192 kbps and 44.1 khz. This solution did the trick for some files but the most files still refused to playback so I took a deeper look into it.
For my first test, I took a file which doesn't playback in my car but works great on all other MP3 players and cellphones and converted it with lame (LAME 64bits version 3.99.5) with the following settings:
| kbps/quality | mode | khz | works |
|---|---|---|---|
| 320 | cbr | 48 | no |
| 192 | cbr | 48 | no |
| 128 | cbr | 48 | no |
| 0 | vbr | 48 | no |
| 4 | vbr | 48 | no |
| 320 | cbr | 44.1 | no |
| 192 | cbr | 44.1 | no |
| 128 | cbr | 44.1 | no |
| 0 | vbr | 44.1 | no |
| 4 | vbr | 44.1 | no |
So what's wrong? Inspecting the file I noticed that in this file a cover image is embedded. Maybe such content causes the player to skip the file? Next, I used the command line tool eyeD3 (http://eyed3.nicfit.net/) to remove the embedded content from this file but keep the ID3-Tag. Now it's getting really weird. The file plays now with different bitrates, but only sometimes :-) Most times the file is still skipped but some times it plays correctly. For my next test, I removed the ID3-Tag completely from the file and these are the results:
| kbps/quality | mode | khz | works |
|---|---|---|---|
| 320 | cbr | 48 | no |
| 192 | cbr | 48 | no |
| 128 | cbr | 48 | no |
| 0 | vbr | 48 | no |
| 4 | vbr | 48 | no |
| 320 | cbr | 44.1 | yes |
| 192 | cbr | 44.1 | yes |
| 128 | cbr | 44.1 | yes |
| 0 | vbr | 44.1 | yes |
| 4 | vbr | 44.1 | yes |
After a lot more toasted cd's I can present you my final results, playing MP3 files on a navigation business:
- The bitrate doesn't matter. Everything between 128 and 320 kbps works well
- Either a variable bitrate (vbr) or a constant bitrate (cbr) works
- khz must be 44.1
- Either CD's or DVD's can be used
- Remove all ID3 v1.x/v2.x tags. The player try's to skip this data, but mostly fails und than skips the whole file ($ eyeD3 --remove-all *.mp3).
- only 500 MP3's per disc are recognized. If there are more than 500 files on a disc, even if they are in subfolders, they won't be played
Please don't ask me how the tags can be removed on windows. I have no Windows but I think google can help you or someone can post a comment with a how-to :-)
Mittwoch, 31. Oktober 2012
Fine tune your mac volume with shift-option keys in OSX Mountain Lion
To fine tune your volume on mac osx mountain lion with your keyboard hold down the shift and the option key (alt) while pressing the volume up and down buttons.
This feature also works with the brightness keys.
Labels:
10.8,
brightness,
fine tune,
lion,
mac,
mountain lion,
osx,
shift-option,
volume,
volume down,
volume up
Freitag, 28. September 2012
My new project is now online: www.seniorbook.de
Visit www.seniorbook.de to review my new project.
Also there are some press related informations in german available:
http://www.seniorbook.de/inhalt/pressemeldungen
Also there are some press related informations in german available:
http://www.seniorbook.de/inhalt/pressemeldungen
Labels:
boomer,
Boomer Website,
senior website,
seniorbook.de
Abonnieren
Posts (Atom)
