Archive for category Computing

Problem with the Creole Plugin in the Dokuwiki 20101107 “Anteater” release

When the upgrade occurred, a bunch of errors, such as:

Warning: call_user_func_array() []: First argument is expected to be a valid callback, 'Doku_Renderer_metadata::section_edit' was given in /home/bilye3/public_html/dokuwikiStandard/inc/parserutils.php on line 419

Warning: call_user_func_array() []: First argument is expected to be a valid callback, 'Doku_Renderer_xhtml::section_edit' was given in /home/bilye3/public_html/dokuwikiStandard/inc/parserutils.php on line 555

would appear at the top of each page (sometimes multiple times).

After quite a bit of searching, the answer appears to be:

Comment out lines lines 67 – 72 of lib/plugins/creole/syntax/header.php (within the given dokuwiki installation), as follows:

if ($level <= $conf['maxseclevel']) { // $handler->_addCall('section_edit', array(
// $handler->status['section_edit_start'],
// $pos-1,
// $handler->status['section_edit_level'],
// $handler->status['section_edit_title']
// ), $pos);
$handler->status['section_edit_start'] = $pos;
$handler->status['section_edit_level'] = $level;
$handler->status['section_edit_title'] = $title;

Make sure you then

touch /conf/local.php

(within the given dokuwiki installation)
and the problem should be resolved.

This fix was provided here:
(see the bottom of the page)
and the cache touch issue was referenced here:
(once again, at the bottom of the page).

Here is a copy of the modified header.php for reference purposes:


// must be run within Dokuwiki
if(!defined('DOKU_INC')) die();

if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');

* All DokuWiki plugins to extend the parser/rendering mechanism
* need to inherit from this class
class syntax_plugin_creole_header extends DokuWiki_Syntax_Plugin {

function getInfo(){
return array(
'author' => 'Esther Brunner',
'email' => '',
'date' => '2007-02-09',
'name' => 'Creole Plugin, header component',
'desc' => 'Creole style headers',
'url' => '',

function getType(){ return 'container'; }
function getPType(){ return 'block'; }
function getSort(){ return 49; }

function getAllowedTypes(){
return array('formatting', 'substition', 'disabled', 'protected');

function preConnect(){
'(?m)^[ \t]*=+[^\n]+=*[ \t]*$',

function handle($match, $state, $pos, &$handler){
global $conf;

// get level and title
$title = trim($match);
if (($this->getConf('precedence') == 'dokuwiki')
&& ($title{strlen($title) - 1} == '=')){ // DokuWiki
$level = 7 - strspn($title, '=');
} else { // Creole
$level = strspn($title, '=');
if ($level < 1) $level = 1; elseif ($level > 5) $level = 5;
$title = trim($title, '=');
$title = trim($title);

if ($handler->status['section']) $handler->_addCall('section_close', array(), $pos);

if ($level <= $conf['maxseclevel']){ // $handler->_addCall('section_edit', array(
// $handler->status['section_edit_start'],
// $pos-1,
// $handler->status['section_edit_level'],
// $handler->status['section_edit_title']
// ), $pos);
$handler->status['section_edit_start'] = $pos;
$handler->status['section_edit_level'] = $level;
$handler->status['section_edit_title'] = $title;

$handler->_addCall('header', array($title, $level, $pos), $pos);

$handler->_addCall('section_open', array($level), $pos);
$handler->status['section'] = true;
return true;

function render($mode, &$renderer, $data){
return true;

//Setup VIM: ex: et ts=4 enc=utf-8 :

No Comments

VirtualBox Setting Screen Resolution

VBoxManage setextradata “CustomVideoMode1” “
where screen-resolution = 1440x900x32 or 1280x1024x16 for example

No Comments

Mounting Shared Drives in VirtualBox

mount -t vboxsf <share> <mount_point>

where  <share> is the name of the share (not the original drive or directory)

and where  <mount_point> is the linux /mnt directory (point)


No Comments

Increase Size of Hard Disk in VirtualBox

I quite like VirtualBox, originally from Sun, now Oracle – probably because it is free!  But seriously, it isn’t a bad little system and desperately needed for desktop use if nothing else (I truly welcome the day when every PC comes pre-installed with a standards-based virtual machine and the operating system is installed inside that virtual machine – allowing one to (a) install other operating systems to execute concurrently very easily, and (b) to move a nicely setup environment from one PC to another without the enormous hassle of re-installing and re-configuring everything all over again.  Anyway, back to the story at hand).

I very easily created a Ubuntu 9.04 virtual machine, and like many other people, I set the virtual hard disk size too small, as I found out in the end.  I set it to 8Gb, thinking that for “test” purposes that would be fine.  As is always the case, I loaded software after software package, et voila, the 8Gb is almost completely gone, to the stage that ubuntu starts complaining about not enough disk space to do things or upgrade to 10.04.

So, I dive into the world of trying to increase the size of a virtual hard disk in VirtualBox.

Firstly, the VirtualBox documentation does say that you can not do it.

The documentation also has references to other possible solutions, such as VBoxManage clonehd etc etc – all of which appear to be red herrings.

Searching across forums etc reveals the following basic pattern:

  1. Create a new empty virtual hard disk of the required (new larger) size, using the VirtualBox Virtual Media Manager (under the File menu of the main VirtualBox program).  This can be a dynamically expanding or fixed size disk;
  2. Attach this new disk to the existing virtual machine image, as a secondary disk.  For ubuntu purposes, the original diskj should generally be /dev/sda and the newly attached disk should be /dev/sdb, assuming that you only originally had a single disk in your setup and only attached this new disk as the next disk;
  3. Restart the virtual machine and copy everything from the old disk to the new disk using the command: dd if=/dev/sda of=/dev/sdb  Note that you must copy the whole disk, since the boot sectors etc must be copied across.  I did try to just copy the main os partition (ie /dev/sda1 to /dev/sdb1 but because the boot information was obviously not copied, when I came to reboot using the new disk it failed (obviously);
  4. Run ‘gparted’ (may need to install on the ubuntu system).  The new disk should be ‘sdb’.  You will see that it has a partition with the old disk on it, but also partitions for the boot sectors and for the linux swap and unallocated space.  The idea is to allocate the unallocated space to the end of the partition with the old disk in it, but in my attempts, gparted would not allow me to do so, since the linux-swap partition was in the way and could not be moved to the end or another position.  The old disk partition could also not be unmounted or mounted, since I think it was mounting to ‘/’, which was already used by ‘sda’.
  5. This then was the end of the road for me.  I decided that it would be more effective to install a new ubuntu in a new larger virtual hard disk (since I had already downloaded the new version of ubuntu) and jsut re-install whatever packages I had installed in the old disk.
  6. Obviously this would not be effective if the old disk contained systems and data of importance, rather than just test packages etc.  In this case, it is a relatively simply matter to attach the old virtual hard disk as a secondary disk to the new machine, then mount that disk from /dev/sdb and copy across (or re-use) whatever one needed.

, , ,

No Comments

Environment Variables in Windows (Vista, XP)


Sometimes it is desirable to edit certain of the environment variables such as %PATH%. Or it may be useful to create a user-defined environment variable. Vista contains a command-line method SETX that provides a variety of options. It can be used to either create or modify environment variables. Variables can be in the user or the system environment. The command has a number of switches that make it useful in scripts. (Needs administrator privileges.)

Environment variables can also be edited directly in the Registry. They are stored in the same Registry keys as they are in Windows XP. System variables are in the key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
User-specific variables are in


SetX has three ways of working:

Syntax 1:

  SETX [/S system [/U [domain\]user [/P [password]]]] var value [/M]

Syntax 2:

  SETX [/S system [/U [domain\]user [/P [password]]]] var /K regpath [/M]

Syntax 3:

  SETX [/S system [/U [domain\]user [/P [password]]]]
       /F file {var {/A x,y | /R x,y string}[/M] | /X} [/D delimiters]


  Creates or modifies environment variables in the user or system
  environment. Can set variables based on arguments, regkeys or
  file input.

Parameter List:

  /S     system          Specifies the remote system to connect to.
  /U     [domain\]user   Specifies the user context under which
                         the command should execute.
  /P     [password]      Specifies the password for the given
                         user context. Prompts for input if omitted.
  var                    Specifies the environment variable to set.
  value                  Specifies a value to be assigned to the
                         environment variable.
  /K     regpath         Specifies that the variable is set based
                         on information from a registry key.
                         Path should be specified in the format of
                         hive\key\...\value. For example,
  /F     file            Specifies the filename of the text file
                         to use.
  /A     x,y             Specifies absolute file coordinates
                         (line X, item Y) as parameters to search
                         within the file.
  /R     x,y string      Specifies relative file coordinates with
                         respect to "string" as the search parameters.
  /M                     Specifies that the variable should be set in
                         the system wide (HKEY_LOCAL_MACHINE)
                         environment. The default is to set the
                         variable under the HKEY_CURRENT_USER
  /X                     Displays file contents with x,y coordinates.
  /D     delimiters      Specifies additional delimiters such as ","
                         or "\". The built-in delimiters are space,
                         tab, carriage return, and linefeed. Any
                         ASCII character can be used as an additional
                         delimiter. The maximum number of delimiters,
                         including the built-in delimiters, is 15.
  /?                     Displays this help message.

NOTE: 1) SETX writes variables to the master environment in the registry.

    2) On a local system, variables created or modified by this tool
       will be available in future command windows but not in the
       current CMD.exe command window.
    3) On a remote system, variables created or modified by this tool
       will be available at the next logon session.
    4) The valid Registry Key data types are REG_DWORD, REG_EXPAND_SZ,
    5) Supported hives:  HKEY_LOCAL_MACHINE (HKLM),
    6) Delimiters are case sensitive.
    7) REG_DWORD values are extracted from the registry in decimal


  SETX /S system /U user /P password  MACHINE COMPAQ
  SETX /S system /U user /P password MYPATH ^%PATH^%
  SETX TZONE /K HKEY_LOCAL_MACHINE\System\CurrentControlSet\
  SETX BUILD /K "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
       NT\CurrentVersion\CurrentBuildNumber" /M
  SETX /S system /U user /P password TZONE /K HKEY_LOCAL_MACHINE\
  SETX /S system /U user /P password  BUILD /K
       "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\
       CurrentVersion\CurrentBuildNumber" /M
  SETX /F ipconfig.out /X
  SETX IPADDR /F ipconfig.out /A 5,11
  SETX OCTET1 /F ipconfig.out /A 5,3 /D "#$*."
  SETX IPGATEWAY /F ipconfig.out /R 0,7 Gateway
  SETX /S system /U user /P password  /F c:\ipconfig.out /X

No Comments

ecoder – online programming editor

I have been looking around for a reasonable online (ie available over the internet from any location) editor for programming purposes.  There appears to be a dearth of available offerings (as at August 2010), and there certainly does not seem to be any online Interactive Development Environment (IDE) products out there (and by making this statement, I am hoping that people will disabuse me of this notion and apprise me of numerous excellent offerings!).

One of the online programming editor products I found was “ecoder” ( – the “demo” site made it look OK – simple yet effective.  So, I downloaded it and had a try.

It is a PHP and Javascript play.  Download the zip file to a directory on your server, unzip it and follow the installation instructions.

I made the changes to code.php in the root directory as instructed:

  1. Created a directory to store my documents in – outside the www directory of the server (probably a good security idea to do so, based on experiences with other such products) and indicated that directory in the $code[‘root’] variable
  2. Changed $code[‘domain_cookie’] to my domain name (ie without the www. in front of it)
  3. Set $code[‘name’] to my own ecoder title name – even though the instructions indicated that this variable currently did not really do anything – what the heck, might as well
  4. Did not do anything with the security settings.  I could not figure out exactly what was required with respect to these security instructions.  After posting something on the forum for ecoder (in re security, the answer virtually reflected the instructions – set up your own security script, call that immediately when going to the ecoder main page (index.php), then if the operator has logged in correctly, go back to ecoder with a variable set indicating it has passed security.  What variable (name, etc)?  Does the security module have to be in PHP?  Where to put the code (in index.php or code.php)?  Having no idea of the structure of the ecoder application and not being a PHP guru (and not having a security module lying around), I decided to ignore these security instructions for the moment.
  5. I wanted to be able to edit Python and Java programs, so I modified the $_SESSION[‘tree_file_types’] variable to include py and java extensions
  6. I then set the error log path to be a directory under my repo directory (why not?) and set my error email address properly.

Now, by simply going to the address of the website folder I had loaded ecoder into, believe it or not, it actually worked.  The editor came up and I could see the home page with the dummy text in it – and I could edit it.  Well done to the author of ecoder – not too shabby in terms of getting something running in less than half an hour.

So, onto doing something with the product.

I uploaded a python program I had written.  Upload seemed to go OK.  The program made it into the left hand file listing panel – BUT, there was no way that I could edit the file I had just uploaded.  Repeated clicking on it did nothing (it’s amazing isn’t it, that when something won’t work, you keep clicking and clicking on the same area, in the hope that by the hundredth click, something miraculous might happen and it will suddenly work when it had not worked for the last 99 attempts.  I am sure that it has happened for someone in the past, but never for me – yet I keep repeating the same monkey behaviour every time).

So, upload had some problems.  I then tried to create a new program with the py extension from scratch.  Clicking “new file” gave me the dialog box to enter the filename and the drop down list with all the right extensions in it – with “py” at the top (just as I had specified in the code.php program).  Except, that when I sent to save the new file, an error occurred – the type of file was not allowed, the extension was wrong.

Next I managed to create a file with the txt extension (a plain text file) and edit it.  All OK.

Which bought me back to thinking about security.  I still couldn’t be bothered with the instructions in the code, so I went for the raw basic .htaccess and .htpassws solution.  Real basic stuff, but enough to work OK (provided I loaded the variables for Auth in .htaccess properly – made a mistake in the URL referencing the .htpasswd file and got errors – but managed to fix that relatively quickly) and got myself some raw security over the site.  Maybe one day I will go and create a nice login script – maybe a generic one for any system I have.  I am sure someone has written something out there for that as well.

But then, back to the Python editing.  Tried the py extension again (remember – Monkey see, Monkey click).  Still no luck.

Not to be defeated, I thought I would look through the code (I know PHP well enough to be able to read what was going on).  Took a little longer than I expected.

I eventually found that in “code/save/add.php” line 50, the system checks that there is a file which exists called “template.ext” where “template” is the actual string “template” and “ext” is the extension of the file to be created. Thus creating such a template file allows the file to now be created. It places the newly created file in the tree display on the left, but it now can not be selected and edited.

Uh – the whole structure of the thing now not looking so good – in that there seem to be dependencies all over the place in terms of simply specifying that one wants to edit with a different extension to a file (and no documentation at all).

But, being a determined little soul (I was going to write “sole” – with reference to the soles of one’s shoes, or feet – meaning that I now felt trodden upon and thoroughly down-trodden, but that would be an inaccuracy – I was pressing ahead!), I went searching for where the next error lay.

In the code for “type.php” (in the code/tree folder), every single extension appears the be hard-coded into this code, with specific other fields specified for a particular type of extension.   Copying the “php” lines at the bottom of this file and making it “py” finally allowed the code to work for a new type of extension.

I tried to create another file – lo and behold it not only saved, but placed the file in the left hand panel with the ability to click on the filename and edit it in the right hand panel.  Everything now seemed to be in a working state – at least working enough for me to be happy that I had an online programming editor that at least allowed some editing from my own site.

Mind you, at the end of the process, the conclusion I came to was that  it maybe a good idea to refactor some code to allow this new extension specification to all happen within the code.php file (or better still, have the complete code.php set of variables read in from a YAML file, for instance), to set the required controls.  These are the types of situations that one should probably consider building into one’s code from the beginning – have absolutely everything specified as sets of variables in configuration or control files using a standardised format, right from the beginning of the exercise.  A little more work coding wise, especially if the system is being built as one goes along, but worth the effort at the end of the day.  It would be nice to actually have a series of standard libraries to assist one in that area (I am sure they are our there – and I will need to try to find them and see how good they are).

The original author of ecoder responded to say that not much work had been done on the product for a while and that maybe it would get looked at over winter (I presume the Northern Winter, since we are in winter right now where I am – but our part of the world doesn’t count as real) – with a hint that someone may like to look at it and make some changes themselves.  Not really wanting to code in PHP (currently, Python and Groovy are the languages of choice), I might think about this a little longer.  And do some more research – now looking into the Mozilla Labs Bespin product to see whether that is what I want/need/can use.

No Comments

Troubles with ICT Tribbles


Exhibit One

October 2007

I am in an environment that uses  a third party tool instead of sourcesafe that does not integrate with the IDE – fun, that.
Oracle stored procs – no dynamic SQL in the apps (double-bugger).  However I am going use my discretion on that issue.
They have got a consultant in to review their system architecture and he is recommending the Oracle SOA with a communication layer —  wait for it — consisting of the Oracle Enterprise Bus.  This of course makes all database requests onto the bus asynchronous, which requires a radical rethink of the way we develop our apps.  I’ve already made my position clear – ie I can live with Oracle (only just) but bus architecture – like, NO WAY!!!  Horrible memories of Infor are flooding back!!!  I am pushing hard for a standard client-server tiered archetecture – good old presentation layer, business-rules layer and data access layer (even if half the DA layer lives inside Oracle).  I want the business-rules to be served up by IIS web services, and seeing as we are a .net shop, I can’t really see any compelling reason why not, esp as our apps only service Keystart people on an intranet.  One other brilliant idea this consultant had is that the service layer should include Windows Services to handle long-running jobs like database bulk loads. The reason for this is that apparently Web services don’t like long running threads.  The only long running jobs that exist here are database bulk loads of 6-8 Mb, which only take a long time because the load process has been badly-written and takes about 2 hours.  If you use the ODAC bulk loader that amount of data should take about 10 secs max.  My solution – write a winforms app.  Should take me about half a day max.  Write a Windows service and a named pipes/TCP sockets comms protocol and handle any concurrency issues?  Half a month if I’m lucky.  So much for consultants.  You should read his report – 23 pages, the first 19 of which was Computing Science 101, the rest actually addressing the issues – (see above).
To add insult to injury I have to go on an Oracle SOA course in November.  Can’t wait for that one!!!
Any vacancies down there???
Actually I shouldn’t complain.  This is actually pretty much a greenfield site, so I should be able to get the powers-that-be to see things my way and do things thay way they should be done.  They guy I work with I’ve known for years and he sees things my way as well, so hopefully it will all work out.  Otherwise I will be looking around for SQL Server opportunities.


PS – This is not MY story – just a random story from the internet

No Comments






This is G o o g l e‘s cache of as retrieved on 15 Oct 2007 13:47:33 GMT.

A Hotlist of Internet Sites organized using Dewey Decimal Classification codes.

000 Generalities

  • 000 Generalities (427)
  • 010 Bibliography (60)
  • 020 Library and Information Science (47)
  • 030 Encyclopedias (14)
  • 040 Unassigned (0)
  • 050 Magazines (12)
  • 060 General organizations and museology (18)
  • 070 Journalism (44)
  • 080 General collections (9)
  • 090 Manuscripts and rare books (0)

500 Science

  • 500 Science (50)
  • 510 Mathematics (18)
  • 520 Astronomy & allied sciences (14)
  • 530 Physics (26)
  • 540 Chemistry (15)
  • 550 Earth sciences (28)
  • 560 Paleontology, Paleozoology (10)
  • 570 Life sciences (29)
  • 580 Botanical sciences (11)
  • 590 Zoological Sciences (50)

100 Philosophy and Psychology

  • 100 Philosophy (4)
  • 110 Metaphysics (2)
  • 120 Epistemology, causation, humankind (3)
  • 130 Paranormal Phenomena (6)
  • 140 Specific philosophical schools (2)
  • 150 Psychology (10)
  • 160 Logic (4)
  • 170 Ethics (2)
  • 180 Ancient, mediaeval, Oriental philosophy (0)
  • 190 Modern Western philosophy (1)

600 Technology

  • 600 Technology (10)
  • 610 Medical sciences, Medicine (131)
  • 620 Engineering & allied operations (81)
  • 630 Agriculture (27)
  • 640 Home economics & family living (80)
  • 650 Management & auxiliary services (54)
  • 660 Chemical engineering (7)
  • 670 Manufacturing (7)
  • 680 Manufacturing for specific uses (86)
  • 690 Buildings (5)

200 Religion

  • 200 Religion (6)
  • 210 Natural theology (2)
  • 220 Bible (1)
  • 230 Christian theology (1)
  • 240 Christian moral and devotional theology (0)
  • 250 Christian orders & local church (1)
  • 260 Christian social theology (1)
  • 270 Christian Church History (1)
  • 280 Christian denominations & sects (1)
  • 290 Other & comparative religion (3)

700 Arts and Entertainment

  • 700 Arts and Entertainment (38)
  • 710 Civic & landscape art (2)
  • 720 Architecture (11)
  • 730 Plastic arts, Sculpture (1)
  • 740 Drawing and decorative arts (38)
  • 750 Painting & paintings (3)
  • 760 Graphic arts, Printmaking & prints (6)
  • 770 Photography & photographs (5)
  • 780 Music (43)
  • 790 Recreational & performing arts (428)

300 Social Science

  • 300 Social Science (98)
  • 310 General statistics (6)
  • 320 Political science (29)
  • 330 Economics (97)
  • 340 Law (17)
  • 350 Public administration (28)
  • 360 Social services, associations (55)
  • 370 Education (123)
  • 380 Commerce, communications, transport (119)
  • 390 Customs, etiquette, folklore (15)

800 Literature

  • 800 Literature (42)
  • 810 American literature in English (9)
  • 820 English & Old English literatures (5)
  • 830 Literatures of Germanic languages (0)
  • 840 Literatures of Romance languages (0)
  • 850 Italian, Romanian, Rhaeto-Romanic literatures (1)
  • 860 Spanish & Portuguese literatures (0)
  • 870 Latin & Old Latin literatures (1)
  • 880 Hellenic literatures, Classical Greek (1)
  • 890 Literatures of other languages (1)

400 Language

  • 400 Language (11)
  • 410 Linguistics (14)
  • 420 English (7)
  • 430 Germanic languages [German] (1)
  • 440 Romance languages [French] (2)
  • 450 Italian, Romanian, Rhaeto-Romanic (1)
  • 460 Spanish & Portuguese languages (6)
  • 470 Italic languages [Latin] (1)
  • 480 Hellenic languages [Classical Greek] (1)
  • 490 Other languages (11)

900 Geography & History

  • 900 Geography & History (13)
  • 910 Geography & travel (74)
  • 920 Biography, genealogy, insignia (12)
  • 930 History of ancient world (6)
  • 940 General history of Europe (34)
  • 950 General history of Asia [Orient, Far East] (18)
  • 960 General history of Africa (7)
  • 970 General history of North America (14)
  • 980 General history of South America (4)
  • 990 General history of other areas (12)


About CyberDewey

The Dewey Decimal Classification is comprised of 10 Classes (Generalities, Philosophy, Religion, Social Science, Language, Natural Science, Technology, Art, Literature, and History). Each class is further subdivided into ten Divisions, and each Division into ten Sections.

This page displays the one hundred Divisions, each of which is displayed on a subpage. The numbers in parentheses show the number of links in each Division.

Related Materials:

  • My article Organizing Computer Resources tells the tortuous path I followed before discovering that Dewey is a robust, general-purpose way to organize just about anything.
  • The Subject Index contains an alphabetical list of the terms used in the division headings.
  • The FAQ contains pointers to other Dewey resources, some suggestions for using Dewey, and a status report.


Internet Cataloguing-in-Publication Data

Mundie, David A.     CyberDewey: A Catalogue for the World Wide Web / David A. Mundie     Pittsburgh, PA : Polymath Systems  1995     1. Bibliography     011.3 dc-20                                         [MARC]

No Comments