devxlogo

The Latest

Use Singleton Objects to Reduce Garbage Collection

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

Loading the JDBC driver

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”);

Use Java’s Vector Class for Faster Performance

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.

Specifying Dependencies

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

Use Appropriate Properties for CSS Positioning

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

Manipulating Border Style on Form Elements

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

Will VBScript Ever Be Platform Independent?

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

Using ANSI SQL Versus Transact SQL

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

Column-Level Permissions or Access

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

PowerBuilder Compatibility with Oracle

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

Refreshing a Menu

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

ActiveX Code Not Working in IE5

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

Sharing Calendars Without Exchange

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

Embedded Apostrophe in a Query

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

Best Approach to Designing Three-Tier Systems

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

The API Spyer utility

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,

The MBSplitter ActiveX control

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

Suppress Max and Min buttons in MDI forms

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

Prevent an iconized window from being restored

When the user clicks on an iconized (minimized) form in the taskbar, Windows sends that form a WM_QUERYOPEN message, and inspects the value returned to the operating system. If this

Strange Behavior of the JPasswordField

The JPasswordField included in Swing exhibits a strange behavior?it moves the caret to the right as far as the width of the character you already typed. The problem is that

Return Date Parts With VBScript

Browsers Targeted: Internet Explorer 4+ You can retrieve any component of a date (either as a string, a hash-delimited date expression, or a date object) with the DatePart() function in

Works in IE But Not Netscape

Question: Why do certain things like tables and frames work fine with Internet Explorer but not with Netscape? Answer: There are many differences in the way the two major browsers