Technology Tales

Adventures in consumer and enterprise technology

Missing borders in Internet Explorer

8th October 2007

It's quite difficult to describe this observation in a title so here goes with a longer description in a post. One thing that I spotted with the Prosumer theme used on this blog is that the links on the horizontal navigation bar underneath the mast head were not appearing as they should. The links have been formatted using CSS to appear in boxes with borders that are more apparent when you hover over them. In IE, the top and bottom borders were missing. After a spot of digging, I came up with the line-height property being the cause, and I was right: the extremities of the boxes surrounding the text were being cut off because they exceeded the allotted space. As if to emphasise that IE7 isn't as major a leap forward from IE6 as we would have liked, the problem affected that browser as well.

Aside: Link text colours weren't being honoured by IE7 like they are by IE6, Firefox and Opera, so another tweak to the CSS was needed.

What about a book on WordPress development?

7th October 2007

Here's something that I would really appreciate: a book on code cutting for WordPress customisation and extensions. Having the Codex is all very fine, but having a dead tree compendium that you can peruse at your leisure is a definite bonus. If there was a way to get the Codex on PDF and print it all off for easier reading, that would be progress. Though I believe that a publisher did plan to bring to the market something like what I want, the author and publisher parted company, a pity. It would be great to see something like Apress' Pro Drupal Development for WordPress. What about it, Automattic folks?

On Blogrolling.com

6th October 2007

I was ambling around the web and came across a website that, while it appeared to be a blog, isn't one in the vein of that to which we are accustomed. It does, however, have a blogroll and that is where Blogrolling.com comes into this piece. Blogrolls are very much a feature of the blogging (WordPress calls them that anyway) world and act as a repository of useful links relevant to the subject of the blog. I also use them as a bookmarking station for myself and a way to return the favour when someone links to my blog. For a blogroll, you generally need a database sitting behind in the background, or you end up creating a list of links in (X)HTML.

Blogrolling.com offers another option: placing your links at an external website and including them on your webpages, using a piece of code to pull in the information. RSS, JavaScript and PHP are among the methods on offer from Blogrolling.com; I used PHP when I gave the service a whirl on one of my offline blogs and that really does give you a lot of customising power over and above using CSS. That's not to say that there aren't customisation functions on offer from Blogrolling.com, I found a few of these distinctly useful: ordering of links in a blogroll is just one. When it comes to categorising your links, you don't get the category option, but you do get to create as many blogrolls as you want, so there is a workaround; moving links from one blogroll to another is mouse intensive but straightforward. Also, because you are reading each blogroll in turn, you can order the categories as you want them. With WordPress' category approach, ordering categories involves widgets and plugins or getting your hands dirty with some code cutting. All in all, Blogrolling.com seems to offer an intriguing and useful service.

Checking up on SAS system option settings

5th October 2007

The usual way to check up on your SAS system option settings is to do one of the following:

  • Through the menus: Tools>Options>System...
  • Entering options at the command line
  • PROC OPTIONS

There is another way, and that is to look at the relevant dictionary table, SASHELP.VOPTION (you can also call it DICTIONARY.OPTIONS in SQL). That has the added advantage that you check the values programmatically and extract them into macro variables, a useful functionality when you need to change and reset values. Yes, options resetting can be done with a bare OPTIONS statement (OPTIONS;) but there are times when it's like using a sledgehammer to crack a nut. Code using the dictionary table allows a much finer level of control and does not reset all the options to their defaults like the OPTIONS statement. Setting all options back to their default values is clearly not desirable where specific options need to be retained; I remember line and page size settings changing because of this, so the dictionary table approach has a lot going for it.

A throwback to the past: an appearance of MACROGEN

4th October 2007

Recently, I was reviewing a log of a program being run by SAS 9.1.3 on a Solaris system and spotted lines like the following:

MACROGEN(MACRO1):   OPTIONS NOMPRINT NOMPRINTNEST

NOTE: PROCEDURE DISPLAY used (Total process time):
real time           0.73 seconds
cpu time            0.50 seconds

MPRINT(MACRO1):   SOURCE SOURCE2 NOTES;

The appearance of the word MACROGEN made me wonder if there was another system option that I had missed. A quick search of the SAS website threw up a support note that shed some light on the situation. Apparently, MACROGEN is the SAS v5 forbear of today's MPRINT, MLOGIC, and SYMBOLGEN options and would seem to be obsolete in these days. Having started programming SAS in the days of version 6, I had missed out on MACROGEN and so used its replacements instead, hence my never coming across the option. Quite what it's doing showing up in a SAS 9 log is another story: and there I was thinking that SAS 9 was the result of a full rewrite... Now, I am not so sure, but at least I know what MACROGEN is if someone ever takes the time to ask me.

Terminology for larger and larger disk drive data volumes

3rd October 2007

When I started into the world of computing at university, 200-300 MB hard drives were the norm for PC's. My own first PC had what was then thought a sizeable 1.6 GB disk, only for things to increase in size since then. Now, I have access to several hundred gigabytes of storage at home, while we are now seeing 1TB offerings for the PC market.

Terabyte storage has been the preserve of the server market, but given the disk sizes that are available now, even larger units are needed to describe the sizes of data volumes, ones that I haven't seen before. So here goes:

Unit

Number of bytes
(in next smaller unit)

Number of bytes
(binary*)

Number of bytes
(decimal*)

petabyte

 1024 TB

 2**50

 10**15

exabyte

 1024 PB

 2**60

 10**18

zettabyte

 1024 EB

 2**70

 10**21

yottabyte

 1024 ZB

 2**80

 10**24

* Binary measurements are used by operating systems like Windows and Linux, while decimal ones are used by hard drive manufacturers

While I know that the above strays into the realms of esoterica, the way that things have been going may mean that we are talking about petabytes before very long. As it so happens, HP recently mentioned zettabytes when talking about its range of UNIX servers and I needed to go looking up what it meant...

Porting SAS files to other platforms and versions

1st October 2007

SAS uses its transport file format to port files between operating and, where the need arises, different software versions. As with many things, there is more than one method to create these transport files: PROC CPORT/CIMPORT and PROC COPY with the XPORT engine. The former method is for within version transfer of SAS files between different operating systems (UNIX to Windows, for instance) and the latter is for cross-version transfer (SAS9 to SAS 8, for example). SAS Institute has a page devoted to this subject which may share more details.

Quoshing WordPress 2.3 upgrade gremlins…

26th September 2007

Primarily because of the WordPress plugins that I use, a few inconsistencies have leaped out of the woodwork that needed to be fixed. Here are the issues that I encountered:

Database errors appearing in web pages

This was a momentary discovery along the upgrade trail, entirely caused by the way in which I was doing things. As usual, I went and copied over the WordPress 2.3 files to my web server, so I saw these errors before I ran the upgrade script. Then, they were banished, confirming that WordPress 2.3 code was trying to access a WordPress 2.2 type database; 2.3 has made some database changes to incorporate tagging.

Dashboard Editor no longer fully functional

The move to JQuery meant that some of the things for which it was looking had changed. They also changed the incoming links provider from Technorati to Google, now that the former is having a tougher time of it. It took a while to track down why I was unable to remove components from the front page of my dashboard as before, but a quick comparison of 2.3 code with its 2.2.3 forbear revealed all. I can make a copy of the updated code available for those who need it.

WordPress Admin Themer

The plugin works as before and does its job so well that you end up applying an old stylesheet (in the blog's theme folder) to the latest release. It only took a spot of tweaking to put everything in order.

I am not complaining about any of these, partly because they were easy to resolve and, in any event, I don't mind a spot of code cutting. However, I can foresee some users being put out by them, hence my sharing my experiences.

Update: Dashboard Editor has since been updated by the author. Even so, I will stick with my own version of the plugin.

Running SQL scripts with MySQL

23rd September 2007

Here's another of those little things that you forget if you aren't using them every day: running MySQL scripts using the Windows command line. Yes, you can also run SQL commands interactively, but there's a certain convenience about scripts. I am putting an example here so that it can be found again easily:

mysql -u username -p databasename < script.sql

Though I wouldn't be at all surprised if the same line worked under Linux and UNIX, I haven't needed to give it a try.

WordPress database error: [Can’t create table … (errno: 121)]

22nd September 2007

When I was trying to upgrade one of my test blogs to WordPress 2.3 RC1, I got error messages like the above littering the screen during the installation. The PHP functions mysql_noerr (or mysqli_noerr) and mysql_error (or mysqli_error) seem to have been busily at work. These messages told me that the upgrade hadn't worked, so I went off googling as usual and perusing the MySQL tomes in my possession. Not for the first time, the web yielded nothing but dross and, in the end, I tried deleting the relevant database and starting from scratch again. That resolved the problem.

The reason for database deletion sorting things out is that MySQL got confused when there was a mismatch between what was in the file system and what its InnoDB table was saying. Now, I think that the cause of this was that I naively copied in tables using Windows Explorer. Deleting the database cleared the air and all was well once I allowed WordPress to do the needful in its time-honoured way. With another lesson learned for the future, I wish that frustration wasn't part of the learning experience too...

  • The content, images, and materials on this website are protected by copyright law and may not be reproduced, distributed, transmitted, displayed, or published in any form without the prior written permission of the copyright holder. All trademarks, logos, and brand names mentioned on this website are the property of their respective owners. Unauthorised use or duplication of these materials may violate copyright, trademark and other applicable laws, and could result in criminal or civil penalties.

  • All comments on this website are moderated and should contribute meaningfully to the discussion. We welcome diverse viewpoints expressed respectfully, but reserve the right to remove any comments containing hate speech, profanity, personal attacks, spam, promotional content or other inappropriate material without notice. Please note that comment moderation may take up to 24 hours, and that repeatedly violating these guidelines may result in being banned from future participation.

  • By submitting a comment, you grant us the right to publish and edit it as needed, whilst retaining your ownership of the content. Your email address will never be published or shared, though it is required for moderation purposes.