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

Force the Short-Circuit

To optimize the If construct, separating testing conditions (“And” operator or “Or” operator) in different expressions can improve the performance. For example, don

DevX

Reading Binary Data from an ifstream

To read a binary value from an input file stream (ifstream) object, use the read() member function. read() takes two parameters: char * and long, which hold the address of

DevX

Parenthesize Macro Arguments

It’s a good idea to parenthesize every macro argument. For example: #define MAX(x,y) (x)>(y)?(x):(y) The parentheses ensure that the macro is evaluated correctly, even if the user passes complex expressions

DevX

Serializing a Polymorphic Object

A polymorphic object has one or more virtual functions. When you serialize such an object to a file so that it can be reconstituted later, the deserialization might rewrite its

DevX

Writing Binary Data to an ofstream

To write the binary value of a variable to an output file stream (ofstream) object, use the write() member function. write() takes two parameters: const char * and long, which

DevX

CUDL – A class to create UDL files

‘ A class that creates UDL files for use as ADO Data Sources.’ Universal Data link files are handy for select data sources but there’ are lack of a way

DevX

Fill a Combo with Available Drive Letters

To create a drop-down control with a list of used or unused drive letters, place two ComboBox controls on a form, named Combo1 and Combo2, and include this code to

DevX

Don’t Create a Recordset Unless It’s Required

When running action queries make sure you add the adExecuteNoRecords option, so that a recordset is not created. You can also use this technique in lookup situations when returning just

DevX

Float Buttons Over Tab Panels

When using the SSTab control to build a tabbed dialog, I often find the design more pleasing when the OK/Cancel buttons or other controls appear on every tab. It

DevX

Create Folders Recursively if They Do Not Exist

This script can be used in ASP or VBScript or Visual Basic. It is an easy way to create a folder tree. Sub CreateFolderTree(ByVal FolderName) Dim objFSO Dim InterminPath Dim

DevX

Control the Concatenation Results in SQL Server

You can control the concatenation results using SQL ServerCONCAT_NULL_YIELDS_NULL(T-SQL). Depending upon the CONCAT_NULL_YIELDS_NULL settings, the concatenation results are treated as null or empty string values. When SET CONCAT_NULL_YIELDS_NULL is ON,

DevX

Separate Trace Statements

Sprinkling TRACE statements in your code is a common practice during development and debugging, especially when refereshing UI code, or multi-threading, etc.Usually, people write something like this: TRACE(“My Trace “);

DevX

Declaring Conditional typedefs

Conditional typedef declarations can be useful in cross-platform development. For example, some platforms define long as a 32-bit integer. Other platforms treat long as a 64-bit integer. You can create

DevX

How to Re-open a Nested Namespace

As strange as it may seem, C++ doesn’t allow you to re-open a namespace using a qualified name; you can re-open it only by using its nested name. For example,

DevX

Design Secure Visual Studio.NET Web Services

ost Web services created with Visual Studio.NET are written in a managed language such as C# or VB.NET, which has security benefits. Managed code can help mitigate security threats such

DevX

Is DHTML Dead?

few years ago, Microsoft released Internet Explorer 4, which changed the course of Web client-side development. Not only was it ubiquitous, delivered with every version of Windows, but it also

DevX

Use Value in XSL

Define value: Combine with the xml file: Use it: The value define statement can be created in an xsl file, and this file can be included in other xsl files

DevX

Replace Function in Javascript

JavaScript lacks a Replace() function. This functionality can only be achieved in Javascript using RegularExpression, though not all browsers support it. The code below is for replace and can work

DevX

How to Write Backward Compatible JavaScript Links

Although most people have JavaScript enabled on their browsers, there are still a lot of people who don’t. This is why you should always make your pages as backward compatible

DevX

Check for OS File Existence from T-SQL

Sometimes you may want to check whether a particular file is available while working with the file system in T-SQL. You can check this by using “xp_fileexist “, Sql Server