<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Stefan Macke</title>
	
	<link>http://blog.stefan-macke.com</link>
	<description>Anwendungsentwicklung - Netzwerkadministration - Webdesign</description>
	<lastBuildDate>Mon, 19 Jul 2010 15:09:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/StefanMacke" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="stefanmacke" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Zotero plugin for DokuWiki</title>
		<link>http://blog.stefan-macke.com/2010/06/01/zotero-plugin-for-dokuwiki/</link>
		<comments>http://blog.stefan-macke.com/2010/06/01/zotero-plugin-for-dokuwiki/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 20:48:11 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DokuWiki]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wiki]]></category>
		<category><![CDATA[Zotero]]></category>

		<guid isPermaLink="false">http://blog.stefan-macke.com/?p=814</guid>
		<description><![CDATA[For managing my literature sources for reference lists I use ]]></description>
			<content:encoded><![CDATA[<p>For managing my literature sources for reference lists I use <a href="http://www.zotero.org/" title="Zotero"s website" class="liexternal">Zotero</a> and I really like it. It is a plugin for Firefox and supports synchronizing the database and the attachments to an online server. The only thing that was missing was a way to cite my sources from inside my <a href="http://www.dokuwiki.org" title="DokuWiki"s website" class="liexternal">DokuWiki</a>. I wanted to be able to add citations to my texts like I do in LaTeX.</p>
<p>For this reason I created a plugin for DokuWiki that allows me to cite sources from my online Zotero database by using the syntax known from LaTeX. The plugin reads my reference list from the Zotero website and caches it on a local wiki page. After that I can cite a source simply by adding <tt>\cite{ShortName}</tt>. Take a look at my wiki (e.g. <a href="http://wiki.stefan-macke.com/doku.php/se:programmierung" title="Programming Hints - Stefans Wiki" class="liexternal">Programming Hints</a>) for some examples.</p>
<div style="text-align: center;"><a href="http://blog.stefan-macke.com/wp-content/uploads/2010/06/ZoteroPlugin02.jpg"  rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2010/06/ZoteroPlugin02.jpg" alt="DokuWiki Zotero Plugin 02" title="DokuWiki Zotero Plugin 02" width="318" height="174" class="size-full wp-image-812" /></a></div>
<div style="text-align: center;"><a href="http://blog.stefan-macke.com/wp-content/uploads/2010/06/ZoteroPlugin01.jpg"  rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2010/06/ZoteroPlugin01.jpg" alt="DokuWiki Zotero Plugin 01" title="DokuWiki Zotero Plugin 01" width="423" height="145" class="size-full wp-image-811" /></a></div>
<p>For this to work, every source needs to have a short name as I did not want the cite key to be the Zotero ID but rather a more meaningful name. Almost every Zotero entry type has the field &#8220;short name&#8221; assigned to it so I used that for this purpose.</p>
<p>Here is an example of the steps to perform to be able to cite a Zotero source: </p>
<ol>
<li>I add a new entry to my Zotero database, e.g. <em>Robert Martin: Clean Code (2008)</em> and assign the short name <tt>Martin2008</tt> to it.<br />
<br/><a href="http://blog.stefan-macke.com/wp-content/uploads/2010/06/ZoteroPlugin04.jpg"  rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2010/06/ZoteroPlugin04-300x82.jpg" alt="DokuWiki Zotero Plugin 04" title="DokuWiki Zotero Plugin 04" width="300" height="82" class="size-medium wp-image-819" /></a></li>
<li>I synchronize my Zotero database with the Zotero server (because the plugin reads the data from the Zotero website).</li>
<li>I write some text in my wiki and add <tt>\cite[p.123]{Martin2008}</tt>.</li>
<li>I preview or save the current wiki page and the plugin tries to find the cited reference in its local cache and displays it. If the entry is not already in the cache, it automatically loads my newest Zotero sources from the website, caches them, and displays the cited source afterwards.</li>
</ol>
<p>For the initial import of all my Zotero entries I added a script that parses the complete reference list on the Zotero website.</p>
<div style="text-align: center;"><a href="http://blog.stefan-macke.com/wp-content/uploads/2010/06/ZoteroPlugin03.jpg"  rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2010/06/ZoteroPlugin03-300x167.jpg" alt="DokuWiki Zotero Plugin 03" title="DokuWiki Zotero Plugin 03" width="300" height="167" class="size-medium wp-image-813" /></a></div>
<h3>Download</h3>
<p>The plugin can be downloaded here: <a href="http://f.macke.it/ZoteroPlugin" title="Download DokuWiki Zotero plugin" class="liexternal">Download DokuWiki Zotero plugin</a> or installed via the plugin manager.</p>
<p>Also see the <a href="http://www.dokuwiki.org/plugins" title="DokuWiki Plugins page" class="liexternal">DokuWiki Plugins page</a>: <a href="http://www.dokuwiki.org/plugin:zotero" title="zotero plugin" class="liexternal">zotero plugin</a>.</p>
<p>Please see <tt>Install.txt</tt> for a short installation guide.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/StefanMacke?a=-DbPcEDJhHg:kJ3L720LGvA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/StefanMacke?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/StefanMacke?a=-DbPcEDJhHg:kJ3L720LGvA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/StefanMacke?i=-DbPcEDJhHg:kJ3L720LGvA:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.stefan-macke.com/2010/06/01/zotero-plugin-for-dokuwiki/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TYPO3: How to enable links to local files in RTE</title>
		<link>http://blog.stefan-macke.com/2010/05/18/typo3-how-to-enable-links-to-local-files-in-rte/</link>
		<comments>http://blog.stefan-macke.com/2010/05/18/typo3-how-to-enable-links-to-local-files-in-rte/#comments</comments>
		<pubDate>Tue, 18 May 2010 17:52:47 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[TYPO3]]></category>

		<guid isPermaLink="false">http://blog.stefan-macke.com/?p=808</guid>
		<description><![CDATA[Today I needed to link to a local file on a network share from a page in TYPO3. This link did not start with the usual http:// but instead with file:///. The problem was, that the rich text editor (RTE) in the backend of TYPO3 always prepends &#8220;invalid&#8221; links with http:// and I ended up [...]]]></description>
			<content:encoded><![CDATA[<p>Today I needed to link to a local file on a network share from a page in TYPO3. This link did not start with the usual <tt>http://</tt> but instead with <tt>file:///</tt>. The problem was, that the rich text editor (RTE) in the backend of TYPO3 always prepends &#8220;invalid&#8221; links with <tt>http://</tt> and I ended up with <tt>http://file:///path-to-network-share</tt>, which of course did not work correctly. </p>
<p>I tried editing the RTE parse function in TYPOScript but that did not solve my problem. So, after a while of searching the internet I found the answer: append <tt>rtekeep="1"</tt> to the link like in the following example. This tells the RTE to leave the link untouched.</p>
<p><tt>&lt;a href="file:///path-to-network-share" rtekeep="1"&gt;Link to file&lt;/a&gt;</tt></p>
<p><small>(via <a href="http://tuga.at/index.php?id=602&#038;tx_maillisttofaq_pi1[sort]=mail_date:0&#038;tx_maillisttofaq_pi1[pointer]=4&#038;tx_maillisttofaq_pi1[mode]=1&#038;tx_maillisttofaq_pi1[showUid]=361#childUid367" title="Externe Links - RTE" class="liexternal">tuga.at</a>)</small></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/StefanMacke?a=1v798bFrosI:R2iiSkumq6w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/StefanMacke?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/StefanMacke?a=1v798bFrosI:R2iiSkumq6w:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/StefanMacke?i=1v798bFrosI:R2iiSkumq6w:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.stefan-macke.com/2010/05/18/typo3-how-to-enable-links-to-local-files-in-rte/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using PHP to query Zotero’s REST API</title>
		<link>http://blog.stefan-macke.com/2010/04/21/using-php-to-query-zoteros-rest-api/</link>
		<comments>http://blog.stefan-macke.com/2010/04/21/using-php-to-query-zoteros-rest-api/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 18:26:21 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zotero]]></category>

		<guid isPermaLink="false">http://blog.stefan-macke.com/?p=796</guid>
		<description><![CDATA[Today I tried to query Zotero&#8217;s REST API with PHP to retrieve a list of my bibliography items for further processing. The basics are pretty easy setup using phpZotero and following this guide: Mashup Guide :: Zotero REST API: early developments.
However, I ran into some problems as the user id could be read by getUserId() [...]]]></description>
			<content:encoded><![CDATA[<p>Today I tried to query Zotero&#8217;s REST API with PHP to retrieve a list of my bibliography items for further processing. The basics are pretty easy setup using <a href="http://github.com/clioweb/phpZotero/blob/master/phpZotero.php" title="phpZotero at github.com" class="liexternal">phpZotero</a> and following this guide: <a href="http://blog.mashupguide.net/2010/01/28/zotero-rest-api-early-developments/" title="Mashup Guide :: Zotero REST API: early developments" class="liexternal">Mashup Guide :: Zotero REST API: early developments</a>.</p>
<p>However, I ran into some problems as the user id could be read by <tt>getUserId()</tt> but <tt>getUserItems()</tt> returned an empty item list. I found the solution after analyzing the request URLs: the user id is read using HTTP while all the other functions use HTTPS. So I simply added these two lines to <tt>httpRequest()</tt> to avoid checking the server certificate:
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><a href="http://www.php.net/curl_setopt" class="liexternal"><span class="kw3">curl_setopt</span></a><span class="br0">&#40;</span><span class="re0">$ch</span><span class="sy0">,</span> CURLOPT_SSL_VERIFYPEER<span class="sy0">,</span> <span class="kw4">false</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/curl_setopt" class="liexternal"><span class="kw3">curl_setopt</span></a><span class="br0">&#40;</span><span class="re0">$ch</span><span class="sy0">,</span> CURLOPT_SSL_VERIFYHOST<span class="sy0">,</span> <span class="kw4">false</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
</ol>
</div>
</div>
<p>Furthermore, the name of the parameter for the API key is not <tt>apiKey</tt> but <tt>key</tt>. So the URL pointing to my bibliography items has to be <tt>https://api.zotero.org/users/{USERID}/items/?key={APIKEY}</tt> (you don&#8217;t need <tt>username</tt>). Although the API key is passed to phpZotero&#8217;s constructor, the class doesn&#8217;t use it in any of its HTTP calls, so I added this line to <tt>zoteroRequest()</tt>: </p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="re0">$request</span> <span class="sy0">.=</span> <span class="st_h">&#8216;?key=&#8217;</span> <span class="sy0">.</span> <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">apiKey</span><span class="sy0">;</span></div>
</li>
</ol>
</div>
</div>
<p>After theses small changes my items could be read successfully.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/StefanMacke?a=QUziEoPaquY:uk62iUb2GyM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/StefanMacke?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/StefanMacke?a=QUziEoPaquY:uk62iUb2GyM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/StefanMacke?i=QUziEoPaquY:uk62iUb2GyM:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.stefan-macke.com/2010/04/21/using-php-to-query-zoteros-rest-api/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PowerShell 2.0: Windows Update KB968930 cannot be installed on Windows XP</title>
		<link>http://blog.stefan-macke.com/2010/03/26/powershell-2-0-windows-update-kb968930-cannot-be-installed-on-windows-xp/</link>
		<comments>http://blog.stefan-macke.com/2010/03/26/powershell-2-0-windows-update-kb968930-cannot-be-installed-on-windows-xp/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 12:50:50 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Updates]]></category>

		<guid isPermaLink="false">http://blog.stefan-macke.com/?p=788</guid>
		<description><![CDATA[Our WSUS server provided my computer with Microsoft Windows Update KB968930 (Windows Management Framework and PowerShell 2.0) but it could not be installed (without giving any helpful error message). After searching the web for quite some time, I found this solution to be working in my case:

Deinstall PowerShell 1.0: Control Panel &#8594; Show Windows Updates [...]]]></description>
			<content:encoded><![CDATA[<p>Our WSUS server provided my computer with Microsoft Windows Update KB968930 (Windows Management Framework and PowerShell 2.0) but it could not be installed (without giving any helpful error message). After searching the web for quite some time, I found this solution to be working in my case:</p>
<ol>
<li>Deinstall PowerShell 1.0: Control Panel &rarr; Show Windows Updates &rarr; Windows PowerShell 1.0 &rarr; Remove</li>
<li>Reboot the computer</li>
<li>Install <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=845289ca-16cc-4c73-8934-dd46b5ed1d33" title="Download Windows Remote Management" class="liexternal">Windows Remote Management</a></li>
<li>Install <a href="https://connect.microsoft.com/windowsmanagement/Downloads/DownloadDetails.aspx?DownloadID=21762" title="Download PowerShell 2.0" class="liexternal">PowerShell 2.0</a></li>
<li>Test installation: Start &rarr; Run &rarr; powershell &rarr; $PSVersionTable:
<div style="text-align: center;"><img src="http://blog.stefan-macke.com/wp-content/uploads/2010/03/PowerShell20.jpg" alt="PowerShell 2.0" title="PowerShell 2.0" width="492" height="311" /></a></div>
</li>
<li>Get rid of the &#8220;New updates available&#8221; message in the system tray: Start &rarr; Run &rarr; wuauclt /detectnow</li>
</ol>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/StefanMacke?a=s6nMNa4waSM:L-LlkZc6Xio:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/StefanMacke?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/StefanMacke?a=s6nMNa4waSM:L-LlkZc6Xio:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/StefanMacke?i=s6nMNa4waSM:L-LlkZc6Xio:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.stefan-macke.com/2010/03/26/powershell-2-0-windows-update-kb968930-cannot-be-installed-on-windows-xp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How often are functions returning an array for PHP’s foreach statement called?</title>
		<link>http://blog.stefan-macke.com/2010/03/18/how-often-are-functions-returning-an-array-for-phps-foreach-statement-called/</link>
		<comments>http://blog.stefan-macke.com/2010/03/18/how-often-are-functions-returning-an-array-for-phps-foreach-statement-called/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 14:43:54 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.stefan-macke.com/?p=783</guid>
		<description><![CDATA[Today I was asked a question regarding PHP&#8217;s foreach statement: If the array through wich a script iterates is generated by a function, how often is this function called? In this example, will getArray() be called only once or three times?




$c = 0;


function getArray&#40;&#41;


&#123;


&#160; &#160; &#160; &#160; global $c;


&#160; &#160; &#160; &#160; echo &#40;++$c&#41; . [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was asked a question regarding PHP&#8217;s <tt>foreach</tt> statement: If the array through wich a script iterates is generated by a function, how often is this function called? In this example, will <tt>getArray()</tt> be called only once or three times?</p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="re0">$c</span> <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> getArray<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">global</span> <span class="re0">$c</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">echo</span> <span class="br0">&#40;</span><span class="sy0">++</span><span class="re0">$c</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st0">&quot;. call to &quot;</span> <span class="sy0">.</span> <span class="kw4">__FUNCTION__</span> <span class="sy0">.</span> <span class="st0">&quot;<span class="es1">\n</span>&quot;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <a href="http://www.php.net/array" class="liexternal"><span class="kw3">array</span></a><span class="br0">&#40;</span>1<span class="sy0">,</span> 2<span class="sy0">,</span> 3<span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">foreach</span> <span class="br0">&#40;</span>getArray<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="kw1">as</span> <span class="re0">$e</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">echo</span> <span class="st0">&quot;ForEach: &quot;</span> <span class="sy0">.</span> <span class="re0">$e</span> <span class="sy0">.</span> <span class="st0">&quot;<span class="es1">\n</span>&quot;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
</div>
<p>I didn&#8217;t know the answer myself, although I presumed the function gets called only once. Interestingly, the <a href="http://de.php.net/manual/de/control-structures.foreach.php" title="PHP Manual: foreach" class="liexternal">PHP Manual</a> doesn&#8217;t say a word about this question.</p>
<p>So, what&#8217;s the answer? <strong>The function gets called only once</strong>, as I suspected. Here&#8217;s the output of the code above:</p>
<pre>1. call to getArray
ForEach: 1
ForEach: 2
ForEach: 3</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/StefanMacke?a=V5TRX3bSSbs:9C8CXyr7Afw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/StefanMacke?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/StefanMacke?a=V5TRX3bSSbs:9C8CXyr7Afw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/StefanMacke?i=V5TRX3bSSbs:9C8CXyr7Afw:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.stefan-macke.com/2010/03/18/how-often-are-functions-returning-an-array-for-phps-foreach-statement-called/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bash: Get IP address of SSH remote user</title>
		<link>http://blog.stefan-macke.com/2010/03/14/bash-get-ip-address-of-ssh-remote-user/</link>
		<comments>http://blog.stefan-macke.com/2010/03/14/bash-get-ip-address-of-ssh-remote-user/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 20:10:05 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://blog.stefan-macke.com/?p=780</guid>
		<description><![CDATA[Today I needed to find out the IP address of the currently logged on user (e.g. via SSH) on a Linux system to use it in a bash script. After searching the web for a simple tool for this task for quite some time, I finally came up with the following bash script to get [...]]]></description>
			<content:encoded><![CDATA[<p>Today I needed to find out the IP address of the currently logged on user (e.g. via SSH) on a Linux system to use it in a bash script. After searching the web for a simple tool for this task for quite some time, I finally came up with the following bash script to get me the needed information. Is there any way to obtain the IP address in a simpler way by using built in Linux tools?</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="re2">HOST</span>=<span class="sy0">`</span><span class="kw2">who</span> am i <span class="sy0">|</span> <span class="kw2">sed</span> <span class="re5">-r</span> <span class="st0">&quot;s/.*\((.*)\).*/\\1/&quot;</span><span class="sy0">`</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re2">IP</span>=<span class="sy0">`</span>host <span class="re1">$HOST</span> <span class="sy0">|</span> <span class="kw2">sed</span> <span class="re5">-r</span> <span class="st0">&quot;s/.* has address (.*)/\\1/&quot;</span><span class="sy0">`</span></div>
</li>
</ol>
</div>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/StefanMacke?a=Q6K2nUwwrZ8:I1egdeTNjxs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/StefanMacke?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/StefanMacke?a=Q6K2nUwwrZ8:I1egdeTNjxs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/StefanMacke?i=Q6K2nUwwrZ8:I1egdeTNjxs:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.stefan-macke.com/2010/03/14/bash-get-ip-address-of-ssh-remote-user/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>NUNIT: A Unit-Test-Framework for Natural</title>
		<link>http://blog.stefan-macke.com/2009/12/29/nunit-a-unit-test-framework-for-natural/</link>
		<comments>http://blog.stefan-macke.com/2009/12/29/nunit-a-unit-test-framework-for-natural/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 20:43:46 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[masterarbeit]]></category>
		<category><![CDATA[Natural]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Studium]]></category>

		<guid isPermaLink="false">http://blog.stefan-macke.com/?p=752</guid>
		<description><![CDATA[As part of my Master&#8217;s thesis about Test Driven Development (TDD) I developed a Unit-Test-Framework for the programming language Natural. This 4GL language from Software AG is in use for over 30 years now but the notion of automated tests has not been spread throughout the developer community. Perhaps now, with a framework for tests [...]]]></description>
			<content:encoded><![CDATA[<p>As part of my Master&#8217;s thesis about <a href="http://en.wikipedia.org/wiki/Test-driven_development" title="Wikipedia: Test Driven Development" rel="nofollow" class="liwikipedia">Test Driven Development (TDD)</a> I developed a Unit-Test-Framework for the programming language <a href="http://www.softwareag.com/corporate/products/natural/default.asp" title="Software AG Natural website" class="liexternal">Natural</a>. This <a href="http://en.wikipedia.org/wiki/4GL" title="Wikipedia: Fourth Generation Language" rel="nofollow" class="liwikipedia">4GL</a> language from <a href="http://www.softwareag.com" title="Software AG website" class="liexternal">Software AG</a> is in use for over 30 years now but the notion of automated tests has not been spread throughout the developer community. Perhaps now, with a framework for tests available, this will change <img src='http://blog.stefan-macke.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>The Unit-Tests that can be run by NUNIT are subprograms and need to have the following structure. As you can see, the fixture&#8217;s and tests&#8217; names are simply plain text to allow strings that are longer than 32 characters (the longest possible name for a Natural module) to provide meaningful names as in <a href="http://en.wikipedia.org/wiki/Behavior_Driven_Development" title="Wikipedia: Behaviour Driven Development" rel="nofollow" class="liwikipedia">Behaviour Driven Development</a>. The TestCases are parsed by NUNIT for this structure to make sure that all the needed parameters, subroutines etc. are available. To create a new TestCase all you have to do is copy the example source code and change the names and the implementation of the tests in the <tt>IF</tt>-branches.</p>
<div class="codesnip-container" >
<div class="natural codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw1">DEFINE</span> <span class="kw1">DATA</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">PARAMETER</span> <span class="kw1">USING</span> NUTESTP <span class="co2">/* parameters for a single test</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">LOCAL</span> <span class="kw1">USING</span> NUCONST <span class="co2">/* NUNIT constants (error code etc.)</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">LOCAL</span> <span class="kw1">USING</span> NUASSP <span class="co2">/* parameters for the assertions</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">END-DEFINE</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">*</span></div>
</li>
<li class="li1">
<div class="de1">NUTESTP.FIXTURE <span class="sy0">:=</span> <span class="st0">&#8216;Example TestCase 1&#8242;</span> <span class="co2">/* this TestCase&#8217;s fixture</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">INCLUDE</span> NUTCTEMP <span class="co2">/* the template method (SETUP -&gt; TEST -&gt; TEARDOWN)</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">INCLUDE</span> NUTCSTUB <span class="co2">/* stub implementations of SETUP and TEARDOWN</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">DEFINE</span> <span class="kw2">SUBROUTINE</span> TEST <span class="co2">/* the main test routine</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">**************************************************************</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">IF</span> NUTESTP.TEST <span class="kw2">EQ</span> <span class="st0">&#8216;comparing two equal numbers should pass&#8217;</span> <span class="co2">/* name of first test</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">**************************************************************</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; ASSERT-LINE <span class="sy0">:=</span> <span class="sy0">*</span>LINE; <span class="kw1">PERFORM</span> ASSERT-NUM-EQUALS NUASSP 2 2 </div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">END-IF</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">**************************************************************</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">IF</span> NUTESTP.TEST <span class="kw2">EQ</span> <span class="st0">&#8216;comparing two different numbers should fail&#8217;</span> <span class="co2">/* name of second test</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co1">**************************************************************</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; ASSERT-LINE <span class="sy0">:=</span> <span class="sy0">*</span>LINE; <span class="kw1">PERFORM</span> ASSERT-NUM-EQUALS NUASSP 1 2 </div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">END-IF</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">END-SUBROUTINE</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">*</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">END</span></div>
</li>
</ol>
</div>
</div>
<p>The following diagram shows NUNIT&#8217;s architecture. I tried to make the adaption of NUNIT to a different platform than ours (Solaris with Natural modules saved in the file system) as easy as possible and encapsulated the OS-specific implementation into two modules that need to be changed accordingly. I have also included some basic assertions like <tt>ASSERT-NUM-EQUALS</tt>, <tt>ASSERT-STRING-EQUALS</tt> and <tt>ASSERT-ARRAY-EQUALS</tt> and some example TestCases in the source code you can download below.</p>
<div style="text-align: center;"><a href="http://blog.stefan-macke.com/wp-content/uploads/2009/12/ArchitekturNUNIT.png"  rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/12/ArchitekturNUNIT-194x300.png" alt="Architecture of NUNIT" width="194" height="300" /></a></div>
<p>The TestCases&#8217; names are defined in a user-specific workfile in the home directory (in the current configuration, but this may be changed e.g. to a DB <tt>READ</tt>). A run of all defined TestCases is as simple as calling the main program <tt>NUNIT</tt> and produces an output like the following (even with a &#8220;red bar&#8221; <img src='http://blog.stefan-macke.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ).</p>
<div style="text-align: center;"><a href="http://blog.stefan-macke.com/wp-content/uploads/2009/12/ScreenshotNUNITBalken.jpg"  rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/12/ScreenshotNUNITBalken-300x96.jpg" alt="NUNIT test run (red bar)" width="300" height="96" /></a></div>
<div style="text-align: center;"><a href="http://blog.stefan-macke.com/wp-content/uploads/2009/12/ScreenshotNUNITDetailedResults.jpg"  rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/12/ScreenshotNUNITDetailedResults-300x121.jpg" alt="NUNIT detailed test results" width="300" height="121" /></a></div>
<p>Notice the nice failure/error messages including the module names, line numbers etc. <img src='http://blog.stefan-macke.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>I developed NUNIT by applying TDD which means the framework tests itself. After you &#8220;installed&#8221; it (which means importing the NUNIT modules into a library of your choice, preferably a steplib if you plan on using it throughout your application) you can run a simple <tt>TESTNU</tt> to make sure NUNIT behaves as expected.</p>
<div style="text-align: center;"><a href="http://blog.stefan-macke.com/wp-content/uploads/2009/12/NUNITSelbsttest.jpg"  rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/12/NUNITSelbsttest-296x300.jpg" alt="NUNIT self tests" width="296" height="300" /></a></div>
<p>All NUNIT modules include a detailed header comment so they should be pretty self-explanatory. But in fact, all you need to start are the programs <tt>TESTNU</tt>, <tt>NUNIT</tt> and <tt>NUSINGLE</tt> (with which you can run a single TestCase) and a TestCase like <tt>TCEXMPL1</tt>. Just try it out and let me know if you like it <img src='http://blog.stefan-macke.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h3>Downloads</h3>
<ul>
<li><a href="http://f.macke.it/NUNITsrc" title="NUNITs source code" class="liexternal">NUNIT&#8217;s source code</a> (including intermediary versions as described in the thesis)</li>
<li><a href="http://f.macke.it/NUNITMasterarbeit" title="Masters thesis about the development of NUNIT" class="liexternal">The part of my Master&#8217;s thesis about the development of NUNIT</a> (German)</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/StefanMacke?a=WGrqmyLdGoY:DhoR0CB67-I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/StefanMacke?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/StefanMacke?a=WGrqmyLdGoY:DhoR0CB67-I:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/StefanMacke?i=WGrqmyLdGoY:DhoR0CB67-I:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.stefan-macke.com/2009/12/29/nunit-a-unit-test-framework-for-natural/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to mock System.Net.Sockets.Socket</title>
		<link>http://blog.stefan-macke.com/2009/12/28/how-to-mock-system-net-sockets-socket/</link>
		<comments>http://blog.stefan-macke.com/2009/12/28/how-to-mock-system-net-sockets-socket/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 17:05:24 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Mocking]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://blog.stefan-macke.com/?p=733</guid>
		<description><![CDATA[In one of my C# projects I wanted to add tests for a class that uses System.Net.Sockets.Socket. The problem was that the class (FTPConnection) depended directly on Socket as shown in the following class diagram. So I had to find a way to get rid of this direct dependency and mock the Socket class to [...]]]></description>
			<content:encoded><![CDATA[<p>In one of my C# projects I wanted to add tests for a class that uses <tt>System.Net.Sockets.Socket</tt>. The problem was that the class (<tt>FTPConnection</tt>) depended directly on <tt>Socket</tt> as shown in the following class diagram. So I had to find a way to get rid of this direct dependency and mock the <tt>Socket</tt> class to be able to test <tt>FTPConnection</tt> without connecting to a live FTP server for each test. </p>
<div style="text-align: center;"><a href="http://blog.stefan-macke.com/wp-content/uploads/2009/12/MockASocket.png"  rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/12/MockASocket-300x162.png" alt="Direct dependency between FTPConnection and System.Net.Sockets.Socket" width="300" height="162" /></a></div>
<p>The problem with mocking <tt>System.Net.Sockets.Socket</tt> is that it implements no abstract interface and is also sealed (which means you cannot derive from the class). Therefore, you cannot mock the class directly with <a href="http://www.ayende.com/projects/rhino-mocks.aspx" title="Website of RhinoMocks" class="liexternal">RhinoMocks</a> (which otherwise would be able to mock the class directly without the need for an interface). So we have a (framework) class to whose source code we have no access (which we would need to add something like <tt>Socket : ISocket</tt>) and from wich we cannot derive a new class. How do we mock such a seemingly isolated class?</p>
<p>First of all, we need a common interface that we can use for mocking. The problem is that we have to make sure <tt>Socket</tt> implements this interface (let&#8217;s call it <tt>ISocket</tt>). How do we do that? We find a possible answer to that question in the <a href="http://www.amazon.de/gp/product/0201633612?ie=UTF8&#038;tag=blovonstemac-21&#038;linkCode=as2&#038;camp=1638&#038;creative=19454&#038;creativeASIN=0201633612" title="Amazon: Design Patterns. Elements of Reusable Object-Oriented Software." class="liexternal">GoF design patterns catalog</a>:</p>
<blockquote><p>The <strong>adapter</strong> design pattern (often referred to as the wrapper pattern or simply a wrapper) translates one interface for a class into a compatible interface. (<a href="http://en.wikipedia.org/wiki/Adapter_pattern" title="Wikipedia: Adapter pattern" rel="nofollow" class="liwikipedia">Wikipedia</a>)</p></blockquote>
<p>So we have to create an adapter class that implements <tt>ISocket</tt> and simply delegates all calls to its methods to an instance of <tt>Socket</tt>. Then we make sure <tt>FTPConnection</tt> uses the adapter class (or rather <tt>ISocket</tt>) instead of <tt>Socket</tt> directly and provide a constructor through which we can inject our own implementation of <tt>ISocket</tt> (e.g. the mocked one) as shown in the following class diagram.</p>
<div style="text-align: center;"><a href="http://blog.stefan-macke.com/wp-content/uploads/2009/12/MockASocketMocked.png"  rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/12/MockASocketMocked-300x148.png" alt="Mocked System.Net.Sockets.Socket" width="300" height="148" /></a></div>
<p>It is quite a bit of effort to mock the <tt>Socket</tt> class (you have to define every needed method in <tt>ISocket</tt> and implement the delegation in <tt>SocketAdapter</tt>) but it definitely pays off! The resulting design is less coupled due to <tt>FTPConnection</tt> depending on <tt>ISocket</tt> instead of <tt>Socket</tt> directly and can be tested easily by providing a mocked socket that simulates valid or invalid FTP server responses. Examples of how to simulate FTP calls and responses using RhinoMocks are included in my example project below.</p>
<h3>Example project in C#</h3>
<p>I have created a small console application in C# according to the second class diagram above which demonstrates the mocking of <tt>System.Net.Sockets.Socket</tt> and produces the output shown in the following screenshot.</p>
<div style="text-align: center;"><a href="http://blog.stefan-macke.com/wp-content/uploads/2009/12/MockASocketOutput.jpg"  rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/12/MockASocketOutput-300x197.jpg" alt="Console output of MockASocket" width="300" height="197" /></a></div>
<p>You can download the project here:</p>
<ul>
<li><a href="http://blog.stefan-macke.com/wp-content/uploads/2009/12/MockASocket.zip" title="MockASocket (Visual Studio 2008 project including executables and NUnit/RhinoMocks DLLs)" class="lizip">MockASocket (Visual Studio 2008 project including executables and needed DLLs)</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/StefanMacke?a=p0b8cNBDtI4:oZjiOV4Hu7k:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/StefanMacke?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/StefanMacke?a=p0b8cNBDtI4:oZjiOV4Hu7k:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/StefanMacke?i=p0b8cNBDtI4:oZjiOV4Hu7k:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.stefan-macke.com/2009/12/28/how-to-mock-system-net-sockets-socket/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hochzeitsfotos auf Bali</title>
		<link>http://blog.stefan-macke.com/2009/10/31/hochzeitsfotos-auf-bali/</link>
		<comments>http://blog.stefan-macke.com/2009/10/31/hochzeitsfotos-auf-bali/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 17:03:05 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Bilder]]></category>
		<category><![CDATA[Hochzeit]]></category>
		<category><![CDATA[Privat]]></category>
		<category><![CDATA[Reisen]]></category>

		<guid isPermaLink="false">http://blog.stefan-macke.com/?p=707</guid>
		<description><![CDATA[Wir haben einen Tag unserer Hochzeitsreise nach Bali mit unserem Hochzeitsfotografen Michael Stange (und seiner Frau, sowie dem einheimischen Fahrer Nyoman) verbracht und wunderschöne Bilder am Strand, in den Reisfeldern und im Monkey Forest machen lassen. Hier sind die entsprechenden Blog-Einträge von Michael dazu:

Hochzeitsfotos auf Bali (&#8221;normales&#8221; Blog)
Hochzeitsfotos auf Bali (Hochzeitsblog)

Einige Fotos kann man (in [...]]]></description>
			<content:encoded><![CDATA[<p>Wir haben einen Tag unserer Hochzeitsreise nach <a href="http://de.wikipedia.org/wiki/Bali" title="Wikipedia: Bali" rel="nofollow" class="liwikipedia">Bali</a> mit unserem <a href="http://michaelstange.de" title="Hochzeitsblog von Michael Stange" class="liexternal">Hochzeitsfotografen</a> <a href="http://michaelstange.de" title="Blog von Michael Stange" class="liexternal">Michael Stange</a> (und seiner Frau, sowie dem einheimischen Fahrer <a href="http://www.balier.info/menu/touristen/touristen-html/touristeninfo.html" title="Informationen zu den balinesischen Vornamen" class="liexternal">Nyoman</a>) verbracht und wunderschöne Bilder am Strand, in den Reisfeldern und im <a href="http://www.monkeyforestubud.com/" title="Website des Monkey Forest" class="liexternal">Monkey Forest</a> machen lassen. Hier sind die entsprechenden Blog-Einträge von Michael dazu:</p>
<ul>
<li><a href="http://michaelstange.de/blog/hochzeitsfotos-auf-bali" title="Hochzeitsfotos auf Bali" class="liexternal">Hochzeitsfotos auf Bali (&#8221;normales&#8221; Blog)</a></li>
<li><a href="http://michaelstange.eu/hochzeitsfotos-auf-bali/" title="Hochzeitsfotos auf Bali" class="liexternal">Hochzeitsfotos auf Bali (Hochzeitsblog)</a></li>
</ul>
<p>Einige Fotos kann man (in hoher Auflösung) bei Flickr bewundern: <a href="http://www.flickr.com/photos/11326701@N03/archives/date-posted/2009/10/26/" title="Fotostream von michaelstange" class="liexternal">Fotostream von michaelstange (26.10.2009)</a>. </p>
<p>Und ein paar davon gibt es auch hier zu sehen. Kommentare sind erwünscht <img src='http://blog.stefan-macke.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />  </p>
<p>Es war wirklich sehr heiß bei 35° Grad im Anzug und Kleid, obwohl man das auf den Bildern dank Puder nicht sieht <img src='http://blog.stefan-macke.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  </p>
<p>Das grüne Tuch, das z.B. auf dem vorletzten Bild zu sehen ist, ist ein <a href="http://de.wikipedia.org/wiki/Sarong" title="Wikipedia: Sarong" rel="nofollow" class="liwikipedia">Sarong</a>. Den muss man auf Bali tragen, wenn man den mittleren Hof eines Tempels (in diesem Fall der Tempel im Monkey Forest) betreten möchte. Da der untere Teil des Körpers dort als unrein gilt (bzw. den Dämonen nahesteht), muss er durch den Sarong bedeckt und durch einen Gürtel vom oberen Körper abgegrenzt werden.</p>
<p>Die Affen im Monkey Forest heißen <a href="http://de.wikipedia.org/wiki/Makaken" title="Wikipedia: Makaken" rel="nofollow" class="liwikipedia">Makaken</a> (wie passend zu meinem Namen <img src='http://blog.stefan-macke.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ) und einer von ihnen hat hartnäckig versucht, die Perlen vom Kleid abzuknabbern, was ihm bei einer auch tatsächlich gelungen ist. Ansonsten waren die Affen aber friedlich und faul.</p>
<p>Sehr witzig war, dass <a href="http://www.imdb.com/name/nm0000210/" title="IMDB: Julia Roberts" class="liexternal">Julia Roberts</a> an dem Tag, an dem wir die Fotos gemacht haben, <a href="http://balinewsonline.com/bali-news/2009/10/09/julia-robert-will-ride-a-bicycle-in-monkey-forest/" title="Julia Robert will Ride a Bicycle in Monkey Forest" class="liexternal">auch im Monkey Forest war</a> (allerdings erst nachmittags als wir schon weg waren) und die einheimischen Besucher sie mit Jaqueline verwechselt haben, weshalb sie fast mehr Fotos von ihr gemacht haben als Michael. Wir Europäer/Amerikaner sehen für die Balineser wohl alle so &#8220;gleich&#8221; aus wie sie für uns <img src='http://blog.stefan-macke.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p style="text-align: center;">
<a href="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali01.jpg" title="Hochzeitsfotos auf Bali 01" rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali01-300x200.jpg" alt="Hochzeitsfotos auf Bali 01" width="300" height="200" class="size-medium wp-image-708" /></a><br />
<a href="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali02.jpg" title="Hochzeitsfotos auf Bali 02" rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali02-300x200.jpg" alt="Hochzeitsfotos auf Bali 02" width="300" height="200" class="size-medium wp-image-708" /></a><br />
<a href="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali03.jpg" title="Hochzeitsfotos auf Bali 03" rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali03-300x200.jpg" alt="Hochzeitsfotos auf Bali 03" width="300" height="200" class="size-medium wp-image-708" /></a><br />
<a href="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali04.jpg" title="Hochzeitsfotos auf Bali 04" rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali04-200x300.jpg" alt="Hochzeitsfotos auf Bali 04" width="200" height="300" class="size-medium wp-image-708" /></a><br />
<a href="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali05.jpg" title="Hochzeitsfotos auf Bali 05" rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali05-300x200.jpg" alt="Hochzeitsfotos auf Bali 05" width="300" height="200" class="size-medium wp-image-708" /></a><br />
<a href="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali06.jpg" title="Hochzeitsfotos auf Bali 06" rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali06-300x200.jpg" alt="Hochzeitsfotos auf Bali 06" width="300" height="200" class="size-medium wp-image-708" /></a><br />
<a href="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali07.jpg" title="Hochzeitsfotos auf Bali 07" rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali07-200x300.jpg" alt="Hochzeitsfotos auf Bali 07" width="200" height="300" class="size-medium wp-image-708" /></a><br />
<a href="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali08.jpg" title="Hochzeitsfotos auf Bali 08" rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali08-200x300.jpg" alt="Hochzeitsfotos auf Bali 08" width="200" height="300" class="size-medium wp-image-708" /></a><br />
<a href="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali09.jpg" title="Hochzeitsfotos auf Bali 09" rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali09-300x200.jpg" alt="Hochzeitsfotos auf Bali 09" width="300" height="200" class="size-medium wp-image-708" /></a><br />
<a href="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali10.jpg" title="Hochzeitsfotos auf Bali 10" rel="lightbox"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/10/HochzeitsreiseBali10-300x200.jpg" alt="Hochzeitsfotos auf Bali 10" width="300" height="200" class="size-medium wp-image-708" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/StefanMacke?a=5aZ6HhkA0oQ:-cM300W5oP4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/StefanMacke?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/StefanMacke?a=5aZ6HhkA0oQ:-cM300W5oP4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/StefanMacke?i=5aZ6HhkA0oQ:-cM300W5oP4:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.stefan-macke.com/2009/10/31/hochzeitsfotos-auf-bali/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>LaTeX: Zitierte Autorennamen im Fließtext in Kapitälchen schreiben</title>
		<link>http://blog.stefan-macke.com/2009/09/04/latex-zitierte-autorennamen-im-fliesstext-in-kapitaelchen-schreiben/</link>
		<comments>http://blog.stefan-macke.com/2009/09/04/latex-zitierte-autorennamen-im-fliesstext-in-kapitaelchen-schreiben/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 15:03:39 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[masterarbeit]]></category>

		<guid isPermaLink="false">http://blog.stefan-macke.com/?p=697</guid>
		<description><![CDATA[Um die Namen von Autoren, die in LaTeX mittels \citep oder \citet zitiert werden, im Fließtext (und nicht etwa im Literaturverzeichnis!) in Kapitälchen zu setzen, war bei mir eine winzige Anpassung in der Datei natdin.bst nötig (via mrunix.de).
Diese sorgt dafür, dass in die *.bbl-Datei die entsprechende Auszeichnung in die \bibitems eingetragen wird: In der Funktion [...]]]></description>
			<content:encoded><![CDATA[<p>Um die Namen von Autoren, die in LaTeX mittels <tt>\citep</tt> oder <tt>\citet</tt> zitiert werden, <strong>im Fließtext</strong> (und nicht etwa im Literaturverzeichnis!) in <span style="font-variant: small-caps;">Kapitälchen</span> zu setzen, war bei mir eine winzige Anpassung in der Datei <tt>natdin.bst</tt> nötig (via <a href="http://www.mrunix.de/forums/showthread.php?t=50538#11" title="mrunix.de: Wunschzitatstil" class="liexternal">mrunix.de</a>).</p>
<p>Diese sorgt dafür, dass in die <tt>*.bbl</tt>-Datei die entsprechende Auszeichnung in die <tt>\bibitem</tt>s eingetragen wird: In der Funktion <tt>output.bibitem</tt> musste der Output <tt>"\bibitem["</tt> lediglich durch <tt>"\bibitem[<strong>\scshape{}</strong>"</tt> ersetzt werden.</p>
<p>Und schon sehen die Zitate aus wie hier:</p>
<div style="text-align: center;"><img src="http://blog.stefan-macke.com/wp-content/uploads/2009/09/LaTeXciteKapitaelchen1.jpg" alt="LaTeX: Zitierte Autoren in Kapitälchen" title="LaTeX: Zitierte Autoren in Kapitälchen" width="311" height="114" class="size-full wp-image-699" /></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/StefanMacke?a=KJpB0PCWxjw:WN-Lmxiv3qU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/StefanMacke?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/StefanMacke?a=KJpB0PCWxjw:WN-Lmxiv3qU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/StefanMacke?i=KJpB0PCWxjw:WN-Lmxiv3qU:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.stefan-macke.com/2009/09/04/latex-zitierte-autorennamen-im-fliesstext-in-kapitaelchen-schreiben/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
