<?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>tanketorsken.dk</title>
	<atom:link href="http://www.tanketorsken.dk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tanketorsken.dk</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 07 Apr 2011 07:50:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Maybe the best answer on stackoverflow</title>
		<link>http://www.tanketorsken.dk/maybe-the-best-answer-on-stackoverflow/</link>
		<comments>http://www.tanketorsken.dk/maybe-the-best-answer-on-stackoverflow/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 11:09:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tanketorsken.dk/?p=269</guid>
		<description><![CDATA[Was doing some random browsing when I found this answer on stackoverflow. It could very well be the most thorough answer on stackoverflow!]]></description>
			<content:encoded><![CDATA[<p>Was doing some random browsing when I found <a href="http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118">this answer</a> on stackoverflow. It could very well be the most thorough answer on stackoverflow! <img src='http://www.tanketorsken.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.tanketorsken.dk/maybe-the-best-answer-on-stackoverflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First major written assignment at dtu</title>
		<link>http://www.tanketorsken.dk/first-major-written-assignment-at-dtu/</link>
		<comments>http://www.tanketorsken.dk/first-major-written-assignment-at-dtu/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 17:02:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tanketorsken.dk/?p=265</guid>
		<description><![CDATA[I have finally decided on a subject for my first major written assignment at dtu. The title of my assignment is &#8220;Detection of human alertness using supervised learning&#8221;. I have to develop a program that given some 30 measurements of physiological and environmental factors can decide whether a driver is about to be inattentive. I [...]]]></description>
			<content:encoded><![CDATA[<p>I have finally decided on a subject for my first major written assignment at dtu. The title of my assignment is &#8220;Detection of human alertness using supervised learning&#8221;. I have to develop a program that given some 30 measurements of physiological and environmental factors can decide whether a driver is about to be inattentive. I am very excited and eager to get going.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tanketorsken.dk/first-major-written-assignment-at-dtu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The set of all polynomials with integer coefficients is countable</title>
		<link>http://www.tanketorsken.dk/the-set-of-all-polynomials-with-integer-coefficients-is-countable/</link>
		<comments>http://www.tanketorsken.dk/the-set-of-all-polynomials-with-integer-coefficients-is-countable/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 03:33:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tanketorsken.dk/?p=246</guid>
		<description><![CDATA[I have been up late, finishing my first written assignment for the course Mathematics 3 at DTU. By coincidence I found a very neat proof of the countability of the set of all polynomials with integer coefficients. The idea is to map every polynomial to a unique integer. The easy way to do that is [...]]]></description>
			<content:encoded><![CDATA[<p>I have been up late, finishing my first written assignment for the course Mathematics 3 at DTU. By coincidence I found a very neat proof of the countability of the set of all polynomials with integer coefficients. The idea is to map every polynomial to a unique integer. The easy way to do that is to define a positional base-13 numeral system where the digits for 10, 11 and 12 is represented by the symbols &#8220;x&#8221;, &#8220;+&#8221; and &#8220;-&#8221;. That way, every polynomial, represents a unique integer in the base-13 system. Eg. the polynomial</p>
<p><img src='http://s.wordpress.com/latex.php?latex=%20%20x%5E2%20%2B%20x%20-%201%20%20&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt='  x^2 + x - 1  ' title='  x^2 + x - 1  ' class='latex' /> is the base-13 number</p>
<p><img src='http://s.wordpress.com/latex.php?latex=%20%20xx%2Bx-1%20%20&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt='  xx+x-1  ' title='  xx+x-1  ' class='latex' /> which (in base-10) equals</p>
<p><img src='http://s.wordpress.com/latex.php?latex=%20%2010%5Ccdot%2013%5E5%20%2B%2010%5Ccdot%2013%5E4%20%2B%2011%5Ccdot%2013%5E3%20%2B%2010%20%5Ccdot%2013%5E2%20%2B%2012%5Ccdot%2013%20%2B%201%20%3D%204%20024%20554%20%20&#038;bg=ffffff&#038;fg=000000&#038;s=1' alt='  10\cdot 13^5 + 10\cdot 13^4 + 11\cdot 13^3 + 10 \cdot 13^2 + 12\cdot 13 + 1 = 4 024 554  ' title='  10\cdot 13^5 + 10\cdot 13^4 + 11\cdot 13^3 + 10 \cdot 13^2 + 12\cdot 13 + 1 = 4 024 554  ' class='latex' /> Every other polynomial maps to a unique integer in the same way. One small problem remains. The preimage of the mapping isn&#8217;t the whole set of integers, so what we know right now, is that the cardinality, of the set of polynomials, is less than or equal to the cardinality of the set of integers. No problem. The set of all zero-degree polynomials is a subset of all polynomials, and all zero-degree polynomials maps to a single integer and all integers is mapped by a single zero-degree polynomial. This implies that the cardinality of the set of all polynomials is greater than or equal to the cardinality of the set of integers. </p>
<p>The only possibility that remains is that the cardinality of the polynomials and the integers is exactly equal. Technically we need to show that the integers is countable, by mapping them 1-1 to the natural numbers, but that is trivial.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tanketorsken.dk/the-set-of-all-polynomials-with-integer-coefficients-is-countable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paste from clipboard to gvim</title>
		<link>http://www.tanketorsken.dk/paste-from-clipboard-to-gvim/</link>
		<comments>http://www.tanketorsken.dk/paste-from-clipboard-to-gvim/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 14:15:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tanketorsken.dk/?p=244</guid>
		<description><![CDATA[Sometimes I need to paste something from the clipboard to gvim. The content of the clipboard is saved in the register *, so the command "*p does the job.]]></description>
			<content:encoded><![CDATA[<p>Sometimes I need to paste something from the clipboard to gvim. The content of the clipboard is saved in the register *, so the command</p>
<pre>
"*p
</pre>
<p>does the job.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tanketorsken.dk/paste-from-clipboard-to-gvim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remap keys in Ubuntu</title>
		<link>http://www.tanketorsken.dk/remap-keys-in-ubuntu/</link>
		<comments>http://www.tanketorsken.dk/remap-keys-in-ubuntu/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 14:11:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tanketorsken.dk/?p=240</guid>
		<description><![CDATA[I&#8217;ve just installed Ubuntu and wanted to remap a few keys system wise. The xmodmap command is useful for this task. First you need to find the keycode for the key you want to remap and the keysym that the key should be remapped to. $ xmodmap -pk &#124; less When you have found the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just installed Ubuntu and wanted to remap a few keys system wise. The xmodmap command is useful for this task. First you need to find the keycode for the key you want to remap and the keysym that the key should be remapped to.</p>
<pre>
$  xmodmap -pk | less
</pre>
<p>When you have found the keycode and the keysym you just enter</p>
<pre>
$ xmodmap -e 'keycode &lt;keycode&gt; = &lt;keysym&gt;'
</pre>
<p>and then the key is remapped.</p>
<p>EDIT 08-04-2011:<br />
Use the command xev to find the keycode for the key you want to remap. If I want to change the key that is the half fraction on my Lenovo I type in</p>
<pre>
$ xmodmap -e 'keycode 49=dollar'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tanketorsken.dk/remap-keys-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vi tar&#8217; den en gang til</title>
		<link>http://www.tanketorsken.dk/vi-tar-den-en-gang-til/</link>
		<comments>http://www.tanketorsken.dk/vi-tar-den-en-gang-til/#comments</comments>
		<pubDate>Sat, 20 Nov 2010 10:49:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tanketorsken.dk/?p=238</guid>
		<description><![CDATA[Jeg ved ikke hvor mange gange jeg har brugt disse kommandoer, men jeg bliver alligevel ved med at glemme dem! Grr&#8230; Opret arkiv med tar cvzf archivename.tar.gz foldernametotar Udpak arkiv med tar xvzf archivename.tar.gz]]></description>
			<content:encoded><![CDATA[<p>Jeg ved ikke hvor mange gange jeg har brugt disse kommandoer, men jeg bliver alligevel ved med at glemme dem! Grr&#8230;<br />
Opret arkiv med</p>
<pre>
tar cvzf archivename.tar.gz foldernametotar
</pre>
<p>Udpak arkiv med</p>
<pre>
tar xvzf archivename.tar.gz
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tanketorsken.dk/vi-tar-den-en-gang-til/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Underbevisthed</title>
		<link>http://www.tanketorsken.dk/underbevisthed/</link>
		<comments>http://www.tanketorsken.dk/underbevisthed/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 10:11:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tanketorsken.dk/?p=236</guid>
		<description><![CDATA[Skulle lige sikre mig at python 2.5 returnerede floats ved division, men var lidt distræt og endte med at skrive from __future__ import decision det kunne være pænt sejt hvis det virkede&#8230;]]></description>
			<content:encoded><![CDATA[<p>Skulle lige sikre mig at python 2.5 returnerede floats ved division, men var lidt distræt og endte med at skrive</p>
<pre class="prettyprint">
from __future__ import decision
</pre>
<p>det kunne være pænt sejt hvis det virkede&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tanketorsken.dk/underbevisthed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP compact funktionen</title>
		<link>http://www.tanketorsken.dk/php-compact-funktionen/</link>
		<comments>http://www.tanketorsken.dk/php-compact-funktionen/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 12:54:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tanketorsken.dk/?p=225</guid>
		<description><![CDATA[Jeg kan stadig finde nye små godbidder blandt phps funktioner. Nogen gange kommer jeg ud for en situation hvor en funktion har en række parametrer som den så skal samle i et array og sende videre: function menu($items, $id, $show_submenus) { return render_partial('menu', array( 'items' => $items, 'id' => $id, 'show_submenus' => $show_submenus )); } [...]]]></description>
			<content:encoded><![CDATA[<p>Jeg kan stadig finde nye små godbidder blandt phps funktioner. Nogen gange kommer jeg ud for en situation hvor en funktion har en række parametrer som den så skal samle i et array og sende videre:</p>
<pre class="prettyprint">function menu($items, $id, $show_submenus) {
    return render_partial('menu', array(
        'items' => $items,
        'id' => $id,
        'show_submenus' => $show_submenus
    ));
}
</pre>
<p>Repetitionen er rimelig tydelig, men jeg vil gerne have funktionen &#8220;menu&#8221; så jeg i min template kan skrive</p>
<pre>&lt;div class="some_wrapper"&gt;
    &lt;?=menu($items, 'mainmenu', true)?&gt;
&lt;/div&gt;
</pre>
<p>istedet for</p>
<pre>&lt;div class="some_wrapper"&gt;
    &lt;?=render_partial('menu', array('items'=&gt;$items, 'id'=&gt;'mainmenu', 'show_submenus'=&gt;true)?&gt;
&lt;/div&gt;
</pre>
<p>Løsningen er en php-funktion jeg har overset indtil i dag. Compact tager et vilkårligt antal strenge. For hver streng undersøger den om der er en variabel med samme navn defineret i samme scope, som compact bliver kaldt. Hvis der er, bliver variablens værdi tilføjet til det array compact i sidste ende returnerer. Arrayet compact returnerer har variablens navn som key og variablens værdi som value. Lige hvad der skal bruges til at gøre min menu-funktion pænere.</p>
<pre class="prettyprint">function menu($items, $id, $show_submenus) {
    return render_partial('menu', compact('items','id','show_submenus'));
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tanketorsken.dk/php-compact-funktionen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lodrette streger i matricer i Latex</title>
		<link>http://www.tanketorsken.dk/lodrette-streger-i-matricer-i-latex/</link>
		<comments>http://www.tanketorsken.dk/lodrette-streger-i-matricer-i-latex/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 17:26:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tanketorsken.dk/?p=223</guid>
		<description><![CDATA[Sidder og skal have bikset en aflevering i operationsanalyse (nej det har ikke noget med hospitalsvæsenet at gøre) færdig. Jeg skal blandt andet skrive nogle matricer der skal have lodrette streger mellem nogle af kolonnerne. Fandt denne lille stump man bare skal smide i sin preamble \makeatletter \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{% \hskip -\arraycolsep \let\@ifnextchar\new@ifnextchar \array{#1}} \makeatother og [...]]]></description>
			<content:encoded><![CDATA[<p>Sidder og skal have bikset en aflevering i operationsanalyse (nej det har ikke noget med hospitalsvæsenet at gøre) færdig. Jeg skal blandt andet skrive nogle matricer der skal have lodrette streger mellem nogle af kolonnerne. Fandt denne lille stump man bare skal smide i sin preamble</p>
<pre>
\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
  \hskip -\arraycolsep
  \let\@ifnextchar\new@ifnextchar
  \array{#1}}
\makeatother
</pre>
<p>og vupti så kan man få lodrette streger ved at angive en ekstra parameter til matrix-environmentet.</p>
<pre>
\begin{bmatrix}[ccc|cc]
    2 &#038; 1 &#038; 2 &#038; 1 &#038; 0 \\
    1 &#038; 2 &#038; 3 &#038; 0 &#038; 1
\end{bmatrix}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tanketorsken.dk/lodrette-streger-i-matricer-i-latex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP-Latex installeret</title>
		<link>http://www.tanketorsken.dk/wp-latex-installeret/</link>
		<comments>http://www.tanketorsken.dk/wp-latex-installeret/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 19:54:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tanketorsken.dk/?p=214</guid>
		<description><![CDATA[Har lige installeret WP-Latex og skal lige tjekke at det virker: Det virker det jo til det gør. Og her:]]></description>
			<content:encoded><![CDATA[<p>Har lige installeret WP-Latex og skal lige tjekke at det virker:<br />
<img src='http://s.wordpress.com/latex.php?latex=%5Cint_0%5E1%20t%5E2%5C%2Cdt&#038;bg=ffffff&#038;fg=000000&#038;s=2' alt='\int_0^1 t^2\,dt' title='\int_0^1 t^2\,dt' class='latex' /><br />
Det virker det jo til det gør. Og her:<br />
<img src='http://s.wordpress.com/latex.php?latex=%20%20%5Csum_%7Bn%3D1%7D%5E%7B%5Cinfty%7D%5Cfrac%7B1%7D%7Bn%21%7D%20%20&#038;bg=ffffff&#038;fg=000000&#038;s=2' alt='  \sum_{n=1}^{\infty}\frac{1}{n!}  ' title='  \sum_{n=1}^{\infty}\frac{1}{n!}  ' class='latex' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tanketorsken.dk/wp-latex-installeret/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

