devxlogo

Tip Bank

Be Polite to Frameless Browsers

Older browsers that don’t support HTML frames won’t display anything when they attempt (and fail) to load a page containing the code to set up frames. So a good design

Forcing a Page to be Loaded from the Server

To save time, browsers often load a frequently visited page from a local cache on the client’s computer rather than request it from the relevant Web server. The catch with

Getting Spaced Out

HTML’s page layout features are limited for older browsers–tables provide one of the few ways you can force text or graphics to appear in particular positions. Another addition to your

Undefined Behavior vs. Unspecified Behavior

The terms “undefined behavior” and “unspecified behavior” are not interchangeable. Undefined behavior indicates that an implementation may behave unpredictably when a program reaches a certain state, which almost without exception

Member Alignment

Manual calculation of a struct/class size is not just an indication of poor design and a source of maintenance problems; it may also lead to bugs that are very hard

Correct Path Names

You may have encountered this problem before–your program contains a full path name of a file, into which data has to be written or read from: FILE * f =

Restrictions on Operator Overloading

The following restrictions apply to operator overloading: 1. Invention of new operators is not allowed. For example: void operator @ (int) ; //illegal, @ is not a built-in operator or

Invoking the Default Browser

Here’s a Visual Basic routine that invokes the default browser: Private Declare Function ShellExecute Lib”shell32.dll” Alias “ShellExecuteA” (ByValhwnd As Long, ByVal lpOperation As String,ByVal lpFile As String, ByVal lpParametersAs String,

FTP with Java

Normally, from within a Java applet you can create a java.net.URL instance using the “ftp://” protocol handler. But you may need a third-party library to access FTP from a Java