BPSoftware.com
Home   Utilities   Purchase   FAQ   Support   Contact        
Shareware Utilities
 APrintDirect
 AIconExtract
 AFile Attribute Manager
Freeware Utilities
 AddrMon
 AFileSync
 ASysIcon
 B&P Table Utilities
 BPACLer
 BPSNMPMon
 BPSNMPUtil
 CharCount
 Delphi® Components
 MacAddr
Miscellaneous
 BPSoftware Blog
 Purchase Shareware
 Support

 Subscribe!

Tuesday, November 18, 2008
Show Desktop in my QuickLaunch Toolbar?

It was there before; now it's not.

Where is it?

How do I get it back?

Where is the Show Desktop shortcut on my Quick Launch toolbar?

The Quick Launch toolbar is a great place to place shortcuts to frequently used applications. One of my must have shortcuts, is the Show Desktop shortcut. This shortcut quickly minimizes all open applications leaving a clear view of the desktop. The Show Desktop shortcut is generally available by default in the Quick Launch toolbar, however, what if it gets removed or it is no longer there?

Adding the Show Desktop shortcut back is easier than you think.

1. Open Notepad and enter the following text:
[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop

2. Save the file in the Microsoft\Internet Explorer\Quick Launch folder that is found in your profile's Application Data directory.



3. Save the file as: Show Desktop.scf




Now it is back again!!

Labels: ,

posted by Brad Prendergast at 8:41:00 PM (5 comments)
Links to this post
Permalink
Sunday, November 16, 2008
Command Line: Visual Source Safe

I have long used Microsoft® Visual SourceSafe® (VSS) for source code management and control. There are many ways to manage and control code through VSS. Visual SourceSafe® integrates nicely with Visual Studio, allowing for source control from directly within the integrated development environment (IDE). VSS also has its own front end application, which can be used as a stand alone application. There is also a command line application (ss.exe) that can be used to manage a SourceSafe database. If neither of the fore mentioned options are suitable, there is also an API that a developer can access to write their own source control front end to VSS.

The frontend application and Visual Studio integration I have generally found to be sufficient to manage a SourceSafe database, however there are a few tasks that I have found work best managed through the command line.

In order to used ss.exe you first must set the source safe directory (the SSDIR environment variable). When setting the SSDIR you must specify the path to the SourceSafe database in 8.3 format. For example:
Set the SourceSafe directory
set SSDIR=C:\DOCUME~1\BRAD\MYDOCU~1\VISUAL~2\BDS
set SSDIR=C:\PROGRA~1\MI53B4~1\SOURCE~1

Once you have the SSDIR set, you may need to work within a specific project.
Get a list of projects
"C:\Program Files\Microsoft Visual SourceSafe\ss.exe" dir
Set the current project
"C:\Program Files\Microsoft Visual SourceSafe\ss.exe" CP $/

Some useful tasks that are not easily acieved without the use od ss.exe:
Get a list of files to be purged
"C:\Program Files\Microsoft Visual SourceSafe\ss.exe" dir -d -r
Purge all files recursively
"C:\Program Files\Microsoft Visual SourceSafe\ss.exe" purge * -r
Move a project from one location to another
"C:\Program Files\Microsoft Visual SourceSafe\ss.exe" move $QualitySales $TZI
"C:\Program Files\Microsoft Visual SourceSafe\ss.exe" move $/VB.NET/TZI/qualitysales VB.NET/QualitySales

Labels: ,

posted by Brad Prendergast at 4:22:00 PM (0 comments)
Links to this post
Permalink
Monday, July 28, 2008
My Shared RSS Items

I have long been a fan and user of RSS feeds. I have been using Google™ Reader for quite some time. Besides allowing web and mobile access to your feeds, Google™ Reader also allows you to share feed items that you find interesting. Here is a live list of the RSS feed items that I have marked as ‘Shared’:


Labels: , ,

posted by Brad Prendergast at 8:41:00 PM (0 comments)
Links to this post
Permalink
Sunday, July 27, 2008
Edit those XML files

Wow! It has been a while since my last post. It doesn’t feel like it has been that long. Things have been both hectic and busy (to say the least). I am going to try and make it a point to post more often (again).


Over the past few months I have had the need to maintain a number of different XML files. Along with storing application settings and configurations, XML files are also great for database data transfer. XML files are simple and easy to use and they are even easier if you have the right tools. One such tool, that I use frequently is XML Notepad 2007. XML Notepad 2007 is a simple application that allows for the editing of XML documents. It has a drag and drop interface that is fairly intuitive. If you find yourself managing XML files add this free application to your tool library.

Labels: , , ,

posted by Brad Prendergast at 4:14:00 PM (1 comments)
Links to this post
Permalink
Sunday, September 30, 2007
Compact that Virtual PC

I have long been a fan of Virtualization. Ever since the early days of Virtual PC, I have been spinning off virtual machines to test and install software applications and code. It has even gotten to the point where I do very little on my host machine. I even do most of my web browsing within a Virtual PC (you can't always be certain what sites will do to your host machine). The flexibility of being able to install, test and uninstall applications without affecting the host offers many benefits. There is also a bonus with the Undo Disk option within Virtual PC. With an Undo Disk you can start up a Virtual PC and do “your thing” and then have the option of committing or deleting the session changes upon shut down. Take the benefits of virtualization and the fact that Microsoft Virtual PC 2007 is free and it is no wonder why Virtualization is now mainstream.

One thing that I had noticed using Virtual PCs is the disk size of the virtual hard disks. The virtual hard disks can be of fixed or variable size. If you opt for a variable sized hard disk, the disk will grow as you use it. The installation of application, copying of files and general processing use will cause the amount of space the virtual disk uses on the host machine to grow. As files are removed, applications are uninstalled and processing decreases I noticed that the virtual hard disk size doesn't decrease. In the help file there is a section that explains how to "Compact a virtual hard disk". The steps are pretty straight forward as they explain how to use the Virtual Disk Compaction option through the Virtual Disk Wizard. I did this on a number of virtual hard disks and really wasn't impressed with the results. To be honest, I didn't notice any change in the size of the virtual hard disk after running this process.

After a little confusion I noticed one important note that is in the help file, "Before compacting the disk, we recommend that you use a disk utility to zero out blank space, which should result in a smaller compacted virtual hard disk". After I thought about it, it did make a lot of sense. Now, where do I get one of these little utilities?

In the Virtual Machine Additions folder (under the Microsoft Virtual PC program folder) there is a Virtual Disk Precompactor.iso file (I found the "Using Virtual Disk Precompactor" section of the help file afterwards). It didn’t take much for me to figure out that this utility probably should be used prior to compacting a Virtual Hard Disk. It was a simple enough test; after all I was only trying it within a virtual PC. If you capture this iso file from within the Virtual PC and autoplay it, this utility will "prepare the virtual hard disk for compacting". After you run this utility, close down the Virutal PC and follow the steps for compacting a virtual hard disk found in the help file (you'll need to commit the changes if you are using an Undo disk). Take a look at the size of your vhd's before and after, the difference will be shocking. I know I reclaimed many many gigabytes of space on my hard disk.

Another great feature that is worth looking into is a Differencing disk….

Labels: , ,

posted by Brad Prendergast at 8:53:00 AM (3 comments)
Links to this post
Permalink
Sunday, January 21, 2007
PPCTL.DLL is damaged and could not be repaired.

Well, it was that time again for my good old Anti-Virus & Anti-Spyware software subscription to expire. Having used the same product for a while, I wanted something that had a low impact and wasn't so invasive to my system. The more and more hardware machines come with, it seems the more and more resources these Anti- programs want to take use. Having decent experience with earlier versions CA's ETrust software I decided to grab the three pack of CA Internet Security Suite. To make a long story short, I ended up having problems installing and running the Anti-Spyware piece of the Suite (a while back CA purchased PestPatrol). Only one out of the three machines I installed the software on went in without any issues. For the two that did give me some grief, fortunately it was the same problem. On these machines I received a message indicating that 'ppctl.dll is damaged and could not be repaired'. This error was displayed during installation and attempted operation of the software. I searched the 'Net' to see if I could dig anything up on this error. No such luck. I then went off on my own little investigation. By default, the ppctl.dll is installed in two locations; the C:\Program Files\CA\CA Internet Security Suite\CA Anti-Spyware and C:\Program Files\Common Files\Scanner folders. My first step was to verify the permissions that were set on these folders; to ensure that the Administrators Group and SYSTEM Account had full control over these folders. After this was verified (ie changed) I was hoping to be out of the woods-- well I wasn't. After digging a bit further I noticed there is also registry key (HKLM\SOFTWARE\Classes\ppctl) that references the ppctl.dll. Just as I had the folders I verified the permissions on the registry key. In reviewing the permissions I noticed the Administrators Group and SYSTEM Account had Read-Only access to the key. Getting creative I decided to give both accounts Full-Control to the registry key. Once I granted full control to the Administrators Group and the SYSTEM account on the HKLM\SOFTWARE\Classes\ppctl registry key all my headaches went away.

Labels: ,

posted by Brad Prendergast at 6:17:00 PM (18 comments)
Links to this post
Permalink
Friday, January 19, 2007
Google Mobile SMS

Having recently picked up a new phone and turning on unlimited SMS, I have a new fascination with 'texting'. SMS has been around for a while, but I never really got into it. After using it for a while it is difficult to imagine being without IM while 'out and about'. If you need to get a quick 'ping' texting often is a bit easier and quicker than a phone conversation. Another cool SMS tool I came across is Google Mobile SMS. This is a neat little way to get weather, directions, phone numbers and other results while you are away from your computer.

Labels: , ,

posted by Brad Prendergast at 10:02:00 PM (0 comments)
Links to this post
Permalink
Monday, January 01, 2007
Running a .NET Framework application from a network location

If you're anything like me, when deploying certain applications in a corporate environment you like to run your applications from a network resource. This often allows for the easy application maintenance of updates and changes. When deploying a dotNET application it isn't always as easy as placing a shortcut on the workstation or running the application from a network drive. With the additional security found in the .NET Framework it is often necessary to configure your application to run from a network location. This MSDN article explains how. The Grant permission to the application section is the part of interest.

Labels: , ,

posted by Brad Prendergast at 11:47:00 AM (1 comments)
Links to this post
Permalink
Friday, September 01, 2006
Virtualization is cool

I have posted a few times on virtualization software. It is really a great way to perform application and configuration testing. Microsoft Virtual Server 2005 R2 is available for free (at this point) also.

Labels: , ,

posted by Brad Prendergast at 6:44:00 AM (3 comments)
Links to this post
Permalink
Monday, August 28, 2006
Live Writer Test

Well, I figured I'd give it a shot. After reading about it a bit I decided to see how Windows Live Writer worked for publishing this blog. This is my first (and only so far) post and the look and feel is pretty 'simple'. Let see how it does with pictures:

That seems pretty painless, how about some code:

procedure TForm1.acAboutExecute(Sender: TObject);
var
frmAbout: TAboutBox;
begin
frmAbout:= TAboutBox.Create(nil);
try
frmAbout.Image1.Picture.Graphic:= Application.Icon;
frmAbout.ProductName.Caption:= StrAppName;
frmAbout.Copyright.Caption:= Format (frmAbout.Copyright.Caption, [StrCopyright]);
frmAbout.Position:= poOwnerFormCenter;
frmAbout.ShowModal;
finally
FreeAndNil(frmAbout);
end;
end;

Now, we'll publish this and see how it looks.

Labels: , ,

posted by Brad Prendergast at 8:00:00 PM (1 comments)
Links to this post
Permalink
Monday, July 24, 2006
A bit, byte and word

Where the title came from, I have no idea. It is amazing what you find when you go through old text files.

33222222222211111111110000000000
10987654321098765432109876543210
--------------------------------

10000000000000000000000000000000 2147483648 $80000000
-1000000000000000000000000000000 1073741824 $40000000
--100000000000000000000000000000 -536870912 $20000000
---10000000000000000000000000000 -268435456 $10000000
----1000000000000000000000000000 -134217728 $08000000
-----100000000000000000000000000 --67108864 $04000000
------10000000000000000000000000 --33554432 $02000000
-------1000000000000000000000000 --16777216 $01000000
--------100000000000000000000000 ---8388608 $00800000
---------10000000000000000000000 ---4194304 $00400000
----------1000000000000000000000 ---2097152 $00200000
-----------100000000000000000000 ---1048576 $00100000
------------10000000000000000000 ----524288 $00080000
-------------1000000000000000000 ----262144 $00040000
--------------100000000000000000 ----131072 $00020000
---------------10000000000000000 -----65536 $00010000
----------------1000000000000000 -----32768 $00008000
-----------------100000000000000 -----16384 $00004000
------------------10000000000000 ------8192 $00002000
-------------------1000000000000 ------4096 $00001000
--------------------100000000000 ------2048 $00000800
---------------------10000000000 ------1024 $00000400
----------------------1000000000 -------512 $00000200
-----------------------100000000 -------256 $00000100
------------------------10000000 -------128 $00000080
-------------------------1000000 --------64 $00000040
--------------------------100000 --------32 $00000020
---------------------------10000 --------16 $00000010
----------------------------1000 ---------8 $00000008
-----------------------------100 ---------4 $00000004
------------------------------10 ---------2 $00000002
-------------------------------1 ---------1 $00000001

Labels: , ,

posted by Brad Prendergast at 7:38:00 AM (1 comments)
Links to this post
Permalink
Thursday, July 13, 2006
Virtual PC Is Now Free!

I have been touting Virtual PC for some time. Microsoft is now offering Virtual PC for free. VMWare Server is also available for free (along with some other products). Virtualization makes a lot of things so much easier and also eliminates the need for all those computers lying around.

Labels: , ,

posted by Brad Prendergast at 9:14:00 PM (1 comments)
Links to this post
Permalink
Saturday, May 27, 2006
Custom Word Fields

The use of Field information in Microsoft® Word allows for easier maintenance of your documents. Using fields, you can include references to document property information within your document. This avoids the need to update changing property information that is referenced within a document (title, author, etc...). Using fields with templates makes format standardization a bit more exciting. Besides the standard fields, you can also reference your custom document properties. Personally, I often reference custom document revision information.


To reference custom properties in your document you first need to set them up. In my case, I use MAJ_REV and MIN_REV, both of these are of type Number. In your Word document move the cursor to the location where you would like to insert your custom property and press CTRL+F9. This will insert a Word field denoted by brackets (note that you cannot type these in yourself, you must press CTRL+F9 to indicate it is a field). Between the brackets type DOCPROPERTY followed by the property name you would like to reference. While the cursor is still on the field, press F9 to update it and there you go….

Labels: , , ,

posted by Brad Prendergast at 8:09:00 AM (0 comments)
Links to this post
Permalink
Sunday, May 21, 2006
LINQ CTP (May 2006)

Microsoft® has an informative Language-Integrated Query (LINQ) Community Technology Preview available for download here.

Labels: ,

posted by Brad Prendergast at 5:21:00 AM (0 comments)
Links to this post
Permalink
Thursday, May 18, 2006
Event Log (Part 1)

A few months back I made a couple of posts (Part 1, Part 2) regarding Microsoft’s LogParser. Since that time I have been getting my fair share of use from it. Recently, I had the need to analyze the Event Logs on a number of machines. There is the EventLog Snap-In for MMC; however this really doesn’t allow you to do more than basic viewing or broad filtering of events. (One thing I will give it is that it allows for the connection to the event logs on remote machines. Admittedly, I do have a saved console with about 5 or so machines that I browse through the logs of often.) Once again this Free Gem came to my rescue. One of the input sources of LogParser is the EventLog (EVT) Input Format. With LogParser you can select EventLog data (using a SQL like syntax) from a local or remote EventLog and output it to one of LogParser’s output format.

The EVT fields available for selection are EventLog, RecordNumber, TimeGenerated, TimeWritten, EventID, EventType, EventTypeName, EventCategory, EventCategoryName, SourceName, Strings, ComputerName, SID, Message and Data.

With these fields a number of data extractions can be put together rather quickly. Here are a couple of basic ones (The charts are the actual charts created by LogParser):

logparser -o:DATAGRID "SELECT EventTypeName, EventCategoryName, TimeGenerated, SourceName, ComputerName FROM Application"

logparser -O:CHART -chartType:Column3D -chartTitle:"Count of Events" -values:ON -legend:OFF "SELECT TOP 20 SourceName, COUNT(SourceName) AS Count_Events INTO Events.gif FROM Application GROUP BY SourceName ORDER BY SourceName"

logparser -o:DATAGRID "SELECT EventTypeName, EventCategoryName, TimeGenerated, SourceName, ComputerName FROM \\COMPUTERNAME\Security"

logparser -o:DATAGRID "SELECT EventType, EventTypeName, EventCategoryName, Count(EventTypeName) AS Entries FROM Security GROUP BY EventType,EventTypeName,EventCategoryName"

logparser -o:CHART -chartType:Pie3D -chartTitle:"Event Categories" -values:ON -legend:ON "SELECT EventCategoryName, Count(EventTypeName) AS Entries INTO EVENT.GIF FROM Security GROUP BY EventCategoryName"


I have found the LogParser help file quite useful. There are plenty of examples, of which one explains how to do percentages.

I have also created an app using the EventLog Class that allows me to work with logs. This was my maiden voyage with this class and hopefully I’ll post on my experience shortly. I also hope to tighten it up for a more ‘universal use’ and post it for download.

Labels: , ,

posted by Brad Prendergast at 7:55:00 PM (0 comments)
Links to this post
Permalink
Wednesday, May 17, 2006
It is the Concept that Counts

The other day I had probably one of the better conversations I’ve had in a long time. The topic of the conversation was software development. This is one topic I could talk about non-stop and it also tends to bring out the conversationalist in me. The dialog was a friendly exchange was with a software developer that works primarily with development environments different from the ones I use (The opportunity to broaden horizons and discuss another viewpoint is one that I will rarely pass up).

In an effort to keep this short, the gist of the conversation focused on the concept that learning/understanding a development language (syntax) is similar to learning/understanding spoken language. This is a concept that I feel strongly about and fortunately, the other participant of the conversation felt as strongly as I do, leading to a very pleasant, yet intense conversation. Although it is possible, one does not typically memorize spoken language, rather they understand it, live it and feel it to a point where it becomes completely natural. Having an understanding of the concept of nouns, verbs and adjectives and the underlying knowledge of expression (a natural understanding of why and what to express) allows for the fluid ad hoc building of sentences and dialog. The ability to broaden one’s vocabulary also becomes easier. Memorizing what to say would result in a painfully drab and yet often out of place conversation.

Everyone has a ‘native tongue’, however the understanding and feeling of the basic concept of how to express oneself in certain situations allows for the cross-over of expression in other languages. Again, understanding (almost naturally) the concept of what to say allows one to figure how to translate that into another language for communication and expression of the concept. After all, most languages are similarly related and tend to result in the communication of expression. This same concept can be easily applied to software development environments/languages. Having a baseline conceptual (logical) understanding of what one is looking to achieve and how it all works is the foundation of developing an application; achieving a desired result, that can be built upon. With the understanding of the overall concept of what needs to be done (logically), a developer can generally search out the concept and find away to express that in another development language, whether it is Delphi®, Visual Basic, C, ASP, T/SQL, P/L SQL or whatever. After all, a development language is just that, isn’t it?

Well, enough of my rambling (I hope this makes enough sense to get some point across) for today I am off to play with some .NET EventLog stuff.

Labels: ,

posted by Brad Prendergast at 6:38:00 AM (0 comments)
Links to this post
Permalink
Friday, April 14, 2006
In time for Easter

I've always liked those corny 'Easter Eggs'. In fine fashion some posts just can't go unreferenced. Take bring them back home! for example.

Labels: , ,

posted by Brad Prendergast at 7:26:00 AM (0 comments)
Links to this post
Permalink
Tuesday, April 04, 2006
Managing my Newsgroups

I’ve been participating in newsgroups for many years. Newsgroups are a great way for members of a community to share and discuss information. Part of my daily ritual includes the reading/posting new messages on groups that I monitor. I used to use the Outlook Express newsreader to manage the newsgroups that I subscribe to.

One of the major issues that I had with monitoring newsgroups was that depending on where I am and what I am doing I could be checking these newsgroups from one of four separate computers. Using Outlook Express, any post that was created after the last time I had checked the newsgroups on a particular computer showed up as a new message, regardless if they were read by me on another computer. This nuisance created the need to find a newsreader that would allow me to check newsgroups from separate computers without causing read messages to show up as new if I had already read them regardless of which computer was used. After poking around I decided to give Colin Wilson’s XanaNews a shot (I currently use XanaNews and I am extremely pleased with it and I would recommend it as a newsreader). A number of things drew me to this program one of the major things is that it was written with Delphi®.

XanaNews doesn’t have any ‘written’ or ‘published’ instructions for using it on a removable storage device; however after some poking I did find all of the settings are stored in the HKEY_CURRENT_USER\Software\Woozle registry key. One of the options available in the registry and XanaNews configuration is the “Messagebase Directory”. The Messagebase Directory is where the XanaNews message files are stored. I had mentioned before that I use my 1 GB SanDisk to store all my portable files. After some experimentation I found that if I set up XanaNews with all of my preferred settings on a computer that I could export the HKEY_CURRENT_USER\Software\Woozle registry key and import it into another computer and have all the same settings. The only thing that needs to be adjusted is the location of the message base directory, depending on which drive the USB Flash Drive is assigned. This allows me to manage newsgroup messages (both on and offline) from many computers without duplicating efforts. In the XanaNews directory on my flash drive I have the message base directory program executable and my exported registry file (that I update as needed).

The only thing on my XanaNews wish-list is the option to allow for user settings to be stored to a disk file (ini) or the registry (I know it is open source). Other than that it is an excellent feature rich program and if you haven’t tried it, give it a shot.

Labels: , ,

posted by Brad Prendergast at 7:01:00 AM (4 comments)
Links to this post
Permalink
Saturday, March 18, 2006
ARP! ARP!

(Sound like a seal?)

The Address Resolution Protocol (ARP) is used by the Internet Protocol (IP), specifically to map IP network addresses to the hardware addresses. Each Network Interface Card (NIC)/adapter has a unique Media Access Control (MAC) address. The MAC address is one way a computer can be identified.

It is easy enough to get the MAC address for a local machine by entering the command ipconfig /all in a console window. This command shows detailed information for each adapter installed on a computer. The MAC address of an adapter is identified as the Physical Address. Easy enough, but how do you get this information for a remote machine?



Included with Windows® is a program by the name of arp.exe. Without getting too involved, keeping it simple, and assuming a basic understanding of networking, ARP.exe (console window) is used to display and modify the IP-to-Physical address translation tables. This command has a number of parameters, in particular the –a parameter displays the current resolution table entries. Basically, when you type arp –a each machine that an adapter ‘communicated’ with is listed in this table. Both the IP address and Physical Address are listed for each.




If there is an adapter that you are capable of connecting to and you do not see it the resolution table, initiate some ‘communication’ with it and check the resolution table again (arp – a). Generally, I PING (Packet INternet Groper) the machines/adapters I want to get the information of before I look at the table.

If you haven’t done so yet take a look at AddrMon.

Labels: , ,

posted by Brad Prendergast at 11:20:00 AM (0 comments)
Links to this post
Permalink
Wednesday, March 15, 2006
Rightly So

Writely was picked up by Google. I had taken a look at it before, and well, I think we’ll be seeing a lot more of this in the future. ‘Bill Webb’ hits it pretty well.

Labels: , ,

posted by Brad Prendergast at 7:47:00 PM (0 comments)
Links to this post
Permalink
Sunday, February 26, 2006
Around the network of silken thread

Blogs are becoming a more and more popular part of the ‘World Wide Web’. I think they are a great expression and communication medium. I browse through many blogs, and some grab my interest enough for me to visit daily. During this morning’s rounds I came across this blog posting. I think Jake discusses a number of key points in his posting.

Labels: , ,

posted by Brad Prendergast at 9:29:00 AM (0 comments)
Links to this post
Permalink
Monday, January 16, 2006
Remember SWAG?

I generally only like to post once a day; I was searching through the internet and came across a bit of nostalgia - http://gdsoft.com/swag/swag.html (formed from http://www.bsdg.org/SWAG/index.html) and couldn’t resist. Talk about a walk down memory lane (there are a few familiar names found in there). This brought me back to a time when newgroups consisted of FIDO feeds passed through BBS’ (I ran a two connection Synchronet BBS) that you connected to through a screamin’ dial-up modem. Back in the days of Turbo Pascal and the excitement of buying 4MB of RAM for $200+. I remember the night I upgraded from Windows® 3.1 to Windows® 95 like it was yesterday. It is amazing how times change and how fast things progress.

Labels: , ,

posted by Brad Prendergast at 8:52:00 PM (0 comments)
Links to this post
Permalink
Express

I've been meaning to post this for a while; back in November Microsoft® released Visual Studio® 2005. In an effort to increase usage among current and prospective software developers they’re running a near unbeatable promotion for the Visual Studio® 2005 Express Editions – FREE. According to the FAQ the Express editions will be available free for download for one year. If you register before the year lapses you will not have to pay for it and can continue using it after the download period. You are required to register the products.

Downloads are available:
Visual Web Developer 2005 Express Edition
SQL Server 2005 Express Edition
Visual Basic 2005 Express Edition
Visual C# 2005 Express Edition
Visual C++ 2005 Express Edition
Visual J# 2005 Express Edition

Labels: ,

posted by Brad Prendergast at 7:23:00 PM (0 comments)
Links to this post
Permalink
Friday, January 13, 2006
Syncing

A while back I posted about synchronizing files between folders and computers. It seems Microsoft® has another free synchronization tool available. SyncToy for Windows® XP is briefcase on steroids.

While I am on the topic of software applications, most people have a number of username and passwords for various accounts. KeePass is a great open source password manager.

Labels: , ,

posted by Brad Prendergast at 7:21:00 AM (0 comments)
Links to this post
Permalink
Saturday, January 07, 2006
Some Component Updates

The Delphi® development environment and language allow for the easy creation of custom components. This allows developers to expand upon existing or create new components in the search to facilitate the creation and maintenance of software applications. Over the years, like so many other users of Delphi®, I have created a number of components and posted them to share with the Delphi® community.

As I work towards converting existing applications, there was a need to recompile and install component packages. Some minor changes have been made to most of the components, with the exception of TSHFileOp. The TSHFileOp component was basically rewritten to serve my needs in an easier way. I have also created a sample application (used for testing) using the TSHFileOp, TFileEdit and TDirectoryEdit components.

The source code is available for these components allowing for further customization if they come close, but fall short of individual needs. Most of them have accommodations for .Net. There may be other versions of similar components available tangled in this vast place we call the Internet. There are a number of websites available for developers to share and/or browse through custom components and/or source code. Websites such as:

Torry's Delphi Pages
Project JEDI
Delphi Super Page
Code Central
Delphi City

These sites are not listed in any order and this list does not indicate preference over sites that are not listed. There are a lot of quality sites out there.

Please feel free to add to the list.

Labels: , , ,

posted by Brad Prendergast at 5:20:00 AM (0 comments)
Links to this post
Permalink
Thursday, January 05, 2006
Geeky Thought

The internet contains a vast number of interesting web sites. If you are like me you categorically bookmark your favorites. One site in particular that I visit often (and tend to get a chuckle out of their apparel) is ThinkGeek.com. They have quit a few gadgets and their t-shirts convey messages quite nicely. Although I can’t have them all (I do wish I had most of them) I did receive a Binary People and SQL query. Next on my wish list is WTF?, No, I will not fix your computer and Dead Hex People.

Any other favorites out there?

Labels: , , ,

posted by Brad Prendergast at 7:38:00 AM (1 comments)
Links to this post
Permalink
Tuesday, January 03, 2006
FTP Batch

File Transfer Protcol (FTP) is a quick way to transfer files between two computers. There are many FTP software programs, both the pay and free varieties, available. Windows® also includes a command line FTP program (ftp.exe).
In this GUI world many shutter at the thought of a command line application, however this one does have its advantages. For starters it is already included in the OS and doesn’t need to be installed. I attempt to not over complicate things and keep them clean and uncluttered. IMHO, the main advantage is the ability to process a text file that contains FTP commands. The parameter option to specify the text file to process is -s (to see the other parameter options at the command prompt type FTP -?).

This feature is advantageous because you can set up FTP batch files that perform various transfer actions without the need to click a number of buttons or type a number of commands. Login information can be included in the text file allowing access to those FTP locations that require user authentication. I have a number of batch files that I frequently use to transfer data. I have also set some up with the Windows® task scheduler for unattended processing.

A batch file could look something like this:
ftp -s:somefile.txt

In the somefile.txt file:
open 192.168.100.1
username
password

cd images
lcd images
send *.gif


The text file commands are passed a line at a time for processing. As displayed in the above example a username and password can also be passed, as those are typically the first two prompts after an FTP server connection is opened. The text file can contain any of the valid FTP commands (type ? at the ftp> prompt for a list of valid commands). I tend to be brief in my postings but hopefully you can see the value in the ability to do this. If you have any additional input I’d love to hear it.

Labels: , , , , ,

posted by Brad Prendergast at 6:32:00 PM (1 comments)
Links to this post
Permalink
Tuesday, December 27, 2005
Feed Me

Really Simple Syndication (RSS) was a nice advancement of technology. The ability to ‘subscribe’ to feeds and dynamically have access to content definitely simplifies keeping up to date with different sites. Sites that have a RSS feed available typically display or with a link to the site feed.

There are many different RSS clients available for the viewing or monitoring RSS feeds. I have been using Mozilla Firefox® for a web browser since its inception. There is a lot to be said about tabbed browsing, but the Live Bookmarks take it over the top and they are a great way monitor RSS feeds. The ability to monitor feeds from within a browser and without the need to install yet another application is wonderful.

Borland® has set up a number of feeds for their products and sites, the ones that I set up Live Bookmarks for are:
Borland® Delphi® BDN - http://news.borland.com/bdn_delphi.xml
Borland® Delphi® Code Central - http://news.borland.com/codecentral_delphi.xml
Borland® Delphi® Quality Central - http://news.borland.com/qualitycentral_delphi.xml
Delphi® Team Blogs - http://blogs.borland.com/MainFeed.aspx?Team=delphi

Some other feeds of note that I monitor (I won’t bore you with all of them):

Delphi related -
http://www.delphifeeds.com/blogs.rss
http://blog.marcocantu.com/blog_rss.xmldata
http://www.indyproject.org/Sockets/blogs/Kudzu/rss.xml

Non-Delphi-
http://www.infoworld.com/rss/news.xml
http://www.computerworld.com/news/xml/10/0,5009,,00.xml
http://feeds.lockergnome.com/rss/windows.xml
http://slashdot.org/index.rss
http://www.techweb.com/rss/all.jhtml
http://rss.news.yahoo.com/rss/tech

If you have any suggestions for additional feeds please let me know.

Labels: , ,

posted by Brad Prendergast at 6:47:00 PM (0 comments)
Links to this post
Permalink
Saturday, December 24, 2005
Santa Did Come

After ordering ‘early’ and being placed on the backorder list, I received a special delivery this week. I guess the elves worked overtime this year. I haven’t had much opportunity to play with the addition to the desktop, however what I have played with so far it is leaps and bounds above its predecessor. Why didn’t they change the icon?

Labels: , ,

posted by Brad Prendergast at 8:03:00 AM (0 comments)
Links to this post
Permalink
Friday, December 09, 2005
Where’s my briefcase? (Part 2)

In Part 1 I discussed how you can use a ‘Briefcase’ to synchronize files with a storage device. If you are running Windows® XP Professional you have another option for synchronizing your files. This feature is appropriately named ‘Offline Files’. Offline files are primarily geared towards network file synchronization with you local storage. This is ideal for laptop users who travel and need to work as if they were in the office.

I have used both Briefcase and Offline Files extensively and overall, I prefer the briefcase method. One huge benefit of offline files is that this can be set for automatic synchronization. Sort of ‘set it and forget it’ type thingamajig. One additional thing to note about offline files is that this can be managed via Group Policy so a network administrator may disallow their use or preset the options.

I had intended on writing the steps for enabling offline files but I found a nice link that perfectly describes the process; making it a whole lot easier for me. Click HERE for the steps.

Labels: , ,

posted by Brad Prendergast at 10:12:00 PM (0 comments)
Links to this post
Permalink
Tuesday, December 06, 2005
Where’s my briefcase? (Part I)

In this hectic world of ours one may find themselves frequently traveling from place to place. With computers an integral part of every day life, how do you work with your files while you’re away from your main workstation? Do you simply copy and replace them when you return? What if you need to do this often? What if there are many files edited, added and/or deleted?

Fortunately there are two quick ways to accomplish this sort of thing built right into Microsoft® Windows®. You have a choice of a Briefcase or using Offline files. Both of these options allow you to synchronize your files with copies on another storage device. You can edit either version and synchronize them bringing the contents in sync. This is also a nice method of a sort of quasi-backup of your beloved files. The USB flash drives are perfect for offline storage. They are compact and capable of holding large amounts of data. I personally use Briefcase with my 1GB SanDisk Cruzer mini.

The creation of a Briefcase is fairly simple. Open up Windows® Explorer and browse to the location where you would like to store you briefcase (this is where your synchronized copy will be kept, not the original location). After browsing to the desired location select File --> New --> Briefcase from the menu items. A new briefcase object will appear on your device. Rename the newly created briefcase to something meaningful or appropriate. .Next find the files/folders that you would like to keep synchronized. Select those objects and copy them. Browse to your newly create briefcase and copy these files/folders inside. Tada! This is pretty much all that is necessary to set up your files for synchronization.

Once you have a briefcase set up you can take your storage device with you and work on your files while you are away. When you return to your main workstation you simply need to synchronize your files. To synchronize your files open up your briefcase and select Briefcase --> Update All from the main menu. A dialog will appear showing you the changes that are about to take place. You can keep the results as is, or change the direction of synchronization or even skip synchronization changes.

At first glance, to some, this may seem complicated. However, once you start using briefcases (yes, you can have multiple on one device for different locations, I use many. I even have one to synchronize my bookmarks on all the different computers that I use.) you’ll quickly become comfortable with them. They’re a great way to ensure you can access your files while you are away from you main workstation. It is also a nice way to keep a backup of those must have files.

Labels: , ,

posted by Brad Prendergast at 8:21:00 AM (0 comments)
Links to this post
Permalink
Saturday, November 26, 2005
Ode to Backup

Backing up your files is probably one of the most important things you could do. There is nothing worse than the feeling of loosing everything once your computer is on the fritz (I have received dozens of frantic phone calls asking how to, or if I can restore files). There are many commercial, shareware and freeware backup programs that are capable of accomplishing appropriate backups.

XCOPY has been included in the Microsoft® OS family since the DOS days. This little command prompt program copies file and folder information based upon the selection of a number of parameter options. This utility is lightweight and consists of a simple executable file. This is actually what I use for incremental backups of my personal system.

Open a command prompt and type xcopy /?. This displays a list of the xcopy.exe parameter options and their meaning. From the command prompt you can easily type in your xcopy command with the necessary parameters and you’ll be on your way. Personally I have a small batch file called backup.bat. This eliminates a lot of typing and the need to remember the options. This batch file is simple but extremely effective in giving me copies of the files I need. It consists of one line:

xcopy *.* c:\wutemp /S /C /I /M /F /R /H /K /Y /EXCLUDE:exclude.txt

My backup.bat file is located in the root of my profile directory, for this example we’ll say C:\Documents and Settings\BP. If you follow the parameters you’ll notice that I copy all the changed (archive bit set) files to C:\wutemp. This batch file will process the current folder and with the appropriate parameter set (/S) all subfolders as well. Once the backup batch is complete I them manually copy the files to DVD. If you are running a ‘full’ backup you would remove the /M parameter option.
I am fairly structured and organized when it comes to my files. I try to get everything that I need somewhere within the tree of my profile directory. Most applications these days store personal information in the Application Data of your profile directory or allow you to specify a ‘storage’ location. A lot of applications also store temporary or unimportant (unimportant in the sense of need to restore files in the event of a need to recover files) files in your profile directory as well. This is where the /EXCLUDE parameter comes into play. After all, it is really wasteful both time and space wise to back up all those temporary files.
My exclude.txt file looks something like this:

\DOCUME~1\BP\Templates
\DOCUME~1\BP\Start Menu
\DOCUME~1\BP\Recent
\DOCUME~1\BP\SENDTO
\DOCUME~1\BP\PrintHood
\DOCUME~1\BP\NetHood
\DOCUME~1\BP\Windows
\DOCUME~1\BP\Cookies
\DOCUME~1\BP\MY DOCUMENTS\MY MUSIC
\DOCUME~1\BP\LOCAL SETTINGS\TEMPORARY INTERNET FILES
\DOCUME~1\BP\LOCAL SETTINGS\TEMP
\DOCUME~1\BP\LOCAL SETTINGS\HISTORY

This is just an example on how I use XCOPY to back up my important files on my personal computer. In my opinion this is fast, lightweight and effective when it comes to storing those must have files. I hope this gives you some ideas on how you could possibly implement a simple backup solution.

Labels: , , , ,

posted by Brad Prendergast at 5:53:00 AM (0 comments)
Links to this post
Permalink
Saturday, November 19, 2005
Free Gems Do Exist (Part 2)

As time progresses I am becoming far more comfortable and impressed with Microsoft’s Log Parser. For one thing, I am awed at how it processes so fast. I processed 404 logs (over 4.6GB) in seconds, not minutes or hours as I had first thought. The command line syntax is also quite powerful. This tool allows you to precisely and quickly analyze data without a lot of overhead.

I had mentioned in the first post that another bonus is the COM interface. All the power of this command-line tool can be wrapped in a nice GUI interface, which is exactly what I had done. After reading about the interfaces in the accompanying help file I imported the Type Library for Log Parser into Delphi® (I have Delphi® 5 and Delphi® 2005 installed on my development machine and I worked with Log Parser in both versions) and installed the new components. One thing to note is that the TLogQueryClass is the only class that seemed to work properly after importing the library. Each of the Input and Output format components kept on reporting invalid log formats when I passed them to the TLogQueryClass method. I tried numerous ways to get them working. This was/is more of a nuisance more than anything else. The help file clearly lists (I have also included them in this source) the classes which can easily be created as variants.

To get started with a simple example of how to use the Log Parser interfaces I started a new application and placed a TFileEdit, TStaticText, TListBox and three (3) TButtons on the TForm. Rather than go into a verbose explanation I figured I’d just post some sample code and let the code explain what is going on. Here is a wonderful byproduct of living in the 21st century; there is no guarantee or warranty, expressed or implied, concerning the applicability of code and techniques included in this example. This example code is supplied AS IS. If you wish to use this code or technique, it is your responsibility to test and certify the code in your project.

Button1 (caption:= ‘Output’) shows how to use an InputContextClass and OutputContextClass.
Button2 (caption:= ‘LogParser Version’) shows how to retrieve the version information from TLogQueryClass.
Button3 (caption:= ’Record’) shows how to retrieve the information into a RecordSetClass from an InputContextClass and iterate through each of the records. In this example I add each entry to a list box.


uses
ComObj;

{
Input Formats:
ADS : MSUtil.LogQuery.ADSInputFormat
BIN : MSUtil.LogQuery.IISBINInputFormat
CSV : MSUtil.LogQuery.CSVInputFormat
ETW : MSUtil.LogQuery.ETWInputFormat
EVT : MSUtil.LogQuery.EventLogInputFormat
FS : MSUtil.LogQuery.FileSystemInputFormat
HTTPERR : MSUtil.LogQuery.HttpErrorInputFormat
IIS : MSUtil.LogQuery.IISIISInputFormat
IISODBC : MSUtil.LogQuery.IISODBCInputFormat
IISW3C : MSUtil.LogQuery.IISW3CInputFormat
NCSA : MSUtil.LogQuery.IISNCSAInputFormat
NETMON : MSUtil.LogQuery.NetMonInputFormat
REG : MSUtil.LogQuery.RegistryInputFormat
TEXTLINE : MSUtil.LogQuery.TextLineInputFormat
TEXTWORD : MSUtil.LogQuery.TextWordInputFormat
TSV : MSUtil.LogQuery.TSVInputFormat
URLSCAN : MSUtil.LogQuery.URLScanLogInputFormat
W3C : MSUtil.LogQuery.W3CInputFormat
XML : MSUtil.LogQuery.XMLInputFormat

Output Formats:
CHART : MSUtil.LogQuery.ChartOutputFormat
CSV : MSUtil.LogQuery.CSVOutputFormat
DATAGRID : MSUtil.LogQuery.DataGridOutputFormat
IIS : MSUtil.LogQuery.IISOutputFormat
NAT : MSUtil.LogQuery.NativeOutputFormat
SQL : MSUtil.LogQuery.SQLOutputFormat
SYSLOG : MSUtil.LogQuery.SYSLOGOutputFormat
TPL : MSUtil.LogQuery.TemplateOutputFormat
TSV : MSUtil.LogQuery.TSVOutputFormat
W3C : MSUtil.LogQuery.W3COutputFormat
XML : MSUtil.LogQuery.XMLOutputFormat
}

procedure TForm1.Button1Click(Sender: TObject);
var
szQuery: WideString;
pObjectInput,
pObjectOutput: variant;

begin
szQuery:= Format('SELECT c-ip FROM %s GROUP BY c-ip',[FileEdit1.Text]);

pObjectInput:= CreateOleObject('MSUtil.LogQuery.W3CInputFormat');
pObjectOutput:= CreateOleObject('MSUtil.LogQuery.DataGridOutPutFormat');

LogQueryClass1.ExecuteBatch(szQuery,pObjectInput,pObjectOutput);

pObjectInput:= Unassigned;
pObjectOutput:= Unassigned;
end;


procedure TForm1.Button2Click(Sender: TObject);
begin
StaticText1.Caption:= Format('LogParser Version %d.%d',[LogQueryClass1.versionMaj,LogQueryClass1.versionMin]);
end;

procedure TForm1.Button3Click(Sender: TObject);
var
szQuery: WideString;
pObjectInput,
LogRecordSet,
oRecord: variant;

begin
szQuery:= Format('SELECT c-ip FROM %s GROUP BY c-ip',[FileEdit1.Text]);

pObjectInput:= CreateOleObject('MSUtil.LogQuery.W3CInputFormat');

LogRecordSet:= LogQueryClass1.Execute(szQuery,pObjectInput);

while not LogRecordSet.atEnd do
begin
oRecord:= LogRecordSet.GetRecord;
ListBox1.Items.Add(oRecord.GetValue(0));
{ ListBox1.Items.Add(oRecord.ToNativeString(',')); }
{ The ToNativeString method retrieves the entire record with each value separated by the specified delimiter. }

LogRecordSet.MoveNext;
end;

pObjectInput:= Unassigned;
oRecord:= Unassigned;
LogRecordSet:= Unassigned;
end;


If anyone else does anything with this interface I welcome the posting of examples. This is it for now, time to go off and expand upon the BPACLer application.

Labels: , , , , ,

posted by Brad Prendergast at 8:17:00 AM (1 comments)
Links to this post
Permalink
Thursday, November 17, 2005
Free Gems Do Exist (Part 1)

This is another post that I write with much enthusiasm and excitement. Recently, I was in search of a versatile log analyzer. In the past, I have used AWSTATS for analysis if IIS logs. In this instance, my needs involved the analysis of ISA log files. AWSTATS is an excellent open-source Web and E-Mail log analyzer (that I highly recommend, and often do), but it just didn’t give me what I was looking for when it came to ISA logs.

My journey through the Internet, via Google, in search of an ISA log analyzer ensued. I read through many feature lists and articles, viewed a number of screenshots, for various programs that were capable of processing ISA logs. Then it happened. I stumbled across one of the most flexible, free forming analyzers I had come across. This program also has the feature of being absolutely FREE. The program I am talking about is Microsoft’s Log Parser. Yes, Microsoft does have those hidden GEMS that are free.

At first glance, this command-line utility does appear overwhelming and complicated. Once I dug into its functionality and discovered its wide range of use, the only overwhelming feeling I had was excitement. This command-line utility can extract information from many common log ‘file’ types. Log Parser also includes a variety of output options (NAT, DATAGRID and CHART are my favorite). The data that is outputted is determined through a SQL like syntax, which is very powerful and FAST. I was able to process inquiries across large (individual) log files, in a directory, in a matter of seconds (600K records in multiple files took under 5 seconds to process). This program handles such a range of log ‘file’ types that I find myself using it constantly throughout the day.

A couple basic examples of Log Parser’s use are:







Log Parser is also accessible via COM interface. Once I came across this information in the help file my excitement level raised to a new high. The power of this command-line utility can be easily ‘wrapped’ in a GUI interface.
I am a Delphi fanatic, as many know, and love to incorporate it into everything. After reading up on the Log Parser classes I quickly imported the Type Library and threw together a sample application. Unfortunately, this is long enough as it is and the sample Delphi code will have to wait for Part 2 of this posting…

In the meantime I highly recommend downloading Microsoft’s Log Parser and becoming familiar with it. Once you do I am sure you will use it often.

Labels: , ,

posted by Brad Prendergast at 8:29:00 PM (0 comments)
Links to this post
Permalink
Monday, November 14, 2005
What’s in a word?

Language is truly a fascinating form of communication. The way individual words have meaning and that those same words can be put together to form sentences is ingenious. Have you ever thought about the origin of language? Who came up with the different words and their meanings?

A few years ago I started browsing through the dictionary for additional words to add to my vocabulary. The English language is comprised of an abundance of words, some of my favorites include: malodorous, pusillanimous, recreant, fustigate, nescience and panjandrum. (There are many more, however, that would force this to display well beyond physical limits.) Through my journeys I was elated when I had come across the Merriam-Webster Online Dictionary. Not only does this site contain a searchable dictionary and Thesaurus, but it also includes a Word of the Day. What better way is there to increase your vocabulary?

The Merriam-Webster Word of the Day is available online and you can also subscribe to the Word of the Day list and have the word delivered to your e-mail daily. The listing includes the word, its definition and a sample use of the word. I have entries in my Word of the Day email folder that date back to 2003. I am one that actually tries to use the word of the day in my normal course of action. I look forward to seeing what word appears each morning.

I highly recommend subscribing to the Merriam-Webster Word of the Day. It is a great way to pick up some of the neat words within the English language.

Labels: , ,

posted by Brad Prendergast at 7:39:00 PM (0 comments)
Links to this post
Permalink
Friday, November 11, 2005
Delphi™ Components and Freeware Updates

I often reflect back on a business trip I had made to Mexico. I was ‘fortunate’ enough to not be in a so called ‘tourist area’, but the actual inner-sanctum of the country. One evening on the way to a local dining delight I asked our host if we could drive around and see authentic scenery and culture. By US standards, most people had nothing. There were cinder block houses with open window and doorways. I even thought I saw a few cardboard box expansions. One thing that I did notice was a sense of family and content. Most seemed happy with just that and their few material possessions. Most of the residents I had come across were very relaxed and happy to enjoy their family and health. There was a definite lack of pressure and 'rat' race to constantly get ahead (and obtain more). The older one gets, the faster the perception of time moves along. Seasons come and go in the blink of an eye, without most evening noticing. Which is culturally correct the appreciation of what you have or the constant pursuit and wanting of more?
-=-=-=-

Today’s updates include two Delphi™ Components and one of the Freeware utilities listed on this website.

TDBDateTimePicker has been updated to correct an issue that would cause the value to not be updated when you scrolled through a recordset. The correct value was stored; it was just the value not being displayed unless you were in a state of dsEdit.

TDBSpinEdit has also been updated. This update includes a change to the display (not stored) value on a new record. Also corrected was an issue that forced the need to click the up or down button twice to move the value. This is because the first would put the State to dsEdit and the second changed the value. This is all done on once click now.

BPACLer is the Freeware utility that has been updated. A number of minor enhancements and adjustments were made. The most notable enhancement is the ability to print the ACL information. A Check Version option has also been added to the Help menu. This allows you to check if you have the most current version of the software without the need to constantly check this website. This version checking does not send any information. It simply queries (GET) a web document containing product version information and compares it to your version. It is basically the equivalent of browsing and reading a web page. I am pleased with the feedback I have received regarding this utility.

If you have any comments or suggestions regarding this, or anything listed on this website please let me know.

Labels: , , ,

posted by Brad Prendergast at 12:48:00 PM (0 comments)
Links to this post
Permalink
Saturday, November 05, 2005
Shareware: APrintDirect version 5.1.2.7 available

An update to the popular shareware application APrintDirect is now available for download. APrintDirect is a feature rich 32-bit utility that allows you to easily print or save a customizable listing of the files contained in any folder (directory) on your computer. A number of enhancements and internal adjustments have been included in this latest release (see the history section of the help file). Notable enhancements include:

The addition of a parameter option was intended to allow for APrintDirect to be used as a SendTo option from Windows® Explorer (for information on setting up a SendTo shortcut visit My Send To).
APrintDirect now makes it easier to ensure that you’re using the current version through a Check Version option from the Help Menu.
A sortable file Owner column has been added to the list of available output columns.
Total file, size and folder count option has been added back to the listing.

Existing users should take advantage of the latest APrintDirect enhancements by upgrading to the latest version. If you have not yet tried APrintDirect download it today and try a fully functional version free for 30 days.

As always if you have any questions, comments or suggestions about APrintDirect please let me know. User feedback is vital to the continued development of quality software.

Labels: , ,

posted by Brad Prendergast at 9:57:00 PM (0 comments)
Links to this post
Permalink
Tuesday, November 01, 2005
Conditional Format

Spreadsheets are a great tool for analyzing, manipulating and 'testing' data. Over the years there have been significant advances in spreadsheets that allow for a lot more functionality. Based upon my interactions, I feel comfortable in saying that most people are unaware of and/or greatly underutilize many of the functions and features found in most popular spreadsheet applications.

I often find myself importing thousands of records from databases into a Microsoft Excel spreadsheet for some random ‘quick and dirty’ analysis or output. Once in Excel the possibilities are almost limitless when it comes to the representation of this data, whether it’s via pivot table, charts or just a plain old on the fly filtered list.

When viewing thousands of records it is more often palatable and easier on the eyes with some sort of visual record cues. For example, let’s say we’re looking at a list of customer invoice records, which are sorted by customer. Ata quick glance, by default, all the rows generally look the same. Without intense scrutiny the data sort of, blends all together. What about some sort of visual separation by customer? Excel does have Grouping and AutoFormat, however sometimes the grouping can be overkill. All those '+' and '-' can become overwhelming. Don’t get me wrong grouping is great for adding fast subtotals. The AutoFormat is nice for shading; however it shades on alternating records. What if you wanted to shade groups of records? One answer.. Conditional Formatting.

Conditional Formatting allows you to specify cell properties based upon certain value or formula information. After playing with it a bit, one can see that it is really quite useful. For my scenario:


  1. Sort your list
  2. Insert what I call tend to call a 'Helper Column'. This column is typically hidden, and used to indicate when there is a change in a specific value, i.e. Customer. I prefer to put this column as the first or last column in the data set. For this example we will use column A.

  3. Type the following formula in the first data row. We’ll start on row 2 because row 1 is our 'header': '=MOD(OFFSET($A2,-1,0)+ OR($B2<>OFFSET($B2,-1,0),0),2)'. Basically what this formula is saying is alternate 1 or 0 in this cell A2, based upon B2 being different than B1. (The $ before a cell RC value indicates that value is constant (will not change) when it is copied to another cell.)

  4. Copy (or use Fill Down; Ctrl + D) the formula down the entire length of the data set. There are a number of shortcuts that make this easier (Mental note: discuss some quick keyboard navigation another time).

  5. Select the entire data set including the 'Helper Column', making sure you have the upper rightmost column active, A2 in this example.

  6. Select Conditional Formatting… from the Format menu item.

  7. Change condition 1 to ‘Formula is’ and enter ‘=$A2=1’. We’re only going to apply the format if the cell value is 1. The 'Helper Column' should be alternating 0 and 1 on a change in Customer.

  8. Click the Format button

  9. Select the Pattern Tab

  10. Choose which color to fill the cell with when the condition is met

  11. Click Ok to close the Format dialog

  12. Click Ok to close the Conditional Format dialog.



Your spreadsheet should now be shaded by Customer.
This is just a simple sample of using the Conditional Formatting feature of Micrsoft Excel. There are a number of other properties that can be set based upon value or calculated formula that greatly enhances the representation of a data set in Excel.

Labels: , , ,

posted by Brad Prendergast at 6:51:00 PM (1 comments)
Links to this post
Permalink
Sunday, October 30, 2005
Delphi™ Components: TFileEdit Updated

A minor adjustment has been made to TFileEdit. The latest version of this component may be downloaded from here. TFileEdit is a descendant of TEdit which contains a button that, when clicked, calls an open file dialog that fills the TEdit control with the selected file name and path information. TFileEdit also has ButtonClick Event in order to perform your own action when the button is clicked.

Labels: , , ,

posted by Brad Prendergast at 8:52:00 AM (0 comments)
Links to this post
Permalink
Thursday, October 27, 2005
My Own Virtual World

I actually intended on writing a small paragraph on Microsoft Excel’s conditional formatting that hopefully I’ll get to at some other time. The reason for the shift is due to today being one of the more exciting days I’ve had in a while. I’m not sure how many others can appreciate why, but here goes:: I received the much anticipated copy of Microsoft Virtual PC 2004.

I tried explaining my outwardly expressive excitement to a relative and their direct response, ‘You’re a nerd!’ I am not certain how I should have taken that, but being a bit defensive; I went ahead and denied it profusely. Should I have a bit of resentment towards that comment?

Immediately following my repudiation, I continue along like I was a kid in a candy store. For those that aren’t fully aware of what this program does, it basically, allows you to run many virtual machines simultaneously on one desktop. Not only are these acting as separate machines, but they’re in there own (separate) space and have their own (separate) operating systems and applications installed. Note: It doesn’t come with anything other than the Virtual PC software so you’ll need to make sure you have your own legitimate copies of the operating systems that you intend to install. This would also hold true for any of the applications you install on the Virtual PC as well. I’d read the licensing carefully. I am a firm believer that an author’s license agreement should be honored.

Another thing [with this software] that caused my great excitement is that each Virtual PC is contained within one individual file on the host machine. Tell me that this isn’t sweet. Just think of all the potential things this could mean. You can easily backup the file and have ‘virtually’ a complete system backup. Each file is virtually its own machine, so you could set up the host bare bones and use one of the virtual machines as your main system. In the event of a host failure you could quickly get the Virtual Machine running of a different host. Provided you have the proper backup of course. This results in a quasi-disaster recovery plan. This also allows for a nice avenue to go in and test some tweaks and setting changes here and there and then simply replace a file to get you back to square one. There is an undo disk option that I haven’t played with that claims allow for reverting back to a previous state.

The added bonus is application testing with different operating systems. The testing of applications at various levels of patching and service packs on these systems before rollout is simplified 10,000 fold. Did I mention each Virtual Machine is in one file? Think of how quickly you can replace a tragically altered Virtual Machine. Gone are the days of separate machine(s) for pre-deployment testing. A robust production machine can quickly test a wide range of scenarios with far less space and equipment minimizing down time.

Each machine is customizable to the extent of memory and system resources. From my experience thus far it has access to most all of the host system’s hardware resources. You can even specify which NIC a Virtual Machine will use (if you have more than one or if at all).

If it is any indication of my level of excitement is that I dug into the treasure archive and set up a Virtual Machine with my old MS-DOS 6.22 disks. I haven’t touched a floppy in years, but figured it’d be a nice ‘to have around’ setup. I even found some DOS 6.0 and Windows 3.1 disks. Those will get setup as well. Why install them? Who knows, but they all will reside in their own files. The file sizes don’t seem to be bulky at all, in fact it seems to be the opposite it is not a 1:1 relationship. I did also go through the motions wiith Windows 98SE, Windows XP Home and Windows 2000 Pro Virtual Machine and they all initially seem to work well.

Next up at bat is Fedora with Open Office…… a nice slow transition……

Labels: , ,

posted by Brad Prendergast at 10:19:00 PM (0 comments)
Links to this post
Permalink
Tuesday, October 11, 2005
Access Control: ACL and ACE???

There are numerous folders, files and resources within the operation system. Some you had created and others are created and maintained by the operating system or installed applications. Also, in most corporate environments there typically is a shared (network) location for the storage of corporate files and resources. In either case the sensitivity level of the contents of these files varies. Some files may contain benign information that if anyone accessed or modified wouldn't result in sleep loss or pose any harmful side effects. Other files may be considered safe if accessed by anyone, but catastrophic if anyone but a select few modify its contents. There are also those files that contain information that should only be accessible by certain groups or individuals. After all, we can’t forget those lovely users that will browse through every single file to see what piece of gossip they can get their hands on or what they can change. With a countless number of imaginable scenarios one would hope there was some way to control resource access. Fortunately there is, the Access Control List or ACL.

The Access Control List is a list of security protections that are applied to system resources (files and folders do fall into resources). Each ACL [there are two types: Discretionary (DACL) and System (SACL)] has a list of Access Control Entries (ACE) that define access for Trustees. When it comes to users and groups, the DACL has access entries that basically define whether or not a Trustee has allow (ACCESS_ALLOWED_ACE) or deny (ACCESS_DENIED_ACE) access to the resource. The process of defining all of these goes far deeper than I am going to go.

What about getting information from an established ACLs? Basically determining who has defined access to what. Is there better resource management besides actually reviewing and verifying ACLs for resources? The first thing that is necessary is to obtain the resource's DACL. GetNamedSecurityInfo and GetSecurityDescriptorDacl will get you there. Once the DACL is obtained the next step is to loop through and process each ACE (AceCount tells you how many there are). The ACE_HEADER of an entry determines which AceType (allow or deny) the entry is. Within in each ACE there is a Mask that specifies the level of access (Read, Write, Modify, Execute, etc...) for the entry. Effective and Explicit rights are defined. This is all pretty straight forward and simple once you grasp hold of the concept.

When it comes to systems I am definitely the inquisitive type. Often I find myself in a position where I need or want to audit a file or folder's effective ACL information. I never really found a quick way to do this. I usually resort to selecting a file or folder, then viewing the Security tab of the Properties and scrolling through each Trustee listed. A quick look at this process and I don't think that it can get any more tedious or time consuming. Fortunately, there was a cold and rainy day available for me to think about this and review ACL security and structure. The result: A tool that significantly eases the process. BPACLer is a utility that lists the entries a file or folder’s access control list. The OWNER information is also listed on the ACE display. Try it out and if there is anything that you think would be a nice addition or change to the utility please let me know.

This information in this posting is not intended to guide in or fully explain security at any level. It is merely intended as a superficial exposure to Windows Access Control. Dig deep enough and you'll find a number of in-depth how-to resource security and design materials.

Labels: , ,

posted by Brad Prendergast at 9:34:00 PM (0 comments)
Links to this post
Permalink
Thursday, October 06, 2005
My Send To

I think this will start off with a small digression. Delphi is a wonderful software development language. As time gets closer to another release, the usual ‘future of Delphi’ chatter starts to surface. My personal take on Delphi is that it is one of the most powerful development environments/languages out there. I think it just suffers from a lack of and poor exposure. A lack of knowledge and understanding leads to fear and hostility (or negativity). After all it is easier to criticize and 'bash' something rather than admit you don’t fully understand it or are wrong. On to the original though that got me here ….

The ability to right clicking on a file or folder in Windows Explorer and selecting ‘Send To' to perform some action is a great time saver. What better way to quickly e-mail a file to a colleague There is a downfall to the limit the default options leave you. There are often times when I want to copy a file or folder to another location for backup or distribution purposes. There are also times that I’d like to quickly print and unopened text documents.
Under Windows you can add your own choices to the ‘Send To’ menu option. This is surprisingly easier than one would expect. In order to do this you first need to make sure that you have explorer set to show hidden program or system files. Next, browse to C:\Documents and Settings\<youraccountname>\SendTo. Once you open the Send To folder you will notice that the other send to shortcuts. Place a shortcut to your favorite folders or printers (I find it easier to just drag and drop printers into this folder) in the SendTo folder to have it appear in the list.

Labels: , , ,

posted by Brad Prendergast at 8:33:00 PM (0 comments)
Links to this post
Permalink
Wednesday, October 05, 2005
Straight to the Prompt

Even in the world of Windows it is often necessary to perform tasks via the command prompt. Along with the console applications that I have created, there are many other command line utilities that I use. Often, these utilities need to be run within a specific directory (a.k.a. folder). Instead of opening up the command window and changing to the desired directory, I find it much easier to open up Windows Explorer, right click on a folder select a menu option and have a command window open, already changed to a selected directory (similar to New Date Folder). This option is not a standard part of Windows Explorer but can be added rather easily.


1. Open Windows Explorer
2. Select Tools --> Folder Options
3. Select the File Types Tab
4. Select Folder from the list of Registered file types
5. Click on Advanced
6. Click the New… button
7. Type Prompt in the Action field
8. In the application field you can type one of two lines:
command.com /k cd %1
or
cmd.exe /k cd "%1"
The difference between the two is that the first option will browse with short file name and the second with long file names.
9. Keep clicking the OK button until you are back to Windows Explorer


You can now right click on a folder and easily get to a command prompt in a selected directory.

As always, proceed with caution when changing file types or any system setting. Basically, if you are uncomfortable doing this type of stuff then it might be best if you consult someone that has a high comfort level in making these types of changes.

Labels: , , ,

posted by Brad Prendergast at 3:34:00 PM (0 comments)
Links to this post
Permalink
Tuesday, October 04, 2005
AddrMon Updated

An update to AddrMon (1.0.0.49) has been posted and is ready for download. AddrMon is a FREE network utility to ping, monitor or traceroute a remote host. A number of adjustments have been made to this simple yet powerful application. The biggest change is the addition of the Monitor Grid. The Monitor Grid lets you view a summary of all the hosts being actively monitored. This will eliminate the cluttered window and simplify monitoring when monitoring multiple hosts. For additional information be sure to check out the AddrMon product page.

If you have any feature suggestions or product questions please feel free to post a comment.

Labels: , ,

posted by Brad Prendergast at 8:45:00 PM (0 comments)
Links to this post
Permalink
Monday, October 03, 2005
New Date Folder

I constantly backup and keep revisions of documents stored on my computer. For sorting and identification purposes typically create a folder with name conjured up using the current date and time. I usually create a folder name with the following format: ‘yyyymmdd hhmmss’. This allows me to see exactly when a ‘snapshot’ was taken and they pretty easy to sort in the correct order.

Opening Windows Explorer, browsing to the desired folder, selecting File--> New -->Folder and then renaming the folder, IMHO, takes way too much effort. I find it a lot easier to just open Windows Explorer, right clicking on a folder and then selecting ‘New Date Folder’ from the context menu . This speeds things up significantly and requires a lot less thought.

The ‘New Date Folder’ option can easily be added to your context menu as well. First open up notepad (or your favorite text editor) and enter the following text:

@echo off
SET MONTH=
SET DAY=
SET YEAR=
SET HOUR=
SET MIN=
SET SEC=

SET MONTH=%DATE:~4,2%
SET DAY=%DATE:~7,2%
SET YEAR=%DATE:~10,4%

SET HOUR=%TIME:~0,2%
IF "%HOUR:~0,1%" == " " SET HOUR=0%TIME:~1,1%

SET MIN=%TIME:~3,2%
SET SEC=%TIME:~6,2%

md "%1\%YEAR%%MONTH%%DAY% %HOUR%%MIN%%SEC%"

Save that document some place on your local hard drive as a batch file. The batch ‘datetime.bat’ in the folder C:\Batch is what I will use for this example. Next, open up Windows Explorer and select Tools --> Folder Options from the menu bar. This will open the Folder Options Dialog. Select the File Types tab. Scroll to Folder in the Registered file types list and click the Advanced button. In the Edit File Type dialog click on New. Type New Date Folder in the Action field and cmd.exe /c c:\batch\datetime.bat "%1" in the application field. Click OK on each of the open dialogs until you get back to Windows explorer. You should now be able to right click on a folder and be able to select New Date Folder to create a new subfolder with the current date and time.

One thing to note is that this will not work on network folders unless they are accessed via a mapped drive. Also, you may have to work with the precision on the SET lines in the batch file to work with your system's regional settings.

If you are uncomfortable or unfamiliar with any of the concepts discussed here you should probably refrain from doing this yourself and consulting someone who has a greater comfort level. I am sure you don’t want to inadvertently change anything that could potentially lead you to some computer headaches.

Labels: , ,

posted by Brad Prendergast at 2:22:00 PM (0 comments)
Links to this post
Permalink
Sunday, October 02, 2005
Delphi™ Components:TBPRichEdit Added

TBPRichEdit has been added to the list Delpi Components available for download. TBPRichEdit is a descendant of the native TRichEdit component. TBRichEdit has two additional scrolling events: OnVerticalScroll and OnHorizontalScroll. TBPRichEdit also adds properties (GutterSize, GutterColor, GutterTextColor) that display the TBPRichEditline numbers.

This component was developed due to a need to display line numbers (similar to TBPMemo) for a text listing. There was a slight twist; I wanted to 'colorize' certain text. Initially, my though was that it would only take a few moments to whip out this component, after all, the same code that adds the lines to the BPMemo could be used for a RichEdit. WRONG!
After creating the new component I realized that assigning the RichEdit as the parent of the PaintBox caused, well, issues. The text of the RichEdit was 'not being painted'. It was there. The text could be copied, pasted and cut, just not viewed within the RichEdit. After poking around a bit I did find one interesting tidbit that I had found in the Delphi 2005 help file for the BringToFront Method of a control, 'Note that controls that wrap Windows screen objects (control classes descended from TWinControl) always "stack" above lightweight controls (control classes descended from TGraphicControl).'. This got me thinking (how relevant this is still remains to be seen) about a number of things regarding the way this whole thing was set up and how a RichEdit gets created and painted. After some thought, the easiest way around this was to actually create and TPanel to hold the TPaintBox and then draw the panel over the RichEdit (adjusting for the potential moving and sizing of the RichEdit). One important thing to note, when performing this technique the BorderStyle and HorizontalScrollBar height need to be considered when positioning the panel. Afterall, we want the panel to line up and appear as if it is part of the RichEdit rather than something sitting on top of it. Covering the scroll bar is definitely quick way to screw that up.
At that point I only needed something to display the lines numbers for colored/highlighted text. I do at one point hope to adjust the line number positioning (centered) for the potential varying height of the lines of the TRichEdit. If there is anything else that you think should be added or see within the TBPRichEdit please let me know.

Labels: , , ,

posted by Brad Prendergast at 7:20:00 AM (0 comments)
Links to this post
Permalink
Recent Posts
 iPhoto: Find those unnamed faces
 Let's blow off the dust and wipe off the cobwebs
 SQL: DBCC CHECKTABLE on multiple tables
 SQL: Index Fragmentation Maintenance
 Off-topic: Uhm, Rickroll?
 SQL: Where are the database files?
 Show Desktop in my QuickLaunch Toolbar?
 Command Line: Visual Source Safe
 SQL: Remove / Delete Orphan Users
 SQL Delete/Drop a User from each Database

 Subscribe!


Labels



Archives
 October 2005
 November 2005
 December 2005
 January 2006
 February 2006
 March 2006
 April 2006
 May 2006
 June 2006
 July 2006
 August 2006
 September 2006
 December 2006
 January 2007
 February 2007
 March 2007
 September 2007
 October 2007
 November 2007
 July 2008
 November 2008
 August 2009
Powered by Blogger