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.
From the command prompt, type: nbtstat -R This will reload the lmhosts file, and you won’t have to reboot the system for the changes to take affect.
Before starting, add the Microsoft DAO 3.51 Object Library Reference. Private Sub Form_Load() Dim WkSp As Workspace Dim dB As Database ‘Define the file .MDW where are the users and
You can use the ‘With … End With’ statements if you are using VBScript 5.0 or later. It helps to improve performance. This runs slower: PersonObj.FirstName = “Sandeep”PersonObj.LastName = “Gain”PersonObj.City
Oracle DBA’s can run this query to terminate sessions if users are inactive for more than certain time period for any Security/Performance reasons. select s.username “User”, s.osuser “OS User”, s.sid
Use Environ var. This Works Only on Windows NT and 2000. Me.Label1 = “Temp Dir – ” & Environ$(“temp”) Me.Label2 = “Sys Dir – ” & Environ$(“windir”) &IIf(Len(Environ$(“OS”)), “SYSTEM32”, “SYSTEM”)
MSVC has a small, but annoying bug with the scope of variables defined in “for” loops. For example, the following fragment is valid C++, but will not compile on MSVC:
Normally, when you allocate an array using new or malloc in VC++, you can only see the first element when you look at the variable in the watch window. To
Many of the C runtime functions have direct equivalents in the Win32 application programming interface (API). However, when you use C-Runtime functions, you need to have C-Runtime startup code and
Loops (for, while, do..while) are used often in code?especially nested loops. Eventually, you need to exit the loop by using a “break” statement. However, if you are inside of a
In Java, Strings are immutable objects. This means that they cannot be modified in any way after they are created. When you attempt to modify a String object, you often
For a number of reasons, you might need to write an object to a file for future usage. Perhaps your applet needs to keep some sort of “state” and between
Singletons are builder design patterns where the number of instances is limited to one (according to the Gang of Four – DesignPatterns). The most common way of implementing them is
The following java code allows you to identify the operating system on which your application is running: class OperatingSystem{ public static void main(String args[]) { System.out.println (“Operating system : “
There are lots if times when the system needs to be restarted, for example, after changing the autoexec.bat path. Here is code you can use, in the place of writing
‘ Set the path of the picture used as background of the IE5/5.5 toolbar’ Note: requires the SetRegistryValue, CheckRegistryKey and CreateRegistryKey ‘ routines, you can find them in the CodeBank’
‘ Set whether the IE Close menu item is enabled’ Note: requires the SetRegistryValue, CheckRegistryKey and CreateRegistryKey ‘ routines, you can find them in the CodeBank’ Example:’ SetIECloseEnabled FalsePublic Sub
‘ Determine whether the IE Close menu item is enabled’ Note: requires the GetRegistryValue routine, you can find it in the CodeBank’ Example:’ MsgBox “Close is enabled: ” & GetIECloseEnabledPublic
‘ Hide/Show the Explorer’s (Windows Explorer and IE) File menu’ NOTE: this routine requires the SetRegistryValue,’ DeleteRegistryValue and CheckRegistryValue routines,’ that you can find in the CodeBank under the Windows
Private Declare Function DoFileDownload Lib “shdocvw.dll” (ByVal lpszFile As _ String) As Long’ download a file from Internet and open the IE dialogs that allow the user’ to choose where
‘ Clear the IE History’ Notes:’ This routine requires the DeleteRegistryKey and CreateRegistryKey routines,’ you can find them in the CodeBankPublic Sub ClearIEHistory() Const HKEY_CURRENT_USER = &H80000001 Dim sKey As
‘ Get the path of the picture used as background of IE 5/5.5 toolbar’ Note: requires the GetRegistryValue routine, you can find it in the CodeBank’ Example:’ MsgBox GetIEToolbarPicturePublic Function
Creating a VB routine that copies a whole directory tree can be a time-consuming job, but fortunately you don’t have to do it. In fact, you can quickly create an
ave you ever wanted to add interactive sound and backing music to a Web site but were unable to use Flash because you didn’t require any visual presentation? Now there’s
If you want to stop a user from accessing your website, you can do it by using some relatively simple code. First, you must know the IP address of the
To make this script work, browsers should be javascript enabled.1) To Make TextBox Readonly:
This feature will be required if you want to store exceptions in a database: import java.io.*;public class Test{ public static void main(String args[]) { String trace = exceptionToString(new Exception(A new
The garbage collector works automatically, whether you request it to or not. However, it is possible to make a garbage collector request, by invoking the System.gc() method. When garbage collector
When working with pages, the database is not always available. Sometimes, you need to access a test recordset. Here are is an example of how to create a function that
While definitely not required, overriding the toString() method in your classes will make their use much easier. Although java.land.Object provides basic implementation for this method, it is far from being
The library defines the following open modes and file attributes: ios::app // appendios::ate // open and seek to file’s endios::binary // binary mode I/O (as opposed to text mode)ios::in //











