Browsing articles in "Developement"
Dec
15
2011

Bulk HTML Validation

I’ve recently been working on a WordPress project in which I made the mistake of starting with a commercial theme that, while beautiful and feature-rich, was a complete mess in terms of code quality. HTML validation is always a requirement on my projects, but a poorly-written WordPress theme combined with WordPress’ own tendency to butcher code by inserting poorly nested <p>’s (more on that later) can make validation a real chore. The W3C’s Validator is [...]

Dec
8
2011

Subnet Calculator in 9 Lines of PHP

I’ve been spending a lot of time studying for my Microsoft 70-642 exam, an important part of which is subnetting.As an intellectual exercise I wrote a subnet calculator. Enjoy: 1 2 3 4 5 6 7 8 9 function subnet($hosts) { $bits = decbin($hosts) + 2; // Add 2 for Network ID and Broadcast $hostBits = strlen($bits); // find how many bits it takes to represent it $cidr = 32 – $hostBits; // Find slash-notation [...]

Feb
14
2011

JavaScript Errors in Internet Explorer? It’s Probably a Comma’s Fault

comma

If you’re testing JavaScript code that seems to work in Firefox, Chrome, or Safari but not in Internet Explorer, a stray comma is probably to blame. This article explains why the problem occurs and offers some tips on how to avoid it.

Feb
7
2011

Add an Image to an Ext.TabPanel’s Header

A Logo Image Applied to an Ext.TabPanel's Header.

A short tutorial explaining a simple way to add logos and other background images to Panel headers in the ExtJS JavaScript library.

Jan
21
2011

Use a Frame-Busting Redirect To Authorize Facebook Applications

While developing a new Facebook application I stumbled upon a very common app development bug: redirecting users to authorize your app from within an Iframe-based Facebook application. This post explains how to easily solve the problem

Pages:123»