
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.
Let the table cell be like this: … The JavaScript code to change the color to blue is: if (document.all) document.all.aCellID.style.backgroundColor = ‘blue’;
//Implementation of JS Functions//——————————//To Move up//To Move down
This is the easiest way: Select “bcp ” + db_name() + “..” + name +” out c: emp” + name + “.txt /c -t -SserverName_ -Usa -Ppassword/b1000″from sysobjectswhere type =
You can obtain the free space details of each drive by executing this stored procedure: Master..xp_fixeddrivesdrive MB free—– ———–C 1317D 7194E 3930(3 row(s) affected)
Sometimes, you need to exit a nested loop early, and the break; statement will only let you exit one level of a loop. Use a flag to indicate if the
The Robot class in Java provides a special method to capture your screen. This method creates an image containing pixels read from the screen and returns a BufferedImage class object.
To Sort a String in alphabetical order instead of ASCII order (i.e A,a,B,b not A….Z,a….z), use the Collator class from the Java.text package.Here
It’s not too much trouble to read a few arguments from the command line. It really becomes a problem if you have to read 50 or more arguments. One solution
Whenever you read a database field, concatenate an empty string to the field value before assigning it to a variable or control property. This prevents the program from giving an
By default, VB passes all arguments to a procedure by reference, which means the procedure can change the values of the variables you pass. However, there
You can display a logo in the middle of your MDI form. The logo stays in the middle even when the MDI form is resized. After creating your own MDI
The best way to work with the tab control is to set up a different frame for each tab. If you set the frames to be indexed, you can quickly
You see trailing ellipses (…) when VB truncates either the expression or data portion of a data tip (the mouse-hover watch value you get while debugging). This is great if
If you want the user to be able to select from a fixed range of numeric values, you have a number of choices. In VB6, you can use the UpDown
In graphical applications, you often need to know the angle between two lines. You can move their intersection point to the origin easily, so all you need to do is
acromedia just announced the sixth version of the Flash IDE and player, Flash MX, which positions Flash as the vanguard of an entirely new project strategy, called Macromedia MX. Flash
An MDI child form is a regular form whose MdiParent property points to its MDI container form, so the code that creates and displays a child window is very simple:
The new Break and BarBreak properties of the MenuItem object let you create menus with multiple columns. All you have to do is set either property to True for the
Copying a piece of information into the clipboard is as easy as calling the Clipboard.SetDataObject: you can pass this method a string, an image, and so on. If you pass
Numeric values and pointers are implicitly converted to a Boolean value in conditional expressions. For example: void *p = get_ptr();if(p){ // process p} A zero value evaluates as false. All
In the early days of C, pointers were plain integers. Relics of this approach can still be found in vintage APIs and legacy code. For instance, the ANSI C header
The system() function (declared in ) launches another program from the current program. As opposed to what most users think, it doesn’t return the exit code of the launched process.
“getter” member functions usually return a result by value. However, when the returned value is a large object, a string for example, returning it by value can be very inefficient.
Exceptions report abnormal runtime situations. Although you have other mechanisms for detecting and reporting runtime errors, exceptions are advantageous because they automate the process of passing the error from a
The volatile specifier disables various optimizations that a compiler might automatically apply and thus introduce bugs. I
The SetCreationTime, SetLastWriteTime, and SetLastAccessTime methods of the System.IO.Directory class let you modify the date attributes of a file or directory: ‘ Change the access date- and time of all
Ollie Cornes has been working with the Internet and the Microsoft platform since the early 90’s. His roles have included programming, technical authoring, writing, project management. He has co-written several
To ensure that only a single thread accesses a data member of an object, declare that member private. Next, add the necessary synchronization operations (e.g., a call to EnterCriticalSection()) in
The Standard Library defines a function called std::unexpected() which is invoked when a function throws an exception not listed in its exception specification. std::unexpected invokes a user-defined function that was
set_unexpected() takes a pointer to a user-defined function of the following type: typedef void (*handler)(); Use set_unexpected() to register a user-defined routine that will be invoked when a function throws











