Dallas Clark

Blog about IT, Multimedia, Innovations, and The Internet

About

Dallas Clark
Software Developer
BRISBANE QLD
AUSTRALIA

auDA Logo

auDA terminated Bottle Domains accreditation to sell .AU domains and Bottle Domains took legal proceedings in the Supreme Court today and won, which could see its reinstatement as early as tomorrow. auDA could have avoided the legal action taken by Bottle Domains, but they are now left with huge legal costs and possibility of paying damages.

Well done Bottle and Nick. This was always going to happen. auDA should have ensured that their actions were proportionate and minimised negative impacts to domain name holders. The chaos and confusion continues. I've said it before, how on earth is this situation a better outcome than auDA maintaining Bottle's accreditation whilst the matter is resolved between them? Bottle may or may not have breached their Accreditation Agreement, but by taking the action they did, auDA have precipitated an expensive legal battle with the domain name owners they sought to protect in the middle. Larry Bloch - CEO NetRegistry

After terminating Bottle Domain's accreditation, auDA issued advice to Bottle Domain's customers to shift to another registrar which is going to cost auDA quite a lot in damages, and any .au domain holders. auDA will most likely have to increase prices to cope with the expenses.

Resources
* BREAKING NEWS: Bottle Domains wins injunction against auDA
* Bottle Domains given the boot by auDA

On the 10th of March 2009, Hitwise released a report showing an year-over-year increase of 8% to Google in the U.S. based search queries. The report shows Google Search Market totals 72.11 % of all U.S. searches.

Domain Feb-08 Jan-09 Feb-09 Year-Over-Year Percentage Change
www.google.com 66.47% 72.09% 72.11% 8%
search.yahoo.com 20.60% 17.81% 17.04% -17%
search.msn.com 6.95% 5.44% 5.56% -20%
www.ask.com 4.16% 3.31% 3.74% -10%

Read the rest of this entry »

A small comic of the Bradz meeting their neighbour.

the_bradz_wifi_small

VOTE EARTH

March 25th, 2009

Switch off your lights for Earth Hour

March 28th 8:30PM - 9:30PM

http://earthhour.org/voteearth

Before I begin, I was able to experience what it is like to be a teacher in the year 2007 and from my own experience, it was hard work. The hours are long, especially during marking periods, and there are a lot of 'assumed' on the spot expectations - although I did enjoy teaching, watching people learn from the knowledge I was able to pass on.

Unfortunately, teachers have guidelines they 'must' follow and the assignments, tutorials, and exams must match these guidelines or at least be equivalent to the guideline. I'm sure other states in Australia and even other countries will have the same opinion about the guidelines - they are never up to date, and they are based on topics which really don't matter in the real world. To make it simple, it's like W3C to the Web Industry; they are never up to date and they focus on some of the least important things.

I really would have loved to teach the students some really cool things however I knew that if I distract them or taught them too much, then their main assessments would either a) never get completed or b) lack any enthusiasm. So to my student's disadvantage, I taught them what the guidelines told me to teach them.

For some teachers, their lacking in knowledge of the real world is a big issue. I understand quite well why a lot of them are missing any real world knowledge quite easily: do a 12 hour day of marking, conversing with students, organising assignments, following up on missed calls, helping students and more and then try put in some time to learn something for yourself. It isn’t going to happen.

I do believe teachers need time to educate themselves through personal projects and social networking with other teachers in the same field. Exactly how universities and colleges designate a day to professors to work on their personal projects, this would benefit teachers at TAFE and schools if they could have the same privileges.

Somewhat related article
A clear example of lacking of real world knowledge is shown in this post about a teacher whom confiscated a student's Linux CDs, thinking it was piracy. And that article gets better.

AJAX Loading Animations

March 21st, 2009

If you're looking for some AJAX loading animations then use this AJAX Loading GIF Generator to create your own style. It has different animations to choose from, and color settings (foreground and background) to pick.

So you graphically challenged Web 2.0 geeks can have some cool personalised loading animations whilst you're loading content.

Some examples:-

Loading Animation

Loading Animation

Loading Animation

Twouble with Twitters

March 19th, 2009

A young man struggles against the pressure to Twitter his life away.

This is a frequent question for most IIS users on how to get permalinks to work in Wordpress, it's fairly simple really once you know how of course. So the problems are, you're using IIS so using mod_rewrite won't work, you're on a shared server so installing a mod_rewrite alternative for IIS is not available either. You can have URLs with a index.php in them (for example http://www.yourdomain.com/index.php/2009/03/17/getting-permalinks-working-in-wordpress-on-iis) but they're pretty ugly looking and doesn't fit into the URL standards (in other words, it's just nasty).

Wordpress Codex has a very useful page about working with permalinks, there's one solution that uses 404 error pages, however when you look at what it does it's very slow and again very nasty. The 404 error solution makes the server try to find the page, it doesn't exist so the server directs the user to the 404 error page, the 404 error page then does it's own working out to figure out where the user should be going, and then it would make it's own HTTP to the correct URL.

This example would work great if only it didn't make a HTTP, so what can we do with this example to make it more efficient.

<?php
   $qs = $_SERVER['QUERY_STRING'];
   $pos = strrpos($qs, '://');
   $pos = strpos($qs, '/', $pos + 4);
   $_SERVER['REQUEST_URI'] = substr($qs, $pos);
   $_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
   include('index.php');
?>

* Put the above 404 error script in the base of your Wordpress directory.

* Set your site's 404 Error Page to the file above

* Setup your permalinks in Wordpress -> Options -> Permalinks

Because it's including the index.php file into the script, it's utilising the functionality that is already present in Wordpress.

Resources
* Pretty Wordpress Permalinks on IIS
* Wordpress Codex Permalinks
* 404 Error Solution

@ryancarson from Think Vitamin has created this list of the Top 40 Web Developers to Follow on Twitter. Very useful list especially if you're a Web Developer new to Twitter, some very influential people on that list that I would highly recommend.

Here’s a list of the top web developers on Twitter (in no particular order). I’ll also be publishing lists for web designers, entrepreneurs and ‘generally interesting’ people. Ryan Carson Think Vitamin Mar 2, 2009

Don't forget to follow me as well (@DallasClark).

That's because "09" is an invalid number, in octal.

The parseInt() funciton acutally has 2 arguments that most people are not aware of, first is the string to parse and then a radix (which is optional). The radix value allows you to convert a binary (base 2), hexadecimal (base 16) or other base string to a decimal integer.

Example: parseInt("FF", 16); returns 255

The problem is that if you leave the radix argument off the function doesn't necessarily assume you want a decimal (base 10) conversion. Instead it checks the input string (the first argument) and if it starts with "0x" it assumes it's a hexadecimal value. If it starts with "0" - not followed by an "x" - it takes it as an octal value. This follows the JavaScript convention for numeric constants.

If you code

var x = 0x18;
alert(x);

it will display 24 which is the decimal equivalent of the hex number "18". Likewise,

var x = 014;
alert(x);

displays 12 which is the decimal value of the octal number "14".

Resource: FAQTs

Hexadecimal uses the numbers 0 to 9 and the letters A to F, 16 in all. You would normally see hexadecimal values used for colors (Orange: #FF9C00, White: #FFFFFF, or Red: #FF0000). Octal is base 8, so only the numbers 0-7 are valid. Hence, "09" is not a valid octal number and the function returns 0. Just as it would for "abc" in decimal ... it's not a valid number.

To avoid this, get into the habit of always adding the second argument, in this case ...

parseInt("09", 10);

returns 9 (decimal), as desired.

Resources
* FAQTs

Need to test your site in IE6?

December 17th, 2008

If you're a web developer (like me) and need to test a website in good old Internet Explorer 6 but you have Windows Vista or you've upgraded your Internet Explorer to version 7. Then luck is on your side and Microsoft has been so kind to supply Virtual PC for free and an image of Windows XP with IE 6 for free.

All you need to do is download Virtual PC 2004, which is also free, and then download Internet Explorer 6 Testing VPC Image.

Most developers (like myself) will be ignoring Internet Explorer 6 once Internet Explorer 8 has been announced, so we won't have to go through the tedious issues of fixing Internet Explorer 6 JavaScript bugs for much longer (unless specifically requested by a client).

Google's stock prices have recently dropped to a low figure that we haven't seen for quite some time, which is a bit of a worry when the largest technology company is feeling the pressure. Google have announced they have freezed their employee base, they're not hiring any more staff and they don't have any plans to lay off staff (at the moment).

Internally, Google are focusing on their major projects which is their search engine, and adsense amoungst a few more. The biggest change they've made is ceasing all research and development on projects that fit under the 'experimental' or 'fun' category, and those projects which haven't gained any popularity.

Projects which have stopped development include Lively which is a 3D avatars and room chatting socialising application. With the statistics below you can clearly see the little popularity this service has received.

The tech industry is definetely feeling the economic pressure with other companies announcing staff layoffs across the board. Techcrunch have recently announced layoffs have reached over 100 000 in the tech industry alone. AT&T having the largest with 12 000 staff layoffs.

Finance experts report we haven't seen the worst of this economic disaster, but I hope this isn't the case. For tech companies finding it hard to keep an active client base, look for clients that will survive the economic issues (such as supermarkets, and businesses that sell everyday goods and services).

Further readings:-
* Google's Lively Receives A Death Sentence
* Tech Layoffs Surge Past 100 000

I was on the hunt today for some ideas for data visualisation, I went through some of the usual ones such as Tag Clouds, Digg's Lab Visualisations, and more. There was one visualisation that stuck out from the rest called 'We Feel Fine.'


The site can give you a visualisation of people's feelings by sex, age, and location by using different coloured dots. You can customise the data you wish to view as well.


Once you have selected the sort of data you wish to view, you can then click on the different coloured dots to view a person's feelings. The application will then load either a quote or a picture and caption showing that person's feelings.

The application I assume is gathering everyone's feelings by Twitter updates, MySpace status updates and other social media sites that allow users to updates their status.

If you want to validate strings, text, or whatever it may be, validating with Regular Expression is an easy way to determine that the data is valid. Whether it's an application or a web-site, you can validate users' input to ensure it has met all requirements before continuing, or validate your own data.

 
^123$
 

This small example checks whether the data is simply '123', anything else will fail. We use the '^' symbol to show where the beginning of the data is, and the '$' symbol to show where the end of the data is.

 
^[0-9]$
 

The example above will test the data to ensure it is a single number between 0 to 9. '0', '1', '2', '3', and '9' are examples of data that will pass the above regular expression. 'a', '10', and ' 1' are all examples of data that will fail.

So what if we wanted 2 numbers?

 
^([0-9]|[0-9][0-9])$
 

The example above will match 0 to 9 or 00 to 99. The '|' symbol simply specifies 'or' so in affect we have [0-9] for 0 to 9 | [0-9][0-9] for 00 to 99. Because we are using the '|' symbol, we need to wrap brackets around our statement to show where the 'or' statement begins and where it ends.

Now lets work with time.

 
^(1[0-2]|(0?[1-9])):[0-5][0-9]$
 

12 hour format is pretty damn simple now that you know the basics. The first part '1[0-2]' means 1 followed by 0 to 2 (for example 10, 11, 12), 'or' '(0*[1-9])' for 1 to 9 or 01 to 09. The '*' means whatever character before it is optional, so the '0' is optional but can only occur once if it was there.

So this will cover 1 to 9, 01 to 09, and 10, 11, 12. The ':' symbol is exactly that, and the last two parts '[0-5][0-9]' means 00 to 59. '1:15', '9:59', and '12:39' will all pass, but '00:38', '13:32', and '3:83' will all fail.

I'm on a quest to make the ultimate regular expression for date and time, but there's no use giving you the whole thing without first telling you how to get there. Keep an eye on my blog for more posts to come.

Resources
* RegExp - Mozilla Developer Center
* Regular Expression - Wikipedia

Normally you would select an option with a server-side script like PHP which is a lot faster and doesn't require the client's browser to do the work. But on the rare occasion where you need to set an option with JavaScript, here's a small script on how to do it.

 
document.getElementById('select_box_id_here').value
 = 'the value of the one you want selected';
 

This will work if you have constructed the page the proper way. On the odd chance you've used JavaScript to pull in a whole string of HTML then use the method below.

 
var selectBox = document.getElementById('select_box_id_here');
for(i=0; i
<selectBox.options.length; i++) {
	if(selectBox.options[i].value == a_value) {
		selectBox.options[i].selected = true;
		i = selectBox.options.length;
	}
}
 

The above script simply loops through your select box and determines if the current option (in the loop) matches the value (a_value), if so then set the option to selected. The line "i = selectBox.options.length;" simply stops the 'for loop' from checking any further options.

The reason why you have to manually go through the select box yourself is because the DOM doesn't actually know the select box is on the page when you've just dumped a whole lot of HTML into the page with JavaScript. If it's possible to refresh the DOM then let me know, otherwise the above option is the solution to this problem.