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

Open a Small Browser Window

The small window is usually used as a pop-up page for advertisements or to show information concerning particular keywords.For example, you can put in a page: Requestor: James Dean When

Validate the Date in Javascript

//validation of From Date//Here FromDay,FromMonth,FromYear & ToDay,ToMonth,_ToYear are the names ofthe form fields corresponding to from date and to _dates. Assuming thatthese are drop down fields on the form.function validateFromDate(){

Consistent Error Handling in SQL Server

Suppose you need to tack on an additional value to all your custom errors in SQL Server 2000. For VB programmers, that might mean tacking on the value of vbobject

Managing Custom Errors in SQL Server

Creating Custom Errors in SQL Server is not a hard thing to do, but managing those errors across multiple developers can be difficult. The question becomes: who has already used

Never Use L”” to Create a BSTR

When you call a COM method, it accepts BSTR in the following way: Iface->f(L””) L”” does not create a BSTR. This just creates a wide character string and if the

Use Math.PI and Math.E for Scientific Calculations

Many scientific/trigonometric/mathematical applications need the values of ‘pi’ and ‘e’ (the basis of natural logarithms) for calculations. The math class in the java.lang package has two static double constants that

Many Primary Keys for a Single Table

Have you ever wanted to have 1:1 relation between tables (i.e. a table in which two columns act like primary key not combined but separately)?DB only supports a single column,

Check for Available Memory Programmatically

If an application’s behavior is dependent on the amount of available memory, then this code fragment can be used to determine what action an application should take. For example, a

Always Use the Collection Name when Using Request Object

In ASP, Request object has five collections: QueryString, Form, Cookies, ClientCertificate, and ServerVariables. When you want to access information in one of these collections, you have the choice of writing

Packing an XML Parser with a Java Application

You can pack the XML Parser along with the Java Application you are shipping. The following steps show how to do this. I used the Apache’s Xerces and Xalan parsers

Use enum Types in switch Statements

Certain compiler and code analyzers can detect a missing enumerator in a switch statement. Consider: enum Seasons{ Winter, Spring, Summer, Fall};switch (s){case Winter: wearCoat(); break;case Spring: pruneGarden(); break;case Summer: goSwimming();

Concatenating Variables

If you need to concatenate variables of different types to form a string, use a stringstream object. The header contains the declarations of the stringstream family of classes. Using its

Reading a String from the Standard Input

There are two methods of reading a string from the standard input. The first one uses getline(), as in the following example: std::string name;getline(cin, name); // option #1 The second

Setting a New Handler

The function std::set_new_handler() installs a function to be called when the global operator new or the global operator new[] fail. By default, operator new throws an exception of type std::bad_alloc

Floating Point Types

C++ defines three floating points datatypes: float, double and long double. Some existing implementations support only two (and in some cases only one) of these three. On such implementations, double

Generate a Relative Path Between Folders

You can use a Shell Light Weight API to generate a relative path by using this code: Private Declare Function PathRelativePathToW _Lib “shlwapi.dll” (ByVal pszPath As Long, _ByVal pszFrom As

Return the Fractional Part of a Number

No native VB function returns a fractional part of a decimal number. However, by subtracting the whole portion, obtained with Fix, from the original value, you can derive the fractional

Iterate Control Arrays Without Error

Control arrays are odd beasts in that they can have missing elements. The simplest way to iterate a control array uses this method: Dim i As IntegerFor i = Text1.LBound

Arrays With Non-Zero Lower Bounds

In VB.NET, you can use the System.Array class to create an array with non-zero lower bounds. To do this, use the System.Array.CreateInstance method: Array.CreateInstance(Type, Lengths(), LowerBounds( ) ).If the array