May 2007 Entries
I was working on a spreadsheet that submitted XML data to a web service and the XML that was being generated by the XmlDocument object was not very tidy. Normally with C# I use Tidy.NET to clean up the HTML or XML, but since this was being used in Excel I didn't want to have any external dependencies. I found the following code online and it seems to work pretty well:Option Explicit
' http://www.vb-helper.com/howto_formatted_xml_document.html
' Add formatting to the document.
Public Sub FormatXmlDocument(ByVal xml_doc As DOMDocument)
FormatXmlNode xml_doc.documentElement, 0
End Sub
' Add formatting to this element. Indent it and add a
'...
One of the projects I worked on was an embedded turbine controller that had an incredible amount of inherent complexity designed into the product. The controller used two processors, Motorola 68360 and MPC505, as well as dual-port memory for the inter-process communications (IPC). The developers spent a substantial amount of time installing the development software and trying to get the processors to communicate. This was the era where the software would be licensed to a NIC and so you could only compile the code on the machine with the licensed NIC. They even hired a consultant to help figure out...
There is something simple about JSON -- not that it can't be complex as well -- but simple data structures (where possible) should always be the goal. I was writing a simple test application for a web service and I wanted to save a history of the parameters I tested and also be able to use a combo box and retrieve past parameters. The web service had four parameters and I wanted to use a simple Javascript or Python style dictionary.var parameter = {
grName: "host1",
grNode: "test",
template: "$AnalogDevice",
...
A while ago I switched from Virtual Server 2005 R2 to VMware Server and so far I think it was a good switch. Unfortunately it wasn't without some consequences -- mainly that I should have read the procedure prior to converting my VM image. I had the Virtual Server extensions installed on my image and I forgot to remove them and then I seemed to be unable to remove them without doing extensive damage to the image. Now I am not able to install the VMware Tools as it causes the mouse to freak out and navigating through the keyboard...
I really like Subtext, but unfortunately I haven't had too much time to try to configure my blog. I've looked through the wiki, but haven't seen enough information to emulate the configuration of Subtext founder Phil Haack. For example, the FeedBurner plugin which lists the number of subscribers and links to get the RSS and even email feeds -- how exactly is that configured? I suppose I should RTFM but I'm having trouble finding it at the moment (not to mention I have way too much to do right now with work!). It seems the Subtext Wiki is describing plug-in...
A while back I needed to disable fields on a web page during submit and I found a utility written by Nancy Michell for MSDN Magazine. The utility covered the basic cases, but I found that I needed to use it for AJAX style calls as well as standard submits. So I modified the code to include an enable function as well. Finally I added exception handling around the disable and enable code to avoid pesky Javascript errors. The only thing I might change is to capture an array of the controls that were successfully disabled and then process only...