
Where Should Template Definitions Appear?
Normally, you declare functions and classes in a .h file and place their definition in a separate .cpp file. With templates, this practice isn’t really useful because the compiler must

Normally, you declare functions and classes in a .h file and place their definition in a separate .cpp file. With templates, this practice isn’t really useful because the compiler must

It’s customary to use output statements as a debugging aid. For example, displaying the name of a function that is currently in scope or printing a variable’s value on the

While working with controls in HTML forms, you can assign ID as well as NAME attributes to the controls. You can then access both ID and NAME attributes through client-side

I recently received a question from a reader who asked how to sort a large file. My solution was based on the qsort() algorithm, which is the only sorting algorithm

In following expression: if (ticket_price > 7.50) What’s the type of the literal 7.50? One might think that it’s float. However, the actual type is double. To force the compiler

The operators static_cast and reinterpret_cast are similar: they both convert an object to an object of a different type. However, they aren’t interchangeable. Static_cast uses the type information available at

If you are developing Web pages that provide HTML forms to the user, then you may notice that many times invalid data gets submitted. To reduce such invalid input, you

Performance tuning of Servlets is a major criteria as a servlet is expected to simultaneously handle dozens, if not hundreds, of threads depending on the requests. These coexisting threads have

When a Java applet or application loads a JDBC driver, the code is dynamically retrieved from the network. Loading the Sybase JDBC driver requires a simple line of code: Class.forName(“com.sybase.jdbc.SybDriver”);

When performance is an issue, static arrays perform better than dynamic storage structures. However, if a static structure won’t work, consider using Java’s Vector class instead of the LinkedList class.

When writing Java-based services we occasionally require dependencies. That is, our services must start in a certain order. You can specify what services your code is dependent on by overriding

You can use a name for a Java method that is different from the name the DLL uses when it exports the function. For example. you may need to conform

When using CSS (Cascading Style Sheets) positioning, you can apply a number of techniques to make your code faster. When accessing and setting the position of an element, instead of

Question: Is there any way to manipulate the border of a select list? It works fine on all the other existing form elements except the select. The solution must be

Question: Will the VBScript in the coming version Visual Basic 7 be platform independent? Answer: Unless Microsoft decides to radically change things, Visual Basic 7.0 will not use Visual Basic

Question: Is it advantageous to use ANSI SQL syntax or SQL Server syntax? For example, Inner Joins: Select * from T1 inner Join T2 on t1.id=t2.idSelect * from T1,T2 where

Question: I have a table that contains about six million records. Each record contains some sensitive data or data that be accessible by the public. What would be the best

Question: I used PowerBuilder with another database tool at my previous employer. Unfortunately, I have transferred to another company that uses Oracle and Oracle Developer. Can I use PowerBuilder with

Question: How can I refresh or redraw a menu? Answer: If you make one of the menu items nonvisible and then make it visible again, it should refresh the menu

Question: Our company is developing a Web site with some ActiveX code. On Windows 98 with Internet Explorer 5 loaded, some can see that portion of code perfectly, and then

Question: How do I set up a shared calendar, or at least public access to other people’s private calendar, in a network that uses Outlook 2000 and Windows NT server

Question: When I pass a string containing an embedded apostrophe in a query to SQL Server, it sees the apostrophe as an end-of-string marker. Example: “Select * from Members Where

Question: Can I pass ADO objects like Command and Recordset to an ActiveX DLL (acting as a middle layer) so that it automatically fills the data in them and I

Question: I am aware of the recommended approach to developing three-tier systems?for example, presentation layer to business objects to data objects. Say I have a system that has a data

This handy utility by Steve Weller lets you browse the properties of the window under the mouse cursor. You can use it to learn the window’s handle, caption, class name,

Another great and useful control by Marco Bellinaso. Place this control on a form to immediately achieve splitting capabilities. It works as a container control, and the controls you drop

Unlike regular forms, forms don’t expose the MinButton and MaxButton properties and these buttons are always displayed. You can suppress these buttons using the following code: Private Declare Function SetWindowLong

The CommonDialog control doesn’t provide any direct way to decide where a common dialog appears on the screen. In all cases, in fact, the control tries to display the common

The most intuitive way to append a string to the current contents of a TextBox is through the & string operator, as in: Text1.Text = Text1.Text & “more text” However,

As explained in another tip in this TipBank, users can peek at the contents of password-protected TextBox controls with a simple Spy-like program, or even with a VB program plus