devxlogo

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

Centralize ASP.NET settings in one file

Although ASP.NET lets you distribute web.config files over all the application’s subdirectories, it surely doesn’t force you to do so. You can keep all the application settings in its main

Add exception tracing with one line of code

At times you want to keep a log of all the exception occurred in your application, including those that are correctly caught by a Catch block. At first you might

Use custom error pages in ASP.NET

The tag in ASP.NET configuration files affects how error pages are managed in an ASP.NET application and whether developers can redirect users to their custom error pages when an exception

Reduce Server Too Busy errors with the httpRuntime tag

The httpRuntime tag in ASP.NET configuration files lets you determine several features of ASP.NET at the machine or site level, including the how ASP.NET uses multi-threading. Here’s the complete syntax

Comparing Two Date Objects in JavaScript

This is a very handy and easily understandable code. There are two different methods, depending upon the type of data that is required as input to the functions: function CompareDatesOne(firstdate,seconddate){

Download Files of Any File Type

You may encounter a situation where you need to open a “Save As” dialogue box for downloading files of different types on to the client machine. You might have found

Validate an Email Address

Below is a VB Script example of how to validate an email address using Regular Expressions:

Send Mail Using a VC++ Application

Import the complete path of the following files in your application using the #import statement: MSO9.DLL msoutl9.olb HRESULT hr;CComBSTR inputStr;inputStr = CString(“MAPI”).GetBuffer(0);CoInitialize(NULL);Outlook::_ApplicationPtr xyz(“Outlook.Application”);_bstr_t name(inputStr, true);Outlook::_NameSpacePtr nsp = xyz->GetNamespace(name);CComBSTR cTo =

Explore the File System from T-SQL

The Indexing Service should be started before using the following code.The File content search relies on the Microsoft OLE DB Provider for the IndexingService. The following query lists all the

Remove Duplicates from Delimited String in T-SQL

Use this snippet to remove duplicates from a delimited string: DECLARE @mystring varchar(1000), @myword varchar(50),@CachedStringvarchar(2000)set @CachedString=”DECLARE @i int,@j intSELECT @mystring = ‘cat dog fox cat chicken hen goose cat bird

Get the Deep Copy of Any Object

This generic class will help to obtain a deep copy of any object and cast it to the Object Type: public class ObjectCloner{ private ObjectCloner(){} // returns a deep copy

Schedule Events with The Timer Class

Scheduling recurrent or future events can be a hassle, but the Timer class can make it a lot easier. With a couple of simple calls, you can create any number

Append an Exception Trace to a Log File

If you want all exceptions to go to the same file, use this code: import java.io.*;import java.util.Date;public class Logger{public static synchronized logException(Exception ex){try {RandomAccessFile ff = new RandomAccessFile(“c:\name.log”,”rw”);// to append

Creating a Parameterized SQL Query Using PreparementStatement

// conn – having a database connection alreadyPreparedStatement stmnt = null;ResultSet rs = null;try{ // ‘?’ indicates placement of a parameter. stmnt = conn.prepareStatement(“SELECT firstName FROMemployees WHERE salary > ?”);

How to Print an __int64 Number in VC++

You can use the printf() function as in the following example: #include using namespace std;int main(){ __int64 i64 = 4294967296; printf(“%I64d “, i64); //in decimal printf(“%I64x “, i64); //in hexa

Efficient Storage of and Access to Adjacency Lists

Large graphs are stored as adjacency lists to save space. Traditional mechanisms based on arrays of pointers waste space. The following scheme is based on array of indices, which saves

How To Capture a Mouse Without SetCapture

typedef BOOL ( CALLBACK *REPEATUNTILRELEASECALLBACK )( POINTptScreen, LPARAM lParam );BOOL RepeatUntilRelease( HWND hWnd, REPEATUNTILRELEASECALLBACKfctRepeatUntilRelease, LPARAM lParam, RECT* prtClipping, UINT vk ){ MSG message; ZeroMemory( &message, sizeof(message) ); if ( IsWindow(

Executing a Member Function After main() Terminates

You can execute any member function or any other execution after a termination of main() function by using “#pragma exit.”Here’s the syntax: #pragma exit [priority] //withoutsemicolon Now, here’s an example:

Update SQL Server records via HTTP

Thanks to the SQL Server extensions for the Web and XML, it is now possible to query a SQL Server database (and get the result as XML) as well as

3 Key Coding Tips for BREW Developers

Tip #1: Code for the phone, not the emulator. Handsets are small form factor, constrained devices ? so relative to what you’re used to on the desktop, phones have limited

Create zero-elements arrays

The .NET framework lets you create two types of “empty” arrays: unitialized arrays and arrays that are initialized with zero elements. Uninitialized arrays are actually array variables that are set