Monthly Archives: November 2011

My HTML5 base template (skeleton file) with jQuery from Google CDN

Below is the standard HTML5 template I start most of my projects with. It includes the latest 1.x version of jQuery, jQuery UI, and the desired jQuery UI theme. It also has a conditional comment that checks to see if the current browser older than IE9 and includes HTML5Shiv to make sure new elements are rendered properly in older IE browsers.

While I don’t claim this is the best skeleton HTML5 template, I think it is a very solid foundation to start from 😉

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Untitled</title>
<meta name="keywords" content="">
<meta name="description" content="">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css">
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script>
$(function() {
    //DOM is Ready
});
</script>
</head>
<body>

</body>
</html>

PHP: Incrementing/decrementing a numeric string that has letter (alpha) prefixes

I see this question quite a bit in programming discussions and forums. I’ll be linking to this post from now on to avoid re-posting the same replies every time someone asks.

String Value: XYZ123

Desired Result: XYZ124

The majority of solutions I have read regarding this problem require splitting the string or using regular expressions to manipulate the numeric portion. The overhead for complex solutions for such a simple problem are simply overkill. The example below shows the easiest way to increment the string  and requires minimal overhead… Continue reading