<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Thinking Lemur &#187; Programming</title>
	<atom:link href="http://thinkinglemur.com/index.php/category/thinking/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinkinglemur.com</link>
	<description>from the mind of Donnie Bachan</description>
	<lastBuildDate>Fri, 06 Jan 2012 10:42:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Column formats in  CFSpreadsheet</title>
		<link>http://thinkinglemur.com/index.php/2011/05/column-formats-in-cfspreadsheet/</link>
		<comments>http://thinkinglemur.com/index.php/2011/05/column-formats-in-cfspreadsheet/#comments</comments>
		<pubDate>Fri, 06 May 2011 00:22:46 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=449</guid>
		<description><![CDATA[I really like the spreadsheet functions added to ColdFusion 9. It makes my life so much easier but I discovered an annoyance with the spreadsheetFormatColumn function today. It would seem that you have to set the column formats after you add data to a spreadsheet. If you attempt to set it before calling spreadsheetAddRows it [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2011%2F05%2Fcolumn-formats-in-cfspreadsheet%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2011%2F05%2Fcolumn-formats-in-cfspreadsheet%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I really like the spreadsheet functions added to ColdFusion 9. It makes my life so much easier but I discovered an annoyance with the spreadsheetFormatColumn function today. It would seem that you have to set the column formats after you add data to a spreadsheet. If you attempt to set it before calling spreadsheetAddRows it will set the column format to default. Not cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2011/05/column-formats-in-cfspreadsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Railo 3.2 + Tomcat + Mac Snow Leopard + Permission Denied</title>
		<link>http://thinkinglemur.com/index.php/2011/04/railo-3-2-tomcat-mac-snow-leopard-permission-denied/</link>
		<comments>http://thinkinglemur.com/index.php/2011/04/railo-3-2-tomcat-mac-snow-leopard-permission-denied/#comments</comments>
		<pubDate>Sun, 24 Apr 2011 21:09:05 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=430</guid>
		<description><![CDATA[I've finally started playing with Railo and tried installing it on my Mac with Snow Leopard installed. I wasn't able to get it to run initially but had to make two quick changes to get it running: Give the current user (the user under which you are currently logged in) Read + Write access to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2011%2F04%2Frailo-3-2-tomcat-mac-snow-leopard-permission-denied%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2011%2F04%2Frailo-3-2-tomcat-mac-snow-leopard-permission-denied%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I've finally started playing with Railo and tried installing it on my Mac with Snow Leopard installed. I wasn't able to get it to run initially but had to make two quick changes to get it running:</p>
<ol>
<li>Give the current user (the user under which you are currently logged in) Read + Write access to the entire<strong>*</strong> Railo folder, including all the sub folders.</li>
<li>Change the default port for Tomcat from port 80, to port 8080 since I already had Apache running on port 80. To change the port, edit /Railo/Tomcat/conf/server.xml and change the connector port.</li>
</ol>
<p>I have largely ignored Railo in the past but I am really eager to play around with it and get some stuff deployed on this platform.</p>
<p>* Note that I am using Railo in a development environment so I gave full Read + Write access to the <em><strong>entire</strong></em> Railo folder, in a production set up this would definitely not be a wise thing to do. I don't think this would be a problem in most development environments since the user under which Tomcat would be running would usually have the correct permissions.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2011/04/railo-3-2-tomcat-mac-snow-leopard-permission-denied/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IE 7/8 PNG-24 transparency issue</title>
		<link>http://thinkinglemur.com/index.php/2010/06/ie-78-png-24-transparency-issue/</link>
		<comments>http://thinkinglemur.com/index.php/2010/06/ie-78-png-24-transparency-issue/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 11:12:47 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=384</guid>
		<description><![CDATA[We came across an error today with our drop down menu system that uses a PNG-24 semi transparent drop shadow image around the border where the transparency would appear black in IE 7 and IE 8. After searching and trying all possible fixes we found the solution to the problem and it was quite simple. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2010%2F06%2Fie-78-png-24-transparency-issue%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2010%2F06%2Fie-78-png-24-transparency-issue%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>We came across an error today with our drop down menu system that uses a PNG-24 semi transparent drop shadow image around the border where the transparency would appear black in IE 7 and IE 8. After searching and trying all possible fixes we found the solution to the problem and it was quite simple.</p>
<p>Our menu system uses jQuery (doesn't everything these days?), and had a nice fade in and fade out transition. jQuery handles the fade transitions by setting the opacity which IE does not like very much. So using the fadeTo() functions in jQuery is a no-no in IE. The solution, use hide() and show() instead. It's not as elegant but the transparency issue was fixed on all modern browsers.</p>
<p>Other solutions to the problem include:</p>
<p>1. Using a background colour instead of transparent on the style so you would do:</p>
<blockquote><p>.my-transparent-stuff{background: #fff url('image.png') repeat-y scroll left top;}</p>
<p>instead of</p>
<p>.my-transparent-stuff{background: transparent url('image.png') repeat-y scroll left top;}</p></blockquote>
<p>2. Using PNG-8/transparent gifs (hey, it's a solution)</p>
<p>3. Forcing IE8 into IE7 mode by adding the following meta tag:</p>
<blockquote><p>&lt;meta http-equiv="X-UA-Compatible" content="IE=7" /&gt;</p></blockquote>
<p>I still can't understand what Microsoft is doing!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2010/06/ie-78-png-24-transparency-issue/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Memory leaks with Coldfusion 8</title>
		<link>http://thinkinglemur.com/index.php/2010/02/memory-leaks-with-coldfusion-8/</link>
		<comments>http://thinkinglemur.com/index.php/2010/02/memory-leaks-with-coldfusion-8/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 14:58:44 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[ColdFusion 8]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[memory leaks]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=368</guid>
		<description><![CDATA[For the past few weeks I've been incognito due to some memory leak issues we've been having with our new app. It is essentially a rewrite of our existing web application using Object Oriented techniques and embraces the Model-View-Controller paradigm. It really is a pretty little thing but unfortunately she crumbled under the weight of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2010%2F02%2Fmemory-leaks-with-coldfusion-8%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2010%2F02%2Fmemory-leaks-with-coldfusion-8%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>For the past few weeks I've been incognito due to some memory leak issues we've been having with our new app. It is essentially a rewrite of our existing web application using Object Oriented techniques and embraces the Model-View-Controller paradigm. It really is a pretty little thing but unfortunately she crumbled under the weight of the world wide web. Anyone who has faced the memory leak problem will know that it is not an easy one to crack and it takes time to determine the exact issue. There are a lot of articles around that have excellent information which were all very helpful in my quest for a solution.</p>
<p>The system made a lot of use of the session and application scope for caching objects which was the first issue that we had to overcome. It seemed like a good idea, you've got loads of memory, you have a finite amount of objects that can be called for each session why not persist them. The problem is that ColdFusion 8 seems to have an issue with complex objects (i.e. CFCs) stored in the session and application scopes. The reason I say this is that we were seeing a very, very strange thing happening to the memory on our server. When load testing was run, the server was fine, the memory steadily increased until the initial sessions began expiring and then the average of memory usage plateaued, which is what you like to see. However, once the load test ended the memory steadily increased until it crashed the CF instance. Weird right? And so the search for a solution began. I came across a few helpful articles:</p>
<p><a href="http://www.ghidinelli.com/2009/07/16/finding-memory-leaks-coldfusion-jvm">http://www.ghidinelli.com/2009/07/16/finding-memory-leaks-coldfusion-jvm</a></p>
<p><a href="http://www.schierberl.com/cfblog/index.cfm/2006/10/12/ColdFusion_memoryLeak_profiler">http://www.schierberl.com/cfblog/index.cfm/2006/10/12/ColdFusion_memoryLeak_profiler</a></p>
<p><a href="http://www.alagad.com/blog/post.cfm/troubleshooting-coldfusion-performance-analysis-part-ii">http://www.alagad.com/blog/post.cfm/troubleshooting-coldfusion-performance-analysis-part-ii</a></p>
<p>These were tremendously helpful in assisting me in finding the solution. The last post from Alagad was the one that helped cure my issue in the end. You need to ensure that when making copies of persistent scoped variables that they are deep copied or used in a local scope within CFC functions. However, bear in mind that there are many causes for memory leaks and you should spend the time in figuring out the exact cause of your problem. I found the <a href="http://www.eclipse.org/mat/" target="_blank">MAT</a> tool supremely useful.</p>
<p>Here are some tips for curing memory issues:</p>
<ol>
<li>Install cumulative hotfix 4 for ColdFusion 8.0.1 (Get it <a href="http://kb2.adobe.com/cps/529/cpsid_52915.html" target="_blank">here</a>)</li>
<li>Update the JVM to the latest provided by Sun, in my case it was JDK 1.6.0_18 (Get it <a href="http://java.sun.com/javase/downloads/index.jsp" target="_self">here</a>)</li>
<li>Add the -XX:+<em>AggressiveHeap</em> option to the JVM configuration (Read about it <a href="http://www.petefreitag.com/item/139.cfm" target="_blank">here</a>)</li>
<li>Set your min and max heap to the same size to reduce the number of garbage collection calls</li>
<li>Run varscoper against your code and ensure all local variables are var scoped (Get it <a href="http://varscoper.riaforge.org/" target="_blank">here</a>)</li>
<li>Limit the use of variables scope within objects, use the THIS reference instead</li>
<li>Limit the number of complex objects (cfcs) being stored in SESSION and APPLICATION scopes</li>
<li>Clear the variables scope onRequestEnd (this doesn't really work when using Application.cfc though)</li>
<li>Run load tests! We used WCAT for Windows (Get it <a href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;i=1466&amp;g=6" target="_blank">here</a>)</li>
<li>Turn off CF monitoring use FusionReactor (or something similar) (Get FusionReactor <a href="http://www.fusion-reactor.com/" target="_blank">here</a>)</li>
</ol>
<p>Hopefully these will help someone else going forward.</p>
<p>UPDATE 16/05/2010: Point #6 should be, ensure you scope your variables correctly. The THIS scope has its own set of limitations. Ensure that all variables (including loop indices) have the proper scope to avoid leakage.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2010/02/memory-leaks-with-coldfusion-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSON format and serializing ColdFusion query objects</title>
		<link>http://thinkinglemur.com/index.php/2010/01/json-serialize-coldfusion-quer/</link>
		<comments>http://thinkinglemur.com/index.php/2010/01/json-serialize-coldfusion-quer/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 20:25:52 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Thinking]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=343</guid>
		<description><![CDATA[Every so often there is a tiny problem that has you scratching your head until you RTFM. I love JSON, it's totally awesome and the fact that you can not convert CF objects natively is even better! I ran into a small issue where I was using serializeJSON on a structure that contained a query [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2010%2F01%2Fjson-serialize-coldfusion-quer%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2010%2F01%2Fjson-serialize-coldfusion-quer%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Every so often there is a tiny problem that has you scratching your head until you RTFM. I love <a href="http://bit.ly/wRcjs" target="_blank">JSON</a>, it's totally awesome and the fact that you can not convert CF objects natively is even better! I ran into a small issue where I was using serializeJSON on a structure that contained a query object (don't ask!). The problem was when the serialized string was deserialized using deserializeJSON the query was no longer a query, it was not a structure!  It turns out that the serializeJSON function takes <strong>two</strong> parameters!</p>
<pre class="cfm"><span style="color: #0000FF;">#SerializeJSON<span style="color: #0000FF;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span><span style="color: #0000FF;">&#91;</span>, serializeQueryByColumns<span style="color: #0000FF;">&#93;</span><span style="color: #0000FF;">&#41;</span>#</span></pre>
<p>The second optional parameter <em>serializeQueryByColumns </em>tells CF to handle queries in a special way. Now the trick is to remember to use the <strong>second</strong> parameter of the DeserializeJSON function which performs the reverse operation. The second parameter must be set to <strong>false</strong> for the query object to be recreated during deserialization.</p>
<p>Here are links to the <a href="http://bit.ly/8IYMN5" target="_blank">serializeJSON</a> and <a href="http://bit.ly/8IYMN5" target="_blank">deserializeJSON</a> in LiveDocs.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2010/01/json-serialize-coldfusion-quer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authorize.net AIM osCommerce Payment Issue</title>
		<link>http://thinkinglemur.com/index.php/2009/12/authorizenet-aim-oscommerce-payment-issue/</link>
		<comments>http://thinkinglemur.com/index.php/2009/12/authorizenet-aim-oscommerce-payment-issue/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 22:35:34 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[E-commerce]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Authorize.net]]></category>
		<category><![CDATA[osCommerce]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=245</guid>
		<description><![CDATA[This has to be one of the most irritating issues I've come across in some time. Using any of the Authorize.net AIM modules for osCommerce 2.2 the customer would consistently be sent back to the Payment Details page with an error: There has been an error processing your credit card It seems that many people [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F12%2Fauthorizenet-aim-oscommerce-payment-issue%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F12%2Fauthorizenet-aim-oscommerce-payment-issue%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This has to be one of the most irritating issues I've come across in some time. Using any of the Authorize.net AIM modules for osCommerce 2.2 the customer would consistently be sent back to the Payment Details page with an error:</p>
<blockquote><p>There has been an error processing your credit card</p></blockquote>
<p>It seems that many people have been having this issue and there are many different possible solutions to the problem. The solution to this problem was found in this post: <a href="http://forums.oscommerce.com/index.php?showtopic=293398&amp;pid=1309060&amp;start=&amp;st=#entry1309060">http://forums.oscommerce.com/index.php?showtopic=293398&amp;pid=1309060&amp;start=&amp;st=#entry1309060</a></p>
<p>Basically, the MD5 Hash needs to be 80 bits and not 128 bits. I generated the MD5 hash as I normally do and pasted it into Authorize.net without realizing that the text was truncated and only the first 20 characters of my hash was actually stored. Authorize.net does not display this hash so you won't ever notice it in there. This is a VERY simple fix that has given me a headache for a couple of days. Hope this is helpful to someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2009/12/authorizenet-aim-oscommerce-payment-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s been a while</title>
		<link>http://thinkinglemur.com/index.php/2009/12/its-been-a-while/</link>
		<comments>http://thinkinglemur.com/index.php/2009/12/its-been-a-while/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 10:11:48 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=243</guid>
		<description><![CDATA[I've not posted anything on my blog for a while, it always amazes me how the top bloggers in the ColdFusion world find the time to post almost daily about tips, tricks, resources and I hardly every find the time to write a note to myself. My posts don't seem as interesting or as insightful [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F12%2Fits-been-a-while%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F12%2Fits-been-a-while%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I've not posted anything on my blog for a while, it always amazes me how the top bloggers in the ColdFusion world find the time to post almost daily about tips, tricks, resources and I hardly every find the time to write a note to myself. My posts don't seem as interesting or as insightful as some of the ones posted by the CF elite. I do thank them for their great posts and continued support of the ColdFusion community.</p>
<p>I've been working on a website recently that has soaked up all of my time. I've been having some problems with memory leaks and JVM tuning but I think I've finally found solutions to my problems and will be posting them in a separate article shortly which will hopefully help someone out there.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2009/12/its-been-a-while/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix/Int (Floor) function oddity in ColdFusion 8</title>
		<link>http://thinkinglemur.com/index.php/2009/07/fixint-floor-function-oddity-in-coldfusion-8/</link>
		<comments>http://thinkinglemur.com/index.php/2009/07/fixint-floor-function-oddity-in-coldfusion-8/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 14:10:51 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ColdFusion 8]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=238</guid>
		<description><![CDATA[I've discovered an odd little "bug" in the Fix and Int functions in ColdFusion 8. The Fix/Int functions work similarly to the Floor function in other languages: According to the ColdFusion 8 LiveDocs Int - Calculates the closest integer that is smaller than number. For example, it returns 3 for Int(3.3) and for Int(3.7); it returns [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F07%2Ffixint-floor-function-oddity-in-coldfusion-8%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F07%2Ffixint-floor-function-oddity-in-coldfusion-8%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I've discovered an odd little "bug" in the Fix and Int functions in ColdFusion 8. The Fix/Int functions work similarly to the Floor function in other languages:</p>
<p>According to the ColdFusion 8 LiveDocs</p>
<p>Int - Calculates the closest integer that is smaller than number. For example, it returns 3 for Int(3.3) and for Int(3.7); it returns -4 for Int(-3.3) and for Int(-3.7)</p>
<p>Fix - Converts a real number to an integer. If number is greater than or equal to 0, the closest integer less than or equal to number. If number is less than 0, the closest integer greater than or equal to number.</p>
<p>Now, if you do #Fix(15)# or #Int(15)# the functions return the correct value of 15. However if you do #Fix((6.84/45.60) * 100)# or #Int((6.84/45.60) * 100)# the functions return 14 which is incorrect since the equation equates to 15.</p>
<p>Bug or Feature?</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2009/07/fixint-floor-function-oddity-in-coldfusion-8/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Assigning the return value of new by reference is deprecated</title>
		<link>http://thinkinglemur.com/index.php/2009/07/assigning-the-return-value-of-new-by-reference-is-deprecated/</link>
		<comments>http://thinkinglemur.com/index.php/2009/07/assigning-the-return-value-of-new-by-reference-is-deprecated/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 12:20:18 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=236</guid>
		<description><![CDATA[I recently upgraded to PHP 5.3.0 after having some issues with FASTCGI and 5.2.x on Windows but the moment I did this I started getting numerous warnings. The one that appeared the most was: Assigning the return value of new by reference is deprecated Apparently in PHP5 all objects are passed as reference and 5.3.0 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F07%2Fassigning-the-return-value-of-new-by-reference-is-deprecated%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F07%2Fassigning-the-return-value-of-new-by-reference-is-deprecated%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I recently upgraded to PHP 5.3.0 after having some issues with FASTCGI and 5.2.x on Windows but the moment I did this I started getting numerous warnings. The one that appeared the most was:</p>
<blockquote><p>Assigning the return value of new by reference is deprecated</p></blockquote>
<p>Apparently in PHP5 all objects are passed as reference and 5.3.0 formally deprecated the feature, which has forced me to turn off error reporting until I can update my code (including WordPress!).</p>
<p>So basically the problem is that traditionally objects would be passed by value and you had to explicitly declare when you wanted the object to be passed by reference. So for instance, an overly simplified example would be:</p>
<pre name="code" class="php">
class myClass{
    public $temp = array();

    function __construct(){
         $this->temp = array[1,2,3,4];
    }
}

$someArray = & new myClass();
</pre>
<p>The <strong>&amp;</strong> sign tells PHP to return the value as a reference. In PHP 5.3.0 you don't need to specify the <strong>&amp;</strong>.</p>
<p>It's a small change but it has HUGE impact!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2009/07/assigning-the-return-value-of-new-by-reference-is-deprecated/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CFPOP and SSL</title>
		<link>http://thinkinglemur.com/index.php/2009/04/cfpop-and-ssl/</link>
		<comments>http://thinkinglemur.com/index.php/2009/04/cfpop-and-ssl/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 11:05:40 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[CFPOP]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=220</guid>
		<description><![CDATA[One of the reasons I love Adobe's ColdFusion so much is the fact that it is built on a Java engine and you are able to use a lot of the powerful features of Java from CF. I however don't get to use this feature often enough, mainly because most of the things I work [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F04%2Fcfpop-and-ssl%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F04%2Fcfpop-and-ssl%2F&amp;source=thinkinglemur&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>One of the reasons I love Adobe's ColdFusion so much is the fact that it is built on a Java engine and you are able to use a lot of the powerful features of Java from CF. I however don't get to use this feature often enough, mainly because most of the things I work on daily doesn't really need anything other than what is provided by the CF natively. And, well, as with anything without practice your skills get dull, so when I had to access a mailbox that is hosted by Gmail using CFPOP I was forced to turn to Google to find a solution.</p>
<p>CFPOP does not support SSL/TLS connections as of version 8, which is quite a big limitation since so many services now support SSL for POP connections. There are quite a few options for work arounds for this but the simplest and quite elegant solution is the one provided by <a href="http://www.anujgakhar.com/2008/05/18/cfpop-and-gmail/">Anuj Gakhar</a>. This solution uses the underlying Java pop service which does support SSL.</p>
<blockquote><p> </p>
<p>&lt;cfset javaSystem = createObject("java", "java.lang.System") /&gt;</p>
<p>&lt;cfset jProps = javaSystem.getProperties() /&gt;</p>
<p> </p>
<p>&lt;cfset jProps.setProperty("mail.pop3.socketFactory.class", "javax.net.ssl.SSLSocketFactory") /&gt;</p>
<p><span> </span>&lt;cfset jProps.setproperty("mail.pop3.port", variables.popPort) /&gt;</p>
<p><span> </span>&lt;cfset jProps.setProperty("mail.pop3.socketFactory.port", variables.popPort) /&gt;</p>
<p> </p>
<p> </p></blockquote>
<p>Set variables.popPort to the port on which your POP server is accessed. You then call the CFPOP tag as you would normally:</p>
<blockquote><p>&lt;cfpop action="getHeaderOnly"</p>
<p>            server="#variables.popServer#"</p>
<p>            port="#variables.popPort#"</p>
<p>            username="#variables.popUsername#"</p>
<p>            password="#variables.popPassword#"</p>
<p>            maxrows="5"</p>
<p>            timeout="60"</p>
<p>            name="variables.popRecords" /&gt;</p></blockquote>
<p>The underlying Java platform can allow you to perform many tasks that may not be available in ColdFusion, so why not do some experiments?</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2009/04/cfpop-and-ssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

