Wednesday, April 7, 2010

index

The home
Technical
Travelogue

Wednesday, March 31, 2010

JS-Blogger-Client: inserted post

This is the body of the blog post. I can include HTML tags.

Tuesday, March 30, 2010

JS-Blogger-Client: inserted post

This is the body of the blog post. I can include HTML tags.

Monday, February 15, 2010

my first bike trip

When the whole world is busy with Valentine's Day celebrations, we two (me & Shivaji), Ek Niranjans, decided to go for a road trip. Since we have to travel on bike, we restricted ourselves to a radius of 100km from Hyderabad. We choose to go to Sri Anantha Padmanabha Swamy Temple which is near Vikarabad. One of my friends(Sangameshwar) hail from vikarabad, and he is set to go U.S.A on the same day. We wanted to give him a surprise visit.We slowed drove through the lanes of Hyderabad, as usual busy with traffic, and moved towards the main road which takes to Vikarabad. I have been driving the bike for more than three years, but never had been on bike road trip(by the way i had a very big car trip), so it was fun all along.Road was good, four lanes in some parts and two lanes in most of the part.When we were about to enter vikarabad, we tried to reach Sanga, but someone in his house has said that he is in a school. Shivaji then remembered that Sanga's father works for Nagarjuna School, so we were in search of Najarguna High School. When we went inside the school campus a function (Felicitation for Mr. Nagabhushanam Garu) was going on. Shiva then remembered that Mr Nagabushanam Garu is Sanga's Father. We started to search for Sanga. We were able to find Sanga in the first row, busy taking pictures. We calmly went and said hai to him, he was very much surprised to see us in his home town. We stayed there till the function completed, met few Sanga's schoolmates,who advised us to go Kotepally Vagu also. We finished our lunch and headed towards the temple. Temple was not a big one, we had dharshan and then headed to Kotepally. Road was good with awesome surroundings. Finally we reached the Vagu, we spent sometime around and we were on our way back to Hyderabad.
Me at Kotepally Vagu
Ex-IITians in Vikarabad(Shivaji, Sanga & Me)
Shiva playing with water

Friday, August 1, 2008

Referring spring beans in struts action

While defining beans in spring's applicationContext.xml, if we need a bean's reference(ClassB) in another bean(ClassA), we will do the following.

1) Define a variable of ClassB in ClassA
2) Setters for the variable.

3) following beans in applicationContext.xml
<bean id="beanB" class="ClassB" > </bean>
<bean class="beanA">
<property name="varname" ref="beanB" />
</bean>

But in struts action class you can avoid <property name="varname" ref="beanB" /> by simply setting struts.objectFactory = spring in struts.properties, though you should decrale a variable with the name beanB (defined in applicationContext.xml) and should have setter for the same variable.

If your application doesn't have struts.properties, create a new struts.properties and keep it in the classpath

Img tag onLoad function problem in internet explorer

Few days ago i had a problem with onLoad in img tag in ie. Interestingly the same code works with firefox. Anyway i found the solution that works both browsers.

Below is the code that should display(load) the google image and then enable the button.

<html>

<head>
<script type="text/javascript">

function loadImage(){
var div1 = document.getElementById('imgdiv1');
var img1 = document.createElement('img');
var attr = document.createAttribute('onLoad');
attr.value = 'onLoadImg()';
img1.setAttributeNode(attr);
img1.src='http://www.google.co.in/intl/en_com/images/logo_plain.png';
div1.appendChild(img1);
}

function onLoadImg(){

var subBut=document.getElementById('flag');
subBut.disabled = false;
}

function onLoadFun(image){
loadImage();
}
</script>
</head>
<body onLoad='onLoadFun()'>
<div id="imgdiv1" ></div>
<input type="submit" id="flag" value="Disable" disabled="true"/>
</body>
</html>


This works fine with firefox, but in ie button is not enabled, which impiles onLoad function is never got invoked.
But a small change worked well for both the browsers. Instead of providing the onLoad function name, assign the reference.

attr.value = onLoadImg;

Thursday, February 14, 2008

My Goa Vacation

Been to Goa last Saturday, for my best friend Amar brother's marriage. Since goa is an excellent place for vacation we(myself,amar) extended our stay in goa by 3 days. Marriage & Co happened on Saturday and Sunday(9th and 10th). I have donned the role of photographer during the marriage. Since we had time of Saturday evening, few people from our group went to Colva Beach. Had fun in the beach, though it was a bit cold out there. Marriage happened on Sunday morning, at a temple in South Goa. Then after lunch to moved to Hotel MonoSanthi. In the evening we went for cruise trip, where there was traditional Goan Dance and also disco. Went to the stage when we were called. (Kids, Couples, Gents, Ladies were called separetly). Though we were on water for 1hr. we hardly noticed as we were enjoying the music along with dance. Monday, we went to visit some of the popular churches in Goa. Now i don't remember all the names. But in Xavier Church, body(corpse) of a priest by name Xavier is kept in chemicals, as people don't want to destroy person's body who as done good to people. But one hand is cut and taken to Rome, his birth place. In the afternoon, after lunch we left for Angana Beach. Not much at Anjana Beach, there is a fort beside the beach. So spent very less time, taken few snaps. Then we left for Colungute beach. People in Goa call Colungute beach as "Queen of Beaches". Played vollyball for sometime in the sea. Then i went for parag and motor boat. We enjoyed a lot and for me para-griding was the highlight. Tuesday, all the family members(amar's) along with the newly wed couple left to Hyderabad in the early hours. We took a rented bike for two days. First we went to Aguda Fort and Aguda Jail. In the fort we have seen a woman who was gorgeous, and we took few snaps of hers. We though that Aguda Jail was an ancient jail and now a place for visit. But to our surpirise it is still a jail with prisons inside. So we took few snaps from outside and ran away. Later after lunch we moved to Baga beach, where we had treat for our eyes. Foreigns were mostly in 2 piece bikinis and competing with them few indians were also in short dresses. It was an excellent place for eye-feast. In the evening we had body massage in Kerala style. Though it was for the first time. It was good, not bad, just okay. Wednesday, we planned for the evening departure. And left to Baga Beach for shopping. Did shopping for 3 hrs. Had lunch and we moved to airport in Vasco which is 33 kms from Panaji where we stayed. By 4:30pm we were in airport and reached Hyderabad at 7:00 pm