<?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/"
	>

<channel>
	<title>Codexon</title>
	<atom:link href="http://codexon.skial.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codexon.skial.com</link>
	<description>Hello World</description>
	<pubDate>Wed, 03 Sep 2008 08:28:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Useful Windows Apps</title>
		<link>http://codexon.skial.com/posts/useful-windows-apps/</link>
		<comments>http://codexon.skial.com/posts/useful-windows-apps/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 03:08:49 +0000</pubDate>
		<dc:creator>Lorph</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codexon.skial.com/?p=117</guid>
		<description><![CDATA[Here are some useful windows apps that almost no one knows about, but are just as useful as the most popular ones.
1. Battle Encoder Shirase
http://mion.faireal.net/BES/
BES lets you limit how much cpu a process can use.
BES is different from using the &#8220;Set priority&#8221; option in task manager, because you can stop a process from using 100% [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some useful windows apps that almost no one knows about, but are just as useful as the most popular ones.</p>
<p><strong>1. Battle Encoder Shirase</strong></p>
<p><a href="http://mion.faireal.net/BES/">http://mion.faireal.net/BES/</a></p>
<p>BES lets you limit how much cpu a process can use.</p>
<p>BES is different from using the &#8220;Set priority&#8221; option in task manager, because you can stop a process from using 100% cpu. This is great for limiting programs that use all your cpu when it doesn&#8217;t need to. The only downside is that if the program has sound, you will get breakup because of how it works.</p>
<p><strong>2. FTP Drive</strong></p>
<p><a href="http://www.killprog.com/fdrve.html">http://www.killprog.com/fdrve.html</a></p>
<p>Use your ftp account like a regular hard drive. No more drag and drop through ftp programs. In my opinion, it could not be simpler compared to samba, nfs, and webdav, which I had problems with windows/linux compatibility.</p>
<p><strong>3. Uniform Server</strong></p>
<p><a href="http://www.uniformserver.com/">http://www.uniformserver.com/</a></p>
<p>Its the fastest way to get an industry grade webserver running on windows. All you really need to do is install and run. It also comes with php and mysql.</p>
]]></content:encoded>
			<wfw:commentRss>http://codexon.skial.com/posts/useful-windows-apps/feed/</wfw:commentRss>
		</item>
		<item>
		<title>When Does Infinity Equal -2?</title>
		<link>http://codexon.skial.com/posts/when-does-infinity-equal-2/</link>
		<comments>http://codexon.skial.com/posts/when-does-infinity-equal-2/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 21:45:05 +0000</pubDate>
		<dc:creator>Lorph</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codexon.skial.com/?p=87</guid>
		<description><![CDATA[Remember in school, when your math friend showed you how 1 = 2?
Now you can amuse them too, except it doesn&#8217;t involve any math errors like dividing by 0, or the old

If you are a math major point your condescending look elsewhere.
Let&#8217;s Start

S looks like it should be infinite right?

Multiply both sides by 2.

Subtract the [...]]]></description>
			<content:encoded><![CDATA[<p>Remember in school, when your math friend showed you how 1 = 2?<br />
Now you can amuse them too, except it doesn&#8217;t involve any math errors like dividing by 0, or the old<br />
<img src="http://codexon.skial.com/wp-content/cache/tex_63fe2ffd6a3bc28d0bb9371265b25bf7.png" align="absmiddle" class="tex" alt=" 0.99\overline{9} = 1 " /></p>
<p>If you are a math major point your condescending look elsewhere.</p>
<p><strong>Let&#8217;s Start</strong></p>
<p><img src="http://codexon.skial.com/wp-content/cache/tex_f2eeda557852cb55af73d8935260c815.png" align="absmiddle" class="tex" alt="S   = 2^1 + 2^2 + 2^3 + ... + 2^\infty" /><br />
S looks like it should be infinite right?</p>
<p><img src="http://codexon.skial.com/wp-content/cache/tex_5b7d83feb3697b3e3ec0ceb1bf7ff572.png" align="absmiddle" class="tex" alt="2*S= 2^2 + 2^3 + ... + 2^\infty" /><br />
Multiply both sides by 2.</p>
<p><img src="http://codexon.skial.com/wp-content/cache/tex_4342082630a2b8b3fc63a2c10e092d58.png" align="absmiddle" class="tex" alt="2S-S = -2^1" /><br />
Subtract the two equations.</p>
<p><img src="http://codexon.skial.com/wp-content/cache/tex_20efe484db9b3983347767bef3948bf6.png" align="absmiddle" class="tex" alt="S = -2 " /><br />
???</p>
<p>The math experts told me in an unexcited manner: the explanation is here <a href="http://en.wikipedia.org/wiki/P-adic_number">http://en.wikipedia.org/wiki/P-adic_number.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codexon.skial.com/posts/when-does-infinity-equal-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Chinese Olympics 2008 Scandal</title>
		<link>http://codexon.skial.com/posts/chinese-olympics-2008-scandal/</link>
		<comments>http://codexon.skial.com/posts/chinese-olympics-2008-scandal/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 18:17:00 +0000</pubDate>
		<dc:creator>Lorph</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[cheat]]></category>

		<category><![CDATA[China]]></category>

		<category><![CDATA[fake]]></category>

		<category><![CDATA[fraud]]></category>

		<category><![CDATA[olympic]]></category>

		<guid isPermaLink="false">http://codexon.skial.com/?p=106</guid>
		<description><![CDATA[Stryde Hax finds deleted official government documents pointing to fraudulent age revision by the Chinese. These documents are from the &#8220;General Administration of Sport of China&#8221; in 2006.
The Age Controversy
In the Olympic woman&#8217;s gymnastic competition, the participants must be 16 or older. However, some of the Chinese team members clearly look underage.
According to current Chinese [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://strydehax.blogspot.com/">Stryde Hax</a> finds deleted official government documents pointing to fraudulent age revision by the Chinese. These documents are from the &#8220;<a href="http://www.sport.gov.cn">General Administration of Sport of China</a>&#8221; in 2006.</p>
<p><strong>The Age Controversy</strong></p>
<p>In the Olympic woman&#8217;s gymnastic competition, the participants must be 16 or older. However, some of the Chinese team members clearly look underage.</p>
<div id="attachment_96" class="wp-caption aligncenter" style="width: 151px"><img class="size-medium wp-image-96" title="235312" src="http://codexon.skial.com/wp-content/uploads/2008/08/235312.jpg" alt="" width="141" height="189" /><p class="wp-caption-text">He Kexin 何可欣  Winner of 2008 gold medal for Uneven Bars</p></div>
<p>According to <a href="http://results.beijing2008.cn/WRM/ENG/BIO/Athlete/2/235312.shtml">current Chinese records</a> on the Olympics websites, her date of birth is 1/1/1992. Many people claim that she is 14 due to provincial news sources that have been censored by the Chinese government.</p>
<p><strong>Google Censorship?</strong></p>
<p>Stryde Hax first searches Google for &#8220;site:cn 何可欣 filetype:xls 1994&#8243;. He gets one result (http://www.sport.gov.cn/files/jts/reg2006/zctc.xls) and finds out that the file has been deleted. But then he uses the Google &#8220;View as HTML&#8221; option. It works, but strangely He Kexin has disappeared from the list even though her name was on the search engine summary.</p>
<p>As of posting this, Google has completely removed the entry from its search engine. I laugh inside when I think of their &#8220;Do no evil&#8221; motto that has won them acclaim.</p>
<p><strong>Searching in the Chinese Google Clone &#8220;Baidu&#8221;</strong></p>
<p>His next search uses the Chinese search engine which for some reason looks exactly like Google, but in Chinese. Using the same keywords, he finds the damning evidence on the</p>
<p>618,&#8221;<a name="baidusnap0"></a><strong style="color: black; background-color: #ffff66;">何可欣</strong>&#8220;,&#8221;女&#8221;,&#8221;<strong style="color: black; background-color: #99ff99;">1994</strong>.1.1&#8243;,&#8221;湖北&#8221;<br />
The 2nd column is the name &#8220;He Kexin&#8221;. The 3rd column &#8220;Female&#8221;. The 4th column indicates that she truly is 14 years old. The 5th is the province &#8220;Hubei&#8221;.</p>
<p>Here are the links to the documents in the Baidu cache, though I suspect they will be deleted as soon as China wakes up. <a href="http://cache.baidu.com/c?m=9f65cb4a8c8507ed4fece763105392230e54f7227e8a905368d4e41dce204c413037bfa673794e5392d8242140b20a17a2a17d247c1e68e6dd999f4aaaf1cc693bcd7a742613913161c468d8dc4755d650e44d98a40e91b8e74391b9d2a2dc5f58cc&amp;p=882a97128c805ffc57ecd3214f&amp;user=baidu">Link 1</a> <a href="http://cache.baidu.com/c?m=9d78d513d9d431dc4f9ce3690c66c0166d43f1682ba1d2020ed68448e267504a4172a4fb792d4a4295876b6672b25419afb52172404262eadb8e9f4aaaeecf6c388850652c01d21a4c8458b2930064dc60c70fe9ad1be3a7b863d5ffc5d3a81e0d8b&amp;p=8b2a941786cc43f113fecb3146&amp;user=baidu">Link 2</a></p>
<p>In case they do get deleted, I&#8217;ve <a href="http://codexon.skial.com/wp-content/uploads/2008/08/c.htm">saved the html</a>. And here is a screenshot:</p>
<div id="attachment_100" class="wp-caption aligncenter" style="width: 310px"><a href="http://codexon.skial.com/wp-content/uploads/2008/08/hekexin14.jpg"><img class="size-medium wp-image-100" title="hekexin14" src="http://codexon.skial.com/wp-content/uploads/2008/08/hekexin14.jpg" alt="Baidu Cache of Chinese Government Documents showing Kexin to be 14." width="300" height="186" /></a><p class="wp-caption-text">Baidu Cache of Chinese Government Documents showing Kexin to be 14.</p></div>
<p><strong>That&#8217;s not all.</strong></p>
<p>If think, oh its just one person, think again.</p>
<div id="attachment_111" class="wp-caption aligncenter" style="width: 310px"><a href="http://codexon.skial.com/wp-content/uploads/2008/08/img2140977421.jpg"><img class="size-medium wp-image-111" title="img2140977421" src="http://codexon.skial.com/wp-content/uploads/2008/08/img2140977421.jpg" alt="Yang Yilin 楊伊琳 (center)" width="300" height="243" /></a><p class="wp-caption-text">Yang Yilin 楊伊琳 (center)</p></div>
<p>Helping her team win gold with their tiny, and less prone to fall hard body, Yang Yilin is 1 year too young.<br />
Here is the <a href="http://cache.baidu.com/c?m=9d78d513d9d437ac4f9ae3690c66c0101943f1602ba6d30209d38448e267504a4672a4fb792d4a4295876b6672b25419afb52172404262eadb8e9f4aaaeecf6c388850652c01d21a4c8458b2930064dc60c70fe9ad1be1a7b669c2fd8fc4df23199412&amp;p=90769a44979b57fa02bd9b7c4b&amp;user=baidu">Baidu cache</a> of her age. And a <a href="http://students.cs.byu.edu/~dpru/yang_yilin1.png">screenshot</a>.</p>
<p>Lastly competitor Jian Yuyuan, is supposedly underage as well. New York Times and other major news outlets found this in official documents within China.</p>
<p>What is sad is that there is no official investigation into this matter. The IOC has said that the passports issued by the Chinese government is proof enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://codexon.skial.com/posts/chinese-olympics-2008-scandal/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Morton Codes</title>
		<link>http://codexon.skial.com/posts/morton-codes/</link>
		<comments>http://codexon.skial.com/posts/morton-codes/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 01:14:21 +0000</pubDate>
		<dc:creator>Lorph</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[curve]]></category>

		<category><![CDATA[geometry]]></category>

		<category><![CDATA[Morton]]></category>

		<category><![CDATA[spatial]]></category>

		<guid isPermaLink="false">http://codexon.skial.com/?p=74</guid>
		<description><![CDATA[Morton codes (or Z-order curves) are a way to hash coordinates in 1 dimension. This is useful for problems such as &#8220;which stores are 10 miles away from me?&#8221; without searching through all the stores in existence.
Why Not Use A 2d Array?
You might ask, why not just store the information in a 2d array in [...]]]></description>
			<content:encoded><![CDATA[<p>Morton codes (or Z-order curves) are a way to hash coordinates in 1 dimension. This is useful for problems such as &#8220;which stores are 10 miles away from me?&#8221; without searching through all the stores in existence.</p>
<p><strong>Why Not Use A 2d Array?</strong></p>
<p>You might ask, why not just store the information in a 2d array in C or Java? The problem is caching.</p>
<pre>      y=0              y=1         y=2            y=3           ....    y=99
[1,2,3,4...99] [1,2,3,4...99] [1,2,3,4...99]  [1,2,3,4...99]    ....</pre>
<p><em>How a 99&#215;99 2d array could be stored in memory.</em></p>
<p>Lets say you try to find some stuff closest to x=5, y=1. The cpu then loads the nearby arrays y=0, y=1 and y=2 for speedy access, because that is how modern cpus work. The problem is when you search for a &#8220;close&#8221; coordinate such as x=5 y=20, its too far away from x=5 y=1.</p>
<p>To you , it looks like its only 19 units away, but in the computer its 19 x 99 units away because each y-array between y=1 and y=20 has 99 slots.</p>
<p><strong>Generating Morton Codes</strong></p>
<p>Generating a Morton number is easy. All you do is convert the x and y coordinate numbers into binary. Then &#8220;interleave&#8221; the bits to get the Morton number. It does not matter which goes first, but you must be consistent.</p>
<p>Example</p>
<p>-0-0-1 : 1 in binary<br />
1-0-1- : 5 in binary<br />
xyxyxy</p>
<p>100011 : 35 Your interleaved Morton number</p>
<p>My interleave function for python:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">def</span> interleave<span style="color: black;">&#40;</span>x, y<span style="color: black;">&#41;</span>:
    result = <span style="color: #ff4500;">0</span>
    position = <span style="color: #ff4500;">0</span>
    bit = <span style="color: #ff4500;">1</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">while</span> bit <span style="color: #66cc66;">&lt;</span>= x <span style="color: #ff7700;font-weight:bold;">or</span> bit <span style="color: #66cc66;">&lt;</span>= y:
&nbsp;
        <span style="color: #ff7700;font-weight:bold;">if</span> bit <span style="color: #66cc66;">&amp;</span> x:
            result |= <span style="color: #ff4500;">1</span> <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span><span style="color: #66cc66;">*</span>position<span style="color: #ff4500;">+1</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> bit <span style="color: #66cc66;">&amp;</span> y:
            result |= <span style="color: #ff4500;">1</span> <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span><span style="color: #66cc66;">*</span>position<span style="color: black;">&#41;</span>
&nbsp;
        position += <span style="color: #ff4500;">1</span>
        bit = <span style="color: #ff4500;">1</span> <span style="color: #66cc66;">&lt;&lt;</span> position
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">return</span> result</pre></td></tr></table></div>

<p><strong>Using Morton Codes</strong></p>
<pre>6 |20  22  28  30  52  54  60
5 |17  19  25  27  49  51  57
4 |16  18  24  26  48  50  56
3 |5   7   13  15  37  39  45
2 |4   6   12  14  36  38  44
1 |1   3   9   11  33  35  41
0 |0   2   8   10  32  34  40
   --------------------------
   0   1   2   3   4   5   6

A table of Morton codes on a 2d graph. The x coordinate is interleaved in front of the Y coordinate.</pre>
<p>Now lets say you would like to find all the objects 1 unit away from x=1 y=1. Find the upper bound number by finding the Morton number at x=2 y=2 (12). Then do the same for the lower bound at x=0 y=0 (0). So now you will need to search for any objects from 0 to 12.</p>
<p>This limits the search space. But it is not perfect, so you will have to verify each one manually.</p>
<p>As you can see, the numbers 5, 7, 10, 11 are out of bounds, but are between 0 to 12.</p>
<pre><img class="alignnone size-medium wp-image-77" title="zcurve" src="http://codexon.skial.com/wp-content/uploads/2008/08/zcurve.png" alt="" width="210" height="146" /></pre>
<p>Our 2d Cartesian graph, with the Morton order (Z-curve) in red from lowest to highest. As you can see here, as the Morton number grows, the space covered expands in a zig zag fashion, from the bottom left to right.</p>
<p>You can use Morton codes in higher dimensions as well. For example in 3d, you might interlace coordinates as xyzxyzxyz. Hilbert codes supposedly have better locality, but is harder to compute.</p>
]]></content:encoded>
			<wfw:commentRss>http://codexon.skial.com/posts/morton-codes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Javascript Tricks</title>
		<link>http://codexon.skial.com/posts/javascript-tricks/</link>
		<comments>http://codexon.skial.com/posts/javascript-tricks/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 19:50:27 +0000</pubDate>
		<dc:creator>Lorph</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[snippets]]></category>

		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://codexon.skial.com/?p=66</guid>
		<description><![CDATA[Javascript enjoys its presence on the internet due to its age and wide support.
Here are some snippets that you may find useful.

javascript:document.body.contentEditable='true'; document.designMode='on'; void 0

Paste this over the url of a webpage, and you will be able to edit the text like notepad. The source code will be updated when you save it as a [...]]]></description>
			<content:encoded><![CDATA[<p>Javascript enjoys its presence on the internet due to its age and wide support.</p>
<p>Here are some snippets that you may find useful.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript">javascript<span style="color: #339933;">:</span>document.<span style="color: #006600;">body</span>.<span style="color: #006600;">contentEditable</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'true'</span><span style="color: #339933;">;</span> document.<span style="color: #006600;">designMode</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'on'</span><span style="color: #339933;">;</span> <span style="color: #000066; font-weight: bold;">void</span> <span style="color: #CC0000;">0</span></pre></div></div>

<p>Paste this over the url of a webpage, and you will be able to edit the text like notepad. The source code will be updated when you save it as a file. Tested in IE7 and Firefox 3.</p>
<p><br/><br/><br/></p>

<div class="wp_syntax"><div class="code"><pre class="javascript">javascript<span style="color: #339933;">:</span>document.<span style="color: #006600;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;embed&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #006600;">SetVariable</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;moviename.somevariablename&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">12345</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>This snippet will allow you to change the variable inside a flash movie. To find out what the movie or variable names are, you will need the source code, or use a flash decompiler.</p>
<p>Note that if the flash file isn&#8217;t in the &#8220;embed&#8221; tag, then you will need to find the appropriate tag name.</p>
<p>The [0], indicates that it is the first embed tag on the page. If you are trying to locate the 5th embed tag, then you would replace [0] with [4].</p>
]]></content:encoded>
			<wfw:commentRss>http://codexon.skial.com/posts/javascript-tricks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Recaptchas - Internet Torture</title>
		<link>http://codexon.skial.com/posts/recaptchas-internet-torture/</link>
		<comments>http://codexon.skial.com/posts/recaptchas-internet-torture/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 19:22:06 +0000</pubDate>
		<dc:creator>Lorph</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[captcha]]></category>

		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://codexon.skial.com/?p=50</guid>
		<description><![CDATA[Computers were supposed to make our life easier.
With the deluge of spammers these days, more and more websites are using Captchas.
Unforunately, because of fear that spammers have already conquered those, people are now using Recaptchas.
The problem was that spammers were using people to solve them. So even if there is a switch to Recaptcha, the [...]]]></description>
			<content:encoded><![CDATA[<p>Computers were supposed to make our life easier.</p>
<p>With the deluge of spammers these days, more and more websites are using Captchas.<br />
Unforunately, because of fear that spammers have already conquered those, people are now using Recaptchas.</p>
<p>The problem was that spammers were using people to solve them. So even if there is a switch to Recaptcha, the spammers still succeed.</p>
<p><img class="alignnone size-medium wp-image-51" title="recaptcha" src="http://codexon.skial.com/wp-content/uploads/2008/08/recaptcha.jpg" alt="" width="300" height="57" /></p>
<p>This is a recaptcha I personally encountered. These unreadable blobs are a common occurrence.</p>
<p>It sometimes infuriates me when I fail these a couple times in a row. In addition to making your internet experience even harder, you are being exploited by Carnegie Mellon University. They are using your labor to scan books that their computers can&#8217;t read.</p>
<p>Fortunately, you can just type in a single word, and leave the other one blank. However, you can&#8217;t tell if its the first or second word. But a 50/50 chance is good enough for me.</p>
<p>For fun, here is a list of 10 horrible captchas:</p>
<p><a href="http://www.johnmwillis.com/other/top-10-worst-captchas/">http://www.johnmwillis.com/other/top-10-worst-captchas/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codexon.skial.com/posts/recaptchas-internet-torture/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Beijing Olympics - Fakes</title>
		<link>http://codexon.skial.com/posts/beijing-olympics-fakes/</link>
		<comments>http://codexon.skial.com/posts/beijing-olympics-fakes/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 07:12:57 +0000</pubDate>
		<dc:creator>Lorph</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[cgi]]></category>

		<category><![CDATA[fake]]></category>

		<category><![CDATA[internet]]></category>

		<guid isPermaLink="false">http://codexon.skial.com/?p=35</guid>
		<description><![CDATA[It has become widespread news that the Beijing Olympics opening fireworks were faked.





The real and fake fireworks shown side by side.

Inspired by Ashley Simpson, Lin Miaoke lipped synced the opening ceremony.
The real singer, Yang Peiyi, is on the right.
According to an interview with the General Music Designer, this was done because they decided the real [...]]]></description>
			<content:encoded><![CDATA[<p>It has become widespread news that the Beijing Olympics opening fireworks were faked.</p>
<p><img class="alignleft size-medium wp-image-37" title="150750951" src="http://codexon.skial.com/wp-content/uploads/2008/08/150750951.jpg" alt="" width="236" height="130" /></p>
<p><img class="alignleft" style="margin-left: 4px; margin-right: 4px;" src="http://f3.yahoofs.com/ymg/ept_sports_oly_experts__1/ept_sports_oly_experts-471791826-1218418035.jpg?ym0lS1_C1kb1PNbC" alt="" width="259" height="130" /></p>
<p><a href="http://codexon.skial.com/wp-content/uploads/2008/08/20080811073619f6094.jpg"><br />
</a><br />
<br/><br/><br/><br/><br/><br />
The real and fake fireworks shown side by side.</p>
<p><img class="alignnone size-medium wp-image-61" title="chineselipsynching1" src="http://codexon.skial.com/wp-content/uploads/2008/08/chineselipsynching1.jpg" alt="" width="300" height="188" /></p>
<p>Inspired by Ashley Simpson, Lin Miaoke lipped synced the opening ceremony.</p>
<p>The real singer, Yang Peiyi, is on the right.</p>
<p>According to an interview with the General Music Designer, this was done because they decided the real singer did not look as cute.</p>
<p>Who knows what else was faked. It would not be surprising if more of these revelations come up.</p>
<p>Source: <a href="http://www.telegraph.co.uk/sport/othersports/olympics/2545387/Beijing-Olympics-Faking-scandal-over-girl-who-sang-in-opening-ceremony.html">Telegraph</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codexon.skial.com/posts/beijing-olympics-fakes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Releaselog Mass Exodus</title>
		<link>http://codexon.skial.com/posts/releaselog-mass-exodus/</link>
		<comments>http://codexon.skial.com/posts/releaselog-mass-exodus/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 06:32:05 +0000</pubDate>
		<dc:creator>Lorph</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[scene]]></category>

		<category><![CDATA[torrent]]></category>

		<category><![CDATA[underground]]></category>

		<guid isPermaLink="false">http://codexon.skial.com/?p=25</guid>
		<description><![CDATA[If you have looked across the usual bit torrent sites such as mininova.com or piratebay.org, you may have noticed frequent spams about a site called rlslog.net.

This site was made about 2 years ago for the purpose of indexing new releases from the &#8220;scene&#8221;, which is where most of the original bootleg data comes from. From [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">If you have looked across the usual bit torrent sites such as mininova.com or piratebay.org, you may have noticed frequent spams about a site called rlslog.net.</p>
<p style="text-align: center;"><a href="http://codexon.skial.com/wp-content/uploads/2008/08/header_logo2.jpg"><img class="size-full wp-image-26 aligncenter" style="border: 0pt none;" title="header_logo2" src="http://codexon.skial.com/wp-content/uploads/2008/08/header_logo2.jpg" alt="" width="247" height="82" /></a></p>
<p style="text-align: left;">This site was made about 2 years ago for the purpose of indexing new releases from the <a href="http://en.wikipedia.org/wiki/The_Scene">&#8220;scene&#8221;</a>, which is where most of the original bootleg data comes from. From the scene, the data slowly trickles down to the masses.</p>
<p style="text-align: left;">Rlslog is quite popular, with as many as 1000 comments for a single popular article. However, the owner of the website, &#8220;Martin&#8221;, seems to have gotten far too greedy.</p>
<p style="text-align: left;">Every single picture except for the logo is hotlinked to another server, leeching bandwidth from them. The site, which was once pristine to begin with, is now plastered with 4+ ads on one page, with the occasional full screen ad. There are even links to some of the unscrupulous websites that pay people for unique downloads.</p>
<p style="text-align: left;">Just recently an article there was displayed saying that many of the staff were leaving. Their main issue seemed to be that the website was being ruined with ads, while the owner Martin was probably making alot of money off their work.</p>
<p style="text-align: left;">In conclusion, there is a new spinoff site called <a href="http://www.scnsrc.net">http://www.scnsrc.net</a> and <a href="http://www.scenereleases.info">http://www.scenereleases.info</a>.</p>
<p style="text-align: left;">Of course these aren&#8217;t the only ones around.</p>
<p style="text-align: left;"><a href="http://www.vcdquality.com/">http://www.vcdquality.com/</a> - Video Releases<br />
<a href="http://www.nfohump.com/">http://www.nfohump.com/</a> - Assorted Releases with only the original &#8220;nfo&#8221; information files.</p>
<p style="text-align: left;">Update: The admin of rlslog.net writes that this was in response to the demotion of irresponsible editors. In response to ad revenues, he claims that he spent hundreds giving presents to the editors. The truth may never be known, but its interesting that comments were disabled for his post.</p>
]]></content:encoded>
			<wfw:commentRss>http://codexon.skial.com/posts/releaselog-mass-exodus/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Better Python Reload</title>
		<link>http://codexon.skial.com/posts/a-better-python-reload/</link>
		<comments>http://codexon.skial.com/posts/a-better-python-reload/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 02:17:50 +0000</pubDate>
		<dc:creator>Lorph</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[reload]]></category>

		<guid isPermaLink="false">http://codexon.skial.com/?p=6</guid>
		<description><![CDATA[Have you ever wanted to rewrite your program while it was running? According to wikipedia, this feature is called live coding.
This is a big deal for applications such as internet servers and the telecom industry. Restarting the program every time you make a change is unnecessary downtime when you would like to have +99.9% uptime.
Some [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to rewrite your program while it was running? According to wikipedia, this feature is called live coding.</p>
<p>This is a big deal for applications such as internet servers and the telecom industry. Restarting the program every time you make a change is unnecessary downtime when you would like to have +99.9% uptime.</p>
<p>Some languages were made with this feature in mind, such as Erlang and ColdC. However for Python, it is not as easy.</p>
<p>Most people just look at the reload() function for Python and are satisfied with that. Unfortunately, the deeper you dig into it, the more deficiencies you will see.</p>
<p><strong>Example</strong></p>
<p>You make a module file.</p>

<div class="wp_syntax"><div class="code"><pre class="python"><span style="color: #808080; font-style: italic;"># mod.py</span>
<span style="color: #ff7700;font-weight:bold;">class</span> foo: value=<span style="color: #ff4500;">5</span></pre></div></div>

<p>In your prompt you type:<br />
<em>&gt;&gt;&gt; import mod<br />
&gt;&gt;&gt; a = mod.foo()<br />
&gt;&gt;&gt; a.value<br />
5</em></p>
<p>Then you edit the module file again.</p>

<div class="wp_syntax"><div class="code"><pre class="python"><span style="color: #808080; font-style: italic;"># mod.py</span>
<span style="color: #ff7700;font-weight:bold;">class</span> foo: value=<span style="color: #ff4500;">1</span></pre></div></div>

<p><em>&gt;&gt;&gt; reload(mod)<br />
&lt;module &#8216;mod&#8217; from &#8216;mod.pyc&#8217;&gt;<br />
&gt;&gt;&gt; a.value<br />
5</em></p>
<p>Its still 5! Why is it not 1?</p>
<p>It is because the variable &#8220;a&#8221; is still linked to the old module. The new module merely replaced the name &#8220;mod&#8221;. All calls to mod now point to the new code.</p>
<p>But the old code still exists, and will live as long as any variable uses it, such as the object at &#8216;a&#8217;.</p>
<p><em>&gt;&gt;&gt; b = mod.foo()<br />
&gt;&gt;&gt; b.value<br />
1</em></p>
<p>The class of b and a are different, even though they come from the same file.<br />
<em>&gt;&gt;&gt; a.__class__ is b.__class__<br />
False</em></p>
<p>So how do we go about solving this problem without using another language? We have two options.</p>
<p>1. Make a special class that records all it&#8217;s instances. Then when you reload, you tell all the instances to change their __bases__ variable to the new version.</p>
<p>2. Copy all the member variables from the new object to the old object. This seems to be the best choice.</p>
<p>Here is a replacement for the reload function. However, note that there is a strange piece of code that looks like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">class</span> <span style="color: #008000;">object</span><span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:<span style="color: #ff7700;font-weight:bold;">pass</span>
<span style="color: #dc143c;">__builtin__</span>.<span style="color: #008000;">object</span> = <span style="color: #008000;">object</span></pre></div></div>

<p>This piece of code replaces the default &#8220;object&#8221; class in order to bypass an unfixed 6 year old problem in the python interpreter. <a href="http://bugs.python.org/issue672115">http://bugs.python.org/issue672115</a></p>

<div class="wp_syntax"><div class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>, <span style="color: #dc143c;">types</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">__builtin__</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># override the regular object type</span>
<span style="color: #808080; font-style: italic;"># http://bugs.python.org/issue672115</span>
<span style="color: #ff7700;font-weight:bold;">class</span> <span style="color: #008000;">object</span><span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:<span style="color: #ff7700;font-weight:bold;">pass</span>
<span style="color: #dc143c;">__builtin__</span>.<span style="color: #008000;">object</span> = <span style="color: #008000;">object</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># save the old reload</span>
oldreload = <span style="color: #008000;">reload</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Here is a list of datatypes we want to update.</span>
<span style="color: #808080; font-style: italic;"># We want to update class definitions and functions</span>
types_to_update = <span style="color: black;">&#40;</span><span style="color: #008000;">type</span>, <span style="color: #dc143c;">types</span>.<span style="color: black;">FunctionType</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># the replacement function</span>
<span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #008000;">reload</span><span style="color: black;">&#40;</span>mod<span style="color: black;">&#41;</span>:
&nbsp;
    <span style="color: #808080; font-style: italic;"># record all the variables we want at the lowest level only.</span>
    oldstuff = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> key, obj <span style="color: #ff7700;font-weight:bold;">in</span> mod.<span style="color: #0000cd;">__dict__</span>.<span style="color: black;">iteritems</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">type</span><span style="color: black;">&#40;</span>obj<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">in</span> types_to_update:
            oldstuff.<span style="color: black;">append</span><span style="color: black;">&#40;</span> <span style="color: black;">&#40;</span>key,obj<span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;"># perform the regular reload</span>
    oldreload<span style="color: black;">&#40;</span>mod<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;"># if the old classes are in the new one, then update them, and copy them over.</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> key, obj <span style="color: #ff7700;font-weight:bold;">in</span> oldstuff:
        <span style="color: #ff7700;font-weight:bold;">if</span> key <span style="color: #ff7700;font-weight:bold;">in</span> mod.<span style="color: #0000cd;">__dict__</span>:
            update2<span style="color: black;">&#40;</span>obj, mod.<span style="color: #0000cd;">__dict__</span><span style="color: black;">&#91;</span>key<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
            mod.<span style="color: #0000cd;">__dict__</span><span style="color: black;">&#91;</span>key<span style="color: black;">&#93;</span> = obj
&nbsp;
<span style="color: #808080; font-style: italic;"># the object updating function.</span>
<span style="color: #808080; font-style: italic;"># all of the data from &quot;b&quot; gets ripped and placed into &quot;a&quot;</span>
<span style="color: #ff7700;font-weight:bold;">def</span> update2<span style="color: black;">&#40;</span>a,b<span style="color: black;">&#41;</span>:
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">for</span> varname <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">dir</span><span style="color: black;">&#40;</span>a<span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">try</span>: <span style="color: #008000;">delattr</span><span style="color: black;">&#40;</span>a, varname<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">except</span>: <span style="color: #ff7700;font-weight:bold;">pass</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">for</span> varname <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">dir</span><span style="color: black;">&#40;</span>b<span style="color: black;">&#41;</span>:
        newvalue = <span style="color: #008000;">getattr</span><span style="color: black;">&#40;</span>b, varname<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">try</span>: <span style="color: #008000;">setattr</span><span style="color: black;">&#40;</span>a, varname, newvalue<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">except</span>: <span style="color: #ff7700;font-weight:bold;">pass</span></pre></div></div>

<p><strong>Caveats:</strong></p>
<p>1. The entire program should be paused while the update takes place. Bugs could result if part of your program accesses old and new code in one go.</p>
<p>2. Some objects can never be updated in place because their member variables are uncopyable or unchangable. Forunately, regular classes and functions seem to work.</p>
<p>3. Only things defined at the lowest level of the module will be able to be updated reliably. This means you can&#8217;t update things defined inside methods and functions.</p>
<p>You can&#8217;t update &#8216;b&#8217; in a module like this. You can only update a.</p>

<div class="wp_syntax"><div class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">class</span> a:
    <span style="color: #ff7700;font-weight:bold;">def</span> make<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff7700;font-weight:bold;">class</span> b: <span style="color: #ff7700;font-weight:bold;">pass</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://codexon.skial.com/posts/a-better-python-reload/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hello World</title>
		<link>http://codexon.skial.com/posts/hello-world/</link>
		<comments>http://codexon.skial.com/posts/hello-world/#comments</comments>
		<pubDate>Wed, 02 Jan 2008 01:22:27 +0000</pubDate>
		<dc:creator>Lorph</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codexon.skial.com/?p=3</guid>
		<description><![CDATA[Hello Internet, this is the first post of Codexon.
]]></description>
			<content:encoded><![CDATA[<p>Hello Internet, this is the first post of Codexon.</p>
]]></content:encoded>
			<wfw:commentRss>http://codexon.skial.com/posts/hello-world/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
