March 31st, 2010: Document Freedom Day
March 31st, 2010 is the Document Freedom Day.
Support open standards. Support open document formats. Support open source software.
Ο,τιδήποτε σχετίζεται με το Ελεύθερο/Ανοικτού Κώδικα Λογισμικό
March 31st, 2010 is the Document Freedom Day.
Support open standards. Support open document formats. Support open source software.
Digikam 1.0.0 has finally been released. If you are not familiar with Digikam, let me tell you that it's probably the best photos organizer, that comes with an editor with various effects, fixes, etc. and the best of all, is open source (requires KDE 4.x, but that's not a problem I guess ). I always wanted to write a detailed review about it, but the program has many functions that you must learn to use and the time needed for this cannot be easily found. But since we have the final 1.0.0 release now, I'll probably put it in my mid-term TODO list.
Use your favorite Linux package management system to install it, or download the source and compile it yourself.
There are times that you want to store IPv4 addresses in MySQL (IPv6 has still some way to go). A quick and dirty solution is to store the addresses in a varchar(15) column, but this solution exhibits the problem of sorting the addresses. For example, 10.3.8.9 comes first compared to 10.240.8.9, while the opposite should apply. Of course, you can always splits the octets and sort them individually or generate a unique integer for each IP address, but this involves a bit of coding.
It's been a couple of days that I've discovered that MySQL provides two functions for the purpose I describe above. INET_ATON() accepts an IP address and returns an integer, while INET_NTOA() does exactly the opposite.
So, what's the deal? You can sort rows by an IP address. Sorting by IP addresses surely is not what you need every day, but when this functionality is necessary, these two functions come handy. So:
mysql> select INET_ATON('10.3.8.9'); +-----------------------+ | INET_ATON('10.3.8.9') | +-----------------------+ | 167970825 | +-----------------------+ 1 row in set (0.00 sec) mysql> select INET_ATON('10.240.8.9'); +-------------------------+ | INET_ATON('10.240.8.9') | +-------------------------+ | 183502857 | +-------------------------+ 1 row in set (0.00 sec)
So, store your IP addresses as integers, sort them as you see fit and display them right. This of course is MySQL specific, but MySQL is widely used for a range of web applications.
Remember my post about renaming those photos from the useless DSC_xxxx.jpg filename notation to a more meaningful one?
Well, I made a few tweaks with the script and I am now releasing it as FOSS (GPL v.3). You can get the source code here:
rename_photos-0.1.tar.gz (12.7 KiB)
Run the script without arguments to see its usage. It couldn't be simpler. The script requires the exiftool package to be installed.
Comments are always appreciated. I am novice with shell scripting, so please, be gentle...
As the title says. Today, Qiang released v.1.0.8 of Yii as he announced a few days back. This version finally comes with a completed Greek translation of the core messages used by the framework, so with a minor configuration tuning, you can see the messages in Greek.
You can grab the source and the documentation here.
As you might remember, I wrote about the Yii web application framework some time ago. As all projects like this, localization is an important step for the wider adoption of the framework. So, I've finally completed the Greek translation of the Yii core messages (the messages that Yii uses internally for mostly informational purposes). The current version is 1.0.7, but tomorrow Qiang is expected to release version 1.0.8, which will include the complete translation. There are more to translate, like the user guide, the blog guide, etc., but these are huge...
Stay tuned for more Yii news.
It's here. The release announcement can be found here.
A couple of days ago, Microsoft announced that it contributes somewhat 22,000 lines of code to the open source community. This probably comes as a surprise to the community, since it is well known that Microsoft is not particularly fond of Linux and, to speak more widely, open source software. The code is released under GPL v.2 and it is drivers that make Linux perform better when used as a guest OS under Microsoft's virtualization technology, Hyper-V, that is used in Windows Server 2008.
However, today the story that circles the internet is that Microsoft was actually obligated to release those drivers under the GPL v.2 license. The truth is that Stephen Hemminger -a network engineer that works for a company that produces open source routers- discovered that parts of code of a network driver in Hyper-V are compiled against GPL code, which constitutes a GPL violation. Hemminger contacted Greg Kroah-Hartman, who works for SuSE, to deal with this "silently", since SuSE (Novell) has a partnership contract with Microsoft. So, the marketing magic happened and Microsoft now seems to be the good guy that donates code to the community.
At least, that's what happened until today. The truth is now out.
It's annoying to have a bunch of photos with names such as DSC_wxyz.JPG where wxyz integers... My D60 happens to start from the beginning (that is 0001) when I delete all photos from the memory card. So, you take your photos and when you connect the camera to the PC to download them, you discover that your new DSC_0001.jpg file will overwrite your older DSC_0001.jpg if you have not anticipated the creation of folders for each case/event. Besides, DSC_0001.jpg provides 0 (zero) information about the actual photo.
So, enough of this! I searched a bit and discovered exiftool, a handy Perl script that reads the EXIF information (and several other vendor specific tags from the photos). So, the first thought I made was "what is the EXIF feature/tag that uniquely identifies a photo?". The answer was that a good candidate is the time the photo was taken. So, with a minimal Bash script, I can now rename all those DSC_ useless filenames to something like 20090712214512.jpg, which is the concatenated timestamp of the photo (year + month + day + hour + minutes + seconds). You must be a bit unlucky (and have a modern camera) to have two or more photos with the same timestamp (taken at the same second), but with a little tweaking, the script can also be modified to consider this case.
So, the following command will display the EXIF date and time the picture was taken:
$ exiftool -EXIF:DateTimeOriginal DSC_0028.jpg Date/Time Original : 2009:01:04 14:18:26
You can now get this timestamp and convert it to a more compact form:
$ exiftool -EXIF:DateTimeOriginal $i|awk '{print $4":"$5}'|tr -d :
This will give you something like
20090104141826
which is good enough for me to uniquely identify my photos.
Lately, I've been searching for a robust, efficient and well documented PHP framework. In case you are not familiar with the term framework, all you need to know is that a framework is a set of programming code that is usually targetted for general purpose applications and is supposed to take the burden of coding repetitive tasks from the developer, leaving him/her to concentrate more on the business logic. So, a web application framework -and in our case- a PHP framework is a set of classes that deal with data validation, connection to databases, authentication, session management, etc., features that any web application has.