February 1, 2005

Display All the Subfolders Within a Folder Using VBscript

You can use VBscript’s Filesystemobject to list all the subfolders in a folder. Create a text file called showfolderlist.vbs and enter the following code: showfolderlist eg showfolderlist “c:windows” The Showfolderlist procedure uses the Filesystemobject to traverse through all the subdirectories and display them: Sub ShowFolderList(folderspec) Dim fs, f, f1, fc,

Java Dynamic Networking with Jini Technology, Part 2

art 1 of this series began an introduction to Jini? technology, an open software architecture that enables Java? dynamic networking, which developers can use to create highly adaptive distributed systems. It briefly described the approach that Jini technology takes to tracking, selecting, and assembling services into a running system. Part

Get All the Stored Procedure Names In One Shot

The following query will list all the stored procedure names available in the current database: SELECT name AS spnameFROM sysobjectsWHERE (xtype = ‘p’) AND (name NOT LIKE ‘dt%’)ORDER BY name

Use Functor for Callbacks in C++

Using the callback function in C is pretty straightforward, but in C++ it becomes little tricky. If you want to use a member function as a callback function, then the member function needs to be associated with an object of the class before it can be called. In this case,

Return a Value and Clear It Without a Temporary Variable

Have you ever implemented a method and wanted to return the value of a variable and then clear (or change) the variable? Since you can’t typically execute another line of code after your “return” statement, most people use a temporary variable to accomplish this: private String var;public String getAndClear ()