Pointers to Members of a Template Class
You can define a pointer to a class template member. For example, you can use the specialization vector: typedef void (vector< int >::*v_vi_szt) (size_t); // v_vi_szt is used to hide
You can define a pointer to a class template member. For example, you can use the specialization vector: typedef void (vector< int >::*v_vi_szt) (size_t); // v_vi_szt is used to hide
All STL (Standard Template Library) containers provide the begin()/end() pair of member functions. The member function begin() returns an iterator that points to the first element of the container: vector
Java’s reflection API allows the instantiation of an object using only its String description. A Java application can determine the class of an object from the associated string and then
In Java, the keyword final qualifies a construct (class, variable, or method) that may not be changed or overridden. Qualifying a variable as final ensures that the variable may not
The gc() call on the Java Virtual Machine’s garbage collector is often misunderstood. One of the reasons Java is such an easy language to program in is that it takes
The Vector class in java.util is one of the most frequently used classes in Java development. It almost makes the problem of memory management non-existent, unlike a fixed-size array. However,
A thrown exception is guaranteed to be caught Related Posts iOS 17.1 Update Eradicates Screen WoesSurvey Offers Advice on How to Keep Mobile Developers HappyCERN detects quantum entanglement in top
It’s easy to change the background color of your page, but if you don’t also define the foreground color and link colors, it’s likely that some users will not be
When you want to serve up a new type of file that Microsoft’s Internet Information Server (IIS) does not recognize, you need to add a MIME type. With older versions
Many times a form that works perfectly well on a table-less Web page stops working when inserted into a table cell. To make the form work again, move the and
When using ASP to create browser cookies, by default the cookie is alive only as long as the browser is running. You can make cookies last longer by defining an
Using a file named ROBOTS.TXT in your root directory allows you to control the indexing behavior of most Web crawlers with respect to your site (search engines like AltaVista use
At times you might want to know how much screen real estate a user has before opening several new browser windows. You also might want to find out if they
You can think of an iterator as a pointer to elements of a container. All STL (Standard Template Library) containers provide the basic iterator type along with its const counterpart.
You can use Dynamic HTML and Cascading Style Sheets (CSS) to change the color of text on the fly. This functionality can be useful for highlighting a portion of text.
Setting the SelectionMode property of the MSFlexGrid to flexSelectionByRow forces all columns in a row to be selected rather than a single cell. It also allows selection of multiple rows
Often it is desirable to set a background color for an entire layer or DIV region, much like setting the background color for a whole table. Setting a layer background
When designing a Web page that contains CSS layers (DIV sections) and embedded objects (Java applets, plugins, or ActiveX controls), keep in mind that embedded objects do not obey zIndex
Using only a few Windows API calls, you can change the standard VB5 toolbar into an Office 97 look-alike. I’ve implemented two display styles for the toolbar. The first allows
The VB Picture control can hold several different formats of pictures: BMP, DIB, ICO, CUR, WMF, and others under VB5. Additionally, you can use graphics methods to “draw” on the
To minimize the number of controls on my forms, I use a text box as a floating input control that I either overlay onto a grid or swap with a
You’ll find the IsArray() function helpful when you use Variant arrays that you can set or unset through your code and need to test often. However, once you declare the
In the April 1997 issue of VBPJ, you published a tip called “Consider the Taskbar When Centering Forms.” You can center forms more easily with the SystemParametersInfo API call: Private
Most people probably type in URLs using the minimum number of characters. If you don’t use a trailing slash on directory names, the Web server goes to extra effort, which
I’m always looking for sample code, and the setup1.vbp file is an excellent source of reusable code. It comes with VB and is part of the VB setup kit. The
If you’re assigning the values of columns you return from RDO queries into string variables, you’ll get an “Invalid use of Null” error if one of the columns has a
I sometimes want an MDI parent window to be repainted. For example, if a modal dialog is displayed over the MDI form and you click on OK, the dialog is
Placing a message box in an error trap can provide useful debugging information, but it doesn’t allow you to return to the subroutine or function to poke around and further
If you use a resource file in your application, you can see the RES file appear in the project window under “Related Documents.” This is the only type of file
Tired of making a change to a Web page and the change doesn’t show up when you view the page in your Web browser? Holding down the Shift key as