<?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>Codec</title>
	<atom:link href="http://www.trembl.org/codec/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.trembl.org/codec</link>
	<description>A Personal Polylogic Code/Decode &#039;Zettelkasten&#039;</description>
	<lastBuildDate>Wed, 11 Aug 2010 09:44:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Python 3.1 and TextMate</title>
		<link>http://www.trembl.org/codec/636/</link>
		<comments>http://www.trembl.org/codec/636/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 09:43:27 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/?p=636</guid>
		<description><![CDATA[http://stackoverflow.com/questions/1775954/using-python-3-1-with-textmate Variable can be set in TextMate either on a global or on a per project basis. It seems some of the internals are coded using Python 2.x, therefore a global switch to the backwards-incompatible 3.x is not recommended. Project based variable can be set by opening a project, deselecting any text files, and clicking [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://stackoverflow.com/questions/1775954/using-python-3-1-with-textmate">http://stackoverflow.com/questions/1775954/using-python-3-1-with-textmate</a></p>
<p>Variable can be set in TextMate either on a global or on a per project basis. It seems some of the internals are coded using Python 2.x, therefore a global switch to the backwards-incompatible 3.x is not recommended.</p>
<p>Project based variable can be set by opening a project, deselecting any text files, and clicking on the little i-icon in the project window. My path for Python 3.1 is:<br />
<code><br />
TM_PYTHON<br />
/Library/Frameworks/Python.framework/<br />
Versions/3.1/bin/python3<br />
</code><br />
Your milage might vary.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/636/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inline Functions in C</title>
		<link>http://www.trembl.org/codec/632/</link>
		<comments>http://www.trembl.org/codec/632/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 07:36:08 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[inline]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/?p=632</guid>
		<description><![CDATA[The keyword inline, when applied to functions, tells the compiler to optimize calls to the functions. Usually used for short functions and for the sake of clarity. inline int max&#40;int a, int b&#41; &#123; return a + b; &#125; &#160; int main&#40;void&#41; &#123; int x = 2; int y = 6; printf&#40;&#34;result: %d&#34;, add&#40;x,y&#41;&#41;; &#125; [...]]]></description>
			<content:encoded><![CDATA[<p>The keyword <strong>inline</strong>, when applied to functions, tells the compiler to optimize calls to the functions. Usually used for short functions and for the sake of clarity.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">inline</span> <span style="color: #993333;">int</span> max<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> a<span style="color: #339933;">,</span> <span style="color: #993333;">int</span> b<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> a <span style="color: #339933;">+</span> b<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #993333;">int</span> x <span style="color: #339933;">=</span> <span style="color: #0000dd;">2</span><span style="color: #339933;">;</span>
	<span style="color: #993333;">int</span> y <span style="color: #339933;">=</span> <span style="color: #0000dd;">6</span><span style="color: #339933;">;</span>
	<span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;result: %d&quot;</span><span style="color: #339933;">,</span> add<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span>y<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// ok, the example is stupid, but i hope it illustrates the idea</span></pre></div></div>

<p>Looks exactly the same as calling a function, but actually the function is <strong>not</strong> called, no function-calling overheads are created. Instead the inline function is <strong>expanded</strong> in place, where it is called. Obviously this only makes sense with rather short functions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/632/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling VTK from Source on OSX</title>
		<link>http://www.trembl.org/codec/624/</link>
		<comments>http://www.trembl.org/codec/624/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 07:52:45 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[VTK]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/?p=624</guid>
		<description><![CDATA[Getting the VTK (&#8220;Visualization Tool Kit&#8221;) on Mac OSX running does not seems to be for the faint-of-heart. I will follow the &#8220;Installing VTK on Mac OS X&#8221; from macresearch.org, as it was written in 2007, I&#8217;ll highlight the differences to a current (August 2010, OSX 10.6) Installation. CMake CMake can be installed with the [...]]]></description>
			<content:encoded><![CDATA[<p>Getting the <a href="http://www.vtk.org/">VTK</a> (&#8220;Visualization Tool Kit&#8221;) on Mac OSX running does not seems to be for the faint-of-heart.</p>
<p>I will follow the &#8220;<a href="http://www.macresearch.org/installing_vtk_on_mac_os_x">Installing VTK on Mac OS X</a>&#8221; from macresearch.org, as it was written in 2007, I&#8217;ll highlight the differences to a current (August 2010, OSX 10.6) Installation.</p>
<p><strong>CMake</strong><br />
CMake can be installed with the following command<br />
<code>macports sudo port install cmake</code></p>
<p><strong>VTK &#8211; 1st Try</strong><br />
Wondering if you can install VTK also with MacPorts? Wonder not longer, you can&#8217;t.</p>
<p><strong>VTK &#8211; 2nd Try</strong><br />
Ok, sometimes following a tutorial is good. Obviously replace<br />
<code>export MACOSX_DEPLOYMENT_TARGET=10.4u</code><br />
 with your current OSX version (mine is now: 10.6)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/624/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ControlP5, PeasyCam and HUD in Processing</title>
		<link>http://www.trembl.org/codec/614/</link>
		<comments>http://www.trembl.org/codec/614/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 06:34:41 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[ControlP5]]></category>
		<category><![CDATA[HUD]]></category>
		<category><![CDATA[PeasyCam]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/?p=614</guid>
		<description><![CDATA[A slight development of an ControlP5 example. I needed to have the controls over the PeasyCam, wasn&#8217;t too hard to achieve. Nice one, Processing. Here&#8217;s the applet. /** * ControlP5 with PeasyCam support. * Tested with Processing 1.2.1, PeasyCam 0.8.3 and ControlP5 0.5.0 * * original by * by jeffg 2009 * http://processing.org/discourse/yabb2/YaBB.pl?num=1234988194/30#30 * * [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.trembl.org/codec/processing/ControlP5withPeasyCamAndHUD/"><img src="http://www.trembl.org/codec/wp-content/uploads/2010/07/hud.png"  width="480" height="502" /></a></p>
<p>A slight development of an ControlP5 example. I needed to have the controls <em>over</em> the PeasyCam, wasn&#8217;t too hard to achieve. Nice one, Processing.</p>
<p>Here&#8217;s the <a href="http://www.trembl.org/codec/processing/ControlP5withPeasyCamAndHUD/">applet</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #008000; font-style: italic; font-weight: bold;">/**
 * ControlP5 with PeasyCam support. 
 * Tested with Processing 1.2.1, PeasyCam 0.8.3 and ControlP5 0.5.0
 *
 * original by
 * by jeffg 2009
 * http://processing.org/discourse/yabb2/YaBB.pl?num=1234988194/30#30
 *
 * modified by trembl 2010
 */</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">peasy.*</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">controlP5.*</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">processing.opengl.*</span><span style="color: #339933;">;</span>
&nbsp;
PeasyCam cam<span style="color: #339933;">;</span>
ControlP5 controlP5<span style="color: #339933;">;</span>
PMatrix3D currCameraMatrix<span style="color: #339933;">;</span>
PGraphics3D g3<span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #000066; font-weight: bold;">int</span> buttonValue <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">int</span> myColor <span style="color: #339933;">=</span> color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Slider r,gr,b<span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  size<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">400</span>,<span style="color: #cc66cc;">400</span>,OPENGL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  g3 <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>PGraphics3D<span style="color: #009900;">&#41;</span>g<span style="color: #339933;">;</span>
  cam <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PeasyCam<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>, <span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  cam.<span style="color: #006633;">setMinimumDistance</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  cam.<span style="color: #006633;">setMaximumDistance</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  controlP5 <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ControlP5<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #666666; font-style: italic;">//controlP5.addButton(&quot;button&quot;,10,10,10,80,20).setId(1);</span>
  <span style="color: #666666; font-style: italic;">//controlP5.addButton(&quot;buttonValue&quot;,4,10,40,80,20).setId(2);</span>
&nbsp;
  r <span style="color: #339933;">=</span> controlP5.<span style="color: #006633;">addSlider</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;redSlider&quot;</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">128</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">200</span>,<span style="color: #cc66cc;">20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  r.<span style="color: #006633;">setColorActive</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">128</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  r.<span style="color: #006633;">setColorBackground</span><span style="color: #009900;">&#40;</span> color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">127</span>,<span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  r.<span style="color: #006633;">setColorForeground</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  r.<span style="color: #006633;">setColorLabel</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">127</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  r.<span style="color: #006633;">setColorValue</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">127</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  r.<span style="color: #006633;">setLabel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  r.<span style="color: #006633;">setLabelVisible</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  gr <span style="color: #339933;">=</span> controlP5.<span style="color: #006633;">addSlider</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;greenSlider&quot;</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">128</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">40</span>,<span style="color: #cc66cc;">200</span>,<span style="color: #cc66cc;">20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  gr.<span style="color: #006633;">setColorActive</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">128</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  gr.<span style="color: #006633;">setColorBackground</span><span style="color: #009900;">&#40;</span> color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">127</span>,<span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  gr.<span style="color: #006633;">setColorForeground</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  gr.<span style="color: #006633;">setColorLabel</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">127</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  gr.<span style="color: #006633;">setColorValue</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">127</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  gr.<span style="color: #006633;">setLabel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  gr.<span style="color: #006633;">setLabelVisible</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  b <span style="color: #339933;">=</span> controlP5.<span style="color: #006633;">addSlider</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;blueSlider&quot;</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">128</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">70</span>,<span style="color: #cc66cc;">200</span>,<span style="color: #cc66cc;">20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  b.<span style="color: #006633;">setColorActive</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">128</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  b.<span style="color: #006633;">setColorBackground</span><span style="color: #009900;">&#40;</span> color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">127</span>,<span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  b.<span style="color: #006633;">setColorForeground</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">128</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  b.<span style="color: #006633;">setColorLabel</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">127</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  b.<span style="color: #006633;">setColorValue</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">255</span>,<span style="color: #cc66cc;">127</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  b.<span style="color: #006633;">setLabel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  b.<span style="color: #006633;">setLabelVisible</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  controlP5.<span style="color: #006633;">setAutoDraw</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">void</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
  background<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  fill<span style="color: #009900;">&#40;</span>myColor<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  box<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  pushMatrix<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  translate<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">20</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  fill<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">255</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  box<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  popMatrix<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  cam.<span style="color: #006633;">beginHUD</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  gui<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  cam.<span style="color: #006633;">endHUD</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  cam.<span style="color: #006633;">setMouseControlled</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>r.<span style="color: #006633;">isInside</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> gr.<span style="color: #006633;">isInside</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> b.<span style="color: #006633;">isInside</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    cam.<span style="color: #006633;">setMouseControlled</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> 
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> gui<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  currCameraMatrix <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PMatrix3D<span style="color: #009900;">&#40;</span>g3.<span style="color: #006633;">camera</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  camera<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  controlP5.<span style="color: #006633;">draw</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  g3.<span style="color: #006633;">camera</span> <span style="color: #339933;">=</span> currCameraMatrix<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> redSlider<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> v<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  myColor <span style="color: #339933;">=</span> color<span style="color: #009900;">&#40;</span> v, green<span style="color: #009900;">&#40;</span>myColor<span style="color: #009900;">&#41;</span>, blue<span style="color: #009900;">&#40;</span>myColor<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  r.<span style="color: #006633;">setColorActive</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span>v,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> greenSlider<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> v<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  myColor <span style="color: #339933;">=</span> color<span style="color: #009900;">&#40;</span>red<span style="color: #009900;">&#40;</span>myColor<span style="color: #009900;">&#41;</span>, v, blue<span style="color: #009900;">&#40;</span>myColor<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  gr.<span style="color: #006633;">setColorActive</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,v,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> blueSlider<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> v<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  myColor <span style="color: #339933;">=</span> color<span style="color: #009900;">&#40;</span>red<span style="color: #009900;">&#40;</span>myColor<span style="color: #009900;">&#41;</span>, green<span style="color: #009900;">&#40;</span>myColor<span style="color: #009900;">&#41;</span>, v <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  b.<span style="color: #006633;">setColorActive</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,v<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/614/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing TextMate Bundles via Subversion</title>
		<link>http://www.trembl.org/codec/612/</link>
		<comments>http://www.trembl.org/codec/612/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 04:00:58 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[bundles]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/?p=612</guid>
		<description><![CDATA[Instruction from the TextMate site, this is the minimal info for installing TextMate Bundles mkdir -p /Library/Application\ Support/TextMate/Bundles cd /Library/Application\ Support/TextMate/Bundles svn co http://svn.textmate.org/trunk/Bundles/Haskell.tmbundle Update all bundles cd /Library/Application\ Support/TextMate/Bundles svn up *.tmbundle]]></description>
			<content:encoded><![CDATA[<p>Instruction from the TextMate <a href="http://manual.macromates.com/en/bundles">site</a>, this is the minimal info for installing<a href="http://svn.textmate.org/trunk/Bundles/"> TextMate Bundles</a></p>
<p><code><br />
mkdir -p /Library/Application\ Support/TextMate/Bundles<br />
cd /Library/Application\ Support/TextMate/Bundles<br />
svn co http://svn.textmate.org/trunk/Bundles/Haskell.tmbundle<br />
</code></p>
<p>Update all bundles<br />
<code><br />
cd /Library/Application\ Support/TextMate/Bundles<br />
svn up *.tmbundle<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/612/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hide/Show Files in the Mac OSX GUI</title>
		<link>http://www.trembl.org/codec/609/</link>
		<comments>http://www.trembl.org/codec/609/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 02:28:43 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[chflags]]></category>
		<category><![CDATA[finder]]></category>
		<category><![CDATA[hide]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[show]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/?p=609</guid>
		<description><![CDATA[Hide files from the Finder: chflags hidden filename And show them again: chflags nohidden filename]]></description>
			<content:encoded><![CDATA[<p>Hide files from the Finder:<br />
<code>chflags hidden filename</code></p>
<p>And show them again:<br />
<code>chflags nohidden filename</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/609/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery slideToggle flicker</title>
		<link>http://www.trembl.org/codec/608/</link>
		<comments>http://www.trembl.org/codec/608/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 07:04:20 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[jQuery slideToggle flicker div]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/608/</guid>
		<description><![CDATA[I was running into a tiny, but annoying problem when using jQuery&#8217;s slideToggle. When called, the hidden container would briefly become visible, then hide, and the nicely animate in. SOLUTION: Turns out jQuery does not play nicely with tables. Instead using a table as a container, I wrapped the table into a &#60;div&#62; and applied [...]]]></description>
			<content:encoded><![CDATA[<p>I was running into a tiny, but annoying problem when using jQuery&#8217;s slideToggle. When called, the hidden container would briefly become visible, then hide, and the nicely animate in.</p>
<p>SOLUTION:<br />
Turns out jQuery does not play nicely with tables. Instead using a table as a container, I wrapped the table into a &lt;div&gt; and applied the slideToggle to that. Works nicely.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/608/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Safari 4 &#8211; Debug and Develop</title>
		<link>http://www.trembl.org/codec/606/</link>
		<comments>http://www.trembl.org/codec/606/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 03:15:42 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/?p=606</guid>
		<description><![CDATA[The Developer Menu is straight-forward. Go to the Safari Preferences / Advanced and enable the menu. The Debug Menu must be activated in the com.apple.Safari.plist. Either by issuing the following command: defaults write com.apple.Safari IncludeInternalDebugMenu 1 Or by opening the plist with the Property List Editor Application and adding a new &#8216;IncludeInternalDebugMenu&#8217; node, with a [...]]]></description>
			<content:encoded><![CDATA[<p>The <strong>Developer Menu</strong> is straight-forward. Go to the Safari Preferences / Advanced and enable the menu.</p>
<p>The Debug Menu must be activated in the com.apple.Safari.plist. Either by issuing the following command:<br />
<code>defaults write com.apple.Safari IncludeInternalDebugMenu 1</code></p>
<p>Or by opening the plist with the Property List Editor Application and adding a new &#8216;IncludeInternalDebugMenu&#8217; node, with a boolean value set to 1. Same thing, different means.</p>
<p>Don&#8217;t forget to restart Safari to see the changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/606/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delaying Methods. And cancelling the delaying of methods</title>
		<link>http://www.trembl.org/codec/594/</link>
		<comments>http://www.trembl.org/codec/594/#comments</comments>
		<pubDate>Tue, 18 May 2010 09:11:36 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[cancel]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[longest method name]]></category>
		<category><![CDATA[method]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/594/</guid>
		<description><![CDATA[Delaying a method should be by now fairly clear: &#91;self performSelector:@selector&#40;myMethod&#41; withObject:nil afterDelay:3&#93;; But what, if you need to cancel the delayed perform request? That&#8217;s the way to do it: &#91;NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector&#40;myMethod&#41; object:nil&#93;; &#8216;cancelPreviousPerformRequestsWithTarget&#8216; seems to be the current leader in the &#8216;Longest Objective C Method Name Competition&#8221; with 39 characters, not bad. Let [...]]]></description>
			<content:encoded><![CDATA[<p>Delaying a method should be by now fairly clear:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span>self performSelector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>myMethod<span style="color: #002200;">&#41;</span> withObject<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> afterDelay<span style="color: #002200;">:</span><span style="color: #2400d9;">3</span><span style="color: #002200;">&#93;</span>;</pre></div></div>

<p>But what, if you need to cancel the delayed perform request? That&#8217;s the way to do it:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSObject</span> cancelPreviousPerformRequestsWithTarget<span style="color: #002200;">:</span>self selector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>myMethod<span style="color: #002200;">&#41;</span> object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;</pre></div></div>

<p><em>&#8216;<strong>cancelPreviousPerformRequestsWithTarget</strong>&#8216; seems to be the current leader in the &#8216;Longest Objective C Method Name Competition&#8221; with 39 characters, not bad.</p>
<p>Let me <a href="http://www.twitter.com/trembl">know</a>, if you find any more contenders&#8230;<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/594/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fonts on the iPhone</title>
		<link>http://www.trembl.org/codec/591/</link>
		<comments>http://www.trembl.org/codec/591/#comments</comments>
		<pubDate>Mon, 17 May 2010 08:41:49 +0000</pubDate>
		<dc:creator>Georg Tremmel</dc:creator>
				<category><![CDATA[Raw]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[UIFont]]></category>

		<guid isPermaLink="false">http://www.trembl.org/codec/591/</guid>
		<description><![CDATA[I never seen to be able to remember the fonts available on the iPhone. Here&#8217;s the code to print out all font families and font styles. for &#40;NSString *familyName in &#91;UIFont familyNames&#93;&#41; &#123; NSLog&#40;@&#34;%@, %@&#34;, familyName, &#91;UIFont fontNamesForFamilyName:familyName&#93;&#41;; &#125; And here is the current result: 2010-05-17 17:38:05.931 fonts[20843:207] AppleGothic, ( AppleGothic ) 2010-05-17 17:38:05.932 fonts[20843:207] [...]]]></description>
			<content:encoded><![CDATA[<p>I never seen to be able to remember the fonts available on the iPhone. Here&#8217;s the code to print out all font families and font styles.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">for</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>familyName <span style="color: #a61390;">in</span> <span style="color: #002200;">&#91;</span>UIFont familyNames<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%@, %@&quot;</span>, familyName, <span style="color: #002200;">&#91;</span>UIFont fontNamesForFamilyName<span style="color: #002200;">:</span>familyName<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>And here is the current result:</p>
<pre>
2010-05-17 17:38:05.931 fonts[20843:207] AppleGothic, (
    AppleGothic
)
2010-05-17 17:38:05.932 fonts[20843:207] Hiragino Kaku Gothic ProN, (
    "HiraKakuProN-W6",
    "HiraKakuProN-W3"
)
2010-05-17 17:38:05.932 fonts[20843:207] Arial Unicode MS, (
    ArialUnicodeMS
)
2010-05-17 17:38:05.932 fonts[20843:207] Heiti K, (
    "STHeitiK-Medium",
    "STHeitiK-Light"
)
2010-05-17 17:38:05.932 fonts[20843:207] DB LCD Temp, (
    DBLCDTempBlack
)
2010-05-17 17:38:05.932 fonts[20843:207] Helvetica, (
    "Helvetica-Oblique",
    "Helvetica-BoldOblique",
    Helvetica,
    "Helvetica-Bold"
)
2010-05-17 17:38:05.932 fonts[20843:207] Marker Felt, (
    "MarkerFelt-Thin"
)
2010-05-17 17:38:05.933 fonts[20843:207] Times New Roman, (
    TimesNewRomanPSMT,
    "TimesNewRomanPS-BoldMT",
    "TimesNewRomanPS-BoldItalicMT",
    "TimesNewRomanPS-ItalicMT"
)
2010-05-17 17:38:05.933 fonts[20843:207] Verdana, (
    "Verdana-Bold",
    "Verdana-BoldItalic",
    Verdana,
    "Verdana-Italic"
)
2010-05-17 17:38:05.933 fonts[20843:207] Georgia, (
    "Georgia-Bold",
    Georgia,
    "Georgia-BoldItalic",
    "Georgia-Italic"
)
2010-05-17 17:38:05.933 fonts[20843:207] Arial Rounded MT Bold, (
    ArialRoundedMTBold
)
2010-05-17 17:38:05.933 fonts[20843:207] Trebuchet MS, (
    "TrebuchetMS-Italic",
    TrebuchetMS,
    "Trebuchet-BoldItalic",
    "TrebuchetMS-Bold"
)
2010-05-17 17:38:05.933 fonts[20843:207] Heiti TC, (
    "STHeitiTC-Light",
    "STHeitiTC-Medium"
)
2010-05-17 17:38:05.933 fonts[20843:207] Geeza Pro, (
    "GeezaPro-Bold",
    GeezaPro
)
2010-05-17 17:38:05.934 fonts[20843:207] Courier, (
    Courier,
    "Courier-BoldOblique",
    "Courier-Oblique",
    "Courier-Bold"
)
2010-05-17 17:38:05.934 fonts[20843:207] Arial, (
    ArialMT,
    "Arial-BoldMT",
    "Arial-BoldItalicMT",
    "Arial-ItalicMT"
)
2010-05-17 17:38:05.934 fonts[20843:207] Heiti J, (
    "STHeitiJ-Medium",
    "STHeitiJ-Light"
)
2010-05-17 17:38:05.934 fonts[20843:207] Arial Hebrew, (
    ArialHebrew,
    "ArialHebrew-Bold"
)
2010-05-17 17:38:05.934 fonts[20843:207] Courier New, (
    "CourierNewPS-BoldMT",
    "CourierNewPS-ItalicMT",
    "CourierNewPS-BoldItalicMT",
    CourierNewPSMT
)
2010-05-17 17:38:05.934 fonts[20843:207] Zapfino, (
    Zapfino
)
2010-05-17 17:38:05.934 fonts[20843:207] American Typewriter, (
    AmericanTypewriter,
    "AmericanTypewriter-Bold"
)
2010-05-17 17:38:05.935 fonts[20843:207] Heiti SC, (
    "STHeitiSC-Medium",
    "STHeitiSC-Light"
)
2010-05-17 17:38:05.935 fonts[20843:207] Helvetica Neue, (
    HelveticaNeue,
    "HelveticaNeue-Bold"
)
2010-05-17 17:38:05.935 fonts[20843:207] Thonburi, (
    "Thonburi-Bold",
    Thonburi
)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.trembl.org/codec/591/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
