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.
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
Suppose you have the class given below: #include #include std::list list_of_pairs; In the above definition, the template argument for list is another template class namely, pair. The above definition won’t
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
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(
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:
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
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
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
By default, when an unhandled exception occurs in a managed application, a dialog box appears that asks you whether you want to debug the application with one of the debuggers
The For Each loop always iterates orderly on all the elements of an array or a collection (more precisely, on all the elements of a class that implements the IEnumerable
At times you may need to process elements of an array, a collection, or a dictionary object in random order, for example when sampling a population or (more often) when
You often need to benchmark a piece of code, which you usually do as follows: Dim start As Date = Now’ insert here the code to benchmarkDim elapsed As TimeSpan
You can use XML to transfer both data and commands. In this column I’ll show how you can update a database by means of XML commands sent over the HTTP
The System.Diagnostics.FileVersionInfo class lets you easily read file version information without having to call Windows API functions (as you have to do under previous VB versions). This class has a
If you use Shared members in .NET or modules in VB6, you reduce COM+ context overhead without any risk whatsoever that you will get extra context overhead for that code.
Even though you may want to use some COM+ services, it doesn’t mean that you have to have a unique context for each and every instance. The root instance, that
Instances of configured components, that is, components configured in COM+, get runtime services owing to context objects. When you instantiate a COM+ component, your instance will live in a context
In another item in this Tip Bank (see link below), we mention that you can co-locate secondary instances within the context of the caller. If you don’t need any services
‘ select a treevide node and ensure it is visible’ by expanding all its parent nodes and bringing the node’ in the visible portion of the controlSub EnsureNodeIsVisible(ByVal node As
VB has always gone out of its way to take care of mundane housekeeping tasks without bothering you with the details. But sometimes the best intentions can create unintended problems.
Who says the Select Case can evaluate only one statement? Try Select Case True instead of the If
Make sure the Recordset contains only two Fields in the following order:1st Field – Field Value to be submitted to server2nd Field – Field Value shown in UI Function Function
What if you want to split an array on more than one delimiter? Adding a few lines of code and using recursion can enhance the function to handle multiple delimiters.When
Defining a public property in a user control as Picture (or StdPicture) provides the standard ellipsis next to the property name in VB
When connecting to a database, you should check for errors and return a descriptive user-friendly error message. This code calls an error handler routine after connecting to the database. If
Regular Expressions provide a very powerful and easy method of client side validation. They are also both supported by IE and Netscape. It takes a lot less code, and works
In XSL: ‘define parameter name and set default value In ASP: ‘set xsl objectDim xslFile, xslDocxslFile = “MyXsl.xsl”Set xslDoc = Server.CreateObject(“Msxml2.DOMDocument”)xslDoc.async = falsexslDoc.load(Server.MapPath(xslFile))’pass parameterset param=xslDoc.selectSingleNode(“//xsl:param[@name=’loginName’]”)param.setAttribute “select”,”‘Bill'”
Okay, so maybe you’ve heard of QUALCOMM’s BREW, and mostly what you know is that it’s not something you drink. Get a sip of this, however: BREW?a.k.a. the Binary Runtime
.NET strings are objects, so what you store in a String variable is actually a reference to a String object allocated in the managed heap. Even though the VB.NET compiler
You can compare strings in many ways under VB.NET: by using the = operator (or another comparison operator), with the Equals method (which the String class inherits from System.Object), or











