Dallas Clark

Blog about IT, Multimedia, Innovations, Internet and anything fun!

About

Dallas Clark
Software Developer
BRISBANE QLD
AUSTRALIA

Adobe has gone one step further with Flash already in their beta release of version 10. There's a lot of integrations that have been inserted which make Flash a very impressive platform.

The is a huge battle between Microsoft (Silverlight), Adobe (AIR, Flex, and Flash), JavaScript, and Ruby on Rails for developers to choose as their platform. Adobe has definitely positioned itself back up on the podium with it's newest features.

Flash now has native support for 3D which enables developers to make 3D effects on 2D objects. The screenshot below shows 2D mobile phone images that have been placed in a circle, tilted and told to rotate.

There is also the features of the Pixel Bender which enables you to perform image processing effects and filters. Check out some of the photos in the Pixel Bender Gallery to see what Pixel Bender is capable of. It's like having Photoshop image effects right in Photoshop.

I encourage you to check out Adobe Labs about Flash 10 for further details on the next version of Flash 10.

Guess of the week!

May 13th, 2008

True but I doubt we will ever run out of things to tweet about.
Tweets will out run Blog Posts

Particls Easter Egg

May 10th, 2008

If you still want to use Particls V1 which is un-supported by the way, click on the image below.

Track your feeds with Particls

This will install Particls V1 onto your computer with my custom configurations, which you can easily modify after you install.

Learn more about Particls here.

PHP MySQL Handler

May 10th, 2008

User Level: Beginner to Intermediate

 
< ?php
  class MySQLHandler {
     var $mysql_host;
     var $mysql_username;
     var $mysql_password;
     var $mysql_marking_database;
     var $link;
     var $select_db;
 
     function MySQLHandler($database_name) {
        $this->mysql_host = "INSERT_HOST_HERE";
        $this->mysql_username = "INSERT_USERNAME_HERE";
        $this->mysql_password = "INSERT_PASSWORD_HERE";
        $this->mysql_marking_database = $database_name;
     }
 
     function open_mysql_link() {
        $this->link = mysql_connect($this->mysql_host,
           $this->mysql_username, $this->mysql_password);
        $this->select_db = mysql_select_db(
           $this->mysql_marking_database, $this->link);
        return $this->link;
     }
 
     function close_mysql_link() {
        mysql_close($this->link);
     }
  }
?>
 

The above PHP script (mysql_handler.php) can be used to connect to your MySQL database with PHP.

 
< ?php
   include('classes/mysql_handler.php');
   $mysql = new MySQLHandler("database_name");
?>
 

The include line will allow you to make references to the class, the 2nd line will allow you to initiate the class with a database name.

 
   $mysql_link = $mysql->open_mysql_link();
 

Then when you need a link for your MySQL functions, all you need to do is specify the above script and you're connected.

You may want to further secure this file by placing your host, username, and password details elsewhere.

User Level: Intermediate

This article assumes that you already have the following installed and working:-
* Linux
* Subversion (SVN)
* A SVN Repository
* GCC (To compile your C scripts)
* Vi (or another text editor)

You will also need shell access to your server to perform the following functions, either you are directly on the machine or you are using a utility like Putty to access your server.

The idea of this post is to allow you to automatically update your files in a public html directory after you commit to your SVN repository, you may want to create a subdomain like preview.domain-name.com or sandbox.domain-name.com. You may deploy a particular folder from your svn repository or the complete repository.

 
   $ svn checkout /full/path/to/your/svn/db
      /full/path/to/your/public/html/directory
 

To begin this process, login to your server and checkout the SVN repository (svn checkout) to your public html directory, some servers the public html directory will be "/var/www/html", "/var/www/public_html" or "/var/www/vhosts/domain-name.com/httpdocs". There are many different configurations so check where your public html directory is, you may also create a directory under your public html directory to check out the SVN directory to. You will need to remember the directory to which you have checked out your SVN database to for later. This article does assume you already have a SVN database set-up and working.

 
   $ cd /full/svn/path/hooks
 

Change directory (cd) to your SVN database hooks sub-folder.

 
   $ cp post-commit.tmpl post-commit
 

Copy (cp) the template file "post-commit.tmpl" to "post-commit" (without the quotation marks).

 
   $ chmod +x post-commit
 

Change file system mode (chmod) of the "post-commit" file to execute (-x).

 
   $ vi svnupdate.c
 

We need to write a little C program that will do the work. The command above will open up the vi editor to create the "svnupdate.c" file, you may use any text editor of your choice.

 
   #include <stddef .h>
   #include <stdlib .h>
   #include <unistd .h>
 
   int main(void)
   {
      system("svn update
         /full/path/to/your/public/html/svn/directory");
   }
</unistd></stdlib></stddef>

The above script will execute the command to update the SVN repository in the public html directory we created earlier.

 
   $ gcc -o svnupdate svnupdate.c
 

We need to compile our little C program with GCC. The above command will compile our "svnupdate.c" file and output our little program "svnupdate".

 
   $ env - ./svnupdate
 

Lets test our little program, your SVN repository should update with the latest changes. If you receive any errors here then you either a) haven't specified the correct directory in the "svnupdate.c" script or b) you didn't checkout the SVN database properly. If you receive any errors, go back and fix them, there is no use continuing on from here.

 
   $ chown root:root svnupdate
 

Change the owner (chown) of our compiled C program to root.

 
   $ chmod +s svnupdate
 

Change the mode (chmod) of the "svnupdate" file.

 
   $ vi post-commit
 

Now we need to edit our "post-commit" file to execute our "svnupdate" file.

 
   /full/file/path/to/the/file/svnupdate
 

Add the above line to the "post-commit" file and save the file.

Now when you commit files from your SVN directory, the server will update the SVN repository in your public html folder. To protect your files, you may want to protect the public html directory with a login using a .htaccess file.

I'm happy for any suggestions or any corrections, so please don't forget to leave a comment below.

This is one of the most common mistakes developers (of any language) make so I thought I should let you know why you shouldn't use this method.

The Scenario:
You have a page on your site and you don't want people to simply link to this page unless they have clicked on a link from your own site. Lets say your page is called 'page2.php' and it's located at 'www.your-site.com/page2.php.'

When the user enters the 'page2.php' page you can easily determine which page they came from, in PHP you can use the $_SERVER['HTTP_REFERER'] function to determine the referring page. With this function you would check that it contains www.your-site.com in the value.

For what ever reason why you might want to check the referring address to your page, checking the referral address against your own domain name isn't bullet-proof.

Why? The referral address is set by the user's agent (their Internet browser), some browsers have the option for you to edit this value and some browsers don't even set this at all.

There are many solutions to this scenario, but I would recommend using sessions where you can set the a session variable on 'page1.php' which contains the link to 'page2.php.' When the user enters the 'page2.php' page, you can then check to see if that variable has been set, if it hasn't then the user must have come from a different location.

It's a little bit more of a setup, but it's secure.

For those who are unaware, Telstra owns the majority of the communication networks in Australia and have also been granted exclusive privileges for various networks like the the next Fibre-Optic network. The issues around Telstra having exclusive rights is their lacking of services, monopoly (both wholesale and retail), and their pricing.

They are so expensive that it costs more to send data between Melbourne (Victoria, Australia) to Hobart (Tasmania, Australia) then what it costs to send data from Melbourne to America. In fact it is 6 times more expensive!

What is worst is Internet Service Providers are closing down their services in Tasmania due to the high costs. Internode have announced they are discontinuing their services in Tasmania for this reason.

LINKS
* Fast Tassie plans on hold pending better backhaul (Internode, 2 May 2008)
* Tassie broadband stranded (Australian IT, 8 Apr 2008)
* Opel demise good for Tassie (Australian IT, 3 Apr 2008)
* Coonan returns fire on Basslink (Australian IT, 26 Jun 2007)
* Basslink cable (Wikipedia)

Come chat to me!

April 23rd, 2008

Meebo Logo

I've just installed Meebo and from my first impression is really excellent, not only can you bundle up a fair few chat applications into one, there are other chat methods including website chat applications.

Meebo Supported Chat Applications
Supported Chat Applications on Meebo, if only they supported Skype as well.

I've inserted the chat application into the sidebar of this blog, so scroll down a bit and you'll find the chat application. Don't hesitate to say hi!

Meebo on the phone
Meebo on mobile phones

Helping to find a cure !

April 20th, 2008

Last night was the MSQuerade Ball held at the City Hall in Brisbane, which I posted about earlier this year for the MS Society. As you would have read the disease MS (Multiple Sclerosis) affects both Amanda and I, so we gathered 7 of our friends together to have a bit of fun and of course to raise some funds to help find a cure for MS.

RJ, Thuan, and Myself
The Three Musketeers: From the Left RJ, Thuan, and Myself


From the left: My fiance Amanda, Jacqui, and Haidy


My gorgeous fiance Amanda and I

Go figure compete.com ?

April 18th, 2008

I just reviewed my site on compete.com and got a bit of a shock when I saw the following graph:

Now I know that compete.com and Alexa have their difficulties getting real statistics and the ability to produce a proper report, but compete.com have their pride and joy of saying they are the only online data service with real science.


compete.com's advertisement found on their homepage

Now I know that I didn't receive 1600 visitors in February otherwise my Google Analytics account would have shown this result, as you can clearly see below: it didn't.


dallasjclark.com February 2008 Google Analytics Report

February however is when the traffic to my site increased dramatically so they have the increase correct, just not the total correct.

6 Months Until The Wedding

April 18th, 2008

It seemed like it was only yesterday when I proposed to my wife-to-be Amanda Dawe on the 1st of July, 2007 on Bribie Island's beach. Then there was the 1 year mark until our wedding and now 6 months. Time surely does fly.

My Fiance Amanda
My Gorgeous Future Wife To Be Amanda Dawe

Visit our website for the wedding which is still under development, now with the wedding only just around the corner I better get to it.

Secure Passwords

April 18th, 2008

If you want to make your accounts more secure, try following these steps:-
* Use a random password: go to a site like PC Tools Software - Password Generator and make yourself a random password for you to use.
* Use different passwords for each account: this can be hard to remember but eventually you'll have them all under control. Use a password tracking application on your computer or mobile phone and make sure the master password you use to get into all your passwords is definitely random.
* The most obvious one - don't tell anyone your password: this implies to "in person" as well as leaving it written down on a note or on your computer or website. You never know who may come across your password.

Disclaimer: This article was requested by TAFE - Qld Education (Australia).

New Wordpress > New Design

April 17th, 2008

I've recently updated Wordpress (the software that drives this blog that you're looking at) and I must admit I'm not too fond of the new administration site. However besides the 'look' and 'feel' of the administration site the rest of the features are pretty cool, and to adapt some of these new features I'll have to redesign the blog (the part you see).

So over the next couple of weeks I'm going to be working closely with Freehill Media to develop a new design for the blog that will also be able to use the new Wordpress features. If anyone has any suggestions to what they want to see on my blog, or what they want created for their own blog, drop me a comment below.

Twitter: What are you doing?

April 17th, 2008

Twitter Logo

I haven't really given a plug to Twitter before and I believe this service is a one of a kind.

What is twitter?
Twitter is a free social networking and micro-blogging service that allows users to send "updates" (or "tweets"; text-based posts, up to 140 characters long) to the Twitter website, via short message service (e.g. on a cell phone), instant messaging, or a third-party application such as Twitterrific or Facebook.

Updates are displayed on the user's profile page and instantly delivered to other users who have signed up to receive them. The sender can restrict delivery to those in his or her circle of friends (delivery to everyone is the default). Users can receive updates via the Twitter website, instant messaging, SMS, RSS, email or through an application.

How I benefit?
Only just yesterday I solved a query of mine by posting a message out to all my followers about whether they recognize a font a client needs that they have used before in their branding. About an hour later I had my query answered.

This has happened many times before where I've had the most complex question answered by someone who is well experienced in the area. But before you can get people to answer these questions you must have a connection with them (ie: they have to follow you).

Your messages 'can' appear on the public timeline but the chances of someone picking up on your message is very unlikely. So jump onto Twitter and follow people you're interested in, reply to their messages and before you know it you'll have some connections.

Message to twitter: "We'd like to thank you in 140 characters or less. And we just did!"

Don't forget to follow me!

Links:-
* Twitter
* Twitter Blog
* My Twitter Account

Data Portability Logo
The above logo concept is my favourite out of the bunch.

You have till Friday to vote for the new Data Portability logo. Go vote...