How internationalization (I18N) can be used in Qt applications.

May 6, 2013 Leave a comment

The Qt framework supports internationalization (I18N) and you can easily use it to your applications with a little effort. So, in this article I’ll show you how you can make it happen in a simple Qt application. The first thing you should do is making the GUI of the application translation-aware. That means setting all the texts you want of your widgets to be translatable. From the Qt Designer you can make translation-aware all your widgets. Here is an image that shows you how you can make the text of a QPushButton instance to be translation-aware :

Read more…

Ignoring multiline comments in compilers with Flex.

May 5, 2013 Leave a comment

In your lexer when lexical analysis is performed you may want also to ignore any multiline c-like comments.

Read more…

Post your email address to the public as an image to avoid spam.

May 4, 2013 Leave a comment

Whenever you want to post your email address to the public and don’t want to use a Contact Form which usually hides the address, try to display the address of the email as an image in order to avoid spam.

One way to achieve this is to manually create your email address as an image and embed it to your contact page. Most of the times we want this operation to be automatically. So, I have created a simple example to show you how you can make this possible.

Read more…

LISP function for inserting the GNU GPL v3 in Emacs.

May 1, 2013 Leave a comment

Whenever we create a new source code file for a free software with Emacs we need first to add the short brief of the blessed GNU GPL v3. You can add a LISP function to your “~/.emacs” configuration file and call it whenever you want to add it.

If the file is missing you can create it.

After inserting the function and restarting Emacs you can call the function:

M-x insert-short-gpl (press Alt-x, type insert-short-gpl, press return).

Read more…

Remove backup files ending with “~” from your system.

May 1, 2013 4 comments

Many text editors create backup files with names ending with “~”.

Most of the times these files are annoying and unnecessary…

So, you can use the following piped commands to remove them :

find / | grep "^.*~$"
       | sed -e 's/\(^.*$\)/"\1"/g'
       | xargs rm -f > /dev/null 2>&1

Please take account that this version handles correctly also filepaths containing space characters.

You Came.

March 16, 2013 1 comment

English

You Came

At a time that just passed, here upon this rock, where the tears of the silent and initiated hearts have been etched forever; time stopped, the clock went quiet, and as the beat of my heart continued to loudly sound like the talanton, like the voice of the subtle breeze, it was you that came. And here, my darling, you appeared again lovingly, through the sacred paths of my wounded mind, in the scene of my secret and invisible life.

It’s already morning, it is already night, and you’re still beside me. At each step, you want me to see freely, not through the right or the left eye, nor through the logic which is recycled like a square box, but with the heart, that the most beautiful thing, the most gracious, arises through the quietness of senses and humble sacrifice which only knows how to be emptied.

So, here I encounter with admiration your right hand which, although wounded, keeps the swallow of hope intact. Behold, I also see a rose in your left hand which you offer me because of being in love.

You are my port in the stormy sea, my joy in every difficulty. Your wounded hands are my cozy nest. But how it that from your right emerges what the air embraces and how from your left what the soil longs?

I engrave novel pages in my hectic life and direct myself with simplicity in the yesterday of my purer soul. I walk and I go, stepping barefoot; and like you did once, I am painting mysteries on the sand. With my lips unworthy, but filled with hope, like the child of his very own noble mother’s, I touch the milk of your love. I become a partaker of your face and, because of the intense flash of your light, I blossom without water and soil.

Greek

Ήρθες

Σε μια στιγμή που μόλις πέρασε, εδώ επάνω σε αυτόν τον βράχο, όπου τα δάκρυα των σιωπηλών και μυσταγωγημένων καρδιών χαράχτηκαν παντοτινά, ο χρόνος σταμάτησε, το ρολόι ησύχασε, και καθώς οι χτύποι της καρδιάς μου συνέχισαν δυνατά να ακούγονται σαν τάλαντο, ως φωνή αύρας λεπτής, ήρθες εσύ. Και να αγάπη μου, ξεπρόβαλες και πάλι αγαπητικά, μέσα στα ιερά μονοπάτια του λαβωμένου μου νου, στο σκηνικό της μυστικής και αόρατης ζωής μου.

Είναι κιόλας πρωί, είναι κιόλας νύχτα, κι εσύ είσαι ακόμα δίπλα μου. Σε κάθε μου βήμα, ελεύθερα να δω επιθυμείς, όχι με το δεξί ή με το αριστερό, ούτε και με την λογική που σαν κουτί τετράγωνο ανακυκλώνεται, αλλά με την καρδιά, πως ότι πιο όμορφο, ότι πιο ευγενικό, γεννάται μέσα από την ησυχία των αισθήσεων και την ταπεινή θυσία που μόνο να αδειάζεται γνωρίζει.

Ιδού λοιπόν, αντικρίζω με θαυμασμό την δεξιά σου, που αν και πληγωμένη, κρατά αλώβητο το χελιδόνι της ελπίδας. Ιδού, και στην αριστερή σου, διακρίνω ένα τριαντάφυλλο, που από έρωτα νομίζω μου προσφέρεις.

Στην φουρτουνιασμένη θάλασσα είσαι το λιμάνι μου, σε κάθε δυσκολία, η χαρά μου. Τα λαβωμένα χέρια σου, η ζεστή φωλιά μου. Μα πως από την δεξιά σου ξεπροβάλλει εκείνο που ο αέρας αγκαλιάζει και πώς από την αριστερή σου εκείνο που το χώμα λαχταρά;

Καινές σελίδες χαράζω στην πολυτάραχη ζωή μου και κατευθύνομαι με απλότητα στο χθες της αγνότερης ψυχής μου. Περπατώ και πάω, ξυπόλητος βαδίζω. Κι όπως εσύ κάποτε, μυστήρια στην άμμο ζωγραφίζω. Ανάξια με τα χείλη μου, μα με γεμάτο ελπίδα, σαν το παιδί από την ευγενή μητέρα του, το γάλα της αγάπης σου αγγίζω. Κοινωνός γίνομαι του ιλαρού προσώπου σου και από το τόσο φως της λάμψης σου, δίχως νερό και χώμα, ανθίζω.

Join to Terranova today!

February 6, 2013 Leave a comment

I invite you to Terranova community through webpage : http://bit.ly/Y52fhj from which you can verify and download it to your smartphone or tablet!! For more information read my post in Google+ profile.

Follow

Get every new post delivered to your Inbox.

Join 144 other followers