<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Tech Thought</title>
	
	<link>http://blog.evandavey.com</link>
	<description>Tech tips, hints, and general musings. PHP, Perl, Mysql, Javascript, AJAX, JSON, Linux, Mac OSX</description>
	<lastBuildDate>Mon, 28 Sep 2009 02:32:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/EvsTechThoughtOfTheDay" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>How-To: Convert UIImage to Greyscale Equivalent</title>
		<link>http://feedproxy.google.com/~r/EvsTechThoughtOfTheDay/~3/fsiPW8daOR8/how-to-convert-uiimage-to-greyscale-equivalent.html</link>
		<comments>http://blog.evandavey.com/2009/09/how-to-convert-uiimage-to-greyscale-equivalent.html#comments</comments>
		<pubDate>Mon, 28 Sep 2009 02:32:41 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[greyscale]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[UIImage]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=564</guid>
		<description><![CDATA[Here&#8217;s a simple code snippet for converting a UIImage to a greyscale equivalent:

-(UIImage *) convertToGreyscale:(UIImage *)i {

    int kRed = 1;
    int kGreen = 2;
    int kBlue = 4;

    int colors = kGreen;
    int m_width = i.size.width;
    [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple code snippet for converting a UIImage to a greyscale equivalent:</p>
<pre>
-(UIImage *) convertToGreyscale:(UIImage *)i {

    int kRed = 1;
    int kGreen = 2;
    int kBlue = 4;

    int colors = kGreen;
    int m_width = i.size.width;
    int m_height = i.size.height;

    uint32_t *rgbImage = (uint32_t *) malloc(m_width * m_height * sizeof(uint32_t));
    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
    CGContextRef context = CGBitmapContextCreate(rgbImage, m_width, m_height, 8, m_width * 4, colorSpace, kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipLast);
    CGContextSetInterpolationQuality(context, kCGInterpolationHigh);
    CGContextSetShouldAntialias(context, NO);
    CGContextDrawImage(context, CGRectMake(0, 0, m_width, m_height), [i CGImage]);
    CGContextRelease(context);
    CGColorSpaceRelease(colorSpace);

    // now convert to grayscale
    uint8_t *m_imageData = (uint8_t *) malloc(m_width * m_height);
    for(int y = 0; y < m_height; y++) {
        for(int x = 0; x < m_width; x++) {
			uint32_t rgbPixel=rgbImage[y*m_width+x];
			uint32_t sum=0,count=0;
			if (colors &#038; kRed) {sum += (rgbPixel>>24)&#038;255; count++;}
			if (colors &#038; kGreen) {sum += (rgbPixel>>16)&#038;255; count++;}
			if (colors &#038; kBlue) {sum += (rgbPixel>>8)&#038;255; count++;}
			m_imageData[y*m_width+x]=sum/count;
        }
    }
    free(rgbImage);

    // convert from a gray scale image back into a UIImage
    uint8_t *result = (uint8_t *) calloc(m_width * m_height *sizeof(uint32_t), 1);

    // process the image back to rgb
    for(int i = 0; i < m_height * m_width; i++) {
        result[i*4]=0;
        int val=m_imageData[i];
        result[i*4+1]=val;
        result[i*4+2]=val;
        result[i*4+3]=val;
    }

    // create a UIImage
    colorSpace = CGColorSpaceCreateDeviceRGB();
    context = CGBitmapContextCreate(result, m_width, m_height, 8, m_width * sizeof(uint32_t), colorSpace, kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipLast);
    CGImageRef image = CGBitmapContextCreateImage(context);
    CGContextRelease(context);
    CGColorSpaceRelease(colorSpace);
    UIImage *resultUIImage = [UIImage imageWithCGImage:image];
    CGImageRelease(image);

    // make sure the data will be released by giving it to an autoreleased NSData
    [NSData dataWithBytesNoCopy:result length:m_width * m_height];

    return resultUIImage;
}
</pre>
<p>Thanks to the friendly people at <a href="http://stackoverflow.com/questions/1298867/convert-image-to-grayscale">StackOverflow.com</a> for this snipet.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2009/09/how-to-convert-uiimage-to-greyscale-equivalent.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.evandavey.com/2009/09/how-to-convert-uiimage-to-greyscale-equivalent.html</feedburner:origLink></item>
		<item>
		<title>What does iPhone OS 3.0 Mean for your Apps?</title>
		<link>http://feedproxy.google.com/~r/EvsTechThoughtOfTheDay/~3/RL0SZJ1SRLY/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 [...]]]></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>
		<feedburner:origLink>http://blog.evandavey.com/2009/08/what-does-iphone-os-3-0-mean-for-your-apps.html</feedburner:origLink></item>
		<item>
		<title>Google Maps: Zoom Level, Center from points on map</title>
		<link>http://feedproxy.google.com/~r/EvsTechThoughtOfTheDay/~3/bivE6BW8ZwE/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 [...]]]></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>
		<feedburner:origLink>http://blog.evandavey.com/2009/08/google-maps-zoom-level-center-from-points-on-map.html</feedburner:origLink></item>
		<item>
		<title>How-To: Recursively remove .svn folders</title>
		<link>http://feedproxy.google.com/~r/EvsTechThoughtOfTheDay/~3/5jQu7_JcUg0/how-to-recursively-remove-svn-folders.html</link>
		<comments>http://blog.evandavey.com/2009/08/how-to-recursively-remove-svn-folders.html#comments</comments>
		<pubDate>Wed, 05 Aug 2009 01:02:53 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=546</guid>
		<description><![CDATA[Okay, so you&#8217;ve accidentally adding a bunch of files to SVN.  Or, you need to copy a bunch of files but you don&#8217;t want to take the .svn folders with you.  How to get rid of these?  On any *nix machine (Mac included) you can run the following command:

rm -rf `find . -type d -name [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, so you&#8217;ve accidentally adding a bunch of files to SVN.  Or, you need to copy a bunch of files but you don&#8217;t want to take the .svn folders with you.  How to get rid of these?  On any *nix machine (Mac included) you can run the following command:</p>
<pre>
rm -rf `find . -type d -name .svn`
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2009/08/how-to-recursively-remove-svn-folders.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.evandavey.com/2009/08/how-to-recursively-remove-svn-folders.html</feedburner:origLink></item>
		<item>
		<title>How-To: Convert NSData to NSString</title>
		<link>http://feedproxy.google.com/~r/EvsTechThoughtOfTheDay/~3/NKg1KYe9zJw/how-to-convert-nsdata-to-nsstring.html</link>
		<comments>http://blog.evandavey.com/2009/07/how-to-convert-nsdata-to-nsstring.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 00:44:03 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=542</guid>
		<description><![CDATA[How do you convert an NSData object into it&#8217;s string representation?  Should be easy, right?  It is, when you know how&#8230;
NSString* theString = [[NSString alloc] initWithData:theData encoding:NSASCIIStringEncoding];
]]></description>
			<content:encoded><![CDATA[<p>How do you convert an NSData object into it&#8217;s string representation?  Should be easy, right?  It is, when you know how&#8230;</p>
<pre><tt>NSString* theString = [[NSString alloc] initWithData:theData encoding:NSASCIIStringEncoding];</tt></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2009/07/how-to-convert-nsdata-to-nsstring.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.evandavey.com/2009/07/how-to-convert-nsdata-to-nsstring.html</feedburner:origLink></item>
		<item>
		<title>iPhone UIScrollView with UIImageView have issues Interface Builder</title>
		<link>http://feedproxy.google.com/~r/EvsTechThoughtOfTheDay/~3/UapxAQPX_2U/iphone-uiscrollview-with-uiimageview-have-issues-interface-builder.html</link>
		<comments>http://blog.evandavey.com/2009/07/iphone-uiscrollview-with-uiimageview-have-issues-interface-builder.html#comments</comments>
		<pubDate>Mon, 13 Jul 2009 22:55:58 +0000</pubDate>
		<dc:creator>damien.wilmann</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Interface Builder]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[UIImageView]]></category>
		<category><![CDATA[UIScrollView]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=537</guid>
		<description><![CDATA[Ever wanted to have an image view in a scrollview? Sure, you could directly add it using code, but wouldn&#8217;t it be nice to do it in Interface Builder?
If you&#8217;re like me, you like to leave on the defaults unless absolutely necessary. I had an issue where I added an image view to the scroll [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to have an image view in a scrollview? Sure, you could directly add it using code, but wouldn&#8217;t it be nice to do it in Interface Builder?</p>
<p>If you&#8217;re like me, you like to leave on the defaults unless absolutely necessary. I had an issue where I added an image view to the scroll view in Interface Builder.<br />
The image view then had an image added to in code. I resized the content view of the scroll view in code to be the same size as the image view (which you have to do<br />
in order to get it to scroll).</p>
<p>Unfortunately, when an image larger than the scrollview was used, it went off the top of the scroll view by about 30px. I thought its origin was using the main view,<br />
instead of the scroll view&#8217;s frame, but after modifying various properties I had no luck &#8211; and strange results, with the image always returning to about 30px higher than<br />
the scroll view content area.</p>
<p>After trying to resolve things programattically, I resorted to Interface Builder again. I tried any number of properties on the scroll view to get its content<br />
placed at its origin. It turns out that, by default, a UIImageView has a default &#8220;Mode&#8221; of center. That affects its alignment in its <emph>parent view</emph>. This ain&#8217;t<br />
HTML kids, it is the elements themselves who decide how they are aligned in their parent elements. So, I just change the &#8220;Mode&#8221; to &#8220;Top Left&#8221;, and Robert&#8217;s your mother&#8217;s<br />
brother.</p>
<p><img src="http://blog.evandavey.com/wp-content/uploads/2009/07/top-left.png" alt="Top Left Screenshot" /></p>
<p>The code for getting the scroll view to scroll (just FYI) is included below. If thisImage is bigger than the scroll view in any dimension, it will let you scroll<br />
in the corresponding direction &#8211; but if it&#8217;s the same size or smaller, no scrolling is possible in that direction. Pretty nice. self.scrollView, by the way, has<br />
only the default Interface Builder properties.</p>
<pre>
CGImageRef imageRef = thisImage.CGImage;
CGFloat width = CGImageGetWidth(imageRef);
CGFloat height = CGImageGetHeight(imageRef);

[self.scrollView setContentSize:CGSizeMake(width, height)];
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2009/07/iphone-uiscrollview-with-uiimageview-have-issues-interface-builder.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.evandavey.com/2009/07/iphone-uiscrollview-with-uiimageview-have-issues-interface-builder.html</feedburner:origLink></item>
		<item>
		<title>How-To: Detect when MKAnnotation, MKAnnotationView is selected</title>
		<link>http://feedproxy.google.com/~r/EvsTechThoughtOfTheDay/~3/uuq4upjRCe4/how-to-detect-when-mkannotation-mkannotationview-is-selected.html</link>
		<comments>http://blog.evandavey.com/2009/07/how-to-detect-when-mkannotation-mkannotationview-is-selected.html#comments</comments>
		<pubDate>Mon, 13 Jul 2009 00:24:05 +0000</pubDate>
		<dc:creator>Ev</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[MapKit]]></category>
		<category><![CDATA[MKAnnotation]]></category>
		<category><![CDATA[MKAnnotationView]]></category>
		<category><![CDATA[MKMapView]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=533</guid>
		<description><![CDATA[I&#8217;m using MapKit to display a satellite map in one of my apps.  I create custom annotations &#8211; and it all works great.  However I wanted to be able to play sounds when a user touches one of my MKAnnotation&#8217;s on my MapKit MKMapView so that the sound matches the display of the callout (and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using MapKit to display a satellite map in one of my apps.  I create custom annotations &#8211; and it all works great.  However I wanted to be able to play sounds when a user touches one of my MKAnnotation&#8217;s on my MapKit MKMapView so that the sound matches the display of the callout (and when it disappears too).</p>
<p>There is no delegate method or other built-in mechanism for detecting when your annotation is selected, however it does have a selected property.  So how to detect when the MKAnnotation is selected and then play my sounds?  The answer is key/value observing.</p>
<p>Setup an observer on our imageAnnontationView:</p>
<pre>[imageAnnotationView addObserver:self
		 forKeyPath:@"selected"
		options:NSKeyValueObservingOptionNew
		context:GMAP_ANNOTATION_SELECTED];</pre>
<p>Then we get a callback whenever the selected property of our annotation changes:</p>
<pre>- (void)observeValueForKeyPath:(NSString *)keyPath
                      ofObject:(id)object
                        change:(NSDictionary *)change
                       context:(void *)context{

    NSString *action = (NSString*)context;

    if([action isEqualToString:GMAP_ANNOTATION_SELECTED]){
      BOOL annotationAppeared = [[change valueForKey:@"new"] boolValue];
     // do something
   }
}</pre>
<p>The value of annotationAppeared will change based on the state of the annontations selected property.  GMAP_ANNONTATION_SELECTED is a constant string I set at the top of my file.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2009/07/how-to-detect-when-mkannotation-mkannotationview-is-selected.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://blog.evandavey.com/2009/07/how-to-detect-when-mkannotation-mkannotationview-is-selected.html</feedburner:origLink></item>
		<item>
		<title>yum fails: Fixing Fedora Core 5 yum repositories</title>
		<link>http://feedproxy.google.com/~r/EvsTechThoughtOfTheDay/~3/CDepzo7M-Lw/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 repositories in [...]]]></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>4</slash:comments>
		<feedburner:origLink>http://blog.evandavey.com/2009/07/yum-fails-fixing-fedora-core-5-yum-repositories.html</feedburner:origLink></item>
		<item>
		<title>iPhone: Bugged UINavigationController? View doesn’t Scroll.</title>
		<link>http://feedproxy.google.com/~r/EvsTechThoughtOfTheDay/~3/mNWHSanFXSI/bugged-navigation-view-stuck.html</link>
		<comments>http://blog.evandavey.com/2009/07/bugged-navigation-view-stuck.html#comments</comments>
		<pubDate>Fri, 10 Jul 2009 01:19:27 +0000</pubDate>
		<dc:creator>damien.wilmann</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Stuck]]></category>
		<category><![CDATA[UINavigationController]]></category>
		<category><![CDATA[UIView]]></category>

		<guid isPermaLink="false">http://blog.evandavey.com/?p=524</guid>
		<description><![CDATA[Developing a networked iPhone application, I had two views that were very similar &#8211; so similar in fact that they were copies of one-another with &#8220;Sending&#8221; renamed to &#8220;Receiving&#8221;. The idea was to get them both working with different XIB files, and then modify them.
The code to load the sending view (from the main app [...]]]></description>
			<content:encoded><![CDATA[<p>Developing a networked iPhone application, I had two views that were very similar &#8211; so similar in fact that they were copies of one-another with &#8220;Sending&#8221; renamed to &#8220;Receiving&#8221;. The idea was to get them both working with different XIB files, and then modify them.</p>
<p>The code to load the sending view (from the main app delegate) was:</p>
<pre>- (IBAction)sendContact:(id)sender
{
	DataController* dc = [DataController sharedInstance];
	dc.contactRecord = (NSMutableDictionary*) [self.userDefaults dictionaryForKey:@"currentUser"];

	SendingViewController *sendingViewController = [[SendingViewController alloc] initWithNibName:@"ReceiverView" bundle:nil];
	[self setBackButtonText:@"Back"];
	[self.navigationController pushViewController:sendingViewController animated:YES];
	[sendingViewController release];
}</pre>
<p>The code for the receiving view was:</p>
<pre>- (IBAction)receiveContact:(id)sender
{
	ReceivingViewController *receiverViewController = [[ReceivingViewController alloc] initWithNibName:@"ReceivingView" bundle:nil];
	[self setBackButtonText:@"Back"];
	[self.navigationController pushViewController:receiverViewController animated:YES];
	[receiverViewController release];
}</pre>
<p>On load, I could _swear_ that nothing happend with the DataController&#8217;s contact record. But something screwy was going on. When I hit &#8220;send&#8221; first  (on app launch), hitting &#8220;receive&#8221; worked fine (you could navigate back with no worries at all). However, when you hit &#8220;receive&#8221; first, going back only got the navigation bar to change, while the receive view was still visible.</p>
<p>It took ages, but setting contactRecord in the DataController shared instance fixed the problem.</p>
<p>The thing is, the view loaded just fine, no worries at all. No errors or warnings occured&#8230; and I wasn&#8217;t using contactRecord for anything on the view. So why did it behave like it encountered an error? I searched the code, and I was setting a label (which didn&#8217;t even exist on-screen anymore, it was an unused IBOutlet UILabel) to something contained in the DataController. Why it didn&#8217;t error properly, and why that stopped the view from unloading properly is completely beyond me&#8230; The NavigationBar operates (somewhat) in isolation from the views inside it, so if a view gets stuck (but not the Nav control) you can find yourself in a very weird situation.</p>
<p>So, my advice to you is:</p>
<ul>
<li>It ain&#8217;t the same until it&#8217;s _exactly_ the same.</li>
<li>Just because it doesn&#8217;t error, doesn&#8217;t mean it hasn&#8217;t produced an error.</li>
<li>If you can at all avoid it, don&#8217;t copy paste entire files. Best to start empty and include the stuff you need instead.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.evandavey.com/2009/07/bugged-navigation-view-stuck.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.evandavey.com/2009/07/bugged-navigation-view-stuck.html</feedburner:origLink></item>
		<item>
		<title>How-To Fix: MAMP won’t start</title>
		<link>http://feedproxy.google.com/~r/EvsTechThoughtOfTheDay/~3/8mwavWiGXZ8/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 is [...]]]></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>
		<feedburner:origLink>http://blog.evandavey.com/2009/06/how-to-fix-mamp-wont-start.html</feedburner:origLink></item>
	</channel>
</rss>
