devxlogo

The Latest

Five Great Patterns for Dealing with References

n a UML class model, classes are described by having attributes, operations, and relationships with other classes. When such a model is converted into code, both the public attributes and

Dynamically Remove HREF from the Anchor Tag

Sometimes you need to remove a link from an anchor tag dynamically. You can do this with JavaScript.Take a look at this example: Devx To remove the link (i.e, the

Read the Entire Text Element

SAXParser’s DefaultHandler provides a callback for public void characters(public char[] ch, int start, int length, etc.) and throws a SAXException for reading element text contents. You can read the char

Testing with an Application Verifier

Application Verifier is a tool for testing user-mode applications for compatibility with MS Windows XP. It comes in handy when you’re troubleshooting issues like common programming mistakes related to memory

Letting Java in on SQL Server Notifications

tarting with SQL Server 2000, Microsoft added the concept of notification services to their flagship database engine. SQL Server Notification Services lets you generate and send notifications whenever some criterion

Use Callbacks to Isolate Concurrency Bugs

ne of the most common errors Java programmers make when they first learn multi-threaded programming is to misunderstand locks. They believe that locking an object prevents access to its fields

Masked Edit Control

To include characters in your mask that are also part of the set of mask syntax characters, escape them by using the backslash () character in front of the character

Use Reflection to Find Dynamic Class Information

Use this code to find information?such as the method name or the parameters?of a dynamic class: import java.lang.reflect.*;public class DynMethodNames{ public static void main(String a[]) { try{ //passing class name

Using StringBuilder in .NET

StringBuilder has an Append method that returns a reference to itself. This is useful for when you want to append several items in one go. The following code is an

Display Alert Messages on Separate Lines

Everybody knows that the alert() function in JavaScript is used to display messages in a dialog box. For example, the following code: alert(‘Hello Prakash’); will pop up with this message:

Implementing an Enterprise Service Bus in Java

ntegrating old and new components and services using a service-oriented architecture (SOA) requires an infrastructure that can connect any component or service, regardless of location, messaging protocol, and message format.

Execute EJB JUnit Tests in Your Deployed Apps

esting is an integral part of any development process. JUnit, an open-source, regression-testing framework written by Erich Gamma and Kent Beck is a popular tool for building Java unit tests.

Post to Another .aspx Page

ASP.NET Web Forms post back to themselves?even if you add an explicit action attribute in the tag, ASP.NET overrides that action and posts the form to the original filename. You

Display itemdata in a ComboBox

This code shows how to display specific itemdata in a ComboBox. Currently, only the listindex property is available to navigate through a ComboBox. ‘ Consider a set of employee details’

A C++ Mutex Operation for Intel-compatible Processors

Interprocess synchronization has always been classified as a “slow” operation, but that is largely only because the Windows implementation requires switching to kernel mode (an expensive operation) each time you