<?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>simra</title>
	<atom:link href="http://www.simra.ch/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simra.ch</link>
	<description>development &#38; design</description>
	<lastBuildDate>Fri, 26 Mar 2010 15:57:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Best photos of the year 2009 (flash gallery)</title>
		<link>http://www.simra.ch/2010/02/best-photos-of-the-year-2009-flash-gallery/</link>
		<comments>http://www.simra.ch/2010/02/best-photos-of-the-year-2009-flash-gallery/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 22:45:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=1181</guid>
		<description><![CDATA[This is a little flash gallery of some of my favorite photos I took in 2009.


swfobject.embedSWF("http://www.simra.ch/uploads/photos/best-photos-of-the-year-2009/photos.swf", "best-photos-of-the-year-2009", "450", "400", "9.0.0","http://www.simra.ch/uploads/photos/best-photos-of-the-year-2009/", {}, {wmode:"transparent",base:"."});

]]></description>
			<content:encoded><![CDATA[<p>This is a little flash gallery of some of my favorite photos I took in 2009.<br />
<span id="more-1181"></span><br />
<script type="text/javascript">
swfobject.embedSWF("http://www.simra.ch/uploads/photos/best-photos-of-the-year-2009/photos.swf", "best-photos-of-the-year-2009", "450", "400", "9.0.0","http://www.simra.ch/uploads/photos/best-photos-of-the-year-2009/", {}, {wmode:"transparent",base:"."});</script></p>
<div id="best-photos-of-the-year-2009"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2010/02/best-photos-of-the-year-2009-flash-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code::Blocks and SQLite3</title>
		<link>http://www.simra.ch/2010/02/codeblocks-and-sqlite3/</link>
		<comments>http://www.simra.ch/2010/02/codeblocks-and-sqlite3/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 21:47:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[dlltool]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[wxwidgets]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=1177</guid>
		<description><![CDATA[This is a little tutorial of how to use SQLite with Code::Blocks. It is assumed that you have already installed Code::Blocks with MinGW.

This is the way I did it:
1. Download sqlitedll-3_6_22.zip and sqlite-source-3_6_22.zip from http://www.sqlite.org/download.html
2. Extract sqlitedll-3.6.22.zip and then run from the command line:
dlltool -D sqlite3.dll -d sqlite3.def -l libsqlite3dll.a
You will now have libsqlite3dll.a, which [...]]]></description>
			<content:encoded><![CDATA[<p>This is a little tutorial of how to use SQLite with Code::Blocks. It is assumed that you have already installed Code::Blocks with MinGW.<br />
<span id="more-1177"></span><br />
This is the way I did it:</p>
<p>1. Download sqlitedll-3_6_22.zip and sqlite-source-3_6_22.zip from <a href="http://www.sqlite.org/download.html">http://www.sqlite.org/download.html</a></p>
<p>2. Extract sqlitedll-3.6.22.zip and then run from the command line:</p>
<blockquote><p>dlltool -D sqlite3.dll -d sqlite3.def -l libsqlite3dll.a</p></blockquote>
<p>You will now have libsqlite3dll.a, which should be placed in the MinGW lib directory.</p>
<p>3. Place sqlite3.dll in your system path.</p>
<p>4. Extract sqlite-source-3_6_22.zip and place sqlite3.h in your MinGW include directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2010/02/codeblocks-and-sqlite3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Tutorial 2 (Interface Builder &#8211; Downloader)</title>
		<link>http://www.simra.ch/2010/02/iphone-tutorial-2-interface-builder-downloader/</link>
		<comments>http://www.simra.ch/2010/02/iphone-tutorial-2-interface-builder-downloader/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 19:54:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[interface builder]]></category>
		<category><![CDATA[UIButton]]></category>
		<category><![CDATA[UITextField]]></category>
		<category><![CDATA[UITextView]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=1134</guid>
		<description><![CDATA[In diesem Tutorial geht es darum ein einfaches iPhone-App zu erstellen, dass eine beliebige Url herunterläd und den Inhalt ausgibt. Zusätzlich wird der Interface Builder kurz vorgestellt.

Wenn die iPhone SDK bereits installiert wurde, erscheint das folgende Fenseter mit den iPhone Projekt Templates. Wir wählen das Letzte &#8220;Window-Based Application&#8221; und nennen das Projekt &#8220;downloader&#8221;.

Wenn wir unmittelbar [...]]]></description>
			<content:encoded><![CDATA[<p>In diesem Tutorial geht es darum ein einfaches iPhone-App zu erstellen, dass eine beliebige Url herunterläd und den Inhalt ausgibt. Zusätzlich wird der Interface Builder kurz vorgestellt.<br />
<span id="more-1134"></span><br />
Wenn die iPhone SDK bereits installiert wurde, erscheint das folgende Fenseter mit den iPhone Projekt Templates. Wir wählen das Letzte &#8220;Window-Based Application&#8221; und nennen das Projekt <strong>&#8220;downloader&#8221;</strong>.</p>
<p><img class="aligncenter size-full wp-image-1135" title="iphone-new-project-2" src="http://www.simra.ch/wordpress/../uploads/2010/02/iphone-new-project-2.png" alt="" width="450" height="332" /></p>
<p>Wenn wir unmittelbar nach dem Erstellen des Projekts auf <strong>&#8220;Build and Go&#8221;</strong> klicken erscheint ein leeres Fenster. Als nächstes werden wir ein kleines Formular mit Textbox, Button und Textarea kreieren.</p>
<p>Dazu öffnen wir die Datei MainWindow.xib (Mehr zur Bedeutung der Standard Dateien finden Sie <a title="iPhone SDK Standard Dateien" href="http://www.simra.ch/2010/02/iphone-sdk-standard-dateien/" target="_blank">hier</a>). Das ist die Ansicht (View), die als Erstes gestartet wird.</p>
<p>Wenn sich der Interface-Builder gestartet hat, fügen wir über die Library ein <strong>UITextField</strong>, ein <strong>UIButton</strong> und ein <strong>UITextView</strong> zum leeren Fenster hinzu. Dannach sollte das Fenster wie folgt aussehen.</p>
<p><img src="http://www.simra.ch/wordpress/../uploads/2010/02/tutorial-2-1.png" alt="" title="tutorial-2-1" width="200" height="313" class="aligncenter size-full wp-image-1157" /></p>
<p>Als nächstes müssen wir die Delegationen für diese drei Elemente (<strong>UITextField, UIButton und UITextView</strong>) definieren.<br />
Dies geschiet in der Header-Datei <strong>downloaderAppDelegate.h</strong>.</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#import &lt;UIKit/UIKit.h&gt;</span><br />
<br />
<span style="color: #a61390;">@interface</span> downloaderAppDelegate <span style="color: #002200;">:</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/"><span style="color: #400080;">NSObject</span></a> &lt;UIApplicationDelegate&gt; <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; UIWindow <span style="color: #002200;">*</span>window;<br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Die Url-Eingabe</span><br />
&nbsp; &nbsp; IBOutlet UITextField <span style="color: #002200;">*</span> url;<br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Die Ausgabe </span><br />
&nbsp; &nbsp; IBOutlet UITextView <span style="color: #002200;">*</span> content;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #11740a; font-style: italic;">// Unser Download-Button</span><br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>IBAction<span style="color: #002200;">&#41;</span>download<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span>sender;<br />
<br />
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic, retain<span style="color: #002200;">&#41;</span> IBOutlet UIWindow <span style="color: #002200;">*</span>window;<br />
<br />
<span style="color: #a61390;">@end</span></div></div>
<p><em>Die Funktion <strong>IBAction</strong> wird später der Click-Event des Download-Buttons.</em></p>
<p>Jetzt müssen wir die beiden deklarierten <strong>IBOutlet</strong> und unsere <strong>IBAction</strong> mit den Elementen verknüpfen. Dazu öffnen wir wieder die Datei <strong>MainWindow.xib</strong> und somit den Interface-Builder. Um ein Element zu verknüpfen kann der <strong>Connections Inspector</strong> verwendet werden oder es wird mit der rechten Maustaste auf das gewünschte Objekt geklickt (siehe folgende Abbildungen).</p>
<p><img src="http://www.simra.ch/wordpress/../uploads/2010/02/tutorial-2-2.png" alt="" title="tutorial-2-2" width="450" height="361" class="aligncenter size-full wp-image-1155" /><br />
<em>Rechtsklick auf das UITextField und im Menu rechts neben <strong>&#8220;New Referencing Outlet&#8221;</strong> auf den Kreis klicken und mit der Maus auf <strong>downloaderAppDelegate</strong> ziehen und Variable <strong>url</strong> auswählen.</em></p>
<p>Nun verknüpfen wir den Button mit der <strong>IBAction</strong>, damit wir später den Click-Event bekommen.</p>
<p><img src="http://www.simra.ch/wordpress/../uploads/2010/02/tutorial-2-3.png" alt="" title="tutorial-2-3" width="450" height="362" class="aligncenter size-full wp-image-1160" /><br />
<em>Rechtsklick auf den <strong>UIButton</strong> und im Menu rechts neben <strong>&#8220;Touch Up Inside&#8221;</strong> auf den Kreis klicken und mit der Maus auf <strong>downloaderAppDelegate</strong> ziehen und Variable <strong>download</strong> auswählen.</em></p>
<p>Jetzt brauchen wir noch das <strong>UITextView</strong> zu verknüpfen. Das geschieht gleich wie beim <strong>UITextField</strong>.<br />
<img src="http://www.simra.ch/wordpress/../uploads/2010/02/tutorial-2-4.png" alt="" title="tutorial-2-4" width="450" height="361" class="aligncenter size-full wp-image-1161" /></p>
<p>Wenn das getan ist und das Progamm immer noch startet, können wir mit dem eigentlichen Programmieren beginnen.<br />
Dazu öffnen wir die Datei <strong>downloaderAppDelegate.m</strong> und passen den Code wie folgt an.</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6e371a;">#import &quot;downloaderAppDelegate.h&quot;</span><br />
<br />
<span style="color: #a61390;">@implementation</span> downloaderAppDelegate<br />
<br />
<span style="color: #a61390;">@synthesize</span> window;<br />
<br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>applicationDidFinishLaunching<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIApplication <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>application <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">//Starttext </span><br />
&nbsp; &nbsp; content.text <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Enter a url and press <span style="color: #2400d9;">\&quot;</span>Download<span style="color: #2400d9;">\&quot;</span>&quot;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">//Url Vorschlag</span><br />
&nbsp; &nbsp; url.text <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;http://www.simra.ch/&quot;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Override point for customization after application launch</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>window makeKeyAndVisible<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #11740a; font-style: italic;">//Click Event des Download Buttons</span><br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>IBAction<span style="color: #002200;">&#41;</span>download<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span>sender<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">//Statustext</span><br />
&nbsp; &nbsp; content.text<span style="color: #002200;">=</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;downloading...<span style="color: #2400d9;">\n</span>please wait...&quot;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">//Url anfordern</span><br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURLRequest_Class/"><span style="color: #400080;">NSURLRequest</span></a> <span style="color: #002200;">*</span>req<span style="color: #002200;">=</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURLRequest_Class/"><span style="color: #400080;">NSURLRequest</span></a> requestWithURL<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/"><span style="color: #400080;">NSURL</span></a> URLWithString<span style="color: #002200;">:</span>url.text<span style="color: #002200;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cachePolicy<span style="color: #002200;">:</span>NSURLRequestUseProtocolCachePolicy<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timeoutInterval<span style="color: #002200;">:</span>30.0<span style="color: #002200;">&#93;</span>;<br />
<br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURLResponse_Class/"><span style="color: #400080;">NSURLResponse</span></a> <span style="color: #002200;">*</span>res <span style="color: #002200;">=</span> <span style="color: #a61390;">nil</span>;<br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSError_Class/"><span style="color: #400080;">NSError</span></a> <span style="color: #002200;">*</span>err <span style="color: #002200;">=</span> <span style="color: #a61390;">nil</span>;<br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/"><span style="color: #400080;">NSData</span></a> <span style="color: #002200;">*</span>dat <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/"><span style="color: #400080;">NSURLConnection</span></a> sendSynchronousRequest<span style="color: #002200;">:</span> req returningResponse<span style="color: #002200;">:</span> <span style="color: #002200;">&amp;</span>res error<span style="color: #002200;">:</span> <span style="color: #002200;">&amp;</span>err<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span>res<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span> str <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> alloc<span style="color: #002200;">&#93;</span> initWithData<span style="color: #002200;">:</span>dat encoding<span style="color: #002200;">:</span>NSUTF8StringEncoding<span style="color: #002200;">&#93;</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; content.text <span style="color: #002200;">=</span>str;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Vorgang fehlgeschlagen -&gt; Meldung ausgeben</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; content.text <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Url couldn't be downloaded...&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; UIAlertView <span style="color: #002200;">*</span>msg <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIAlertView alloc<span style="color: #002200;">&#93;</span> initWithTitle<span style="color: #002200;">:</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Error&quot;</span> message<span style="color: #002200;">:</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Url couldn't be downloaded&quot;</span> delegate<span style="color: #002200;">:</span> self cancelButtonTitle<span style="color: #002200;">:</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Ok&quot;</span> otherButtonTitles<span style="color: #002200;">:</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>msg show<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>msg release<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>dealloc <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>window release<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>super dealloc<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<br />
<span style="color: #a61390;">@end</span></div></div>
<p>Das ganze Projekt kann <a href="http://www.simra.ch/uploads/downloads/iphone/downloader/iphone-downloader.zip">hier</a> heruntergeladen werden.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2010/02/iphone-tutorial-2-interface-builder-downloader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Tutorial 1 (UITableView)</title>
		<link>http://www.simra.ch/2010/02/iphone-tutorial-1-uitableview/</link>
		<comments>http://www.simra.ch/2010/02/iphone-tutorial-1-uitableview/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 20:39:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[UITableView]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=1105</guid>
		<description><![CDATA[In diesem ersten Tutorial geht es darum ein einfaches iPhone-App betehend aus einem UITableView zu erstellen. Es soll zeigen, wie ein Text in eine Zelle dieser Table-Übersicht geschrieben wird.

Wenn die iPhone SDK bereits installiert wurde, erscheint das folgende Fenseter mit den iPhone Projekt Templates. Wählen Sie das Erste &#8220;Navigation-Based Application&#8221; und geben Sie ein Projektname [...]]]></description>
			<content:encoded><![CDATA[<p>In diesem ersten Tutorial geht es darum ein einfaches iPhone-App betehend aus einem UITableView zu erstellen. Es soll zeigen, wie ein Text in eine Zelle dieser Table-Übersicht geschrieben wird.<br />
<span id="more-1105"></span><br />
Wenn die iPhone SDK bereits installiert wurde, erscheint das folgende Fenseter mit den iPhone Projekt Templates. Wählen Sie das Erste &#8220;Navigation-Based Application&#8221; und geben Sie ein Projektname (Hier tutorial-1).</p>
<p><img class="aligncenter size-full wp-image-1110" title="iphone-new-project" src="http://www.simra.ch/wordpress/../uploads/2010/02/iphone-new-project.png" alt="" width="450" height="332" /></p>
<p>Wenn Sie unmittelbar nach dem Erstellen des Projekts auf <strong>&#8220;Build and Go&#8221;</strong> klicken erscheint eine leere Table-Übersicht. Als nächstes werden wir eine neue Zeile mit Text hinzufügen.</p>
<p>Dazu öffnen Sie die Datei RootViewController.m (Mehr zur Bedeutung der Standard Dateien finden Sie <a title="iPhone SDK Standard Dateien" href="http://www.simra.ch/2010/02/iphone-sdk-standard-dateien/" target="_blank">hier</a>). Das ist der View-Controller, also hier der TableView der zur Hauptansicht (main view) hinzugefügt wird.</p>
<p>Suchen Sie die Funktion <strong>numberOfRowsInSection</strong>.</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #11740a; font-style: italic;">// Customize the number of rows in the table view.</span><br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView numberOfRowsInSection<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>section <span style="color: #002200;">&#123;</span><br />
<span style="color: #a61390;">return</span> <span style="color: #2400d9;">1</span>;<br />
<span style="color: #002200;">&#125;</span></div></div>
<p>Hier wird die Anzahl der Zeilen festgelegt. Ändern Sie den Rückgabewert von 0 auf 1, um dem Programm mitzuteilen, dass wir eine Zeile haben wollen.</p>
<p>Als nächstes muss die Funktion <strong>cellForRowAtIndexPath</strong> angepasst werden. Diese Funktion wird für jede Zeile einmal aufgerufen. Hier kann auch der Zellentext gesetzt werden.</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #11740a; font-style: italic;">// Customize the appearance of table view cells.</span><br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UITableViewCell <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView cellForRowAtIndexPath<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSIndexPath_Class/"><span style="color: #400080;">NSIndexPath</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>indexPath <span style="color: #002200;">&#123;</span><br />
<br />
<span style="color: #a61390;">static</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>CellIdentifier <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Cell&quot;</span>;<br />
<br />
UITableViewCell <span style="color: #002200;">*</span>cell <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>tableView dequeueReusableCellWithIdentifier<span style="color: #002200;">:</span>CellIdentifier<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>cell <span style="color: #002200;">==</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
cell <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UITableViewCell alloc<span style="color: #002200;">&#93;</span> initWithFrame<span style="color: #002200;">:</span>CGRectZero reuseIdentifier<span style="color: #002200;">:</span>CellIdentifier<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #11740a; font-style: italic;">// Set up the cell...</span><br />
<span style="color: #002200;">&#91;</span>cell setText<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Hier kommt unser Text&quot;</span><span style="color: #002200;">&#93;</span>;<br />
<br />
<span style="color: #a61390;">return</span> cell;<br />
<span style="color: #002200;">&#125;</span></div></div>
<p>Der Funktion wurde nur der Aufruf der Methode <strong>setText</strong> der Zelle mit dem Parameter <strong>&#8220;Hier kommt unser Text&#8221;</strong> hinzugefügt. Dass &#8220;@&#8221; muss beim Objective-C vor jedem String stehen.<br />
<em>[cell setText:@"Hier kommt unser Text"];</em></p>
<p>Wenn Sie jetzt wieder auf <strong>&#8220;Build and Go&#8221;</strong> klicken erscheint der Text <strong>&#8220;Hier kommt unser Text&#8221;</strong> in der Zelle.</p>
<p><img class="aligncenter size-full wp-image-1122" title="result-tutorial-1" src="http://www.simra.ch/wordpress/../uploads/2010/02/result-tutorial-1.png" alt="" width="319" height="157" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2010/02/iphone-tutorial-1-uitableview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone SDK Standard Dateien</title>
		<link>http://www.simra.ch/2010/02/iphone-sdk-standard-dateien/</link>
		<comments>http://www.simra.ch/2010/02/iphone-sdk-standard-dateien/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 11:57:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[interface builder]]></category>
		<category><![CDATA[xcode]]></category>
		<category><![CDATA[xib]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=1114</guid>
		<description><![CDATA[Hello_WorldAppDelegate.m – All of the magic starts here.  Consider this file our starting point for execution.  The main.m file invokes this object.]]></description>
			<content:encoded><![CDATA[<p>Nach dem Sie ein neues iPhone Projekt erstellt haben, finden Sie diverse vordefinierte Dateien. Im folgenden wird die Bedeutung dieser Dateien kurz erläutert.<br />
<span id="more-1114"></span></p>
<ul>
<li><strong>CoreGraphics.framework, Foundation.framwork, UIKit.framework</strong> &#8211; Das sind die Library-Files, die von Apple für die iPhone Programmierung mitgeliefert werden. Sie werden ganz normal als Includes wie in anderen Programmiersprachen eingebunden.</li>
<li><strong>Projekt-Name.app</strong> &#8211; Das ist die Programmdatei, die anschliessend auf dem iPhone installiert wird.</li>
<li><strong>MainWindow.xib</strong> &#8211; .xib Datien sind Interface-Builder-Dateien, die visuelle Information (Buttons, Textboxen etc.) enthalten. Die MainWindow.xib ist die Hauptansicht, die zuallererst getartet wird. Wir eine .xib Datei doppelt angeklickt, öffnet sich der Interface Builder.</li>
<li><strong>Projekt-NameAppDelegate.h</strong> &#8211; Das ist die Header-Datei unsere Hauptansicht. Sie enthät alle Definitionen für Variablen, die gebraucht werden. Sie entspricht in etwa einer Header-Datei in C oder C++.</li>
<li><strong>Projekt-NameAppDelegate.m</strong> &#8211; Sie ist der Startpunkt unseres Programms und enthält die Funktionen für unsere Hauptansicht. Sie wird von der Datei main.m aufgerufen.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2010/02/iphone-sdk-standard-dateien/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Highlight Search Words in php</title>
		<link>http://www.simra.ch/2010/02/highlight-search-words-in-php/</link>
		<comments>http://www.simra.ch/2010/02/highlight-search-words-in-php/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 17:30:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[eregi_replace]]></category>
		<category><![CDATA[ereg_replace]]></category>
		<category><![CDATA[preg_replace]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[RegularExpressions]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=1102</guid>
		<description><![CDATA[Many sites have opted for highlighting the keywords from their searches. This can be useful for quickly finding relavant words within large pages of text. 
The following php function highlights words within html content (words in tags  are ignored). Here you can find a live demo http://www.newsaddict.ch.

function highlight_html_content &#40;$text, $search&#41;
&#123;
&#160; &#160; $search = eregi_replace&#40;&#34;[^-a-zA-Z0-9üäöÜÄÖèéê&#38;']&#34;, [...]]]></description>
			<content:encoded><![CDATA[<p>Many sites have opted for highlighting the keywords from their searches. This can be useful for quickly finding relavant words within large pages of text. </p>
<p>The following php function highlights words within html content (words in tags <> are ignored). Here you can find a live demo <a href="http://www.newsaddict.ch" target="_blank">http://www.newsaddict.ch</a>.<br />
<span id="more-1102"></span></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> highlight_html_content <span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #339933;">,</span> <span style="color: #000088;">$search</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$search</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/eregi_replace"><span style="color: #990000;">eregi_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;[^-a-zA-Z0-9üäöÜÄÖèéê&amp;']&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$search</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Sonderzeichen entfernen </span><br />
&nbsp; &nbsp; <span style="color: #000088;">$search</span><span style="color: #339933;">=</span> <a href="http://www.php.net/ereg_replace"><span style="color: #990000;">ereg_replace</span></a> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;[ ]+&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$search</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Doppelte Leerzeichen entfernen</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000088;">$words</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$search</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Array mit Wörter erstellen</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$words</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$word</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$w</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/preg_quote"><span style="color: #990000;">preg_quote</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$word</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$regexp</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/(<span style="color: #006699; font-weight: bold;">$w</span>)(?![^&lt;]+&gt;)/iu&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Wörter innerhalb eines Tags werden ignoriert -&gt; i Gross-/Kleinschreibung nicht beachten -&gt; u UTF8 damit ä=Ä ü=Ü...</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$replacement</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;b style=&quot;color:#FF0&quot;&gt;\\1&lt;/b&gt;'</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/preg_replace"><span style="color: #990000;">preg_replace</span></a> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$regexp</span><span style="color: #339933;">,</span><span style="color: #000088;">$replacement</span> <span style="color: #339933;">,</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$text</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2010/02/highlight-search-words-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>www.newsaddict.ch</title>
		<link>http://www.simra.ch/2010/02/newsaddict/</link>
		<comments>http://www.simra.ch/2010/02/newsaddict/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 10:37:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[mynews]]></category>
		<category><![CDATA[newsbook]]></category>
		<category><![CDATA[newsjunkie]]></category>
		<category><![CDATA[newsroom]]></category>
		<category><![CDATA[thelates]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=1092</guid>
		<description><![CDATA[NewsAddict ist ein webbasiertes Tool, das diverse Zeitungen, Zeitschriften, Blogs, Community Seiten und viele mehr nach den neusten News, Blogeinträgen, Videos und Bilder durchsucht. Es ist die perfekte Startseite, um auf dem Laufenden zu bleiben, sich über brennende Themen zu informieren oder um ein Suchlauf über mehrere Quellen geleichzeitig zu starten.]]></description>
			<content:encoded><![CDATA[<p>NewsAddict ist ein webbasiertes Tool, das diverse Zeitungen, Zeitschriften, Blogs, Community Seiten und viele mehr nach den neusten News, Blogeinträgen, Videos und Bilder durchsucht. Es ist die perfekte Startseite, um auf dem Laufenden zu bleiben, sich über brennende Themen zu informieren oder um ein Suchlauf über mehrere Quellen geleichzeitig zu starten.<br />
<a href="http://www.newsaddict.ch" target="_blank">http://www.newsaddict.ch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2010/02/newsaddict/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EDW (Edwelweiss Air) Widget</title>
		<link>http://www.simra.ch/2010/02/edw-edwelweiss-air-widget/</link>
		<comments>http://www.simra.ch/2010/02/edw-edwelweiss-air-widget/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 10:24:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[http post request]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=1084</guid>
		<description><![CDATA[Das EDW Widget für OS X wurde für Piloten der Firma Edelweiss Air konzipiert. Mit ihm können Piloten den aktuellen Flugkalender, Fluginformationen und neuste Meldungen abrufen. Das Programm basiert auf Javascript und wurde mit dashcode entwickelt. ]]></description>
			<content:encoded><![CDATA[<p>Das EDW Widget für OS X wurde für Piloten der Firma Edelweiss Air konzipiert. Mit ihm können Piloten den aktuellen Flugkalender, Fluginformationen und neuste Meldungen abrufen. Das Programm basiert auf Javascript und wurde mit dashcode entwickelt.<br />
<span id="more-1084"></span><br />
<img src="http://www.simra.ch/wordpress/../uploads/2010/02/edw1.png" alt="" title="Printscreen EDW" width="458" height="468" class="aligncenter size-full wp-image-1085" /></p>
<p><img src="http://www.simra.ch/wordpress/../uploads/2010/02/edw2.png" alt="" title="Printscreen EDW" width="458" height="368" class="aligncenter size-full wp-image-1086" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2010/02/edw-edwelweiss-air-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set the radius of a rounded rectangle in Adobe Illustrator</title>
		<link>http://www.simra.ch/2010/01/change-the-radius-of-a-rounded-rectangle/</link>
		<comments>http://www.simra.ch/2010/01/change-the-radius-of-a-rounded-rectangle/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 15:36:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[rounded corners]]></category>
		<category><![CDATA[rounded rectangle]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=1076</guid>
		<description><![CDATA[To change the radius of a rounded rectangle after it&#8217;s been drawn go to Effect &#8211; Stylize and select Round Corners.

]]></description>
			<content:encoded><![CDATA[<p>To change the radius of a rounded rectangle after it&#8217;s been drawn go to <strong>Effect &#8211; Stylize</strong> and select <strong>Round Corners</strong>.<span id="more-1076"></span></p>
<p><img class="aligncenter size-full wp-image-1079" title="Round Corners" src="http://www.simra.ch/wordpress/../uploads/2010/01/round_corners.gif" alt="" width="450" height="347" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2010/01/change-the-radius-of-a-rounded-rectangle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Regular Expression to extract Urls</title>
		<link>http://www.simra.ch/2010/01/php-regular-expression-to-extract-urls/</link>
		<comments>http://www.simra.ch/2010/01/php-regular-expression-to-extract-urls/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 13:17:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[preg_match_all]]></category>
		<category><![CDATA[preg_replace]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[RegularExpressions]]></category>

		<guid isPermaLink="false">http://www.simra.ch/?p=1072</guid>
		<description><![CDATA[The following function extract all links from a page and returns them as an array.

$content = file_get_contents&#40;&#34;http://www.simra.ch&#34;&#41;;
echo var_dump&#40;getLinks&#40; $content &#41;&#41;;

function getLinks&#40;$content&#41; &#123;
&#160; &#160; preg_match_all&#40;'/(href&#124;src)\=(\&#34;&#124;\')[^\&#34;\'\&#62;]+/i',$content,$media&#41;;
&#160; &#160; $array=preg_replace&#40;'/(href&#124;src)(\&#34;&#124;\'&#124;\=\&#34;&#124;\=\')(.*)/i',&#34;$3&#34;,$media&#91;0&#93;&#41;;
&#160; &#160; return $array;
&#125;
]]></description>
			<content:encoded><![CDATA[<p>The following function extract all links from a page and returns them as an array.<br />
<span id="more-1072"></span></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/file_get_contents"><span style="color: #990000;">file_get_contents</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://www.simra.ch&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <a href="http://www.php.net/var_dump"><span style="color: #990000;">var_dump</span></a><span style="color: #009900;">&#40;</span>getLinks<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$content</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> getLinks<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/preg_match_all"><span style="color: #990000;">preg_match_all</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/(href|src)\=(\&quot;|\')[^\&quot;\'\&gt;]+/i'</span><span style="color: #339933;">,</span><span style="color: #000088;">$content</span><span style="color: #339933;">,</span><span style="color: #000088;">$media</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$array</span><span style="color: #339933;">=</span><a href="http://www.php.net/preg_replace"><span style="color: #990000;">preg_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/(href|src)(\&quot;|\'|\=\&quot;|\=\')(.*)/i'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$3</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$media</span><span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$array</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.simra.ch/2010/01/php-regular-expression-to-extract-urls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
