<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2737381323655320103</id><updated>2012-02-16T14:18:08.904Z</updated><title type='text'>Tales of ColdFusion</title><subtitle type='html'>Bits and pieces of accumulated rambling. Updated when I remember. By Dave. 

Was supposed to be mostly ColdFusion. But I find myself linking to interesting or amusing news articles instead. Just like everybody else on the internet.

Ah well...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-2586024669104849761</id><published>2009-07-17T08:15:00.002Z</published><updated>2009-07-17T08:18:24.553Z</updated><title type='text'>Freeware Applications and Games for the Nokia N97 phone</title><content type='html'>I've knocked up a quick application that lists freeware applications and games for the Nokia N97 phone.&lt;br /&gt;&lt;br /&gt;You can view it at &lt;a href="http://www.davecozens.com/n97/"&gt;http://www.davecozens.com/n97/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also, I don't know about anybody else, but I've some terrible scratches on the lens caused by the lens cover. Not good. For more info go to &lt;a href="http://www.davecozens.com/n97/scratches.htm"&gt;http://www.davecozens.com/n97/scratches.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-2586024669104849761?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/2586024669104849761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=2586024669104849761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/2586024669104849761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/2586024669104849761'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2009/07/freeware-applications-and-games-for.html' title='Freeware Applications and Games for the Nokia N97 phone'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-5932230330148592577</id><published>2008-05-15T11:09:00.003Z</published><updated>2008-05-15T11:12:43.810Z</updated><title type='text'>Oooops. Lost blog</title><content type='html'>Yup, once again I completely forgot to post anything remotely important..&lt;br /&gt;&lt;br /&gt;Although I've been doing some work on a web based javascripty ColdFusion HTML editor that can parse ASP includes (but prevents editing of include files). Content management on the cheap, if you will. Without the overhead of importing existing content.&lt;br /&gt;&lt;br /&gt;That's entertaining.&lt;br /&gt;&lt;br /&gt;That and tinkering about with jMeter and BadBoy (why did they call it that? why?) for load &amp;amp; system testing. A useful combination indeed...&lt;br /&gt;&lt;br /&gt;Anyways. Back to work...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-5932230330148592577?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/5932230330148592577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=5932230330148592577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/5932230330148592577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/5932230330148592577'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2008/05/oooops-lost-blog.html' title='Oooops. Lost blog'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-2207103116083520300</id><published>2007-08-02T09:11:00.001Z</published><updated>2007-08-02T09:26:50.843Z</updated><title type='text'>Single Quotes &amp; Query of Query</title><content type='html'>Well that was fun. Since I'm working in Ireland at the moment there's about a gazillion people with single quotes in their names.&lt;br /&gt;&lt;br /&gt;"Query of Query" really doesn't cope very well with that.&lt;br /&gt;&lt;br /&gt;CF automagically escapes them with 2 single quotes ('') and then any where clause doesn't find them. Not very useful.&lt;br /&gt;&lt;br /&gt;If you use preservesinglequotes, the query is syntactically incorrect. So you get an error. Also, not very useful.&lt;br /&gt;&lt;br /&gt;However, if you replace each single quote with 2 single quotes you end up with a param that looks like this 'O''''Reilly'. Somewhat bizarrely, that works a treat.&lt;br /&gt;&lt;br /&gt;So, if you want to search for O'Reilly and his mates (from parameter searchValue) using Query of Query, you need to do this: -&lt;br /&gt;&lt;br /&gt;    #replace(ucase(searchValue),"'","''","all")#&lt;br /&gt;&lt;br /&gt;That's rather horrible to read, isn't it. So to make it readable (by adding a bunch of spaces): -&lt;br /&gt;&lt;br /&gt;    #replace(&lt;br /&gt;        ucase(searchValue),&lt;br /&gt;        " ' ",&lt;br /&gt;        " ' ' ",&lt;br /&gt;    "all"&lt;br /&gt;    )#&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But obviously, you don't want the spaces there in reality.&lt;br /&gt;&lt;br /&gt;So there you go. Query of Query is completely mental.&lt;br /&gt;Dave&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-2207103116083520300?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/2207103116083520300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=2207103116083520300' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/2207103116083520300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/2207103116083520300'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2007/08/single-quotes-query-of-query.html' title='Single Quotes &amp; Query of Query'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-7828377008663990551</id><published>2007-07-18T10:50:00.000Z</published><updated>2007-07-18T10:54:13.386Z</updated><title type='text'>Boy sent £44,000 in eBay parcel</title><content type='html'>According to the Beeb, somebody slipped whilst doing their ebay packing, and instead of dropping a PS2 in the box, they accidentally put £44,000 in there instead. And sent it off to an unwitting teenager.&lt;br /&gt;&lt;br /&gt;"Result", you might think.&lt;br /&gt;&lt;br /&gt;But no! He phoned the police instead. I bet he does always his homework and is never home late either!&lt;br /&gt;&lt;br /&gt;More here -&gt; &lt;a href="http://news.bbc.co.uk/1/hi/england/norfolk/6903433.stm"&gt;bbc news article&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-7828377008663990551?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/7828377008663990551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=7828377008663990551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/7828377008663990551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/7828377008663990551'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2007/07/boy-sent-44000-in-ebay-parcel.html' title='Boy sent £44,000 in eBay parcel'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-6558153899616786817</id><published>2007-07-11T11:46:00.000Z</published><updated>2007-07-11T11:48:02.524Z</updated><title type='text'>Fun with Helium Balloons - Economy Class</title><content type='html'>Some nutter has just flown over 193 miles in a chair suspended from a bunch of helium balloons.&lt;br /&gt;&lt;br /&gt;Sounds like fun...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bbedit.sv.publicus.com/apps/pbcs.dll/artikkel?NoCache=1&amp;Dato=20070708&amp;amp;Kategori=NEWS0107&amp;Lopenr=707080434&amp;amp;Ref=AR"&gt;more -&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-6558153899616786817?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/6558153899616786817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=6558153899616786817' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/6558153899616786817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/6558153899616786817'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2007/07/fun-with-helium-balloons-economy-class.html' title='Fun with Helium Balloons - Economy Class'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-970160085129793620</id><published>2007-07-10T16:45:00.000Z</published><updated>2007-07-10T16:49:13.594Z</updated><title type='text'>It's Snowing in Buenos Aires!</title><content type='html'>&lt;span style="font-style: italic;font-size:85%;" &gt;&lt;b&gt;"Argentina's capital, Buenos Aires, has seen snow for the first time in 89 years, as a cold snap continues to grip several South American nations. &lt;/b&gt; &lt;/span&gt;&lt;p style="font-style: italic;"&gt; &lt;span style="font-size:85%;"&gt;Temperatures plunged to -22C (-8F) in parts of Argentina's province of Rio Negro, while snow fell on Buenos Aires for several hours on Monday. &lt;/span&gt;&lt;/p&gt;&lt;p style="font-style: italic;"&gt; &lt;span style="font-size:85%;"&gt;&lt;span&gt;Two deaths from exposure were reported in Argentina and one in Chile."&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="text-decoration: none; font-weight: normal;"&gt;I'd just like to take a moment to say "huh?"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;See full article on &lt;a href="http://news.bbc.co.uk/1/hi/world/americas/6286484.stm"&gt;BBC News&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-970160085129793620?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/970160085129793620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=970160085129793620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/970160085129793620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/970160085129793620'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2007/07/its-snowing-in-buenos-aires.html' title='It&apos;s Snowing in Buenos Aires!'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-2233802611788693431</id><published>2007-07-05T07:22:00.000Z</published><updated>2007-07-05T07:42:33.913Z</updated><title type='text'>Live in a cave. Missed opportunity!</title><content type='html'>Dammit. I just found out I missed a chance to buy a cave to live in. With a door and windows and everything.&lt;br /&gt;&lt;br /&gt;After all the times I've threatened to give it all up and go live in a cave somewhere I really missed the ball there  *sigh*&lt;br /&gt;&lt;br /&gt;Hermit heaven.. Photo's here :-&lt;br /&gt;&lt;a href="http://www.dailymail.co.uk/pages/live/articles/news/news.html?in_article_id=465523&amp;in_page_id=1770"&gt;The £25,000 cave home&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Big garden too... (according to the Beeb it sold for 100k)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-2233802611788693431?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/2233802611788693431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=2233802611788693431' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/2233802611788693431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/2233802611788693431'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2007/07/live-in-cave-missed-opputunity.html' title='Live in a cave. Missed opportunity!'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-5968404574112921354</id><published>2007-07-04T08:15:00.001Z</published><updated>2007-07-04T08:18:38.904Z</updated><title type='text'>Facebook</title><content type='html'>Oh yeah, another thing. I've started using Facebook (www.facebook.com). &lt;br /&gt;&lt;br /&gt;It's a bit irritating in many ways (mostly the "I didn't think of it first" way) but kinda funky. It may steal your life though...&lt;br /&gt;&lt;br /&gt;Want to find me on Facebook? Just search for Dave Cozens - I'm the one with the smoking monkey.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-5968404574112921354?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/5968404574112921354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=5968404574112921354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/5968404574112921354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/5968404574112921354'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2007/07/facebook.html' title='Facebook'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-3497327981067802993</id><published>2007-07-04T08:11:00.000Z</published><updated>2007-07-04T08:12:29.065Z</updated><title type='text'>Missing, presumed missing...</title><content type='html'>Ooops. I totally forgot this was here. But I made a post today. Woo!&lt;br /&gt;&lt;br /&gt;I'll try to remember...&lt;br /&gt;&lt;br /&gt;Dave&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-3497327981067802993?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/3497327981067802993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=3497327981067802993' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/3497327981067802993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/3497327981067802993'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2007/07/missing-presumed-missing.html' title='Missing, presumed missing...'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-8065429157111911908</id><published>2007-07-04T07:15:00.001Z</published><updated>2007-07-04T07:40:37.707Z</updated><title type='text'>Strong Encryption in MX7</title><content type='html'>&lt;span style="font-size:100%;"&gt;Bloody hell, that was a trial that was.&lt;br /&gt;&lt;br /&gt;I needed to encrypt some data to transfer a user to another system using a specified encryption algorithm where the service provider has supplied both the key and the initialisation vector.&lt;br /&gt;&lt;br /&gt;Documentation is limited at best, but after beating my head against ColdFusion and Google I finally got it to work.&lt;br /&gt;&lt;br /&gt;And it's good to share, so here we go...&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;1. First you need to get the Sun Unlimited Strength Jurisdiction Policy Files for Java (SUSJPFJ?)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;You can get these from &lt;/span&gt;&lt;span style=""&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/download.html"&gt;&lt;span style="color:blue;"&gt;http://java.sun.com/j2se/1.4.2/download.html&lt;/span&gt;&lt;/a&gt;. Unzip &lt;/span&gt;&lt;span style=""&gt;jce_policy-1_4_2-1.zip into&lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style=""&gt;{jre}\lib\security\ - but it's probably a plan to back it up first. Restart CF. You'll have to restart it again in a minute, but softly softly catchy monkey...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Next Stop - BouncyCastle&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Go and get the latest 1.4 release of the BouncyCastle service provider files from &lt;/span&gt;&lt;span style=""&gt;&lt;a href="http://www.bouncycastle.org/latest_releases.html"&gt;&lt;span style="color:blue;"&gt;http://www.bouncycastle.org/latest_releases.html&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;  . Last time I looked it was bcprov-jdk14-137.jar. Drop the file into {jre}\lib\ext\&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;Now you have to edit &lt;/span&gt;&lt;span style=""&gt;runtime\jre\lib\security\java.security to include the new service provider. Assuming that you currently have the default 5 service providers, add the following immediately below: -&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  &lt;p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt 36pt; line-height: normal;"&gt;&lt;span style=""&gt;security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;Restart CF again. You should be ready to go.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. An Example&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It would be mean to get you this far without some example code. So here goes.&lt;br /&gt;Inline CFML:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;cfset stringtoencrypt="ooh, ooh, it's a bit secret"&gt;&lt;/cfset&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;cfset encryptionkey=" tobase64("&gt;&lt;/cfset&gt;&lt;/span&gt;&amp;lt;cfset stringToEncrypt        ="MSISDN=5551112225,Culture=en-IE"&amp;gt;&lt;br /&gt;&amp;lt;cfset encryptionKey        =tobase64("1BF03AB0CEF0AB4A7E793CE0")&amp;gt;&lt;br /&gt;&amp;lt;cfset algorithm            ="AES/CBC/PKCS7Padding"&amp;gt;&lt;br /&gt;&amp;lt;cfset initialisationVector = "C7D9769F6F261A41"&amp;gt;&lt;br /&gt;&amp;lt;cfset encrypted = Encrypt(stringToEncrypt, encryptionKey, algorithm, "Hex", initialisationVector)&amp;gt;&lt;br /&gt;&lt;br /&gt;CFSCRIPT&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    stringToEncrypt = "ooh, ooh, it's a bit secret";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    encryptionKey = tobase64("1CF03CF0CEF1CF4A7E733CE0");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    algorithm = "AES/CBC/PKCS7Padding";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    initialisationVector = "C6D3799F1F111A41";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    encrypted = Encrypt(stringToEncrypt, encryptionKey, algorithm, "Hex", initialisationVector);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-8065429157111911908?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/8065429157111911908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=8065429157111911908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/8065429157111911908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/8065429157111911908'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2007/07/strong-encryption-in-mx7.html' title='Strong Encryption in MX7'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-148253158466418519</id><published>2007-02-20T07:23:00.000Z</published><updated>2007-02-20T07:42:33.998Z</updated><title type='text'>Using GetTickCount() More Effectively in ColdFusion</title><content type='html'>We've got some legacy code that we're wrapping into a Model Glue: Unity (&lt;a href="http://model-glue.com/"&gt;http://model-glue.com/&lt;/a&gt;) environment at the moment. Some of it was behaving badly and running like the proverbial dog.&lt;br /&gt;&lt;br /&gt;I needed something to measure performance of sections of code, possibly sections spanning multilpe templates. I needed it to report in a helpful way. So I knocked together Daves Tick Counting Machine (tm).&lt;br /&gt;&lt;br /&gt;It enables you to drop 2 lines of code in with existing code to start performance measuring (first line=start, 2nd lin=stop, like a stopwatch).&lt;br /&gt;&lt;br /&gt;It gives you a nice sequential, nested output at the end. And it lets you display the results either on screen, to a log file, or both.&lt;br /&gt;&lt;br /&gt;Here's the code: -&lt;br /&gt;&lt;br /&gt;In application.cfm: -&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&amp;lt;cfset request.tcm=createObject("component","DavesTickCountingMachine").init(enabled=true,outputToScreen=true,outputToLog=false)&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;To start/stop monitoring: -&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&amp;lt;cfset request.tcm.toggleCounter("&lt;i&gt;Counter Name&lt;/i&gt;")&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;To view output: -&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&amp;lt;cfoutput&amp;gt;#request.tcm.report()#&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;DavesTickCountingMachine.cfc: -&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&amp;lt;Cfcomponent name="davesTickCountingMachine" hint="Provides a method of recording performance data"&amp;gt;&lt;br /&gt; &amp;lt;cffunction name="init" hint="creates the tick counting machine"&amp;gt;&lt;br /&gt;  &amp;lt;cfargument name="enabled" default="true" type="boolean" hint="Turns the TCM on (true) and off (false)"&amp;gt;&lt;br /&gt;  &amp;lt;cfargument name="outputToScreen" default="true" type="boolean" hint="Turns the TCM screen output on (true) and off (false)"&amp;gt;&lt;br /&gt;  &amp;lt;cfargument name="outputToLog" default="false" type="boolean" hint="Turns the TCM csv file output on (true) and off (false). File is saved in root of calling file."&amp;gt;&lt;br /&gt;  &amp;lt;cfset this.enabled=arguments.enabled&amp;gt;&lt;br /&gt;  &amp;lt;cfset this.outputToScreen=arguments.outputToScreen&amp;gt;&lt;br /&gt;  &amp;lt;cfset this.outputToLog=arguments.outputToLog&amp;gt;&lt;br /&gt;  &amp;lt;!---holds performance data---&amp;gt;&lt;br /&gt;  &amp;lt;cfset this.TCM=structNew()&amp;gt;&lt;br /&gt;  &amp;lt;cfset this.seq=0&amp;gt;&lt;br /&gt;  &amp;lt;Cfreturn this&amp;gt;&lt;br /&gt; &amp;lt;/cffunction&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;cffunction name="toggleCounter" hint="Start or Stop timing an item"&amp;gt;&lt;br /&gt;  &amp;lt;Cfargument name="counterName" hint="The unique identifier for the section of code being analysed"&amp;gt;&lt;br /&gt;  &amp;lt;cfset var whatTimeIsIt=getTickCount()&amp;gt;&lt;br /&gt;  &amp;lt;cfif this.enabled eq "true"&amp;gt;&lt;br /&gt;   &amp;lt;cfset request.seq=this.seq+1&amp;gt;&amp;lt;!--- increment seq no---&amp;gt;&lt;br /&gt;   &amp;lt;Cfif not structKeyExists(this.TCM,arguments.counterName)&amp;gt;&lt;br /&gt;    &amp;lt;!--- if the counter doesn't exist, create a new struct---&amp;gt;&lt;br /&gt;    &amp;lt;cfset this.TCM[arguments.counterName]=structnew()&amp;gt;&lt;br /&gt;    &amp;lt;cfset this.TCM[arguments.counterName].start=whatTimeIsIt&amp;gt;&lt;br /&gt;    &amp;lt;cfset this.TCM[arguments.counterName].seq=this.seq&amp;gt;&lt;br /&gt;    &amp;lt;cfset this.TCM[arguments.counterName].name=arguments.counterName&amp;gt;&lt;br /&gt;    &amp;lt;cfset this.TCM[arguments.counterName].stop=0&amp;gt;&lt;br /&gt;   &amp;lt;Cfelseif this.TCM[arguments.counterName].stop eq 0&amp;gt;&lt;br /&gt;    &amp;lt;!--- it's an existing counter, so this must be the end time---&amp;gt;&lt;br /&gt;    &amp;lt;cfset this.TCM[arguments.counterName].stop=whatTimeIsIt&amp;gt;&lt;br /&gt;   &amp;lt;/Cfif&amp;gt; &lt;br /&gt;  &amp;lt;Cfelse&amp;gt;&lt;br /&gt;   &amp;lt;!--- it's turned off. return fast---&amp;gt;&lt;br /&gt;   &amp;lt;Cfreturn ""&amp;gt;&lt;br /&gt;  &amp;lt;/cfif&amp;gt;&lt;br /&gt; &amp;lt;/cffunction&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;cffunction name="report" hint="Returns the analysis report" output="true"&amp;gt;&lt;br /&gt;  &amp;lt;cfif this.enabled eq "true"&amp;gt;&lt;br /&gt;  &amp;lt;style&amp;gt;&lt;br /&gt;   .tcm{&lt;br /&gt;   background:##eeeeee;&lt;br /&gt;   padding:5px;&lt;br /&gt;   margin:5px;&lt;br /&gt;   background-repeat:no-repeat;&lt;br /&gt;   border:1px solid navy;&lt;br /&gt;   }&lt;br /&gt;  &amp;lt;/style&amp;gt;&lt;br /&gt;   &amp;lt;!--- calculate total times ---&amp;gt;&lt;br /&gt;   &amp;lt;Cfloop collection="#this.tcm#" item="fn"&amp;gt;&lt;br /&gt;    &amp;lt;Cfif structKeyExists(this.tcm[fn],"start") and structKeyExists(this.tcm[fn],"start")&amp;gt;&lt;br /&gt;     &amp;lt;cfset this.tcm[fn].time=this.tcm[fn].stop-this.tcm[fn].start&amp;gt;&lt;br /&gt;    &amp;lt;Cfelse&amp;gt;&lt;br /&gt;     &amp;lt;cfset this.tcm[fn].err=true&amp;gt;&lt;br /&gt;    &amp;lt;/Cfif&amp;gt;&lt;br /&gt;   &amp;lt;/Cfloop&amp;gt;&lt;br /&gt; &lt;br /&gt;   &amp;lt;cfset tickData=arrayNew(1)&amp;gt;&lt;br /&gt;   &amp;lt;Cfloop collection="#this.tcm#" item="fn"&amp;gt;&lt;br /&gt;    &amp;lt;!--- build an array so we can sort the data ---&amp;gt;&lt;br /&gt;    &amp;lt;cfset log=""&amp;gt;&lt;br /&gt;    &amp;lt;cfset log=structNew()&amp;gt;&lt;br /&gt;    &amp;lt;cfset log.fn=fn&amp;gt;&lt;br /&gt;    &amp;lt;cfset log.seq=this.tcm[fn].seq&amp;gt;&lt;br /&gt;    &amp;lt;cfset log.time=this.tcm[fn].start&amp;gt;&lt;br /&gt;    &amp;lt;cfset log.action="start"&amp;gt;&lt;br /&gt;    &amp;lt;cfset arrayAppend(tickData,log)&amp;gt;&lt;br /&gt;    &amp;lt;cfset log=""&amp;gt;&lt;br /&gt;    &amp;lt;cfset log=structNew()&amp;gt;   &lt;br /&gt;    &amp;lt;cfset log.fn=fn&amp;gt;&lt;br /&gt;    &amp;lt;cfset log.seq=this.tcm[fn].seq&amp;gt;&lt;br /&gt;    &amp;lt;cfset log.time=this.tcm[fn].stop&amp;gt;&lt;br /&gt;    &amp;lt;cfset log.action="stop"&amp;gt;&lt;br /&gt;    &amp;lt;cfset arrayAppend(tickData,log)&amp;gt;&lt;br /&gt;   &amp;lt;/Cfloop&amp;gt;&lt;br /&gt;  &lt;br /&gt;   &amp;lt;cfset MovedSomething=1&amp;gt;&lt;br /&gt;   &amp;lt;!--- now sort the data so it can be represented in the order it actually happened---&amp;gt;&lt;br /&gt;   &amp;lt;Cfloop condition="MovedSomething eq 1"&amp;gt;&lt;br /&gt;   &amp;lt;cfset MovedSomething=0&amp;gt;&lt;br /&gt;    &amp;lt;Cfloop from=2 to="#arraylen(tickData)#" index="i"&amp;gt;&lt;br /&gt;     &amp;lt;cfset leftItem=tickData[i-1]&amp;gt;&lt;br /&gt;     &amp;lt;cfset rightItem=tickData[i]&amp;gt;&lt;br /&gt;     &amp;lt;cfif leftItem.time gt rightItem.time&amp;gt;&lt;br /&gt;      &amp;lt;!--- if first item started after 2nd, then swap ---&amp;gt;&lt;br /&gt;      &amp;lt;cfset arraySwap(tickData,i-1,i)&amp;gt;&lt;br /&gt;      &amp;lt;cfset movedSomething=1&amp;gt;&lt;br /&gt;     &amp;lt;Cfelseif leftItem.time eq rightItem.time&amp;gt;&lt;br /&gt;      &amp;lt;!--- They started at same time. ---&amp;gt;  &lt;br /&gt;      &amp;lt;cfif leftItem.action eq rightItem.action&amp;gt;&lt;br /&gt;       &amp;lt;!--- they are both the same action ---&amp;gt;&lt;br /&gt;       &amp;lt;Cfif leftItem.action eq "stop"&amp;gt;&lt;br /&gt;        &amp;lt;!--- they are both EOF ---&amp;gt;&lt;br /&gt;        &amp;lt;Cfif leftItem.seq lt rightItem.seq&amp;gt;&lt;br /&gt;         &amp;lt;!--- assume that the item that started first, stopped last - i.e. nested ---&amp;gt;&lt;br /&gt;         &amp;lt;cfset arraySwap(tickData,i-1,i)&amp;gt;&lt;br /&gt;         &amp;lt;cfset movedSomething=1&amp;gt;&lt;br /&gt;        &amp;lt;/Cfif&amp;gt;&lt;br /&gt;       &amp;lt;Cfelse&amp;gt;&lt;br /&gt;        &amp;lt;!--- they are both SOF ---&amp;gt;&lt;br /&gt;        &amp;lt;Cfif leftItem.seq gt rightItem.seq&amp;gt;&lt;br /&gt;         &amp;lt;!--- move to start seq order---&amp;gt;&lt;br /&gt;         &amp;lt;cfset arraySwap(tickData,i-1,i)&amp;gt;&lt;br /&gt;         &amp;lt;cfset movedSomething=1&amp;gt;&lt;br /&gt;        &amp;lt;/Cfif&amp;gt;&lt;br /&gt;       &amp;lt;/Cfif&amp;gt;&lt;br /&gt;      &amp;lt;Cfelseif leftItem.seq gt rightItem.seq&amp;gt;&lt;br /&gt;       &amp;lt;cfset arraySwap(tickData,i-1,i)&amp;gt;&lt;br /&gt;       &amp;lt;cfset movedSomething=1&amp;gt;&lt;br /&gt;      &amp;lt;/cfif&amp;gt;    &lt;br /&gt;     &amp;lt;/cfif&amp;gt;&lt;br /&gt;    &amp;lt;/Cfloop&amp;gt;&lt;br /&gt;   &amp;lt;/Cfloop&amp;gt;&lt;br /&gt; &lt;br /&gt;  &amp;lt;!--- display it. nest child processes ---&amp;gt;&lt;br /&gt; &amp;lt;cfif this.outputToScreen eq "true"&amp;gt;&lt;br /&gt; &amp;lt;div class="tcm" &amp;gt;&lt;br /&gt;  &amp;lt;div style="background:navy;color:white;padding:5px;"&amp;gt;Dave's TickCounting Machine (tm)&amp;lt;/div&amp;gt;&lt;br /&gt;   &amp;lt;div style="float:left;"&amp;gt;&lt;br /&gt;   &amp;lt;Cfif arrayLen(tickData) neq 0&amp;gt;&lt;br /&gt;    &amp;lt;cfset base=tickData[1].time-1&amp;gt;&lt;br /&gt;    &amp;lt;cfset depth=0&amp;gt;&lt;br /&gt;    &amp;lt;TABLE&amp;gt;&lt;br /&gt;    &amp;lt;Cfloop from=1 to="#arrayLen(tickData)#" index="i"&amp;gt;&lt;br /&gt;     &amp;lt;Cfif tickData[i].action eq "start"&amp;gt;&amp;lt;cfset depth=depth+1&amp;gt;&amp;lt;/Cfif&amp;gt;&lt;br /&gt;     &amp;lt;tr&amp;gt;&lt;br /&gt;      &amp;lt;td&amp;gt;#repeatString("&amp;nbsp;&amp;nbsp;&amp;nbsp;",depth)##tickData[i].fn#&amp;lt;/td&amp;gt;&lt;br /&gt;      &amp;lt;td&amp;gt;(#tickData[i].action#)&amp;lt;/td&amp;gt;&lt;br /&gt;      &amp;lt;td align=right&amp;gt;#tickData[i].time-base#ms&amp;lt;/td&amp;gt;&lt;br /&gt;     &amp;lt;/tr&amp;gt;&lt;br /&gt;     &amp;lt;Cfif tickData[i].action eq "stop"&amp;gt;&amp;lt;cfset depth=depth-1&amp;gt;&amp;lt;/Cfif&amp;gt;&lt;br /&gt;    &amp;lt;/Cfloop&amp;gt;&lt;br /&gt;    &amp;lt;/TABLE&amp;gt;&lt;br /&gt;   &amp;lt;Cfelse&amp;gt;&lt;br /&gt;   No data was recorded for this request&lt;br /&gt;   &amp;lt;/Cfif&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;div style="float:left;padding-left:20px"&amp;gt;&lt;br /&gt;   &amp;lt;strong&amp;gt;How's It Work?&amp;lt;/strong&amp;gt;&lt;br /&gt;   &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;   Simple. &lt;br /&gt;   &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;1. Drop a ##request.tcm.toggleCounter("ID String")## at the point you want to start timing. &lt;br /&gt;   &amp;lt;br&amp;gt;2. Drop a ##request.tcm.toggleCounter("ID String")## at the point you want to end timing.&lt;br /&gt;   &amp;lt;br&amp;gt;3. Relax - Dave's TickCounting Machine (tm) does the rest...&lt;br /&gt;   &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;br style="clear:both"&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/cfif&amp;gt;&lt;br /&gt; &amp;lt;cfif this.outputToLog eq "true"&amp;gt;&lt;br /&gt;  &amp;lt;div class="tcm" &amp;gt;&lt;br /&gt;  &amp;lt;div style="background:navy;color:white;padding:5px;"&amp;gt;Dave's TickCounting Machine (tm)&amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;cfset date=dateformat(now(),"dd-mmm-yyyy")&amp;gt;&lt;br /&gt;  &amp;lt;cfset time=timeformat(now(),"HH:MM:SS")&amp;gt;&lt;br /&gt;  &amp;lt;cfset path_trans=cgi.path_translated&amp;gt;&lt;br /&gt;  &amp;lt;cfset url_path=url.path&amp;gt;&lt;br /&gt;  &lt;br /&gt;   &amp;lt;Cfif arrayLen(tickData) neq 0&amp;gt;&lt;br /&gt;    &amp;lt;Cfloop from=1 to="#arrayLen(tickData)#" index="i"&amp;gt;&lt;br /&gt;     &amp;lt;Cfif tickData[i].action eq "start"&amp;gt;&amp;lt;cfset depth=depth+1&amp;gt;&amp;lt;/Cfif&amp;gt;&lt;br /&gt;      &amp;lt;cfset logrow=""&amp;gt;&lt;br /&gt;      &amp;lt;cfset logRow=listAppend(logRow,date)&amp;gt;&lt;br /&gt;      &amp;lt;cfset logRow=listAppend(logRow,time)&amp;gt;&lt;br /&gt;      &amp;lt;cfset logRow=listAppend(logRow,depth)&amp;gt;&lt;br /&gt;      &amp;lt;cfset logRow=listAppend(logRow,path_trans)&amp;gt;&lt;br /&gt;      &amp;lt;cfset logRow=listAppend(logRow,url_path)&amp;gt;&lt;br /&gt;      &amp;lt;cfset logRow=listAppend(logRow,tickData[i].fn)&amp;gt;&lt;br /&gt;      &amp;lt;cfset logRow=listAppend(logRow,tickData[i].action)&amp;gt;&lt;br /&gt;      &amp;lt;cfset logRow=listAppend(logRow,tickData[i].time-base)&amp;gt;&lt;br /&gt;      &amp;lt;Cffile action="append" file="#expandpath("tcm.log.csv")#" output="#logRow#" addnewline="true" mode="775"&amp;gt;&lt;br /&gt;     &amp;lt;Cfif tickData[i].action eq "stop"&amp;gt;&amp;lt;cfset depth=depth-1&amp;gt;&amp;lt;/Cfif&amp;gt;&lt;br /&gt;    &amp;lt;/Cfloop&amp;gt;&lt;br /&gt;    TCM Data logged to: &amp;lt;a target="_new" href="tcm.log.csv"&amp;gt;#expandpath("tcm.log.csv")#&amp;lt;/a&amp;gt;&lt;br /&gt;   &amp;lt;Cfelse&amp;gt;&lt;br /&gt;    No data was recorded for this request&lt;br /&gt;   &amp;lt;/Cfif&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;  &lt;br /&gt; &amp;lt;/cfif&amp;gt;&lt;br /&gt; &amp;lt;/cfif&amp;gt;&lt;br /&gt; &amp;lt;/cffunction&amp;gt;&lt;br /&gt; &amp;lt;cffunction name="deleteLog" hint="Deletes the log file"&amp;gt;&lt;br /&gt;  &amp;lt;Cffile action="delete" file="#expandpath("tcm.log.csv")#"&amp;gt;&lt;br /&gt; &amp;lt;/cffunction&amp;gt;&lt;br /&gt;&amp;lt;/Cfcomponent&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-148253158466418519?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/148253158466418519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=148253158466418519' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/148253158466418519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/148253158466418519'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2007/02/using-gettickcount-more-effectively-in.html' title='Using GetTickCount() More Effectively in ColdFusion'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-8280418762283854637</id><published>2007-02-19T13:32:00.000Z</published><updated>2007-02-19T13:40:21.758Z</updated><title type='text'>Rant About The Royal Mail</title><content type='html'>&lt;span style="font-family:arial;"&gt;Oh yeah. Before I go I want to have a rant about the Royal Mail.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;I ordered a bunch of stuff for my lovely wife for Valentines last week (hello lovely wife!). One of the things was a box with some balloons and some other bits and pieces (just novelty stuff). For fun.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;The supplier (&lt;/span&gt;&lt;a href="http://www.balloonsbypost.com/"&gt;&lt;span style="font-family:arial;"&gt;http://www.balloonsbypost.com/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; - who incidentally have some great gift balloon packages and will bend over backwards to be helpful - and they're a charity too!)  duly posted everything off in plenty of time. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Whereupon the Royal Mail decided the best thing to do with a "Next Day, Before Midday" package would be to ship it to the wrong hub, leave it in a corner and deliver it almost a week later.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;They finally managed to deliver the package this morning. Rather than the requested last Wednesday. So maybe when they say "next day" they really mean "next monday".&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;So well done Royal Mail. Thanks very much. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;/rant&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-8280418762283854637?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/8280418762283854637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=8280418762283854637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/8280418762283854637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/8280418762283854637'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2007/02/rant-about-royal-mail.html' title='Rant About The Royal Mail'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-6707770426713197478</id><published>2007-02-19T13:29:00.000Z</published><updated>2007-02-19T13:32:31.964Z</updated><title type='text'>Website Habits...</title><content type='html'>Some websites are like crack. You just can't give them up.&lt;br /&gt;&lt;br /&gt;This is my daily list... just in case anybody cares...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.thedailywtf.com"&gt;www.thedailywtf.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.ajaxian.com"&gt;www.ajaxian.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.theregister.co.uk"&gt;www.theregister.co.uk&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.bbc.co.uk/news"&gt;www.bbc.co.uk/news&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.slashdot.org"&gt;www.slashdot.org&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Right. I'll be off. I've got a bunch of other CF and JS stuff to post later, but I'm going to ration it. If I post it all at once I'll have nothing to talk about...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-6707770426713197478?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/6707770426713197478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=6707770426713197478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/6707770426713197478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/6707770426713197478'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2007/02/website-habits.html' title='Website Habits...'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2737381323655320103.post-5052678395816037213</id><published>2007-02-19T12:50:00.000Z</published><updated>2007-02-19T13:16:28.298Z</updated><title type='text'>Cut, Copy &amp; Paste the ColdFusion PageContext Buffer</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;I've been messing about with some localisation stuff lately and I wanted a way to intercept the ColdFusion output buffer so I could mess with it.&lt;br /&gt;&lt;br /&gt;Now I know you can sort of use &amp;lt;CFSAVECONTENT&amp;gt; for that. But it's mildy irritating since it only lets you use it on a single page. You can’t (for example) start it on one template and end it on another. Tsk!&lt;br /&gt;&lt;br /&gt;So what I needed was a solution. &lt;span style=""&gt; &lt;/span&gt;After much poking things with sticks (metaphorical sticks) I found the answer I was looking for.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;I’ve knocked up a CFC that gives the ability to manipulate the contents of the output buffer of ColdFusion exposing the following methods: -&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0cm;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: Arial;"&gt;Cut(&lt;i style=""&gt;item&lt;/i&gt;)      – Write the buffer contents to variable named &lt;i style=""&gt;item&lt;/i&gt; and clear the buffer.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: Arial;"&gt;Copy(&lt;i style=""&gt;item&lt;/i&gt;)      – Write the buffer contents to variable named &lt;i style=""&gt;item&lt;/i&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: Arial;"&gt;Paste(&lt;i style=""&gt;item&lt;/i&gt;)      – Past the contents of variable named &lt;i style=""&gt;item&lt;/i&gt;      into the buffer.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: Arial;"&gt;Get(&lt;i style=""&gt;item&lt;/i&gt;)      – Get the contents of variable named &lt;i style=""&gt;item&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: Arial;"&gt;Put(&lt;i style=""&gt;item&lt;/i&gt;)      – Update the contents of variable named &lt;i style=""&gt;item&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-family: Arial;"&gt;Clear() – Clear the buffer.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;Here’s the code: -&lt;br /&gt;&lt;br /&gt;Buffer.cfc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoTableGrid" style="border: medium none ; background: rgb(243, 243, 243) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; border-collapse: collapse;" border="1" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 426.1pt;" valign="top" width="568"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&amp;lt;cfcomponent   name="buffer" hint="Tools for messing with the ColdFusion   string buffer"&amp;gt;&lt;br /&gt;      &amp;lt;cffunction name="init" hint="I   initialise the cfc"&amp;gt;&lt;br /&gt;          &amp;lt;cfset   this.capturedBuffers=structNew()&amp;gt;&lt;br /&gt;          &amp;lt;cfreturn this&amp;gt;&lt;br /&gt;      &amp;lt;/cffunction&amp;gt;&lt;br /&gt; &lt;br /&gt;      &amp;lt;cffunction name="copy" hint="Copy contents   of the buffer to the named item"&amp;gt;&lt;br /&gt;          &amp;lt;Cfargument name="target"   type="string" default="clipboard" hint="Item to copy   to. Default is clipboard."&amp;gt;&lt;br /&gt;          &amp;lt;cfset   tmpBuffer=GetPageContext().getOut().getBuffer().toString()&amp;gt;&lt;br /&gt;          &amp;lt;cfset   this.capturedBuffers[arguments.target]=duplicate(tmpBuffer)&amp;gt;&lt;br /&gt;      &amp;lt;/cffunction&amp;gt;&lt;br /&gt; &lt;br /&gt;      &amp;lt;cffunction name="paste" hint="Paste   the selected buffer item to the output stream"&amp;gt;&lt;br /&gt;          &amp;lt;Cfargument   name="source" type="string" default="clipboard"&amp;gt;&lt;br /&gt;          &amp;lt;cfoutput&amp;gt;#this.capturedBuffers[arguments.source]#&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;      &amp;lt;/cffunction&amp;gt;&lt;br /&gt; &lt;br /&gt;      &amp;lt;cffunction name="cut" hint="Cut contents   of the buffer to the named item"&amp;gt;&lt;br /&gt;          &amp;lt;Cfargument   name="target" type="string" default="clipboard"&amp;gt;&lt;br /&gt;          &amp;lt;cfset   tmpBuffer=GetPageContext().getOut().getBuffer().toString()&amp;gt;&lt;br /&gt;          &amp;lt;cfset this.capturedBuffers[arguments.target]=duplicate(tmpBuffer)&amp;gt;&lt;br /&gt;          &amp;lt;cfset this.clear()&amp;gt;&lt;br /&gt;      &amp;lt;/cffunction&amp;gt;&lt;br /&gt; &lt;br /&gt;      &amp;lt;cffunction name="get" hint="Returns   the contents of the named buffer item"&amp;gt;&lt;br /&gt;          &amp;lt;Cfargument   name="source" type="string" default="clipboard"&amp;gt;&lt;br /&gt;          &amp;lt;cfreturn   this.capturedBuffers[arguments.source]&amp;gt;&lt;br /&gt;      &amp;lt;/cffunction&amp;gt;&lt;br /&gt; &lt;br /&gt;      &amp;lt;cffunction name="put" hint="Overwrites   the contents of the named buffer item"&amp;gt;&lt;br /&gt;          &amp;lt;Cfargument   name="content" type="string" default=""   required=true&amp;gt;&lt;br /&gt;          &amp;lt;Cfargument   name="target" type="string" default="clipboard"&amp;gt;&lt;br /&gt;          &amp;lt;cfset   this.capturedBuffers[arguments.target]=arguments.content&amp;gt;&lt;br /&gt;      &amp;lt;/cffunction&amp;gt;&lt;br /&gt;     &lt;br /&gt;      &amp;lt;cffunction name="clear" hint="Resets   the buffer"&amp;gt;&lt;br /&gt;          &amp;lt;Cfcontent reset="yes"&amp;gt;&lt;br /&gt;      &amp;lt;/cffunction&amp;gt;&lt;br /&gt;  &amp;lt;/cfcomponent&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;So, how do I use this buffer.cfc thing? - Here’s an example&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoTableGrid" style="border: medium none ; background: rgb(243, 243, 243) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; border-collapse: collapse;" border="1" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 426.1pt;" valign="top" width="568"&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: gray;"&gt;&amp;lt;!--- create the cfc ---&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;lt;cfset&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt; bufferObj=&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(0, 0, 102);"&gt;createObject&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;(&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;"component"&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;,&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;"buffer"&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;).init()&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: gray;"&gt;&amp;lt;!--- clear the buffer ---&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;lt;cfset&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt; bufferObj.clear()&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: gray;"&gt;&amp;lt;!--- output some text ---&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Lorem ipsum   dolor sit amet, consectetuer adipiscing elit. &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: gray;"&gt;&amp;lt;!--- cut the text from the output buffer ---&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;lt;cfset&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt; bufferObj.cut(&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;"firstBit"&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;)&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: gray;"&gt;&amp;lt;!--- output some more text ---&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Lorem Ipsum is   simply dummy text of the printing and typesetting industry.&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: gray;"&gt;&amp;lt;!--- cut the text from the output buffer ---&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;lt;cfset&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt; bufferObj.cut(&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;"secondBit"&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;)&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: gray;"&gt;&amp;lt;!--- Retrieve the "secondBit" from the cfc,   bold all the e characters, update the cfc data---&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;lt;cfset&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;   tmpText=bufferObj.get(&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;"secondBit"&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;)&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;lt;cfset&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt; tmpTextp=&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(0, 0, 102);"&gt;replace&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;(tmpText,&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;"e"&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;,&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;"&amp;lt;strong&amp;gt;e&amp;lt;/strong&amp;gt;"&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;,&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;"all"&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;)&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;lt;cfset&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;   bufferObj.put(tmpText,&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;"secondBit"&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;)&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: gray;"&gt;&amp;lt;!--- Paste secondBit and firstBit back into the stream -   but in reverse order ---&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;lt;cfset&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt; bufferObj.paste(&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;"secondBit"&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;)&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;lt;cfset&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt; bufferObj.paste(&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: blue;"&gt;"firstBit"&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: black;"&gt;)&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: maroon;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Arial;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2737381323655320103-5052678395816037213?l=tales-of-coldfusion.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tales-of-coldfusion.blogspot.com/feeds/5052678395816037213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2737381323655320103&amp;postID=5052678395816037213' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/5052678395816037213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2737381323655320103/posts/default/5052678395816037213'/><link rel='alternate' type='text/html' href='http://tales-of-coldfusion.blogspot.com/2007/02/cut-copy-paste-coldfusion-pagecontext.html' title='Cut, Copy &amp; Paste the ColdFusion PageContext Buffer'/><author><name>Dave</name><uri>http://www.blogger.com/profile/09020000098767164810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
