Monday, January 28, 2008

proto.in Chennai, January 2008, My take

These are a few random pics that I clicked during the "Startup Presentation Sessions" at Proto.in Chennai, January 2008. If I didn't click you I am extremely sorry about it :).



Click on the image to see the larger version. To see a few more click on the Read more.. link below. I know I could have named it View more... ;)










Read more!

Sunday, January 27, 2008

GOD -- Google Oriented Development, Developer's maai baap :)

Please read this post only if you can read and understand Hindi. Otherwise its all gibberish content.

Click on the image to see the readable(Hindi) text on the image.

This Google Aarti Image was lying in my mailbox for sometime :)
Thanks Prerna for sharing it with me.


Below is the Hinglish version that was sent by Deepti:

Om Jai Google Hare !!
Swami Om Jai Google hare
Programmer’s ke sankat, Developers ke Sankat, Click main door kare!!
Om Jai Google Hare !!

Jo Dhyawe vo pawe, dukh bin se man ka, Swami dukh bin se man ka,
Homepage ki sampatti lawe, Homework ki sampatti karave kasht mite work ka,
Swami Om Jai Google hare!!

Tum puran seach engine Tum hi internet yaami, Swami Tum hi internet yaami Par karo hamari Salari, Par karo hamari apprisal, Tum dunia ke swami, Swami Om Jai Google hare.

Tum information ke saagar, Tum palan karta, swami Tum palan karta, Main moorakh khalkamii, Main Searcher tum Server-ami Tum karta dhartaa !! Swami Om Jai Google hare!!

Din bandhu dukh harta, tum rakshak mere, Swami tum thakur mere, Apni search dikhaao, sare reasearch karao Site par khada mein tere, Swami Om Jai Google hare!! Google devta ki aarti jo koi programmer gaawe, Swami jo koi bhi programmer gaawe, Kehet SUN swami, MS hari har swami, Manwaanchhit fal paawe. Swami Om Jai Google hare.

BOLO GOOGLE DEVTAA KI JAI!!!

Thanks Deepti for sharing it.


Read more!

Saturday, January 26, 2008

An interesting video I stumbled on

http://www.shoob.com/index.php/2008/01/24/et-si-le-web-social-etait-une-soiree-de-djeunz/


Read more!

Sunday, January 13, 2008

Make desktop clutter free, arrange desktop icons neatly - Windows XP


All of us who use computer have tons of icons on our desktop, these icons might be shortcut links, files and folders. If you haven't arranged your decktop icons for a while now, you would know how difficult it becomes to swim throgh the mess of icons on your desktop to finally find out that one icon you are looking for. Its straining for your eyes, your hand and your brains.

There are many different techniques and softwares programs that can help you keep your desktop arranged and easily accessible, the one that I came across very recently is this software named "DcolorXP", it works with your Windows XP machines and gives you a clutter free list view of all your desktop icons.

Follow these simple steps to arrange your desktop icons to make your desktop clutter free and easily accessible.

-Go to http://dliboon.freeshell.org/
-Download and Install DcolorXP 1.2
-Go to Start>Program Files> DL Software and run DcolorXp.exe
-Right click on the little monitor icon in your system tray and select either Small icons or Tile icons.
-Enjoy your neatly organized WindowsXP desktop.
-Play with those options to set background color of your and etc.

Direct link to the download : http://dliboon.freeshell.org/files/software/dc12xp_app.zip


Read more!

Monday, January 7, 2008

New Year 2008 SMSes

With the change in technology everything around has changed, from paper greeting cards the world moved to e-greeting cards and now its the world of SMS, no wonder this year all the new year wishes I got are all in the form of SMS. Forget about the paper card not even a single e-greeting, it was all SMS.

Life is fast and people want to do everything with the click of a (if you thought a mouse button, think again) button on their mobile.
Here is a selective list of all the creative and not so creative Happy New Year 2008 wish SMSes.

This same message came from at least 5 different persons, strange but they all live in the same place Chennai.

"A Great Jan,
a Lovely Feb,
Peaceful March,
No Worries for April,
Fun for May,
joy from June to Nov
and Happiness for Dec,
Have a wonderful and rocking 2008."

This friend of mine was 18 hours late in wishing me, so here is his creativity:
"Before 18 hrs. I have entered in ur life to make u crazy, happy, successful, rich, healthy - yes i m 2008. Happy New Year"
This one was the regular short and simple:
"Happy New Year to U nd ur family"

and this friend of mine even regrets that she is not sending any flowers or paper greetings
"No greeting card to give...
No sweet flowers to send..
No cute graphics to forward...
Just a CLEAN HEART saying...
HAPPY NEW YEAR 2008"

Here is the hinglish SMS:
"Naya sal apke liye sukhad, mangalmay aur kalyankari ho. HAPPY NEW YEAR 2008"

Funny:
"no tear, no fear, khao murga te piyo beer, kyon ki o my dear :) :) :) 1 din baad hai new year.
dkhi mitra di yaari, 1 din pehele hi baazi mari. HAPPY NEW YEAR"

This one has a little bit of shaayarana andaaz in it, after all its coming from a friend who used to take a lot of interest in shaayari.
"Sunhari Dhoop Har Barsat Ke Baad,
Ushi Tarah Ho Mubark Aapko Naya Saal Aaj Raat Ke Baad, Hamare badhaio ke saath.
Nav varsh laye anginat khushiyan inse kamnayon kay saath.
HNY2008"



This one had the most number of VERY:
"VERY VERY VERY HAPPY AND PROSPEROUS NEW YEAR 2008"

There is a lot of learning in this one, I dint know many facts ;)
"24hrs make a lovely day
7days make a lovely week
52weeks make a lovely year
nd knowing a person like u makes world lovely.
Wish u Happy new year"

Learning continues in this one:
"I Wish
In 2008 God gives U,
12 Months of Happiness,
52 weeks of Fun,
365 Days of Success,
8760 Hours of Good Health,
52600 Minutes of Good Luck,
3153600 Seconds of joy"

believe me my life is filled with joy every second, aftereffect of the above SMS.


Back to some English:
"May dawn of this new year, bring promises of new joys for you...
May your each day be blessed with peace, prosperity and happiness too!!.."

"Wish you a very happy and prosperous new year.
May all your dreams and ambitions be fulfilled."


"May the fragrance of joy, warmth of love and the glow of success brighten your day today and everyday. Wish you and your family a happy new year"

"Wish you a Fantastic January,
Lovable February,
Marvelous March,
Foolish April,
Enjoyable May,
Successful June,
Wonderful July,
Independent August,
Tastyest October,
Beautiful November,
Happiest December,
Have A VICTORIOUS YEAR...
HAPPY NEW YEAR 2008..."

He missed September ;)

The shortest one:
"Wishing u a very Happy New Year 2008.


"WISH U ALL A VERY HAPPY AND SUCCESSFUL AND PEACEFUL YEAR 2008"


Read more!

Saturday, January 5, 2008

Easiest and the best way to display HTML code in your blog posts on blogspot blogs

Use <textarea></textarea> and embed all your HTML between them.


Read more!

A little bit of RAILS for Build Your Own Ruby on Rails Web Applications readres

This post will be of use to you only if you happen to be a newbie to Ruby and Ruby on Rails and currently working on the Shovell web application from the book "Build Your Own Ruby on Rails Web Applications" by Patrick Lenz.

This post will be helpful to you if you are trying to add a feature to the Shovell application where the users of the Shovell should be able to update/edit stories posted by them.

After completing the Shovell application as guided in the book "Build Your Own Ruby on Rails Web Applications" I wanted to add edit functionality to my stories of Shovell application and after a few hours of struggle (I am very new to Ruby and Ruby on RAILS RoR) I was successfully able to implement the edit functionality to Shovells's stories.

This is how I achieved it :)

--Display a "edit story" link next to the "Submitted by" link on the show story page.
(validation done: display the "edit story" link only if the current story being displayed is submitted by the current logged in user.)


Add this code to your /views/story/show.rhtml file within the submitted_by class



<% if logged_in? %>
<% if @story.user.login.to_s == @current_user.login.to_s %>
<span id="edit_story_link">
<%= link_to 'edit story', :controller => 'story',
:action => 'edit_story', :id => @story %>
</span>
<% end %>
<% end %>



the submitted_by class after adding this code looks like this



<p class="submitted_by">
Submitted by:
<span><%= link_to @story.user.login,
:controller => 'account',:action => 'show',
:id => @story.user.login %></span>

<% if logged_in? %>
<% if @story.user.login.to_s == @current_user.login.to_s %>
<span id="edit_story_link">
<%= link_to 'edit story', :controller => 'story',
:action => 'edit_story', :id => @story %>
</span>
<% end %>
<% end %>
</p>



--Once the user clicks on the "edit story" link, take him to /views/story/edit_story.rhtml page prefilled with all the story details and tags. Allow user to make changes and save the updates.

Create a new file named edit_story.rhtml in /views/story/ and add the following code to it.



<%= error_messages_for 'story' %>

<% form_for :story do |f| %>

<p>
Title of the story:<br />
<%= f.text_field :name %>
</p>
<p>
link:<br />
<%= f.text_field :link %>
</p>

<p>
Description:<br />
<%= f.text_area :description %>
</p>

<p>
Tags:<br />
<%= text_field_tag 'tags', @story.tag_list %>
</p>

<p>
<%= submit_tag %>
</p>
<% end %>




Add the following code to your story controller named story_controller.rb located in /controllers/story_controller.rb



def edit_story
@story = Story.find(params[:id])
@story.user = @current_user

if request.post? and @story.update_attributes(params[:story])
@story.tag_with params[:tags] if params[:tags]
flash[:notice] = 'Story was successfully updated.'
end

end



note: this controller part of the code should be added anywhere above the protected section.


All the code above looks self explanatory but in case you have a question please leave me a comment.


Other Questions that got answered by this post:
1. How to update a record in the database using form_for in Ruby on RAILS ?
2. How to use form_for to update data in database in Ruby on RAILS?
3. What method to use in the controller to update a record in the database?
4. How to fetch all the values of tags associated with a story and assign those values to a text_field_tag?

If you downloaded the word doc and the code din't work from there, try removing the extra pre tags or try the code from this post.


Read more!