Archive for Normal

Static Linking on AIX

I’ve spent the last several hours trying to link a C++ program statically on our ageing AIX machine. As I’ve come to expect from IBM’s compiler – nothing’s ever that simple. What did I expect? They don’t even provide a man page, and the linker always kicks out thousands of irrelevant warnings by design. Read the rest of this entry »

Comments (9)

EventCalendar 3.0

UPDATE: Version 3.1 is now available.

http://wpcal.firetree.net


EventCalendar 3.0 is now available. Use WordPress to manage future events as an online calendar. Display upcoming events in a dynamic calendar, on a listings page, or as a list in the sidebar. You can subscribe to the calendar from iCal (OSX) or Sunbird. Read the rest of this entry »

Comments (205)

JavaScript onload

Here’s a way to use window.onload that won’t break other scripts that also need to use it: Store the current value of window.onload before you set the new value, then call it as part of your own initialization.

I’ve written this short helper function to do the job for you:

  function WindowOnload(f) {
    var prev=window.onload;
    window.onload=function(){ if(prev)prev(); f(); }
  }
Read the rest of this entry »

Comments (22)

EventCalendar 3.0 Beta

The release candidate of EventCalendar 3.0 is now available. The main new feature is a piece of JavaScript (AJAX) wizardry that allows you to flip backwards and forwards through the calendar without refreshing the entire page. The ‘Forthcoming Events’ list is also far more flexible. Many many other requested features have been added. Read the rest of this entry »

Comments (35)

JavaScript Find Position

I’ve been trying to use the findPosX() & findPosY() functions from Peter-Paul Koch’s excellent ‘quirksmode‘ site. The purpose of these functions is to find the absolute X and Y co-ordinates of an HTML element. They work well in both Internet Explorer and Firefox, but the results can be pretty rubbish on Safari. Read the rest of this entry »

Comments (134)

Thread yield after mutex unlock?

Is is sensible to unlock a mutex and immediately re-lock it? Consider this example:

  pthread_mutex_lock(mutex);
  while(1) {
      /* Do work. */
      pthread_mutex_unlock(mutex);
      pthread_mutex_lock(mutex);
  }

The intention here is to make other threads wait until we’ve finished doing work. Then we give them a chance to get in before we go round again and do more work. But can we guarantee that the scheduler will allow another thread to get in when we unlock a mutex? Is it possible that this thread will immediately re-lock the mutex, and never give other threads a chance to get in? Read the rest of this entry »

Comments

Object-Orientated JavaScript

Object-oriented JavaScript for the C++ programmer.

This article presents a bestiary of JavaScript constructs, set against their equivalent in C++. Most of the basic class and object tools are available in JavaScript, and the syntax is often recognisably similar. Read the rest of this entry »

Comments (11)

Xerces: Attribute already used

Today the Xerces XML parser gave me this bogus fatal error:

The attribute ‘aMixedCaseAttr’ is already used in element ‘anElement’

I was sure I’d seen it before, and sure enough it’s bugzilla bug #26627. Turns out it’s a bug in Xerces v2.4, It sometimes gives this error when the XML document contains mixed-case attributes. The only solution is to upgrade to a newer version.

Comments

EventCalendar2.3

I’ve updated my EventCalendar2 plugin for WordPress 1.5 again! It’s far easier to use than it was before. A new Options screen replaces the need to configure the plugin through template function parameters. A new template function generates a list of forthcoming events. Read the rest of this entry »

Comments (76)

EventCalendar2

I’ve finished updating my EventCalendar2 plugin for WordPress 1.5. I’ve added the ability to publish the ‘event’ category as an online calendar. You can subscribe to the calendar from iCal (OSX), Sunbird, and probably MS Outlook. Read the rest of this entry »

Comments (16)

Sponsors