Category Archives: Technology & Code

Technology, gadgetry and code are just plain awesome, you can’t really deny it. So when I come across something that excites me or makes my life easier or simply gives us a view as to a very possible future that we might be moving towards, I can’t help but share it with the rest of you here on the CodeUnit of Craig.

jQuery: How to Expand an Accordion for Printing

I did however come across a little problem that needed solving the other day, namely that when printing an accordion page, only the currently open, in other words visible, accordion segment prints, leaving the rest of the closed segments hidden on the final printed page. Continue reading

Posted in Technology & Code, Tutorials | Tagged , , , , , , | Leave a comment

Failed Flash & Missing Backups

But losing a faithful flash drive was not the worst part of this ordeal. No, the worst part was that I, a software technician of all people, had failed myself in that I didn’t keep any backups of the important data on the drive. Not a single backup whatsoever. Important personal documents, desktop application projects in mid development, databases built up over years, all gone because I was too lazy to keep up a decent backup programme. Continue reading

Posted in Technology & Code | Tagged , , , , , , | 6 Comments

Afrihost Internet Connectivity: A “Still not Quite Up” Update

International connectivity has pretty much been non-existent or moving at a completely unusable crawl since Monday, all thanks to a disruption in the all important Seacom undersea fiber cable that connects Africa to the rest of the world and acts as the cheap carrier line that allows all these small ISPs to offer the deals that they do. Continue reading

Posted in Technology & Code | Tagged , , , , , , , , , | Leave a comment

PHP: Calculate the Number of Working Days in a Month

How to calculate the number of working days in a month, in other words discount Saturdays and Sundays from a month’s total number of days. Continue reading

Posted in Technology & Code, Tutorials | Tagged , , , , , , | Leave a comment

PHP: How to Get all the Letters out of an Alphanumeric String?

Given a registration code, or something important like that, which often contains information encoded in the alphanumeric string itself, it is sometimes quite useful to be able to simply strip out the numbers from the string, leaving only the letters behind. Continue reading

Posted in Technology & Code, Tutorials | Tagged , , , , , | Leave a comment