Gary Teh
October 2009
M T W T F S S
« Sep   Nov »
 1234
567891011
12131415161718
19202122232425
262728293031  

Archive for October, 2009

Once again, I am using the easing funtion in the JQuery library to create some really cool animations this time for Genesis Motors.

I have been using this library for quite a while now for a few online projects.

Here are a list of some of them:

The latest project Genesis Motors requires that content be allowed to slide in and slide off stage.

Sample code

<script>
$(document).ready(function(){

$(”#side_bar_<?php echo $page->ID; ?>”).click(function(event){
//alert(curr_content);
menu_animation_active = true;

new_menu_slider_id = ‘#’+<?php echo $page->ID; ?>+”_banner” ;
//alert($(curr_content));

$(curr_content).animate({left:’-1200px’},600, function(){

$(curr_content).hide();

// Wait until the above has finished, then do the rest
//alert(new_menu_slider_id);
curr_content = new_menu_slider_id;
$(curr_content ).css(”left”,”1200px”);
$(curr_content ).show();
$(curr_content ).animate({left:’0′},{duration:500});

menu_animation_active = false;

});
});
})

</script>

Works fine with in firefox but not Internet Explore.

The problem is that when the current content slides out, even when the content is in the area it is not suppose to show, it still remains visible.

Trying hard to recall what I did the other time to solve the porblem I finally remembered. The trick to work around this is to add the following styling to the container that is holding all the sliding contents as well.

overflow:hidden;
position:relative;

Once you have added these two styles to the container, the Internet Explorer will know that this container is on the same level as the sliding contents within hence will restrict the contents from floating on an unattached z-index above the main layer.

I step home today after a long day at work outside. The place was empty, my parents were out, my brother was still at work. I was thankful.

Alena called in the afternoon. I told her I was busy, I was in the midst of a meeting with Linda a photographer from Russia then. Linda though Russian of Nationality seemed more of Mongolian descent, thanks perhaps to the legacy of Genghis Khan.

I met up with Satheesh thereafter to discuss about the hardware procurement we were working on, we stayed at Tiong Bahru till 9pm. He left shortly there after with Amba.

As the taxi left carrying Satheesh and Amba along. I stood there by the side of the road considering what to do next. The thought of squeezing with the rest of the home coming commuting crowd and then perhaps to a house with the television blasting away and the annoying lights blasting away was a major turn off.

I opted instead for the other option. Walking past a grocery store I bought myself a pack of cigarettes and started walking towards the near by park, perhaps for some peace and quiet.

I sat at the far edge of the park. facing away from the main walkway and lit myself a cigarette. Puffing away, I stared at the empty lots that was supposed to be the school field during day time. My mind wandered. Suppose the vacant lot remains but the buildings around it didn’t exist. Instead there were miles and miles of grass land stretching all the way to the horizon, the wind meanwhile gently blowing and howling. A desolate land untouched by human hands. That would have been the perfect place to be for some hiatus.

A cat came running from the open gates of the field then. Light of step, full of life and energy, it seemed happy with life until perhaps the next time it goes hungry. Unlike the cat at home, it knows no boundaries it was free. It trotted along the path beside the other runners, an equal.

A passerby came then to this little corner of the park I was occupying. This inexplicable sense of annoyance aroused within me. Being an overcrowded territory as we have here in Singapore. I had no other choice than to accomodated this unwelcomed presence. I felt like crying then. This fragile little desolate paradise I was building within my mind was shattered within an instance.

I left then slowly trodding towards the nearest MRT station. Standing at the platform awaiting the next train to arrive, I felt a deep sense of dread as I prepared myself for the next on slaught of crowd.

The train soon arrived thereafter, I step into the train and closed my eyes willing myself away from this reality to a far away place. More and more did I felt it was important. I had lashed out at an old man the other day in the train on my way home after a long night and it was deeply regretted. The fault was not his but the lack of space on trains nowadays, my lack of sleep and short fuse.

4 stops left… I momentarily returned to reality when the trained arrived at commonwealth station. I grasped in a lung of air and went back to my own world.

3 stops left… I considered Alena. I had texted while I was at the park asking what she wanted of me. She had replied nothing and asked we should meet tonight. I rejected her offer then.

“I am tired. I wish to be alone by myself” I explained.

“Alrite head home early love” she replied.

I stopped replying thereafter.

I wonder to myself sometimes, why was it that she similar to my mom thinks that it was weird and outlandish to choose being alone.

“You should be thankful I am around or else you would just be here alone at the park so bored and lonely. ” she boasted once when we were sitting in the park. Truth was I would have been more thankful had she not been around. With her or even any one by my side especially during those state of mind I was in would have only added to my level of agitation. My mind during those times would just be imprisoned here and now, when it needed most to be let free to wander and roam down the unknown space and time of the cosmic universe and alternate realities.

“Don’t you ever dream? ” I asked her a few nights ago while we were sitting in the void deck.

“I used to but not anymore ” she replied

“What happened? ”

“I finally realised it was impractical. ”

“What then were you dreaming of?”

“I used to imagine I was a princess or a being of another species. That one day I would fly far far away. Away from this place. It was just not realistic. i stopped dreaming then. ”

“No you shouldn’t because that is what really keep us alive. Dreams. Without them, we would just be machines, soulless.”

Typing away the lock to my door suddenly rattled. So be it! my family has returned so much for my personal space for thoughts. But it was definitely enjoyable for a while to be sitting alone in front of my computer with nothing but the night light on and Jazz music playing in the background.

Darkness, this none entity, I truly love it. It was really like a shroud, an impermiable membrane that separates me and the rest of the world, giving me space to create my own.

Soon if my predictions are correct, mom would step in the room and ask “why is the room all dark?” Thereafter against my protest she would switch the annoying flourescent lamp on and I will of course lash out at her. She is ignorant in this manner.

Sometimes I think to myself, if perhaps one day I do own a property of my parents would be most welcomed to visit once in a while but be definitely banned from ever moving in. Such a act would slowly but surely force me into the mental asylum in the long run.

I like my space as it is, the darkness and the imaginary world residing within.

I happened to chance across a post on Sammy Boy Forum last night. It was said there was actually a special massage parlour in Clementi Ave 2 area. It was just a few streets away from my place.

I got curious. It felt so strange that what normally happens in sleazy places like Geylang could actually happen in heartland areas like Clementi!

This afternoon after finishing my session at the gym, I decided to take a walk. I finally arrived at block 354, this is where commerce mainly takes place in this area.

I managed to locate the “Da Jie Niang Dou Fu” shop easily. The “Da Jie Niang Dou Fu” shop is a landmark which one of the members of the sammy boy forum posted.

I started walking down the main stretch of block 354. Upon detailed study, I realised there were actually three shops which looked quite suspicious. They were mainly located towards the end of the 5 foot way before it took a left turn. Out of the three shops two were empty while the first one was occupied by two PRC chinese looking ladies. I guess this must be the one. Having confirmed that this location that the members of the sammy boy forum posted was no bullshit but the real thing, I kept on walking down the 5 foot way and took the left turn.

It was not before long that i chanced upon this really eriee looking shop. I stood outstide trying to figure out what this shop was supposed to sell, when the proprietor of the shop beside that one told me to speak to the owner.

Apparently this shop is run by Shaiful. I wonder if he is related to the first shop keeper that talked to me.

This Shaiful is a pretty interesting character. His shop has been around for the past 5 months. He apparently runs tours to places around Southeast Asia to sites that a supposedly haunted.

Seems like his next trip is happening on the 9th this month to Vietnam. This whole thing seems pretty bazairre and interesting. If you are a really interested to find out more about his trips just head down to location stated here on Things To Do Singapore

His website is still under renovation, it is www.soulhunterz.org. I wonder when he would get it up. But I am definitely looking forward to it.

The later half of this years sees the multiple eastern parts of the world affected with water element based natural disaster.

Flooding in Taiwan (Water)
Flooding in India (Water)
Tsunami in Samoa (Water)
Indonesia (Earth and Water)

I wonder how true it is but some one even told Alena that she should change her name to remove the water elements in it, or else more bad fortune awaits.

I wonder if any Feng Shui Master could do any fortune telling with regards to this whole series of Water Element Disasters.

Recently I have been building a lot of wordpress sites. Mostly I start building them on my local testing server. Thereafter when all the developement and testing has been done, I will migrate them to the live servers of clients.

here are the two normal things to look out for when doing migration of wordpress sites for them to work properly in a different server

First place to look at is the wp-config.php file

You need to change the following

define(’DB_NAME’, ‘your_database_name’);

/** MySQL database username */
define(’DB_USER’, ‘your_user_login’);

/** MySQL database password */
define(’DB_PASSWORD’, ‘your_user_password’);

/** MySQL hostname */
define(’DB_HOST’, ‘localhost’);

The localhost might be something depending on the configuration of the live server.

Next you need to do some changes in the wp_options table

Change entry option_value with corresponding option_value upload_path” to the root path to your wordpress installation.

To find out the root path simply create a php file with the following syntax and dump in it to the root folder and run it.

<?php
$p = getcwd();
echo $p;
?>

Hopefully this is helpful

One of my cousin just came back from China, apparently before she came home the locals gave her a bag of walnuts. My cousin’s family having no idea how to eat walnuts decided to give it away. So it ended up at our place.

There it sat on my dining table. Until of course, who else but Alena caught sight of it. Hence the walnut eating campaign started. There she sat with my mon on the dining table, the of them started cracking and munching away.

I got curious so I decided to join them after a while. Apparently these walnuts could be categorized into two groups. Those with smooth surfaces and those with not so smooth surfaces.

All the while just picking the first one off the top my fingers could get on, I picked out the smooth ones. They cracked easily.

It was until a few walnuts later that I chanced upon this particular walnut with very very textured surface. It looked almost like a piece of art.

“Yummy “, I thought to myself “I wonder how this one tastes like.”

Hence I put it under the nut cracker. It wont bulge. Despite having applied the same pressure as I did the others. It was a tough nut to crack.

I guess it does require some science to crack this particular nut. Taking it out from the nut cracker, I examined the nut in closer detail. After some long and hard thinking process, I concluded it was best to crack it in the middle where the fault line was.

Through indeed it cracked, however that was not the end of this nut cracking campaign, the flesh was so well protected by this tough out husk that it required more subsequent cracking before one could get at the flesh.

Haha, funny how come a simple walnut eating experience could turn so scientific so fast.

I am currently helping Satheesh source for digital photoframes which allows for touchscreen as well as open API programming. Apparently after exhausting all the search results over Google, I realize there are actually none in the market. Ouch!

It seems while smaller gadgets like Iphone and the Android phone offer these functions, most currently existing gadgets don’t. I suddenly got me thinking, what is the possibility of assembling one such hardware, the corresponding operating system and the specific software that allows this functionality.

Perhaps Google or Microsoft might discover this as an interesting untapped market and build a light operating system for this. Then again perhaps not, in the case of Google.

I think the installation of a Linux box on such a system might work. Then again it leaves me thinking of the hardware aspects of it. Well that really is foreign territory then.