Monday, December 13, 2010

வாழ்த்துக்கள் பல....!

""" காதல் திருமணத்தில், மணமக்களிடம் """

பாராட்டுக்கள்..
சாதனையாளர்கள் உங்கள் இருவருக்கும்!
சாதி வேலிக்கம்பிகளில் ஒன்று
சற்றே நெளிந்திருக்கிறது உங்களால் இன்று..!

பரிசுகள்..
காதலர்கள் உங்கள் இருவருக்கும்!
இது என்ன
புதுவகை புன்னகை இருவர் முகத்திலும்
அது நாணமா? இல்லை காதல் வெற்றிக்கு
இந்த மண்டபம் தந்த பரிசா?
எதுவாயினும் பத்திர படுத்துங்கள்
அழகாய் இருக்கிறது உங்களோடே இருக்கட்டும்..!

வாழ்த்துகள்..
புதியவர்கள் உங்கள் இருவருக்கும்!
நேற்று வரை ஒற்றுமைகள் காட்டி
உங்கள் வேற்றுமைகளை மறைத்து பூட்டி
வைத்திருக்கும் காதல்- திருமணம் இனி
வேற்றுமையும் திறந்து காட்டும்..
உயர் பொறுமை காத்து,
விடுதல் விடா இருப்பின்
நீங்கா ஆனந்தமும் தாழா கீர்த்தியும்
இல்முன் என்றும் காத்து நிற்கும்..!
வாழ்த்துக்கள் பல....

Monday, September 20, 2010

Ride in ECR..

Today morning when i got up my bed and thought about the day I felt bored and thought of travelling somewhere around Chennai. As most of my friend have gone to their native places, I was not sure how the travel would be, a lonely drive is always tough in any case. But I felt there must be something interesting and decided to start by afternoon. Among the list of places around Chennai, I felt Mamallapuram through ECR should be the place to visit and read about various places around Mamallapuram before leaving home. By 2.30 pm I started from my home carrying a water bottle in my bag and a camera. While leaving my home itself I was very sure that the trip would be an interesting and joyful one as it was actually. Within 20 minutes I hit the ECR. The ride in sea breeze was awesome. It was very wonderful and I was very thrilled to enjoy the rest in my path. The traffic was bit worry till Mayajaal because of Vinayagar Chathurthi Oorvalam and after that I was able to drive bit freely hitting 80 Km/H. After crossing the city, I had a tender coconut and faced a board saying 39 KMs to reach Mamallapuram. After crossing Muttukkadu Boat house, I wanted enjoying the scenary than racing so was steadily riding in 50Km/H.

I was attracted by a solitary palm tree on the banks of back water lake. The path from road to that place was very dirty and tough but I decided to spend sometime there. It was really a nice place. On the other bank of the lake there was a resort and the view from my side was great. I tried capturing that but to my camera's eye it didnt look nice. Then welcomed by the hands of silver oaks on both sides of the road. I thought of spending sometime there but couldnt as they were all occupied by diffent groups of people all consuming liquor and all. So saying bad luck to me, I continued my ride and halted in a Tourism dept run Drive-Inn. I had some cool drinks and there was few stone benches for enjoying the sea breeze and an wonderful scenary of Oak trees and sea in the background. After riding sometime I was invited by the Welcome board of Tiger Caves. Wow! what a place it is! Green everywhere with huge rock caves here and there and some wonderful Rock sculptures attracting eyes. Among the rock sculptures, I found two are very cute and great skilled work. The first one is a Siva temple of a single rock. It was a huge rock carved skillfully to three rooms and in the middle there is a Lingam. There was a board saying to not take the photograph of that siva lingam. The next one is bit more interesting. A huge rock resembling a tiger in elevation but in the rear, it was carved have many tiger heads. The another most important thing about the place is you cant just leave the place without saying about sound of sea waves colliding the rocks. Unbelievable sight! Green everywhere but when i stepped in further, there was a beach. I spent time long time sitting in the green grass listening the waves. Now and then Minas were making sound and that all made me feel heaven. I found the tiger caves is not having a proper bus stop and hence there is not much croud..Infact no crowd was very good for me to enjoy the place. I left the place by 6 pm and reached Mamallapuram finally :) As it was getting darker I was not able enjoy the sculpures fully but made an oath to come back soon exclusively to Mamallapuram. I then sat in the beach for sometime eating lays, Masala Kaju and Sprite.
I finally left Mamallapuram beach by 7 and reached home by 9pm after having dinner in OMR Nallas Appakadai. It was really wonderful. I never felt tired of riding bike for the total of 118 Kms up and down. It was full of enjoyment. It is really a very happy and unforgettable trip than I assumed how it would be at the beginning of the trip. Oh now only I am feeling pain in my palm and fingers. Some poto shots are here

Sunday, September 05, 2010

InPlaceEditor handling ActiveRecord validations in Rails

Last week I was facing an issue with Ajax InPlaceEditor in my Ruby On Rails application. The editor is very simple and when a page item is updated, the corresponding table is updated and the new value is updated on rendering. In my application i need to provide the user, an option to update his email id. Part of my controller

if @user.update_attributes(params[:name] => params[:value])
render :text => CGI::escapeHTML(@user.send(params[:name]).to_s)

It updates the database and renders the latest updated value if the active record validations are satisfied and the table is updated. I was worried about the else part i.e if the validations are failed, i should not update the table and the error message should be displayed with the original value retained in the page. So in this case i need to update two values, the original field value should be retained and the error value should be updated. In my controller i was having,

else
err_message = first_error(@user.errors)
render :update do |page|
page.replace_html params[:field_id].to_s, prev_value
page['notification_message'].hide
page.replace_html 'notification_message', :partial => 'shared/error', :object => err_message

I was shocked seeing some my field got updated with some chunk jvascript. I read InPlaceEditor docs and found that the field will get updated with the value returned from the controller. So in my case it takes my second page.replace_html as the returned value and updated the field. I googled and found many are having this issue but no one has mentioned any solution for this. Then I found that the script.aculo.us Ajax.InPlaceEditor is only designed to update one page field--the one that was edited. After going through the code, I realized what was happening was that both of my replace_html calls were actually working, but as part of what Ajax.InPlaceEditor does it returns the final value of the render call, and sticks it into the field that was edited. This is just the default behavior, as it assumes you only want to update that one field.

Looking into the Ajax.InPlaceEditor code,(relevant lines in bold):

handleFormSubmission: function(e) {
var form = this._form;
var value = $F(this._controls.editor);
this.prepareSubmission();
var params = this.options.callback(form, value) || '';
if (Object.isString(params))
params = params.toQueryParams();
params.editorId = this.element.id;
if (this.options.htmlResponse) {
var options = Object.extend({ evalScripts: true }, this.options.ajaxOptions);
Object.extend(options, {
parameters: params,
onComplete: this._boundWrapperHandler,
onFailure: this._boundFailureHandler
});
new Ajax.Updater({ success: this.element }, this.url, options);
} else {
var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
Object.extend(options, {
parameters: params,
onComplete: this._boundWrapperHandler,
onFailure: this._boundFailureHandler
});
new Ajax.Request(this.url, options);
}
if (e) Event.stop(e);
}

What was happening was that it was creating a new Ajax.Updater, which is meant to update a single element with the return value from the url it calls, which turned out to be that chunk of Javascript above when I used the render :update block. The Javascript was being eval'd correctly, and updating both my fields, but then Ajax.Updater was re-updating the 1st field with the result of the render block, which was that chunk of Javascript.
So both of my replace_html in render update are actually working and the problem is only with the editors updater. So I called a new request to reload after that updater. so my modified script looks like

if (this.options.htmlResponse) {
var options = Object.extend({ evalScripts: true }, this.options.ajaxOptions);
Object.extend(options, {
parameters: params,
onComplete: this._boundWrapperHandler,
onFailure: this._boundFailureHandler
});
new Ajax.Updater({ success: this.element }, this.url, options);
new Ajax.Request(this.url, options);
} else {
var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
Object.extend(options, {

Now everything works great:) Hope this will be useful if you are facing similar problem with InPlaceEditor

Saturday, September 04, 2010

வேணுமடி நீ எனக்கு..!!!

Recently i read a mail titled "நீ எனக்கு வேண்டாமடி". It was a nice poem saying why the guy should sacrifice his love for his family. Its link. I liked the way the poem was written but not the meaning of it. So thought of writing why the guy should not leave his love...given here few lines of that

வேணுமடி நீ எனக்கு..!!!

எனக்கு வேண்டியதை
நான் வேண்டுமுன்னே
பார்த்துப்பார்த்து செய்தஎன்
தாய்த் தந்தைக்கு இன்று
வேண்டும் ஒரு மகள்..
அதற்க்கு வேணுமடி நீ எனக்கு...

என்சிறு செயலையும் விண்ணுக்கு
உயர்த்திப் பேசிய சகோதரிகள்
ஒரு நாளாயினும் உண்மையாய்
மகிழ்ந்து பேச வேண்டும்..
அதற்க்கு வேணுமடி நீ எனக்கு...

நான் செய்யும் எதுவும்
சிறக்க வேண்டும் தோழிக்கு
என்றும் என்நட்பு
சிறக்க வேண்டும்..
அதற்க்கு வேணுமடி நீ எனக்கு...

நான் வாழ்க்கையை ஒருநாளேனும்
வாழ வேண்டும்..
அதற்க்கு வேணுமடி நீ எனக்கு...!!!

Sunday, August 29, 2010

Changing login screen in Ubuntu

One of my friends had a new theme installed in his Ubuntu system but the login screen was that of the default theme. He thought changing the login screen is a big task. It is very simple as follows

The desktop appearance properties window should be linked or copied to login window.

sudo cp /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow.

Instead of copying you can give links too.

When the login screen is prompted again, the background appearance changing window will also be popped out and with that you can change your login screen to your theme login screen. If there is no separate login screen you can use your desktop screen itself. Now you can see your login screen matches your newly installed theme.

After logging in do unlink so that the background changing window wont prompt again along with the login screen.

sudo unlink /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop

Sunday, February 28, 2010

பாசத் தலைவனுக்கு...

உனக்கு தெரியாது..

உனக்கு தெரியாது..
எனக்கு உன்னைத்தான்
பிடிக்கும் என்று...
துடிக்கும் இதயத்தில்
உயிராகி விட்டாய்
சிமிட்டும் விழிகளில்
ஒளியாகி விட்டாய்..
எப்போது எந்நாளில்
என்மௌன உதடுகளில்
ஒலியாக போகிறாய்
என்காதல் நீதான்
என்று நான் சொல்ல!

உனக்கு தெரியாது..
எனக்கு உன்னைத்தான்
பிடிக்கும் என்று...!

-------------------------------------------
பாசத் தலைவனுக்கு

பாசத் தலைவனுக்கு..
பாசத் தலைவனுக்கு ஓர் கடிதம்
உலக பொது மறையாம்
திருக்குறளுக்கு புதிய உருவம்
அருளிய வாழும் ஓவிய
வள்ளுவனே - தன்மானம் கற்பித்த
பெரியாரின் வழி நடந்தவனே..
அண்ணாவின் வழியிலே தம்பிகள்
படைசூழ நீ நடத்திய தமிழ் போராட்டம்
படித்து வியந்தேன் - "வாழும் அரசியல்"
தலைவர்களில் "எனக்கு" தெரிந்து
உன்னைவிட தமிழையும் தமிழனையும்
நேசித்தவர் இல்லை என்பதால்
உன்னிடம் எனக்கொரு கேள்வி உண்டு!

பூக்கும் ரோஜாக்களின் எல்லாம்
மனித ரெத்தவாடை வீசுகிறதாம்
ஈழ பூமியில் இன்று..
தனிஈழம் நிலையில் இருந்து
அரசியல் தீர்வு என்று இறங்கிய
தமிழனை தோட்டாக்களால் துழைத்த
வெறியர்களை தடுத்திருக்க வேண்டிய
இந்தியா எதற்கோ பழி தீர்ப்பதுபோல்
வேடிக்கை பார்த்தபோது நீங்களும்
வேடிக்கை பார்ததைக்கண்டு அரண்ட
கோடிகளில் நானும் ஒருவன்...
இலாக்காவிற்கு காட்டிய ஆர்வத்தில்
இலங்கை தமிழனுக்கு காட்டியிருந்தால்
சிறுதேனும் தமிழன் வாழ்ந்திருப்பானேன்றே
பதறுகிறது இதயம்! இன்று
உதவிகளுக்காக வேண்டிநிற்கும்
எஞ்சிய தமிழனுக்கும் நிவாரண
உதவிகள் நிர்வானமாய் இருக்கிறது..
அவன் வாழ்வு சிறக்குமா? இல்லை
அவன் இனியாவது வாழ்வானா?
--------------------------------------------------

My new laptop hp dv4-2106TX

Due to continuous issues with my old laptop which was spoiled mainly because of rough handling, I thought of going for a new one. After surfing the net for reviews about various laptop products, i decided to buy a hp machine and the model that suits my needs well is hp dv4-2106TX. Its configuration reads Intel Corei3 330, 14.1” Colour TFT, 3 GB RAM , 512 MB graphics, 320 GB HDD, Finger Print Reader, 8X DVD Writer, Windows 7 Home Premium. So i almost finalised the model before seeing it in the show room itself. When i was seeing the model live i was very happy for its cool look, less weight and nice metallic black color. Within seconds i decided to buy that model at my first sight itself. The other feature that is worth of mentioning is the latest feature called hp Quickweb coming with latest hp machines. The information about this Quickweb technology read in hp site is
QuickWeb is an innovative bit of technology that lets you access the web in seconds, even when your notebook is shut down. Because HP QuickWeb resides outside your notebook’s operating system, there’s no need to wait minutes for your system to boot. Simply push the HP QuickWeb button on your HP Business Notebook PC, and in less than 20 seconds1 you’ll
have a fast connection to the Internet and access to websites and content you normally would through your regular browser. Shutting down your notebook is just as easy: either press the power button, or simply close the application—
and your notebook powers off in as little as five seconds.
Forgot to mention..I am blogging from hp Quickweb only:)
So on the whole, i love this laptop more and i should handle it properly (which i think is very tough considering the state of my old laptop:) Lets hope the best:) )

Tuesday, January 26, 2010

Republic Day Celebrations..

Today, on the 60th year of celebrating Indian Republic, one of my dreams came true when i was standing straight for the national anthem in the state Republic day celebrations parade at Kamarajar Salai, Chennai. I was dreaming this day ever since i attended the district level Republic day celebrations headed by our District Collector Jeevarathinam I.A.S., at the Police Race Course ground, Dindigul, 10 years back. Today, Myself and Vinodh reached the Kamarajar Salai near Mahatma Gandhi statue at 7.30 a.m itself and were waiting for the function to commence. The secretariat officials, Tamil Nadu State Governor Surjit Singh Barnala, CM Dr M Karunanithi and other ministers were coming one by one. The National flag was hoisted by our State Governor exactly at 8 am and immediately National anthem was played followed by the Quick March by Army, Navy, Air force soldiers followed by the Tamil Nadu Police, Fire men and various other police wings. Following the police it was N.C.C., guys who were marching with passion and discipline followed by the decorated vehicles representing the achievements of the Nation and the central and state people welfare schemes. A great moment indeed!
Photos taken with my mobile cam are here. While returning home, i was saying Vinodh some of my Republic day memories.

During my 8th standard, i was a cadet in our school N.C.C., Our School always participate in the Independence day and Republic Day celebration parades every year and that year we were practicing hard for the republic day parade from a week before the day. Every day, practice drills would be from 6 to 7.30 in the morning, at the police race course ground. Teams from Dindigul police, Striking force, Home guard, fire service and the representation from Dindigul NCC i.e., 14(TN) battalion NCC represented by our school MSPSM Hr sec School and St Mary's Hr Sec School. The practice parades were organized and headed by our district DSP Rajendran(He was later charged in Sivakasi Jayalakshmi case). It was the first time i was going to take part in the Republic day parade and i was eagerly waiting for the day after all the hard practice drills.

Finally on 26th January, we assembled at Race Course Ground early morning and our national flag was hoisted by our collector Jeevarathinam I.A.S.,exactly at 8 am followed by the march fast of various teams from different police wings and N.C.C.,. Every team marching has to salute turning to the right towards our collector and the Police SP Subramanian I.P.S., who were there to accept our respect to the flag and the Nation. It was a big ground and we have to march from right to left of the post and have to salute the flag for 24 steps(12 steps right of the flag post and 12 steps left). We were marching towards the post perfectly in a well disciplined manner and when heard the command '14 (TN) Battalion N.C.C., "Salute"', we saluted the flag at once. The moment, saluting the flag gave me an unusual special feeling and i felt that for the rest of the march. I knew that it was not because of over excitement or fear of marching. After competing the march fast, i thought the special feeling must be the satisfaction for getting an opportunity to participate in that function and doing it well. Almost all guys felt a similar feeling.

I attended the independence day and republic day parades next year. At that time also i felt the same special feeling while saluting the flag and i thought, in addition to the satisfaction, it must be the gratitude to my nation and the society for what has given to me. I was given good education, healthy environment, safe living, good social status etc., when many others were just dreaming of those things. But still i was missing some reasons behind that special feeling which i understood only during my college days, it was the voice of the nation and the society expecting to return back at least a bit of what i had received from it so far. I got good education, food, social status and everything from it and i must do something back to the society because not many are getting all these.

Thanks to all the discussions with my friends Ashok, Vinodh, Sabari or Bala in hostel days who all explained ideas on communism, democracy, helping others, religions in India, people's living conditions etc., in their own terms. Some others said giving education, food etc are the governments responsibilities and there is no need of showing any gratitude to the nation or the society as it has done only its task. There must be poor in the nation so that the tasks like cleaning toilets, sweeping etc can be done was one of the comments from a so called brilliant guy in the class. But clearly i understood that the special feeling must be the satisfaction, gratitude towards the Nation and the expectation of the society to return back at least a bit of what i had received. Wish the coming days allow me to work for that special feeling! Wish you all a wonderful Republic Day!