Wednesday, June 24, 2009

Language Settings Issue

When you press shift key for a long time then the key press will be reflected in the output in a different language.

This language setting will be displayed in the bottom pane in the language bar.
EN : English
CH : Chinese
JP : Japan

To view the output in the expected language, click on the appropriate language. (EN for English).

Wednesday, June 17, 2009

WebService and XML parsing error

While consuming webservice, we need to be very cautious and ensure that the data what we pass is absolutely in the right format. i.e the webservice must be able to parse.
Say for example, you have some query and it returns perfect while testing in the backend. But when you consume the same data in the front end application through the webservice you will get a parse error something like this.

Error in XML Node(5,20)


The reason is either the object returned from Webservice is not serializable, or the data returned from the backend has values which couldn't be parsed by the webservice.
Eg: Consider connecting to DB2 for data. If the fields are not properly intialized at the backend, it will fill in the remaining space by low values which are not parsed by webservice and hence the error.So trace it at the backend before jump starting on debugging the front end application.

Friday, May 01, 2009

Almanac Formulae

Formulae for Almanac geeks
All the thidis are generally represented by Naazhigai
  • 2.5 Naazhi --> 1 Hour
  • 60 Vinadi --> 1 Naazhigai
  • 2.5 Vinadi --> 1 minute

Tuesday, February 17, 2009

ADO.Net Facts

Came across a Microsoft Webcast and here is an interesting part on ADO.Net performance metrics :

  • DataReader is 16% faster than the DataSet
  • SqlDataReader is 115% faster than the OleDBDataReader
  • Ordinal referencing of columns rather than by name is 11% faster Eg: dr[1] rather than dr["NAME"]
  • Proper column casing increases the performance by 1% Eg:dr["NAME"] rather than dr["Name"] depending on the column name.
  • Inline script is 233% faster than the DataGrid
  • DataGrid with viewstate disabled is 66% faster than the DataGrid with Viewstate enabled.
  • DataGrid without templates is 39% faster than the one with templates
  • Explicit cast is 11% faster than the DataBind expression. Eg: ((DbDataRecord)Container.DataItem)["NAME"] is better than DataBinder.Eval
    (Container.DataItem, “NAME")
  • Using DataCache is 637% faster than the standard DataGrid

Source : Microsoft Webcast

Wednesday, January 28, 2009

Access Gmail Offline

If you have been banking on Gmail for your communication needs, there have always been times when you have desperately wanted to access your account to dig out that important mail but have found yourself haggling with an unreliable or unavailable connection. Not any more. If the Google Gears version of Gmail rolls out smooth, you can open your web browser, go to the mailbox, and get to your mail even when you are offline. In a nutshell, your Gmail is going offline.

Here's how it works. Once the feature is turned on, Gmail uses Gears to download a local cache of your mail. As long as you're connected to the network, that cache is synchronized with Gmail's servers. When the connection is lost, Gmail automatically switches to offline mode, and uses the data stored on your computer's hard drive instead of the information sent across the network.According to web reports, Google is making offline Gmail available to everyone who uses Gmail in US or UK English over the next couple of days.

The only bad news is some features that require an Internet connection, such as spell check, won't work offline. And while you can open attachments, you won't be able to add attachments at launch. But Google promises to make them available soon!

Source: http://economictimes.indiatimes.com/quickiearticleshow/4042169.cms

Friday, April 13, 2007

CLR function SQL 2005

SQL 2005 provides an amazing option of writing c# code and deploying the dll in the SQL Server which will be processed there itself.
We can make use of the usual ADO.Net coding here.

While creating the DataBase project itself, you will be prompted to establish the SQL connection. To use the same connection within the .cs file included in the project, use this.

SqlConnection con = new SqlConnection("context connection=true")

To connect to an external source the PermissionLevel should be set to 'External' in the Database tab of the project properties. If it is 'safe', it will not allow to access an external server other than the one mentioned in the connectionstring of the project.

SqlConnection con = new SqlConnection("datasource=servername;inital catalog=DB name;user id=user;password=pwd;")

Having done with the coding, just select the 'Deploy solution' in the build menu and the function will be deployed in the DB.
For the 'External' property to work the DB in which the dll is going to be deployed should have

'trustworthy' property set ON.

The Connectionstring in the project property refers to the server in which our CLR function will be deployed. The function will be deployed in the 'Functions' folder present under 'Programmability' of the DataBase. The compiled dll is placed under the Assembly folder.

By Turning trustworthy property ON in the DB, any remote script can tamper the DB. Since this will lead to security threat, we can sign the dll generated with the certificate, enable the remote access and deploy it. Let me make a separate post regarding this procedure.

Tuesday, April 10, 2007

Swapping of Integer values using XOR(c#)

With reference to,this post the title seem to be one of the frequently asked Interview questions.

Initially I was bit puzzled on how XOR works with swapping Integer values. Did a bit of recollection in "Digital Systems" and got the clue.

To know how the result is determined using XOR logic refer here

Let me go with the same example in the post referred.

int intNumOne = 9,
int intNumTwo = 1;

//Swapping of numbers starts here

intNumOne ^= intNumTwo;
intNumTwo ^= intNumOne;
intNumOne ^= intNumTwo;
Response.Write("Value of First Variable :: " + intNumOne.ToString() + "");
Response.Write("Value of Second Variable :: " + intNumTwo.ToString() + "");

Convert the number as binary and apply XOR rule.

intNumOne ^= intNumTwo:
intNumOne = 9 = 1001
intNumTwo =1 = 0001
-------
intNumOne = 1000 (Applying the XOR rule)
-------
Decimal equivalent of 1000 is 8.

intNumTwo ^= intNumOne:

intNumTwo = intNumTwo ^ intNumOne = 1^8 = 9

intNumOne = intNumOne^ intNumTwo =8 ^9 = 1

Swapping Result:
intNumOne = 1
intNumTwo =9

Wednesday, February 28, 2007

DateTime.Parse

DateTime.Parse() function in the .net behaves depending on the system settings.
If the date format set in the system is dd/mm/yyyy and you try to parse the date which of "mm/dd/yyyy" format it will throw an error "String was not recognized as a valid date time".

To overcome this,
Regional and Language Settings --> Regional options-->
Customize-->Date-->Short date format.

change the format in this Short date format dropdown which solves the problem.

Wednesday, January 10, 2007

Googling

Google has become our default web page where we find answers to our questions whether it is technical or non technical. The word "Google" has been added to Oxford Dcitionary on "June 15 2006" which refers to information search using Google Search Engine.

Here are few tips and tricks to make use of Google effectively.

1.Suppose we wannna perform arithmetical calculations or we can straight away find the result by giving the expressions.

2.To check out the stock price or movie :
movie: followed by movie name
stock: followed by ticker symbol

3.Conversion: (Say dollars to Rupees )
1 US dollar in Indian rupees: displays the results directly

4. Definition for a word or phrase:
Define: followed by the word for which the definition is required.

4.Searching:
a.The ~ operator searches for the synonym of the keyword we have typed in
b.To search for the exact term the keyword should be given within codes.
c.To include a keyword in search give the + operator before that. To exclude a particular word from search include a - operator. In both the cases,there should be a space before the operator.
d. Logical OR, AND also works provided they are capitalised.

5.Google.com/codesearch is a boon which gives the snippet we are looking into straight away.

Happy googling!!

Monday, September 11, 2006

Samba 75

"SAMBA 75" has landed in the Indian Market. A German based company has introduced a device called Samba 75 for those who are not intersted in purchasing PMCIA card to connect to the Interenet. We can go online from our Laptop and Desktop using this device if we have the SIM card that provides with GPRS facilities. One has to simply plug the device in the USB port and plug in the SIM card into that. It costs almost 10,000 in Indian rupees.
Information source: Hindu

Check out these for more info:
http://www.macnn.com/articles/06/08/16/falcom.samba.75/
http://www.gearlive.com/index.php/news/article/samba-75-usb-gprs-edge-modem-04272003/

Thursday, July 27, 2006

Text to Speech

As mentioned in the previous post, the Text to Speech convertion is gonna enter the market in a large scale. Sophistication is going to be increased further!! prologix Software, which is operting from Lucknow has created a text to speech software called "Vaachak". Also, the Contact centers are likely to make more use of this. I came to know this from a computer magazine that I read recently.

Friday, June 30, 2006

Mobile boom!!

Mobile boom!! Boon or a bane?? !! There has been a tremendous growth in the mobile phone usage for the past few years. Competition among the service providers, avialability of mobile phones for cheaper rates , free talk time, Closed User group facilities, SMS, various attractive schemes and offers, Radio and Internet facilities etc., etc., tempt people towards its usage.

Last week in Young World,I read a short storyof a student whose studies is spolied by mobile phone.That's true I would say. Once used to it, they are getting addicted to the use of mobile phones. That too when they start chatting by sending the text messages. When the sms is free of cost,tats it... (Ketkave vendam)!! That story clearly explains how a guy who scored good scores in his twelth standard spoiled himself by getting addicted to the mobile phone. They think that by continuosly sending messages, they are staying in touch with their classmates or so called friends. But they really miss many good things like talking with their parents, sharing with their true friends and relatives who have helped them, reading good and valuable boks etc., etc., I think this is a high time to realise the importance of time, its proper usage and balance the life without getting addicted to all these things by the name of modernisation. The ultimate aim of using the mobile phone is not attained I fear. People tend to think that the mobile phone they use, its cost and its features play an important role to reflect their position in the soceity. Though the aim is to contact a person whenever required irrespective of where they are, Sending some stupid forwards, transferring obscene pistures and vulgour jokes has become a part of its usage which has to be avoided. Also there is a saying in Tamizh which highlights the importance of Dressing :"Aadai illa manidhan arai manidhan". Now I would like to reframe that as "Mobile illa manidhan manidhane illai". The boom has been so much that if you don't have a mobile even after employed, people will look at you like anything. It has become a very basic thing which everyone has to have by default. The last few lines out of my own personal experience!! :) . In this context, I would like to thank Anna University and other colleges which strictly banned the mobile phone usage among the college students.

A few days before, I read an article that mobile phones are coming up with advanced features like, the message(sms) sent can be heard as voice messages so that visually impaired can make well use of that. There are pros as well as cons for any technology. No exception to this mobile phone and its usage as well.

We do know that mobile phones emit radiofrequency radiation from the handset and that these low-energy electromagnetic waves travel into the head. But do they cause injury to living tissue, possibly triggering a brain tumour or other disease? There has been contradictory answers to this.
Where ever possible:
1.use a land line;
2.use text messaging rather than voice;
3.and for voice calls on a mobile, use a headset.

I strictly follow point number 1 and use my home land line to make calls as my dad takes care of paying the phone bill :)

Tuesday, June 27, 2006

Do you Know ??

Do you Know:
How Internet was born?
The History of @ sign?
How VOIP Works?
How the Search engine answers to our queries?
About VoIP and Wi-Fi??

Wanna know??
A single click here will do:

Hope this will be useful to get an overall view about the terms that we hear day-to-day in this techy world.

Tuesday, June 20, 2006

Sources of Inspiration

Right from the Childhood, We are inspired by so... many. Mom,Dad and other relatives will be the initial source of inspiration for a kid. As we grow up, we learn many things from our friends, relatives and others whom we come across in our day to day life. Certainly inspired by certains thoughts and actions of others and we will try to mould ourselves. Same case in me too.. Inspired by lotsa people right from the schooling. When it comes to Tamil Grammar and poem (Ilakkanam and Seiyul) I always remember my Tamil teacher Mrs.Revathi who is no more. When it comes to speaking the truth, being loyal, pious etc., my parents are my role model. (So many things I have learned from them..) . If I start mentioning everyone, it will be a difficult task and the readers (if any) will get bored.

The main reason why I thought of blogging in this topic is, my relative "Sujatha". Only with very few, we get inspired just by talking for a few minutes. With few others, even if we talk for hours together we don't feel happy. Sujatha sister whom I have mentioned here is the former type. I met her for the very first time when i went to my relative's home. Though she is a C.A graduate, married and well settled in life, I could find her behaving in a very humble and modest way. After we got introduced to each other, we started discussing things with the main focus on the work, life and the balancing art of official life with the personal one. When she was telling about her life, few facts she narrated reminded me "Narayana Moorthy" and "Sudha NarayanaMoorthy" life story (/love story) which i read long back in the Net. Too good it was. Each and every line in that story carries sense and it is quite enjoyable. A very healthy relationship I would say.
As a daughter, as a lover, as a wife, as a mother the role palyed by Sudha would be amazing. No words to describe.

In fact, our topic switched over to Sudha's story. One of my friends gave me the print out of this story a few days back which I was having in my bag itself. Almost I have read that story four to five times with my friends, parents, realtives etc., Once again I read it with her and we were quoting the lines we liked the most and chatting. The time I spent with her was really valuable and her humbleness increases my respect on her. Each and every word she uttered has some sense in it and it was purely practical. I couldn't spend much time talking with her. Though its a very short duration, I couldn't forget those golden moments and she is one of the great women I have met.

My dad always used to quote these words "Adakkam Amararul Uikkum" from Thirukkural, which I remembered once again after meeting her.

In this context, these lines from a Carnatic song also comes to my mind:
Thaanenum agandhai thalaikkul eradhu
Thaazhndha nilayilum dharmam maaradhu
vaan pugazh valluvan vagutha nal vazhiyil
vaiyagam vaazhndida varam arul thaaye...


I can continue mentioning everyone's name who has inspired me by leading an example, but as said it will be a lengthy one and I would like to dedicate this post especially to Sujatha. This post may sound so simple, funny or even stupid to others. But I couldn't stop myself from publishing this... Those who have felt wasting time after reading this, kindly pardon me...

Thursday, June 15, 2006

Honesty is the Worst policy :)

"Honesty is the Best policy". Isn't it? But certain bitter experiences of being honest and true to our consience makes me feel honesty is the worst policy and better not to follow that, though i can't. Be it a formal or an informal relationship with a known or an unknown person... i have felt in all the cases.

I would like to share a small experience that i came across.. One fine morning when i was on my way to office, i took my usual route to catch the bus. I need to pass by the nearby Devaki Hospital which is well known for the name as well as the cost they charge (as far as i have heard) . When I was hurrying up, an old woman with a child in her hand stopped me. She said that the child was suffering from some problem in the nostrils and it has to undergo some treatment. Also she said she came to Devaki hospital and the doctors have asked her to take the child to Royapettah Government hospital. And she added that she does not have the bus fair to commute. So i gave her ten rupees for the bus fair and left the place. But, for a moment I thought how this poor lady was able to consult the doctors in this posh hospital. However, I didn't try to analyze more on that.

Two days later, I saw the same lady with a child in front of the same hospital. The worst part is that she started narrating the same story again to me. I really got tensed. In a angry tone I said "Enma rendu naal munnadi dhaane idhe maadhiri kettenga?" (You asked me the same two days before also). She answered "Dharmam dhaana ma" . Right...I do dharmam but she is doing Adharmam..!!

Funniest part is when my friend said yesterday that she met the same lady in the same place :)

Chennai gave a good experience of studying the people!!

I have few other experiences too....!! So i may update this post later.

Thursday, June 08, 2006

Dumping files in Desktop

Most of us have the habit of dumping files in the Desktop.If you also fall in this Lazy category :) here are the few DOS commands which can be clubbed together to create a batch file. A single click on this batch file will group all the files and folders with the timestamp. So before saying "bye-bye" in the Friday evening just a single click will take a backup.

1) To create a folder with the current date and time stamp.
Since a folder can't have \, : etc., we are repalcing them by "-"

md c:\"\%date:\=-% %time::=-%"

2)To copy the files and the folders in the Desktop to c:
copy *.* c:\"\%date:\=-% %time::=-%"
b) To copy a folder

xcopy /e *.* c:\"\%date:\=-% %time::=-%"

That's it..

A folder will be created similar to this:
Thu 06-08-2006 16-20-37.30

Deleting of files can be implemented after this to make the desktop a clean-Desktop :)

Monday, June 05, 2006

First Post

This is my very first post in this blogspace. I have never even thought of blogging . I certainly need to thank all my friends who has inspired me by blogging(A big list... so not mentioning their names). Also a special thanks to writer Sujatha (who has mentioned the blog's importance in his Katradum Petradum book)and Vadivel who has made a special post regarding blogging. So thanks inturn to my friend who lend me that book :)