Dependency Injection in PHP 

@7 months ago
Christmas tree is up for this year!

Christmas tree is up for this year!

@7 months ago

Homemade Gingerbread Latte 

@7 months ago
#homemade #latte #coffee 

New version of web2project

Web2project v1.2 has been released! It includes 10 new features, over 30 bug fixes, and over 10 miscellaneous improvements. Check out the release notes here, or get to downloading here.

@7 months ago

Regex for restricting length of field in javascript with multiple lines

So recently I have been doing some work in Wordpress and more specifically the cformsII plugin. This is a great plugin for generating quick forms, however it does it’s validation in javascript.

One of the requirements was for a multi-line text input that was no longer then 500 characters. This is easily done with the plugin, but the regex generated looks like this.

^.{0,500}

The problem with this is that it will match any character except the newline up to 500. Obviously for a multi-line text input you want to allow newlines. The javascript character for matching any whitespace character including newlines is \s and matching any character other then whitespace is \S. So if you change the javascript for validation to the following it will match any character, including newlines up to 500 characters.

^[\s\S]{0,500}

@7 months ago
#javascript #regex #wordpress #cformsII 

Red Dead Redemption  

This looks like it’s going to be awesome!

@7 months ago

Saw this tonight, if you get the chance definitely do!

@7 months ago
#movies 

UFO over Norway? 

UFO Over Norway: Residents Baffled By Mysterious Swirling Blue Light In The Sky (VIDEO)

@7 months ago

Google LatLong: Changing your perspective 

@7 months ago
#google #maps 
Congrats to Shawn and Ashley on their ENGAGEMENT!

Congrats to Shawn and Ashley on their ENGAGEMENT!

@7 months ago
#family #engagement