looping over dates

ColdFusion 2 Comments »

did you know you can loop over dates like this;

<cfset startdate= “06/01/2004″>
<cfset enddate = “10/06/2004″>

<cfloop from=“#startdate#” to=“#enddate#” index=“i”>
<cfoutput>
#dateformat(i, “mm/dd/yyyy”)#<br />
</cfoutput>
</cfloop>


It came as news to me too! Someone had asked on cf-talk how to loop between two dates outputting the entire list (not unlike my question last week about how to loop between two dates but only display the month - as i’m using in my archives pod). Initially i’d responded to use the dateadd() function, but then i tried the above code and was amazed when it didn’t error seeing as it’s not mentioned in the docs as being valid!

woohoo, I passed!

ColdFusion 5 Comments »

A few weeks ago I blogged (here) about Macromedia offering a wopping 60% discount on their exams throughout August, an offer like that is just too good to refuse.

So i booked myself to take the exam today. Had i taken the full time i should still be in the test but i’m back at my desk after scoring an acceptable 83%. I’d have been a little upset had i scored anything lower as i like to think i know my stuff since i use most of it every day :) Aside from that thanks MM for offering the discount and now you’ve got another Advanced Cold Fusion Developer on your list.

Macromedia BETA surveys

ColdFusion 1 Comment »

To potentially get yourself invited to join future Macromedia BETA programs fill in the survey’s that can be found here. Currently there are surveys up there for Cold Fusion, Dreamweaver and Fireworks.

goodbye CFLOGIN with session scope!

ColdFusion No Comments »

Macromedia have (12th August) just posted bug 53320 and issued a technote accordingly related to the <CFLOGIN> tag and loginStorage=Session advising developers to switch to using the loginstorage=cookie (which is default if no login storage attributes is set) to overcome the problem. The problem lies in the fact that when using session storage and a user logs out <CFLOGOUT> clears the authorisation from the session scope but fails to clear the internal security scope, thus meaning when a user logs out and another user logs in they’d still have the previous users login credentials assigned to them - which isn’t good!!

The full Macromedia technote can be found here.

Need to stop Wifi Access?

general No Comments »

Wifi is all the rage at the moment with just about every new laptop/PDA coming with it built in. Consequently Wifi security is a hot topic at the moment with people concerned about snoopers and how to stop people outside your buildings getting to your wifi networks inside. Granted you can line your walls with ali foil or such like but that blocks all electromagnetic emissions including mobile phones!

The UK Telecoms regulator ‘OfCom’ has commisioned British Aerospace (BAe) to solve the problem of stopping ‘Wifi’ escaping your premises or letting people outside in whilst still allowing mobile phones to operate. What’s even cooler about the solution is that the filtering can be switched on or off….for £500 a metre it’s only for the most security conscious!!!

The New Scientist article can be read here

upgraded my SatNav!

general No Comments »

Since i’ve upgraded my PocketPC to the Dell Axim x30 i’ve been on the hunt for a new SatNav GPS to get me from A to B. With my iPaq 3850 I had the Navman 3400 Voice setup which uses an iPaq sleeve but always found it a little bulky.

With the Axim being Bluetooth it made sense to go for a Bluetooth setup and i settled on the TomTom 3 Bluetooth option. The GPS receiver is just larger than a match box, rechargable and sits at the front of the car - which is a super neat solution.

The software TomTom Navigator 3 blows the socks off SmartST that the NavMan GPS uses. A three dimensional view of the road ahead and roads off is the primary view, although you can change to overhead maps. When you go into a menu they’re big buttons so you can use your finger whilst you’re driving to drive the GUI and when it comes to typing in an address the letters are big (unlike SmartST which uses the default PocketPC screen keyboard).

What i really like is the new traffic plugin, this uses the GPRS connection on my phone to update itselft periodically during the journey alerting you to incidents en route which you can have TomTom reroute you around.

Points of Interest are the next great feature. There’s a fairly comprehensive ‘POI’ database in TomTom ranging from petrol stations to cash points - these show up as icons on the 3d view as you’re driving along. If you suddenly find you need gas you tap the screen, go into ‘Navigate to’ and select ‘Petrol Station’ and you get routed to the first petrol station in the list. What’s nice is you can ‘add’ new POI categories from the internet, of signicant interest will be the UK Speed Cameras POI along with another addon for most SatNav’s ‘Checkpoint’ which will alert you when you’re approaching selected POI’s.

You can find TomTom at http://www.tomtom.com

it seems to be working…

ColdFusion 1 Comment »

So after a few more hours of coding i’ve added the ability to retrieve blog categories (thanks to RogerB for the XML response method) into my BlogThis! client on my laptop and then submit the entry tagging it to my selected category.

Also, i’ve been helping Jake (who’s post on cf-talk initially set me off on this quest) and he’s found that my code doesn’t work on his particular blogging client, BlogJet. RogerB did warn me that some blogging clients down implement the entire APIs uniformally so these problems are to be expected - all i can say is that Newzcrawler seems to work well. Perhaps now i need to look at different responses based on the client being used….more fun!

Duplicate entries on my RSS feeds…

general No Comments »

sorry about that folks, completely my fault. I was trying to chase down a problem with badly formed XML and it seems like you’ve all got duplicate entries

I even got my own entry on Roger Benningfields mxblogspace, here

Newzcrawler + XML-RPC = fun!

ColdFusion No Comments »

After reading a post on the CF-Talk earlier this morning about blogging APIs it was suggested to look into Roger Benningfields XML-RPC CFC (read about it here).

So I’ve been doing just that and it really is quite cool. Basically the CFC handles the conversion of CFML to and from XML-RPC packets so you don’t have to worry about any of that. I use Newzcrawler as my RSS aggregator so i set about figuring out how to use it to add entries to my blog. In Newzcrawler you have to define ‘my Blogs’ the XML-RPC API they each use, along with the host and the RPC end point. Newzcrawler then goes off and retrieves a list of available blogs on the server. This is where the fun begins.

So, armed with the CFC i started with:

<cfinvoke component=”hosta.cfcs.xmlrpc”
   method=”CFML2XMLRPC”
   returnvariable=”rpcCall”
   data=”#myArray#”
   type=”response”>

<cfmail from=”x” to=”x” subject=”XML-RPC request”>
<cfdump var=”#rpcCall#”>
</cfmail>

to see what Newzcrawler wanted to do first. When you receive the email you see that it first wants to call the method blogger.getUserBlogs so that’s what i started out by researching what i needed to send back to the client.

Links of worth at this point are here and here which define the specs of the various XML-RPCs. Blogger.getUserBlogs needs to return data as per here so i need to make ‘myArray’ an array containing a structure before processing with the XML-RPC cfc, so far i’ve got;

<cfset myArray = arraynew(1)>
   <cfset data = arraynew(1)>
   
   <cfset member = structnew()>
   <cfset member.url = “http://www.beynon.org.uk”>
   <cfset member.blogID = “22146F3D-B577-7592-447884894DEBBB88″>
   <cfset member.blogName= “John Bs personal blog”>
   
   <cfset data[1] = member> 
   <!— nest the arrays —> 
   <cfset myArray[1] = data>

which setups the particular blog within Newzcrawler when you pass myArray into the CFC and then ‘update’ the blog list from Newzcrawler.

So far so good, I’m still fine tuning the ‘posting’ from Newzcrawler, this entry was made from it - but no category assigned on posting. More to come soon….

updates, updates everywhere!

general No Comments »

I’ve been deluged with updates today - XP SP2 for is available now, I wasn’t able to find it on a public Microsoft site yet, but grabbed an ISO image from the MSDN site and installed it on all my computers at work with no issues to report.

Firefox 0.9.3 was released on 4th August, i’m surprised it hadn’t tried to update itself but no harm done. Interestingly enough the Mozilla org (with financial backing from the former ‘Lindows’ company and a South African venture capitalist) has now put up a $500 reward per critical bug found, you can read more here

If you’re a frequent Dreaweaver, Fireworks, Flash or Contribute user the next one is for you. Under certain conditions DW sites can vanish from the site definition list. Yesterday MM Exporter released version 2.1 which can backup all your configs, site definitions etc should a disaster occur allowing you to restore your MM products to their former configuration

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in