
I have been working on a project at work to create a status board display of important company metrics. Since this will eventually make it to a large LCD display, I am doing everything I can to make sure it is as perfect as possible. Now, I’m no professional designer but one of the things that really bothered me was the tables of information running together and there was no easy way to distinguish the data columns. I wanted to feather (fade) the text at the end of the column before the start of the next.
It seems there is not too much about this on the good old inter-web so I was off to hacking. Like most of my good ideas, they come to me when I stop thinking about them and just allow a moment of quiet. That came tonight at the dog park.
I was really consumed with the idea that I had to address the column that I wanted to feather, when in fact I needed to add the feather to the column I did not want to run into. The picture above shows to table rows, the first does not have the treatment, and the second does. Code to follow…
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
| <html>
<head>
<title>Sample Table Layout</title>
<style>
*, HTML {
padding: 0px;
margin: 0px;
font-family: verdana
font-size: 12px;
background-color: #000000;
color: #FFFFFF;
}
TABLE {
table-layout: fixed;
width: 675px;
}
TD {
white-space: nowrap;
overflow: hidden;
}
TD SPAN {
background: url(feather.png) repeat-y;
background-position: right;
position: absolute;
/* Set these both to the width of your feather image */
margin-left: -20px;
width: 20px;
height: 100%;
}
</style>
</head>
<body>
<table>
<tr>
<th>Col 1</th>
<th>Col 2</th>
<th>Col 3</th>
</tr>
<tr>
<td>The quick brown fox jumped over the log</td>
<td>This is the start of a second column.</td>
<td>Parker</td>
</tr>
<tr>
<td>The quick brown fox jumped over the log</td>
<td><span></span>This is the start of a second column.</td>
<td><span></span>Parker</td>
</tr>
</table>
</body>
</html> |
Infra has been a great ITIL toolset for my department. The only downfall I have run into is some of the simpler integrations or features come at a steep price point. This integration cannot be that far out of the box for Infra but yet costs thousands of dollars. Instead I have been spending some time understanding the Infra database and have come up with the following VBS to move the manager information stored in AD into the Infra database. We have this script to run each night and it keeps everything in order.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
| LDAPRootDN = "LDAP://OU=HCL Users,DC=hcl,DC=internal"
' Infra database DSN
InfraDSN = "Driver={SQL Server};Server=data01.hcl.internal;Database=infraEnterprise;Trusted_Connection=TRUE"
set objConnection = CreateObject("ADODB.Connection")
objConnection.ConnectionString = InfraDSN
objConnection.open
' Start the process
ProcessOU(LDAPRootDN)
function ProcessOU ( DN )
set CNUsers = GetObject(DN)
for each User in CNUsers
select case User.class
case "user"
' Migrate manager information if a manager is defined
if ( User.manager <> "" ) then
MigrationCount = MigrationCount + 1
MigrateManager User.distinguishedName, User.manager
else
' No manager information on file
end if
case "organizationalUnit", "container"
' This is an OU, recurse into
ProcessOU( User.ADsPath )
end select
next
end function
function MigrateManager ( StaffDN, ManagerDN )
set Staff = GetObject("LDAP://" + StaffDN)
set Manager = GetObject("LDAP://" + ManagerDN)
strQuery = "exec sp_MigrateManager '" + Staff.GUID + "', '" + Manager.GUID + "'"
set rs = objConnection.execute(strQuery)
end function |
The following is the supporting TSQL for the sp_MigrateManager procedure.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
USE infraEnterprise
GO
IF EXISTS ( (SELECT NAME FROM sysobjects WHERE NAME = 'sp_MigrateManager' AND TYPE = 'P'))
BEGIN
DROP PROCEDURE sp_MigrateManager
END
GO
CREATE PROCEDURE sp_MigrateManager
@StaffGUID NVARCHAR(300),
@ManagerGUID NVARCHAR(300)
AS
BEGIN
DECLARE @ManagerRef INT
SELECT @ManagerRef = COALESCE(REF, 0) FROM AR_USER_ATTRIBUTES WHERE ldap_object_id = @ManagerGUID
UPDATE AR_USER_ATTRIBUTES
SET
MANAGER_REF = @ManagerRef
WHERE
ldap_object_id = @StaffGUID
END
GO |
I have been spending the evening looking at my fresh install of Leopard (Mac OS X 10.5). It looks like PHP version 5.2.4 is installed by default. As of today, this is the latest version available. So far, the built in web server is not processing .php pages. I’ll look into that next.

UPDATE: Upgrading to 10.5.1 has resolved the issues displaying PHP pages.
I find myself doing development on Windows, Linux, and Mac. Most of the time this involves working on web applications. As such, I was struggling with finding an editor/IDE that would suite my needs on all of the platforms. I may have found it!
http://www.activestate.com/products/komodo_edit/
Komodo Edit. This is a free package that runs great on all of the platforms. The one big drawback in the lack of an integrated SVN client. I use subversion religiously, even on personal projects. For Windows there is the excellent TortiseSVN client that integrates with Explorer but I am still left with working at the command line for Linux and Mac.

Recent Comments