PHP is a very vast language. It’s hard to say that you’ve mastered it. For example, do you know how to crop an image using GD and process web requests with XML-RPC off the top of your head? You may know one of them, but probably not both. That being said, there are a lot of resources out there that help you learn the basics of PHP – Processing forms, security, database interactions and array manipulation. I’ve compiled a list of 5 websites that I think will help you learn the ‘basics’ of PHP as well as taking them a step further.
KillerPHP.com’s Video Tutorials
I used these when I was initially learning PHP and are still a great resource today. These screencasts are typically 10 minutes long and cover the absolute basics – getting your development enviroment up and running to variables and includes.
- Local server setup
- Variables
- Arrays
- Includes
- Loops
- Form Processing
- Functions
- Sessions
- OOP
Pixel2Life’s Tutorial Index
Pixel2Life is a tutorial index where bloggers can submit their tutorials and articles. The result of hundreds of people doing this is a very large library…
In an attempt to sharpen up my jQuery, i purchased the book jQuery in Action
by Bear Bibeault and Yehuda Katz. Reading through the book, i could see that the first few chapters were obviously aimed at beginners. They covered selectors (If you know CSS already your fine) and events. You can easily get this information off the jQuery doc site, nothing spectacular there. Chapter 5 covers the effects, slides and fades but goes into depth abit more on the animate function. Something (in my opinion) which is under documented on the jQuery doc site. It shows off a few different examples.
Chapter 7 is another excellent chapter – showing you how to write your own plugins. It goes into alot of detail, from extending the wrapper to proper naming conventions to looping through each element effected. This chapter is a must read for anyone considering writing their own jQuery plugins. Again, the authors have written 3 example plugins providing alot of reference material.
Fedora 9 includes the new package manager called Package Kit. It aims to be the package manager for your system, as it can install apts, slackware packages,rpms and many other file formats. I booted into it and noticed 2 things.
- The first, its incredibly slow – It took along time to download the updates i needed (Slower than downloading a normal file that size from the server) and it took along time to generate the meta data of plugins list.
- The second is that (in my opnion) the User Interface is horrible. Its hard to navigate to select the packages you want, When you select a package it takes a few more clicks to even see the dependencies it requires, whereas adept and synaptic show you right away.
I tried it, i can honestly say i gave it a good go, but its not for me. Since im new to the rpm system, i searched around for alternatives, i found one called Yum Extender (Yumex). Its easy to install, just yum install yumex or download it from the websit.
A stumbled across an amazing online app, meant to be like a CAD im guessing but then i realised the different things it could be used for. Project Draw gives you a grid to start off with, you can then place various shapes onto the grid and resize them. Further more you can add colours, text, gradients, alignments and borders which makes it a really good tool to design layouts.
With the arrival of jQuery UI 1.5 i was browsing its’ wiki pages and learning all of the API. I came across the jQuery UI wiki page, its essentially more jQuery effects except these ones are alot more dynamic! You can explode, puff, slide, highlight and alot more. I was a amazed that i hadn’t seen this page or been linked to it before, its something the jQuery UI team should be proud of.
Check it out
For those of you with no jQuery background what-so-ever, jQuery UI is a series of user interface (UI) enhancements made in Javascript. These range from tabs (which also support ajax loading), to dialog boxes which you can drag, drop and resize. All cross browser! Although its currently still under development the finish line is in sight for the 1.5 release. I encourage everyone to check it out, it can add some really professional effects to your website for minimal lines of code.
“Whats a good jQuery menu?” is a question I hear quite frequently on blogs and forums. As jQuery is such a simple language to learn, most people code their own for their own sites. I’ve compiled a list of 3 menu plugins, and and 5 ‘custom’ solutions that people have setup.
http://p.sohei.org/jquery-plugins/menu/
Latest release: Jan 07

This plugin was constructed to emulate a desk top apps menu. They don’t close until clicked off and are activated by clicking them (rather than hovering). It requires the jQuery dimensions plugin to perform ‘smart calculations’.
Example Usage: http://p.sohei.org/stuff/jquery/menu/demo/demo.html
Download: http://p.sohei.org/jquery-plugins/menu/
http://jdsharp.us/jQuery/plugins/jdMenu/
Latest release: April 08
Although the jdMenu plugin is only 3kb itself, it depends on or looks a hell of a lot better with the plugins dimension, positionBy and bgiframe. jdMenu boasts keyboard access and can be easily made into a verticle menu by changing an option.
Example Usage & Download: http://jdsharp.us/jQuery/plugins/jdMenu/
http://users.tpg.com.au/j_birch/plugins/superfish/
Latest release: Sometime in 08
Superfish takes a CSS based dropdown then enhances it with jQuery so if the user has Javascript disabled, it degrades perfectly well. Since the menu is mainly CSS based, I’d imagine it’s a fair bit faster…
I have come across a very interesting problem while developing a flex application where I have a
button control and I want to call two different functions on click of the button . The interesting part
is that I want to call two different functions on different events of the same button control, one at
single click and other at double click .
Now what to do in this case as it will always execute the function defined at single click .
So what I am gonna do is to use a Timer using setInterval( ) method and use it to solve this problem.
The code goes here -
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import flash.utils.clearInterval;
private var timeGap:Number = new Number();
private function doubleClick(event:MouseEvent):void {
clearInterval(timeGap);
//put your code here to be executed on double click
Alert.show("double click");
}
private function singleClick(event:MouseEvent):void {
clearInterval(timeGap);
timeGap = setInterval(otherClick, 250);
}
private function otherClick():void {
//put your code here to be executed on single click
Alert.show("first click");
clearInterval(timeGap);
}
]]>
…
Not every validated webpage is accessible or ideal but every invalid web page is bad. So always try to validate. First by validating from validators and then by common sense, because technically a page with thousands of nested DIVs are valid. button stimulated out of div is valid. But question is… Is it really?
What is singleton pattern?
The singleton pattern is a design pattern that is used to restrict instantiation of a class to one object. If you create the class as a singleton then no way to create more than one instance. But, you can get that single instance in any number of classes. So all the classes will share the same properties and behaviours of that singleton object.
How to implement the singleton pattern?
Implementation of a singleton pattern must satisfy the single instance and global access principles. It requires a mechanism to access the singleton class member without creating a class object and a mechanism to persist the value of class members among class objects. The singleton pattern is implemented by creating a class with a method that creates a new instance of the class if one does not exist. If an instance already exists, it simply returns a reference to that object. To make sure that the object cannot be instantiated any other way, the constructor is made protected (not private, because reuse and unit test could need to access the constructor). Note the distinction between a simple static instance of a class and a singleton: although a…