Posted by : Chris London in (Programming, Tutorial)

Testing Javascript On ANY Page

Did you know you can run Javascript on any page? It’s easy. All you do is type javascript: in the navigation bar of your browser and then your Javascript code and it will run it on the page!

Read the rest of this entry »

Posted by : Chris London in (Programming, Tutorial)

How to Use GoTo in PHP, C, C++, Obj-C, Java, Perl, Python, Flash, Actionscript, Java or Javascript

Tagged Under : , , ,

Here is the secret to using GoTo in ANY programming language:

How to use GoTo

Yes, that’s right. You will be eaten by a raptor! So don’t use it!

Posted by : Chris London in (Programming, Tutorial)

Anonymous Functions and Closure in PHP

Tagged Under : , , ,

It’s about time that PHP joined the band wagon of anonymous functions. Anonymous functions, also known as closures, are functions with no specified name. These functions are stored in variables and can be passed around. Anonymous functions have been in other programming languages like Javascript, so if you know Javascript then anonymous functions are nothing new.

Read the rest of this entry »

Posted by : Chris London in (Programming, Tutorial)

Ternary Operators

Tagged Under : , , ,

If you don’t know what ternary operators are then you are missing out! The day I learned about ternary operators I nearly passed out. There are so many wasted lines of code if you don’t know about them. This is what a standard if ... else ... statement looks like using C, Obj-C, C++, C#, Java, or JavaScript:

Read the rest of this entry »

Posted by : Chris London in (Programming, Tutorial)

Colon Syntax in PHP

Tagged Under : , ,

Colon syntax is another way to style your PHP code. Instead of using curly braces you use colons. Below I have included an example of a couple different curly brace styles and also each statement using the colon syntax. I don’t know of any performance benefits or loss to using this syntax over any other. Please comment here if you have any more information about its affects on performance.

Read the rest of this entry »