age++;
Not busy?
It’s surprising how I only have few tabs opened during weekends compared on weekdays where I have more than a dozen and more than 2 windows opened. It’s also surprising that I’m taking the time to write about it, too.

Quick update 2
The guy who owns this site is busy and lazy to post. He just logged in today and updated WordPress to the latest version. That’s all.
Adobe Flash player update installation 2
I always notice things, even unimportant ones. Today, I noticed Adobe’s flash update installer. When updating a software you usually see the word Install once and after that you only need to press Next and Done. For Adobe, showing the Install button once is not enough, they show it twice. It’s not a problem really, but I’m guessing or probably the first Install button should indicate a Download button because clicking it doesn’t install the update, it downloads it and then installation happens. I took some screenshots of the update process and it shows that I may be correct with my guess.
First one says install:

The next one which happens after clicking the “Install” button is actually a download:

Next one, there is another “Install” button, this time it’s the real one:

Last one, installation is completed:

See what I’m saying?
Windstruck 1
It’s probably the saddest movie I’ve ever watched. It’s so sad I had a teary eye, I really felt it. Srsly. It’s korean and it’s good. There are funny parts at the beginning but through out the movie it’s all sad. Get yourself a good sad movie, I recommend it. After watching, this song should remind you of the movie.
Watch the movie and then watch this another movie as they have some connections.
PHP session not persistent after server migration
Nerd Talk
I remember when we setup an Apache web server to move from Lighttpd, after we installed PHP we just copied over the same php.ini file to use the same settings. During testing I had a problem with sessions not persisting between pages, it was a pain to realize the problem at first. The cause of the issue is with the session.save_path, since we just copied over the old php.ini file, the folder path set to where the session should be saved is, well, not existing. I created the folder, the session folder, set write permissions and sessions are flying across pages!
You can find the session.save_path directive in /etc/php.ini and check out where sessions are saved, ex:
session.save_path = "/var/lib/php/session"I believe it’s not the best practice to set 0777 (means everyone can read/write) permissions for the sessions folder as other users of the server may be able to hijack session files so be careful on this.
Literally, this is the song that played on my head when things started to work. It’s one of my childhood anime song. Watch and listen to this!
I’m eating bacon and rice for breakfast right now, btw. Just saying ;p
Exclude svn folder when copying files to another location
Quick Tip
Copy files from an SVN folder to another location and excludes all .svn folders. This copies files from the source to destination recursively, -r.
rsync -r --exclude=.svn /path/to/source /path/to/destination
More about rsync here.
Added to wishlist 2
Apart from wanting to buy a Nintendo 3DS, I also want to buy a DSLR – Nikon D3100. I’m hoping to buy either one of the two this year.
And for today, a random image of Lucy going nuts! xD

Image of the day 1
Anime time!
I don’t have any new animes to watch lately so I’m re-watching one of my favorites, Fullmetal Alchemist Brotherhood! There are really a lot of funny moments all through out series which is why I don’t mind watching it again. Today, I find this one particularly funny when Ed was asking Al and Winry why Al got rejected to be Winry’s wife, Winry said “I don’t want a man shorter than myself” which kinda lead to this picture of them XD

Ed and Al always had a talk during their childhood about who would take Winry as a wife.
New year folks!
Alrighty, it’s a brand new year so I guess I have to put in a post. I actually wanted to post yesterday, first day of the year, but..I was kinda busy doing stuff like eating, reading on StackOverflow, watching animes and K-Pop. Been messing with Ubuntu as well (using a virtual box) so I haven’t really planned anything yet, however, no promises but I will try to post more this year
Happy new year to you, dear readers! I know my visitors are mostly robots and spiders, though. And also, watch this if you’re not a robot or a spider
array_count_values for float values 1
Nerd Talk
array_count_values function in PHP can only count integer and string values. At some point you may need to count occurrences of float values in an array but you can’t because array_count_values won’t let you. If you have an array like:
$digits = array(14.5, 5.42, 1.5, 8, 14.5); $digits = array_count_values($digits);
This will give you a warning that says, Warning: array_count_values() [function.array-count-values]: Can only count STRING and INTEGER values!
There’s actually a hack to get around this and achieve counting occurrences of float values. All you need to do is cast all float values in the array as string. array_count_values can also count integers so why not just cast the values as int? You don’t want to do that because casting the float values as int will change the data type to int but also remove the decimal points in your values and make it a whole number. Take this as an example:
$float = 12.8; var_dump($float); // float(12.8) - original float value var_dump((int)$float); // int(12) - becomes whole number var_dump(intval($float)); // int(12) - becomes whole number var_dump((string)$float); // string(4) "12.8" - string type
Based on the example above we need to cast the float values as string. So in the case of the array that we want to count the values, we need to do something like:
$digits = array(14.5, 5.42, 1.5, 8, 14.5); $newDigits = array(); foreach($digits as $key => $value) // cast float as string if(is_float($value)) $newDigits[$key] = (string)$value; // for actual int and string values else $newDigits[$key] = $value; $countValues = array_count_values($newDigits); print_r($countValues);
The above code will cast all float values in the array as string and array_count_values will work as expected. The output will be:
Array ( [14.5] => 2 [5.42] => 1 [1.5] => 1 [8] => 1 )
Hope that helps!
age++;
yep, just like all incremental variables in programming our age does increment. This time it’s my age’s turn to add up. It’s been a crazy whole year since my last birthday, nothing has changed I’m still me, I’m still busy but I like it. Looking forward for another exciting and challenging year! +100 points to God! ^_^
Destination: Nagsasa-Anawangin
Friday night (Nov. 19) me, 4 photography enthusiasts (Alvin, Jap, Myrbs, Jason) , and Teresa (who wants a get away experience) set off to San Antonio, Zambales to start our most awaited trip before the end of the year. After 4 hours of bus ride and an hour of boat ride at the dark sea we arrived at Nagsasa Cove just in time before the sunrise. It was a great start seeing the sun rise from behind the mountains and as the sea becomes clear and turned blue. Everyone was so busy looking around the place taking pictures. Not a single minute is wasted as my photographer companions are so excited to take a shot of every good angle of the place including me using my cheap lousy digital camera. There’s no electricity, no cellphone signal, no internet, and nothing to eat except for the canned foods and snacks that we bought before hand. We camped eating just canned corned beef, fried and dried fish, and salted egg with chopped tomatoes. We started a bonfire, roasted marshmallows, take shots of vodka and called it a night. The next day we sailed again going to Anawangin which is the last destination for our trip. We got there early before 7 in the morning and started trekking. We reached the top and took some pictures and then headed back to the beach to take more pictures. Did I ever mention that we never really spend our time swimming? Yes, we never swimmed. Most of our time is spent taking pictures, my companions are so in loved with their cameras and doesn’t want to miss a single spot, lol. But it was cool. Overall, it’s one hell of a trip. I got some scratches and sunburned a bit but no complaints, I had fun. I wish there were more people who joined us, though. Right now I’m still waiting for the pictures and will put up a link when they’re available.
Here’s a photo from Jap Salem, photographer and programmer (zomg) who lives in the same place where I’m staying in Makati. This is definitely one of my fave shot because I’m in it ^_^

Guess what?
Despite my horrible work schedule and unusual busyness I still have a “social” life after all. Glad I’m still able to hang out with some friends and have fun. Oh, did I mention all of them were girls I hanged out with? Awesome! And also, I need to find a girlfriend soon – added in my ToDo list.
