<?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>Tech Thought &#187; Development</title>
	<atom:link href="http://blog.evandavey.com/category/development/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.evandavey.com</link>
	<description>Tech tips, hints, and general musings. PHP, Perl, Mysql, Javascript, AJAX, JSON, Linux, Mac OSX</description>
	<lastBuildDate>Wed, 27 Apr 2011 03:56:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Countries of the world in PHP array</title>
		<link>http://blog.evandavey.com/2010/08/countries-of-the-world-in-php-array.html</link>
		<comments>http://blog.evandavey.com/2010/08/countries-of-the-world-in-php-array.html#comments</comments>
		<pubDate>Mon, 16 Aug 2010 04:30:53 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[countries]]></category>
		<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=657</guid>
		<description><![CDATA[A handy snippet to share with anyone who needs access to the countries of the world (Australia/New Zealand at the top in my example) as a PHP list: $list = array( "AU" => "Australia", "NZ" => "New Zealand", "GB" => "United Kingdom", "US" => "United States", "AF" => "Afghanistan", "AL" => "Albania", "DZ" => "Algeria", [...]]]></description>
			<content:encoded><![CDATA[<p>A handy snippet to share with anyone who needs access to the countries of the world (Australia/New Zealand at the top in my example) as a PHP list:<br />
<span id="more-657"></span><br />
<code><br />
$list = array(<br />
		  "AU" => "Australia",<br />
		  "NZ" => "New Zealand",<br />
		  "GB" => "United Kingdom",<br />
		  "US" => "United States",<br />
		  "AF" => "Afghanistan",<br />
		  "AL" => "Albania",<br />
		  "DZ" => "Algeria",<br />
		  "AS" => "American Samoa",<br />
		  "AD" => "Andorra",<br />
		  "AO" => "Angola",<br />
		  "AI" => "Anguilla",<br />
		  "AQ" => "Antarctica",<br />
		  "AG" => "Antigua And Barbuda",<br />
		  "AR" => "Argentina",<br />
		  "AM" => "Armenia",<br />
		  "AW" => "Aruba",<br />
		  "AT" => "Austria",<br />
		  "AZ" => "Azerbaijan",<br />
		  "BS" => "Bahamas",<br />
		  "BH" => "Bahrain",<br />
		  "BD" => "Bangladesh",<br />
		  "BB" => "Barbados",<br />
		  "BY" => "Belarus",<br />
		  "BE" => "Belgium",<br />
		  "BZ" => "Belize",<br />
		  "BJ" => "Benin",<br />
		  "BM" => "Bermuda",<br />
		  "BT" => "Bhutan",<br />
		  "BO" => "Bolivia",<br />
		  "BA" => "Bosnia And Herzegowina",<br />
		  "BW" => "Botswana",<br />
		  "BV" => "Bouvet Island",<br />
		  "BR" => "Brazil",<br />
		  "IO" => "British Indian Ocean Territory",<br />
		  "BN" => "Brunei Darussalam",<br />
		  "BG" => "Bulgaria",<br />
		  "BF" => "Burkina Faso",<br />
		  "BI" => "Burundi",<br />
		  "KH" => "Cambodia",<br />
		  "CM" => "Cameroon",<br />
		  "CA" => "Canada",<br />
		  "CV" => "Cape Verde",<br />
		  "KY" => "Cayman Islands",<br />
		  "CF" => "Central African Republic",<br />
		  "TD" => "Chad",<br />
		  "CL" => "Chile",<br />
		  "CN" => "China",<br />
		  "CX" => "Christmas Island",<br />
		  "CC" => "Cocos (Keeling) Islands",<br />
		  "CO" => "Colombia",<br />
		  "KM" => "Comoros",<br />
		  "CG" => "Congo",<br />
		  "CD" => "Congo, The Democratic Republic Of The",<br />
		  "CK" => "Cook Islands",<br />
		  "CR" => "Costa Rica",<br />
		  "CI" => "Cote D'Ivoire",<br />
		  "HR" => "Croatia (Local Name: Hrvatska)",<br />
		  "CU" => "Cuba",<br />
		  "CY" => "Cyprus",<br />
		  "CZ" => "Czech Republic",<br />
		  "DK" => "Denmark",<br />
		  "DJ" => "Djibouti",<br />
		  "DM" => "Dominica",<br />
		  "DO" => "Dominican Republic",<br />
		  "TP" => "East Timor",<br />
		  "EC" => "Ecuador",<br />
		  "EG" => "Egypt",<br />
		  "SV" => "El Salvador",<br />
		  "GQ" => "Equatorial Guinea",<br />
		  "ER" => "Eritrea",<br />
		  "EE" => "Estonia",<br />
		  "ET" => "Ethiopia",<br />
		  "FK" => "Falkland Islands (Malvinas)",<br />
		  "FO" => "Faroe Islands",<br />
		  "FJ" => "Fiji",<br />
		  "FI" => "Finland",<br />
		  "FR" => "France",<br />
		  "FX" => "France, Metropolitan",<br />
		  "GF" => "French Guiana",<br />
		  "PF" => "French Polynesia",<br />
		  "TF" => "French Southern Territories",<br />
		  "GA" => "Gabon",<br />
		  "GM" => "Gambia",<br />
		  "GE" => "Georgia",<br />
		  "DE" => "Germany",<br />
		  "GH" => "Ghana",<br />
		  "GI" => "Gibraltar",<br />
		  "GR" => "Greece",<br />
		  "GL" => "Greenland",<br />
		  "GD" => "Grenada",<br />
		  "GP" => "Guadeloupe",<br />
		  "GU" => "Guam",<br />
		  "GT" => "Guatemala",<br />
		  "GN" => "Guinea",<br />
		  "GW" => "Guinea-Bissau",<br />
		  "GY" => "Guyana",<br />
		  "HT" => "Haiti",<br />
		  "HM" => "Heard And Mc Donald Islands",<br />
		  "VA" => "Holy See (Vatican City State)",<br />
		  "HN" => "Honduras",<br />
		  "HK" => "Hong Kong",<br />
		  "HU" => "Hungary",<br />
		  "IS" => "Iceland",<br />
		  "IN" => "India",<br />
		  "ID" => "Indonesia",<br />
		  "IR" => "Iran (Islamic Republic Of)",<br />
		  "IQ" => "Iraq",<br />
		  "IE" => "Ireland",<br />
		  "IL" => "Israel",<br />
		  "IT" => "Italy",<br />
		  "JM" => "Jamaica",<br />
		  "JP" => "Japan",<br />
		  "JO" => "Jordan",<br />
		  "KZ" => "Kazakhstan",<br />
		  "KE" => "Kenya",<br />
		  "KI" => "Kiribati",<br />
		  "KP" => "Korea, Democratic People's Republic Of",<br />
		  "KR" => "Korea, Republic Of",<br />
		  "KW" => "Kuwait",<br />
		  "KG" => "Kyrgyzstan",<br />
		  "LA" => "Lao People's Democratic Republic",<br />
		  "LV" => "Latvia",<br />
		  "LB" => "Lebanon",<br />
		  "LS" => "Lesotho",<br />
		  "LR" => "Liberia",<br />
		  "LY" => "Libyan Arab Jamahiriya",<br />
		  "LI" => "Liechtenstein",<br />
		  "LT" => "Lithuania",<br />
		  "LU" => "Luxembourg",<br />
		  "MO" => "Macau",<br />
		  "MK" => "Macedonia, Former Yugoslav Republic Of",<br />
		  "MG" => "Madagascar",<br />
		  "MW" => "Malawi",<br />
		  "MY" => "Malaysia",<br />
		  "MV" => "Maldives",<br />
		  "ML" => "Mali",<br />
		  "MT" => "Malta",<br />
		  "MH" => "Marshall Islands",<br />
		  "MQ" => "Martinique",<br />
		  "MR" => "Mauritania",<br />
		  "MU" => "Mauritius",<br />
		  "YT" => "Mayotte",<br />
		  "MX" => "Mexico",<br />
		  "FM" => "Micronesia, Federated States Of",<br />
		  "MD" => "Moldova, Republic Of",<br />
		  "MC" => "Monaco",<br />
		  "MN" => "Mongolia",<br />
		  "MS" => "Montserrat",<br />
		  "MA" => "Morocco",<br />
		  "MZ" => "Mozambique",<br />
		  "MM" => "Myanmar",<br />
		  "NA" => "Namibia",<br />
		  "NR" => "Nauru",<br />
		  "NP" => "Nepal",<br />
		  "NL" => "Netherlands",<br />
		  "AN" => "Netherlands Antilles",<br />
		  "NC" => "New Caledonia",<br />
		  "NI" => "Nicaragua",<br />
		  "NE" => "Niger",<br />
		  "NG" => "Nigeria",<br />
		  "NU" => "Niue",<br />
		  "NF" => "Norfolk Island",<br />
		  "MP" => "Northern Mariana Islands",<br />
		  "NO" => "Norway",<br />
		  "OM" => "Oman",<br />
		  "PK" => "Pakistan",<br />
		  "PW" => "Palau",<br />
		  "PA" => "Panama",<br />
		  "PG" => "Papua New Guinea",<br />
		  "PY" => "Paraguay",<br />
		  "PE" => "Peru",<br />
		  "PH" => "Philippines",<br />
		  "PN" => "Pitcairn",<br />
		  "PL" => "Poland",<br />
		  "PT" => "Portugal",<br />
		  "PR" => "Puerto Rico",<br />
		  "QA" => "Qatar",<br />
		  "RE" => "Reunion",<br />
		  "RO" => "Romania",<br />
		  "RU" => "Russian Federation",<br />
		  "RW" => "Rwanda",<br />
		  "KN" => "Saint Kitts And Nevis",<br />
		  "LC" => "Saint Lucia",<br />
		  "VC" => "Saint Vincent And The Grenadines",<br />
		  "WS" => "Samoa",<br />
		  "SM" => "San Marino",<br />
		  "ST" => "Sao Tome And Principe",<br />
		  "SA" => "Saudi Arabia",<br />
		  "SN" => "Senegal",<br />
		  "SC" => "Seychelles",<br />
		  "SL" => "Sierra Leone",<br />
		  "SG" => "Singapore",<br />
		  "SK" => "Slovakia (Slovak Republic)",<br />
		  "SI" => "Slovenia",<br />
		  "SB" => "Solomon Islands",<br />
		  "SO" => "Somalia",<br />
		  "ZA" => "South Africa",<br />
		  "GS" => "South Georgia, South Sandwich Islands",<br />
		  "ES" => "Spain",<br />
		  "LK" => "Sri Lanka",<br />
		  "SH" => "St. Helena",<br />
		  "PM" => "St. Pierre And Miquelon",<br />
		  "SD" => "Sudan",<br />
		  "SR" => "Suriname",<br />
		  "SJ" => "Svalbard And Jan Mayen Islands",<br />
		  "SZ" => "Swaziland",<br />
		  "SE" => "Sweden",<br />
		  "CH" => "Switzerland",<br />
		  "SY" => "Syrian Arab Republic",<br />
		  "TW" => "Taiwan",<br />
		  "TJ" => "Tajikistan",<br />
		  "TZ" => "Tanzania, United Republic Of",<br />
		  "TH" => "Thailand",<br />
		  "TG" => "Togo",<br />
		  "TK" => "Tokelau",<br />
		  "TO" => "Tonga",<br />
		  "TT" => "Trinidad And Tobago",<br />
		  "TN" => "Tunisia",<br />
		  "TR" => "Turkey",<br />
		  "TM" => "Turkmenistan",<br />
		  "TC" => "Turks And Caicos Islands",<br />
		  "TV" => "Tuvalu",<br />
		  "UG" => "Uganda",<br />
		  "UA" => "Ukraine",<br />
		  "AE" => "United Arab Emirates",<br />
		  "UM" => "United States Minor Outlying Islands",<br />
		  "UY" => "Uruguay",<br />
		  "UZ" => "Uzbekistan",<br />
		  "VU" => "Vanuatu",<br />
		  "VE" => "Venezuela",<br />
		  "VN" => "Viet Nam",<br />
		  "VG" => "Virgin Islands (British)",<br />
		  "VI" => "Virgin Islands (U.S.)",<br />
		  "WF" => "Wallis And Futuna Islands",<br />
		  "EH" => "Western Sahara",<br />
		  "YE" => "Yemen",<br />
		  "YU" => "Yugoslavia",<br />
		  "ZM" => "Zambia",<br />
		  "ZW" => "Zimbabwe"<br />
		);<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2010/08/countries-of-the-world-in-php-array.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Connect Mobile: XML Schema Error on Mobile Devices</title>
		<link>http://blog.evandavey.com/2010/04/facebook-connect-mobile-xml-schema-error-on-mobile-devices.html</link>
		<comments>http://blog.evandavey.com/2010/04/facebook-connect-mobile-xml-schema-error-on-mobile-devices.html#comments</comments>
		<pubDate>Mon, 19 Apr 2010 12:42:55 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=622</guid>
		<description><![CDATA[If you&#8217;re getting an XML error when you&#8217;re using Facebook Connect to post to a users stream using the function: $facebook-&#62;render_prompt_feed_url() Then ensure the following: You don&#8217;t have any double quotes in your attachment You don&#8217;t have any ampersands in your return URL For some reason the content is being placed in a hidden field [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right;"><img class="size-full wp-image-629     alignright" title="Facebook-developers-logo" src="http://blog.evandavey.com/wp-content/uploads/2010/04/Facebook-developers-logo.png" alt="" width="137" height="144" /></div>
<p>If you&#8217;re getting an XML error when you&#8217;re using Facebook Connect to post to a users stream using the function:</p>
<p><strong>$facebook-&gt;render_prompt_feed_url()</strong></p>
<p>Then ensure the following:</p>
<ul>
<li>You don&#8217;t have any double quotes in your attachment</li>
<li>You don&#8217;t have any ampersands in your return URL</li>
</ul>
<p>For some reason the content is being placed in a hidden field on the page on &#8220;mobile&#8221; devices.  This isn&#8217;t escaping the contents of the post, and hence breaks if you have any of the above.</p>
<p>Highly frustrating!  Hope this helps someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2010/04/facebook-connect-mobile-xml-schema-error-on-mobile-devices.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Online Tool to Convert .ICS file to Excel/CSV</title>
		<link>http://blog.evandavey.com/2010/02/online-tool-to-convert-ics-file-to-excelcsv.html</link>
		<comments>http://blog.evandavey.com/2010/02/online-tool-to-convert-ics-file-to-excelcsv.html#comments</comments>
		<pubDate>Sun, 14 Feb 2010 01:52:16 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[iCal]]></category>
		<category><![CDATA[ics]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=605</guid>
		<description><![CDATA[I couldn&#8217;t find a decent way online to convert ICS files into an Excel type format for easy manipulation, or adding to documents etc.  So I&#8217;ve built a simple one that is now available online: http://csv2sql.evandavey.com/ical2csv.php This takes an iCal URL and provides you with a CSV file as a download.  Makes it much easier [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t find a decent way online to convert <a href="http://en.wikipedia.org/wiki/ICalendar">ICS</a> files into an Excel type format for easy manipulation, or adding to documents etc.  So I&#8217;ve built a simple one that is now available online:</p>
<p><a href="http://csv2sql.evandavey.com/ical2csv.php">http://csv2sql.evandavey.com/ical2csv.php</a></p>
<p>This takes an iCal URL and provides you with a CSV file as a download.  Makes it much easier to get a list of dates from ICS files and use them for other purposes.</p>
<p>Also available is the <a href="http://csv2sql.evandavey.com">CSV2SQL</a> converter that I made last year, taking CSV files and coverting them into INSERT/UPDATE statements for use on a database.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2010/02/online-tool-to-convert-ics-file-to-excelcsv.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How To: PHP OAuth Twitter</title>
		<link>http://blog.evandavey.com/2010/02/how-to-php-oauth-twitter.html</link>
		<comments>http://blog.evandavey.com/2010/02/how-to-php-oauth-twitter.html#comments</comments>
		<pubDate>Thu, 11 Feb 2010 12:17:24 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[oAuth]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=581</guid>
		<description><![CDATA[So, you&#8217;re building a web based twitter client in PHP.  Easy, just use a simple Twitter API client and call the Twitter API directly.  But what if you don&#8217;t want to store the user&#8217;s Twitter authentication information anywhere?  It&#8217;s a security risk anyway and some people don&#8217;t want to give up their account details to a [...]]]></description>
			<content:encoded><![CDATA[<p>So, you&#8217;re building a web based twitter client in PHP.  Easy, just use a simple Twitter API <a href="http://lab.arc90.com/2008/06/03/php-twitter-api-client/">client</a> and call the Twitter <a href="http://apiwiki.twitter.com/">API</a> directly.  But what if you don&#8217;t want to store the user&#8217;s Twitter authentication information anywhere?  It&#8217;s a security risk anyway and some people don&#8217;t want to give up their account details to a 3rd party.  So what to do?  The solution is to use <a href="http://www.oauth.org">OAuth</a> with <a href="http://apiwiki.twitter.com/OAuth-FAQ">Twitter</a>.<span id="more-581"></span></p>
<p>How do you do this?  I&#8217;d recommend taking the following steps:</p>
<ol>
<li>Get this great <a href="http://github.com/abraham/twitteroauth">OAuth Twitter PHP</a> library from <a href="http://abrah.am">Abraham Williams</a></li>
<li>Sign up for a Twitter application and get an <a href="https://twitter.com/apps">application</a> setup.  You&#8217;ll need the &#8220;Consumer Key&#8221; and &#8220;Consumer Secret&#8221; values from Twitter. You will also need to set a &#8220;callback url&#8221; that Twitter will send the user back to.  Make sure you set this correctly.</li>
<li>Include the &#8220;twitterOAuth.php&#8221; library provided by Adbraham Williams in your code</li>
</ol>
<p>Now, the process through which OAuth works with Twitter (and any other platform) is as follows:</p>
<p>Firstly, you need to get the user to authenticate with twitter and permit your application to perform actions on their behalf.  To do this, you need to send the user to twitter with a special &#8220;authorisation token&#8221;.</p>
<p>You request an authorisation token from Twitter, using your Consumer Key and Consumer Secret values you obtained when you signed up for a Twitter Application:</p>
<pre>$connection = new TwitterOAuth($consumer_key, $consumer_secret);
$request_token = $connection-&gt;getRequestToken();</pre>
<p>The $request_token returned contains the &#8220;request token&#8221; information, which you should store somewhere:</p>
<pre>$userData['Twitter_Request_Token'] = $token = $request_token['oauth_token'];
$userData['Twitter_Request_Token_Secret'] = $request_token['oauth_token_secret'];
$db-&gt;Save_User_Data($userData); // Replace with your own saving method</pre>
<p>Now that you have your request token, you can send the user off to Twitter to authenticate:</p>
<pre>$authenticateUrl = $connection-&gt;getAuthorizeURL($token);
header("Location: $authenticateUrl");
exit;</pre>
<p>Twitter will now authenticate the user and confirm they want your application to have access to their account.  Your next interaction will be on the &#8220;callback url&#8221; you setup when you created your Twitter application.  In this script you will need to use the &#8220;twitter request tokens&#8221; you saved previously to then request the &#8220;Access token&#8221; from Twitter:</p>
<pre>$to = new TwitterOAuth($consumer_key, $consumer_secret,
$userData['Twitter_Request_Token'], $userData['Twitter_Request_Token_Secret']);
$tok = $to-&gt;getAccessToken();</pre>
<p>Now that you&#8217;ve got the access token, you should save it as you&#8217;ll use this in future requests to Twitter:</p>
<pre>$userData['Twitter_Access_Token'] 	= $tok['oauth_token'];
$userData['Twitter_Access_Token_Secret'] = $tok['oauth_token_secret'];
$db-&gt;Save_User_Data($userData);</pre>
<p>Now confirm you have access to the user on Twitter:</p>
<pre>$to = new TwitterOAuth($consumer_key, $consumer_secret,
$userData['Twitter_Access_Token'], $userData['Twitter_Access_Token_Secret']);
$result = json_decode($to-&gt;OAuthRequest('https://twitter.com/account/verify_credentials.json', array(), 'GET'));
if ($result-&gt;id){
// Everything is fine
}</pre>
<p>Now you have access to Twitter via OAuth!  You can now run commands like this:</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$to = new TwitterOAuth($consumer_key, $consumer_secret, $userData['Twitter_Access_Token'], $userData['Twitter_Access_Token_Secret']);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span>$result = json_decode($to-&gt;OAuthRequest(&#8216;https://twitter.com/statuses/update.json&#8217;, array(&#8216;status&#8217; =&gt; $tweet), &#8216;POST&#8217;));</div>
<pre>$to = new TwitterOAuth($consumer_key, $consumer_secret, $access_token, $access_token_secret);
$result = json_decode($to-&gt;OAuthRequest(
      'https://twitter.com/statuses/update.json',
       array('status' =&gt; $tweet), 'POST'));</pre>
<p>The above should give you a few pointers on how to actually get up and running using OAuth/PHP on Twitter.  I hope this post helps a few people get it all working.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2010/02/how-to-php-oauth-twitter.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How-To: Create my.cnf file in MAMP</title>
		<link>http://blog.evandavey.com/2009/11/how-to-create-my-cnf-file-in-mamp.html</link>
		<comments>http://blog.evandavey.com/2009/11/how-to-create-my-cnf-file-in-mamp.html#comments</comments>
		<pubDate>Tue, 24 Nov 2009 21:38:52 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[MAMP]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=567</guid>
		<description><![CDATA[This is a simple process, however not something I could find documented anywhere easy to find. MAMP supplies you with a range of sample configuration files: /Applications/MAMP/Library/share/mysql/my-huge.cnf /Applications/MAMP/Library/share/mysql/my-innodb-heavy-4G.cnf /Applications/MAMP/Library/share/mysql/my-large.cnf /Applications/MAMP/Library/share/mysql/my-medium.cnf /Applications/MAMP/Library/share/mysql/my-small.cnf To setup one of these for MAMP, simply issue the following command: sudo cp /Applications/MAMP/Library/share/mysql/my-choicehere.cnf /Applications/MAMP/Library/my.cnf]]></description>
			<content:encoded><![CDATA[<p>This is a simple process, however not something I could find documented anywhere easy to find.  MAMP supplies you with a range of sample configuration files:</p>
<pre>
/Applications/MAMP/Library/share/mysql/my-huge.cnf
/Applications/MAMP/Library/share/mysql/my-innodb-heavy-4G.cnf
/Applications/MAMP/Library/share/mysql/my-large.cnf
/Applications/MAMP/Library/share/mysql/my-medium.cnf
/Applications/MAMP/Library/share/mysql/my-small.cnf
</pre>
<p>To setup one of these for MAMP, simply issue the following command:</p>
<pre>
sudo cp /Applications/MAMP/Library/share/mysql/my-choicehere.cnf /Applications/MAMP/Library/my.cnf
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2009/11/how-to-create-my-cnf-file-in-mamp.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What does iPhone OS 3.0 Mean for your Apps?</title>
		<link>http://blog.evandavey.com/2009/08/what-does-iphone-os-3-0-mean-for-your-apps.html</link>
		<comments>http://blog.evandavey.com/2009/08/what-does-iphone-os-3-0-mean-for-your-apps.html#comments</comments>
		<pubDate>Thu, 27 Aug 2009 22:15:15 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=549</guid>
		<description><![CDATA[Recently I was involved in a podcast regarding the iPhone OS 3.0 upgrade. We looked at all the new features (and some upcoming ones in v3.1) and discussed how they relate to new features clients can develop in their apps. You can hear more here: What does iPhone OS 3.0 Mean for Your Apps (WSP [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was involved in a podcast regarding the iPhone OS 3.0 upgrade.  We looked at all the new features (and some upcoming ones in v3.1) and discussed how they relate to new features clients can develop in their apps.  </p>
<p>You can hear more here:</p>
<p><a href="http://wspeonline.com/news/140-what-does-the-iphone-os-30-upgrade-mean-for-your-apps.html">What does iPhone OS 3.0 Mean for Your Apps (WSP Online)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2009/08/what-does-iphone-os-3-0-mean-for-your-apps.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Maps: Zoom Level, Center from points on map</title>
		<link>http://blog.evandavey.com/2009/08/google-maps-zoom-level-center-from-points-on-map.html</link>
		<comments>http://blog.evandavey.com/2009/08/google-maps-zoom-level-center-from-points-on-map.html#comments</comments>
		<pubDate>Tue, 11 Aug 2009 23:00:02 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[GLatLngBounds]]></category>
		<category><![CDATA[google maps]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=551</guid>
		<description><![CDATA[So you&#8217;ve created a pretty Google Map on your website.  You place a whole heap of markers on your map, driven from data you&#8217;ve got stored in your database. A nice thing to do when we first show the map, would be to ensure that all the markers are visible on the map. To do [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve created a pretty <a href="http://code.google.com/apis/maps">Google Map</a> on your website.  You place a whole heap of markers on your map, driven from data you&#8217;ve got stored in your database. </p>
<p>A nice thing to do when we first show the map, would be to ensure that all the markers are visible on the map.  </p>
<p>To do this, we need to set the zoom level and center point of the map dynamically.  So how do we do this?  The answer is <strong>GLatLngBounds</strong>():</p>
<pre>
// Get your locations from the database
var mapLocations = &lt;? echo json_encode(Locations::Find()) ?&gt;;

// Initialise our map, add some controls and a default center point
var map = new GMap2(document.getElementById("Mall_Map"));
map.setCenter(new GLatLng(15, 20), 2);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());

// Now the fun part - create a GLatLngBounds object
	var bounds = new GLatLngBounds();

//
for (var i=0; i&lt;mapLocations.length; i++)
{
        var location = mapLocations[i];
        var point = new GLatLng(location.Latitude, location.Longitude);

        // createMarker() is a custom function which returns a marker for a given GLatLng
        var marker = createMarker(point);

        // extend our bounds to include this point
        bounds.extend(point);

        // add our marker
	map.addOverlay(marker);
}

// Now dynamically set the center and zoom level for our map based on our bounds!
map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
</pre>
<p>The key is the use of the line:</p>
<pre>
map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
</pre>
<p>This uses our bounds (which we&#8217;ve dynamically extended to include each of our points) to determine what the center and bounds zoome level should be.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2009/08/google-maps-zoom-level-center-from-points-on-map.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>yum fails: Fixing Fedora Core 5 yum repositories</title>
		<link>http://blog.evandavey.com/2009/07/yum-fails-fixing-fedora-core-5-yum-repositories.html</link>
		<comments>http://blog.evandavey.com/2009/07/yum-fails-fixing-fedora-core-5-yum-repositories.html#comments</comments>
		<pubDate>Sun, 12 Jul 2009 00:48:33 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[core5]]></category>
		<category><![CDATA[fedora]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=527</guid>
		<description><![CDATA[Fedora Core 5 is currently EOL &#8211; it&#8217;s not supported any more.  As a result, you might find you can&#8217;t use yum to install packages any more &#8211; you get an error message about this file not existing: http://download.fedora.redhat.com/pub/fedora/linux/core/5/i386/os/repodata/repomd.xml This is because the repositories that yum uses aren&#8217;t there anymore.  However you can modify the [...]]]></description>
			<content:encoded><![CDATA[<p>Fedora Core 5 is currently EOL &#8211; it&#8217;s not supported any more.  As a result, you might find you can&#8217;t use <strong>yum</strong> to install packages any more &#8211; you get an error message about this file not existing:</p>
<pre>http://download.fedora.redhat.com/pub/fedora/linux/core/5/i386/os/repodata/repomd.xml</pre>
<p>This is because the repositories that yum uses aren&#8217;t there anymore.  However you can modify the repositories in <strong>/etc/yum/repos.d/</strong> and add these to fix the problem:</p>
<p><a style="color: #006699;" href="http://archive.fedoraproject.org/pub/archive/fedora/linux/core/6/i386/os/" target="_blank">http://archive.fedoraproject.org/pub/archive/fedora/linux/core/6/i386/os/</a><br />
<a style="color: #006699;" href="http://archive.fedoraproject.org/pub/archive/fedora/linux/core/6/i386/debug/" target="_blank">http://archive.fedoraproject.org/pub/archive/fedora/linux/core/6/i386/debug/</a><br />
<a style="color: #006699;" href="http://archive.fedoraproject.org/pub/archive/fedora/linux/core/6/source/SRPMS/" target="_blank">http://archive.fedoraproject.org/pub/archive/fedora/linux/core/6/source/SRPMS/</a></p>
<p><a style="color: #006699;" href="http://archive.fedoraproject.org/pub/archive/fedora/linux/core/updates/6/i386/" target="_blank">http://archive.fedoraproject.org/pub/archive/fedora/linux/core/updates/6/i386/</a><br />
<a style="color: #006699;" href="http://archive.fedoraproject.org/pub/archive/fedora/linux/core/updates/6/i386/debug/" target="_blank">http://archive.fedoraproject.org/pub/archive/fedora/linux/core/updates/6/i386/debug/</a><br />
<a style="color: #006699;" href="http://archive.fedoraproject.org/pub/archive/fedora/linux/core/updates/6/SRPMS/" target="_blank">http://archive.fedoraproject.org/pub/archive/fedora/linux/core/updates/6/SRPMS/</a></p>
<p><a style="color: #006699;" href="http://archive.fedoraproject.org/pub/archive/fedora/linux/extras/6/i386/" target="_blank">http://archive.fedoraproject.org/pub/archive/fedora/linux/extras/6/i386/</a></p>
<p>An example change would be to the <strong>/etc/yum/repos.d/fedora-core.repo</strong> file:</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 54px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[core]</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 54px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">name=Fedora Core $releasever &#8211; $basearch</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 54px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 54px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">baseurl=http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/i386/os/</div>
<pre>[core]
name=Fedora Core $releasever - $basearch
baseurl=http://archive.fedoraproject.org/pub/archive/fedora/linux/core/5/i386/os/</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2009/07/yum-fails-fixing-fedora-core-5-yum-repositories.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How-To Fix: MAMP won&#8217;t start</title>
		<link>http://blog.evandavey.com/2009/06/how-to-fix-mamp-wont-start.html</link>
		<comments>http://blog.evandavey.com/2009/06/how-to-fix-mamp-wont-start.html#comments</comments>
		<pubDate>Sat, 13 Jun 2009 03:10:18 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[MAMP]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=512</guid>
		<description><![CDATA[Okay, so sometimes our shiny friend and development support buddy MAMP won&#8217;t start properly.  I&#8217;ve found this often happens when you&#8217;ve first booted up your Mac and you try to start getting stuck into your code. Symptoms are pretty simple to diagnose &#8211; you start MAMP, and it&#8217;s control panel pops up and shows that everything [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, so sometimes our shiny friend and development support buddy <a href="http://www.mamp.info" target="_blank">MAMP</a> won&#8217;t start properly.  I&#8217;ve found this often happens when you&#8217;ve first booted up your Mac and you try to start getting stuck into your code.</p>
<p>Symptoms are pretty simple to diagnose &#8211; you start MAMP, and it&#8217;s control panel pops up and shows that everything is running:</p>
<p><img class="alignnone size-full wp-image-514" title="MAMP Control Panel" src="http://blog.evandavey.com/wp-content/uploads/2009/06/picture-2.png" alt="MAMP Control Panel" width="297" height="241" /></p>
<p>But for some reason you can&#8217;t access your webserver or database:</p>
<p><img class="alignnone size-full wp-image-515" title="MAMP not working" src="http://blog.evandavey.com/wp-content/uploads/2009/06/picture-3.png" alt="MAMP not working" width="386" height="101" /></p>
<p>What to do?  Restarting the servers generally doesn&#8217;t solve the problem.  However, there is a trick I&#8217;ve discovered.  Open up the control panel and click the &#8220;Preferences&#8230;&#8221; button.  Once this popups up, choose the &#8220;Ports&#8221; tab, change nothing &#8211; and click OK:</p>
<p><img class="alignnone size-full wp-image-513" title="MAMP Preferences Pane" src="http://blog.evandavey.com/wp-content/uploads/2009/06/picture-1.png" alt="MAMP Preferences Pane" width="253" height="168" /></p>
<p>MAMP will automatically restart &#8211; and you should be up and running!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2009/06/how-to-fix-mamp-wont-start.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How-To: Move change the address of a SVN repository</title>
		<link>http://blog.evandavey.com/2009/04/how-to-move-change-the-address-of-a-svn-repository.html</link>
		<comments>http://blog.evandavey.com/2009/04/how-to-move-change-the-address-of-a-svn-repository.html#comments</comments>
		<pubDate>Wed, 29 Apr 2009 22:46:19 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=477</guid>
		<description><![CDATA[So you&#8217;ve changed where you host your subversion repository for a particular project and you want to update your local copy so that it points at the correct address?   How do you do this?  Simple: svn switch --relocate http://oldserver.com/PROJECT  http://newserver.com/PROJECT This will recursively modify all the .svn folders contents so they point to the correct [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve changed where you host your subversion repository for a particular project and you want to update your local copy so that it points at the correct address?   How do you do this?  Simple:</p>
<pre>svn switch --relocate http://oldserver.com/PROJECT 

http://newserver.com/PROJECT</pre>
<p>This will recursively modify all the .svn folders contents so they point to the correct location.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2009/04/how-to-move-change-the-address-of-a-svn-repository.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

