May
20
2008
Something is technically wrong. This is according to the twitter. I have been trying to access twitter from 6 to 7 hours but unsuccessful as many others. There have number of posts and articles circling around the web expressing this very problem. Certainly twitter needs to upgrade their data center and request handling capacity. Its really frustrating

May
17
2008
Cropper is a screen capture utility written in C#. I really did not know about this cool small utility. I got to know about this tool while reading this blog. I am using it extensively instead of SnagIt. It’s small and really effective for embedding screen shots in documentation and blogs. Moreover useful plugins are also available. Here is a snapshot of cropper.

Happy Cropping
May
13
2008
I have create a PDF file describing the hierarchial structure of LINQ to XML. You can download it from here.
Technorati Tags:
LINQ,
.NET
May
03
2008
Basically ternary operators takes three arguments and sometimes referred as ‘tertiary operator’. At first I don’t know why but I did feel hesitation to use ternary operators as at first it looks petty difficult to understand. Some of my coding friends also rarely use it and may be I got influenced from them. But as I explore coding standards and general patterns of big techies like Google and Yahoo!, I found they use maximum use of ternary operators. Especially in Javascript it does make sense because using them can save your time and size of your code. General syntax for ternary operators in C based languages and its predecessors like like C, C++, Java, C#, PHP, Javascript etc. is like this:
<strong>Condition ? Expression1 : Expression2</strong>
Ternary Operator in Javascript
<span class="kwrd">var</span> flag = <span class="kwrd">true</span>;
alert((flag) ? <span class="str">"Flag is set"</span> : <span class="str">"Flag is not set"</span>);
<a href="http://prajwal-tuladhar.net.np/wp-content/uploads/2008/05/javascript-alert.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" border="0" alt="javascript_alert" src="http://prajwal-tuladhar.net.np/wp-content/uploads/2008/05/javascript-alert-thumb.jpg" width="405" height="175"></a>
Ternary Operator in C#
<span class="kwrd">int</span> flag = 4;
Console.WriteLine((flag >= 5) ? <span class="str">"Flag is more than 4"</span> : <span class="str">"Flag is less 5"</span>);