... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2006-10-30

MSDE Installer vs. Disk Space mod 4GB

If you try to use the MSDE installer (e.g. MSDE2000A) on a hard drive that has a multiple of 4GB free, the installer will complain that there is not enough disk space.  Microsoft's workaround is to create a temporary file that changes the amount of free space to something else.

KB301913: BUG: Error Message: "There is not enough space on drive" Occurs When You Extract SQL Server 2000 Downloads

KB811480: BUG: You Receive Error Message: "There Is Not Enough Space on Drive" When You Extract SQL Server 2000 Service Pack 1

2006-10-29

Windows CPU Speed Stepping

Applications that attempt to adjust their behaviour based upon the measured CPU speed (e.g. video games like Unreal Tournament) may behave erratically on lap-tops that use CPU speed stepping to save battery power.  You can turn off speed stepping under XP by going to the Power control panel and selecting the Home Office/Desk power configuration.  I'm not sure how people figured this out -- the control panel does not offer any clues as to what system parameters are adjusted for each setting and the Microsoft documentation is no help either.  It works, though.

2006-10-27

Exchange 2003 vs. Hotmail and others

We had problems today with our Exchange 2003 Server in that a large number of messages were not being delivered.  Looking in the Exchange queues, the messages were variously reported as having statuses like 'The connection was dropped by the remote host'.  I turned on detailed logging, and noticed that all the troublesome messages were using the BDAT SMTP verb instead of the DATA verb.  This was further confirmed by reviewing packet captures using Ethereal.

I have not been able to determine why this is occurring, and whether this has always been happening or just started happening recently.  However, I tried a quick work-around (found on the Net).  I turned off the extended verbs in the SMTP connector (under Routing Groups) by checking the Send HELO instead of EHLO option on the advanced tab.

One possible theory gleaned from Usenet revolves around the Symantec Anti-Virus software that was installed on the Exchange server.  A technical note from Symantec expressly warns against installing the Internet E-Mail Auto-Protect feature on an SMTP server of any kind.  Sure enough, our server had the auto-protect feature installed, and active.  I de-activated it for good measure, but perhaps I ought to uninstall it completely (a major operation on a production email server).  I'll watch it and see if de-activating it is enough.

Another Usenet message referred to scenarios exactly like what I was seeing.  They suddenly started getting timeout errors and such where none had appeared before.  Apparently, they talked about the problem to their ISP and the ISP made unspecified changes that fixed the problem.  I don't know whether to take these messages seriously or whether they were just using the ISP story as a convenient way to wrap up a long interactive discussion after finding a simple mistake was causing the problem.

Incidentally, using the Microsoft IIS logging format was more useful than the W3C Extended option because the former could be more readily loaded into Excel.  Furthermore, it took me a while to figure out how to get the extra fields (i.e. useful fields) configured in the latter by configuring the properties after selecting the logging type.  The IIS format automatically includes all of the extra fields.  Just don't keep a log file open in Excel for an extended period -- it seems to block all logging and possibly even the queue servicing.

SMTPDIAG

Microsoft has a nice tool for diagnosing SMTP delivery problems through Exchange, SMTPDIAG.  It didn't help me with the problem described above, however, since it uses the DATA verb instead of the BDAT verb.

2006-10-26

Javascript 1.7

Javascript 1.7 introduces a number of new features, including let.  I couldn't figure out what the difference was between for(var i ...) and for(let i ...) - until I tried it.  It hadn't occurred to me before, but Javascript does not (that is, did not) have block scope.  It only has global and function scopes.  So the first example introduces a new variable i within the enclosing function (or, failing that, global) scope.  The let version introduces i within block scope.

Here is a little sandbox for playing with Javascript 1.7 (I'd only expect it to work in Mozilla, of course).

2006-10-25

Exchange

When an ActiveDirectory user account has been disabled, it might render the user's mailbox in Exchange inoperative.  Outlook will issue a vague object about being unable to access the folders.  The event log on the Exchange server will record report a "log on" failure for the mailbox with the error code -2147221231.  There is a fix.  In ActiveDirectory, edit the user's properties under Exchange Advanced\Mailbox Rights.  Make sure that at least one user has the 'Associated External Account' permission.  If no user has that permission, assign it to the SELF account.

This issue is discussed by the Microsoft knowledge base entry KB278966.

2006-10-24

Outlook vs Exchange vs Email aliases

Using Exchange 2003, I was struggling to set up an aliasing scheme so that I could have a 'network administration' group which would serve as a target for incoming email relating to network issues such as ICANN registration, ISP correspondence, etc.  The set of internal users responsible for this correspondence could then vary over time by being added as members of the group.  Also, I would grant the 'on behalf of' right to those users so that they could send outgoing email from that address.

Unfortunately, it was a struggle.  Here are the problems:

  1. Changes made to the Exchange server do not propagate in real time.  For example, when I added a new user or mailbox, they did not appear in the Global Address List.  I had to manually rebuild the 'Offline Address List' on the Exchange server to make them appear.  By default, this happens infrequently.  Interestingly, when you trigger the rebuilding process, Exchange warns that the process could take several hours.  With 50-ish mailboxes, it took a few minutes.
  2. When you try to send email on behalf of someone else, you cannot simply type their email address into the 'From' box -- even if Outlook recognizes and completes the address for you.  You must select the address manually from the Global Address List.  If you don't do it this way, the email will be bounced back with the misleading error message: 'You do not have permission to send to this recipient' (read: you do not have permission to send as this sender).
  3. You cannot send mail on behalf of an email address associated with a group.  Exchange does not support that operation.

Incidentally, you do not seem to have to add a person to the 'On Behalf Of' list for a mailbox when that person has administrative rights.

2006-10-19

Mathematica RealTime3D

I keep forgetting this recipe, so I'm writing it down... You can activate Mathematica's interactive 3D renderer by entering the command:

<<RealTime3D`

You can restore the normal mode of operation thus:

<<Default3D`

2006-10-18

NoScript and Other Firefox Extensions

I installed a handy new Firefox extension, NoScript, that blocks all Javascript except for a white list of sites.  While I'm at it, here are the other extensions that I routinely install:

  • DOM Inspector
  • Web Developer
  • IE View
  • Javascript Debugger

2006-10-17

Dicodess

I tried to evaluate Dicodess, a distributed co-operative decision support system.  I couldn't get it to run.  I was following the 'robots' tutorial.  After pressing 'continue' on the 'Project Properties' page, the application simply exits.  No error messages are issued to the console, and there do not seem to be any log files.  At first I thought that the JVM that I was using, 1.5.0_07, was too new, but the system fails the same way under 1.4.2_12.  After failing once, the system hangs on start-up at the stage 'Initializing Working Memory'.  The only way to recover from this state is to delete the contents of the Dicodess 'projects' directory.

2006-10-13

Decoding MS Product Keys

Here is some JScript that can be used to display the product keys used to register various Microsoft products on the current machine.

2006-10-12

JIRA Crash

JIRA crashed today, complaining that the segments file in the indexes\issues directory of the repository was missing.  I tried to rebuild the indexes, but then it complained that it couldn't delete the index files.  The solution was to restart JIRA and then rebuild the indexes.

Perhaps another process was locking the JIRA files -- a backup or virus scan?

SWT Widget.dispose() Doesn't Get Called

The API documentation for org.eclipse.swt.widgets.Widget#dispose() has this interesting tidbit:

NOTE: This method is not called recursively on the descendents of the receiver. This means that, widget implementers can not detect when a widget is being disposed of by re-implementing this method, but should instead listen for the Dispose event.

Thus, the only reliable way for a widget to know if it has been disposed is to add a DisposeListener to itself.

3D References in Excel

You can create 3D references in Excel using cell addresses like Sheet1:Sheet4!A1:B10.  If you are creating a range using the mouse, you can extend it in the third dimension by shift-clicking on the tab of another sheet.

Worksheet-Scoped Names in Excel

It is possible to created names in Excel that are scoped to a worksheet, but there are gotchas to watch out for.  If you prefix a name with its worksheet name, e.g. Sheet1!MyName, then the name will be local to that worksheet.  That seems easy enough, but if you forget the prefix then you get a global name.  Subtleties can arise when you copy a worksheet because Excel will create local copies of all names in the new worksheet -- even copies of the global names.  Note that local names can shadow global names, although Excel will not let you create such a situation in the sheet that is the target of a global name.

If you want the references to be relative to the current sheet, and not the sheet that was active when the name was defined, you must prefix the cell reference with an exclamation mark (i.e. !B1 will work but B1 will reference the original sheet).

2006-10-11

Unofficial HTML Canvas Tag

There is a new "HTML5" element used for drawing:  Canvas.  It originally was implemented by Apple in Safari, but Firefox 1.5 supports it as well.  The tag is documented at Mozilla and at WhatWG.

MochiKit, PlotKit

MochiKit is a Javascript library.  PlotKit is a graphing library that builds upon it.

2006-10-10

Javascript Split Function

I discovered a discrepency in the way that the Microsoft and Mozilla implementations of Javascript handle the 'split' function.  Consider this expression:

"!abc!def!ghi!".split(/!/)

Mozilla returns an array with five elements, the first and last elements being empty strings.  Microsoft returns only three elements, having dropped the first and last elements.  Intuitively, Mozilla seems correct.  The definition of split in the ECMA-262 standard is difficult to read, but appears to support Microsoft's interpretation.

WSH/HTA Droplet

Here is a template for a Windows script droplet that forwards its arguments to an HTA.

2006-10-03

Finding Extreme Values in XSLT

Here's a neat trick to find the maximum value for an element using XSLT:

<xsl:variable name="max-date">
  <xsl:for-each select="/jira-work-activity/entry/date">
    <xsl:sort order="descending"/>
    <xsl:if test="position()=1"><xsl:value-of select="."/></xsl:if>
  </xsl:for-each>
</xsl:variable>

2006-10-02

Eclipse RCP Editors

I kept getting the following exception when trying to open an editor part using Eclipse RCP:

PartInitException: Unable to open editor, unknown editor ID: my.editor.id

The message was a lie -- I had registered an editor under the stipulated ID.  But when I debugged into Eclipse code, I could see that my editor had not been registered.  Investigating further, I found the following message in the application log:

!MESSAGE Plugin my.plugin, extension org.eclipse.ui.editors
Required attribute 'icon' not defined

It appears that the 'icon' attribute is required, even though it is not shown as such in the plug-in manifest editor.  Note that the condition is reported as a 'message' and not an 'error', so if you don't go looking into the application log, you won't see it.

Blog Archive