…just another hippy blog

Software development, cold beer, photography and other high-caffeine, bikini powered, topics.

Archive for posts tagged with 'development'

PHP CSV Parser

Yoanna
Originally uploaded by …cathzilla.

Long time no posts, sorry, but I’m pretty busy working on a new website for movida, on movida itself and trying to have a life (that’s hard, duh!!).

I was looking for a nice CSV file parser in PHP (subliminal message: PHP sucks) and came up with Ming Hong Ng’s version. Nothing special, just a good old CSV parser but the code was good and properly formatted, so a great chance to be lazy.

I have added a few more PHP horror to provide alternative output modes that are IMHO more usable for non-androids: associative arrays and objects (PHP5 required for magical dynamic object creation © ®!)

Feel free to have a look at the source code . Don’t expect anything exciting. It’s a CSV parser in PHP (not even perl!) and not a movie with Charlize Theron! Oh man, I love that woman :D
Ok that’s all for today. Have a nice Wednesday evening, Wednesday night, Thursday morning, Thursday evening and well, you should be able to figure it out now.

I suppose I won’t be posting until next year as I’m moving to my parent’s home and to a good ol’ 56K dial-up.

So, I wish you a merry Christmas and a happy new year or whatever you feel you should call the next two weeks. Don’t eat to much cookies and.. oh what the heck! See ya the next time!

No comments

Gotcha!

growlingagainstgod
Originally uploaded by biscottiallozenzero.

I took myself another hour to complete the movida import wizard. Movies are now being actually imported and added to the current collection :-)
The movies you see in the screenshot below have been added using the wizard. I have just typed “.45″, selected the only “exact match” found on IMDb.com, then I have hit the new fancy “new search” button to enter a new query: “matrix”.

That’s all. Movie posters and all the information have been downloaded from IMDb.com and parsed using a perl script.

In case you are having some doubt, the posters will be imported in the collections persistent data directory and saved in the collection’s zip file. This way you won’t loose them ;-) First real import tests using the movida import wizard

Hope the code on the SVN is still building on both ‘nix and windows ^___^

No comments

(X)

Are you sure? Come on! Are you serious? Do you really want to quit the application and have a real life?

Lately I was looking for a way to disable that nifty little close (X) button on a window title bar. There is no way to do this using Qt code so I had to write my own platform dependant code.

This is the macro I am using on Windows:

# ifdef Q_OS_WIN
# include <windows.h>
# define ENABLE_CLOSE_BTN(Enable) \
{ QWidget* tlw = this; \
while (tlw && !tlw->isWindow() && tlw->windowType() != Qt::SubWindow) \
tlw = tlw->parentWidget(); \
HMENU hMenu = GetSystemMenu((HWND) tlw->winId(), FALSE); \
EnableMenuItem(hMenu, SC_CLOSE, Enable ? (MF_BYCOMMAND | MF_ENABLED) : (MF_BYCOMMAND | MF_GRAYED)); }
# endif // Q_OS_WIN
The macro can be used from any widget (e.g. a QWizardPage) as it will automatically look for the parent top level widget.
I still haven’t found a way to achieve the same on X11 or Mac OS X. Any suggestions? Anyone reading this blog? No? Rats, I knew that!

No comments

Goodnight


Originally uploaded by pphuang.

1.

I have been working with Eclipe/CDT and the Qt integration and it’s pretty cool.

Eclipse became my favourite Java IDE when I started working on a big Java project some time ago and, althought I still feel it is pretty slow and overbloated, I still like it.

The Qt integration works pretty well - even with complex Qt projects.
I could not manage to make it work with gdb yet but who cares… I have a buggy gdb so there is no way I can debug on Linux right now *___*

2.

Some disgusting “reporter” working for the second Italian national television, together with two rotten politicians (one from the left and one from the right side of the National Dump) were claiming that “television has invaded politics”. If you don’t know about free speech and freedom of information here in Italy, and about what is going on in these in these weeks (or rather years), then you won’t understand, sorry.

Nevertheless, this one sounds new to me. It’s almost better than comparing Beppe Grillo’s V-Day initiative to terrorism. Thank you Maurizio Martinelli, I love you.

3.

I hate it when I realize I have spent 1 hour finding a bug that is more stupid than an aubergine playing Peter Griffin.

Btw. I have fixed a couple of bugs in the movida import wizard and multiple movies are now being parsed (and previewed) correctly. Check out the SVN or the latest development snapshot on the website.

May the nabaztag/tag be with you.

No comments

Yet another step towards world domination

DAY BREAKS - Dedicated to Wans2pics
Originally uploaded by Wenspics.

The import plugin for Movida has made another small step.

I have updated most of the xsl/html template stuff and the final (well, ok, I will be adding another page, but until then this will remains the Last Page) page of the wizard is now showing a (buggy) html preview.

I have to fix lots of bugs (mainly because the XML has changed and the XSL files need an update so that the OMG customers coming from the USA can see the new KRPNSWHM features) but I’m happy with the results achieved so far.

Btw, I was thinking about supporting multi page responses (e.g. IMDb pages have some of the info on separate pages) but I will leave this out for now.
Btheotherway, I want movies to be searched on more than one search engine at a time but this is not possible at the moment.

Stand by for more hot chicks and bikinis.

No comments

« Previous PageNext Page »