<?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>Dirk Merten</title>
	<atom:link href="http://persoenlicher.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://persoenlicher.de</link>
	<description>Lösungen fürs Web</description>
	<lastBuildDate>Wed, 11 Apr 2012 18:01:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Currying in JavaScript</title>
		<link>http://persoenlicher.de/2012/02/currying-in-javascript/</link>
		<comments>http://persoenlicher.de/2012/02/currying-in-javascript/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 12:10:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Curying]]></category>

		<guid isPermaLink="false">http://persoenlicher.de/?p=64</guid>
		<description><![CDATA[Ein sehr praktisches, wenn auch fast unbekanntes Feature in JavaScript, ist das sogenannte Currying. Mit Currying lassen sich Funktionen mit mehreren Argumenten in neue Funktionen mit nur einem Parameter umwandeln. Beispiel Wir möchten ein paar Multiplikationen mit JavaScript durchführen, dann würde eine allgemeine Funktion wohl so aussehen: function mul&#40;a, b&#41; &#123; return a * b; [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left;margin-top: 5px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fpersoenlicher.de%2F2012%2F02%2Fcurrying-in-javascript%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fpersoenlicher.de%2F2012%2F02%2Fcurrying-in-javascript%2F&amp;style=compact&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Ein sehr praktisches, wenn auch fast unbekanntes Feature in JavaScript, ist das sogenannte <a href="http://de.wikipedia.org/wiki/Currying">Currying</a>.</p>
<p>Mit Currying lassen sich Funktionen mit mehreren Argumenten in neue Funktionen mit nur einem Parameter umwandeln.</p>
<p><strong>Beispiel</strong></p>
<p>Wir möchten ein paar Multiplikationen mit JavaScript durchführen, dann würde eine allgemeine Funktion wohl so aussehen:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> mul<span style="color: #009900;">&#40;</span>a<span style="color: #339933;">,</span> b<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">return</span> a <span style="color: #339933;">*</span> b<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>mul<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//Ergebnis = 6</span></pre></div></div>

<p>Wenn jetzt weitere spezielle Funktionen benötigt werden, die eine beliebige Zahl beispielsweise immer mit 2 oder 5 multiplizieren, kann man entweder für jede spezielle Multiplikation eine neue Funktion deklarieren, oder man verwendet Currying und deklariert so nur eine generische Funktion.</p>
<p><strong>Beispiel ohne Currying</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> mul2<span style="color: #009900;">&#40;</span>a<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #000066; font-weight: bold;">return</span> a <span style="color: #339933;">*</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> mul5<span style="color: #009900;">&#40;</span>a<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #000066; font-weight: bold;">return</span> a <span style="color: #339933;">*</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>mul2<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Ergebnis = 4</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>mul2<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Ergebnis = 6</span>
&nbsp;
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>mul5<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Ergebnis = 10</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>mul5<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Ergebnis = 15</span></pre></div></div>

<p><strong>Beispiel mit Currying</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> mulGeneric<span style="color: #009900;">&#40;</span>a<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">return</span> a <span style="color: #339933;">*</span> b<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> mul2 <span style="color: #339933;">=</span> mulGeneric<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>mul2<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Ergebnis = 4</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>mul2<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Ergebnis = 6</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> mul5 <span style="color: #339933;">=</span> mulGeneric<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>mul5<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Ergebnis = 10</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>mul5<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Ergebnis = 15</span></pre></div></div>

<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fpersoenlicher.de%2F2012%2F02%2Fcurrying-in-javascript%2F&amp;t=Currying%20in%20JavaScript" id="facebook_share_button_64" style="font-size:11px; line-height:13px; font-family:'lucida grande',tahoma,verdana,arial,sans-serif; text-decoration:none; display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; margin: 5px 0; height:15px; border:1px solid #d8dfea; color: #3B5998; background: #fff url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif) no-repeat top right;">Share</a>
	<script type="text/javascript">
	<!--
	var button = document.getElementById('facebook_share_link_64') || document.getElementById('facebook_share_icon_64') || document.getElementById('facebook_share_both_64') || document.getElementById('facebook_share_button_64');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_64') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	-->
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://persoenlicher.de/2012/02/currying-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend-PHP-Zertifikat bestanden</title>
		<link>http://persoenlicher.de/2011/09/zend-php-zertifikat-bestanden/</link>
		<comments>http://persoenlicher.de/2011/09/zend-php-zertifikat-bestanden/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 09:16:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Zertifikat]]></category>

		<guid isPermaLink="false">http://persoenlicher.de/?p=50</guid>
		<description><![CDATA[Seit heute darf auch ich mich Zend Certified Engineer nennen. Eigentlich wollte ich die Prüfung bereits gestern ablegen, da aber das Prüfungszentrum in Dietzenbach technische Probleme hatte (genaueres konnte/wollte mir keiner sagen), wurde ich gestern mit einem neuen Termin wieder nach Hause geschickt. Der Test war definitiv schwieriger wie die Mock-Tests die man zur Vorbereitung [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left;margin-top: 5px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fpersoenlicher.de%2F2011%2F09%2Fzend-php-zertifikat-bestanden%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fpersoenlicher.de%2F2011%2F09%2Fzend-php-zertifikat-bestanden%2F&amp;style=compact&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Seit heute darf auch ich mich <a href="http://www.zend.com/en/yellow-pages#show-ClientCandidateID=ZEND017938">Zend Certified Engineer</a> nennen. Eigentlich wollte ich die Prüfung bereits gestern ablegen, da aber das Prüfungszentrum in Dietzenbach technische Probleme hatte (genaueres konnte/wollte mir keiner sagen), wurde ich gestern mit einem neuen Termin wieder nach Hause geschickt.</p>
<p>Der Test war definitiv schwieriger wie die Mock-Tests die man zur Vorbereitung erhält. Nachträglich betrachtet fand ich den Study-Guide von Zend am Hilfreichsten zur Vorbereitung auf die Prüfung. Zusammen mit ein paar praktischen Übung zu den einzelnen Themen, war ich insgesamt gut vorbereitet.</p>
<p>In Summe hat sich das Zertifikat für mich persönlich gelohnt, da ich so wieder Neues bzw. auch Nützliches über PHP gelernt habe. Die kostenlose Zend-Studio-Lizenz, die man mit dem bestandenen Zertifikat erhält, ist natürlich auch nicht schlecht <img src='http://persoenlicher.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fpersoenlicher.de%2F2011%2F09%2Fzend-php-zertifikat-bestanden%2F&amp;t=Zend-PHP-Zertifikat%20bestanden" id="facebook_share_button_50" style="font-size:11px; line-height:13px; font-family:'lucida grande',tahoma,verdana,arial,sans-serif; text-decoration:none; display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; margin: 5px 0; height:15px; border:1px solid #d8dfea; color: #3B5998; background: #fff url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif) no-repeat top right;">Share</a>
	<script type="text/javascript">
	<!--
	var button = document.getElementById('facebook_share_link_50') || document.getElementById('facebook_share_icon_50') || document.getElementById('facebook_share_both_50') || document.getElementById('facebook_share_button_50');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_50') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	-->
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://persoenlicher.de/2011/09/zend-php-zertifikat-bestanden/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Content-Management-Systeme entpacken</title>
		<link>http://persoenlicher.de/2011/05/content-management-systeme-entpacken/</link>
		<comments>http://persoenlicher.de/2011/05/content-management-systeme-entpacken/#comments</comments>
		<pubDate>Tue, 31 May 2011 19:51:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Content-Management-System]]></category>
		<category><![CDATA[Zip]]></category>

		<guid isPermaLink="false">http://persoenlicher.de/?p=22</guid>
		<description><![CDATA[Der Eine oder Andere wird es kennen. Schnell mal ein Content-Management-System auf dem Server eines Kunden installieren. Blöd nur wenn der lediglich einen FTP-Zugang zu seinem Server bereitstellt. Also muss erst das geliebte Content-Management-System lokal entpackt und dann mühselig per FTP auf den Kunden-Server hochladen werden. Genau aus diesem Grund habe ich mir jetzt ein [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left;margin-top: 5px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fpersoenlicher.de%2F2011%2F05%2Fcontent-management-systeme-entpacken%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fpersoenlicher.de%2F2011%2F05%2Fcontent-management-systeme-entpacken%2F&amp;style=compact&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Der Eine oder Andere wird es kennen. Schnell mal ein Content-Management-System auf dem Server eines Kunden installieren. Blöd nur wenn der lediglich einen FTP-Zugang zu seinem Server bereitstellt. Also muss erst das geliebte Content-Management-System lokal entpackt und dann mühselig per FTP auf den Kunden-Server hochladen werden.<br />
Genau aus diesem Grund habe ich mir jetzt ein kleines PHP-Skript geschrieben, was ZIP-Archive auf Webservern entpacken kann.<br />
Das spart eine Menge Zeit, da somit nur noch das Skript und das ZIP-Archiv des Content-Management-Systems hochgeladen werden muss. Anschließend wird das PHP-Skript im Browser aufgerufen und ausgeführt um das Content-Management-System zu entpacken.<br />
Wer also genauso wie ich keine Lust mehr auf lange FTP-Upload-Session hat, kann gerne mein PHP-Skript downloaden und einsetzen.<br />
Feedback sehe ich immer gerne, eventuell hat ja jemand auch Verbesserungsvorschläge parat.</p>
<p><strong>Voraussetzung</strong><br />
PHP 5.2+ mit PECL zip &gt;= 1.0.0</p>
<p><strong>Download</strong><br />
<a href="http://persoenlicher.de/wp-content/uploads/2011/05/cms-exctator.zip">CMS Extractor</a></p>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fpersoenlicher.de%2F2011%2F05%2Fcontent-management-systeme-entpacken%2F&amp;t=Content-Management-Systeme%20entpacken" id="facebook_share_button_22" style="font-size:11px; line-height:13px; font-family:'lucida grande',tahoma,verdana,arial,sans-serif; text-decoration:none; display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; margin: 5px 0; height:15px; border:1px solid #d8dfea; color: #3B5998; background: #fff url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif) no-repeat top right;">Share</a>
	<script type="text/javascript">
	<!--
	var button = document.getElementById('facebook_share_link_22') || document.getElementById('facebook_share_icon_22') || document.getElementById('facebook_share_both_22') || document.getElementById('facebook_share_button_22');
	if (button) {
		button.onclick = function(e) {
			var url = this.href.replace(/share\.php/, 'sharer.php');
			window.open(url,'sharer','toolbar=0,status=0,width=626,height=436');
			return false;
		}
	
		if (button.id === 'facebook_share_button_22') {
			button.onmouseover = function(){
				this.style.color='#fff';
				this.style.borderColor = '#295582';
				this.style.backgroundColor = '#3b5998';
			}
			button.onmouseout = function(){
				this.style.color = '#3b5998';
				this.style.borderColor = '#d8dfea';
				this.style.backgroundColor = '#fff';
			}
		}
	}
	-->
	</script>
	]]></content:encoded>
			<wfw:commentRss>http://persoenlicher.de/2011/05/content-management-systeme-entpacken/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

