Thursday 22 January 2009

Vedic Math Part-1

What is a Number? Why students afraid to play with numbers?

These questions lead me to explore more on Vedic mathematics and found some interesting tips & tricks that will help to do your math calculation easily , without the help of Calculator.

“Vedic Mathematics is the name given to the ancient system of Mathematics which was rediscovered from the Vedas between 1911 and 1918 by Sri Bharati Krsna Tirthaji (1884-1960). According to his research all of mathematics is based on sixteen sutras, or word-formulae. For example, 'Vertically and Crosswise` is one of these Sutras. These formulae describe the way the mind naturally works and are therefore a great help in directing the student to the appropriate method of solution”.

Sharing some tips/tricks that I have learned, (start practising or teach your kids :-))


How to find the square of a number?

Ans: - #1) Generic way

[ Eg:- 8 x 8 = ?

Take 10 as base ,

step i) then find how much less/surplus is 8 from 10

i.e 8 -10 = -2 ( 8 is less than 10 so -2)

step ii) add less/surplus from the actual number, this will be right hand side digit

i.e (8-2) = 6

step iii) take the sqaure of surplus/less , this will be left hand digit

(-2) x (-2) = 4

So the answers is 64.

Similarly , 7 x 7 = ( 7 + ( 7 - 10)) ( (7-10) x (7-10) ) = ( 7 - 3) (-3 x -3) = 4 9

12 x 12 = ( 12 + (12 - 10) ) ( (12 - 10) x (12 - 10) ) = (12 + 2) (2 x 2) = 14 4 ( Note:- 12 is greater than 10 , so +2 )

try 13 x 13 = ?

]

#2) Square of number that ends with 5

15 x 15 = ?

Take the suqare of lefthand digit , ie 5 x 5 =25

add + 1 to right hand digit/digits and multiply that number with actual number ie 1 x (1 + 1 ) = 2

Answers is 2 25 , i.e. (1 x (1 + 1 )) ( 5 x 5 )

25 x 25 = ( 2 x ( 2 + 1) ) (5 x 5) = ( 2 x 3 ) 25 = 6 25

more to follow…….

Thursday 8 January 2009

Satyam/Asatyam SAGA

Satyam Shivam Sundaram (meaning, "Truth is God and God is beautiful") , but not in the case of India's fourth largest IT company
(http://profit.ndtv.com/2009/01/07113013/Satyam-chairman-Ramalinga-Raju.html).

I hope SEBI will act quickly & will save the image of Indian IT industry.

Sunday 4 January 2009

Screencast- Sorting the contents of CSV file

This screencast shows how to sort the contents of CSV file using Microsoft Text Driver and ADODB. (Note:- you can watch the same screencast here http://video.google.com/googleplayer.swf?docid=2082004182954594811&hl=en&fs=true in a better resolution)



Code Snippet
-------------
private void button1_Click(object sender, EventArgs e)
{
Connection connection = null;
try
{
connection = new ConnectionClass();

string connectionString =
"Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=" + Path;//eg:- Path= "c:\Data"

//Void Open(string ConnectionString,string UserID,string Password,int Options)
connection.Open(connectionString, "", "", (int)ConnectModeEnum.adModeUnknown);

string strSql = string.Format("Select * FROM {0} ORDER BY Name,{1} desc", FileName, FieldToSort); // filename="SampleData.csv" , FieldToSort = "ID"

object obj;
//Recordset Execute(string CommandText,out object RecordsAffected,int Options)
Recordset rs = connection.Execute(strSql, out obj, (int)CommandTypeEnum.adCmdText);

DisplayData(rs);

rs.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
{
if(connection != null && connection.State != (int)ConnectionState.Closed)
connection.Close();
}
}

private void DisplayData(Recordset rs)
{
string strToDisplay = string.Empty;

//show field names
for(int i=0 ; i<rs.Fields.Count ; i++)
{
strToDisplay += rs.Fields[i].Name + ",";
}

strToDisplay = strToDisplay.Trim(',') + Environment.NewLine;

//recordsetobject.GetString (StringFormat, NumRows, ColumnDelimiter, RowDelimiter, NullExpr)
strToDisplay += rs.GetString(StringFormatEnum.adClipString,-1,",",Environment.NewLine,string.Empty);

textBox1.Text = strToDisplay;

}

Friday 2 January 2009

2008 Walk through

Well!!! main event that happend in 2008 was my marriage,on Aug/17/2008 and it was an arranged marriage.The arragement factor (or unexpected factor) involved in my marriage might have disappointed my female fans :-) (just kidding!!!!!).

First step to Blogging world.

Today I have created new blogging site with the help of internet giant google.