<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.2" -->
<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/"
	>

<channel>
	<title>if you want something done right... DIY.</title>
	<link>http://krisgale.com</link>
	<description>meanderings of a computer scientist on the brink of sheer insanity.</description>
	<pubDate>Thu, 12 Apr 2012 19:47:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>
	<language>en</language>
			<item>
		<title>using array_search instead of nested ternary `?` operators</title>
		<link>http://krisgale.com/using-array_search-instead-of-multiple-ternary-operators/</link>
		<comments>http://krisgale.com/using-array_search-instead-of-multiple-ternary-operators/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 19:42:33 +0000</pubDate>
		<dc:creator>krisgale</dc:creator>
		
		<category><![CDATA[syntax]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://krisgale.com/using-array_search-instead-of-multiple-ternary-operators/</guid>
		<description><![CDATA[$n = 1;
echo ( $n == 1 ? "1st" : ( $n == 2 ? "2nd" : "" ) ) . "\n";
// "1st"
$n = 2;
echo array_search( $n, array( '1st' => 1, '2nd' => 2 ) ) . "\n";
// "2nd"
]]></description>
			<content:encoded><![CDATA[<p><code>$n = 1;<br />
echo ( $n == 1 ? "1st" : ( $n == 2 ? "2nd" : "" ) ) . "\n";<br />
// "1st"<br />
$n = 2;<br />
echo array_search( $n, array( '1st' => 1, '2nd' => 2 ) ) . "\n";<br />
// "2nd"</code></p>
]]></content:encoded>
			<wfw:commentRss>http://krisgale.com/using-array_search-instead-of-multiple-ternary-operators/feed/</wfw:commentRss>
		</item>
		<item>
		<title>dislike the syntax for accessing nested elements in associative arrays?</title>
		<link>http://krisgale.com/dislike-the-syntax-for-accessing-nested-elements-associative-arrays/</link>
		<comments>http://krisgale.com/dislike-the-syntax-for-accessing-nested-elements-associative-arrays/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 18:50:05 +0000</pubDate>
		<dc:creator>krisgale</dc:creator>
		
		<category><![CDATA[syntax]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://krisgale.com/dislike-the-syntax-for-accessing-nested-elements-associative-arrays/</guid>
		<description><![CDATA[here&#8217;s how to effectively convert it to an object (stdClass) and use the object property syntax instead&#8230;
$a = array( 'one' =&#62; array( 'number' =&#62; 1, 'ordinal' =&#62; '1st' ) );
echo $a[ 'one' ][ 'number' ] . "\n";
$o = json_decode( json_encode( $a ) );
echo $o-&#62;one-&#62;ordinal . "\n";
]]></description>
			<content:encoded><![CDATA[<p>here&#8217;s how to effectively convert it to an object (stdClass) and use the object property syntax instead&#8230;</p>
<p><code>$a = array( 'one' =&gt; array( 'number' =&gt; 1, 'ordinal' =&gt; '1st' ) );<br />
echo $a[ 'one' ][ 'number' ] . "\n";<br />
$o = json_decode( json_encode( $a ) );<br />
echo $o-&gt;one-&gt;ordinal . "\n";</code></p>
]]></content:encoded>
			<wfw:commentRss>http://krisgale.com/dislike-the-syntax-for-accessing-nested-elements-associative-arrays/feed/</wfw:commentRss>
		</item>
		<item>
		<title>fread() without $length causes internal server error</title>
		<link>http://krisgale.com/fread-without-length-causes-internal-server-error/</link>
		<comments>http://krisgale.com/fread-without-length-causes-internal-server-error/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 20:22:07 +0000</pubDate>
		<dc:creator>krisgale</dc:creator>
		
		<category><![CDATA[oddities]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://krisgale.com/fread-without-length-causes-internal-server-error/</guid>
		<description><![CDATA[and here i thought php would supply a default value for the second parameter to fread(), namely the number of bytes to be read from an open file handle (that being the first parameter). nope! not only does this quietly surpass php&#8217;s syntax check, it causes an internal server error thus creating quite the air [...]]]></description>
			<content:encoded><![CDATA[<p>and here i thought php would supply a default value for the second parameter to fread(), namely the number of bytes to be read from an open file handle (that being the first parameter). nope! not only does this quietly surpass php&#8217;s syntax check, it causes an internal server error thus creating quite the air of mystery as to what went wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://krisgale.com/fread-without-length-causes-internal-server-error/feed/</wfw:commentRss>
		</item>
		<item>
		<title>sitepoint&#8217;s twitter-giveaway: interesting myisam vs. innodb case study</title>
		<link>http://krisgale.com/sitepoints-twitter-giveaway-interesting-myisam-vs-innodb-case-study/</link>
		<comments>http://krisgale.com/sitepoints-twitter-giveaway-interesting-myisam-vs-innodb-case-study/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 21:32:33 +0000</pubDate>
		<dc:creator>krisgale</dc:creator>
		
		<category><![CDATA[best practice]]></category>

		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://krisgale.com/sitepoints-twitter-giveaway-interesting-myisam-vs-innodb-case-study/</guid>
		<description><![CDATA[sitepoint recently discovered when and why row-level locking (as opposed to table-level) is sometimes a must-have&#8230;
http://www.sitepoint.com/blogs/2009/09/08/free-performance-with-mysql-table-types/
]]></description>
			<content:encoded><![CDATA[<p>sitepoint recently discovered when and why row-level locking (as opposed to table-level) is sometimes a must-have&#8230;</p>
<p><a href="http://www.sitepoint.com/blogs/2009/09/08/free-performance-with-mysql-table-types/" target="_blank">http://www.sitepoint.com/blogs/2009/09/08/free-performance-with-mysql-table-types/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://krisgale.com/sitepoints-twitter-giveaway-interesting-myisam-vs-innodb-case-study/feed/</wfw:commentRss>
		</item>
		<item>
		<title>payflow pro critical update 9/1</title>
		<link>http://krisgale.com/payflow-pro-critical-update-91/</link>
		<comments>http://krisgale.com/payflow-pro-critical-update-91/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 03:54:04 +0000</pubDate>
		<dc:creator>krisgale</dc:creator>
		
		<category><![CDATA[ecommerce]]></category>

		<category><![CDATA[web hosting]]></category>

		<guid isPermaLink="false">http://krisgale.com/payflow-pro-critical-update-91/</guid>
		<description><![CDATA[for those of you out there charged with developing/maintaining ecommerce sites using verisign/paypal’s “payflow pro” interface, be aware that as of september 1st (yes, three weeks away) older versions of their sdk will no longer be supported.
information about the upgrade (and instructions on how to perform the required code changes to your site(s)) can be [...]]]></description>
			<content:encoded><![CDATA[<p class="formatted_text_body">for those of you out there charged with developing/maintaining ecommerce sites using verisign/paypal’s “payflow pro” interface, be aware that as of september 1st (yes, three weeks away) older versions of their sdk will no longer be supported.</p>
<p>information about the upgrade (and instructions on how to perform the required code changes to your site(s)) can be found here:</p>
<p><a href="http://integrationwizard.x.com/sdkupdate/step1.php">http://integrationwizard.x.com/sdkupdate/step1.php</a></p>
<p>good luck.</p>
<p>p.s. this might be a good opportunity to switch to authorizenet since the newer payflow pro sdk uses Very Similar ‘silent’ https post’s to/from the gateway server (as opposed to an intermediary native-code binary in older versions) and might even save you/your client(s) some money, since the two gateways&#8217; pricing structures vary when it comes to per-transaction fees and minimum/maximum sales volume thresholds. have that conversation with your merchant services provider.</p>
]]></content:encoded>
			<wfw:commentRss>http://krisgale.com/payflow-pro-critical-update-91/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

