Wednesday, July 29, 2009

Stockholm - Day 1

Arrived to Stockholm Skavsta, a small airport southward, regular and convenient Flygbuss and Ryanair buses to centre, one and a half hour. The central station is huge, buses, trains, metro lines. We bought 16 tickets but used only 4, they were quite expensive (180SEK), we figured that our hotel is not so far from our interests and we don't mind walking.

At 18:00 we arrived to hotel Backfickan, a new, very clean one, own bathroom and toilets (that was a must) and for surprise we had a small kitchen corner but no pans :) After unpacking we headed to see at least few things around the hotel area. There have been two parks, small observatory, few churches, restaurants, pubs, empty streets.

Beach crawling Bratislava

A sunny summer tuesday the party starts after the work ends. We met at the T-Com beach at the Danube: nothing special, crowded, slow waiters, high prices. So the story in photos and short comments:

There are many girls and women, also men to hunt them...

As time passes and beers + mojitos pass, women get more attractive...

And with drinks the ideas come: let's visit the other two beaches! So we had to move on.

Only the lovers can stand the attack of mosquito troops, fortunately the lovely waitress offered us repellent

The last Mohican's at the third beach, too much mojito from now on

Time to get home, it's getting foggy.

Monday, July 27, 2009

Helyszinelok

Egy talan igaz - talan nem tortenet hazai helyszineloinkrol:

Ket rendor halottat talal:
- Te, csak par meterre van a korzethatartol!
- ?!

[... >-|o ...]

- [Radio] Fonok, nem a mi esetunk, korzeten kivul van.
[... megjonnek a masik korzet rendorei]
[Feszkelodes, helyszineles...]
- [Radio2] Fonok, gond van! A pasi lehet meg elt, visszamaszott a mi felunkre!

;-)

Thursday, July 23, 2009

Hecsedli

Mi? Hecsedli, csipkebogyo megszabaditva a magoktol, ebbol keszul a csipkebogyo lekvar. Most ertunk haza Stockholmbol, ott sikerult csipkebogyo dzsuszt inni ;) meg hoztunk lekvart is. Innen jott az elfelejtett tortenet is:

Anyum kapott regen hecsedlit, ekkor tudtam meg mi is az es fozott belole lekvart. Keresztapamek voltak nalunk vendegsegben es anyum adott nekik megkostolni. Keresztapam valoszinu nem figyelt mit kap, megkostolta: Hmm, latod Mari, ez a jo kecsup!

Kovetkezo napokban fogok igyekezni kivalogatni par kepet a kirandulasrol es folyamatosan megosztani valahol. A hetvege lagziskodassal telik majd, azert megprobalok valamit osszehozni.

Friday, July 10, 2009

C/C++ CreateProcess command line param problem

Back to some tech stuff, a simple task yesterday made me much headaches. I needed to run pdftk.exe from our program. I figured out the params and all worked as a dream. Let's implement it:
CreateProcess("pdftk.exe", "a.pdf b.pdf cat output c.pdf dont_ask", ...)

And it did not work. I failed to get any error, any output. Then I tried with cmd:

CreateProcess("cmd.exe", "/C pdftk.exe a.pdf b.pdf cat output c.pdf dont_ask", ...)

And it worked, but why? And I don't want the cmd.exe to be involved. I saw an example where program name was null:

CreateProcess(NULL, "pdftk.exe a.pdf b.pdf cat output c.pdf dont_ask", ...)

And it worked, ok, we got rid of cmd.exe.
WTF? The program name is null and the params, wait, command line!

The flexibility of the CreateProcess() function (and a possible point of confusion) arises when you pass a valid string pointer to both the ApplicationName and CommandLine parameters. This allows you to specify the application to be executed as well as the complete command line that is passed to the application. One might assume that the command line passed to the created application is a composite of the ApplicationName and CommandLine parameters, but this is not the case. As a result, a process created by CreateProcess can receive a value other than its .exe name as its "argv[0]" parameter. The following is an example of a call to CreateProcess that produces this "abnormal" behavior:
   CreateProcess( "c:\\MyApp.exe", "Param1 Param2 Param3", ...)
MyApp's arguments will be as follow:
  argv[0] == "Param1"
argv[1] == "Param2"
argv[2] == "Param3"
Read more about it here. Hope it will save you some time :)