Thursday, May 28, 2009

C# Events Example

First u hav Number Class

//Numbers.cs

using System;
public delegate int intDel();
public class Numbers
{
public event intDel  NegativeNumber;
public event intDel  GreaterThanHundered;
public event intDel  ValueChanged;

int _x =0;
public int X{
    get{
return _x;   
    }
    set{
if (value==0)
return;
_x+=value;
ValueChanged();
      if (_x<0)
NegativeNumber() ;
if(_x>100)
GreaterThanHundered();
     }
 }
}


Next u hav Sample class

//Sample.cs

using System;
public class sample
{
Numbers obj;
intDel d;
public static void Main(string[] args) {
sample s=new sample();
s.obj=new Numbers();
s.obj.GreaterThanHundered+=new intDel(s.maxNumber );
s.obj.NegativeNumber+=new intDel(s.negativeNumber );
s.d=new intDel(s.change );
s.obj.ValueChanged+=s.d;
s.obj.ValueChanged+=new intDel(s.Log);

Console.WriteLine(s.obj.X.ToString());
s.obj.X=Convert.ToInt32(args[0]);
Console.WriteLine("***********");
s.obj.X=(Convert.ToInt32(args[0])*100);
}
private int maxNumber(){
Console.WriteLine("Value > 100");
return 0;
}
private int negativeNumber(){
Console.WriteLine("Value <>
return 0;
}
private int change(){
Console.WriteLine("value Changed : "+ obj.X.ToString());
obj.ValueChanged-=this.d;
return 0;
}
private int Log(){
Console.WriteLine("value Logged : "+ obj.X.ToString());
return 0;
}

}


Tuesday, May 26, 2009

C# Delegates - Example...

First u have a Subscriber Class

//Subscriber.cs

using System;
public class Subscriber{
public void GreaterThanHundred(Numbers source){
Console.WriteLine("*****GreaterThanHundred "+source.Num);
}
public void LessThanZero(Numbers source){
Console.WriteLine("*****LessThanZero "+source.Num);
}
public void ValueUpdated(Numbers source){
Console.WriteLine("*****ValueUpdated "+source.Num);
}
public void LogChange(Numbers source){
Console.WriteLine("*****LogChange "+source.Num);
}

}

//Numbers.cs

public delegate void Numberdel(Numbers source);

public class Numbers{

//attributes
private int num=70;

//events
public Numberdel ValueChanged;
public Numberdel LargeNumber;
public Numberdel NegativeNumber;

//properties

public int Num{
get{
 return num;
}
set{
if (0==value)
return;
num+=value;
ValueChanged(this);//raise an event
if(num>100)
LargeNumber(this);//raise an event
if(num<0)
NegativeNumber(this);//raise an event
}
}
}

Atlast u hav Mediator Class

//Mediator.cs

public class Mediator{
  public static void Main(System.String[] args){
Numbers obj= new Numbers();
Subscriber s=new Subscriber();
obj.ValueChanged=new Numberdel(s.ValueUpdated);
obj.ValueChanged+=new Numberdel( s.LogChange);
obj.LargeNumber=new Numberdel(s.GreaterThanHundred);
obj.NegativeNumber=new Numberdel(s.LessThanZero);
obj.Num=int.Parse(args[0]);

  }
  
 }





Sunday, May 24, 2009

50 COMMON INTERVIEW QUESTIONS AND ANSWERS

 50 COMMON INTERVIEW QUESTIONS AND ANSWERS

1. Tell me about yourself:

The most often asked question in interviews. You need to have a short statement prepared in your mind. Be careful that it does not sound rehearsed. Limit it to work-related items unless instructed otherwise. Talk about things you have done and jobs you have held that relate to the position you are interviewing for. Start with the item farthest back and work up to the present.

2. Why did you leave your last job?

Stay positive regardless of the circumstances. Never refer to a major problem with management and never speak ill of supervisors, co-workers or the organization. If you do, you will be the one looking bad. Keep smiling and talk about leaving for a positive reason such as an opportunity, a chance to do something special or other forward-looking reasons.

3. What experience do you have in this field?

Speak about specifics that relate to the position you are applying for. If you do not have specific experience, get as close as you can.

4. Do you consider yourself successful?

You should always answer yes and briefly explain why. A good explanation is that you have set goals, and you have met some and are on track to achieve the others.

5. What do co-workers say about you?

Be prepared with a quote or two from co-workers. Either a specific statement or a paraphrase will work. Jill Clark, a co-worker at Smith Company, always said I was the hardest worker she had ever known. It is as powerful as Jill having said it at the interview herself.

6. What do you know about this organization?

This question is one reason to do some research on the organization before the interview. Find out where they have been and where they are going. What are the current issues and who are the major players?

7. What have you done to improve your knowledge in the last year?

Try to include improvement activities that relate to the job. A wide variety of activities can be mentioned as positive self-improvement. Have some good ones handy to mention.

8. Are you applying for other jobs?

Be honest but do not spend a lot of time in this area. Keep the focus on this job and what you can do for this organization. Anything else is a distraction.

9. Why do you want to work for this organization?

This may take some thought and certainly, should be based on the research you have done on the organization. Sincerity is extremely important here and will easily be sensed. Relate it to your long-term career goals.

10. Do you know anyone who works for us?

Be aware of the policy on relatives working for the organization. This can affect your answer even though they asked about friends not relatives. Be careful to mention a friend only if they are well thought of.

11. What kind of salary do you need?

It is a loaded question. It is also a nasty little game that you will probably lose if you answer first. So, do not answer it. Instead, say something like; that's a tough question. Can you tell me the range for this position? In most cases, the interviewer, taken off guard, will tell you. If not, say that it can depend on the details of the job. Then give a wide range.

12. Are you a team player?

You are, of course, a team player. Be sure to have examples ready. Specifics that show you often perform for the good of the team rather than for yourself are good evidence of your team attitude. Do not brag; just say it in a matter-of-fact tone? This is a key point.

13. How long would you expect to work for us if hired?

Specifics here are not good. Something like this should work: I'd like it to be a long time. Or As long as we both feel I'm doing a good job.

14. Have you ever had to fire anyone? How did you feel about that?

This is serious. Do not make light of it or in any way seem like you like to fire people. At the same time, you will do it when it is the right thing to do. When it comes to the organization versus the individual who has created a harmful situation, you will protect the organization. Remember firing is not the same as layoff or reduction in force.

15. What is your philosophy towards work?

The interviewer is not looking for a long or flowery dissertation here. Do you have strong feelings that the job gets done? Yes. That's the type of answer that works best here. Short and positive, showing a benefit to the organization.

16. If you had enough money to retire right now, would you?

Answer yes if you would. But since you need to work, this is the type of work you prefer. Do not say yes if you do not mean it.

17. Have you ever been asked to leave a position?

If you have not, say no. If you have, be honest, brief and avoid saying negative things about the people or organization involved.

18. Explain how you would be an asset to this organization

You should be anxious for this question. It gives you a chance to highlight your best points as they relate to the position being discussed. Give a little advance thought to this relationship.

19. Why should we hire you?

Point out how your assets meet what the organization needs. Do not mention any other candidates to make a comparison.

20. Tell me about a suggestion you have made

Have a good one ready. Be sure and use a suggestion that was accepted and was then considered successful. One related to the type of work applied for is a real plus.

21. What irritates you about co-workers?

This is a trap question. Think real hard but fail to come up with anything that irritates you. A short statement that you seem to get along with folks is great.

22. What is your greatest strength?

Numerous answers are good, just stay positive. A few good examples: Your ability to prioritize, Your problem-solving skills, Your ability to work under pressure, Your ability to focus on projects, Your professional expertise, Your leadership skills, Your positive attitude.

23. Tell me about your dream job.

Stay away from a specific job. You cannot win. If you say the job you are contending for is it, you strain credibility. If you say another job is it, you plant the suspicion that you will be dissatisfied with this position if hired. The best is to stay genetic and say something like: A job where I love the work, like the people, can contribute and can't wait to get to work.

24. Why do you think you would do well at this job?

Give several reasons and include skills, experience and interest.

25. What are you looking for in a job?

Same answer as answer no 23

26. What kind of person would you refuse to work with?

Do not be trivial. It would take disloyalty to the organization, violence or lawbreaking to get you to object. Minor objections will label you as a whiner.

27. What is more important to you: the money or the work?

Money is always important, but the work is the most important. There is no better answer.

28. What would your previous supervisor say your strongest point is?

There are numerous good possibilities:

Loyalty, Energy, Positive attitude, Leadership, Team player, Expertise, Initiative, Patience, Hard work, Creativity, Problem solver

29. Tell me about a problem you had with a supervisor

Biggest trap of all. This is a test to see if you will speak ill of your boss. If you fall for it and tell about a problem with a former boss, you may well below the interview right there. Stay positive and develop a poor memory about any trouble with a supervisor.

30. What has disappointed you about a job?

Don't get trivial or negative. Safe areas are few but can include:

Not enough of a challenge. You were laid off in a reduction Company did not win a contract, which would have given you more responsibility.

31. Tell me about your ability to work under pressure.

You may say that you thrive under certain types of pressure. Give an example that relates to the type of position applied for.

32. Do your skills match this job or another job more closely?

Probably this one. Do not give fuel to the suspicion that you may want another job more than this one.

33. What motivates you to do your best on the job?

This is a personal trait that only you can say, but good examples are:

Challenge, Achievement, Recognition

34. Are you willing to work overtime? Nights? Weekends?

This is up to you. Be totally honest.

35. How would you know you were successful on this job?

Several ways are good measures:

You set high standards for yourself and meet them. Your outcomes are a success. Your boss tell you that you are successful

36. Would you be willing to relocate if required?

You should be clear on this with your family prior to the interview if you think there is a chance it may come up. Do not say yes just to get the job if the real answer is no. This can create a lot of problems later on in your career. Be honest at this point and save yourself future grief.

37. Are you willing to put the interests of the organization ahead of your own?

This is a straight loyalty and dedication question. Do not worry about the deep ethical and philosophical implications. Just say yes.

38. Describe your management style.

Try to avoid labels. Some of the more common labels, like progressive, salesman or consensus, can have several meanings or descriptions depending on which management expert you listen to. The situational style is safe, because it says you will manage according to the situation, instead of one size fits all.

39. What have you learned from mistakes on the job?

Here you have to come up with something or you strain credibility. Make it small, well-intentioned mistake with a positive lesson learned. An example would be working too far ahead of colleagues on a project and thus throwing coordination off.

40. Do you have any blind spots?

Trick question. If you know about blind spots, they are no longer blind spots. Do not reveal any personal areas of concern here. Let them do their own discovery on your bad points. Do not hand it to them.

41. If you were hiring a person for this job, what would you look for?

Be careful to mention traits that are needed and that you have.

42. Do you think you are overqualified for this position?

Regardless of your qualifications, state that you are very well qualified for the position.

43. How do you propose to compensate for your lack of experience?

First, if you have experience that the interviewer does not know about, bring that up: Then, point out (if true) that you are a hard working quick learner.

44. What qualities do you look for in a boss?

Be generic and positive. Safe qualities are knowledgeable, a sense of humor, fair, loyal to subordinates and holder of high standards. All bosses think they have these traits.

45. Tell me about a time when you helped resolve a dispute between others.

Pick a specific incident. Concentrate on your problem solving technique and not the dispute you settled.

46. What position do you prefer on a team working on a project?

Be honest. If you are comfortable in different roles, point that out.

47. Describe your work ethic.

Emphasize benefits to the organization. Things like, determination to get the job done and work hard but enjoy your work are good.

48. What has been your biggest professional disappointment?

Be sure that you refer to something that was beyond your control. Show acceptance and no negative feelings.

49. Tell me about the most fun you have had on the job.

Talk about having fun by accomplishing something for the organization.

50. Do you have any questions for me?

Always have some questions prepared. Questions prepared where you will be an asset to the organization are good. How soon will I be able to be productive? and what type of projects will I be able to assist on? are examples.

Thursday, May 21, 2009

The Common Cold - Treatment

The Common Cold

The common cold is a common annoyance to millions of people each year, particularly in the winter months. The cold, which can be caused by hundreds of different viruses, is an incredibly infectious respiratory infection that usually lasts about a week or so. Once you’ve become infected with the virus,it will take a couple days before symptoms start to appear. Once they do, be careful! the first three or four days of a cold are when you are contagious and most likely able to pass it on to other people. In most cases an over the counter medication is sufficient, but if you’re afraid it may be a bacterial infection consult your doctor. The symptoms of the common cold are as follows.

Symptoms

A ‘sick’ ‘under the weather’ feeling

Sneezing

Head and chest congestion

Runny nose

Post-nasal drip

Sore throat

Stiff joints and muscle aches

Headaches

Sleepy, weary, worn out

Chills

Fever (usually small)

Watery eyes

**If ANY of these symptoms are present along with some the ones above you may have Meningitis

- get emergency medical help IMMEDIATELY.

- Seizures

- Red blotches on skin, different from being flushed, look somewhat like wounds. (Septicemia)

- Pale blotchy skin (in young children)

Also seek professional advice in these cases:

If an infant (under 3 months) is showing any of the symptoms

If your throat is very sore, you have a high temperature and symptoms seem to    be getting worse

If you’re having trouble breathing, or are wheezing

If your temperature is very high- this may be a sign of pneumonia, get help immediately

If you are pregnant or breastfeeding

If the cold lasts for longer than 2 weeks and symptoms seem like they’re    getting worse

Treatment

Besides handy over the counter medications (Triaminic, vapor rubs etc), and lozenges (cough drops) for a sore throat there are many other things you can do to fight off a cold.

Vapor – By inhaling some vapor, you’ll loosen up some of the congestion, which will make it easier to breathe and will help to clear out your system. Heat up some water so that it’s steaming, and keep it near you so you can inhale the fumes. This may make it easier to fall asleep at night. You can also sit over the fumes, and by placing a towel over your head and the bowl you create a tent where the fumes are trapped. If the fumes are hot enough you’ll kill some of the germs off as well.

Foods - Fruits and vegetables are a must. Spicy foods may also help to clear out your system, as will garlic and onions. Avoid dairy products as they’ll lead to the formation of more mucus, and try to leave large amounts of egg, starch, and sugar out of your diet for a while as well. If you’re feeling nauseous avoid anything greasy. Try and eat nutritiously, it’ll help you get better faster and make you healthier so that you have a better chance of fighting off future colds.

Drink - Water, water, everywhere- that’s what you need to drink. Water helps you flush out your system, so it’s absolutely vital to drink when you’ve got a cold. Juices, especially citrus drinks, are also good for you. Hot tea, will make you feel better as well- it’s tasty and it has vapors which will help clear your nasal passages. Again avoid dairy. If you’re nauseous a small amount of a slightly sweet sodalike ginger ale- will help settle your stomach.

Other - If you like natural remedies, try some Echinacea at the first sign of symptoms. This will stop the infection from reaching it’s full potential and will therefore reduce the severity of the cold. Also avoid things like cigarettes during this time as they may aggravate your condition.

Prevention

It’s difficult to avoid the common cold- particularly during the cold season- but you can do many things to lessen your chances of contracting it.

Keep yourself healthy. Good diet, exercise, avoid smoking and drinking

Wash your hands often- germs can survive for a few hours without a host, so   anything you touch that someone who is sick has touched has potential to get     you sick.

If you’re already sick cover your mouth and nose when you sneeze and cough, and keep your own hands clean. This will help stop the spreading of germs.

Tuesday, May 19, 2009

Jokes

Maid: What do you want, sir?

Visitor: I want to see your master.

Maid: What’s your business, please?

Visitor: There is a bill...

Maid: Ah! He left yesterday for his village...

Visitor: Which I have to pay him...

Maid: And he returned this morning.





Manager - “From your references I see you’ve had four jobs in the last
month.”

Applicant - “Yes, sir, but doesn’t that shows how much in demand I am?”.




‘1st Man - I’m very sorry to learn that your wife ran away with your driver,’ said the
friend to the old man.

2nd Man - ‘Oh, don’t worry, I can drive.’

Sunday, May 17, 2009

Black Mamba


Black mambas are fast, nervous, lethally venomous, and when threatened, highly aggressive. They have been blamed for numerous human deaths, and African myths exaggerate their capabilities to legendary proportions. For these reasons, the black mamba is widely considered the world’s deadliest snake.

Black mambas live in the savannas and rocky hills of southern and eastern Africa. They are Africa’s longest venomous snake, reaching up to 14 feet (4.5 meters) in length, although 8.2 feet (2.5 meters) is more the average. They are also among the fastest snakes in the world, slithering at speeds of up to 12.5 miles per hour (20 kilometers per hour).

They get their name not from their skin color, which tends to be olive to gray, but rather from the blue-black color of the inside of their mouth, which they display when threatened.

Black mambas are shy and will almost always seek to escape when confronted. However, when cornered, these snakes will raise their heads, sometimes with a third of their body off the ground, spread their cobra-like neck-flap, open their black mouths and hiss. If an attacker persists, the mamba will strike not once, but repeatedly, injecting large amounts of potent neuro- and cardiotoxin with each strike.

Before the advent of black mamba antivenin, a bite from this fearsome serpent was 100 percent fatal, usually within about 20 minutes.

Burj-Al-Arab


The Burj Al Arab (Arabic: Tower of the Arabs) is a luxury hotel located in Dubai, United Arab Emirates. At 321 m (1,050 ft), it is the second tallest building in the world used exclusively as a hotel. The Burj Al Arab stands on an artificial island 280 m (920 ft) out from Jumeirah beach, and is connected to the mainland by a private curving bridge. It is an iconic structure, designed to symbolize Dubai's urban transformation and to mimic the sail of a boat.

Construction

Construction of Burj Al Arab began in 1994. It was built to resemble the sail of a dhow, a type of Arabian vessel. Two "wings" spread in a V to form a vast "mast", while the space between them is enclosed in a massive atrium. The hotel cost US$650 million to build.

Features

Several features of the hotel required complex engineering feats to achieve. The hotel rests on an artificial island constructed 280 m (920 ft) offshore. To secure a foundation, the builders drove 230 40 m (130 ft) long concrete piles into the sand.

Engineers created a surface layer of large rocks, which is circled with a concrete honeycomb pattern, which serves to protect the foundation from erosion. It took three years to reclaim the land from the sea, but less than three years to construct the building itself. The building contains over 70,000 m3(2,500,000 cu ft) of concrete and 9,000 tonnes of steel.
Inside the building, the atrium is 180 m (590 ft) tall.

Burj Al Arab characterises itself as the world's only "7-star" property, a designation considered by travel professionals to be hyperbole. All major travel guides and hotel rating systems have a 5-star maximum, which some hotels attempt to out-do by ascribing themselves "6-star" status. Yet according to the Burj Al Arab's official site, the hotel is a "5-star deluxe hotel". It is the world's tallest structure with a membrane facade and the world's tallest hotel (not including buildings with mixed use) and was the first 5-star hotel to surpass 305 m (1,000 ft) in height.

Rooms and prices

The hotel is managed by the Jumeirah Group. Despite its size, the Burj Al Arab holds only 28 double-storey floors which accommodate 202 bedroom suites. The smallest suite occupies an area of 169 m2(1,820 sq ft), the largest covers 780 m2 (8,400 sq ft). It is one of the most expensive hotels in the world. The cost of staying in a suite begins at US$1,000 per night; the Royal Suite is the most expensive, at US$28,000 per night.

Suites feature design details that juxtapose east and west. White Tuscan columns and a spiral staircase covered in marble with a wrought-iron gold leaf railing show influence from classicism and art nouveau. Spa-like bathrooms are accented by mosaic tile patterns on the floors and walls, with Arabian-influenced geometries, which are also found elsewhere in the building.

Queen Mary 2 (QM2)


The QM2 will be the largest, longest, tallest, widest, and most expensive ocean vessel ever built until the Royal Caribbean Freedom of the Seas launches in 2006. The Queen Mary 2 is probably the last of the classic ocean liners.

With a passenger capacity of 2,620, QM2's size allows a great variety of passenger amenities. Almost everything you could want on a cruise ship can be found on the QM2. For those who want to be pampered and rejuvenated, the ship features the Canyon Ranch SpaClub. Athletes can play basketball or virtual reality golf, and a state-of-the-art gym includes a separate weight room. The Cunard ConneXions is almost like a college at sea, taking into account, of course, that you're on vacation. The QM2 even has some features new to cruising such as a planetarium and a look at marine history in the Maritime Quest Exhibit. QM2 even lets you bring your dog along and board him in an onboard kennel.

Nighttime on the QM2 is elegant, and the ship plays host to formal gatherings in the evenings. After dinner entertainment includes dancing in the largest ballroom at sea, jazz in the Commodore Club, a casino, caberet singing in the Chart Room, and West End-caliber shows in the Royal Court Theatre.

Some of the traditional Cunard hallmarks are found throughout the Queen Mary 2 -- sweeping staircases, soaring public rooms, a grand ballroom, and a 360° promenade deck. A space ratio of 57.25 makes her one of the roomiest vessels anywhere, and the ship has 14 decks of sports facilities, shops, bars, lounges, 5 pools and no fewer than 10 restaurants. With one staff member per couple, a very high level of service can be expected. For those who love verandas, three-quarters of the QM2 staterooms have balconies. Some of the lavish two-story duplexes even have their own private exercise equipment.