<?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>lemmingzshadow.net</title>
	<atom:link href="http://lemmingzshadow.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://lemmingzshadow.net</link>
	<description>a webdevel&#039;s weblog</description>
	<lastBuildDate>Sun, 07 Mar 2010 18:06:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ajax Push Engine APE reanimiert JiTT</title>
		<link>http://lemmingzshadow.net/279/ajax-push-engine-ape-reanimiert-jitt/</link>
		<comments>http://lemmingzshadow.net/279/ajax-push-engine-ape-reanimiert-jitt/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 18:06:16 +0000</pubDate>
		<dc:creator>Lemmingz Shadow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[APE]]></category>
		<category><![CDATA[Websockets]]></category>
		<category><![CDATA[Webtechnik]]></category>

		<guid isPermaLink="false">http://lemmingzshadow.net/?p=279</guid>
		<description><![CDATA[Vor einiger Zeit habe ich ein kleines Bastelprojekt mit den Namen JiTT ins Leben gerufen um das Kaazing Gateway zu testen. Leider gibt es am Kaazing Gateway schon seit einiger Zeit keine Aktualisierungen mehr und mich habe mich nach Alternativen umgeschaut. Gefunden habe ich die Ajax Push Engine kurz APE.
Genau wie das Kaazing Gateway bietet [...]]]></description>
			<content:encoded><![CDATA[<p>Vor einiger Zeit habe ich ein kleines <a href="http://lemmingzshadow.net/163/jittcc-erste-gehversuche-mit-websockets/">Bastelprojekt</a> mit den Namen <a href="http://jitt.geekservice.de">JiTT</a> ins Leben gerufen um das <a href="http://www.kaazing.org/confluence/display/KAAZING/Home">Kaazing Gateway</a> zu testen. Leider gibt es am Kaazing Gateway schon seit einiger Zeit keine Aktualisierungen mehr und mich habe mich nach Alternativen umgeschaut. Gefunden habe ich die <a href="http://www.ape-project.org/">Ajax Push Engine</a> kurz APE.<br />
Genau wie das Kaazing Gateway bietet APE die Möglichkeit persistente Verbindungen zwischen Client (Browser) und Server aufzubauen. Dabei wird ein Coment-Server und ein kleines Javascript Framework benutzt.<br />
Die Installation ist Dank eines deb-Paketes sehr einfach und gut dokumentiert. Weiterhin gibt es einige Demo-Anwendungen so dass man schnell anfangen kann zu basteln.<br />
Ein Vorteil gegenüber dem Kaazing-Gateway: APE benötigt keine Java-Laufzeitumgebung und kommt somit mit wesentlich weniger Arbeitsspeicher aus. Insgesamt wirkt der Comet-Server um einiges schlaker und performanter. Lasttests konnte ich bisher noch nicht machen, ich werde mich aber bemühen dies nachzuholen.</p>
<p>Abschließend noch der Hinweis, dass das Projekt JiTT ab sofort und folgender URL zu finden ist: <a href="http://jitt.geekservice.de"><strong>http://jitt.geekservice.de</strong></a></p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-sexy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://lemmingzshadow.net/279/ajax-push-engine-ape-reanimiert-jitt/&amp;title=Ajax+Push+Engine+APE+reanimiert+JiTT" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://lemmingzshadow.net/279/ajax-push-engine-ape-reanimiert-jitt/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://lemmingzshadow.net/279/ajax-push-engine-ape-reanimiert-jitt/&amp;t=Ajax+Push+Engine+APE+reanimiert+JiTT" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Ajax+Push+Engine+APE+reanimiert+JiTT+-++(via+@lemmingzshadow)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://lemmingzshadow.net/279/ajax-push-engine-ape-reanimiert-jitt/&amp;title=Ajax+Push+Engine+APE+reanimiert+JiTT" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://lemmingzshadow.net/279/ajax-push-engine-ape-reanimiert-jitt/&amp;title=Ajax+Push+Engine+APE+reanimiert+JiTT" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://lemmingzshadow.net/279/ajax-push-engine-ape-reanimiert-jitt/&amp;title=Ajax+Push+Engine+APE+reanimiert+JiTT" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://lemmingzshadow.net/279/ajax-push-engine-ape-reanimiert-jitt/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://lemmingzshadow.net/279/ajax-push-engine-ape-reanimiert-jitt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Konstanten für Datumsformate in PHP</title>
		<link>http://lemmingzshadow.net/245/konstanten-fuer-datumsformate-in-php/</link>
		<comments>http://lemmingzshadow.net/245/konstanten-fuer-datumsformate-in-php/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 17:06:06 +0000</pubDate>
		<dc:creator>Lemmingz Shadow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://lemmingzshadow.net/?p=245</guid>
		<description><![CDATA[Andauernd vergesse ich dass es Sie gibt: Konstanten für verschiedene Datumsformate. Ausserdem sind Sie (wie ich finde) bei php.net nur schlecht dokumentiert. Darum hier nun für alle ein Codebeispiel und der Link zu den restlichen Konstanten.
Folgender Code würde z.B. soetwas ausgeben:
Wednesday, 10-Feb-10 18:02:49 CET

1
echo date&#40;DATE_COOKIE, time&#40;&#41;&#41;;

Alle dieser nützlichen Konstanten sind hier dokumentiert: Datumskonstanten bei php.net





		
			Share [...]]]></description>
			<content:encoded><![CDATA[<p>Andauernd vergesse ich dass es Sie gibt: Konstanten für verschiedene Datumsformate. Ausserdem sind Sie (wie ich finde) bei php.net nur schlecht dokumentiert. Darum hier nun für alle ein Codebeispiel und der Link zu den restlichen Konstanten.<br />
Folgender Code würde z.B. soetwas ausgeben:<br />
<em>Wednesday, 10-Feb-10 18:02:49 CET</em></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span>DATE_COOKIE<span style="color: #339933;">,</span> <span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Alle dieser nützlichen Konstanten sind hier dokumentiert: <a href="http://php.net/manual/en/class.datetime.php"><strong>Datumskonstanten bei php.net</strong></a></p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-sexy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://lemmingzshadow.net/245/konstanten-fuer-datumsformate-in-php/&amp;title=Konstanten+f%C3%BCr+Datumsformate+in+PHP" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://lemmingzshadow.net/245/konstanten-fuer-datumsformate-in-php/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://lemmingzshadow.net/245/konstanten-fuer-datumsformate-in-php/&amp;t=Konstanten+f%C3%BCr+Datumsformate+in+PHP" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Konstanten+f%C3%BCr+Datumsformate+in+PHP+-++(via+@lemmingzshadow)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://lemmingzshadow.net/245/konstanten-fuer-datumsformate-in-php/&amp;title=Konstanten+f%C3%BCr+Datumsformate+in+PHP" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://lemmingzshadow.net/245/konstanten-fuer-datumsformate-in-php/&amp;title=Konstanten+f%C3%BCr+Datumsformate+in+PHP" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://lemmingzshadow.net/245/konstanten-fuer-datumsformate-in-php/&amp;title=Konstanten+f%C3%BCr+Datumsformate+in+PHP" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://lemmingzshadow.net/245/konstanten-fuer-datumsformate-in-php/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://lemmingzshadow.net/245/konstanten-fuer-datumsformate-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: isset vs. array_key_exists</title>
		<link>http://lemmingzshadow.net/232/php-isset-vs-array_key_exists/</link>
		<comments>http://lemmingzshadow.net/232/php-isset-vs-array_key_exists/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 16:32:29 +0000</pubDate>
		<dc:creator>Lemmingz Shadow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Webtechnik]]></category>

		<guid isPermaLink="false">http://lemmingzshadow.net/?p=232</guid>
		<description><![CDATA[Heute möchte ich mal ein paar Worte zu den Funktionen isset und array_key_exists loswerden. Genauer angeschaut habe ich mir das Verhalten der beiden Funktionen beim Prüfen ob ein Feld in einem Array existiert. Bevor ich zur Performance komme möchte ich jedoch noch auf ein paar Besonderheiten der Funktionen eingehen:
Um zu prüfen ob ein Feld in [...]]]></description>
			<content:encoded><![CDATA[<p>Heute möchte ich mal ein paar Worte zu den Funktionen <em>isset</em> und <em>array_key_exists</em> loswerden. Genauer angeschaut habe ich mir das Verhalten der beiden Funktionen beim Prüfen ob ein Feld in einem Array existiert. Bevor ich zur Performance komme möchte ich jedoch noch auf ein paar Besonderheiten der Funktionen eingehen:</p>
<p>Um zu prüfen ob ein Feld in einem Array existiert ohne dabei Fehlermeldungen zu erzeugen muss vor beiden Funktionen <em>isset</em> und <em>is_array</em> aufgerufen werden.</p>
<p><strong>Beispiel:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$foo</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$foo</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$foo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'bar'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$check</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$foo</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$foo</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">array_key_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'bar'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$foo</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$check</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><span id="more-232"></span><br />
Der Grund hierfür ist nicht immer direkt ersichtlich, deswegen hier die Erklärung:<br />
<em>isset</em> erzeugt zwar keine Notices oder Warnings falls die Variable $foo nicht gesetzt ist, aber es gibt ein anderes Problem. Wenn die Variable $foo vom Typ String ist würde die Prüfung auf ein Array-Feld mit isset true liefern.</p>
<p><strong>Beispiel:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$foo</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'bar'</span><span style="color: #339933;">;</span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$foo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'bar'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// true</span></pre></td></tr></table></div>

<p>Dieses Verhalten erklärt die Notwendigkeit von <em>is_array</em> vor dem Prüfen mit isset. Das <em>isset</em> vor dem <em>is_array</em> ist schließlich notwendig weil <em>is_array</em> eine Notice erzeugt wenn die zu prüfende Variable nicht gesetzt ist.</p>
<p>Die Funktion<em> array_key_exists</em> erzeugt ein Warning falls das zu prüfende Array nicht existiert oder die übergebene Variable nicht vom Typ Array ist. Somit ist hier ebenfalls die Nutzung von <em>is_array</em> in Kombination mit <em>isset</em> zu empfehlen.</p>
<p>Mit obiger Syntax lässt sich nun eigentlich in beide Fällen prüfen ob ein Feld im einem Array existiert. Dabei ist jedoch eine Ausnahme zu beachten, und zwar der Wert null in einem Array.</p>
<p><strong>Beispiel:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$foo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'bar'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$foo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'bar'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// false</span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array_key_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'bar'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$foo</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// true</span></pre></td></tr></table></div>

<p>Damit sollte die Verwendung der beiden Funktionen geklärt sein (falls nicht bitte ich um einen kurzen Kommentar), aber es bleibt die Frage: Welche der beiden Varianten ist schneller, <em>isset</em> oder <em>array_key_exists</em>?<br />
Hier das Ergebnis:<br />
<a href="http://lemmingzshadow.net/wp-content/uploads/2009/10/performance_array_key_exists.jpg"><img src="http://lemmingzshadow.net/wp-content/uploads/2009/10/performance_array_key_exists-150x150.jpg" alt="performance_array_key_exists" title="performance_array_key_exists" width="150" height="150" class="alignnone size-thumbnail wp-image-240" style="float: left; margin: 5px;" /></a> <a href="http://lemmingzshadow.net/wp-content/uploads/2009/10/performance_isset.jpg"><img src="http://lemmingzshadow.net/wp-content/uploads/2009/10/performance_isset-150x150.jpg" alt="performance_isset" title="performance_isset" width="150" height="150" class="alignnone size-thumbnail wp-image-241" style="float: left; margin: 5px;" /></a></p>
<div style="clear: both;"></div>
<p>Klare Sache: <em>isset</em> ist wesentlich schneller als <em>array_key_exists</em>, 10000 Prüfungen dauert nur etwa halb so lange.<br />
Zudem fallen zwei weitere Dinge auf: <em>isset</em> taucht nicht in den Xdebug Ergebnissen auf. Die Begründung ist relativ simpel. Da <em>isset</em> keine Funktion ist sondern lediglich ein Sprachkonstrukt, taucht dieses nicht in den Xdebug-Listings auf. Weiterhin fällt auf, dass is_array fast genauso viel Zeit in Anspruch nimmt wie <em>array_key_exists</em>. Hierfür habe ich leider keine Erklärung, denn ich hätte erwarten dass <em>array_key_exists</em> im Gegensatz zu <em>is_array</em> eine Array-Funktion und damit wesentlich langsamer ist. Falls jemand eine Erklärung hat: Immer her damit!</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-sexy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://lemmingzshadow.net/232/php-isset-vs-array_key_exists/&amp;title=PHP%3A+isset+vs.+array_key_exists" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://lemmingzshadow.net/232/php-isset-vs-array_key_exists/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://lemmingzshadow.net/232/php-isset-vs-array_key_exists/&amp;t=PHP%3A+isset+vs.+array_key_exists" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=PHP%3A+isset+vs.+array_key_exists+-++(via+@lemmingzshadow)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://lemmingzshadow.net/232/php-isset-vs-array_key_exists/&amp;title=PHP%3A+isset+vs.+array_key_exists" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://lemmingzshadow.net/232/php-isset-vs-array_key_exists/&amp;title=PHP%3A+isset+vs.+array_key_exists" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://lemmingzshadow.net/232/php-isset-vs-array_key_exists/&amp;title=PHP%3A+isset+vs.+array_key_exists" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://lemmingzshadow.net/232/php-isset-vs-array_key_exists/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://lemmingzshadow.net/232/php-isset-vs-array_key_exists/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP-Performance: preg_match vs. strpos</title>
		<link>http://lemmingzshadow.net/214/php-performance-preg_match-vs-strpos/</link>
		<comments>http://lemmingzshadow.net/214/php-performance-preg_match-vs-strpos/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 17:40:42 +0000</pubDate>
		<dc:creator>Lemmingz Shadow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Webtechnik]]></category>

		<guid isPermaLink="false">http://lemmingzshadow.net/?p=214</guid>
		<description><![CDATA[Folgendes Problem hat man als Coder sicherlich öfters zu lösen: Man möchte wissen ob String A,  String B oder String C (u.s.w) in einem Text vorkommen. Beispielsweise holt man eine Liste mit Keywords aus einer Datenbank und möchte wissen ob eins dieser Keywords in einem Text vorkommt.
Um das Problem zu lösen gibt es sicherlich [...]]]></description>
			<content:encoded><![CDATA[<p>Folgendes Problem hat man als Coder sicherlich öfters zu lösen: Man möchte wissen ob String A,  String B oder String C (u.s.w) in einem Text vorkommen. Beispielsweise holt man eine Liste mit Keywords aus einer Datenbank und möchte wissen ob eins dieser Keywords in einem Text vorkommt.<br />
Um das Problem zu lösen gibt es sicherlich zig verschiedene Möglichkeiten. Die gängigsten sehen wahrscheinlich in etwas so aus:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">stripos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$haystack</span><span style="color: #339933;">,</span> <span style="color: #000088;">$needle</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$found</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$needle</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/is'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$haystack</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$found</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>		
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><span id="more-214"></span><br />
Hierbei wird eine Sache schnell klar: Bei mehr als einem Suchsting wird das ganze etwas komplizierter. Man muss die strpos Variante für jeden Suchstring einmal laufen lassen, bzw. in der zweiten Variante die Suchstrings mit einem oder verknüpfen.<br />
Die Frage ist nun: Welche der beiden Varianten ist schneller?</p>
<p>Ich habe ein kurzes Testscript gebastelt, und hier ist das Ergebnis:<br />
<a href="http://lemmingzshadow.net/wp-content/uploads/2009/10/performance_preg_match.jpg"><img src="http://lemmingzshadow.net/wp-content/uploads/2009/10/performance_preg_match-150x150.jpg" alt="performance_preg_match" title="performance_preg_match" width="150" height="150" class="alignnone size-thumbnail wp-image-217" style="margin: 5px; float: left;" /></a> <a href="http://lemmingzshadow.net/wp-content/uploads/2009/10/performance_strpos.jpg"><img src="http://lemmingzshadow.net/wp-content/uploads/2009/10/performance_strpos-150x150.jpg" alt="performance_strpos" title="performance_strpos" width="150" height="150" class="alignnone size-thumbnail wp-image-228" style="margin: 5px; float: left;" /></a>
<div style="clear: both;"></div>
<p>Die preg_match Varinate ist um einiges schneller. Ausserdem fällt auf das bei 10000 Durchläufen des Testscript die Funktion stripos öfter als 10000 mal ausgeführt wird. Die liegt daran, dass die Funktion so oft aufgerufen werden muss, bis der erste Suchstring gefunden wurde (oder eben keiner der gesuchten Strings im Text vorkommt). Durch die oder-Verknüpfung der einzelnen Strings muss preg_match bei jedem Durchlauf nur einmal ausgeführt werden.<br />
Klar wird also: Je mehr Suchstrings in einem Text gesucht werden sollen, desto langsamer wird die strpos Variante im Vergleich zu preg_match, obwohl natürlich auch der reguläre Ausdruck bei einem längeren Suchstring etwas langsamer wird.</p>
<p>Zum Schluss noch das Script mit dem ich dieses Verhalten getestet habe:<br />
<a href='http://lemmingzshadow.net/wp-content/uploads/2009/10/performance_preg_vs_strpos_php.txt'>performance_preg_vs_strpos.php</a></p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-sexy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://lemmingzshadow.net/214/php-performance-preg_match-vs-strpos/&amp;title=PHP-Performance%3A+preg_match+vs.+strpos" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://lemmingzshadow.net/214/php-performance-preg_match-vs-strpos/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://lemmingzshadow.net/214/php-performance-preg_match-vs-strpos/&amp;t=PHP-Performance%3A+preg_match+vs.+strpos" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=PHP-Performance%3A+preg_match+vs.+strpos+-++(via+@lemmingzshadow)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://lemmingzshadow.net/214/php-performance-preg_match-vs-strpos/&amp;title=PHP-Performance%3A+preg_match+vs.+strpos" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://lemmingzshadow.net/214/php-performance-preg_match-vs-strpos/&amp;title=PHP-Performance%3A+preg_match+vs.+strpos" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://lemmingzshadow.net/214/php-performance-preg_match-vs-strpos/&amp;title=PHP-Performance%3A+preg_match+vs.+strpos" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://lemmingzshadow.net/214/php-performance-preg_match-vs-strpos/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://lemmingzshadow.net/214/php-performance-preg_match-vs-strpos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TNC 95 / TNC2400 &#8211; Geekstuff aus CB-Funk Zeiten</title>
		<link>http://lemmingzshadow.net/206/tnc-95-tnc2400-geekstuff-aus-cb-funk-zeiten/</link>
		<comments>http://lemmingzshadow.net/206/tnc-95-tnc2400-geekstuff-aus-cb-funk-zeiten/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 15:00:55 +0000</pubDate>
		<dc:creator>Lemmingz Shadow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Packet-Radio]]></category>

		<guid isPermaLink="false">http://lemmingzshadow.net/?p=206</guid>
		<description><![CDATA[ Eigentlich habe ich ein S-Video Kabel gesucht (und auch gefunden). Wesentlich interessanter war aber, dass ich mein altes TNC 95 im Keller entdeckt habe. Ein Paket-Radio-Modem aus CB-Funk Zeiten. Mit einem solchen TNC konnte man damals Daten per CB-Funkgerät übertragen. Die maximale Datenübertragungsrate lag bei 2400 Boud, üblich waren aber eher 1200. Das besondere [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lemmingzshadow.net/wp-content/uploads/2009/08/tnc95_01.jpg"><img src="http://lemmingzshadow.net/wp-content/uploads/2009/08/tnc95_01-150x150.jpg" alt="TNC 95" title="TNC 95" width="150" height="150" class="alignnone size-thumbnail wp-image-207" style="margin: 5px; float: left;" /></a> <a href="http://lemmingzshadow.net/wp-content/uploads/2009/08/tnc95_02.jpg"><img src="http://lemmingzshadow.net/wp-content/uploads/2009/08/tnc95_02-150x150.jpg" alt="TNC 95 Angebot" title="TNC 95 Angebot" width="150" height="150" class="alignnone size-thumbnail wp-image-209" style="margin: 5px; float: left;" /></a>Eigentlich habe ich ein S-Video Kabel gesucht (und auch gefunden). Wesentlich interessanter war aber, dass ich mein altes TNC 95 im Keller entdeckt habe. Ein Paket-Radio-Modem aus CB-Funk Zeiten. Mit einem solchen <a href="http://de.wikipedia.org/wiki/Terminal_Node_Controller">TNC</a> konnte man damals Daten per CB-Funkgerät übertragen. Die maximale Datenübertragungsrate lag bei 2400 Boud, üblich waren aber eher 1200. Das besondere an diesem damals 250 DM teuren Gerät: Es konnte, ähnlich einem Bouncer, auch dann antworten wenn der angeschlossene PC aus war. Nur das TNC und ein Funkgerät wurden benötigt.</p>
<p>Beitreibt heutzutage eigentlich noch jemand ernsthaft Packt-Radio?</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-sexy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://lemmingzshadow.net/206/tnc-95-tnc2400-geekstuff-aus-cb-funk-zeiten/&amp;title=TNC+95+%2F+TNC2400+-+Geekstuff+aus+CB-Funk+Zeiten" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://lemmingzshadow.net/206/tnc-95-tnc2400-geekstuff-aus-cb-funk-zeiten/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://lemmingzshadow.net/206/tnc-95-tnc2400-geekstuff-aus-cb-funk-zeiten/&amp;t=TNC+95+%2F+TNC2400+-+Geekstuff+aus+CB-Funk+Zeiten" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=TNC+95+%2F+TNC2400+-+Geekstuff+aus+CB-Funk+Zeiten+-++(via+@lemmingzshadow)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://lemmingzshadow.net/206/tnc-95-tnc2400-geekstuff-aus-cb-funk-zeiten/&amp;title=TNC+95+%2F+TNC2400+-+Geekstuff+aus+CB-Funk+Zeiten" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://lemmingzshadow.net/206/tnc-95-tnc2400-geekstuff-aus-cb-funk-zeiten/&amp;title=TNC+95+%2F+TNC2400+-+Geekstuff+aus+CB-Funk+Zeiten" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://lemmingzshadow.net/206/tnc-95-tnc2400-geekstuff-aus-cb-funk-zeiten/&amp;title=TNC+95+%2F+TNC2400+-+Geekstuff+aus+CB-Funk+Zeiten" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://lemmingzshadow.net/206/tnc-95-tnc2400-geekstuff-aus-cb-funk-zeiten/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://lemmingzshadow.net/206/tnc-95-tnc2400-geekstuff-aus-cb-funk-zeiten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>About Seite und Soical Network Icons</title>
		<link>http://lemmingzshadow.net/203/about-seite-und-soical-network-icons/</link>
		<comments>http://lemmingzshadow.net/203/about-seite-und-soical-network-icons/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 17:22:51 +0000</pubDate>
		<dc:creator>Lemmingz Shadow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[lemmingzshadow]]></category>

		<guid isPermaLink="false">http://lemmingzshadow.net/?p=203</guid>
		<description><![CDATA[Gerade habe ich endlich mal die (schon vor langem angelegte) About-Seite mit ein wenig Inhalt gefüllt. In dem Zuge habe ich auch gleich mal Links zu den diversen Social-Networks hinzugefügt, bei denen ich angemeldet bin. Ein schönes einheitliches Iconset welches sich dafür prima verwenden lässt findet man hier: Free glossy Community Icons (Danke für&#8217;s kostenlose [...]]]></description>
			<content:encoded><![CDATA[<p>Gerade habe ich endlich mal die (schon vor langem angelegte) About-Seite mit ein wenig Inhalt gefüllt. In dem Zuge habe ich auch gleich mal Links zu den diversen Social-Networks hinzugefügt, bei denen ich angemeldet bin. Ein schönes einheitliches Iconset welches sich dafür prima verwenden lässt findet man hier: <a href="http://www.tilo-hensel.de/free-glossy-community-icons/2009/04/23/">Free glossy Community Icons</a> (Danke für&#8217;s kostenlose bereitstellen)</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-sexy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://lemmingzshadow.net/203/about-seite-und-soical-network-icons/&amp;title=About+Seite+und+Soical+Network+Icons" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://lemmingzshadow.net/203/about-seite-und-soical-network-icons/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://lemmingzshadow.net/203/about-seite-und-soical-network-icons/&amp;t=About+Seite+und+Soical+Network+Icons" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=About+Seite+und+Soical+Network+Icons+-++(via+@lemmingzshadow)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://lemmingzshadow.net/203/about-seite-und-soical-network-icons/&amp;title=About+Seite+und+Soical+Network+Icons" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://lemmingzshadow.net/203/about-seite-und-soical-network-icons/&amp;title=About+Seite+und+Soical+Network+Icons" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://lemmingzshadow.net/203/about-seite-und-soical-network-icons/&amp;title=About+Seite+und+Soical+Network+Icons" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://lemmingzshadow.net/203/about-seite-und-soical-network-icons/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://lemmingzshadow.net/203/about-seite-und-soical-network-icons/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQLi und UTF-8</title>
		<link>http://lemmingzshadow.net/182/mysqli-und-utf-8/</link>
		<comments>http://lemmingzshadow.net/182/mysqli-und-utf-8/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 10:12:35 +0000</pubDate>
		<dc:creator>Lemmingz Shadow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MySQLi]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://lemmingzshadow.net/?p=182</guid>
		<description><![CDATA[Um auf MySQL Datenbanken zuzugreifen verwende ich gerne die MySQLi-Erweiterung von PHP. Vor ein paar Tagen musste ich dabei feststellen, dass es einen fiesen Fehler in der Methode &#8220;set_charset&#8221; gibt der zur Folge hat, dass die UTF-8 Unterstützung teilweise nicht funktioniert. Wenn man eine Verbindung zur Datenbank herstellt und Dabei den Konstruktor der MySQLi-Klasse verwendet [...]]]></description>
			<content:encoded><![CDATA[<p>Um auf MySQL Datenbanken zuzugreifen verwende ich gerne die MySQLi-Erweiterung von PHP. Vor ein paar Tagen musste ich dabei feststellen, dass es einen fiesen Fehler in der Methode <em>&#8220;set_charset&#8221;</em> gibt der zur Folge hat, dass die UTF-8 Unterstützung teilweise nicht funktioniert. Wenn man eine Verbindung zur Datenbank herstellt und Dabei den Konstruktor der MySQLi-Klasse verwendet funktioniert das anschließende setzten des UTF-8 Zeichensatzes nicht. Wenn man die Verbindung allerdings mit der Methode <em>&#8220;real_connect&#8221;</em> öffnet funktioniert es wunderbar.<br />
<span id="more-182"></span><br />
Ein Codebeispiel:</p>
<p>Funktioniert <strong>nicht</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">mysqli</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> mysqli<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;host&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;user&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pass&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;db&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">mysqli</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_charset</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'uft8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">mysqli</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">character_set_name</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Ausgabe: latin1</span></pre></td></tr></table></div>

<p>Funktioniert:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">mysqli</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysqli_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">mysqli</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">real_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;host&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;user&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;pass&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;db&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">mysqli</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_charset</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;utf8&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">mysqli</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">character_set_name</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Ausgabe: utf8</span></pre></td></tr></table></div>

<p>Der Fehler ist <a href="http://bugs.php.net/bug.php?id=42902">hier</a> zwar gemeldet und als closed markiert, tritt bei mir jedoch immer noch auf. </p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-sexy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://lemmingzshadow.net/182/mysqli-und-utf-8/&amp;title=MySQLi+und+UTF-8" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://lemmingzshadow.net/182/mysqli-und-utf-8/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://lemmingzshadow.net/182/mysqli-und-utf-8/&amp;t=MySQLi+und+UTF-8" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=MySQLi+und+UTF-8+-++(via+@lemmingzshadow)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://lemmingzshadow.net/182/mysqli-und-utf-8/&amp;title=MySQLi+und+UTF-8" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://lemmingzshadow.net/182/mysqli-und-utf-8/&amp;title=MySQLi+und+UTF-8" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://lemmingzshadow.net/182/mysqli-und-utf-8/&amp;title=MySQLi+und+UTF-8" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://lemmingzshadow.net/182/mysqli-und-utf-8/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://lemmingzshadow.net/182/mysqli-und-utf-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Azubi gesucht: Ausbildungsplatz für Mediengestalter</title>
		<link>http://lemmingzshadow.net/179/azubi-gesucht-ausbildungsplatz-mediengestalter/</link>
		<comments>http://lemmingzshadow.net/179/azubi-gesucht-ausbildungsplatz-mediengestalter/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 14:34:02 +0000</pubDate>
		<dc:creator>Lemmingz Shadow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Azubi]]></category>
		<category><![CDATA[Fliks]]></category>

		<guid isPermaLink="false">http://lemmingzshadow.net/?p=179</guid>
		<description><![CDATA[Mein Arbeitgeber, die Fliks GmbH, sucht aktuell noch einen Auszubildenden zum &#8220;Mediengestalter Digital- und Printmedien&#8221;. Weitere Informationen (Anforderungen, Einsatzbereiche, etc.) gibt es in einem Artikel auf macnotes.de. Natürlich gibt es auch eine richtige Stellenausschreibung.
Bitte weitersagen oder direkt bewerben  





		
			Share this on del.icio.us
		
		
			Share this on Technorati
		
		
			Share this on Facebook
		
		
			Tweet This!
		
		
			Digg this!
		
		
			Share this on Reddit
		
		
			Add this [...]]]></description>
			<content:encoded><![CDATA[<p>Mein Arbeitgeber, die Fliks GmbH, sucht aktuell noch einen Auszubildenden zum &#8220;Mediengestalter Digital- und Printmedien&#8221;. Weitere Informationen (Anforderungen, Einsatzbereiche, etc.) gibt es in einem <a href="http://www.macnotes.de/2009/07/21/in-eigener-sache-kreativer-mac-enthusiast-als-azubi-zum-mediengestalter-gesucht/">Artikel auf macnotes.de</a>. Natürlich gibt es auch eine richtige <a href="http://www.fliks.com/jobs/mediengestalter.html">Stellenausschreibung</a>.</p>
<p>Bitte weitersagen oder direkt bewerben <img src='http://lemmingzshadow.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-sexy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://lemmingzshadow.net/179/azubi-gesucht-ausbildungsplatz-mediengestalter/&amp;title=Azubi+gesucht%3A+Ausbildungsplatz+f%C3%BCr+Mediengestalter" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://lemmingzshadow.net/179/azubi-gesucht-ausbildungsplatz-mediengestalter/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://lemmingzshadow.net/179/azubi-gesucht-ausbildungsplatz-mediengestalter/&amp;t=Azubi+gesucht%3A+Ausbildungsplatz+f%C3%BCr+Mediengestalter" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Azubi+gesucht%3A+Ausbildungsplatz+f%C3%BCr+Mediengestalter+-++(via+@lemmingzshadow)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://lemmingzshadow.net/179/azubi-gesucht-ausbildungsplatz-mediengestalter/&amp;title=Azubi+gesucht%3A+Ausbildungsplatz+f%C3%BCr+Mediengestalter" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://lemmingzshadow.net/179/azubi-gesucht-ausbildungsplatz-mediengestalter/&amp;title=Azubi+gesucht%3A+Ausbildungsplatz+f%C3%BCr+Mediengestalter" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://lemmingzshadow.net/179/azubi-gesucht-ausbildungsplatz-mediengestalter/&amp;title=Azubi+gesucht%3A+Ausbildungsplatz+f%C3%BCr+Mediengestalter" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://lemmingzshadow.net/179/azubi-gesucht-ausbildungsplatz-mediengestalter/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://lemmingzshadow.net/179/azubi-gesucht-ausbildungsplatz-mediengestalter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jitt.cc &#8211; neue Funktion: Twitter Walls</title>
		<link>http://lemmingzshadow.net/166/jittcc-neue-funktion-twitter-walls/</link>
		<comments>http://lemmingzshadow.net/166/jittcc-neue-funktion-twitter-walls/#comments</comments>
		<pubDate>Sun, 10 May 2009 17:45:45 +0000</pubDate>
		<dc:creator>Lemmingz Shadow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jitt.cc]]></category>
		<category><![CDATA[PHPIDS]]></category>
		<category><![CDATA[Websockets]]></category>

		<guid isPermaLink="false">http://lemmingzshadow.net/?p=166</guid>
		<description><![CDATA[Soeben habe ich das erste Update an meinem Websocket-Projekt jitt.cc live geschaltet. Ab sofort können neben der Public Timeline von twitter auch Walls &#8220;live&#8221; angeschaut werden. In Twitter-Walls werden nur Tweets gelistet welche einen bestimmten Suchbegriff enthalten. Neue Tweets erscheinen auch hier direkt ohne das der Client einen Reload o.Ä. machen muss. (Beispiel: http://jitt.cc/wall/simpsons/)

Ansonsten gab [...]]]></description>
			<content:encoded><![CDATA[<p>Soeben habe ich das erste Update an meinem Websocket-Projekt <a href="http://jitt.cc">jitt.cc</a> live geschaltet. Ab sofort können neben der Public Timeline von twitter auch Walls &#8220;live&#8221; angeschaut werden. In Twitter-Walls werden nur Tweets gelistet welche einen bestimmten Suchbegriff enthalten. Neue Tweets erscheinen auch hier direkt ohne das der Client einen Reload o.Ä. machen muss. (Beispiel: <a href="http://jitt.cc/wall/simpsons/">http://jitt.cc/wall/simpsons/</a>)<br />
<span id="more-166"></span><br />
Ansonsten gab es noch ein paar interne Änderungen von denen man (hoffentlich) als Besucher nichts mitbekommt. Unter anderem habe ich die aktuelle Version von <a href="http://php-ids.org/">PHPIDS</a> integriert. Hier lasse ich ein Cache und die Logs in die Datenbank schreiben um zu sehen ob man so die Performance von PHPIDS noch etwas steigern kann. Natürlich macht sich das erst bemerkbar wenn das Projekt etwas an Fahrt aufgenommen hat. Ich werde dann darüber berichten.</p>
<p>Zum Schluss noch einmal der Hinweis: jitt.cc ist nach wie vor ein Testprojekt und es kann durchaus vorkommen, dass mal etwas nicht richtig funktioniert <img src='http://lemmingzshadow.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-sexy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://lemmingzshadow.net/166/jittcc-neue-funktion-twitter-walls/&amp;title=jitt.cc+-+neue+Funktion%3A+Twitter+Walls" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://lemmingzshadow.net/166/jittcc-neue-funktion-twitter-walls/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://lemmingzshadow.net/166/jittcc-neue-funktion-twitter-walls/&amp;t=jitt.cc+-+neue+Funktion%3A+Twitter+Walls" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=jitt.cc+-+neue+Funktion%3A+Twitter+Walls+-++(via+@lemmingzshadow)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://lemmingzshadow.net/166/jittcc-neue-funktion-twitter-walls/&amp;title=jitt.cc+-+neue+Funktion%3A+Twitter+Walls" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://lemmingzshadow.net/166/jittcc-neue-funktion-twitter-walls/&amp;title=jitt.cc+-+neue+Funktion%3A+Twitter+Walls" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://lemmingzshadow.net/166/jittcc-neue-funktion-twitter-walls/&amp;title=jitt.cc+-+neue+Funktion%3A+Twitter+Walls" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://lemmingzshadow.net/166/jittcc-neue-funktion-twitter-walls/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://lemmingzshadow.net/166/jittcc-neue-funktion-twitter-walls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jitt.cc &#8211; Erste Gehversuche mit Websockets</title>
		<link>http://lemmingzshadow.net/163/jittcc-erste-gehversuche-mit-websockets/</link>
		<comments>http://lemmingzshadow.net/163/jittcc-erste-gehversuche-mit-websockets/#comments</comments>
		<pubDate>Mon, 04 May 2009 17:58:07 +0000</pubDate>
		<dc:creator>Lemmingz Shadow</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ActiveMQ]]></category>
		<category><![CDATA[Kaazing]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[STOMP]]></category>
		<category><![CDATA[Websockets]]></category>

		<guid isPermaLink="false">http://lemmingzshadow.net/?p=163</guid>
		<description><![CDATA[Am Wochenende habe ich ein erstes kleines neues Projekt zusammen gebastelt um ein wenig mit Websocketes zu experimentieren. jitt.cc macht momentan nicht viel mehr als die Twitter Public Timeline &#8220;live&#8221; im Browser anzuzeigen. Natürlich ist mir bekannt, dass es schon viele Projekte gibt die genau diese Funktion bereits bieten. Mir geht es aber weniger um [...]]]></description>
			<content:encoded><![CDATA[<p>Am Wochenende habe ich ein erstes kleines neues Projekt zusammen gebastelt um ein wenig mit Websocketes zu experimentieren. <a href="http://jitt.cc"><strong>jitt.cc</strong></a> macht momentan nicht viel mehr als die Twitter Public Timeline &#8220;live&#8221; im Browser anzuzeigen. Natürlich ist mir bekannt, dass es schon viele Projekte gibt die genau diese Funktion bereits bieten. Mir geht es aber weniger um die Funktion sondern um die eingesetzte Technik.<span id="more-163"></span><br />
Die meisten Live-Twitter Seiten verwenden irgendeine Art des Pollings um den Live-Effekt zu erzeugen, bei jitt.cc hingegen werden die Daten über eine persistente Verbindung direkt vom Server an den Client geschickt. Hierzu setze ich das <a href="http://www.kaazing.org">Kaazing Open Gateway</a> und einen <a href="http://activemq.apache.org/">ActiveMQ</a> Server ein.<br />
Kaazing stellt quasi eine Proxy zwischen dem ActiveMQ Server und dem Brower dar. Wie das genau funktioniert ist <a href="http://www.kaazing.org/confluence/display/Doc/Architecture+Overview#kegcomps">hier</a> sehr schön dargestellt.<br />
Die Textnachrichten werden dann mittels <a href="http://en.wikipedia.org/wiki/Streaming_Text_Orientated_Messaging_Protocol">STOMP</a> vom ActiveMQ Server über eine Websocket-Verbindung an den Client gesendet.</p>
<p>Alles in Allem ein wirklich sehr interessantes Thema, welches ich jedem Webentwickler nur ans Herz legen kann. Einen super Einstieg bietet das Kaazing Gateway und die darin enthaltenen Demos.</p>
<p>Einziges Manko bisher: Kazzing (benötigt Java) ist ein bisschen speicherhungrig,  und ich weiss nicht wie lange mein kleiner VServer damit noch klar kommt <img src='http://lemmingzshadow.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-sexy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://lemmingzshadow.net/163/jittcc-erste-gehversuche-mit-websockets/&amp;title=jitt.cc+-+Erste+Gehversuche+mit+Websockets" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://lemmingzshadow.net/163/jittcc-erste-gehversuche-mit-websockets/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://lemmingzshadow.net/163/jittcc-erste-gehversuche-mit-websockets/&amp;t=jitt.cc+-+Erste+Gehversuche+mit+Websockets" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=jitt.cc+-+Erste+Gehversuche+mit+Websockets+-++(via+@lemmingzshadow)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://lemmingzshadow.net/163/jittcc-erste-gehversuche-mit-websockets/&amp;title=jitt.cc+-+Erste+Gehversuche+mit+Websockets" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://lemmingzshadow.net/163/jittcc-erste-gehversuche-mit-websockets/&amp;title=jitt.cc+-+Erste+Gehversuche+mit+Websockets" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://lemmingzshadow.net/163/jittcc-erste-gehversuche-mit-websockets/&amp;title=jitt.cc+-+Erste+Gehversuche+mit+Websockets" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://lemmingzshadow.net/163/jittcc-erste-gehversuche-mit-websockets/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://lemmingzshadow.net/163/jittcc-erste-gehversuche-mit-websockets/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
