Touch Screen All-In-One Desktop Computers – What’s Available?
Tuesday, 23 February 2010 – | 2 Comments

In the pursuit of refreshing my technology I am looking for a new desktop computer, something space saving – hopefully even touch screen and all-in-one. Perhaps it’s a minimalism phase I might be going through …

Read the full story »
Downloads

Things to download free, from posters and shortcut guides to white-papers and checklists

How To & Tutorials

These handy problem solving tips and advice should save you some time

Industry News

News and commentary from news in the technology industry

Safety & Security

Be safe and secure both online and offline, from securing your computer to safe online surfing.

Software

Explore recommended software applications from around the Internet

Home » Archive by Tags

Articles tagged with: Code

Javascript: CSS rollover List routine
Wednesday, 18 June 2008 – | No Comment

To quickly loop through a list node and set a rollover CSS value, use the following

// Set all LI of a node to rollover CSS
// Use two CSS class, e.g. item and itemover

function updateList(String nodename)
{

PHP: Add Slashes to text
Tuesday, 3 June 2008 – | No Comment

It is sometimes necessary to maintain the special characters in text, such as the apostrophe, speech marks, null character and backslash as these can be mis-interpreted by systems such as SQL if not modified appropriately. …

Javascript: Set Focus of HTML Textbox
Friday, 23 May 2008 – | One Comment

To set the focus of a HTML text box include this short piece of code in the <head> section
<script>function setfoc() { document.f1.KeyWords.focus(); }
In the example above f1 is the name of the form and KeyWords …

PHP: Checking a DNS entry
Thursday, 22 May 2008 – | One Comment

It is often useful to check that a given domain name or host is valid, this can be achieved using the checkdnserr() command, as in the following example:
$hostname = “www.domain.com.”;
$dnstype = “MX”;
$bValid = checkdnserr($hostname,$dnstype);
If using …

Java: Mix up items in array
Tuesday, 20 May 2008 – | 2 Comments

Quick routine to mix up the items in an array
public Object[] MixUpArray(Object inarray[])
{
  // get the size of the array
  int iSize = inarray.length;
  // create an array the same size as the input array
  …

J2ME: Bounds checking of a List
Thursday, 8 May 2008 – | No Comment

This short routine shows how to ensure a selected item in a list is within bounds. If the list is empty the getSelectedIndex will return -1. The index starts at zero whilst size() will start …

PHP: Avoiding mySQL Injections
Wednesday, 30 April 2008 – | One Comment

Sample code to avoid SQL injections using mysql_real_escape_string (http://uk.php.net/mysql_real_escape_string) which converts special characters to escape sequences to ensure they are suitable for submission to SQL
$mySQL = “UPDATE address SET postcode=’.mysql_real_escape_string($postcode).’ WHERE id=’.mysql_real_escape_string ($account).’”;
$myResult = mysql_query($mySQL);

PHP: Require() and Include()
Wednesday, 23 April 2008 – | No Comment

Essentially, require() and include() act in much the same way in that they both include the contents of another file – the only difference being that if include() fails then processing will continue (but produce a …