Saturday, April 16, 2011
Linux Mint 10
Open Terminal.
Run the following command - sudo apt-get install wine
Right Click on you program .exe Open with WINE Windows Program Loader
Monday, August 16, 2010
How-to-create-datasource-in-tomcat
Keep all the Spring libraries in D:\apache-tomcat\webapps\SpringWeb\WEB-INF\lib
Copy the JDBC Connector library in D:\apache-tomcat\common\lib
I first created a datasource on tomcat.
Modify the D:\apache-tomcat\conf\context.xml file to include this tag.
< resource auth="Container"
driverclassname="com.mysql.jdbc.Driver"
maxactive="100" maxidle="30" maxwait="10000"
name="jdbc/HWMD_DS"
password="pratik"
type="javax.sql.DataSource"
url="jdbc:mysql://localhost:3306/HOW_WAS_MY_DAY"
username="pratik"
/>
I am using plain JDBC with Spring to connect to the database.
This is how the Spring configuration file will look like.
< beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans" xsi:schemalocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
< bean class="org.springframework.jndi.JndiObjectFactoryBean" id="dataSource" scope="singleton">
< property name="jndiName" value="java:/comp/env/jdbc/HWMD_DS">
< property name="resourceRef" value="false">
< bean class="org.springframework.jdbc.core.JdbcTemplate" id="jdbcTemplate">
< property name="dataSource" ref="dataSource">
< bean class="dave.spring.dao.JdbcRantDao" id="rantDao">
< property name="jdbcTemplate" ref="jdbcTemplate">
This Spring configuration should be in application classpath. ie
D:\apache-tomcat\webapps\SpringWeb\WEB-INF\classes\myapp-dao.xml
Monday, November 09, 2009
Thursday, December 21, 2006
Sreesanth's Vendetta
| This is the # 10 batsman Sreesanth, of India, responding to the South African Andre Nel's comment "Man, just don't swing your bat, have a heart to hit the ball", by hitting the very next ball for the maximum six runs and by showing his "heart" in front of Nel's face. | |
Monday, December 18, 2006
What did you do "Sir Allama Muhammad Iqbal" ?
सारे जहाँ से अच्छा, हिन्दोस्तां हमारा|
हम बुलबुले हैं इसकी, यह गुलसितां हमारा||
गुरबत में हों अगर हम, रहता है दिल वतन में|
समझो वहीं हमें भी, दिल हो जहाँ हमारा|| सारे...
परबत वो सबसे ऊँचा, हमसाया आसमाँ का|
वो संतरी हमारा, वो पासवां हमारा|| सारे...
गोदी में खेलती हैं, जिसकी हज़ारों नदियां|
गुलशन है जिसके दम से, रश्क-ए-जिनां हमारा||सारे....
ऐ आब-ए-रौंद-ए-गंगा! वो दिन है याद तुझको|
उतरा तेरे किनारे, जब कारवां हमारा|| सारे...
मजहब नहीं सिखाता, आपस में बैर रखना|
हिन्दी हैं हम वतन हैं, हिन्दोस्तां हमारा|| सारे...
यूनान, मिस्र, रोमां, सब मिट गए जहाँ से|
अब तक मगर है बाकी, नाम-ओ-निशां हमारा||सारे...
कुछ बात है की हस्ती, मिटती नहीं हमारी|
सदियों रहा है दुश्मन, दौर-ए-जहाँ हमारा|| सारे...
'इक़बाल' कोई मरहूम, अपना नहीं जहाँ में|
मालूम क्या किसी को, दर्द-ए-निहां हमारा|| सारे...
Translation
Better than the entire world, is our India;
we are its nightingales of mirth, and it is our garden abode
Though in foreign lands we may reside, with our homeland our hearts abide,
Regard us also to be there, where exist our hearts
That mountain most high, neighbor to the skies;
it is our sentinel; it is our protector
In the lap of whose, play thousands of rivers;
gardens they sustain; the envy-of-the-heavens of ours
O waters of the Ganga mighty, do you recall the day
when on your banks, did land the caravan of ours
Religion does not teach us to harbour grudges between us
Indians we all are; India, our motherland
While Greece, Egypt , Rome have all been wiped out
till now yet remains, this civilization of ours {it has stood the test of time}
Something there is that keeps us,our entity from being eroded
For ages has been our enemy, the way of the world
Iqbal! Is there no soul that could
understand the pain in thy heart?
Ironically, Iqbal is also credited with being one of the earliest proponents for a separate nation-state in the Muslim majority areas of the sub-continent, an idea which led to the creation of the state of Pakistan
Tuesday, November 28, 2006
World's First Brand Visible From Space
| KFC's New Logo Visible From Outer Space "Kentucky's Fried Chicken" | |
Sunday, November 12, 2006
CAT-2006
Actor : Amitabh Bachchan
Dialogue : Aaaj itni sharaab nahi maikhane mein, jitni hum chodh diya karte the paimane mein.
SIMILE
CAT-2002(165 questions)
CAT-2003(150 questions)
CAT-2004(150 questions)
CAT-2005(90 questions)
CAT-2006(75 questions)
On the day of CAT-2006 :'(
Aaj itne questions nahi is paper mein jitne hum chodh diya karte the paimane mein.
Saturday, October 21, 2006
Happy Diwali
While the Sun tried to wake up the hypersomniac through their pellucid curtains, he would be on his toes out there in the streets. You cannot differentiate between his clothing and his sac. His sac appeared as small tangled pieces of cloth stitched together. A new piece of cloth making up the chasm in his trouser was his only privilege. His ailing father lay in his bed from the last 12 months suffering from tuberculosis.
He can be considered next to lord Vishwakrama-who created the whole city of Dwarka in only one night. His mission CLEANLINESS - picking the dingy things, making the street cleaner, as if no one threw anything out of their own house. How nice a theory of relativity where one's life is directly related to his hardship. Most of the people today try to rule out this relativity every single second.
The whole city engrossed in the Diwali celebration, LEDs and diyaas lightening every single building. Fire Crackers worth crores of rupees sparkled all around. The remains - smirch on the roads, tiny-tiny bits of paper scattered all over the road and billow of smoke into the air.
The explosion of firecrackers, rising of smoke made the old man disquiet. "Just one day", he said to his coughing father. The day after, his father was to receive treatment.
The next morning, following his monotony, the boy flinging the sac on his shoulder hurried onto the street. The whole street turned up as mess, it took him 3hours - so that to confuse the people whether they really enjoyed the last night. He thought of evading his duty to hurry back to his father, but he rightly followed his theory of relativity.
He returned home, his father was emptying the oil from the sputtering lamp to light up a diya. He lobbed the sac into a corner. “Lets go Dad”, he said to his fresh looking father.
The hospital was teeming with activities. A philanthropist had assumed the responsibility of treating few of the suffering destitute. They waited for their turn.
Thursday, September 28, 2006
Brief History of British Expansion in India
In 1845 the Company managed to extend its control over Sindh province after a gruelling and bloody campaign (of Napier's 'Peccavi' fame). In 1848 the Second Anglo-Sikh War took place and the Company gained control of the Punjab as well in 1849, after the British India Army won a hard-fought victory against the Khalsa Army, who were betrayed by the Kashmiri Dogra Ministers Lal Singh and Gulab Singh (who were not Sikhs). To show their appreciation the British made Gulab Singh the Maharaja of Kashmir which was part of Punjab. In 1853 the leader of the Marathas, Nana Sahib was denied his titles and his pension was stopped.
In 1854 Berar was annexed into the Company's domains. In 1856 the state of Awadh/Oudh was also annexed by the Company.
Thursday, July 20, 2006
Emotions, Celebrations Classified
The winter had just bid adieu and the summer was setting, but it was making an instant mark and within the fortnight the hotter days were being experienced. It was March 14, 2005. It was my daily chores to drive to office with a long ride on my scooter and glancing around. An unusual traffic was rocking the road that day.
So I lost the first day mainly manipulating the traffic and making interpretations and finally reaching the right reason. Yes, the Gujarat Board Examination had commenced and the aspirants were rushing to the their examination centre.
The second the day I drove cautiously and watched every movement on the road. A man in his 40s, 3-4 days grown beard, and dampened wear out was driving his scooter and in the sidecar attached was his son. As he drove his son to the examination centre, the son was comfortably having a final glance at the syllabus he had been through the whole year of study. For his every single comfort there was a necessity sacrificed. The man kept his mind driving through the traffic jam but his heart was busy praying for his sons good performance in the examination, while his son with his head down in the book so that he will not miss even a single word unread because he wanted his father to be proud and happy to see his son excel in the exams. So their eyes were never on the line of sight but their hearts were reciprocating every single second. I too joined them in their endeavor with my only prayers and wishes.
Big cars on the busy street. Chevrolet constantly irked the two wheelers with its cacophonous klaxon. While it was passing me, I couldn’t stop myself from staring at the chauffer. Behind the chauffer, the boy stretched all over the rear seat busy reading. Undoubtedly he too was appearing for the board examination. The father was busy with his business meetings and it may be the case with his mother, but the father made all the necessary arrangements and even few luxuries for his son to appear for the examination.
Guess what!! It was April 1, 2005, 7:30 PM, was on the way to a library. A scooter with it sidecar carried a perfect Indian family. Patriarch driving the scooter and Mom was sitting behind him with balloons in her hand. In the sidecar the son and his younger sister were waving balloons and playing some sort of musical whistle with a mouth organ. It seemed they were overwhelmed and were on highest point of ecstasy. Seeing them merry making, a smile crossed my face, and it was in a flash that my memory system produced the results. So there was only guess left to be made: that the result were out and the son came out with flying colors.
As I drove ahead I also recalled that Chevrolet, and was thinking what that family might be doing. Hopefully my mind thought positively and pictured them in a five star hotel having a grand dinner in celebration for their son's success.
Monday, June 12, 2006
Bad & Irresponsible
I was 21 and doing graduation,
I was a RESPONSIBLE MAN of 44 and quit smoking,
I am 72 now, having insurance but no work,
Sunday, June 11, 2006
And Fools Are Those Who Die
"WE all are an 'X' in an indeterminate Equation. (An indeterminate equation is one which has infinite solutions for x)
"You have to get rich in the dark...you have to live with percentages...forget about luck, that's a very treacherous magic"
'AND FOOLS ARE THOSE WHO DIE'
If your genes didn't showed up this time, its one of the reason that inspired me to write this.
Wished it got popular as "Catch 22", and hope there is no CATCH in here.
My Words
Doctors are sluggish GOD, they know i drank last week.
She pulled me on the path of LOVE. I felt the sand made wet by the tears of previous walkers. I took a detour and met her at the MARRIAGE junction.
I am just engaged and I have stared respecting my father more than ever before.
It should rain 'Hot Soup' before the actual rain starts.
Friday, June 09, 2006
I am Blessed
didn't have too many toys to play, to keep me away from mom,
I was blessed.
Dad didn't have a big estate with too many rooms,
or different one for me, to keep away from him,
I was blessed.
Mom isn't a celebrity, Dad ain't a business man,
They are still calling me for a breakfast while i am still in bed,
I am blessed.
Didn't show talent at schools,
was a dull student, they didn't think about sending me to Harvard,
too far away from my old town,
I was blessed.
Didn't came across thunderbolt in college to fall in love,
had an arranged marriage,
she is still with me, an old man living his last days of life,
I am blessed.
Tuesday, June 06, 2006
Philo-aunt
At one of the crossroads on the sherkhej-gandhishire highway a COP stood under the covers facing gandhishire. His rapid hand signals controlled the traffic effectively. To the forward left was ISKCON temple which always had plethora of devotees dropping down every minute. To the forward right was Cadila Pharmaceauticals. Behind him to the left and right were Big Bazar who showed a sales of 2 crore on Sunday, thanks to the policy of Kishore Biyani and the multiplex Fun-Republic respectively. Just 2 minutes passed after our to be heroes made exit.
They passed ISRO, the heavy machinery rose above the 20 ft. fence wall and drove down the Jodhpurshire, a small plateau covering an area of 1 sq km. and 30 ft. above Shivranshire. Riding straight through Shivranshire and Nehrushire they reached College of Diploma for Girls, taking right they were now in front of NID. Maintaining the track, ascended the Sardar Bridge. Sanjeev was driving Sarat's pulsar, after Sarat expressed his desire to drive Bhavanlal's scooty. Bhavanlal prefered his safety to an exotic drive and choose to be a pilion to Sanjeev. Pulsar would shift swiftly between the gears to hold off the aptly manoeuvered scooty. The strategy was to kill the traffic and rapidly move to a less dense traffic and wait for the scooty and then again move on neck-to-neck. Descending the bridge they waited at the Jamalshire cross road signal. The Kankaria lake lies 3000 mt. north-east off Jamalshire. Traveling east straight for 2000 mts, they will reach their Jawahar Street.
Clamor of the teeming vehicles at the square pumped adrenaline level and no sooner the signal turned green the pulsar galloped like a unicorn and went straight into the north-east street narrowed by the illegal extension of the houses built. In the meanwhile the spry mind advised Sarat to manoeuvere the scooty and take 100 mts. north and then west to meet Sanjeev at the intersection. Sanjeev and Bhavanlal got struck in a terrific traffic jam in the narrow street. Unaware of the situation, Sarat was sure he was behind pulsar with his crawling scooty. So he drove straight to Kankaria lake and waited for Sanjeev. From 10 to 20 to 30 minutes his anxiety grew. Showing some intelligence to reached his home. But he was worried about his friends. Sanjeev and Bhavanlal didn't have the smallest idea that Sarat have escaped the traffic and was ahead of them. They went to-and fro from the narrow street to Kankaria lake in search of him. One hour passed till our heroes got sidetracked.
From Kankaria Sarat's and Bhavanlal's home were equally distanced, but in opposite direction. Seperated by 1000 mts. Sanjeev dwelt so that 3000 mts. Distanced from Sarat and 4000 mts. From Bhavanlal.
Sarat had two options. First to visit Bhavanlal's home to see whether he and Sanjeev have reached there, and if not he would hand over the keys to Bhavanlal's mother. Second, to call up Sanjeev's mother at home and inquire whether they have reached there. But if he failed in both the cases, he would put both his aunt into worries. So he canceled to implement any of his above thoughts. Same danger shadowed if Sanjeev called up Sarat's mother. So they canceled to call the others home (one's aunt).
“We have an idea“ yelled Sanjeev. So Sanjeev called up his mother and narrated their bad luck. The narration put his mother too into worries about Sarat. As instructed Sanjeev's mother called up Sarat's mother as if she knew nothing about what happened and asked : “Its 8:30, have the boys returned. Its too late now”. Sarat was standing just next to his mother. But she quickly deciphered Sarat's gestures and denied about any where abouts. She consoled her by saying that they would be returning in half and hour.
This time when Sanjeev called up his mother he concluded that something is wrong with Sarat and that is the reason he has not reached his home, also they were not able to find him. The exact clone of thoughts crossed Sarat's mind, that something is wrong with Sanjeev and Bhavanlal. But the irony was, all of them were safe.