Posts

Showing posts from May, 2009

Cannot delete folder

"Make sure the disk is not full or write-protected and that the file is not currently in use" Familiar? Here's an amazing little app for this long standing Windows annoyance.

ie8 dns cache clear

Basically IE8 was giving a "cannot display the webpage" for old sites and Outlook 2007 was down too. Firefox was working fine. IE8 seems to do some kind of DNS caching of its own and the only way out seems to be to "reset" advanced settings. Outlook 2007 seems to somehow depend on IE8 for connections too and once this was done, they both worked.

Long-term Capital Gains Tax India

Long-term Capital Gains Tax is charged if • Capital assets are held for more than three years and • In case of shares, securities listed on a recognized stock exchange in India, units of specified mutual funds, the period for holding is one year. Long-term capital gains are taxed at a basic rate of 20%. However, long-term capital gain from sale of equity shares or units of mutual funds are exempt from tax

Fixed Income Securities in India

A good link on Government Securities (G-Secs), Corporate Bonds and Debentures .

Dow vs SNP500

Year Avg Dow/Snp 2009 9.58 2008 9.25 2007 8.92 2006 8.71 2005 8.74 2000 7.52 1995 8.3 1990 8.01 1985 7.11 1980 7.52 1975 9.31 1970 9.07 1965 10.33 1960 11.06 1955 10.95 1950 11.76 Dow/Snp Min 6.86 Max 11.99

Multiplication tables with one loop/variable

// Multiplication tables int  n = 3; //Basic two loop code for  ( int  a = 1; a <= n; a++)      for  ( int  b = 1; b <= n; b++)          Console .WriteLine( "{0} x {1} = {2}" , a, b, a * b); //One loop variation for  ( int  a = 0; a < n * n; a++)      Console .WriteLine( "{0} x {1} = {2}" , (a / n) + 1, (a % n) + 1, ((a / n) + 1) * ((a % n) + 1));             

Fibonacci solutions :)

///  Impressive solution static   void  Main2( string [] args) {      int  t1 = 0, t2 = 0, i = 0, j = 1, count = 15;      Console .WriteLine(i);      Console .WriteLine(j);      for  ( int  a = 1; a < count; a++)     {          int  localval;          if  (a == 1)         {             t1 = i;             t2 = j;         }          else         {             localval = t1;             t1 = t2;             t2 = localval + t2;         }          if  (a == 1)              continue ;          Console .WriteLine(t2);     } } ///  Preferable solution :) static   void  Main( string [] args) {      int  i = 0, j = 1;      for  ( int  a = 1; a < 15; a++)     {          Console .WriteLine(i);         j += i;         i = j - i;     } }