…just another hippy blog

are you pondering what i'm pondering?

Sorting functors and bikinis

I stand up next to a mountain
Originally uploaded by Mark Witton.

Sorting is one of the most common operations done on a data structure and it’s one of the best examples for generic code and C++ templates.
Qt provides a handy qSort() method which comes in different flavours.
One is quite interesting as it allows you to use a custom sort function.

void qSort(RandomAccessIterator begin, RandomAccessIterator end, LessThan lessThan)

LessThen is actually a template parameter. I guess most of the times you will just use a pointer to a global function.
The drawbacks are that you cannot pass parameters to the sorting function, unless you use global static variables. And that’s rather ugly.

Read more

Goodbye, farewell

Passing train
Originally uploaded by PhotoA.nl.

June 28th, 2008. Deutsche Bahn: no more paper.
July 15th, 2008. Trenitalia: no more trains.
Coming soon: No more airplanes.

Screw you guys, I got a new roof!

Retired homeless fisherman
Originally uploaded by pedrosimoes7.

Did you notice the new roof?

Our beloved Pope Benedict XVI could not prevent himself from telling us happily that the Vatican Palace has a new roof.

I’m glad to hear that. And I bet there is quite a lot of “roof-less” and “food-less” people that will be damn happy to know that no raindrop will fall on his golden throne.

This is not intended to be another cynical critique to the holy Vatican City joint-stock company. I just get too pissed off when I have to hear this bulls***t on the news. On Italian news of course. Well, there should be some quotes around the word “news”, I guess.

Untitled post about wynona’s puppet

Coffee … break !
Originally uploaded by Christiane Michaud.

Sorry folks, I was lying. This post is not about wynona. I’m really really sorry.
I have spent the whole day trying to build an apache module using Qt and qmake so I have to blog about my success.

I know, the guys at apache (btw. I’m really impressed by their work) advise against writing C++ modules or linking shared libraries, but I’ll have to do that for a project I’m working on at Clickout Ltd. so we’ll have to discuss those issues some day.

Nevertheless, the traditional mod_helloworld buit with no hassle on windows but there was no way to make it work on Linux/GCC so I had quite some fun figuring out the issue. So, here is a quick tutorial :-)
Read more

Please click on the link below to re-activate your brain

the end of a day behind goli otok
Originally uploaded by Ĩolinica.

Somebody please tell me why most websites continue to send you the password right after you register to a website.
Now listen to me, please. That’s STUPID!! Did you get it? S T U P I D.

First of all, I know I have a bad memory… but I am still capable of remembering a damn password five seconds after some stupid web site asked me to enter it twice along with a dozen other useful personal information (where 99% of the users will just realize they have a brilliant imagination and end up filling the forms with nonsense).
Last but not least, I don’t f*** want my password to cross the whole web in plain text (yeah, somebody tell web developers thay mail usually travels unencrypted) along with my username and a link to the login page (why don’t we add my credit card number too?).

That’s weak. O____O

« Previous PageNext Page »