Home | Blog | Twitter @AndyJ | Contact Me | Snippets/Downloads | RSS

ColdFusion online meetup is also downloadable

Since 2007 Charlie Arehart has runThe ColdFusion Meetup(actually founded in 2004). If you haven't heard of it then think of it as an online User Group with over 2000 members and over 120 meetups so far. The problem I have is that I can rarely make the actual sessions due to time conflicts but whats good is that you have always been able to watch the recording later. One other feature though of the meetups, which is what got me blogging this post, is that you can also download the recordings in the FLV format so you can watch offline later. Or in my case download it so I can watch with VLC as my Mac hates flash with a passion!

The iPad wallpaper for iPhone


The iPad wallpaper for iPhone, originally uploaded by Andy Jarrett.

Someone sent this to me being the geek I am so I thought I would share.

A comment on using CFParam inside a CFFunction

This is a response/comment to Steve Goods post named: Using CFParam Inside a CFFunction. Its turned into a blog post because, well I suppose I am looking for a wider feedback on my thoughts.

When it comes to using <cfparam> in a <cffunction> I would never of even contemplated it up to a few weeks ago, mainly because of the framework I was using gave me other ways of checking of variables existence.But I've moved over to Framework One (FW/1) which uses the tag in its controllers for some of the demos and I've now adopted this in to my recent code.

This then got me thinking that I cannot find a solid case reason as to write

   view plainprintabout
 if ( NOT StructKeyExists(myVar, "somekey") )
 {
 myVar.someKey = "0";
 }
 else if ( NOT isNumeric( myVar.somekey ) )
 {
 throw();
 }

when cfparam does that all in one go with basic type checking aswell.

   view plainprintabout
 <cfparam name="myVar.somekey" default="0" type="integer" />

You could wrap the if() logic in a function to be used but then aren't you just adding an extra layer to your code to do something CF already handles?

The squirrel has left the building

Neil Middleton has turned off his ColdFusion/Flex/Flash feed aggregator, Feed-Squirrel which has been up and running for near 4 years.

You can read all the details in his post, I just wanted to help pass on the news for the community.

Don't forget to turn off your automated ping'ing if you were aggregated by the site

Submit jQuery tabs back on to itself

jQuery UI is a powerful set of interaction plugins for building RIA apps that run and the look the same across multiple browsers. Below is an example of using the tabs to hold multiple forms which submit back to themselves. The code is pretty straight forward and consists of two pages, the first one can even be a HTML page but the second one in my demo is a ColdFusion page to show the passed variables.
   view plainprintabout
 <html>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>Submit jQuery tabs back on to itself</title>
 <!-- Use Google CDN for jquery files -->
 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
 <!-- You can use Googles CDN for the themes as well -->
10  <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/swanky-purse/jquery-ui.css" type="text/css" />
11  <script>
12  $(document).ready(function(){
13  // set the tabs
14  $("#tabs").tabs();
15  // Capture the form's submit event
16  $('.inlineForm').live('submit', function() {
17  $.ajax({ // create an AJAX call...
18  data: $(this).serialize(), // get the form data
19  type: $(this).attr('method'), // GET or POST
20  url: $(this).attr('action'), // the file to call
21  success: function(response) { // on success..
22  $('.ui-tabs-panel:visible').html(response); // update the DIV
23  }
24  });
25  return false; // cancel original event to prevent form submitting
26  })
27  }); // END (DOCUMENT).READY
28  </script>
29  </head>
30  <body>
31  <div id="tabs">
32  <ul>
33  <li><a href="#tabs-1">Form 1</a></li>
34  <li><a href="#tabs-2">Form 2</a></li>
35  </ul>
36  <div id="tabs-1">
37  <!-- This is your first form. You could call this content in from Ajax?
38  Also note the class name which is the reference point for jQuery
39  -->

40  <form action="receive.cfm" method="get" class="inlineForm">
41  <input type="text" name="val1" value="" />
42  <input type="submit" name="submit" value="Submit Form 1" />
43  </form>
44  </div>
45  <div id="tabs-2">
46  <!-- This is your second form. You could call this content in from Ajax? -->
47  <form action="receive.cfm" method="get" class="inlineForm">
48  <input type="text" name="val2" value="" />
49  <input type="submit" name="submit" value="Submit Form 1" />
50  </form>
51  </div>
52  </div>
53  </body>
54  </html>

The second page should be called receive.cfm

   view plainprintabout
 <!-- This would process your form information and pass back a result to the user -->
 <cfsetting showdebugoutput="false" />
 <script>$("#dialog").dialog( {bgiframe: true, height: 140, modal: true} );</script>
 <div id="dialog" title="Done!">
 <p>Form submitted in to same tab</p>
 </div>
 <p>
 <cfdump var="#url#" format="text" label="Url variables">
 </p>

All 32-bit windows hackable

It seems that there is a hole in the Virtual DOS Machine that is used to run 16-bit applications in all version of Windows from 3.1 up to and including Windows 7 (SP1 too). The hole basically allows a user with restricted access to execute code at system privilege level. The fix is easy (if you don't run 16 bit apps), its simply a registry change. According to the article though Microsoft have known about the issue since mid 2009 which is kinda scary. You can read more at http://www.taranfx.com/windows-hacking. Why couldn't an exploit as serious as this be found for all IE6 versions!

Pet Rescue SOS, a new site in the works

Pet Rescue SOS is a site I've had a hand in putting it together, put simply, is the place where you can register your pets, have them assigned a unique tag and identity number which can used to identify and locate your pet anywhere in the world. This service is available online 24hrs a day and you have access to your own registration section from where you can manage your account and pets.

Below for anyone interested is some of the tech specs:

Fridays Joke: The hippie

A hippie gets on a bus and spies a pretty young nun. He sits down next to her, and asks her: "Can we have sex?"

"No," she replies, "I'm married to God." She stands up, and gets off at the next stop.

The bus driver, who overheard, turns to the hippie and says:

"I can tell you how to get to have sex with her!"

"Yeah?", says the hippie.

"Yeah!", say the bus driver. "She goes to the cemetery every Tuesday night at midnight to pray, so all you have to do is dress up in a robe with a hood, put some of that luminous powder stuff in your beard, and pop up in the cemetery claiming to be God."

[More]

Change auto increments starting number

If you ever have the need to change the starting number on a auto increment column (on a MySQL table) its pretty simple
   view plainprintabout
 ALTER TABLE tablename AUTO_INCREMENT = 12345

Changing BlogCFC's comment approval

One little thing thats bugged me with BlogCFC with moderated comments is the need to go from List > View Comment < back to list to approve. Silly I know but still ... So I've added the following on the comment.cfm page in the admin section

   view plainprintabout
 <input type="button" name="approve" value="Approve" onclick="location.href='#application.rooturl#/admin/moderate.cfm?approve=#comment.id#'" />

All this does is add the button "Approve" to the view comment page to smooth out the flow of the process

More Entries

BlogCFC / created by Raymond Camden / running version 5.9.5.003 / Contact AndyJarrett.com / Pet Rescue SOS