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.
When using VBScript in ASP, you have only one data type: VARIANT. Although you can store objects within this data type, every time you refer to a property/method of the
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
//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(){
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
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
This stored procedure accepts tablename, fieldname, fieldvalue andfieldtype as parameters. If no fieldname, fieldvalue is passed, it deletes all records from the table passed. Fieldvalue could be a single value
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
If you still use a lot of DOS commands or execute batch files that you have acquired or written over time, this tip can save you a lot of typing.
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
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,
Declaring a virtual member function private may be useful when you wish to limit the number of derived classes that can override the given function. In such a case, you
Oftentimes, an application is packaged as a jar file. Ususally, you have to use a command line option to execute it. It would be easier to double click on the
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
Sometimes, it is essential to know the fields and methods that are declared in a particular class. This is all the more important when there is no access to the
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
It’s very easy to create cross-tab queries in SQL. In the SELECT statement of a query, most databases allow you to use an expression with an aggregate function, not only
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
The following trick isn’t portable. Furthermore, even implementations that currently support it do not guarantee to support it in their future releases. Still, it can teach you a few things
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();
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
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
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
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
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
This function will determine whether or not a thread is running in the user context of the local Administrator account. You need to examine the access token associated with that
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
When you have to display a long file path in a limited amount of space, you can use a Shell Light Weight API to do the job for you.Create a
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
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











