Saravanavel's profileVels SpacePhotosBlogLists Tools Help

Saravanavel B

Occupation
December 09

Hyderabad Marathon - 10K Run

After an intense practise for a week for the 10 Kms marathon run that happened in Hyderabad, I finally came 8th within Microsoft group in 5Kms corporate run :-) I am actually surprised I was able to complete 10 Kms. Planning to run for 21 Kms Half-marathon next year, lets see how it goes.
 
 
This is what we did for 2 hrs every day in the morning for practise:
0. Jogging and warm up with stretching exercises
1. Ran for 5 Kms on the road
2. Sprinted 100 metres 3 times
3. Cycling at a very high resistance level for 2 mins
4. Treadmill at inclination level 5 for 2 mins
5. Rowing for 2 mins
6. Pushups 15 times
7. Shoulder Pull 15 times
8. Repeated from 3 to 7 again at an increased resistance level
9. Sit-ups 15 times
10. Leg push  10 times
11. Leg pull for calf muscles 10 times
12. Pull ups with leg curls 10 times
13. Ab crunches 20 times
14. 10 min stretching exercises
 
[From L->R in the pic: Rajat, Rajesh, Me, Raja and Bala]
Raja came first within Microsoft group.
June 14

Eat Eggs, Listen To Classical Music To Boost IQ Level

According to scientists, eating eggs and listening to classical music can boost IQ levels. Switching off mobile phones (whose rings can distract a brain that was in deep concentration for as long as 15 minutes) is another way to increase intellect. Scientists were asked to come up with 11 methods to boost brain power that did not involve traditional education. Among the recommendations were high protein food, a good night's sleep and physical and mental workouts, as well as music, medicine and even puzzles such as Sudoku. Fizzy drinks should be avoided but high protein food such as baked beans for breakfast or eggs at lunchtime are good for the brain. Having breakfast of some sort rather than skipping it altogether enhances mental performance. Listening to Mozart in particular has been proved to improve the mind's mathematical capabilities but even having music lessons can boost a child's IQ by two to three points, the scientists said.

Source: 31-05-05   The Tribune Delhi Edition

 

June 03

World Environment Day

Got free pollution check done for my car today in the office and also got three plant saplings :-) Next comes the tough part of taking care of these plants. hopefully the coming monsoon should take care of it.

 

 

March 08

Multilingual web address

Are you guys ready for this:

http://ヒキワリ.ナットウ.ニホン

Its gonna happen sometime in the future if W3C brings this into place :-)

Chk out: http://www.w3.org/International/articles/idn-and-iri/

February 28

Google CodeJam - Some more useful Tips for C++ Programmers

I took part in the google codejam india contest yesterday (Feb 28th). I tried to solve a lot of interesting practise set problems before participating and I learnt a couple of new things in C++ that really helped me accelerate the development. Hope I make it to the next round :-)

1. Given a set of strings separated by a space, You can probably write a custom function that would separate the strings based on strtok and then return back a vector<string>.

I found this method which was faster than that:

// You need to #include <sstream> for this
 istringstream istr;
 istr.str(strDocument);
 string newString;
  vector<string> words;
  while(istr >> newString)  words.push_back(newString);

2. I had another interesting problem - Something about given an input string which is scrambled, We need to find out all permutations of the string to match with a word in a given dictionary.

We can ofcourse write our own algo to get these permutations but I really liked a STL function which was able to do this for me :-)

char input[] = "glob";
while( next_permutation(input,input+4))
     cout << input <<endl;
// This will print all permutations of the input word

3. Some more interesting useful functions were the following:

#include <algorithm>
#include <functional> // for greater<int>() in sorting.

sort(a.begin(),a.end()) ------> ascending order
sort(a.begin(),a.end(),greater<int>())  -----> Descending order

vector<int>::iterator iter  = max_element(a.begin(),a.end()) ; ----> get the max element of a vector( *iter holds the value)
vector<int>::iterator iter  = min_element(a.begin(),a.end()) ; ----> get the min element of a vector( *iter holds the value)

-Vels

Mix languages in the same project in VS 2005

I came across this interesting article by Frank Prengel on "Mixing C++ with C# classes in the same project"

refer: http://blogs.msdn.com/frankpr/archive/2004/07/27/198918.aspx

I tried to do a similar thing with C++ and a VB.Net class, I just followed the steps mentioned in that article and it worked smoothly.

Just a couple of observations:

1. I had a C++ project linked with C# and VB.Net class. I didnt know how to add multiple .netmodules to the linker property. I tried "," and ";" and all failed. I later realised I had to enter them in new lines.

2. The intellisense across languages work only after you compile them first. Adding new methods in VB.Net wont be reflected in a C++ file in the project unless you compile it first.

 

 
Photo 1 of 16