Twitter: raymondcamden


Address: Lafayette, LA, USA

Star Wars Teaser

11-28-2014 348 views Movies

I'm assuming most people who care have already watched this online, but I'm sharing it anyway. Today the teaser for the next Star Wars film launched and it is incredible. I know a lot of folks hated the prequels and will remind me that the first teaser for them was pretty exciting as well. I don't care. The prequels were not as cool as I had hoped, but frankly, I didn't mind. I enjoyed them. Not as much as the original series, which by the way, also had its groan-worthy moments, but I had a heck of a lot of fun just watching them. I'm thrilled by what I see here. The Stormtroopers, in particular, look to be bad ass. One of the best parts of the Prequels was seeing the Clone Troopers as an effective fighting force. I'd like to see them kicking butt again in this new series, especially if we get to see the Empire in the Rebellion's role from the classic series. Much smaller, much leaner, etc. Any way, enjoy.

Disqus update (and BlogCFC export script)

11-26-2014 629 views ColdFusion

As folks know, I've been working on transitioning to Disqus over the past week. I ran into multiple problems, and I made multiple mistakes, but today the process completed and I'm ready to share details about my BlogCFC export script as well as some tips for others who may be considering making the jump.

Early Access to My Next Book - Apache Cordova in Action

11-25-2014 1,895 views Mobile, JavaScript, HTML5, Books

Hey - guess what? I'm working on a book. This time the publisher is Manning, and one of the cool things they do is allow early access to a book. You basically pay for it while it is being developed and you can provide feedback to help improve the text. Obviously you get corrected/new chapters as they come out as well. If this is appealing to you, you can head over to the book page now.

Status of Disqus updates, and a tool for URL migration

11-23-2014 1,095 views Misc

Well, I'm disappointed to say the least. I've had good luck with Disqus pretty much everywhere I've used it, but my attempts to migrate my 50K+ comments over have been met with a great amount of difficulty. I'm not giving up, but hopefully my notes here will help others.

Check out FormKeep, another option for static sites

11-21-2014 1,506 views Development, JavaScript, HTML5

Over the past year or so I've been playing around with static site generators. After nearly fifteen years spent building dynamic web applications on the server-side, a simple solution involving a static site generator can be pretty darn appealing. Unfortunately, moving to static means you need to find alternatives for things that simply can't be static. Forms, forums, calendars, etc. I discussed options to handle this problem in my article for modernweb, Moving to Static and Keeping Your Toys. Today I'm going to introduce you to another option I discovered yesterday, FormKeep

ColdFusion Startup Issue with Hostname

11-21-2014 1,260 views ColdFusion

So - this is kind of crazy. Yesterday I fired up ColdFusion 11 to test something and discovered that every request for a CFM returned an error. The error was a Null Pointer Exception so not terribly helpful. (Or so I thought.) I checked the logs and saw this:

Blog Migration Update

11-20-2014 1,354 views Misc

Just a quick note. I've mentioned that I'm in the process of migrating the blog to a new platform (Wordpress). As part of that migration, I've went ahead and switched to Disqus. I'm still working on my export script (I'll share that when done) and since it will take up to 24 hours for the data to migrate (when I actually get the migration script even done!) I thought I'd take the plunge and enable it now.

However - that leaves me with having to display both the "old" comments (all 50,000+ of them) along with Disqus. I've done that now. Basically I just added the embed and removed the "Add Comment" form. I also put a little note so it was (hopefully) a bit obvious as to what in the heck was happening.

I know some folks aren't a fan of Disqus, but, going forward, this helps me make the blog a bit more migratable. (That's not a word and my editor is going to fuss at me. ;)

Determining installed plugins at runtime for Cordova and PhoneGap applications

11-19-2014 2,622 views Mobile, JavaScript, HTML5

Earlier today on Twitter a user asked an interesting question: How can I tell - via JavaScript - if a particular plugin is installed in a Cordova/PhoneGap application. I responded by asking how you wouldn't know since it is your own app, but then he mentioned that his code base was stand alone and would be used within other projects. (So basically - just JavaScript code that other Cordova/PhoneGap applications would use.)

Using the autodivider feature in jQuery Mobile (take two)

11-18-2014 3,298 views Mobile, jQuery, JavaScript, HTML5

Almost a year ago I blogged about using the autodivider feature in jQuery Mobile. This is a simple feature that enhances list views with dividers. It makes content a bit easier to parse when working with a large list.

One of my readers, Fher (who has a cool name - I kind of imagine her/him as a fire-breathing wolf), asked if there was a way to add a bubble count to the dividers. You can see an example of this on the docs for listview, but this is what the feature looks like:

So, the short answer is no, you can't do this with autodividers. Why? While the feature allows you to build a function to create dynamic dividers, it only lets you specify the text for the divider, not random HTML. However, if you are willing to give up having the "pretty bubble" effect, you can simply use it as part of the label. To make that work, I modified my code a bit from the previous demo (and again, you can read that here, I'd suggest checking it out just so you can see the context). Here is the complete JavaScript code. (The HTML didn't change.)

$(document).ready(function() {

	var dates = [
		"12/16/2013 12:00:00",
		"12/16/2013 14:00:00",		
		"12/17/2013 12:00:00",
		"12/18/2013 12:00:00",
		"12/19/2013 12:00:00",
		"12/19/2013 16:00:00"
	];

	var dateList = $("#dates");
	for(var i=0, len=dates.length; i<len; i++) {
		dateList.append("<li>"+dates[i]+"</li>");	
	}

	/*
	Create a generic func to return the label
	*/
	var getLabel = function(d) {
		return (d.getMonth()+1)+ "/" + d.getDate() + "/" + d.getFullYear();
	}
			
	/*
	Now that we have a func, use it to generate a label to count hash
	*/
	var dateCount = {};
	for(var i=0, len=dates.length; i<len; i++) {
		var l = getLabel(new Date(dates[i]));
		if(dateCount.hasOwnProperty(l)) {
			dateCount[l]++;
		} else {
			dateCount[l] = 1;
		}
	}
			
	dateList.listview({
		autodividers:true,
		autodividersSelector: function ( li ) {
			var d = new Date(li.text());
			var label = getLabel(d);
			
			return label + " (" +dateCount[label] +")";
		}
	}).listview("refresh");

});

The first change was to abstract out the code used to generate the divider - basically turning the date value into a label. Once I have that, I iterate over my data to figure out how many unique date labels I have. This is done with a simple object and a counter. Finally, my autodividersSelector function is modified to make use of this count. Here is the result.

There you go. Not exactly rocket science, but hopefully helpful. It is possible to create dividers with list bubbles, just not quite as simply as this entry demonstrates. I'll show that tomorrow.

Looking for Suggestions: Best Conferences for Mobile/Web Development

11-18-2014 1,627 views Development

Earlier today my buddy Andy Trice posted a question about conferences: