[1] If you are right handed, you will
tend to chew your food on your right
side. If you are left handed, you will
tend to chew your food on your left
side.
[2] If you stop getting thirsty, you
need to drink more water. For when a
human body is dehydrated, its thirst
mechanism shuts off.
[3] Your tongue is germ free only if
it is pink. If it is white there is a
thin film of bacteria on it.
[4] The Mercedes-Benz motto is 'Das
Beste oder Nichts', meaning 'the best
or nothing.
[5] The Titanic was the first ship to
use the SOS signal.
[6] The pupil of the eye expands as
much as 45 percent when a person looks
at something pleasing.
[7] The average person who stops
smoking requires one hour less sleep a
night.
[ 8] Laughing lowers levels of stress
hormones and strengthens the immune
system. Six-year-olds laugh an average
of 300 times a day. Adults only laugh
15 to 100 times a day.
[9] The roar that we hear when we
place a seashell next to our ear is
not the ocean, but rather the sound of
blood surging through the veins in the
ear.
[ 10] Dalmatians are born without
spots.
[11] The owl is the only bird to drop
its upper eyelid to wink. All other
birds raise their lower eyelids.
[12] Roosters cannot crow if they
cannot extend their necks.
[13] Every time you sneeze some of
your brain cells die.
[14] When you blush, the lining of
your stomach also turns red.
[15] When hippos are upset, their
sweat turns red.
[16] The lion that roars in the MGM
logo is named Volney.
[17] Google is actually the common
name for a number with a million
zeros.
[18] Switching letters is called
spoonerism . For example, saying jag of
Flapan, instead of flag of Japan.
[19] It cost 7 million dollars to
build the Titanic and 200 million to
make a film about it.
[20] The attachment of the human skin
to muscles is what causes dimples.
[21] The sound you hear when you crack
your knuckles is actually the sound of
nitrogen gas bubbles bursting
[22] It takes about 20 seconds for a
red blood cell to circle the whole
body.
[23] Most soccer players run 7 miles
in a game.
[24] The only part of the body that
has no blood supply is the cornea in
the eye. It takes in oxygen directly
from the air.
[25] In most watch advertisements the
time displayed on the watch is 10:10
because then the arms frame the brand
of the watch and make it look like it
is smiling.
[26] Colgate faced big obstacle
marketin g toothpaste in Spanish
speaking countries. Colgate translates
into the command "go hang yourself."
[2 7] The only 2 animals that can see
behind itself without turning its head
are the rabbit and the parrot.
[28] Intelligent people have more zinc
and copper in their hair.
[29] Do you know the names of the
three wise monkeys? They are:
Mizaru (See no evil),
Mikazaru(H ear no evil), and
Mazaru (Speak no evil).
[30] Women blink nearly twice as much
as men.
[31] German Shepherds bite humans more
than any other breed of dog.
[32] Large kangaroos cover more than
30 feet with each jump.
[33] A whip makes a cracking sound
because its tip moves faster than the
speed of sound.
Saturday, October 27, 2007
Tuesday, October 16, 2007
Job Hopping
Go through the following...
It is really nice piece of an article I found, WORTH READING!
There are never better pastures - only other pastures!
It is really nice piece of an article I found, WORTH READING!
There are never better pastures - only other pastures!
Move from one job to another, but only for the right reasons
It's yet another day at office. As I logged on to the marketing and advertising sites for the latest updates, as usual, I found the headlines dominated by 'who's moving from one company to another after a short stint', and I wondered, why are so many people leaving one job for another? Is it past now to work with just one company for a sufficiently long period?
Whenever I ask this question to people who leave a company, the answers I get are: "Oh, I am getting a 200% hike in salary"; "Well, I am jumping three levels in my designation"; "Well, they are going to send me abroad in six months".
Then, I look around at all the people who are considered successful today and who have reached the top - be it a media agency, an advertising agency or a company. I find that most of these people are the ones who have stuck to the company, ground their heels and worked their way to the top.
And, as I look around for people who changed their jobs constantly, I find they have stagnated at some level, in obscurity!
In this absolutely ruthless, dynamic and competitive environment, there are still no short cuts to success or to making money. The only thing that continues to pay, as earlier, is loyalty and hard work. Yes, it pays! Sometimes, immediately, sometimes after a lot of time. But, it does pay.
Does this mean that one should stick to an organization and wait for that golden moment? Of course not. After a long stint, there always comes a time for moving in most organizations, but it is important to move for the right reasons, rather than superficial ones, like money, designation or an overseas trip. Remember, no company recruits for charity.
More often than not, when you are offered an unseemly hike in salary or designation that is disproportionate to what that company offers it current employees, there is always unseen bait attached.
The result? You will, in the long-term, have reached exactly the same levels or maybe lower levels than what you would have in your current company.
A lot of people leave an organization because they are "unhappy". What is this so-called-unhappiness? I have been working for donkey's years and there has never been a day when I am not unhappy about something in my work environment-boss, rude colleague, fussy clients etc.
Unhappiness in a workplace, to a large extent, is transient. If you look hard enough, there is always something to be unhappy about. But, more importantly, do I come to work to be "happy" in the truest sense? If I think hard, the answer is "No". Happiness is something you find with family, friends, may be a close circle of colleagues who have become friends.
What you come to work for is to earn, build a reputation, satisfy your ambitions, be appreciated for your work ethics, face challenges and get the job done.
So, the next time you are tempted to move, ask yourself why are you moving and what are you moving into?
Some questions are:
· Am I ready and capable of handling the new responsibility? If yes, what could be the possible reasons my current company has not offered me the same responsibility?
· Who are the people who currently handle this responsibility in the current and new company? Am I as good as the best among them?
· As the new job offer has a different profile, why have I not given the current company the option to offer me this profile?
· Why is the new company offering me the job? Do they want me for my skills, or is there an ulterior motive?
An honest answer to these will eventually decide where you go in your career- to the top of the pile in the long term(at the cost of short-term blips) or to become another average employee who gets lost with time in the wilderness?
"DESERVE BEFORE YOU DESIRE" - Dr. Gopalkrishnan, Chairman TATA Sons.
Saturday, October 6, 2007
Standard C++ Libraries Frequently Asked Questions
Q1: What does the Standard C++ library contain?
A1: The Standard C++ library provides an extensible framework and contains components for language support, diagnostics, general utilities, strings, locales, standard template library (containers, iterators, algorithms, and numerics), and input/output.
The Standard C++ library can be divided into the following categories:
Q2: What is the difference between C-Runtime library and Standard C++ library? What libraries will the Runtime library compiler options such as /ML, /MT, /MD, /MLd, /MTd, and /MDd include?
A2: Visual C++ 5.0 and later include the following libraries in addition to the Microsoft Foundation Classes (MFC) libraries:
, multithreaded , or DLL). Depending on the headers you use in your code, a library from the Standard C++ library or one from the old iostream library may also be linked.
For example, if you specify the /ML (single-thread version) compiler option and include, a Standard C++ library header, the libraries LIBC.lib and LIBCP.lib are linked with your application by default. If you specify the /ML (single-thread version) compiler option and include , an old iostream header, the libraries LIBC.lib and LIBCI.lib are linked with your application by default.
Headers determine whether the Standard C++ Libraries and old iostream Libraries will be linked. Compiler options (/ML[d], /MT[d], /MD[d]) determine which version of the libraries (single-threaded, multithreaded, or DLL) is to be linked by default.
NOTE: It may seem that headers without the ".h" extension are Standard C++ headers and ones with the ".h" extension are C-Runtime headers or old iostream headers. This is not true. As explained below, the files and determine the libraries with which your application will link.
Actually, there are two header files, and , that contain #pragmas. The #pragmas force either the old iostream library or the Standard C++ library to be linked in by default.
The header file contains #pragma statements that force the old iostream library to be linked in. All old iostream headers include : If you include any old iostream header in your application, the old iostream library will be linked by default.
contains #pragma statements that force the Standard C++ library to be linked in. All Standard C++ headers include : if you include any Standard C++ header in your application, the Standard C++ library will be linked by default.
Q3: How do I retain the old iostream functionality if I port my project from an earlier version of Visual C++?
A3: If you want to retain the old iostream library, include one or more of the old iostream header files in your code. Do not use the new Standard C++ headers. You cannot mix calls to the old iostream library and the new Standard C++ library.
Q4: How do I make the Standard C++ Libraries the default libraries for my application?
A4: If you want to make the Standard C++ Libraries the default, include one or more of the new Standard C++ headers. Remember, you cannot mix calls to the old iostream and the new Standard C++ library. Existing libraries (static or dynamic link) that use old iostream functions will have to be modified to use Standard C++ library iostream functions.
Q5: I want to use Standard C++ Libraries in a Microsoft Foundation Classes (MFC) application. Will this cause any conflicts with the C-Runtime Libraries?
A5: No. MFC does not use any C-Runtime functions that will conflict with the Standard C++ Libraries.
Q6: Why do I get error "error C2065: 'cout' : undeclared identifier" even though I have included?
A6: Standard C++ library is implemented in its own namespace "std". Make sure to add the statement
Q7: Why am I getting "compiler error C2371: 'identifier' redefinition; different basic types"?
A7: Mixing Standard C++ headers and old iostream headers will cause this error, even if they are included in different source files. The following are the different headers:
Q8: I have a project that was built with the "Ignore Default Libraries" option (/NOD or /NODEFAULTLIB). With Visual C++ 5.0 or later, I am getting linker error "LNK2001: unresolved external symbol 'symbol' ;" on all iostream function calls. What has changed?
A8: The iostream functions have been removed from the C-Runtime library.
If you are using the old iostream functions, you must add an additional library as follows: LIBCI.lib (single-threaded), LIBCIMT.lib (multithreaded ), or MSVCIRT.lib (multithreaded dll ).
If you are using the new iostream functions included with the Standard C++ library, you must add an additional library as follows: LIBCP.lib (single-threaded), LIBCPMT.lib (multithreaded ), or MSVCPRT.lib (multithreaded dll ).
Do not mix different versions of the libraries. For example, if you are using the single-threaded version of the C-Runtime library, you must also use the single-threaded version of the old iostream library or Standard C++ library.
You cannot mix calls to the old iostream library functions and the new Standard C++ library iostream functions.
Q9: I am getting compiler warnings C4786 and/or C4788. None of the symbols in my program is anywhere near 255 characters in length. What is causing this?
A9: C4786/C4788 is issued when a symbol's name exceeds 255 characters in length. This often happens with template class, and STL uses template class extensively.
Ignoring this warning is usually safe. Use a #pragma warning (disable: 4786,4788) to suppress the messages.
Q10: I am getting compiler warning "C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX." What does this mean?
A10: Programs that use the Standard C++ library must be compiled with C++ exception handling enabled. C++ exception handling can be enabled by:
Q11: I am getting compiler error C2146, followed by C2065, and finally C2143, all pointing to the same line in my source. What does this mean?
A11: This sequence of errors can be caused by the following type of construct:
Ref: http://support.microsoft.com/default.aspx?kbid=154419
A1: The Standard C++ library provides an extensible framework and contains components for language support, diagnostics, general utilities, strings, locales, standard template library (containers, iterators, algorithms, and numerics), and input/output.
The Standard C++ library can be divided into the following categories:
1. | Standard Template Library (STL) components provide a C++ program with access to a subset of the most widely-used algorithms and data structures. STL headers can be grouped into three major organizing concepts:
| ||||||||
2. | Input/Output includes components for forward declarations of iostreams ( | ||||||||
3. | Other Standard C++ headers include:
|
Q2: What is the difference between C-Runtime library and Standard C++ library? What libraries will the Runtime library compiler options such as /ML, /MT, /MD, /MLd, /MTd, and /MDd include?
A2: Visual C++ 5.0 and later include the following libraries in addition to the Microsoft Foundation Classes (MFC) libraries:
• | Basic C-Runtime library. |
• | Standard C++ library. |
• | Old iostream library. |
|--------------------------------|---------------------------|* NOTE: MSVCPRT.lib and MSVCPRTD.lib are static libraries and do not have any dynamic link libraries (DLLs) directly related to them. These libraries are also dependent on MSVCRT.dll and MSVCRTD.dll, respectively. If you have any applications that use MSVCPRT.lib or MSVCPRTD.lib and you use the "Ignore Default Library" (/NOD or NODEFAULTLIB) option, be sure to link MSVCPRT.lib (or MSVCPRTD.lib) and MSVCRT.lib (or MSVCRTD.lib) with your application. Otherwise, you will get linker errors (LNK2001: unresolved externals in MSVCPRT.lib or MSVCPRTD.lib) when linking your application.)
| Library types and | Basic C Runtime |
| related compiler switches | library |
|--------------------------------|---------------------------|
| Single-threaded (ML) | LIBC.lib |
| Multithreaded (MT) | LIBCMT.lib |
| Multithreaded DLL version (MD) | MSVCRT.lib (import |
| | library for |
| | MSVCRT.dll) |
| Debug single-threaded (MLd) | LIBCD.lib |
| Debug multithreaded (MTd) | LIBCMTD.lib |
| Debug multithreaded DLL (MDd) | MSVCRTD.lib (import |
| | library for |
| | MSVCRTD.dll) |
|------------------------------------------------------------|
|--------------------------------|---------------------------|
| Library types and | Standard C++ |
| related compiler switches | library |
|--------------------------------|---------------------------|
| Single-threaded (ML) | LIBCP.lib |
| Multithreaded (MT) | LIBCPMT.lib |
| Multithreaded DLL version (MD) | MSVCPRT.lib*(Also uses |
| | MSVCRT.dll) |
| Debug single-threaded (MLd) | LIBCPD.lib |
| Debug multithreaded (MTd) | LIBCPMTD.lib |
| Debug multithreaded DLL (MDd) | MSVCPRTD.lib* (Also |
| | uses MSVCRTD.dll) |
|------------------------------------------------------------|
|--------------------------------|---------------------------|In Visual C++ 5.0 and later, there are certain default libraries that your program will link with. When you build a release version of your project, one of the basic C-Runtime Libraries (LIBC.lib, LIBCMT.lib, or MSVCRT.lib) is linked by default, depending on the compiler option you choose (single-threaded
| Library types and | Old iostream |
| related compiler switches | library |
|--------------------------------|---------------------------|
| Single-threaded (ML) | LIBCI.lib |
| Multithreaded (MT) | LIBCIMT.lib |
| Multithreaded DLL version (MD) | MSVCIRT.lib (import |
| | library for |
| | MSVCIRT.dll) |
| Debug single-threaded (MLd) | LIBCID.lib |
| Debug multithreaded (MTd) | LIBCIMTD.lib |
| Debug multithreaded DLL (MDd) | MSVCIRTD.lib (import |
| | library for |
| | MSVCIRTD.dll) |
|------------------------------------------------------------|
For example, if you specify the /ML (single-thread version) compiler option and include
Headers determine whether the Standard C++ Libraries and old iostream Libraries will be linked. Compiler options (/ML[d], /MT[d], /MD[d]) determine which version of the libraries (single-threaded, multithreaded, or DLL) is to be linked by default.
NOTE: It may seem that headers without the ".h" extension are Standard C++ headers and ones with the ".h" extension are C-Runtime headers or old iostream headers. This is not true. As explained below, the files
Actually, there are two header files,
The header file
|-------------------------|The header file
| Old iostream headers |
|-------------------------|
| |
| FSTREAM.H | IOMANIP.H |
| IOS.H | IOSTREAM.H |
| ISTREAM.H | OSTREAM.H |
| STDIOSTR.H | STREAMB.H |
| STRSTREA.H | |
|-------------------------|
|-------------------------------------------------|You cannot mix calls to the old iostream library and the new Standard C++ library.
| Standard C++ Headers |
|-------------------------------------------------|
| ALGORITHM | BITSET | COMPLEX | DEQUE |
| EXCEPTION | FSTREAM | FUNCTIONAL | IOMANIP |
| IOS | IOSFWD | IOSTREAM | ISTREAM |
| ITERATOR | LIMITS | LIST | LOCALE |
| MAP | MEMORY | NUMERIC | OSTREAM |
| QUEUE | SET | SSTREAM | STACK |
| STDEXCEPT | STREAMBUF | STRING | STRSTREAM |
| TYPEINFO | UTILITY | VALARRAY | VECTOR |
|-------------------------------------------------|
Q3: How do I retain the old iostream functionality if I port my project from an earlier version of Visual C++?
A3: If you want to retain the old iostream library, include one or more of the old iostream header files in your code. Do not use the new Standard C++ headers. You cannot mix calls to the old iostream library and the new Standard C++ library.
Q4: How do I make the Standard C++ Libraries the default libraries for my application?
A4: If you want to make the Standard C++ Libraries the default, include one or more of the new Standard C++ headers. Remember, you cannot mix calls to the old iostream and the new Standard C++ library. Existing libraries (static or dynamic link) that use old iostream functions will have to be modified to use Standard C++ library iostream functions.
Q5: I want to use Standard C++ Libraries in a Microsoft Foundation Classes (MFC) application. Will this cause any conflicts with the C-Runtime Libraries?
A5: No. MFC does not use any C-Runtime functions that will conflict with the Standard C++ Libraries.
Q6: Why do I get error "error C2065: 'cout' : undeclared identifier" even though I have included
A6: Standard C++ library is implemented in its own namespace "std". Make sure to add the statement
using namespace std;in the beginning of your program or to qualify each Standard C++ library identifier with namespace std, for example, std::cout.
Q7: Why am I getting "compiler error C2371: 'identifier' redefinition; different basic types"?
A7: Mixing Standard C++ headers and old iostream headers will cause this error, even if they are included in different source files. The following are the different headers:
|-------------------------|
| Old iostream Headers |
|-------------------------|
| FSTREAM.H | IOMANIP.H |
| IOS.H | IOSTREAM.H |
| ISTREAM.H | OSTREAM.H |
| STDIOSTR.H | STREAMB.H |
| STRSTREA.H | |
|-------------------------|
|-------------------------------------------------|
| Standard C++ Headers |
|-------------------------------------------------|
| ALGORITHM | BITSET | COMPLEX | DEQUE |
| EXCEPTION | FSTREAM | FUNCTIONAL | IOMANIP |
| IOS | IOSFWD | IOSTREAM | ISTREAM |
| ITERATOR | LIMITS | LIST | LOCALE |
| MAP | MEMORY | NUMERIC | OSTREAM |
| QUEUE | SET | SSTREAM | STACK |
| STDEXCEPT | STREAMBUF | STRING | STRSTREAM |
| TYPEINFO | UTILITY | VALARRAY | VECTOR |
|-------------------------------------------------|
Q8: I have a project that was built with the "Ignore Default Libraries" option (/NOD or /NODEFAULTLIB). With Visual C++ 5.0 or later, I am getting linker error "LNK2001: unresolved external symbol 'symbol' ;" on all iostream function calls. What has changed?
A8: The iostream functions have been removed from the C-Runtime library.
If you are using the old iostream functions, you must add an additional library as follows: LIBCI.lib (single-threaded
If you are using the new iostream functions included with the Standard C++ library, you must add an additional library as follows: LIBCP.lib (single-threaded
Do not mix different versions of the libraries. For example, if you are using the single-threaded version of the C-Runtime library, you must also use the single-threaded version of the old iostream library or Standard C++ library.
You cannot mix calls to the old iostream library functions and the new Standard C++ library iostream functions.
Q9: I am getting compiler warnings C4786 and/or C4788. None of the symbols in my program is anywhere near 255 characters in length. What is causing this?
A9: C4786/C4788 is issued when a symbol's name exceeds 255 characters in length. This often happens with template class, and STL uses template class extensively.
Ignoring this warning is usually safe. Use a #pragma warning (disable: 4786,4788) to suppress the messages.
Q10: I am getting compiler warning "C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX." What does this mean?
A10: Programs that use the Standard C++ library must be compiled with C++ exception handling enabled. C++ exception handling can be enabled by:
• | Selecting the Enable exception handling option in the C++ Language Category of the C/C++ tab in the Project Settings dialog box. -or- |
• | Using the /GX compiler switch. |
Q11: I am getting compiler error C2146, followed by C2065, and finally C2143, all pointing to the same line in my source. What does this mean?
A11: This sequence of errors can be caused by the following type of construct:
vectorThe problem is caused by the consecutive ">>" at the end of the declaration. The solution is to put a space between two characters, so the construct becomes:>iV;
vectorThis is consistent with the proposed ANSII specification.> iV;
Ref: http://support.microsoft.com/default.aspx?kbid=154419
Subscribe to:
Posts (Atom)