We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

DevX - Software Development Resource

ShiftLeft – Shift a Long to the left

‘ Shift to the left of the specified number of times” NOTE: requires Power2()Function ShiftLeft(ByVal value As Long, ByVal times As Long) As Long ‘ we need to create a

DevX - Software Development Resource

BitClear – Clear a bit in a value

‘ Clear a bit in a value” NOTE: requires Power2()Function BitClear(ByVal value As Long, ByVal bit As Long) As Long ‘ simply AND with the negation of the bit mask

DevX - Software Development Resource

BitTest – Test the value of a bit

‘ Test the value of a bit” NOTE: requires Power2()Function BitTest(ByVal value As Long, ByVal bit As Long) As Boolean ‘ simply AND with the bit mask ‘ Range checking

DevX - Software Development Resource

Build List of Components in Hierarchy

It is sometimes useful to be able to obtain a complete list of the components in a container hierarchy. A getComponents() method is provided in the java.awt.Container class, but it

DevX - Software Development Resource

Pausing SQL Server

Pausing SQL Server prevents new users from logging in and gives you time to send a message to current users asking them to complete their work and log out before

DevX - Software Development Resource

Minimize the Use of Pointers and Dynamic Memory Allocation

Pointer-based operations are less frequently needed than they might seem. For instance, examine this class declaration: class PointerMisuse{private: CDC * m_pDeviceContext;public: PointerMisuse(); ~PointerMisuse();};PointerMisuse::PointerMisuse(){ m_pDeviceContext = new CDC;}PointerMisuse::~PointerMisuse(){ delete m_pDeviceContext;} Even

DevX - Software Development Resource

Beware of Single Quotes When Working With SQL

When concatenating a SQL statement such as INSERT, you may have trouble if your field value contains an apostrophe (‘) such as in “Commedia Dell’Arte.” SQL thinks the apostrophe is

DevX - Software Development Resource

Identify Host That Called Remote Method

When creating remote objects for use with Java’s Remote Method Invocation (RMI), you’ll often extend java.rmi.server.UnicastRemoteObject. When you do extend UnicastRemoteObject, it becomes easy for the remote methods to determine

DevX - Software Development Resource

Generate Beeps in Your Application

Many applications use an audible “beep” sound to signal that an error has occurred or to get the user’s attention for some reason. For example, a user interface that allows

DevX - Software Development Resource

Assigning Integers to an Enum Type

In C, it is valid to assign integers to an enumerated type. For example: /*** valid in C but not C++ ***/enum Status {good, bad};void func(){ Status stat = 1;

DevX - Software Development Resource

Initialize a Radio Button

Question: Is there a parameter that can be used within a radio button tag in an HTML form to set the default value for the radio group? Answer: The CHECKED

DevX - Software Development Resource

Processing a Transaction on One or More Remote Servers

In SQL Server 6.5, this command specifies that a distributed transaction managed by Microsoft Distributed Transaction Coordinator (MS DTC) starts and the transaction_name specifies a user-defined transaction name that is

DevX - Software Development Resource

Prevent Lenient Date Parsing

The java.text.DateFormat class and its java.util.SimpleDateFormat subclass are useful for formatting and parsing date and time values. For example, your application may allow a user to enter a date value

DevX - Software Development Resource

“Disable” the Browser’s Back Button

While there is no way to specifically disable the back button from within the browser, you can shortcut the navigation to another page. The trick is to catch the onbeforeunload

DevX - Software Development Resource

Shockwave Flash and DHTML

Question: How can I make a Shockwave Flash movie run over or under a DHTML DIV tag with text inside? I tried to use z-index but it doesn’t work well

DevX - Software Development Resource

Generate a DHTML Message From a Database

Question: I am working with Microsoft DHTML and when I insert the content of a field in a DHTML document, I lose part of my message. For example, suppose I

DevX - Software Development Resource

List All Network-Visible SQL Servers

To enumerate all network-visible SQL servers using SQL-DMO objects, create a new standard EXE project and add a reference to sqldmo.rll. This file can be found in BinnResources1033sqldmo.rll under the

DevX - Software Development Resource

Retrieve a List of Available Serial Ports

Here’s a nice little function that retrieves a list of the available serial ports on your system. Note that this function uses Java’s Communications API, also known as javax.comm, which

DevX - Software Development Resource

ForceTextBoxNumeric – Create a numeric Textbox

Private Declare Function GetWindowLong Lib “user32” Alias “GetWindowLongA” _ (ByVal hWnd As Long, ByVal nIndex As Long) As LongPrivate Declare Function SetWindowLong Lib “user32” Alias “SetWindowLongA” _ (ByVal hWnd As

DevX - Software Development Resource

ForceTextBoxCase – Set a textbox’s upper/lowercase style

Private Declare Function GetWindowLong Lib “user32” Alias “GetWindowLongA” _ (ByVal hWnd As Long, ByVal nIndex As Long) As LongPrivate Declare Function SetWindowLong Lib “user32” Alias “SetWindowLongA” _ (ByVal hWnd As

DevX - Software Development Resource

GetTempFile – Create a temporary file

Private Declare Function GetTempFileName Lib “Kernel32” Alias _ “GetTempFileNameA” (ByVal lpszPath As String, _ ByVal lpPrefixString As String, ByVal wUnique As Long, _ ByVal lpTempFileName As String) As LongPrivate Declare

DevX - Software Development Resource

ObjFromPtr – Return an object from its pointer

Private Declare Sub CopyMemory Lib “Kernel32” Alias “RtlMoveMemory” (dest As _ Any, Source As Any, ByVal bytes As Long)’ Returns an object given its pointer’ This function reverses the effect

DevX - Software Development Resource

Passing Named Arguments to Java Programs

Here’s an example of a better way to pass arguments to main() methods of Java classes than using String[] args. First, pass two named parameters, user and level, that come