Skip to main content

Six degrees of separation?

· 2 min read

In light of the estimated world population passing 6,666,666,666 a couple of days ago, and partially inspired by the inter-character linkages in the movie Love Actually, which I just happened to watch again last night, I got to thinking about the mathematical possibility of the six degrees of separation concept.

So, let's pretend for a moment, that every person on the planet has the same number of unique distinct people that they are "in contact" with. Let's define α to be that number. So if we let n be the number of degrees of separation, then the upper-bound of the total number of people within n degrees can be given by:

αn = α × α × ... × α = αn

Licensing the Adobe AIR command line compiler

· 2 min read

The Adobe AIR command line compiler ( axmlc adds a "Flex Data Visualization Trial" watermark to the background of chart and AdvancedDataGrid controls. If you are licensed to use Flex Builder 3 Professional, then you can fix this quite easily...

There are a number of pages on the internet that explain how to apply your Flex Builder 3 Professional license to the mxml (non-AIR Flex application compiler), such as:

But none of those cover the AIR compiler, however, it turns out that licensing the AIR compiler (axmlc)is just as easy as licensing the non-AIR (mxml) compiler.

Internet Explorer's window title

· One min read

Ok, so I found the registry key responsible for Telstra Bigpond's irritating re-branding of Internet Explorer's window title. This key:

HKEY_USERS\S-1-5-21-682003330-789336058-839522115-1004\Software\Microsoft\Internet Explorer\Main\Window Title

get set to:

"Telstra BigPond Home Internet Explorer"

So I just used the registry editor to change it back to "Microsoft Internet Explorer". Actually, I then experimented a little... I removed the value entirely, and in response, IE's title became "Windows Internet Explorer" - interesting.

I hate Telstra software

· 2 min read

Completely typical! I've just installed Telstra's BigPond Wireless Broadband client (unavoidable I'm afraid), and the installer has violated my PC in two ways (so far):

  1. the installer changed my browser's home page to some useless BigPond page; and
  2. the installer changed my browers's title from "Internet Explorer" to "Telstra BigPond Home Intenet Explorer"... that's right, viewing this site, my browser's window title actually reads "PC Thoughts - Telstra BigPond Home Internet Explorer"... arghh!!

Stealing from the (Steel)Vine

· 3 min read

First some background: The Asus P5W-DH Deluxe includes a Silicon Image SiI4723 hardware RAID controller. Yes, that's hardware RAID - not fakeraid. And since the controller presents the OS with just one logical disk (as it should), Silicon Image provide a utility called SteelVine Configuration Manager (SVCM) that can be used to view the current state of the controller and attached disks / arrays.

Now, since we use an Asus P5W-DH Deluxe for a server at work, it would be good to be able to get email (or SMS) notifications if the array becomes degraded. The obvious place to start is with the SVCM.

The bad news: SVCM is a graphical application - and scraping status information from the SVCM GUI is not that easy :(

The good news: SVCM has been implemented with a server / client architecture, using TCP to communicate between the two. So, it should be possible to create our own clone of the SVCM client. It turns out that SVCM uses a simple XML protocol, and that the server is stateless (so far as I can tell), so that should make getting the info we want pretty easy. However, there was one little hurdle that needed to be overcome first.

Seeding db2's RAND function

· 2 min read
IBM DB2

Most computers cannot generate truly random numbers. For this reason, many computer programming languages include pseudo-random number generators. These pseudo-random generators usually need to be seeded so that they don't always reproduce the same sequence of numbers.

textRollOverColor in Flex DataGrid part 2

· 2 min read

In my last post I presented a simple way to customise the DataGridItemRenderer class so the Flex DataGrid control would use the textRollOverColor and textSelectedColor styles correctly. But I also noted that the solution would not fix the DataGrid header items... well, here's my solution to that problem.

First of all, it's worth noting that there are two main reasons why a custom DataGridItemRender is not adequate for the DataGrid header items. The first reason is that the renderer's validateNow() method is almost never called for header items, even though it also called correctly, and often, for the data items. And the second reason is this: the validateNow() method (both the original version, and my custom version) depends on two DataGrid methods in order to determine which text style to use. Those methods are isItemHighlighted() and isItemSelected(). However, neither of those methods work for header items - they both always return false, making them of no use in determining text color for header items.

textRollOverColor in Flex DataGrid

· 3 min read

According to Adobe's documentation, the Flex DataGrid control supports the textRollOverColor CSS property. But this past week I discovered that this is not the case :( A quick search revealed that I'm not alone in this discovery, but it seems that no one has proposed a useful solution yet... so I went about creating my own :)

So, why doesn't it work as documented? Well, a quick check revealed that the relevant text colors are supposed to be set in the DataGridItemRenderer's validateNow() method. That method sets the item's explicitColor property, and then calls the super.validateNow() method to update the display. However, the super (UITextField) class' validateNow() method does not update the text format unless the styleChangedFlag property is set - but that flag is not being set. Since the styleChangedFlag property is marked as private, I can only assume that it is meant to be set by the relevant setter functions, but as there is no setter function for the explicitColor property, the styleChangedFlag is not set.