Rajesh's Blog

My Photo
Location: Bangalore, India

Tips to Reduce Abdominal Fat!

Friday, October 28, 2005

Create Controls on the fly...

Create Controls at Run time in VB6

You can create a control at run time in vb6 and add it to a form. But to do this you should be aware of the progid of the control to be created. ProgIDs are defined as direct sub keys of the top-level HKEY_CLASSES_ROOT key in the registry. You set the properties of the controls once it is created.

The following function creates a Label object and add it to a form.

Public Sub addLabel(frmCurrent As Form)
Dim lblFoo As Label

Set lblFoo = frmCurrent.Controls.Add("VB.Label", "lblFoo")

With lblFoo
.Left = 100
.Top = 100
.Caption = "Just Created"
.Visible = True
End With
End Sub

Load Controls at Run time in VB6

To add controls at run time, there must already be at least one instance of the control on the form and it must be part of a control array.

When the program runs, you add additional controls with the Load statement: Load ControlName(Index).

ControlName refers to the Name property of the control array you created and Index is the Index property of the new control. You should start at 1 because Index 0 is already taken by the control you placed on the form at design time.

Each control that you add in this way initially has the same properties as the original control. You'll have to position the control to prevent all the added controls from displaying at the same position on screen and set visible property to True.

Diwali - The Festival of Light

Diwali, the Festival of Lights, is celebrated with enthusiasm and gaiety. The festival is celebrated by all people viz young and old, rich and poor, across the nation to dispel darkness and light up their lives. This festival is celebrated differently in every states in their own way. symbolizes unity in diversity. However Diwali is not widely celebrated in Kerala unlike the neighbours Tamilnadu and Karnataka but widely celebrated in North India.

Aswayuja Bahula Chaturdasi kick starts the four day festival and concludes on Kartika Shudda Vijiya. The first day of this festival marks the vanquishing of the demon Naraka by Lord Krishna and his wife Satyabhama.

People believe as said it in 'Puranas' that Naraka, son of Bhudevi, acquired enormous power from Lord Brahma after a severe penance. He then unleashed a reign of terror in the kingdom of Kamarupa, harassing celestial beings with his unconquerable might. The celestial beings pleaded with Lord Krishna to save them from his torture once they were unable to bear the tyranny of the demon. But Naraka could not be easily killed as he had a boon that he would face death only at the hands of his mother Bhudevi. So, Krishna asks his wife Satyabhama, the reincarnation of Bhudevi, to be his charioteer in the battle with Naraka. Then Krishna started fight with Naraka. When Krishna feigns unconsciousness after being hit by an arrow of Naraka, Satyabhama takes the bow and aims the arrow at Naraka, killing him instantly. Later Lord Krishna reminds her of the boon she had sought as Bhudevi.

The slaying of Naraka by Sathyabhama could also be taken to interpret that parents should not hesitate to punish their children when they stray on to the wrong path.

The second day is Amavasya when Lakshmi puja is performed. It is believed that on this day Goddess Lakshmi would be in her benevolent mood and fulfill the wishes of her devotees. One version says that it was on this day that Goddess Lakshmi emerged from Kshira Sagara (Ocean of Milk) when the Gods and demons were churning the sagara (ocean) for nectar (Amrit)

Third day - Actual Diwali day, is celebrated on the third day of the festival, when the moon completely wanes and total darkness sets in the night sky. It is in this darkness, that Diwali finds its true expression. On this day people worship Lakshmi, the goddess of wealth and express their gratitude for previous favors.

The fourth day is referred to as "Yama Dvitiya." On this day, sisters invite their brothers to their homes.

However, in the northern part of India it is celebrated as the return of Ram along with Sita and Lakshman from his 14 years of exile after killing Ravana. To commemorate his return to Ayodhya, his subjects illuminated the kingdom and burst crackers.

Happy Diwali...Greetings...

Thursday, October 27, 2005

BMP Image Format

The BMP file format is the standard for a Windows 3.0 or later DIB(device independent bitmap) file.

A BMP file contains the following data structures:

HEADER bmfh;
RGBQUAD aColors[];
BYTE aBitmapBits[];

HEADER contains some information about the bitmap file. INFOHEADER contains information about the bitmap such as size, colors. The RGBQUAD array contains a color table. The rest is the image data, which format is specified by the bmih structure.

You can explore more about this and sample codes at

BMI - Body Mass Index

BMI measures your height/weight ratio. It is your weight in kilograms divided by the square of your height in meters.

BMI = Weight/(Height * Height) where Weight & Height measured in SI system

For instance, if your height is 1.70 meters, the divisor of the calculation will be (1.70 * 1.70) = 2.89. If you weigh 64.0 kilograms, then your BMI is 22.14 (64.0 / 2.89).

Significance of BMI Values is as follows.

18.5 or less Underweight
18.5 - 24.9 Normal
25.0 - 29.9 Overweight
30.0 - 34.9 Obese
35.0 - 39.9 Obese
40 or greater Extremely Obese

Above all, don’t Worry, Be Happy. It’s unhealthy to have anxiety over a less-than-perfect body image. If BMI description of your body seems wrong for you, just trust your own judgment.

A healthy mental attitude is just as important as physical fitness

Pascal's Triangle

The r th element of Pascal's Triangle at n th row is computed as

m = n!/(r!*(n-r)!)

Typical o/p would be
1 1
1 2 1
1 3 3 1
1 4 6 4 1

A typical program to print Pascal's Triangle developed in c goes as below.

extern long fact(int n);
void PascalsTriangle()
int n,r,i;
long m;


printf("Enter the no. of rows required");

for(i=0; i< n;i++)
m = fact(i)/(fact(r) * fact(i-r));

/*Function: Factorial
Use: This would return the factorial of the number passed.*/

long fact(int n)
long f;

return (1);

while (n>1)
return (f);

Wednesday, October 26, 2005

Love is like that...

A Nice Article By Swami Vivekananda...

I once had a friend who grew to be very close to me.
Once when we were sitting at the edge of a swimming pool, she
filled the palm of her hand with some water and held it
before me, and said this:
"You see this water carefully contained on my hand? It
symbolizes Love."
This was how I saw it:
As long as you keep your hand caringly open and allow it to
remain there, it will always be there. However, if you
attempt to close your fingers round it and try to posses it,
it will spill through the first cracks it finds
This is the greatest mistake that people do when they meet
love...they try to posses it, they
demand, they expect... and just like the water spilling out
of your hand, love
will retrieve from you. For love is meant to be free, you
cannot change its nature. If there are people you love, allow
them to be free beings.
Give and don't expect.
Advise, but don't order.
Ask, but never demand.
It might sound simple, but it is a lesson that may take a
lifetime to truly practice. It is the secret to true love. To
truly practice it, you must sincerely feel no expectations
from those who you love, and yet an unconditional caring."
Passing thought...
Life is not measured by the number of breaths we take; but by
the moments that take our breath away.....
Life is beautiful!!!
Live it !!!

Stretching Exercises

The following are examples of dynamic stretching and mobility exercises, which could form part of the warm up program in a training session. The dynamic exercises you incorporate into your warm up program should be appropriate to the movements you would experience in your sport/event. In all the exercises breathe easily whilst performing them.

The Exercises
Joint Rotations
From a standing position with your arms hanging loosely at you sides, flex, extend, and rotate each of the following joints:
Fingers, Wrist, Elbows, Shoulders, Neck, Trunk and shoulder blades, Hips, Knees, Ankles, Feet and toes

Neck Mobility
Flexion/Extension - Tuck your chin into your chest, and then lift your chin upward as far as possible. 6 to 10 repetitions Lateral Flexion - lower your left ear toward your left shoulder and then your right ear to your right shoulder. 6 to 10 repetitions Rotation - Turn your chin laterally toward your left shoulder and then rotate it toward your right shoulder. 6 to 10 repetitions

Shoulder Circles
Stand tall, feet slightly wider than shoulder-width apart, knees slightly bent Raise your right shoulder towards your right ear, take it backwards, down and then up again to the ear in a smooth action Repeat with the other shoulder.

Arm Swings
Stand tall, feet slightly wider than shoulder-width apart, knees slightly bent Keep the back straight at all times Overhead/Down and back - Swing both arms continuously to an overhead position and then forward, down, and backwards. 6 to 10 repetitions Side/Front Crossover - Swing both arms out to your sides and then cross them in front of your chest. 6 to 10 repetitions

Side Bends
Stand tall with good posture, feet slightly wider than shoulder-width apart, knees slightly bent, hands resting on hips Lift your trunk up and away from your hips and bend smoothly first to one side, then the other, avoiding the tendency to lean either forwards or backwards Repeat the whole sequence sixteen times with a slow rhythm, breathing out as you bend to the side, and in as you return to the centre.

Hip circles and twists
Circles - With your hands on your hips and feet spread wider than your shoulders, make circles with your hips in a clockwise direction for 10 to 12 repetitions. Then repeat in a counter clockwise direction Twists - Extend your arms out to your sides, and twist your torso and hips to the left, shifting your weight on to the left foot. Then twist your torso to the right while shifting your weight to the right foot. 10 to 12 reps on each side.

Half Squat
Stand tall with good posture holding your hands out in front of you for balance Now bend at the knees until your thighs are parallel with the floor Keep your back long throughout the movement, and look straight ahead Make sure that your knees always point in the same direction as your toes Once at your lowest point, fully straighten your legs to return to your starting position Repeat the exercise sixteen times with a smooth, controlled rhythm Breath in as you descend, and out as you rise.

Leg Swings
Flexion/Extension - Stand sideways onto the wall Weight on your left leg and your right hand on the wall for balance Swing your right leg forward and backward 10 to 12 repetitions on each leg Cross-Body flexion/Abduction - Leaning slightly forward with both hands on a wall and your weight on your left leg, swing your right leg to the left in front of your body, pointing your toes upwards as your foot reaches its furthest point of motion Then swing the right leg back to the right as far as comfortable, again pointing your toes up as your foot reaches its final point of movement 10 to 12 repetitions on each leg.

Standing tall both feet together (starting position) Keeping the back straight lunge forward with the right leg approx 1 to 1½ metre The right thigh should be parallel with the ground and the right lower leg vertical Spring back to the starting position Repeat with the left leg 12 to 16 repetitions on each leg.

Ankle Bounce
Double leg bounce - Leaning forward with your hands on the wall and your weight on your toes, raise and lower both heels rapidly (bounce) Each time, lift your heels one to two inches from the ground while maintaining ground contact with the ball of your feet 12 to 16 repetitions

Single leg bounce - leaning forward with your hands on a wall and all your weight on your left foot, raise the right knee forward while pushing the left heel towards the ground Then lower the right foot to the floor while raising the left heel one or two inches Repeat in a rapid, bouncy fashion 12 to 16 repetitions on each leg

25 things to avoid in Resume

So, you're experienced? Before you advertise this in your resume, be sure you can prove it.

Often, when job seekers try to sell themselves to potential employers, they load their résumés with vague claims that are transparent to hiring managers, according to Scott Bennett, author of "The Elements of Résumé Style" (AMACOM). By contrast, the most successful job seekers avoid these vague phrases on their résumés in favor of accomplishments.

Instead of making empty claims to demonstrate your work ethic, use brief, specific examples to demonstrate your skills. In other words, don't tell.

Bennett offers these examples:

Instead of... "Experience working in fast-paced environment"Try... "Registered 120+ third-shift emergency patients per night"

Instead of... "Excellent written communication skills"Try... "Wrote jargon-free User Guide for 11,000 users"

Instead of... "Team player with cross-functional awareness"Try... "Collaborated with clients, A/R and Sales to increase speed
of receivables and prevent interruption of service to clients."

Instead of... "Demonstrated success in analyzing client needs"Try... "Created and implemented comprehensive needs assessment
mechanism to help forecast demand for services and staffing."

The worst offenders
It's good to be hard-working and ambitious, right? The hiring manager won't be convinced if you can't provide solid examples to back up your claims. Bennett suggests being extra-careful before putting these nice-sounding but empty words in your résumé.

People person
Team player

Tuesday, October 25, 2005

Slope of a straight line!!!

Slope of a line is defined as the ratio of y coordinate difference to x coordinate difference.
For eg. the slope of a line (m) passing through points (x1, y1) and (x2,y2) is m = (y2-y1)/(x2-x1).

Slope of a line perpendicular another line would be the negative reciprocal slope.
ie, slope of line perpendicular (m2) to a line having slope m is

m2 = -(1/m)

The general equation of a line is y-y1 = m(x -x1) + c where c is the y intercept and passing through (x1,y1) having slope m.

You can find the equation of a line perpendicular to this line as well by finding slope of this line.
You cam have more info on this at http://mathforum.org/library/drmath/view/66642.html

Visit http://www.analyzemath.com/EllipseEq/EllipseEq.html for applet to explore the properties of circle, ellipse, parabola and hyperbola

Saturday, October 08, 2005

Working on Saturday - 8th October

It has been declared that Friday - 14th October will be a holiday for Tavantians in Bangalore. This is to enable us to enjoy an extended weekend of 5 days from 12th to 16th October following Navaratri festival holidays. Most of the guys around here have already planned the holidays to go native, meet friends, trekking or pilgrimage. I am going my village, which is my best holiday place.
Unlike a usual Saturday, it was bit hard today to work. I was into the documentation side of our project. But i felt very much like a usual working day once reached office and engaged in work and team meeting. Also we are celebrating DANDIYA today at Tavant. A big stage is set for celebration.
Dandiya Festival it is actually called as Navaratri festival, which is celebrated for nine days in which we worship Goddess DurgaMa, AmbeMa, KaliMa all these are different name but the goddess is one and the same. These festival is celebrated with great devotion by all Hindu people, but especially Gujarathi cast people celebrate it more. In these festival people keep idols of goddess Durga in their house or in public place and worship her daily for nine days.

Friday, October 07, 2005

Importance of Exercise

Most of the people are not aware that exercise is the best remedy to heal pain. You can keep yourself secured from many kinds of body pain through regularl exercise.
Exercise will help you in strengthening your muscles and the flexibility of the same, which in turn improve the health. If you have the habit of regular exercise, you can improve the strength of body muscles including cardiac muscles, diabetes and cholesterol level and your over all physical as well as mental strength.

By working out on a regular basis, your body becomes more efficient at burning calories. This gives you more energy throughout the day. But one need to do the right amount of exercise, over exercising can weaken your immune system and make you sick.

Improved Self-Esteem
When following an exercise regimen for a regular basis, you bring about greater self-esteem through the results and accomplishment achieved.

Live for knowledge and health, everything essential in life will naturally come to you.

Thursday, October 06, 2005

About Me

Am Rajesh hail from a beautiful Village called Kummanam in Kottayam District of Kerala State, India. I did my schooling at M.D. Seminary High School, Kottayam and bachelors degree in electronics Engineering at Govt: Model Engg. College, Cochin (www.mec.ac.in). Currently living in Bangalore, India with my wife, Smitha, and working for Tavant Technologies (www.tavant.com), Bangalore.