Sonny from Podcacher has started a new website called Pocket Lenses. I’ve already picked a good tip for using my flash in daylight situations to fill details on faces. Something I usually forget I have the capability of doing! I’ll be watching the site carefully in the future to see what other tips & tricks get posted.
I ran across a contest on podcacher.com – they’re giving away a GPSr! More specifically, they’re giving away a Garmin GPSMAP 64. I think it might be better than my Garmin eTrex 30, but it’s worth entering the contest whether it is or not.
I never remember to use my camera flash when taking photos during the daytime. Watch Sonny from Pocket Lenses shows how to best bring out faces by using the flash during daylight.
A colleague came to me today trying to get the DataTables jQuery plugin working on a web page. The instructions on the datatables.net site don’t seem to have a complete out-of-the-box example on how to get the plugin working. So here goes.
- Download the plugin from datatables.net.
- From within the zip archive you downloaded, navigate to the media folder.
- Copy the following files into your project:
media/css/jquery.dataTables.cssto your project’s
- Copy all the files from the
imagesfolder to your project’s
js/jquery.dataTables.min.jsto your project’s
- In the
<head>section of your web page, include the following code:
- Build an html table on your page. Give it an id (I used “table1″ in the code below) Make sure you include a header row using
<thead>and wrap the table body in a
<table id="table1"> <thead> <tr> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> <th>Column 4</th> </tr> </thead> <tbody> <tr> <td>Item 1</td> <td>Description 1</td> <td>Data 1</td> <td>More Data 1</td> </tr> <tr> <td>Item 2</td> <td>Description 2</td> <td>Data 2</td> <td>More Data 2</td> </tr> <tr> <td>Item 3</td> <td>Description 3</td> <td>Data 3</td> <td>More Data 3</td> </tr> <tr> <td>Item 4</td> <td>Description 4</td> <td>Data 4</td> <td>More Data 4</td> </tr> <tr> <td>Item 5</td> <td>Description 5</td> <td>Data 5</td> <td>More Data 5</td> </tr> </tbody> </table>
- Finally, just before the closing
<body>tag, include the following code:
This code references the table by its id (table1) and calls the dataTable method to run on it. Simple.
Over the last year, I have switched to hammock camping. I no longer carry a tent. On the weekend of March 8-10, 2013, I was out camping in my new setup:
Here’s how my gear broke down prior to making the switch:
|Tent||120 oz||7.5 lbs||3.4 kg|
|MEC Raven -7 sleeping bag||52.9 oz||3.3 lbs||1.5 kg|
|172.9 oz||10.8 lbs||4.9 kg|
|Trek Light Gear Double Hammock||20 oz||1.25 lbs||0.56 kg|
|Trek Light Gear Go Anywhere Rope Kit||8 oz||0.5 lbs||0.23 kg|
|Trek Light Gear Bug Free Hammock Shield||16 oz||1 lb||0.45 kg|
|MEC Silicone Scout Tarp||18.3 oz||1.1 lb||0.52 kg|
|MEC Raven -7 sleeping bag||52.9 oz||3.3 lbs||1.5 kg|
|Arrowhead New River Under Quilt||30 oz||1.875 lbs||0.85 kg|
|145.2 oz||9 lbs||4.11 kg|
So I’ve shaved 1.8 lbs off my pack weight. 2.8 lbs if I don’t need the bug net.
Next up I’m considering going with a much lighter pack. The GoLite Quest 65L Pack is looking pretty nice right now at about 3.6 lbs. That’s a far cry from the 6.6 lbs (3 kg) my current pack weighs. The Boreas Lost Coast 60 Backpack at MEC is also looking pretty good at 3.4 lbs (1.523 kg).
I ran across a thread on the CFWheels Google Group where someone was having problems with setting a session timeout. I remembered that I had the same problem a few weeks back. I didn’t think anything of it after I found a solution though. Now, since I’m not the only one having this problem, I thought I’d blog it.
So the problem in a nutshell is that if you try to set a timeout to a number of seconds, it no longer works. My suspicion is that this behavior changed in ColdFusion 9, but was backwards compatible with using a number of seconds as the sessionTimeout value. Like this:
this.sessionTimeout = "3600"
When you read the CF9 documentation for cfapplication, you find this note as the description for sessionTimeout:
Life span of session variables. CreateTimeSpan function and values in days, hours, minutes, and seconds, separated by commas.
I am almost completely using CF10 now, and it appears that the old way of setting a number of seconds no longer works at all. Instead, the revised code for the sessionTimeout value should be:
this.sessiontimeout = CreateTimeSpan(0, 4, 0, 0);
When I dump the THIS scope in Application.cfc, I get the following output in a CFWheels Application:
Hope this helps someone.
NOTE: Code samples above use CFScript. Could be just as easily achieved using.
I’ve been attending a whole host of ColdFusion 10 Developer Week 2012 sessions this week, and got inspired to upgrade my development machine to run ColdFusion 10. I had previously been running CF9 (developer) and MAMP Pro 2.0.5. These instructions will allow you to remove CF9 and install CF10. Installing and configuring MAMP Pro is up to you.
Update: Added a note near the end of the instructions. Basically, make sure you edit the httpd.conf file in MAMP Pro or the changes may be overwritten.
Here’s the process I used to get everything setup and working properly: Continue reading
In a previous post, I had written an example of combining two RSS feeds into one. At some point, I lost the code from the example, probably from clicking save one-too-many times in WordPress. WordPress is quite finicky about posting any kind of programming code. I did some research, and found PasteBin, and have started using that for my code samples.
With that out of the way, it’s time to rewrite the example that was lost, and to try it out in pure CFScript.
- Use feed to Read a WordPress blog feed and return a Query object. If this fails, create an empty query object.
- Execute an SQL Query to get recent News Stories from a MySQL database. If this fails, create an empty query object.
- Use Query of Queries to create a Union of the two sources previously defined. If this fails, create an empty query object.
- Setup Structs to defined properties for RSS Feed Creation
- Create the RSS Feed. This one gave me a bit of grief. I didn’t see my output file until I added ExpandPath to it. It took be a bit to figure out that to get assign the results of the create method to the xmlVar. Adobe’s documentation is sketchy on this – no working example. After reading through the documentation a few times, I eventually figured it out.