Hi,
I haven’t posted in a while as my site got blocked by IT at work for some reason!
I’ve had a lot of stuff recently that I could have posted it but unfortunately I’ve forgotten most of it so don’t have a massive amount to write about.
Firstly I had a problem with my wordpress account that when someone attempted to subscribe to the blog I would get an error something like
“Cannot modify header information - headers already sent”
After having a look around the place I saw that this is resolved but having extra whitespace before or after tags. I had some JS in one of my php that was causing the RSS subscription to crap out. Fixed it so should be working now.
Got my MSc result in the last couple of days, got 95% in my thesis which can be got here. That means I got a ‘Distinction’ in my MSc which I’m very happy about. You can read about my progress through the GOAP archives in the blog.
I got an error when using ColdFusion’s XMLParse to go through two XML documents and copy one part of the XML to another document. I was getting the error ‘WRONG_DOCUMENT_ERR’ when attempting to do an ArrayAppend to an existing XML node. So I had to go and create each node individually using recursion. Here’s a snippet of the code, I had to create each node individually and set the attributes, Cdata etc.
WARNING: I’ve modified this from my original code and not tested fully so mightn’t work but is v close to working only needs a few small changes to work I’d imagine.
I was having a problem with Asterisk on a VM Ubuntu server during the week. The error message I was getting was ‘app_meetme.c: Unable to open pseudo device’. The reason for this error is that MeetMe requires a timing device to work, there is Zaptel hardware for Asterisk that you can buy and use. On the Asterisk CLI type zap show status, if you don’t have anything there then thats you’re problem. A module called Ztdummy can emulate the Zaptel hardware and allow the Meetme app to work. To do this I got the Zaptel source from SVN svn co http://svn.digium.com/svn/zaptel/branches/1.4 . , did a ./configure, make and make install and make config. After that I ran this script to finish the install.
genzaptelconf -sdvM /etc/init.d/zaptel start
Finally for now I had another issue when deleting items from a ColdFusion array. I was looping through one by one and on a certain condition delete an element and move on. I ended up getting the error:
Cannot insert/delete at position 9.
The array passed has 8 indexes. Valid positions are from 1 to 8.
Coldfusion reorders the indexes after deleting and isn’t too clever about it so for some reason seems to think that there is 9 elements in the array when 1 has been deleted. The solution is very simple(although I think the language should be a little clever to handle this properly):