Friday, November 20, 2009

Girls Smoking in India:

As I said in my previous post, I am listening to Diary program in 106.4 Hello FM radio. In the past 10 days, I have heard from 2 persons telling their friends (girl) started smoking.

One guy said he knew this girl during school days and when she went to B’lore for college studies and when she came back, she had picked up smoking and drinking.

Another guy said when he was sightseeing a girl in the terrace, he saw this girl smoking and that is why she comes to terrace for reading.

Man… I cannot accept girls smoking. For some reasons, it bothers me a lot. What to do? We have to teach starting from the young age itself not to smoke. I was thinking girls won’t smoke in India but this generation has changed. Parents need to know what their kids are doing and also who their friends are and their behavior.

SharePoint Discussion List Threading view Rating System:

I wanted to do a Rating system for the email threads we have in our SharePoint system. I have written an email thread synchronizer for SharePoint. Of course, SharePoint synchronizes the email but doesn’t thread it properly. I will write a separate blog for it.
This rating system is like this:

Figure 1:

So a user who needs to rate the email message just clicks a star and the average rating will be shown.

So how did I achieve it?

I haven’t used any c# code (except a web service). What I did was kind of changed the schema.xml file that SharePoint creates for each List. This Schema.xml file is in the appropriate folder in the 12 hive. (12\template\features\customdiscussionboard\schema.xml).

So how and where to change the Schema.xml file?

Since, I know, I need to display my star rating images before View Properties, I was curious to know where and how this is displayed. That is why, I went to Schema.xml file and fiddling it with. I saw a Status Bar field. There I saw this field. So, I changed the Schema.xml file’s StatusBar field and bingo..

This is what I added in the Schema.xml file in Status Bar field:


<HTML><![CDATA[<td style="border-style:none" nowrap="TRUE"><div>Please click star to rate: (1 low to 5 high)</div></td>]]></HTML>
<HTML><![CDATA[<td style="border-style:none" nowrap="TRUE">]]></HTML>
<HTML><![CDATA[ <div style="width:55px;"> <img alt="star_1" src="/_layouts/images/star_x_grey.gif" id="star]]></HTML>
<Field Name="ID" />
<HTML><![CDATA[_1" ONCLICK="CurrentEventFunctions.RatingImageClicked(]]></HTML>
<Field Name="ID" />
<Column Name="GUID" />
<Field Name="FileRef" />
<HTML><![CDATA[',this)"/><img alt="star_2" src="/_layouts/images/star_x_grey.gif" id="star]]></HTML>
<Field Name="ID" />
<HTML><![CDATA[_2" ONCLICK="CurrentEventFunctions.RatingImageClicked(]]></HTML>
<Field Name="ID" />
<Column Name="GUID" />
<Field Name="FileRef" />
<HTML><![CDATA[', this)" /><img alt="star_3" src="/_layouts/images/star_x_grey.gif" id="star]]></HTML>
<Field Name="ID" />
<HTML><![CDATA[_3" ONCLICK="CurrentEventFunctions.RatingImageClicked(]]></HTML >
<Field Name="ID" />
<Column Name="GUID" />
<Field Name="FileRef" />
<HTML><![CDATA[', this)" /><img alt="star_4" src="/_layouts/images/star_x_grey.gif" id="star]]></HTML>
<Field Name="ID" />
<HTML><![CDATA[_4" ONCLICK="CurrentEventFunctions.RatingImageClicked(]]></HTML >
<Field Name="ID" />
<Column Name="GUID" />
<Field Name="FileRef" />
<HTML><![CDATA[',this)"/><img alt="star_5" src="/_layouts/images/star_x_grey.gif" id="star]]></HTML>
<Field Name="ID" />
<HTML><![CDATA[_5" ONCLICK="CurrentEventFunctions.RatingImageClicked(']]></HTML >
<Field Name="ID" />
<Column Name="GUID" />
<Field Name="FileRef" />
<HTML><![CDATA[', this)" onload="CurrentEventFunctions.RatingLastImageLoad(']]></HTML>
<Field Name="ThreadTopic" />
<Field Name ="ID" />
<HTML><![CDATA[',this);return false;"/></div></td>]]></HTML>
Then, I added the javascript functions in the .master file.
<script language="javascript" type="text/javascript" >

function EventFunctions (loadedimage)

EventFunctions.prototype.RatingLastImageLoad= function(rating,id, imgStar)
    if (this.loadimage) return; //this is for recursive avoiding
    if (rating.indexOf("~")>=0)
      var index = rating.split("~")[1];
      if (index>=0)
         for (i=1;i<=index;i++)
           var imgstarmakeorange = document.getElementById("star" + id + "_" + i);
           if (imgstarmakeorange != null)
               imgstarmakeorange.src = "/_layouts/images/star_x_orange.gif";
EventFunctions.prototype.RatingImageClicked =function (id, listid, parentlistid, objstar)
    if (typeof _spUserId != "undefined")
       var intStarindex ="_")[1];
       this.UpdateStars(id, intStarindex);
       this.callService(id, listid, parentlistid, _spUserId,intStarindex);
   alert( "You need to signin to rate");

var CurrentEventFunctions = new EventFunctions(false);

EventFunctions.prototype.callService = function (id, listid, parentlistid, UserId,intStarindex )
var strUrl = "http://yourserver. com:<port number>/Service.asmx?WSDL";
var iCallID;
if (divWbSvc.divSvc)
iCallID = divWbSvc.divSvc.callService(this.updatePage,"InsertRatingsandReturnRatingAvg",UserId, listid,
                                                                     parentlistid,intStarindex, id, true);
EventFunctions.prototype.updatePage = function (str)
    if (str.error)
      //handle error
        var retVal = str.value;
        var retVals = retVal.split("~");
        //need to write logic here
EventFunctions.prototype.UpdateStars = function (starindex, rating)
    //get the star value (grey/orange) of the current index
    var imgstarindex = document.getElementById("star" + starindex + "_" + rating);
    var Arraysrc = imgstarindex.src.split("/");
    var intlen = Arraysrc.length;
    var imgstarindexvalue = Arraysrc[intlen-1]; 
    //first make everything grey
    for (i=1;i<=5;i++)
       var imgstarmakegrey = document.getElementById("star" + starindex + "_" + i);
        if (imgstarmakegrey != null)
         imgstarmakegrey.src = "/_layouts/images/star_x_grey.gif";
     //second make till the image clicked or rating -1 to orange
      for (i=1;i<=rating-1;i++)
       var imgstarmakeorange = document.getElementById("star" + starindex + "_" + i);
       if (imgstarmakeorange != null)
          imgstarmakeorange.src = "/_layouts/images/star_x_orange.gif";
     // now check if the image clicked is orange or grey
     var imgstarclicked = document.getElementById("star" + starindex + "_" + rating);
     if (imgstarindexvalue == "star_x_grey.gif")
         imgstarclicked.src = "/_layouts/images/star_x_orange.gif";
          imgstarclicked.src = "/_layouts/images/star_x_grey.gif";

You need to add a Grey star and Orange star image under the layouts images folder.

What I have done in my service is I insert the user, listid, folder and ratings and figure out the average rating and store it in the ThreadTopic field (actually append the ThreadTopic field with a delimiter “~”).

PS: I am attaching the images :

Monday, November 16, 2009

When time is bad..

Last Friday, one of my friend (I know this guy and I cant believe he will go cheap as like stealing..) was in deep trouble.. He was arrested for a petty theft case for which he was not responsible (atleast to my knowledge, I am not aware of what actually happened)..

Friday afternoon he was arrested.. No one knew till late evening. Police didn’t let him go. Next day he was taken to a court and the Judge bailed him for 500$ bond. However, still Police didnt want to let him go as they need to do immigration background check. He is a GC holder and still they don’t want to let him go and he spent the whole Saturday and Sunday in jail. Here, when you give your SSN, you get the history of a person and still they dont wanted to do immigration check immediately.  He had to wait till Monday. I feel bad for him as it is not worth it to spend 3 days of jail (don’t know yet he is still released or not ) for a small petty theft case (again not sure he is 100% responsible and what the case is about)

When time is bad, you dont how it will drag you to unthinkable scenarios!!!

Friday, November 6, 2009

Adding an Image to a SharePoint discussion List:

My intention is to bring a Rating image in SharePoint threaded view before the “view properties”. I have some other functionality, I am trying to bring but I will discuss it once I am done with that.

What I am talking is please refer the below fig:

In the read box, I need my image. This screen is in the Threaded View of SharePoint discussion. This is a status bar and it will appear for each message.

I googled and binged but couldn’t find much help. Later I thought, how they are doing this and was viewing the source and found out the javascript being used in View Properties. I have seen something like that in Schema.xml and hence I went to that file and bingo… the javascript was there.

So I went and played with the schema.xml and I got it working. Under the Statusbar Field reference, display pattern, you need to add your stuff and it will display accordingly.


<1img alt="star_1" src="/_layouts/images/star_x_grey.gif" id="star]]>

<1html><1![CDATA[_1" ONCLICK="RatingImageClicked(]]>

<1html><1![CDATA[,this)"/><1img alt="star_2" src="/_layouts/images/star_x_grey.gif" id="star]]>

<1html><1![CDATA[_2" ONCLICK="RatingImageClicked(]]>

<1html><1![CDATA[, this)" /><1img alt="star_3" src="/_layouts/images/star_x_grey.gif" id="star]]>

<1html><1![CDATA[_3" ONCLICK="RatingImageClicked(]]>

<1html><1![CDATA[, this)" /><1img alt="star_4" src="/_layouts/images/star_x_grey.gif" id="star]]>

<1html><1![CDATA[_4" ONCLICK="RatingImageClicked(]]>

<1html><1![CDATA[,this)"/><1img alt="star_5" src="/_layouts/images/star_x_grey.gif" id="star]]>

<1html><1![CDATA[_5" ONCLICK="RatingImageClicked(]]>


I added the above after the <1field Name="Attachments" /> under in schema.xml file.

If it helped someone, I will be glad. If you don’t get it let me know.

I have javascript to handle my functionality and you need the image. I didn’t provide that here.

PS: I have added 1 because the blog interprets the html tag and didnt show properly.

Aval thantha Uravu

When you read the title, you may feel I am going to talk about "Adults only" stuff..   Sorry.. It is pure G stuff..

My house in Trichy (I love that house still now), is in the end of street.  After the small street, the next house continues.  That house was owned by a film distributor company at that time.  I think they owned this "Title" movie.. I dont know .. However, they had this Titled banner displayed in the front of the house.  You know how, it was like 2 feet height x 10 feet wide printed in Tamil alphabets with "jigna" (very colorful).  The reason I describe this banner is because that is the highlight of this blog. 

A person walking down that road, cannot miss this banner's visibility.  Ok I think I have enough described about this banner.

When I was studying like 9th standard (Padichayanu kekaatheenga :) ), I have seen this maths teacher daily passing this street. 

It so happened he taught me Maths during 10th standard.  In the first class he asked me, where is my house.  I got excited.  I should have just said my address and kept quite.  Since, I have seen him passing that street daily, I thought, he might have noticed this banner and gave him this "titled" banner reference with description like "jigna".  Truly, (believe me), I was not aware of the other meaning in this title.  I am so small to understand the other meaning at that time.

This teacher went and told other teachers too and everyone started making fun about me on that.  Even in 11th and 12th my Maths teacher when he is too happy, he will say the titled and make fun.  I was not understanding at those times why they are laughing for this... 

Hmmm.... I dont mean to make bad of my teachers.... may be it might have been fun had I really meant it with meanings known to me..............

Thursday, November 5, 2009


I used to find words that I feel are new to me and save it in word document. Since, I do this at work, home, laptop etc., I miss all the words I have saved so far. So I thought, I will blog it so that I keep updating this post with words.

Nimble:  lively, quick, agile, lissome
Progeny:  offspring, young, descendants
Comprehensible: understandable, clear, logical, intelligible, lucid, graspable
Austerity: severity, strictness, sternness, graveness, soberness
Rein: bridle, restraint, harness, leash, lead, strap, restriction
Obfuscate: confuse, disguise, conceal, complicate
Scruple: misgiving, doubt, qualm, compunction, hesitation, regret
Obscurity: darkness, dimness, shadows, gloom, murkiness
Dearth: lack, shortage, drought
Rudimentary: basic, elementary, simple
Encumbrance: burden, load, hindrance, nuisance, impediment
Vendettas: feud, blood feud, quarrel, dispute, grudge, revenge
Dexterity: deftness, adroitness, agility, nimbleness
Philanthropy: charity, compassion, patronage, humanity, generosity
Elixir sweetened drug
Vitriolic: spiteful, venomous, hurtful
Diatribe: attack, tirade, rant
Notorious: infamous, disreputable, dishonorable, tarnished
Swanky: posh, swank, ritzy, classy, glamorous, high-class, chick, upscale
Dorm: dormitory, room with many beds, building where students live
Scrambles: mix up, mess up, and jumble
Delegate: hand over, give, allot, entrust
Piques: interest, attract, intrigue, stimulate, arouse, grab, awake
Disguise: mask, costume, camouflage, masquerade, cover, cloak
Artifact: relic, object, work of art, piece
Collegiate: cloistered, idealistic, unworldly, naïve, removed
Ramble: walk, hike, stroll, wander
Sonnet: verse, rhyme, ode, elegy, limerick, couplet, epic
Hog: control, dominate, take over, corner the market
Loathe: hate, dislike, detest, despise, abhor, abominate
Loath: unwilling, reluctant, not keen, wary, chary, against, opposed
Meticulous: careful, thorough, particular, fussy
Grapple: wrestle, struggle, fight, tackle, seize, snatch, grab
Sermon: lecture, oration, talk, homily, discourse, address
Fawn: brown, beige, taupe, tan, buff
Cogent: convincing, strong, logical, rational
Sublime: inspiring, uplifting, moving, transcendent, and magnificent
Unpalatable: inedible, indigestible, disgusting, revolting, foul-tasting, unpleasant, nasty, bad
Exodus: mass departure, migration, emigration, flight, evacuation
Plummet: fall, plunge, drop, dive, tumble
Pinnacle: summit, peak, height, top, apex
Gesture: sign, motion
Lurk: prowl, lie in wait, loiter, hang about, skulk
Svelte: slim, slender, graceful, lithe, willowy, sylphlike
Nefarious wicked, evil, despicable, immoral, reprehensible, disreputable
Invigorated refreshed, revitalized, re-energized, revived, rejuvenated
Whopper monster, giant, whale, elephant
Estranged alienated, separated, not speaking, at odds, divided
Conciliatory appeasing, peace-making, pacifying, assuaging, mollifying
Hoard save, store, amass, stockpile, accumulate, collect, gather
Dud failure, flop, fiasco, washout, letdown, disappointment
Whet sharpen, hone, file, grind
Insatiable voracious, greedy, avid, ravenous
Rein bridle, restraint, harness, leash, lead, strap, restriction
Dire terrible, awful, calamitous, ominous, dreadful, horrible
Stymied thwarted, foiled, blocked, obstructed, hindered
Frivolous playful, frolicsome, perky
Whine complain, moan, bleat, whimper, gripe
Nebulous vague, imprecise, hazy, unformulated
Subjugation defeat, overthrow, suppression, conquest
Deluged flood, inundation, torrent, overflow, surge, cascade
Delude deceive, cheat, mislead, fool
Scant slight, limited, negligible, little, scarce
Morbid dark, gloomy, moody, morose
Cringe recoil, wince, flinch, shrink, shy away, cower
Throbbing sore, tender, aching, raw, excruciating, hurting, agonizing, burning
Preposterous ridiculous, outrageous, unbelievable, absurd, silly
Passion fervor, ardor, obsession, infatuation, excitement, enthusiasm, zeal, craze, delight
Efficacious effective, efficient, effectual, successful
Pare peel, skin, strip, trim, prepare
Nurture care for, look after, take care of, raise, rear, foster
Tutelage auspices, sponsorship, guidance, protection, support
Deceptive misleading, illusory, deceiving, unreliable
Probe search, investigate, explore, look into, check out, query, survey, prod, poke about
Ludicrous absurd, ridiculous, preposterous, nonsensical, comical
Benign kind, caring, kindly, gentle
Dexterity deftness, handiness, agility, adroitness
Relinquish give up, surrender, hand over, abandon, renounce, resign, bow out
Discern distinguish, separate, tell the difference, discriminate
Etiquette manners, good manners, protocol, custom, propriety, decorum
Perplex confuse, baffle, stump, puzzle, stupefy, floor
Swivel spin, rotate, revolve, pivot, turn around, twist, twirl, wheel
Delinquent criminal, aberrant, antisocial, offending, felonious, wrong
Edifice structure, construction, house, shop
Slew veer,swing,slide,skid,swerve
Squeamish delicate, prudish, particular
Xenophobic Chauvinistic, intolerant, racist
Volatile unstable, unpredictable, explosive, impulsive
Surge rush, flow, pour, gush
Perseverance insistence, firmness, resolve, determination
Oeuvre composition, opus, work, piece
Revelry festivities, revels, celebrations, carousing
Ruckus commotion, disturbance, rumpus, riot, uproar
Croon chant, drone, sing, utter, say
Unrequited unanswered, unreciprocated, unreturned
Repartee banter, jousting, wordplay
Quaint old-fashioned, old-world, charming, pretty, attractive, appealing
Guileless frank, candid, ingenuous, straightforward, open, honest
Revel drink, party
Spoof send-up, burlesque, parody, take-off, satire, skit
Lucid clear, logical, coherent, cogent, reasoned, plain, simple
Protagonist character, hero, leading role

Wow... What a difference in Sound Quality...

I used to listen to songs in external speakers. Now headphones. I am finding a heck of a difference hearing in headphones. Even, minute sounds can be heard nicely. Also, I am able to differentiate each track being played. Left and right ear hears music separately. I am not a sound engineer but can differentiate and appreciate this music much more in headphone. Needless to say the sound quality will be much nicer if we hear in Bose headphone speaker or equivalent.

One pitfall is it pains the ears a lot. Don’t want to wear it for long time. Ofcourse, not here to argue the disadvantages of wearing a headphone to ears.

Wednesday, November 4, 2009

Uma Ramanan and K.J. Yesudas

My Brother-in-law used to sing in A.V.Ramanan’s music troop till 2000 (I think I remember the period right), I used to listen to Uma Ramanan’s voice.
After that I liked her voice with the combination of K.J. Yesudas. I felt the two voices blended nicely. I thought I will collect her songs sung with K.J. Yesudas and here it is:

Song : Ennuyir Neethane Movie : பிரியா Music : Illayaraja Singers : K.J.Yesudas , Uma Ramanan
Song : Kanmani Nee Vara Movie : Thendrale Ennai தோடு Music : Illayaraja Singers : K.J.Yesudas , Uma Ramanan
Song : Aagaya Vennilave Movie : Arangetra Velai Music : Illayaraja Singers : S. Janaki, Uma Ramanan, K.J.Yesudas
Song : Nee Pathi Nan Pathi Movie : Keladi Kanmani Music : Illayaraja Singers : K.J.Yesudas, Uma Ramanan
Song : Vaaname Mazhaimegame Movie : Madhu Malar Music : Gangai Amaran Singers : K.J.Yesudas, Uma Ramanan
Song : Athadi Adhisayam Movie : Manaivi Solle Manthiram Music : Illayaraja Singers : K.J.Yesudas, Uma Ramanan
Song : Kuyiley Kuyiley Movie : Pulan Visaranai Music : Illayaraja Singers : Uma Ramanan, K.J.Yesudas
Song : Kasthoori Maane Movie : Puthumai Pen Music : Illayaraja Singers : K.J.Yesudas, Uma Ramanan
Song : Kattaaya Kaadhal Movie : Thozhar Pandian Music : Illayaraja Singers : K.J.Yesudas, Uma Ramanan
I will soon get the links for these songs and I wish to thank for getting me this collection.
You can post in the comment in case if I have missed any and I will update.

Belief in God got strengthened

I should say I am a kind of selfish guy. Yes, when I was in trouble (deep), I usually pray to my favorite God “Perumaal”. 99% of the time, he has answered my prayers. Only one big prayer wish is pending and still!!
Anyways, coming to the point of my selfishness, in this couple of years (2007-2009), I should say, I was in a comfortable state, meaning, I didn’t have any prayers. So I started questioning about God’s presence or whatever... My friend told, since I am currently undergoing 7.5 naatan (Sani), my period of 07-09 was good as I am undergoing “Pongu Sani”. May be that also added and I was arguing to myself God’s presence. What selfishness?? Humans (at least me) when they undergo some pain only they think of God... Otherwise, they think they are smart enough to question God’s presence...
When my Dad had a massive heart attack on October 31, 09, after 4 days, still didn’t pray much, yesterday night, when I called my sister and she was telling the variation about his ECG and pressure, I did my deep prayer and yes he answered me.. You won’t believe, I woke up at 2:30 am and India time 2:00 Pm called her and Doctor has told her that he has recovered and nothing to worry and he will be soon moved from ICU to a separate ward.
What a relief … Now that I should not question about God’s presence, I wanted to put it in my blog and read it all the time when I become arrogant...
Thank you “Perumaal”

Monday, November 2, 2009

Why I like “Diary” Program in Hello FM 106.4

I like to listen to internet radio all the time. It is not only you listen to music, but also, you can get the news and listen to various people’s talk. I was a fan of Singapore radio till February 2009 (till now). After that I couldn’t listen to that station as they stopped broadcasting over the internet for various copyright issues. I really miss that station.
However, one of my friend who is now in Australia, gave me the link to 106.4 Hello FM this September (09) and am listening to this radio. I like to listen to “Bigil” program by Suresh. He talks casually and he tries to figure out lot of different games. I couldn’t listen to much of it due to timing issue.
I don’t miss Diary program by Girish. Girish your voice is, I think very suitable for that type of program and you did capitalize on it. Good job. I like this program for 3 reasons:
1) As I said before, it is because of Girish’s voice. I think this guy should be in his 25s. I can understand his feeling towards love.
2) Nice songs of 80s to 90s. I like it.
3) “Vambu” Nice to hear lot of people’s happenings. This gives a chance to learn people psychology. Sometimes takes our memory to our college life.
I don’t simply want to hear only songs in Radio. I want to hear different people’s talk and various news + songs in Radio. Also, another biggest advantage of Radio over TV is you can do your work and listen to the program.