<?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>Michael&#039;s Blog &#187; General Rambling</title>
	<atom:link href="http://www.michaeltozzo.com/blog/category/generalrambling/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michaeltozzo.com/blog</link>
	<description>More marklar for your marklar.</description>
	<lastBuildDate>Tue, 17 Jan 2012 17:13:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Lost connection to MySQL server during query rows</title>
		<link>http://www.michaeltozzo.com/blog/2012/01/10/lost-connection-to-mysql-server-during-query-rows/</link>
		<comments>http://www.michaeltozzo.com/blog/2012/01/10/lost-connection-to-mysql-server-during-query-rows/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 15:18:12 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[General Rambling]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.michaeltozzo.com/blog/?p=465</guid>
		<description><![CDATA[While working on a project today a script I had that turns a database into a simple tab delimited file stopped working and was producing the following error: Lost connection to MySQL server during query rows Google searching didn&#8217;t turn &#8230; <a href="http://www.michaeltozzo.com/blog/2012/01/10/lost-connection-to-mysql-server-during-query-rows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.michaeltozzo.com/blog/wp-content/uploads/2012/01/logo-mysql-110x571.png"><img class="size-full wp-image-469 alignleft" title="logo-mysql-110x57[1]" src="http://www.michaeltozzo.com/blog/wp-content/uploads/2012/01/logo-mysql-110x571.png" alt="" width="110" height="57" /></a>While working on a project today a script I had that turns a database into a simple tab delimited file stopped working and was producing the following error:</p>
<p><code>Lost connection to MySQL server during query rows</code></p>
<p>Google searching didn&#8217;t turn up anything useful because most people said just to &#8220;use mysqldump instead&#8221; which wasn&#8217;t really an option for me. After running analyze, repair and optimize table and using phpMyAdmin to make a copy of the table I was pretty confident that it wasn&#8217;t a corruption problem so I added the following bit of code around what I already had:</p>
<p>&nbsp;</p>
<p>define(&#8216;C_NUM_PER_LIMIT&#8217;, 100000);</p>
<p>$iteration = 0;</p>
<p>do<br />
{<br />
$limit_from = C_NUM_PER_LIMIT * $iteration; $iteration++;</p>
<p>$sql = &#8220;SELECT * FROM `table` ORDER BY `id` LIMIT $limit_from, &#8221; . C_NUM_PER_LIMIT;<br />
$res = mysql_query($sql);<br />
// way more stuff</p>
<p>} while (mysql_num_rows($res) &gt; 0);</p>
<p>I hope this helps. <img src='http://www.michaeltozzo.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaeltozzo.com/blog/2012/01/10/lost-connection-to-mysql-server-during-query-rows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thirty-two</title>
		<link>http://www.michaeltozzo.com/blog/2012/01/07/thirty-two/</link>
		<comments>http://www.michaeltozzo.com/blog/2012/01/07/thirty-two/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 15:08:30 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[General Rambling]]></category>
		<category><![CDATA[stories]]></category>

		<guid isPermaLink="false">http://www.michaeltozzo.com/blog/?p=461</guid>
		<description><![CDATA[Well I’m now 32 years old. That’s pretty damn old .]]></description>
			<content:encoded><![CDATA[<p>Well I’m now 32 years old. That’s pretty damn old <img src='http://www.michaeltozzo.com/blog/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' />  .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaeltozzo.com/blog/2012/01/07/thirty-two/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with CSV files in PHP</title>
		<link>http://www.michaeltozzo.com/blog/2012/01/04/working-with-csv-files-in-php/</link>
		<comments>http://www.michaeltozzo.com/blog/2012/01/04/working-with-csv-files-in-php/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 21:38:17 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[General Rambling]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.michaeltozzo.com/blog/?p=452</guid>
		<description><![CDATA[This is the best and simplest way to work with a CSV file that has the headers on the first row in PHP. if (($handle = fopen('csv.csv', 'r')) !== false) { $length = 0; $delimiter = ','; $enclosure = '"'; &#8230; <a href="http://www.michaeltozzo.com/blog/2012/01/04/working-with-csv-files-in-php/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is the best and simplest way to work with a CSV file that has the headers on the first row in PHP.</p>
<p><code><br />
if (($handle = fopen('csv.csv', 'r')) !== false)<br />
{<br />
	$length = 0;<br />
	$delimiter = ',';<br />
	$enclosure = '"';<br />
	$escape = '\\';</p>
<p>	if(($header_line = fgetcsv($handle, $length, $delimiter, $enclosure, $escape)) !== false)<br />
	{<br />
		while(($line = fgetcsv($handle, $length, $delimiter, $enclosure, $escape)) !== false)<br />
		{<br />
			$data = array_combine($header_line, $line);<br />
			//do stuff here<br />
		}<br />
	}</p>
<p>	fclose($handle);<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaeltozzo.com/blog/2012/01/04/working-with-csv-files-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easter Egg Google Searches</title>
		<link>http://www.michaeltozzo.com/blog/2011/11/04/easter-egg-google-searches/</link>
		<comments>http://www.michaeltozzo.com/blog/2011/11/04/easter-egg-google-searches/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 15:07:20 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[General Rambling]]></category>

		<guid isPermaLink="false">http://www.michaeltozzo.com/blog/?p=447</guid>
		<description><![CDATA[I&#8217;m not sure if these will last forever but as of now try going to Google.com and do a search for: do a barrel roll askew Pretty cool huh?]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure if these will last forever but as of now try going to Google.com and do a search for:</p>
<blockquote><p>do a barrel roll<br />
askew</p></blockquote>
<p>Pretty cool huh?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaeltozzo.com/blog/2011/11/04/easter-egg-google-searches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jack Layton</title>
		<link>http://www.michaeltozzo.com/blog/2011/11/01/jack-layton/</link>
		<comments>http://www.michaeltozzo.com/blog/2011/11/01/jack-layton/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 19:03:46 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[General Rambling]]></category>
		<category><![CDATA[current events]]></category>

		<guid isPermaLink="false">http://www.michaeltozzo.com/blog/?p=423</guid>
		<description><![CDATA[I know it&#8217;s a little late but I wanted to make a quick post to commemorate the passing of one of Canada&#8217;s greatest politicians back on August 22nd, 2011. That politician was, of course, Mr. Jack Layton. Hearing Jack speak &#8230; <a href="http://www.michaeltozzo.com/blog/2011/11/01/jack-layton/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.michaeltozzo.com/blog/wp-content/uploads/2011/11/young_jack_layton.jpg"><img src="http://www.michaeltozzo.com/blog/wp-content/uploads/2011/11/young_jack_layton-213x300.jpg" alt="" title="young_jack_layton" width="213" height="300" class="aligncenter size-medium wp-image-436" /></a><br />
I know it&#8217;s a little late but I wanted to make a quick post to commemorate the passing of one of Canada&#8217;s greatest politicians back on August 22nd, 2011. That politician was, of course, Mr. Jack Layton.</p>
<p>Hearing Jack speak was so refreshing. His optimism gave hope to all Canadians. His energy, passion and drive are things that we should all aspire to emulate. His vision &#8211; a country of greater equality, justice, and opportunity &#8211; is one that benefits all Canadians. I salute you Mr. Layton for challenging all of us to be better.</p>
<p>As I was looking for photos to insert into this post I also came across this:</p>
<p><a href="http://www.michaeltozzo.com/blog/wp-content/uploads/2011/11/Jack-Layton-and-Olivia-Chow-in-Star-Trek-uniforms.jpg"><img src="http://www.michaeltozzo.com/blog/wp-content/uploads/2011/11/Jack-Layton-and-Olivia-Chow-in-Star-Trek-uniforms-300x279.jpg" alt="" title="Jack-Layton-and-Olivia-Chow-in-Star-Trek-uniforms" width="300" height="279" class="aligncenter size-medium wp-image-438" /></a></p>
<p>Jack was a Trekkie! <img src='http://www.michaeltozzo.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaeltozzo.com/blog/2011/11/01/jack-layton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crazy Dub Machine</title>
		<link>http://www.michaeltozzo.com/blog/2011/09/07/crazy-dub-machine/</link>
		<comments>http://www.michaeltozzo.com/blog/2011/09/07/crazy-dub-machine/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 20:47:53 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[General Rambling]]></category>

		<guid isPermaLink="false">http://www.michaeltozzo.com/blog/?p=431</guid>
		<description><![CDATA[Author &#038; Punisher- 9/5/10 Studio Practice Shoot from Tristan Shone on Vimeo.]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/15829164?title=0&amp;byline=0&amp;portrait=0" width="500" height="281" frameborder="0"></iframe>
<p><a href="http://vimeo.com/15829164">Author &#038; Punisher- 9/5/10 Studio Practice Shoot</a> from <a href="http://vimeo.com/user1385395">Tristan Shone</a> on <a href="http://vimeo.com/">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaeltozzo.com/blog/2011/09/07/crazy-dub-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Proposal of Portaltastic Proportions</title>
		<link>http://www.michaeltozzo.com/blog/2011/08/24/a-proposal-of-portaltastic-proportions/</link>
		<comments>http://www.michaeltozzo.com/blog/2011/08/24/a-proposal-of-portaltastic-proportions/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 18:26:02 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[General Rambling]]></category>

		<guid isPermaLink="false">http://www.michaeltozzo.com/blog/?p=426</guid>
		<description><![CDATA[I don&#8217;t think &#8220;portaltastic&#8221; is a word but that&#8217;s never really stopped me before . This is a really cute marriage proposal using a custom Portal 2 map. They even got Ellen McLain, the voice of GLaDOS, to record some &#8230; <a href="http://www.michaeltozzo.com/blog/2011/08/24/a-proposal-of-portaltastic-proportions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t think &#8220;portaltastic&#8221; is a word but that&#8217;s never really stopped me before <img src='http://www.michaeltozzo.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . This is a really cute marriage proposal using a custom Portal 2 map. They even got Ellen McLain, the voice of GLaDOS, to record some dialogue for them. Hats off to <a title="Douglas &quot;TopHATTwaffle&quot; Hoogland's website" href="http://www.tophattwaffle.com/" target="_blank">Douglas &#8220;TopHATTwaffle&#8221; Hoogland</a> and Rachel &#8220;Miss Stabby&#8221; van der Meer for the awesome job.</p>
<p><iframe src="http://www.youtube.com/embed/o8SdYz7cq04" frameborder="0" width="640" height="390"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaeltozzo.com/blog/2011/08/24/a-proposal-of-portaltastic-proportions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Got a packet bigger than &#8216;max_allowed_packet&#8217; bytes</title>
		<link>http://www.michaeltozzo.com/blog/2011/08/04/got-a-packet-bigger-than-max_allowed_packet-bytes/</link>
		<comments>http://www.michaeltozzo.com/blog/2011/08/04/got-a-packet-bigger-than-max_allowed_packet-bytes/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 18:06:41 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[General Rambling]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.michaeltozzo.com/blog/?p=419</guid>
		<description><![CDATA[Ran in to this problem today at work so I&#8217;m just making a note of it for future reference. I was running a PHP script crawler today that was inserting the downloaded data into a MySQL database and the script &#8230; <a href="http://www.michaeltozzo.com/blog/2011/08/04/got-a-packet-bigger-than-max_allowed_packet-bytes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ran in to this problem today at work so I&#8217;m just making a note of it for future reference. I was running a PHP script crawler today that was inserting the downloaded data into a MySQL database and the script crash with an error:</p>
<blockquote><p>Got a packet bigger than &#8216;max_allowed_packet&#8217; bytes</p></blockquote>
<p>The simple fix was to add in the code:</p>
<p><code>$sql = "SET GLOBAL max_allowed_packet=16*1024*1024;"; // 16 * 1 MB<br />
mysql_query($sql);</code></p>
<p>Hope this helps someone else as well. <img src='http://www.michaeltozzo.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaeltozzo.com/blog/2011/08/04/got-a-packet-bigger-than-max_allowed_packet-bytes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Train from Belfast to Dublin</title>
		<link>http://www.michaeltozzo.com/blog/2011/07/20/train-from-belfast-to-dublin/</link>
		<comments>http://www.michaeltozzo.com/blog/2011/07/20/train-from-belfast-to-dublin/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 01:40:49 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[General Rambling]]></category>

		<guid isPermaLink="false">http://www.michaeltozzo.com/blog/?p=414</guid>
		<description><![CDATA[During the planing of our vacation this year I had to book a train from Belfast to Dublin. Most places including the Lonely Planet Ireland book tell you that you can book a train on the Iarnród Éireann website. As &#8230; <a href="http://www.michaeltozzo.com/blog/2011/07/20/train-from-belfast-to-dublin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>During the planing of our vacation this year I had to book a train from Belfast to Dublin. Most places including the <a href="http://www.amazon.ca/gp/product/1741792142/ref=as_li_ss_tl?ie=UTF8&#038;tag=michaeltozzoc-20&#038;linkCode=as2&#038;camp=15121&#038;creative=390961&#038;creativeASIN=1741792142">Lonely Planet Ireland</a><img src="http://www.assoc-amazon.ca/e/ir?t=&#038;l=as2&#038;o=15&#038;a=1741792142" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> book tell you that you can book a train on the <a href="http://www.irishrail.ie/home/" target="_blank" title="Link to the Iarnród Éireann website">Iarnród Éireann</a> website. As soon as you try to book a ticket from Belfast Central to Dublin Connolly though you get the message:</p>
<blockquote><p>You cannot make a booking that originates in Northern Ireland. Please contact Translink on 048 9089 9409 Monday to Friday 09:00-17:00 to book a ticket</p></blockquote>
<p>Now if you&#8217;re doing this from another country and don&#8217;t want to make a long distance call you&#8217;re stuck. Luckily, <a href="http://translink.co.uk/" target="_blank" title="Link to the Translink website">Translink</a> has a website. An <a href="http://www.translink.co.uk/Enterprise/Enterprise-Timetables/" target="_blank" title="Link to Translink's Enterprise timetable">&#8220;Enterprise&#8221;</a> route will get you to Dublin Connolly at a reduced webfare. After purchasing the confirmation email I received said something about them mailing the ticket. A quick followup email got them to ensure the tickets were waiting for us at the station.</p>
<p>Hopefully this helps someone. <img src='http://www.michaeltozzo.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaeltozzo.com/blog/2011/07/20/train-from-belfast-to-dublin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vacation 2011 &#8211; The British Isles</title>
		<link>http://www.michaeltozzo.com/blog/2011/07/20/vacation-2011-the-british-isles/</link>
		<comments>http://www.michaeltozzo.com/blog/2011/07/20/vacation-2011-the-british-isles/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 01:16:47 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[General Rambling]]></category>

		<guid isPermaLink="false">http://www.michaeltozzo.com/blog/?p=403</guid>
		<description><![CDATA[So Kari and I decided to go to The British Isles this year for our summer vacation. Specifically, we went to London &#8211; England, Salisbury &#8211; England, Edinburgh &#8211; Scotland, Portree &#8211; Scotland, Belfast &#8211; Ireland and Dublin Ireland. Personally, &#8230; <a href="http://www.michaeltozzo.com/blog/2011/07/20/vacation-2011-the-british-isles/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_402" class="wp-caption alignleft" style="width: 650px"><a href="http://www.michaeltozzo.com/blog/wp-content/uploads/2011/07/DSC04744.jpg"><img src="http://www.michaeltozzo.com/blog/wp-content/uploads/2011/07/DSC04744-1024x680.jpg" alt="Kari and I with Bill from Real Scottish Journeys" title="DSC04744" width="640" height="425" class="size-large wp-image-402" /></a><p class="wp-caption-text">Kari and I with Bill from Real Scottish Journeys</p></div>So Kari and I decided to go to The British Isles this year for our summer vacation. Specifically, we went to London &#8211; England, Salisbury &#8211; England, Edinburgh &#8211; Scotland, Portree &#8211; Scotland, Belfast &#8211; Ireland and Dublin Ireland. Personally, I enjoyed Scotland the most thanks to the man pictured above &#8211; Bill that runs an <a href="http://www.realscottishjourneys.com/" target="_blank" title="Link to the website for Real Scottish Journeys">amazing tour company in Scotland</a> named Real Scottish Journeys. Bill took us on a <a href="http://www.realscottishjourneys.com/skye.htm"  target="_blank" title="Link to the website for Real Scottish Journeys">wonderful tour to the Isle of Skye</a> during which we saw many incredible things and listened to many fascinating stories.</p>
<p>The other awesome thing about our trip was the quality of beer. It&#8217;s actually been pretty hard drinking the beer here in Canada as the beer we found on our trip was about 50 times better than the stuff we drink in Canada. The Guinness we drank in Ireland was so smooth and delicious compared to the slightly bitter and slightly less smooth version found here. I also found a new appreciation for Smithwick&#8217;s and was utterly disappointed when I ordered one here in Canada recently and discovered that it tasted nothing like those I had in Ireland.</p>
<p>Finally, another warm thanks goes out to Rory Laden who was our <a href="http://www.airbnb.com/rooms/7497" title="Link to one of Rory's airbnb.com listings">awesomely gracious host in Dublin, Ireland</a>. He was really helpful with respect to suggesting things to do while we were in Dublin and gave us free reign over his kitchen in order to make breakfast/lunch.</p>
<p>I can&#8217;t wait until our next vacation. <img src='http://www.michaeltozzo.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaeltozzo.com/blog/2011/07/20/vacation-2011-the-british-isles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

