Use System.currentTimeMills(); Instead of new Date();
This tip is for when you want to place an action after a time gap between two occurrences (for example, to invalidate an unused session after some permitted time, or
This tip is for when you want to place an action after a time gap between two occurrences (for example, to invalidate an unused session after some permitted time, or
Depending on the version of Windows targeted, there are two different ways to run a VB application during the boot process.Under Windows 9x systems, place a Shell command in the
Private Declare Function LogonUser Lib “Advapi32” Alias “LogonUserA” (ByVal _ lpszUserName As String, ByVal lpszDomain As String, _ ByVal lpszPassword As String, ByVal dwLogonType As Long, _ ByVal dwLogonProvider As
Encapsulation is a fundamental principle in object orientation. Encapsulation restricts direct access to a data member of a class. Instead, users query the object itself in order to get or
Look at the following program. It compiles correctly under every standard-conforming compiler. At first, this may seem surprising because seemingly, because it’s impossible delete an object which is not a
The auto_ptr class template respects polymorphism and destroys derived objects of base pointers properly. In the following program, an auto_ptr is actually bound to a B * pointer, where B
A function call such as the following: classname::funcname(); is a qualified call. Qualified disambiguate function names. They are needed, for instance, in a class that inherits from several base classes,
Because static class members are not associated with a particular object of their class, you can access them even if you haven’t instantiated any object. In the following example, the
Here’s a very common error. You define a class but forgot to add a semicolon after the closing }. For example: class Mylist{public: Mylist(); ~Mylist(); //..more member functions} // missing