<?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>One Man&#039;s Trash is Another Man&#039;s Blog</title> <atom:link href="http://www.blueraja.com/blog/feed" rel="self" type="application/rss+xml" /><link>http://www.blueraja.com/blog</link> <description>Just another WordPress site</description> <lastBuildDate>Tue, 10 May 2011 08:16:53 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Branchless Conditionals (Compiler Optimization Technique)</title><link>http://www.blueraja.com/blog/285/branchless-conditionals-compiler-optimization-technique</link> <comments>http://www.blueraja.com/blog/285/branchless-conditionals-compiler-optimization-technique#comments</comments> <pubDate>Tue, 10 May 2011 07:51:08 +0000</pubDate> <dc:creator>BlueRaja</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://www.blueraja.com/blog/?p=285</guid> <description><![CDATA[One of the neater and lesser-known optimizations a compiler can perform is a &#8220;branchless conditional&#8221; &#8211; a conditional statement that contains no branches (go figure). To understand what this means, take a look at the following C-snippet: if(SomeFunc() == 4) &#160;&#160;&#160;&#160;return 54; else &#160;&#160;&#160;&#160;return 2; When compiled with no optimizations in Visual Studio, this is [...]]]></description> <content:encoded><![CDATA[<p>One of the neater and lesser-known optimizations a compiler can perform is a &#8220;branchless conditional&#8221; &#8211; a conditional statement that contains no branches (go figure).</p><p>To understand what this means, take a look at the following C-snippet:</p><p><code>if(SomeFunc() == 4)<br
/> &nbsp;&nbsp;&nbsp;&nbsp;return 54;<br
/> else<br
/> &nbsp;&nbsp;&nbsp;&nbsp;return 2;<br
/> </code></p><p>When compiled with no optimizations in Visual Studio, this is the output</p><p><code>&nbsp;&nbsp;&nbsp;&nbsp;if(SomeFunc() == 4)<br
/> 00A0140E  call SomeFunc (0A01145h)<br
/> 00A01413  cmp  eax, 4<br
/> 00A01416  jne  0A01421h<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 54;<br
/> 00A01418  mov  eax, 54<br
/> 00A0141D  jmp  0A01426h<br
/> &nbsp;&nbsp;&nbsp;&nbsp;else<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 2;<br
/> 00A01421  mov  eax, 2<br
/> 0A01426h  ret<br
/> </code></p><p>Nothing surprising here &#8211; almost a literal translation from C to assembly.  Small, fast, efficient &#8211; what could we possibly improve upon?</p><p>One possible improvement could be removing the branches &#8211; the <span
class="equation">jmp</span> and <span
class="equation">jne</span> instructions.</p><p>Branch instructions are not in-and-of themselves particularly slow; all a <span
class="equation">jmp</span> instruction does is write a value to the Program Counter (PC) register, and on a simple CPU which reads and executes one instruction at a time, <span
class="equation">jmp</span> wouldn&#8217;t be slower than any other instruction which writes to a register.  However, modern CPUs are anything but simple.</p><p>On modern CPUs, instructions are not read then immediately executed, one-by-one.  Rather, the process is split into multiple stages, called the <a
href="http://en.wikipedia.org/wiki/Instruction_pipeline">Instruction Pipeline</a>.  This allows, for example, the instruction two instructions in the future to be fetched (read) while the next instruction is being decoded and the current instruction is being executed, and the previous instruction is writing its results to memory!  This allows incredible speedups in program execution time, but now that the CPU is essentially executing multiple instructions at once, the CPU designers must take <i>extreme</i> precautions to make sure that the results of the execution are still correct!</p><p>And herein lies the problem with conditional jumps like <span
class="equation">jne</span>:  How does the processor know what the &#8220;next&#8221; instruction will be before it actually executes the conditional?  The answer is:  it doesn&#8217;t.  It <a
href="http://en.wikipedia.org/wiki/Branch_prediction">can guess</a> <i>(I believe I read that the Intel x86 guesses correctly ~60% of the time)</i>, but if it guesses incorrectly, the entire Instruction Pipeline must be <a
href="http://en.wikipedia.org/wiki/Instruction_pipeline#Complications">flushed</a>:  all the work the CPU did fetching and decoding the instructions it <i>thought</i> were going to be executed is invalidated and completely removed from the pipeline, and the entire pipeline sits around doing nothing while it waits for the <span
class="equation">jne</span> instruction to complete.  Essentially, a <span
class="equation">jne</span> instruction with a failed prediction causes our fancy expensive pipelined CPU to act as though it were a boring old non-pipelined CPU.</p><p><i>(In fact, the situation is even more complicated than that:  modern CPUs essentially have <a
href="http://en.wikipedia.org/wiki/Superscalar">multiple pipelines</a>, meaning they <b>literally</b> execute more than one instruction at once, even if there is only one core and the program is single-threaded.  When a conditional-jump prediction fails, all these pipelines must be flushed and stalled, so all the pipelines sit around doing nothing when the conditional-jump executes)</i></p><p>Knowing all of this, let&#8217;s see how Visual Studio compiles the above code with optimizations enabled:<br
/> <code>0012100B  call SomeFunc (0A01145h)<br
/> 0012101A  sub  eax, 4<br
/> 0012101D  neg  eax<br
/> 0012101F  sbb  eax, eax<br
/> 00121021  and  eax, -52<br
/> 00121024  add  eax, 54<br
/> </code></p><p>Whoa, what happened there?  There are no longer <i>any</i> branch instructions!  Let&#8217;s translate this back to C, to help see what&#8217;s going on:<br
/> <code>//A rough translation of the above assembly code<br
/> eax = SomeFunc() - 4;<br
/> eax = -(eax != 0); //See below<br
/> eax = (eax &#038; -52) + 54;<br
/> </code></p><p>It appears the branches have been replaced with some clever math and bit-fiddling.  Here&#8217;s how it works <i>(don&#8217;t feel bad if you have to read this over a few times, this is complex stuff!)</i>:</p><ul><li>We set <span
class="equation">eax = SomeFunc() &#8211; 4</span>.  Thus, if <span
class="equation">SomeFunc() == 4</span>, <span
class="equation">eax = 0</span>; otherwise, <span
class="equation">eax != 0</span>.</li><li><span
class="equation">neg eax</span> will set the carry-flag to 0 if <span
class="equation">eax == 0</span>, or 1 otherwise.  Thus, the carry-flag gets set to <span
class="equation">(eax != 0)</span>.<p><span
class="equation">sbb A, B</span> (<span
class="equation">sbb</span> means <i>&#8220;subtract with borrow&#8221;</i>) essentially does <span
class="equation">A = A &#8211; (B + carryFlag)</span>.  Thus, <span
class="equation">sbb eax, eax</span> sets <span
class="equation">eax = 0</span> if the carry-flag was 0, or <span
class="equation">eax = -1</span> if the carry-flag was 1.</p><p>At this point, if <span
class="equation">SomeFunc() == 4</span>, <span
class="equation">eax == 0</span>.  Otherwise, <span
class="equation">eax == -1</span></li><li>Finally, we take the bitwise-AND of <span
class="equation">eax</span> with -52, and add 54.  Since <span
class="equation">0 &#038; -52 == 0</span> and <span
class="equation">-1 &#038; -52 == -52</span> (Remember, in 2&#8242;s complement -1 has all bits set, so <span
class="equation">-1 &#038; x</span> <i>always</i> equals <span
class="equation">x</span>), this means that if <span
class="equation">SomeFunc() == 4</span> (and thus <span
class="equation">eax == 0</span>), the result will be <span
class="equation">0 + 54 = 54</span>; while if <span
class="equation">SomeFunc() != 4</span> (and thus <span
class="equation">eax == -1</span>), the result will be <span
class="equation">-52 + 54 = 2</span>.  This is the exact same result as our original function!</li></ul><p>So now the important question:  Are branchless conditionals really faster?</p><p>Well, that depends.  If the branch-predictor in the CPU is consistantly right for our code, the instruction pipeline would never need to be flushed, and the code with branches would be faster &#8211; it does, after all, involve a lot fewer operations.  If, however, the branch-predictor is wrong often enough, the instruction pipeline will need to be flushed all/most of the time the code is run, which would make the branchless code faster.  And unfortunately, there is no way to determine if the branch predictor will guess correctly for your code.  Thus, if this is an <i>absolutely critical</i> portion of your code: <b>Profile!</b> Test both code-chunks (branchless and branching), and see which is faster in your case!</p><p>And, for the love of god, don&#8217;t write your code like the <i>&#8220;rough translation&#8221;</i> above to try to force the compiler to write branchless code.  Not only will you confuse the compiler and probably end up making your code <i>slower</i>, but you will drive whoever has to maintain the code absolutely insane.</p><hr
/> <br
/> Just for reference, here are some more examples of branchless conditionals:</p><p>Example from Eldad Eilam&#8217;s <a
href="http://www.amazon.com/Reversing-Secrets-Engineering-Eldad-Eilam/dp/0764574817">&#8220;Reversing:  Secret of Reverse Engineering&#8221;</a>:</p><p><code>if(LocalVariable &#038; 0x00001000)<br
/> &nbsp;&nbsp;&nbsp;&nbsp;return 1;<br
/> else<br
/> &nbsp;&nbsp;&nbsp;&nbsp;return 0;</p><p>mov eax, [ebp - 10]<br
/> and eax, 0x00001000<br
/> neg eax<br
/> sbb eax, eax<br
/> neg eax<br
/> ret<br
/> </code></p><p>Example from <a
href="http://stackoverflow.com/questions/539836/emulating-variable-bit-shift-using-only-constant-shifts">http://stackoverflow.com/questions/539836/emulating-variable-bit-shift-using-only-constant-shifts</a></p><p><code>int isel( int a, int x, int y )<br
/> {<br
/> &nbsp;&nbsp;&nbsp;&nbsp;return (a >= 0 ? x : y);<br
/> };</p><p>int isel( int a, int x, int y )<br
/> {<br
/> &nbsp;&nbsp;&nbsp;&nbsp;int mask = a >> 31; // arithmetic shift right, splat out the sign bit<br
/> &nbsp;&nbsp;&nbsp;&nbsp;// mask is 0xFFFFFFFF if (a < 0) and 0x00 otherwise.<br
/> &nbsp;&nbsp;&nbsp;&nbsp;return (x &#038; (~mask)) + (y &#038; mask);<br
/> };<br
/> </code></p><p>Example from <a
href="http://stackoverflow.com/questions/1610836/branchless-code-that-maps-zero-negative-and-positive-to-0-1-2">http://stackoverflow.com/questions/1610836/branchless-code-that-maps-zero-negative-and-positive-to-0-1-2</a></p><p><code>int Compare(int x, int y)<br
/> {<br
/> &nbsp;&nbsp;&nbsp;&nbsp;int diff = x - y;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;if (diff == 0)<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 0;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;else if (diff < 0)<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 1;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;else<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 2;<br
/> }</p><p>int Compare(int x, int y)<br
/> {<br
/> &nbsp;&nbsp;&nbsp;&nbsp;int diff = y - x;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;return (!!diff) << ((diff >> 31) &#038; 1);<br
/> }<br
/> </code><br
/><hr
/><span
class="similar-posts-title"><strong>Additional Reading:</strong></span><ul
class="similar-posts"><li><a
href="http://www.blueraja.com/blog/161/how-to-double-the-length-of-any-essay-without-writing-a-word" rel="bookmark" title="June 15, 2009">How to Double the Length of Any Essay (Without Writing a Word!)</a></li><li><a
href="http://www.blueraja.com/blog/150/java-biginteger-benchmark" rel="bookmark" title="November 6, 2008">Java BigInteger Benchmarks</a></li><li><a
href="http://www.blueraja.com/blog/135/rsa-encryption-part-1" rel="bookmark" title="June 25, 2008">RSA Encryption, Part 1</a></li><li><a
href="http://www.blueraja.com/blog/189/whats-the-difference-between-neutral-and-ground" rel="bookmark" title="July 27, 2009">What&#8217;s the difference between neutral and ground?</a></li><li><a
href="http://www.blueraja.com/blog/168/123-112" rel="bookmark" title="August 13, 2009">1+2+3+&#8230; = -1/12</a></li></ul><p></p> ]]></content:encoded> <wfw:commentRss>http://www.blueraja.com/blog/285/branchless-conditionals-compiler-optimization-technique/feed</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Making Use of Spare Hard-Drives</title><link>http://www.blueraja.com/blog/170/making-use-of-spare-hard-drives</link> <comments>http://www.blueraja.com/blog/170/making-use-of-spare-hard-drives#comments</comments> <pubDate>Fri, 21 Aug 2009 06:20:23 +0000</pubDate> <dc:creator>BlueRaja</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://www.blueraja.com/blog2/?p=170</guid> <description><![CDATA[Additional Reading: Why do we use Alternating Current (AC) instead of Direct Current (DC) in power lines?]]></description> <content:encoded><![CDATA[<p><img
src="http://www.blueraja.com/images/blog/post24/HPIM4518.JPG" width="640" height="480" /></p><p><img
src="http://www.blueraja.com/images/blog/post24/HPIM4519.JPG" width="640" height="480" /></p><p><img
src="http://www.blueraja.com/images/blog/post24/HPIM4521.JPG" width="640" height="480" /></p><p><img
src="http://www.blueraja.com/images/blog/post24/HPIM4522.JPG" width="640" height="480" /></p><p><img
src="http://www.blueraja.com/images/blog/post24/HPIM4532.JPG" width="640" height="480" /></p><p><img
src="http://www.blueraja.com/images/blog/post24/HPIM4529.JPG" width="572" height="477" /></p><p><img
src="http://www.blueraja.com/images/blog/post24/HPIM4531.JPG" width="640" height="480" /></p><p><img
src="http://www.blueraja.com/images/blog/post24/HPIM4533.JPG" width="640" height="480" /></p><p><img
src="http://www.blueraja.com/images/blog/post24/HPIM4534.JPG" width="640" height="480" /></p><p><img
src="http://www.blueraja.com/images/blog/post24/HPIM4536.JPG" width="199" height="558" /> <img
src="http://www.blueraja.com/images/blog/post24/HPIM4537.JPG" width="417" height="601" /></p><hr
/><span
class="similar-posts-title"><strong>Additional Reading:</strong></span><ul
class="similar-posts"><li><a
href="http://www.blueraja.com/blog/176/why-do-we-use-alternating-current-ac-instead-of-direct-current-dc-in-power-lines" rel="bookmark" title="July 27, 2009">Why do we use Alternating Current (AC) instead of Direct Current (DC) in power lines?</a></li></ul><p></p> ]]></content:encoded> <wfw:commentRss>http://www.blueraja.com/blog/170/making-use-of-spare-hard-drives/feed</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>1+2+3+&#8230; = -1/12</title><link>http://www.blueraja.com/blog/168/123-112</link> <comments>http://www.blueraja.com/blog/168/123-112#comments</comments> <pubDate>Thu, 13 Aug 2009 06:19:24 +0000</pubDate> <dc:creator>BlueRaja</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://www.blueraja.com/blog2/?p=168</guid> <description><![CDATA[The following is from an essay on Ramanujan I wrote a few years back. Enjoy. &#160; &#8230;they recognized Ramanujan&#8217;s enormous talent for mathematics, and together they convinced Ramanujan to write to English mathematicians about his discoveries. [...] The third letter he wrote, to M. J. M. Hill, received a reply, but was not very encouraging. [...]]]></description> <content:encoded><![CDATA[<p><em>The following is from an essay on Ramanujan I wrote a few years back.  Enjoy.</em></p><hr
/>&nbsp;<p>&#8230;they recognized Ramanujan&#8217;s enormous talent for  mathematics, and together they convinced Ramanujan to write to  English mathematicians about his discoveries. [...] The third letter he wrote, to M. J. M. Hill, received a reply, but was not very encouraging.  In his reply, Hill stated,</p><p>“<em>Mr.  Ramanujan is evidently a man with a taste for Mathematics, and with  some ability, but he has got on two wrong lines.  He does not  understand the precautions which have to be taken in dealing with  divergent series, otherwise he could not have obtained the erroneous  results you send me, viz:&#8211;</em></p><p><span
style="padding-left: 30px;"><img
src="http://www.blueraja.com/images/blog/post23/eq1.png" width="232" height="114" /></span></p><p> However, the problem was not with  Ramanujan&#8217;s result itself, but rather with his lack of explanation of  the result – or perhaps with Hill&#8217;s lack of knowledge on divergent  series.</p><p> Before Ramanujan&#8217;s result can be  explained, though, we have to first take a step back over 150 years  in history.  In 1749, the mathematics giant Leonhard Euler wrote a  paper in which he derived the paradoxical result that 1 –  2 + 3 – 4 + &#8230; = 1/4.</p><p></p><p><strong>Theorem  (Euler)</strong> <em>1  – 2 + 3 – 4 + </em>&#8230;<em> = 1/4</em></p><p><em>Proof.</em> Notice that the power series for 1/(x+1)<sup>2</sup> is</p><p><span
style="padding-left: 30px;"><img
src="http://www.blueraja.com/images/blog/post23/eq2.png" width="234" height="44" /></span></p><p>If  we assume this to be true for all x, we can plug in the value <strong>x=1</strong> to obtain the desired result! &loz;</p><p></p><p> In  order for his result to make sense, Euler proposed (several times  throughout his life) that an extended definition of the word “sum”  be made.  In his own words,<br
/> “<em>Let  us say, therefore, that the sum of any infinite series is the finite  expression, by the expansion of which the series is generated. In  this sense the sum of the infinite series 1 − x + x<sup>2</sup> − x<sup>3</sup> + &#8230; will be 1⁄1+x,  because the series arises from the expansion of the fraction,  whatever number is put in place of x.  If this is agreed, the new  definition of the word sum coincides with the ordinary meaning when a  series converges; and since divergent series have no sum in the  proper sense of the word, no inconvenience can arise from this new  terminology. Finally, by means of this definition, we can preserve  the utility of divergent series and defend their use from all  objections.</em>”</p><p> (It should be noted that Euler&#8217;s  proof would not be valid by today&#8217;s standards, because 1 – 2x + 3x<sup>2</sup> – 4x<sup>3</sup> + &#8230; does not define a valid function when x=1.  However, it  would be valid to take the limit as x approaches 1 from the left;  doing this yields the same result. Today there are many methods of  finding the “sum” of a divergent series; the method just  mentioned, laid out by Euler, is now known as the “Abel summation”  of the series).</p><p> Now that we know what it means  for a divergent series to “sum” to a certain finite value, we can  ask the question of whether or not Ramanujan&#8217;s results were in any way correct.</p><p></p><p><strong>Theorem</strong> <em>1+2+3+&#8230;+∞  = -1/12</em></p><p><em>Proof.</em> This proof is due to Ramanujan – though he didn&#8217;t send it to Hill  originally, he did write it down in his first notebook.</p><p> Say we set c = 1 + 2 + 3 + &#8230;   Then</p><p><span
style="padding-left: 30px;"><img
src="http://www.blueraja.com/images/blog/post23/eq3.png" width="282" height="42" /></span></p><p> Subtracting the bottom row from  the top,</p><p><span
style="padding-left: 30px;"><img
src="http://www.blueraja.com/images/blog/post23/eq4.png" width="209" height="20" /></span></p><p>ala  Euler.  Thus, c = -1/12.  This result is correct to the extent that  Euler&#8217;s result is correct as well. &loz;</p><hr
/><span
class="similar-posts-title"><strong>Additional Reading:</strong></span><ul
class="similar-posts"><li><a
href="http://www.blueraja.com/blog/138/rsa-encryption-part-2" rel="bookmark" title="July 2, 2008">RSA Encryption, Part 2</a></li><li><a
href="http://www.blueraja.com/blog/135/rsa-encryption-part-1" rel="bookmark" title="June 25, 2008">RSA Encryption, Part 1</a></li><li><a
href="http://www.blueraja.com/blog/285/branchless-conditionals-compiler-optimization-technique" rel="bookmark" title="May 10, 2011">Branchless Conditionals (Compiler Optimization Technique)</a></li><li><a
href="http://www.blueraja.com/blog/189/whats-the-difference-between-neutral-and-ground" rel="bookmark" title="July 27, 2009">What&#8217;s the difference between neutral and ground?</a></li><li><a
href="http://www.blueraja.com/blog/194/do-transformers-obey-ohms-law" rel="bookmark" title="July 27, 2009">Do transformers obey Ohm&#8217;s Law?</a></li></ul><p></p> ]]></content:encoded> <wfw:commentRss>http://www.blueraja.com/blog/168/123-112/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>(Un)Common Questions about Electricity</title><link>http://www.blueraja.com/blog/166/uncommon-questions-about-electricity</link> <comments>http://www.blueraja.com/blog/166/uncommon-questions-about-electricity#comments</comments> <pubDate>Mon, 27 Jul 2009 06:18:04 +0000</pubDate> <dc:creator>BlueRaja</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://www.blueraja.com/blog2/?p=166</guid> <description><![CDATA[When I first began learning about electronics and electricity, there were a number of seemingly obvious questions that never seemed to be answered by my professors, books, or articles on electricity; I had to scrape together answers gradually, gathering knowledge from every source I could find. I&#8217;m collecting these questions and answers here in the [...]]]></description> <content:encoded><![CDATA[<p>When I first began learning about electronics and electricity, there were a number of seemingly obvious questions that never seemed to be answered by my professors, books, or articles on electricity; I had to scrape together answers gradually, gathering knowledge from every source I could find.</p><p>I&#8217;m collecting these questions and answers here in the hopes that they will someday save some poor internet-goer like yourself from all the trouble I had to go through.</p><p><span
class="heading">Contents</span></p><ul><li><a
href="/blog/176/why-do-we-use-alternating-current-ac-instead-of-direct-current-dc-in-power-lines">Why do we use Alternating Current (AC) instead of Direct Current (DC) in power lines?</a></li><li><a
href="/blog/179/does-electricity-flow-from-positive-to-negative-or-from-negative-to-positive">Does electricity flow from positive (+) to negative (-) or from negative to positive?</a></li><li><a
href="/blog/184/whats-the-difference-between-voltage-at-a-point-and-voltage-between-two-points-also-what-is-ground">What&#8217;s the difference between &quot;voltage at a point&quot; and &quot;voltage between two points?&quot; Also, what is &#8216;ground?&#8217;</a></li><li><a
href="/blog/185/how-fast-do-electrons-move-in-a-circuit">How fast do electrons move in a circuit?</a></li><li><a
href="/blog/187/why-can-the-resistor-go-at-the-beginning-of-the-circuit-or-at-the-end">Why can the resistor go at the beginning of the circuit <em>or</em> at the end?</a></li><li><a
href="/blog/189/whats-the-difference-between-neutral-and-ground">What&#8217;s the difference between neutral and ground?</a></li><li><a
href="/blog/190/how-is-it-possible-that-theres-not-a-complete-circuit-to-the-power-plant">How is it possible that there&#8217;s not a complete circuit to the power plant?</a></li><li><a
href="/blog/192/how-does-jump-starting-a-car-work-if-current-only-flows-when-theres-a-difference-in-voltage">How does jump starting a car work if current only flows when there&#8217;s a difference in voltage?</a></li><li><a
href="/blog/194/do-transformers-obey-ohms-law">Do transformers obey Ohm&#8217;s Law?</a></li></ul><hr
/><span
class="similar-posts-title"><strong>Additional Reading:</strong></span><ul
class="similar-posts"><li><a
href="http://www.blueraja.com/blog/190/how-is-it-possible-that-theres-not-a-complete-circuit-to-the-power-plant" rel="bookmark" title="July 27, 2009">How is it possible that there&#8217;s not a complete circuit to the power plant?</a></li><li><a
href="http://www.blueraja.com/blog/184/whats-the-difference-between-voltage-at-a-point-and-voltage-between-two-points-also-what-is-ground" rel="bookmark" title="July 27, 2009">What&#8217;s the difference between &#8220;voltage at a point&#8221; and &#8220;voltage between two points?&#8221; Also, what is &#8216;ground?&#8217;</a></li><li><a
href="http://www.blueraja.com/blog/179/does-electricity-flow-from-positive-to-negative-or-from-negative-to-positive" rel="bookmark" title="July 27, 2009">Does electricity flow from positive (+) to negative (-) or from negative to positive?</a></li><li><a
href="http://www.blueraja.com/blog/176/why-do-we-use-alternating-current-ac-instead-of-direct-current-dc-in-power-lines" rel="bookmark" title="July 27, 2009">Why do we use Alternating Current (AC) instead of Direct Current (DC) in power lines?</a></li><li><a
href="http://www.blueraja.com/blog/194/do-transformers-obey-ohms-law" rel="bookmark" title="July 27, 2009">Do transformers obey Ohm&#8217;s Law?</a></li></ul><p></p> ]]></content:encoded> <wfw:commentRss>http://www.blueraja.com/blog/166/uncommon-questions-about-electricity/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How to Give Someone Elf Ears and Vampire Fangs in Photoshop</title><link>http://www.blueraja.com/blog/164/how-to-give-someone-elf-ears-and-vampire-fangs-in-photoshop</link> <comments>http://www.blueraja.com/blog/164/how-to-give-someone-elf-ears-and-vampire-fangs-in-photoshop#comments</comments> <pubDate>Sun, 21 Jun 2009 06:16:41 +0000</pubDate> <dc:creator>BlueRaja</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://www.blueraja.com/blog2/?p=164</guid> <description><![CDATA[As if the Internet doesn&#8217;t have enough weird fetishes floating around, here&#8217;s a quick tutorial for beginners on how to give someone elf ears and vampire fangs in photoshop. For this tutorial, I&#8217;ve used a stock photograph of the beautiful American model, Valerie Hatfield. Those interested in her work can contact her here. Open your [...]]]></description> <content:encoded><![CDATA[<p>As if the Internet doesn&#8217;t have enough weird fetishes floating around, here&#8217;s a quick tutorial for beginners on how to give someone elf ears and vampire fangs in photoshop.</p><p>For this tutorial, I&#8217;ve used a stock photograph of the beautiful American model, Valerie Hatfield.</p><p><a
href="http://www.blueraja.com/images/blog/post21/100_0620.jpg"><img
src="http://www.blueraja.com/images/blog/post21/100_0620.small.jpg" alt="" width="400" height="533" /></a></p><p>Those interested in her work can contact her <a
href="mailto: mifkits@blueraja.com">here</a>.</p><ol><li>Open your image in Photoshop</li><li>As always, duplicate the background layer before anything else.<p><img
src="http://www.blueraja.com/images/blog/post21/2009-01-21_1340.png" alt="" width="214" height="289" /></li><li>Highlight the ear. This can be done rather easily using the quick-select tool (alt+click to remove from selection).<p><img
src="http://www.blueraja.com/images/blog/post21/2009-01-21_1340_001.jpg" alt="" width="499" height="693" /></li><li>Now warp the ear (edit-&gt;transform-&gt;warp) to your liking.<p><img
src="http://www.blueraja.com/images/blog/post21/2009-01-21_1340_002.jpg" alt="" width="999" height="834" /><img
src="http://www.blueraja.com/images/blog/post21/2009-01-21_1347.jpg" alt="" width="499" height="693" /></p><p>(Note that you may have to remove part of the ear from the background. See any tutorial on removing objects from images  &#8211; you could, for example, simply copy and paste a piece of hair over the old ear)</p><hr
/><p>That takes care of the elf ears &#8211; now let&#8217;s give her vampire teeth as well. We could use the same technique we used for the ears, but that leaves the tooth looking flat and two-dimensional; I prefer a technique which causes the tooth to affect the lips as well.</li><li>Select the tooth in the same way you selected the ear.<p><img
src="http://www.blueraja.com/images/blog/post21/2009-01-21_1406.jpg" alt="" width="499" height="693" /></li><li>Now, using the lasso tool, add to the selection (by holding shift) a small portion of the lip and chin just below and around the tooth, as so:<p><img
src="http://www.blueraja.com/images/blog/post21/2009-01-21_1406_001.jpg" alt="" width="499" height="693" /></li><li>Open the liquify window (Filter-&gt;liquify). Using the forward-warp tool and a brush about the size of the tooth, drag the tooth downwards. Try to do it one one swift motion, using undo (ctrl+alt+z) to go back as many times as necessary.<p><img
src="http://www.blueraja.com/images/blog/post21/2009-01-21_1408.png" alt="" width="866" height="755" /></li><li>Select the Reconstuct Tool on the left, and use it to give your tooth a point. You may want to lower your brush density and experiment with different reconstruct modes (under &#8216;Tool Options&#8217;) to get it just right.<p><img
src="http://www.blueraja.com/images/blog/post21/2009-01-21_1412.png" alt="" width="866" height="755" /></li><li>That&#8217;s it! Here&#8217;s what the finished tooth looks like:<p><img
src="http://www.blueraja.com/images/blog/post21/2009-01-21_1417.jpg" alt="" width="499" height="693" /></p><p>And, after a few more tweaks, the final image:</p><p><a
href="http://www.blueraja.com/images/blog/post21/vampirelf.jpg"><img
src="http://www.blueraja.com/images/blog/post21/vampirelf.small.jpg" alt="" width="400" height="533" /></a></li></ol><hr
/><span
class="similar-posts-title"><strong>Additional Reading:</strong></span><ul
class="similar-posts"><li><a
href="http://www.blueraja.com/blog/156/the-greatest-romance-stories-of-all-time" rel="bookmark" title="December 14, 2008">The Greatest Romance Stories of All Time</a></li><li><a
href="http://www.blueraja.com/blog/161/how-to-double-the-length-of-any-essay-without-writing-a-word" rel="bookmark" title="June 15, 2009">How to Double the Length of Any Essay (Without Writing a Word!)</a></li><li><a
href="http://www.blueraja.com/blog/148/polka-burgers-and-sound-financial-advice" rel="bookmark" title="August 13, 2008">Polka, Burgers, and Sound Financial Advice</a></li><li><a
href="http://www.blueraja.com/blog/131/signing-up-for-a-user-account" rel="bookmark" title="June 15, 2008">signing up for a user account</a></li><li><a
href="http://www.blueraja.com/blog/150/java-biginteger-benchmark" rel="bookmark" title="November 6, 2008">Java BigInteger Benchmarks</a></li></ul><p></p> ]]></content:encoded> <wfw:commentRss>http://www.blueraja.com/blog/164/how-to-give-someone-elf-ears-and-vampire-fangs-in-photoshop/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>How to Double the Length of Any Essay (Without Writing a Word!)</title><link>http://www.blueraja.com/blog/161/how-to-double-the-length-of-any-essay-without-writing-a-word</link> <comments>http://www.blueraja.com/blog/161/how-to-double-the-length-of-any-essay-without-writing-a-word#comments</comments> <pubDate>Mon, 15 Jun 2009 06:11:05 +0000</pubDate> <dc:creator>BlueRaja</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://www.blueraja.com/blog2/?p=161</guid> <description><![CDATA[As promised, here are a few tips to help double the length of any essay. All of these statistics/instructions are for Microsoft Word 2007, but they apply equally well to older versions of Word or OpenOffice. Replace All the Periods Increase in size: 42.9% How to do it: Go to edit-&#62;replace and place a period [...]]]></description> <content:encoded><![CDATA[<p>As promised, here are a few tips to help double the length of any essay.</p><p>All of these statistics/instructions are for Microsoft Word 2007, but they apply equally well to older versions of Word or OpenOffice.</p><p><span
class="howtoTitle">Replace All the Periods</span><br
/> <span
class="howtoParameter">Increase in size:</span> <span
class="howtoImportant">42.9%</span><br
/> <span
class="howtoParameter">How to do it:</span> Go to edit-&gt;replace and place a period (.) in both boxes. Highlight the period in the &quot;replace with&quot; box, and click on &quot;more&quot; in the lower-right hand corner. Then click format-&gt;font.<br
/> Under &quot;size,&quot; increase the font-size significantly &#8211; I used 16 in this example.<br
/> Click OK, then hit &quot;replace all.&quot;<br
/> <a
href="http://www.blueraja.com/images/blog/post20/period1.png"><img
src="http://www.blueraja.com/images/blog/post20/period1.png" width="50%" height="50%" /></a><a
href="http://www.blueraja.com/images/blog/post20/period2.png"><img
src="http://www.blueraja.com/images/blog/post20/period2.png" width="50%" height="50%" /></a></p><p><span
class="howtoTitle">Increase the Paragraph Spacing</span><br
/> <span
class="howtoParameter">Increase in size:</span> <span
class="howtoImportant">21.6%</span><br
/> <span
class="howtoParameter">How to do it:</span> Higlight everything (edit-&gt;select all), right-click-&gt;Paragraph. Set &quot;Line Spacing&quot; to multiple, and set it to something between 2 and 3 (or between 1 and 2 if it&#8217;s a single-spaced essay). I set it to 2.5 for this example.<br
/> <a
href="http://www.blueraja.com/images/blog/post20/2.5 paragraphing.png"><img
src="http://www.blueraja.com/images/blog/post20/2.5 paragraphing.png" width="50%" height="50%" /></a></p><p><span
class="howtoTitle">Change the Font Size</span><br
/> <span
class="howtoParameter">Increase in size:</span> <span
class="howtoImportant">9.1%</span><br
/> <span
class="howtoParameter">How to do it:</span> The font size is right next to the font face, at the top. After highlighting everything, increase it by up to a whole point &#8211; I set it a half-point larger (11.5) for this example.<br
/> <a
href="http://www.blueraja.com/images/blog/post20/11.5 font.png"><img
src="http://www.blueraja.com/images/blog/post20/11.5 font.png" /></a></p><p><span
class="howtoTitle">Use a Different Font</span><br
/> <span
class="howtoParameter">Increase in size:</span> <span
class="howtoImportant">9.1%</span><br
/> <span
class="howtoParameter">How to do it:</span> Highlight everything, and just change the font from something other than the default, Calibri. I changed it to the old default, Times New Roman (12 pt font), for the 9.1% increase, but there are probably other similiar-looking fonts that will increase that even more.</p><p><span
class="howtoTitle">Change the Margins</span><br
/> <span
class="howtoParameter">Increase in size:</span> <span
class="howtoImportant">7.2%</span><br
/> <span
class="howtoParameter">How to do it:</span> Go to Page Layout-&gt;Margins-&gt;Custom and increase the margins. They default to 1&quot; all around &#8211; I changed it to 1.15&quot; all around.<br
/> <a
href="http://www.blueraja.com/images/blog/post20/margins.png"><img
src="http://www.blueraja.com/images/blog/post20/margins.png" width="50%" height="50%" /></a></p><p><span
class="howtoTitle">Change the Character Spacing</span><br
/> <span
class="howtoParameter">Increase in size:</span> <span
class="howtoImportant">7.1%</span><br
/> <span
class="howtoParameter">How to do it:</span> Select everything (ctrl+a), then right-click-&gt;Font-&gt;Character Spacing. Change the spacing to something small (Half a point or less). I use 0.3pt<br
/> <a
href="http://www.blueraja.com/images/blog/post20/character spacing.png"><img
src="http://www.blueraja.com/images/blog/post20/character%20spacing.png" width="50%" height="50%" /></a></p><p><span
class="howtoTitle">All effects put together:</span><br
/> <span
class="howtoParameter">Increase in size:</span> <span
class="howtoImportant" style="font-size: 2.5em; text-decoration: underline;">114.5%</span> (over double!)</p><hr
/><span
class="similar-posts-title"><strong>Additional Reading:</strong></span><ul
class="similar-posts"><li><a
href="http://www.blueraja.com/blog/164/how-to-give-someone-elf-ears-and-vampire-fangs-in-photoshop" rel="bookmark" title="June 21, 2009">How to Give Someone Elf Ears and Vampire Fangs in Photoshop</a></li><li><a
href="http://www.blueraja.com/blog/176/why-do-we-use-alternating-current-ac-instead-of-direct-current-dc-in-power-lines" rel="bookmark" title="July 27, 2009">Why do we use Alternating Current (AC) instead of Direct Current (DC) in power lines?</a></li><li><a
href="http://www.blueraja.com/blog/144/golb" rel="bookmark" title="August 1, 2008">Golb</a></li><li><a
href="http://www.blueraja.com/blog/158/how-to-save-thousands-on-textbooks" rel="bookmark" title="January 23, 2009">How to Save Thousands on Textbooks</a></li><li><a
href="http://www.blueraja.com/blog/150/java-biginteger-benchmark" rel="bookmark" title="November 6, 2008">Java BigInteger Benchmarks</a></li></ul><p></p> ]]></content:encoded> <wfw:commentRss>http://www.blueraja.com/blog/161/how-to-double-the-length-of-any-essay-without-writing-a-word/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How to Save Thousands on Textbooks</title><link>http://www.blueraja.com/blog/158/how-to-save-thousands-on-textbooks</link> <comments>http://www.blueraja.com/blog/158/how-to-save-thousands-on-textbooks#comments</comments> <pubDate>Fri, 23 Jan 2009 06:07:46 +0000</pubDate> <dc:creator>BlueRaja</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://www.blueraja.com/blog2/?p=158</guid> <description><![CDATA[At the start of every new college semester, I inevitably find myself listening to dozens of whiney Freshmen complain about how it costs (their parents) $800 for new textbooks. As I enter my final semester, I feel I should pass my secrets down to the coming generations. See, I haven&#8217;t spent that much on textbooks [...]]]></description> <content:encoded><![CDATA[<p>At the start of every new college semester, I inevitably find myself listening to dozens of whiney Freshmen complain about how it costs (their parents) $800 for new textbooks. As I enter my final semester, I feel I should pass my secrets down to the coming generations. See, I haven&#8217;t spent that much on textbooks over the course of my entire college career. And today I share my secrets with all of you. Why? Simply for the joy of seeing you smile (because now you can afford those dental bills).</p><p><span
class="heading">1. Don&#8217;t Buy Your Books</span><br
/> This may seem like useless non-advice, but it&#8217;s actually the most important tip, which is why I placed it first. Ask any college senior, and you&#8217;ll likely find that as many as 50% of their textbooks have gone completely unopened over the years. Many professors recommend a book simply for the sake of recommending a book; it may be awful even as a reference, or have very little to do with the class. <strong>Find someone who has taken the class before and ask them if they needed the book for homework or assigned reading, they used it often as a reference, or if they simply never opened it.</strong> This little bit of anticipatory research can save you thousands over the course of four years.</p><p><span
class="heading">2. The Library is Your Best Reference</span><br
/> Even if you need the book for homework or the occasional reference, you can still get away with not buying it. Most school libraries carry copies of the books required for each class. Though you probably won&#8217;t be able to check it out for any extended period of time, you can usually <strong>check it out long enough to do your homework each week</strong> or, if that&#8217;s too inconvenient for you, you could <strong>photocopy all the homework-pages</strong> ahead of time for only a few dollars, saving hundreds.</p><p><span
class="heading">3. Borrow From a Friend</span><br
/> Okay, so you absolutely need the textbook, and can&#8217;t stand walking to the library every week. I have good news for you &#8211; you can still get out of buying your textbook! If, at least, you happen to make friends with someone who has taken the course previously. Ask around, <strong>find someone who has taken the class already</strong>, and bring them out for a drink. Even if they don&#8217;t have their textbook anymore or refuse to borrow (or rent..?) it out to you, they can <strong>still help you learn if you can save in other ways</strong> on this class&#8217;s textbook.</p><p><span
class="heading">3. Buy Old Editions</span><br
/> A lot of the more greedy book publishers have realized that if they don&#8217;t reissue a new edition of their book every few years, the same few copies will continuously circulate in online trading sites, killing their sales. Thus, every few years they add a new paragraph or two, fix a few mistakes, and <strong>jumble the chapter problems</strong> (not even change them!) in order to re-release the same book as the &quot;<em>new edition</em>.&quot; Since the demand for old editions of textbooks is so low, the <strong>price of even the previous edition is usually dirt-cheap</strong>.</p><div
align="center" style="float: right; padding: 0px 10px 5px 10px; width: 378px"><img
src="http://www.blueraja.com/images/blog/post19/calculus.png" title="Do you know how many Marvel Legends you could buy with that?" width="378" height="124" /><br
/> <span
class="imageSubtitle">The basics of Calculus have been the same for over 300 years &#8211; so do we really need a new Calculus textbook every six months?</span></div><p> On the off-chance that you actually need to do the chapter problems, you can still go to the library and photocopy them &#8211; or, even better, <strong>figure out which problems from <em>your</em> book correspond</strong> to the homework problems in the new book.<br
/> If you were planning on using the book only as a reference, you may want to consider <strong>buying a completely different book</strong>. The textbook I used for Calculus was nearly identical to the one we were supposed to use, but <a
href="http://www.amazon.com/gp/offer-listing/0534437362/ref=dp_olp_used?ie=UTF8&amp;condition=used">only cost me four dollars</a> (including shipping)!</p><p><span
class="heading">4. Buy Used or International Copies</span><br
/> An international version of a book has <strong>the same content</strong> as the non-international version, but is meant to be sold in places where it&#8217;s illegal to <em>artificially jack up the price of textbooks</em> (I&#8217;m looking at you, America). These textbooks can be found at <strong>any online book-trading site</strong>; one good place to compare prices from these sites is <a
href="http://www.dealoz.com">www.dealoz.com</a>, though there are many others (Facebook has a marketplace as well).</p><p><span
class="heading">5. Sell Your Books at the Start of the Next Semester</span><br
/> Buying a book for $50 and selling it for $40 is basically the same as renting the book for $10. <strong>Google is a better reference than most of your textbooks</strong> anyways, so why keep them around after you&#8217;re finished with them?<br
/> If you&#8217;re going to sell a textbook, the best time is when they&#8217;re in highest demand &#8211; at the beginning of the next semester. Based on the number of users, the best places to sell are probably <a
href="http://www.amazon.com">amazon</a> and <a
href="http://www.half.com">half.com</a>.</p><p>That&#8217;s it &#8211; with all the cash you&#8217;ll be saving, you can finally afford that solid gold replica of Billy Joel you&#8217;ve been eyeing on ebay for the past week. You better start bidding before the auction ends.<br
/> Next week I&#8217;ll show you how to double the length of an essay without writing a word.</p><hr
/><span
class="similar-posts-title"><strong>Additional Reading:</strong></span><ul
class="similar-posts"><li><a
href="http://www.blueraja.com/blog/179/does-electricity-flow-from-positive-to-negative-or-from-negative-to-positive" rel="bookmark" title="July 27, 2009">Does electricity flow from positive (+) to negative (-) or from negative to positive?</a></li><li><a
href="http://www.blueraja.com/blog/285/branchless-conditionals-compiler-optimization-technique" rel="bookmark" title="May 10, 2011">Branchless Conditionals (Compiler Optimization Technique)</a></li><li><a
href="http://www.blueraja.com/blog/146/no-news-is-good-news" rel="bookmark" title="July 25, 2008">No News is Good News</a></li><li><a
href="http://www.blueraja.com/blog/148/polka-burgers-and-sound-financial-advice" rel="bookmark" title="August 13, 2008">Polka, Burgers, and Sound Financial Advice</a></li><li><a
href="http://www.blueraja.com/blog/152/an-interesting-random-number-problem" rel="bookmark" title="November 12, 2008">An Interesting Random Number Problem</a></li></ul><p></p> ]]></content:encoded> <wfw:commentRss>http://www.blueraja.com/blog/158/how-to-save-thousands-on-textbooks/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>The Greatest Romance Stories of All Time</title><link>http://www.blueraja.com/blog/156/the-greatest-romance-stories-of-all-time</link> <comments>http://www.blueraja.com/blog/156/the-greatest-romance-stories-of-all-time#comments</comments> <pubDate>Sun, 14 Dec 2008 06:02:27 +0000</pubDate> <dc:creator>BlueRaja</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://www.blueraja.com/blog2/?p=156</guid> <description><![CDATA[Or, why I&#8217;ll never understand women. Gone with the Wind Woman doesn&#8217;t love her husband for a long time, then finally falls in love with him. He says &#8220;I don&#8217;t give a damn&#8221; and leaves her. Casablanca Two former lovers meet up, then part ways and never see each other again. Titanic Jack freezes to [...]]]></description> <content:encoded><![CDATA[<p><em>Or, why I&#8217;ll never understand women.</em></p><table
width="550px" border="1"><tr><th>Gone with the Wind</th><td>Woman doesn&#8217;t love her husband for a long time, then finally falls in love with him.  He says &#8220;I don&#8217;t give a damn&#8221; and leaves her.</td></tr><tr><th>Casablanca</th><td>Two former lovers meet up, then part ways and never see each other again.</td></tr><tr><th>Titanic</th><td>Jack freezes to death.</td></tr><tr><th>Romeo and Juliet</th><td>They both die.</td></tr><tr><th>The Notebook</th><td>She forgets who he is, and they both die.</td></tr></table><hr
/><span
class="similar-posts-title"><strong>Additional Reading:</strong></span><ul
class="similar-posts"><li><a
href="http://www.blueraja.com/blog/164/how-to-give-someone-elf-ears-and-vampire-fangs-in-photoshop" rel="bookmark" title="June 21, 2009">How to Give Someone Elf Ears and Vampire Fangs in Photoshop</a></li><li><a
href="http://www.blueraja.com/blog/148/polka-burgers-and-sound-financial-advice" rel="bookmark" title="August 13, 2008">Polka, Burgers, and Sound Financial Advice</a></li><li><a
href="http://www.blueraja.com/blog/158/how-to-save-thousands-on-textbooks" rel="bookmark" title="January 23, 2009">How to Save Thousands on Textbooks</a></li><li><a
href="http://www.blueraja.com/blog/168/123-112" rel="bookmark" title="August 13, 2009">1+2+3+&#8230; = -1/12</a></li><li><a
href="http://www.blueraja.com/blog/185/how-fast-do-electrons-move-in-a-circuit" rel="bookmark" title="July 27, 2009">How fast do electrons move in a circuit?</a></li></ul><p></p> ]]></content:encoded> <wfw:commentRss>http://www.blueraja.com/blog/156/the-greatest-romance-stories-of-all-time/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Guitar Tabs for Android Kikaider: The Animation</title><link>http://www.blueraja.com/blog/154/guitar-tabs-for-android-kikaider-the-animation</link> <comments>http://www.blueraja.com/blog/154/guitar-tabs-for-android-kikaider-the-animation#comments</comments> <pubDate>Tue, 18 Nov 2008 05:58:46 +0000</pubDate> <dc:creator>BlueRaja</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://www.blueraja.com/blog2/?p=154</guid> <description><![CDATA[I couldn&#8217;t seem to find any decent tabs for the songs Jiro plays in Android Kikaider: The Animation (an anime that used to play on Adult Swim a few years ago), so I made up my own. Disclaimer: The following is my own interpretation, not to be sold, don&#8217;t sue me etc. Jiro&#8217;s Theme &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-5&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- [...]]]></description> <content:encoded><![CDATA[<p>I couldn&#8217;t seem to find any decent tabs for the songs Jiro plays in <em>Android Kikaider:  The Animation</em> (an anime that used to play on Adult Swim a few years ago), so I made up my own.<br
/> <span
class="footnote">Disclaimer:  The following is my own interpretation, not to be sold, don&#8217;t sue me etc.</span></p><p><span
class="heading">Jiro&#8217;s Theme</span></p><p> <span
class="tabs">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-5&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br
/> &#8212;&#8212;&#8212;6&#8212;&#8211;5&#8212;&#8211;6&#8212;&#8212;-6&#8212;&#8212;&#8212;&#8211;6&#8212;&#8211;5&#8212;&#8211;6&#8212;&#8212;&#8212;&#8212;<br
/> &#8212;&#8212;&#8212;7&#8212;&#8211;7&#8212;&#8211;7&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-7&#8212;&#8211;7&#8212;&#8211;7&#8212;&#8212;&#8212;&#8212;<br
/> &#8212;&#8211;7&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-7&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br
/> -5&#8212;&#8212;&#8212;&#8211;5&#8212;&#8211;5&#8212;&#8212;&#8212;&#8212;-5&#8212;&#8212;&#8212;&#8211;5&#8212;&#8211;5&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p><p><span
class="heading">Theme of Gemini</span></p><p
class="tabs">&#8212;&#8211;11&#8212;10&#8212;&#8211;11&#8212;&#8212;&#8212;&#8212;-11&#8212;10&#8212;&#8211;8&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> -8&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;8&#8212;&#8212;-8&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;11&#8212;&#8211;9&#8212;&#8212;&#8212;&#8212;&#8211;8&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;8&#8212;10&#8212;&#8212;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p><p
class="tabs">&#8212;&#8211;11&#8212;10&#8212;&#8211;11&#8212;&#8212;&#8212;&#8212;-11&#8212;10&#8212;&#8211;8&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-8&#8212;&#8212;<br
/> -8&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;8&#8212;&#8212;-8&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;11&#8212;&#8211;9&#8212;&#8211;11&#8212;&#8212;-8&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p><p
class="tabs">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> -8&#8212;8h9&#8212;8&#8212;&#8212;&#8212;&#8212;&#8211;11&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;11&#8212;&#8212;&#8212;-8h9&#8212;&#8212;-<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;10&#8212;8&#8212;&#8212;&#8211;10&#8212;&#8212;-10&#8212;8&#8212;&#8212;&#8211;10&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p><p
class="tabs">&#8212;&#8212;&#8212;&#8212;&#8212;-8&#8212;&#8212;-8&#8212;8/9&#8212;9&#8212;&#8212;&#8212;&#8212;&#8212;-8/9&#8212;9&#8212;&#8212;&#8212;&#8212;-<br
/> -8&#8212;9&#8212;9h11&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;9&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-9&#8212;&#8212;-<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;10&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;10&#8212;-<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p><p
class="tabs">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;9&#8212;9/11&#8212;&#8212;-11&#8212;11h13&#8212;&#8211;11-10&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br
/> -11&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p><p
class="tabs">&#8212;&#8211;11&#8212;10&#8212;&#8211;11&#8212;&#8212;&#8212;&#8212;-11&#8212;10&#8212;&#8211;8&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> -8&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;8&#8212;&#8212;-8&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;11&#8212;&#8211;9&#8212;&#8212;&#8212;&#8212;&#8211;8&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;8&#8212;10&#8212;&#8212;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p><p
class="tabs">&#8212;&#8211;11&#8212;10&#8212;&#8211;11&#8212;&#8212;&#8212;&#8212;-10h11&#8212;10&#8212;&#8211;8&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-8&#8212;&#8211;<br
/> -8&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;8&#8212;&#8212;-8&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;11&#8212;&#8211;9&#8212;&#8211;11&#8212;&#8212;-8-<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p><p
class="tabs">&#8212;&#8211;11&#8212;10&#8212;&#8211;11&#8212;&#8212;&#8212;&#8212;-10h11&#8212;10/11&#8212;<br
/> -8&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;8&#8212;&#8212;-9&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p><p
class="tabs">&#8211;8-9&#8212;&#8211;9&#8212;9/11&#8212;11/13-<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br
/> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p><hr
/><span
class="similar-posts-title"><strong>Additional Reading:</strong></span><ul
class="similar-posts"><li><a
href="http://www.blueraja.com/blog/158/how-to-save-thousands-on-textbooks" rel="bookmark" title="January 23, 2009">How to Save Thousands on Textbooks</a></li><li><a
href="http://www.blueraja.com/blog/168/123-112" rel="bookmark" title="August 13, 2009">1+2+3+&#8230; = -1/12</a></li><li><a
href="http://www.blueraja.com/blog/156/the-greatest-romance-stories-of-all-time" rel="bookmark" title="December 14, 2008">The Greatest Romance Stories of All Time</a></li><li><a
href="http://www.blueraja.com/blog/140/rsa-encryption-part-3" rel="bookmark" title="July 16, 2008">RSA Encryption, Part 3</a></li><li><a
href="http://www.blueraja.com/blog/190/how-is-it-possible-that-theres-not-a-complete-circuit-to-the-power-plant" rel="bookmark" title="July 27, 2009">How is it possible that there&#8217;s not a complete circuit to the power plant?</a></li></ul><p></p> ]]></content:encoded> <wfw:commentRss>http://www.blueraja.com/blog/154/guitar-tabs-for-android-kikaider-the-animation/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>An Interesting Random Number Problem</title><link>http://www.blueraja.com/blog/152/an-interesting-random-number-problem</link> <comments>http://www.blueraja.com/blog/152/an-interesting-random-number-problem#comments</comments> <pubDate>Wed, 12 Nov 2008 05:58:11 +0000</pubDate> <dc:creator>BlueRaja</dc:creator> <category><![CDATA[Uncategorized]]></category><guid
isPermaLink="false">http://www.blueraja.com/blog2/?p=152</guid> <description><![CDATA[In Systems Security class, the professor presented us with an interesting homework problem involving random numbers which I thought some of you might enjoy. To begin with, a perfect random number generator is a mythical device which spits out bits of either 0 or 1 completely randomly, with a 50% chance of spitting out either [...]]]></description> <content:encoded><![CDATA[<p>In Systems Security class, the professor presented us with an interesting homework problem involving random numbers which I thought some of you might enjoy.</p><p>To begin with, a <em>perfect random number generator</em> is a mythical device which spits out bits of either 0 or 1 completely randomly, with a 50% chance of spitting out either a 0 or a 1 at any time regardless of what bits it&#8217;s output in the past. Of course, such a generator is impossible to create in deterministic machines (computers), so programmers use <a
href="http://en.wikipedia.org/wiki/Pseudo-random_number_generator">pseudo-random number generators</a> instead.</p><p>Now, the problem: Assume you have a biased-random number generator &#8211; that is, you have a magical random number generator which is completely non-deterministic, but the probability of outputting one bit-state is higher than the other. For example, it could output a &quot;1&quot; with 60% probability and a &quot;0&quot; with 40% probability, or perhaps output a &quot;1&quot; with 0.01% probability and a &quot;0&quot; with 99.99% probability. The only thing known about the probability of outputting a 0/1 is that it&#8217;s fixed and greater than 0%.<br
/> <em>Given only a computer which can read bits from this biased-random number generator, can you create a perfect random number generator? (and if so, how?)</em></p><hr
/><span
class="similar-posts-title"><strong>Additional Reading:</strong></span><ul
class="similar-posts"><li><a
href="http://www.blueraja.com/blog/135/rsa-encryption-part-1" rel="bookmark" title="June 25, 2008">RSA Encryption, Part 1</a></li><li><a
href="http://www.blueraja.com/blog/187/why-can-the-resistor-go-at-the-beginning-of-the-circuit-or-at-the-end" rel="bookmark" title="July 27, 2009">Why can the resistor go at the beginning of the circuit OR at the end?</a></li><li><a
href="http://www.blueraja.com/blog/140/rsa-encryption-part-3" rel="bookmark" title="July 16, 2008">RSA Encryption, Part 3</a></li><li><a
href="http://www.blueraja.com/blog/285/branchless-conditionals-compiler-optimization-technique" rel="bookmark" title="May 10, 2011">Branchless Conditionals (Compiler Optimization Technique)</a></li><li><a
href="http://www.blueraja.com/blog/150/java-biginteger-benchmark" rel="bookmark" title="November 6, 2008">Java BigInteger Benchmarks</a></li></ul><p></p> ]]></content:encoded> <wfw:commentRss>http://www.blueraja.com/blog/152/an-interesting-random-number-problem/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 88/156 queries in 0.949 seconds using disk: basic
Object Caching 1397/1483 objects using disk: basic

Served from: www.blueraja.com @ 2012-02-22 20:29:13 -->
