Print Out the List of Fields and Methods Declared in Any Class
Sometimes, it is essential to know the fields and methods that are declared in a particular class. This is all the more important when there is no access to the
Sometimes, it is essential to know the fields and methods that are declared in a particular class. This is all the more important when there is no access to the
It’s very easy to create cross-tab queries in SQL. In the SELECT statement of a query, most databases allow you to use an expression with an aggregate function, not only
In ASP, Request object has five collections: QueryString, Form, Cookies, ClientCertificate, and ServerVariables. When you want to access information in one of these collections, you have the choice of writing
You can pack the XML Parser along with the Java Application you are shipping. The following steps show how to do this. I used the Apache’s Xerces and Xalan parsers
The following trick isn’t portable. Furthermore, even implementations that currently support it do not guarantee to support it in their future releases. Still, it can teach you a few things
Certain compiler and code analyzers can detect a missing enumerator in a switch statement. Consider: enum Seasons{ Winter, Spring, Summer, Fall};switch (s){case Winter: wearCoat(); break;case Spring: pruneGarden(); break;case Summer: goSwimming();
If you need to concatenate variables of different types to form a string, use a stringstream object. The header contains the declarations of the stringstream family of classes. Using its
There are two methods of reading a string from the standard input. The first one uses getline(), as in the following example: std::string name;getline(cin, name); // option #1 The second
The function std::set_new_handler() installs a function to be called when the global operator new or the global operator new[] fail. By default, operator new throws an exception of type std::bad_alloc