Monthly Archives: September 2011

DNS performance slowing you down?

Many of us access the same website dozens or hundreds of times a day, making the combined total time that we wait for page requests a huge bottleneck to our productivity. One of the lesser considered reasons for lengthy page … more …

ColdFusion 9 Tags and Eclipse / CFEclipse

If you've recently switched to a version of ColdFusion which isn't yet supported by your IDE, in this case, Eclipse with the CFEclipse plugin, you may be disappointed to find that your code window is riddled with little error icons. … more …

cannot concatenate ‘str’ and ‘NoneType’ objects

The cause of this error may run deep in your code, but if you simply wish to have and error free interface on the front end, you can cast any NoneType object to an empty string: str(myVar) 'this demonstrates casting … more …

Test your RegEx’s using the SiteKickr Regular Expression tester

Regular Expression testing probably requires more trial and error than just about any other programming language. Testing within your code can be tedious, so we decided to build this tool to assist in your RegEx debugging. While it's true that … more …

IE Gradient filter colors are way off

If you're using gradients within your CSS, you may have encountered an issue with colors in IE. The problem is that the filter parameters don't allow the RGB shorthand color notation like standard CSS does. For, example, if you're using: … more …

Allowing tab within textarea

There are solutions out there on the subject. We borrowed the following jQuery code from another post: jQuery.fn.extend({ insertAtCaret: function(textToInsert){   return this.each(function(i) {     if (document.selection) {       this.focus();       sel = document.selection.createRange();       sel.text = textToInsert;       this.focus(); … more …

Generating safe, valid id attributes

Depending on your circumstances, it may not be straightforward to generate unique or valid id's for your HTML elements. If you are looping over database records, you'd normally involve your records primary key in the ID attribute. But, if your … more …

Pure JavaScript / CSS photo cropping tool

If you don't have image manipulation capabilities available on your server, fortunately, you can still implement a basic photo cropping tool using pure CSS & JavaScript. Key CSS Ingredients: Negative margins Overflow property Key JavaScript Ingredients: jQuery jQuery UI   … more …

ColdFusion Data truncated for column at row 1

You may receive this error when attempting to insert an empty string into a numeric database column. This logic should provide a good example on how to handle this situation: <cfif isDefined("arguments.version")>     <cfif trim(arguments.version) neq "">         version … more …

MVC security issue

Using the model-view-controller approach is a great way to organize your code and keep logic separate from presentation, but depending on the framework you use, being custom or otherwise, you might be exposed to security issue. If your web server … more …