devxlogo

Tip Bank

Executing a Subprocess

To be able to read from two streams, you need two threads. A common mistake is to start a process and then only read standard out (stdout. Another mistake is

Detect an Operator Overloading a Class

How can you detect if a class overloads a particular operator when you don’t have the source for the class? You can define the operator globally so that it accepts

Restricting Implicit Conversion

The compiler performs implicit conversion whenever it feels the need for it. For example: class test{ public: test (int y) : h(y) {} int h;};void func (test t){ cout

Make Your Servlet Code Reusable

Oftentimes, you have a bit of logic or a block of code that’s repeated in all your servlets. Or you may need to check or validate the doGet() or doPost()

Reset the Identity for All User Tables

Before you start testing any database-driven application, the first thing you need to do is: Remove the old data from all the tables. Reset the identity back to 1 for