<?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>This Title Intentionally Left Blank</title>
	<atom:link href="http://www.mathpirate.net/log/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mathpirate.net/log</link>
	<description>Powered by Awesome</description>
	<lastBuildDate>Fri, 30 Jul 2010 02:36:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>I think this can be optimized.</title>
		<link>http://www.mathpirate.net/log/2010/07/29/i-think-this-can-be-optimized/</link>
		<comments>http://www.mathpirate.net/log/2010/07/29/i-think-this-can-be-optimized/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 02:36:48 +0000</pubDate>
		<dc:creator>ThomasSchrantz</dc:creator>
				<category><![CDATA[Misc. Nonsense]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[FAIL]]></category>
		<category><![CDATA[Linked Data]]></category>
		<category><![CDATA[RDF]]></category>
		<category><![CDATA[SPARQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://www.mathpirate.net/log/?p=1361</guid>
		<description><![CDATA[I was playing around with some Linked Data SPARQL query engine stuff today and it generated the following query against its SQL data store.  Now, I&#8217;m not a database expert or anything, but something tells me that you can probably optimize this query somewhat.
SELECT id,  value FROM rdf_entities WHERE id IN (1159, 1159, 1159, 1159, [...]]]></description>
			<content:encoded><![CDATA[<p>I was playing around with some Linked Data SPARQL query engine stuff today and it generated the following query against its SQL data store.  Now, I&#8217;m not a database expert or anything, but something tells me that you can probably optimize this query somewhat.</p>
<p>SELECT id,  value FROM rdf_entities WHERE id IN (1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1169, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1206, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1208, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1435, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1439, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1442, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1444, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1446, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1452, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1475, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1477, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1492, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1632, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2552, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2554, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2596, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2615, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2623, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 2628, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878, 7878)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mathpirate.net/log/2010/07/29/i-think-this-can-be-optimized/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Electric Curiosities: Neo Geo AES Cartridge</title>
		<link>http://www.mathpirate.net/log/2010/06/20/electric-curiosities-neo-geo-aes-cartridge/</link>
		<comments>http://www.mathpirate.net/log/2010/06/20/electric-curiosities-neo-geo-aes-cartridge/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 20:34:21 +0000</pubDate>
		<dc:creator>ThomasSchrantz</dc:creator>
				<category><![CDATA[Electric Curiosities]]></category>
		<category><![CDATA[neo-geo]]></category>
		<category><![CDATA[nes]]></category>
		<category><![CDATA[nintendo]]></category>
		<category><![CDATA[super nintendo]]></category>
		<category><![CDATA[Video Games]]></category>

		<guid isPermaLink="false">http://www.mathpirate.net/log/?p=1355</guid>
		<description><![CDATA[This is a Neo-Geo AES cartridge:

What this picture fails to show is the scale of this cartridge.  Just looking at it, you might think that the cartridge is roughly the size of a Super Nintendo cart.
You&#8217;d be wrong.

It is, in fact, roughly the size of TWO Super Nintendo cartridge stacked together and placed next to [...]]]></description>
			<content:encoded><![CDATA[<p>This is a Neo-Geo AES cartridge:</p>
<p><a href="http://www.mathpirate.net/log/wp-content/uploads/2010/06/NeoGeoAES1.jpg"><img class="alignnone size-medium wp-image-1358" title="NeoGeoAES" src="http://www.mathpirate.net/log/wp-content/uploads/2010/06/NeoGeoAES1-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>What this picture fails to show is the scale of this cartridge.  Just looking at it, you might think that the cartridge is roughly the size of a Super Nintendo cart.</p>
<p>You&#8217;d be wrong.</p>
<p><a href="http://www.mathpirate.net/log/wp-content/uploads/2010/06/NeoGeoAESSizeComparison1.jpg"><img class="alignnone size-medium wp-image-1359" title="NeoGeoAESSizeComparison" src="http://www.mathpirate.net/log/wp-content/uploads/2010/06/NeoGeoAESSizeComparison1-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>It is, in fact, roughly the size of TWO Super Nintendo cartridge stacked together and placed next to TWO NES cartridges.  Seriously.  They&#8217;re that massive.</p>
<p>And I thought that the Fairchild Channel F carts were bulky&#8230;</p>
<p><a href="http://www.mathpirate.net/log/wp-content/uploads/2010/06/NeoGeoAES.jpg"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mathpirate.net/log/2010/06/20/electric-curiosities-neo-geo-aes-cartridge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Workflow Quick Tip</title>
		<link>http://www.mathpirate.net/log/2010/06/15/windows-workflow-quick-tip/</link>
		<comments>http://www.mathpirate.net/log/2010/06/15/windows-workflow-quick-tip/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 06:00:15 +0000</pubDate>
		<dc:creator>ThomasSchrantz</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[wf]]></category>
		<category><![CDATA[windows workflow]]></category>
		<category><![CDATA[windows workflow foundation]]></category>

		<guid isPermaLink="false">http://www.mathpirate.net/log/?p=1353</guid>
		<description><![CDATA[Given that I spent all day looking for this and had trouble finding it (Okay, I&#8217;ll be honest, I skipped a page in the book because it didn&#8217;t look relevant, but whatever), if you ever need to get the name of the currently executing state on a Windows Workflow (WF) State Machine Workflow, there&#8217;s a class you [...]]]></description>
			<content:encoded><![CDATA[<p>Given that I spent all day looking for this and had trouble finding it (Okay, I&#8217;ll be honest, I skipped a page in the book because it didn&#8217;t look relevant, but whatever), if you ever need to get the name of the currently executing state on a Windows Workflow (WF) State Machine Workflow, there&#8217;s a class you can use called StateMachineWorkflowInstance.  StateMachineWorkflowInstance has a property called CurrentStateName to give you the name as a string and another called CurrentState, which gives you an instance of the StateActivity object that&#8217;s currently running.</p>
<p>For some reason unknown to me, StateMachineWorkflowInstance isn&#8217;t derived from WorkflowInstance<sup>1</sup>, so the WorkflowInstance you get back from WorkflowRuntime.CreateWorkflow can&#8217;t be cast to a StateMachineWorkflowInstance instance.  Instead, you have to new up the object yourself.  The constructor takes the WorkflowRuntime where the workflow is executing, and the Guid returned by the InstanceId property on the WorkflowInstance that was returned by CreateWorkflow for the workflow you want to know the state for.</p>
<ol class="footnotes"><li id="footnote_0_1353" class="footnote">Cause, you know, .Net is all object orienty and such, so that&#8217;s what I would&#8217;ve done&#8230;</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.mathpirate.net/log/2010/06/15/windows-workflow-quick-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pizza Pizza</title>
		<link>http://www.mathpirate.net/log/2010/05/18/pizza-pizza/</link>
		<comments>http://www.mathpirate.net/log/2010/05/18/pizza-pizza/#comments</comments>
		<pubDate>Tue, 18 May 2010 22:56:17 +0000</pubDate>
		<dc:creator>ThomasSchrantz</dc:creator>
				<category><![CDATA[Misc. Nonsense]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[FAIL]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://www.mathpirate.net/log/?p=1351</guid>
		<description><![CDATA[Visual Studio never fails to come up with amusing ways to go horribly wrong.

And yet somehow, &#8220;Append&#8221; is immune.
]]></description>
			<content:encoded><![CDATA[<p>Visual Studio never fails to come up with amusing ways to go horribly wrong.</p>
<p><a href="http://www.mathpirate.net/log/wp-content/uploads/2010/05/PizzaPizzaMenuMenu.jpg"><img class="alignnone size-full wp-image-1350" title="PizzaPizzaMenuMenu" src="http://www.mathpirate.net/log/wp-content/uploads/2010/05/PizzaPizzaMenuMenu.jpg" alt="" width="182" height="683" /></a></p>
<p>And yet somehow, &#8220;Append&#8221; is immune.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mathpirate.net/log/2010/05/18/pizza-pizza/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automated Testing and TinyMCE</title>
		<link>http://www.mathpirate.net/log/2010/05/11/automated-testing-and-tinymce/</link>
		<comments>http://www.mathpirate.net/log/2010/05/11/automated-testing-and-tinymce/#comments</comments>
		<pubDate>Wed, 12 May 2010 03:40:15 +0000</pubDate>
		<dc:creator>ThomasSchrantz</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[ie dom]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[tinymce]]></category>

		<guid isPermaLink="false">http://www.mathpirate.net/log/?p=1345</guid>
		<description><![CDATA[

Ever come across one of these TinyMCE editors in the stuff you have to test?  Well, it’s probably going to give you a headache when you do.  There’s a &#60;textarea&#62; in the page, and normally, you’d grab the element, set its value, and call it good.
Not here.
You see…  TinyMCE doesn’t use content of the text [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mathpirate.net/log/wp-content/uploads/2010/05/TinyMCE.png"></a></p>
<p><a href="http://www.mathpirate.net/log/wp-content/uploads/2010/05/TinyMCE1.png"><img class="alignnone size-full wp-image-1348" title="TinyMCE" src="http://www.mathpirate.net/log/wp-content/uploads/2010/05/TinyMCE1.png" alt="" width="382" height="170" /></a></p>
<p>Ever come across one of these TinyMCE editors in the stuff you have to test?  Well, it’s probably going to give you a headache when you do.  There’s a &lt;textarea&gt; in the page, and normally, you’d grab the element, set its value, and call it good.</p>
<p>Not here.</p>
<p>You see…  TinyMCE doesn’t use content of the text area.  Instead, it seems to be dynamically building an HTML document within an &lt;iframe&gt; and the text area is just there to be a placeholder.  Now, I’m sure that if you really wanted to, you can probably manipulate the HTML document in that &lt;iframe&gt;, but if you want to do that, there’s probably something wrong with you.  Fortunately, there’s a better way.</p>
<p>TinyMCE has a JavaScript API.  (<a href="http://tinymce.moxiecode.com/js/tinymce/docs/api/index.html">Details here…</a>)  This API lets you do all sorts of crazy things when you’re developing a page with a TinyMCE editor on it.  Of course, we’re not developing the page, but fortunately, the TinyMCE editor doesn’t know that.  JavaScript called from the test is just as valid as JavaScript called from the page in its view, so we can call the function to insert text into the document.  Like so:</p>
<p>window.tinyMCE.execCommand(&#8216;mceInsertContent&#8217;,false,&#8217;<strong><em>contentHTML</em></strong>&#8216;);</p>
<p>where “contentHTML” is the stuff you want to insert.</p>
<p>I&#8217;m assuming that all you have to do is insert a bit of content into the editor field, much like it were a regular text input box.  If you have to do more in depth testing of various TinyMCE controls, you&#8217;re either testing the wrong thing (the editor instead of your app), or you&#8217;re on the dev team for TinyMCE, in which case you shouldn&#8217;t be reading my blog post on this subject, you should be writing your own explaining this so that outside testers don&#8217;t waste the better part of their day to figure this sort of stuff out.</p>
<p>Now, as far as how to actually call JavaScript code when you&#8217;re automating the browser through the DOM&#8230;  I thought I&#8217;d written something about that before, but now I can&#8217;t seem to find it.  I guess that&#8217;ll have to be a topic for the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mathpirate.net/log/2010/05/11/automated-testing-and-tinymce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Well, that was fun.</title>
		<link>http://www.mathpirate.net/log/2010/04/17/well-that-was-fun/</link>
		<comments>http://www.mathpirate.net/log/2010/04/17/well-that-was-fun/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 23:42:16 +0000</pubDate>
		<dc:creator>ThomasSchrantz</dc:creator>
				<category><![CDATA[Misc. Nonsense]]></category>
		<category><![CDATA[FAIL]]></category>
		<category><![CDATA[powered by suck]]></category>

		<guid isPermaLink="false">http://www.mathpirate.net/log/?p=1341</guid>
		<description><![CDATA[The more complex a system becomes, the more interesting it is likely to be when a catastrophe strikes.
Take, for example, a cup of water on an empty table.  When the cup gets knocked over, the water spills out on the table and isn&#8217;t terribly exciting.  Let&#8217;s replace the water with some Hawaiian Punch.  Now you knock [...]]]></description>
			<content:encoded><![CDATA[<p>The more complex a system becomes, the more interesting it is likely to be when a catastrophe strikes.</p>
<p>Take, for example, a cup of water on an empty table.  When the cup gets knocked over, the water spills out on the table and isn&#8217;t terribly exciting.  Let&#8217;s replace the water with some Hawaiian Punch.  Now you knock it over and you get a red pool on the table and a red stain left behind once you clean it up.  See?  More interesting.</p>
<p>So let&#8217;s add a bit more to it.  Like, say, a computer.  You know, keyboard, mouse, tower.  Stuff like that.  And speakers.  And a rat&#8217;s nest of cabling to connect it all together.  Change the table to a computer desk.  Put a nice light colored carpet underneath all of it.  We can&#8217;t forget the power strips on the ground behind the set up, either.  And, oh yeah, a slight incline making the desk higher in the front.</p>
<p>Now tip over the cup.</p>
<p>The mouse pad, keyboard, speaker cable, and tower effectively contain all of the liquid in a small space on the desk.  Nothing spills out the front, nothing spills out the side.  However, let&#8217;s not forget the incline.  The incline causes what would be a containment fence on a level surface to become a funnel, which swiftly and efficiently drains the pool of sugary liquid through a narrow space between a section of the desk and the computer tower, and out the backside of the desk, where it produces a red cascade directly onto the rat&#8217;s nest of wiring, the power strips, and the white carpeting below.</p>
<p>Yeah.  That was -AWESOME-  You just can&#8217;t anticipate that kind of failure.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mathpirate.net/log/2010/04/17/well-that-was-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Earth Hour</title>
		<link>http://www.mathpirate.net/log/2010/03/25/earth-hour/</link>
		<comments>http://www.mathpirate.net/log/2010/03/25/earth-hour/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 01:50:54 +0000</pubDate>
		<dc:creator>ThomasSchrantz</dc:creator>
				<category><![CDATA[Misc. Nonsense]]></category>
		<category><![CDATA[cfl]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[hippy]]></category>

		<guid isPermaLink="false">http://www.mathpirate.net/log/?p=1339</guid>
		<description><![CDATA[A few years ago, a movement called &#8220;Earth Hour&#8221; started to bring attention to the environmental cost of electricity, and encouraged people across the world to turn off their lights for an hour.  It may be symbolic, but it&#8217;s nothing more.  When large businesses and landmarks shut off or dim their lights, it will be [...]]]></description>
			<content:encoded><![CDATA[<p>A few years ago, a movement called &#8220;Earth Hour&#8221; started to bring attention to the environmental cost of electricity, and encouraged people across the world to turn off their lights for an hour.  It may be symbolic, but it&#8217;s nothing more.  When large businesses and landmarks shut off or dim their lights, it will be noticeable, but when you do it, it&#8217;s not even going to be a drop in the bucket.  You are not going to make a significant dent in electric usage by turning off your lights for an hour.  Here&#8217;s why: What do you do when the lights are out for an hour?  Turn on your 50 inch plasma TV to watch a movie with your big surround sound system, while your computer hums away in another room completely unused.  If you&#8217;re the kind of person who&#8217;s given to take part in something like Earth Hour, you&#8217;ve already switched to CFLs and maybe even LEDs.  In my apartment, I have one primary CFL light that covers the living room and computer area.  It&#8217;s usually on from when I get home to when I go to bed.  In that hour when it&#8217;s off, I would save 23W.  23W of hydroelectric power, most likely.  My TV uses something like 110 W and my cable box uses 30W  (Even when it&#8217;s off!).  My computer is probably 200 W total.  Using any of those will use far more electricity than turning off my light will save.  The worst offender of all is my microwave.  In the 3:30 that it took to nuke my macaroni and cheese dinner tonight, it used almost THREE AND A HALF TIMES the amount of electricity that my trusty light uses in an entire hour.</p>
<p>So, if you&#8217;re going to participate in Earth Hour this weekend, turn off the TV, turn off the computer, leave the light on and have a bowl of cereal for dinner.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mathpirate.net/log/2010/03/25/earth-hour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Temporal Mechanics: Changing the Speed of Time, Part II</title>
		<link>http://www.mathpirate.net/log/2010/03/20/temporal-mechanics-changing-the-speed-of-time-part-ii/</link>
		<comments>http://www.mathpirate.net/log/2010/03/20/temporal-mechanics-changing-the-speed-of-time-part-ii/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 08:06:25 +0000</pubDate>
		<dc:creator>ThomasSchrantz</dc:creator>
				<category><![CDATA[Misc. Nonsense]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[non-linear temporal anomaly]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[time travel]]></category>
		<category><![CDATA[w32time]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows time service]]></category>

		<guid isPermaLink="false">http://www.mathpirate.net/log/?p=1323</guid>
		<description><![CDATA[So, you want to change the speed of time, eh?  Now, I trust that you&#8217;re only going to change this on your own computer and not do anything to your coworker&#8217;s computer when they go for coffee and leave their machine unlocked and unattended for a few minutes, correct?  Okay, let&#8217;s begin.
First, before you go [...]]]></description>
			<content:encoded><![CDATA[<p>So, you want to change the speed of time, eh?  Now, I trust that you&#8217;re only going to change this on your own computer and not do anything to your coworker&#8217;s computer when they go for coffee and leave their machine unlocked and unattended for a few minutes, correct?  Okay, let&#8217;s begin.</p>
<p>First, before you go changing the speed of time, let&#8217;s see how fast time is going.  In order to do that, there&#8217;s a Win32 function called &#8220;GetSystemTimeAdjustment&#8221;.  Here&#8217;s the signature:</p>
<div class="codecolorer-container c default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">BOOL WINAPI GetSystemTimeAdjustment<span style="color: #009900;">&#40;</span><br />
    __out PDWORD lpTimeAdjustment<span style="color: #339933;">,</span><br />
    __out PDWORD lpTimeIncrement<span style="color: #339933;">,</span><br />
    __out PBOOL lpTimeAdjustmentDisabled<br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>Of course, Win32 C is terribly ugly and nasty to work with, so I&#8217;m going to do this in C#.  That means a P/Invoke, but at least I won&#8217;t have to deal with __out PDWORDs and the like.  Here&#8217;s that bit:</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000;">&#91;</span>DllImport<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;kernel32.dll&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">extern</span> <span style="color: #FF0000;">bool</span> GetSystemTimeAdjustment<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">out</span> <span style="color: #FF0000;">uint</span> timeAdjustment, <span style="color: #0600FF;">out</span> <span style="color: #FF0000;">uint</span> timeIncrement, <span style="color: #0600FF;">out</span> <span style="color: #FF0000;">bool</span> timeAdjustmentDisabled<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<p>It&#8217;s still sort of ugly, but not nearly as totally ugly, so it&#8217;s all right.  If you&#8217;re not completely familiar with all of this DllImport stuff and static externs and out parameters, that&#8217;s okay.  I&#8217;m going to mock your ignorance of the language, but aside from that, it&#8217;s no big deal.  Now let&#8217;s give it a call and see who answers.</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #FF0000;">uint</span> timeAdjustment<span style="color: #008000;">;</span><br />
<span style="color: #FF0000;">uint</span> timeIncrement<span style="color: #008000;">;</span><br />
<span style="color: #FF0000;">bool</span> timeAdjustmentDisabled<span style="color: #008000;">;</span><br />
<br />
GetSystemTimeAdjustment<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">out</span> timeAdjustment, <span style="color: #0600FF;">out</span> timeIncrement, <span style="color: #0600FF;">out</span> timeAdjustmentDisabled<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Adjustment: {0} Increment: {1} Adjustment Disabled: {2}&quot;</span>, timeAdjustment, timeIncrement, timeAdjustmentDisabled<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<p>On my current home machine (XP, not on a domain), I get this as the output:</p>
<pre>Adjustment: 156250  Increment: 156250  Adjustment Disabled: True</pre>
<p>If you recall my previous entry on this topic, you&#8217;ll remember that the Windows Time Service would add a certain number of 100ns units to the system clock every 15.6 ms or so.  The Adjustment number is the number of 100ns ticks it will add, and the Increment number is the number of 100ns ticks of supposedly &#8220;real&#8221; time that will elapse between time adjustments.  Obviously, Increment is not completely accurate, it doesn&#8217;t mean precisely 15.625 ms of real world time, because if it did, then Adjustment would always equal Increment, and your clock would be completely accurate with no drift whatsoever, so there would be no need for automatic adjustments.  In this case, Adjustment does equal Increment.  However, if you look at the final value, Adjustment Disabled is true.  That means the automatic time adjustments are disabled.  When that&#8217;s disabled, the Windows Time Service isn&#8217;t doing any of the gradual corrections that I talked about in the last post, instead, it considers your physical clock ticks to be good enough.  Your computer clock will likely drift over time.  On my machine, I&#8217;m not joined to a domain or anything like that.  Instead, I&#8217;m configured to talk to time.windows.com once a week and resync my clock.</p>
<p>Of course, printing that information out just once is somewhat boring.  I strongly recommend putting it in a loop and printing it out every couple of seconds.</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF;">while</span> <span style="color: #000000;">&#40;</span><span style="color: #0600FF;">true</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
    GetSystemTimeAdjustment<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">out</span> timeAdjustment, <span style="color: #0600FF;">out</span> timeIncrement, <span style="color: #0600FF;">out</span> timeAdjustmentDisabled<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
    Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Adjustment: {0} Increment: {1} Adjustment Disabled: {2}&quot;</span>, timeAdjustment, timeIncrement, timeAdjustmentDisabled<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
    Thread.<span style="color: #0000FF;">Sleep</span><span style="color: #000000;">&#40;</span>5000<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>If you&#8217;re on a domain or otherwise have your system clock actively and frequently being kept in line by something, I would strongly urge you to do the following fun experiment at this point.</p>
<ol>
<li>Compile this program.</li>
<li>Run this program.</li>
<li>If Adjustment Disabled == false, put your computer&#8217;s clock ahead or back a minute or so.</li>
<li>Watch the program for a while.</li>
</ol>
<p>You&#8217;ll see something like this over the course of the next 20 minutes or so (Your numbers will vary).</p>
<pre>Adjustment: 156250  Increment: 156250  Adjustment Disabled: False
Adjustment: 145125  Increment: 156250  Adjustment Disabled: False
Adjustment: 154412  Increment: 156250  Adjustment Disabled: False
Adjustment: 156159  Increment: 156250  Adjustment Disabled: False
Adjustment: 156225  Increment: 156250  Adjustment Disabled: False
Adjustment: 156247  Increment: 156250  Adjustment Disabled: False
Adjustment: 156249  Increment: 156250  Adjustment Disabled: False
Adjustment: 156250  Increment: 156250  Adjustment Disabled: False</pre>
<p>Remember that adjustment is how much time is being added to your system&#8217;s clock at each tick.  The Windows Time Service synced with your domain controller and realized that your system time was off by about a minute.  Because of that, it decided that it needed to run slow for a bit to allow reality to catch up.  When Adjustment went to 145125, it meant that every 15.6 ms, the computer only added 14.5 ms to its timer.  A difference of only 1.1 ms per tick, but when you consider that there are about 64 ticks in a second and 60 seconds in a minute, you&#8217;re talking a difference of over 4 seconds per minute of real time.  Which means that at a rate like that, every minute of real time will only be 56 seconds in warped computer time.  That will very quickly add up and within 15 minutes, that minute you set your clock off will be made up.</p>
<p>However, the Time Service is cautious and doesn&#8217;t wish to over correct, so it will shoot for lower than the full time offset.  That means basically that instead of trying to close the full minute in one shot, it&#8217;ll pull back only 50 seconds.  Then it will go seven seconds, then two seconds, then a fraction of a second.  My experience with the time service is that the adjust will try to softly land on Increment, getting closer and closer until the two are even.</p>
<p>Under normal circumstances, if Adjustment is higher than Increment, it means that your clock is running slow and the Time Service is speeding up your system&#8217;s time to catch up with reality.  If Adjustment is lower than Increment, your clock is ahead and the Windows Time Service will put on the brakes and decelerate time to allow reality to catch up.</p>
<p>Normal circumstances aren&#8217;t much fun, though.  Let&#8217;s go for a few abnormal circumstances, shall we?</p>
<p>I did promise that you would be able to change the speed of time on your own.  That means no Time Service involvement.  If you want your clock to take off like a Prius with a stuck accelerator and janky brakes, I can help you make that happen.</p>
<p>There&#8217;s a GetSystemTimeAdjustment, so naturally, there&#8217;s gotta be a SetSystemTimeAdjustment.</p>
<div class="codecolorer-container c default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">BOOL WINAPI SetSystemTimeAdjustment<span style="color: #009900;">&#40;</span><br />
    __in DWORD dwTimeAdjustment<span style="color: #339933;">,</span><br />
    __in BOOL bTimeAdjustmentDisabled<br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>Let&#8217;s sharpen that up a bit&#8230;</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000;">&#91;</span>DllImport<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;kernel32.dll&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">extern</span> <span style="color: #FF0000;">bool</span> SetSystemTimeAdjustment<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">uint</span> timeAdjustment, <span style="color: #FF0000;">bool</span> timeAdjustmentDisabled<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<p>It should be noted that the DWORD parameter of the C turns into a uint argument.  Initially, I had written the P/Invoke signature using a signed integer.  I thought it would be fun to set the time adjustment to -156250, to watch the clock go backwards.  Unfortunately, when -156250 gets treated as an unsigned integer, it becomes, well, 4294811045.  So, instead of watching my computer&#8217;s clock run backwards, I saw it zoom to the future at a rate of a day every 3.14 seconds.  Which, I have to admit, was totally awesome.</p>
<p>Anyway, I strongly suggest that you first call GetSystemTimeAdjustment and see what the adjustment value is first, so that you&#8217;ll have a good idea of where you want to set the value to get the effect you want.  Rememember, double the base and the clock goes twice as fast, cut the base in half and your clock moves at half speed.  I haven&#8217;t found a way to go back in time yet, but that sort of thing only causes universe destroying paradoxes, so perhaps that&#8217;s for the best.</p>
<p>So, now, if you run it, giving some reasonable (or unreasonable) number as the value of Adjustment, what you&#8217;ll probably find is that ABSOLTELY NOTHING happens.  This is, of course, the unseen impact of the Temporal Security Agency preventing you from tampering with time. <sup>1</sup>  They don&#8217;t like it when you mess with that sort of thing.  To get around that, you have to ask for the &#8220;SE_SYSTEMTIME_NAME&#8221; privilege beforehand.  I have no idea at all what that means, I just know that the documentation says you need it and offers you no practical guidance whatsoever as to how you&#8217;re supposed to acquire it.</p>
<p>What to do when you&#8217;re faced with obtuse documentation on an obscure subject like Win32 Privilege Tokens?  Steal the code from the Internet, of course.</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">        <span style="color: #008080; font-style: italic;">//The code in this block is not mine and I make no claims to it.</span><br />
        <span style="color: #008080; font-style: italic;">//I don't really even know what it's doing...</span><br />
        <span style="color: #008080;">#region Code stolen from the Internet.</span><br />
        <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">const</span> <span style="color: #FF0000;">int</span> ANYSIZE_ARRAY <span style="color: #008000;">=</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">;</span><br />
        <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">const</span> <span style="color: #FF0000;">string</span> SE_SYSTEMTIME_NAME <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;SeSystemtimePrivilege&quot;</span><span style="color: #008000;">;</span><br />
        <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">const</span> <span style="color: #FF0000;">int</span> SE_PRIVILEGE_ENABLED <span style="color: #008000;">=</span> 0x00000002<span style="color: #008000;">;</span><br />
        <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">const</span> <span style="color: #FF0000;">int</span> TOKEN_QUERY <span style="color: #008000;">=</span> 0x0008<span style="color: #008000;">;</span><br />
        <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">const</span> <span style="color: #FF0000;">int</span> TOKEN_ADJUST_PRIVILEGES <span style="color: #008000;">=</span> 0x0020<span style="color: #008000;">;</span><br />
<br />
        <span style="color: #000000;">&#91;</span>StructLayout<span style="color: #000000;">&#40;</span>LayoutKind.<span style="color: #0000FF;">Sequential</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
        <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">struct</span> LUID<br />
        <span style="color: #000000;">&#123;</span><br />
            <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">int</span> LowPart<span style="color: #008000;">;</span><br />
            <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">int</span> HighPart<span style="color: #008000;">;</span><br />
        <span style="color: #000000;">&#125;</span><br />
<br />
        <span style="color: #000000;">&#91;</span>StructLayout<span style="color: #000000;">&#40;</span>LayoutKind.<span style="color: #0000FF;">Sequential</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
        <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">struct</span> LUID_AND_ATTRIBUTES<br />
        <span style="color: #000000;">&#123;</span><br />
            <span style="color: #0600FF;">public</span> LUID Luid<span style="color: #008000;">;</span><br />
            <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">int</span> Attributes<span style="color: #008000;">;</span><br />
        <span style="color: #000000;">&#125;</span><br />
<br />
        <span style="color: #000000;">&#91;</span>StructLayout<span style="color: #000000;">&#40;</span>LayoutKind.<span style="color: #0000FF;">Sequential</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
        <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">struct</span> TOKEN_PRIVILEGES<br />
        <span style="color: #000000;">&#123;</span><br />
            <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">int</span> PrivilegeCount<span style="color: #008000;">;</span><br />
            <span style="color: #000000;">&#91;</span>MarshalAs<span style="color: #000000;">&#40;</span>UnmanagedType.<span style="color: #0000FF;">ByValArray</span>, SizeConst <span style="color: #008000;">=</span> ANYSIZE_ARRAY<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
            <span style="color: #0600FF;">public</span> LUID_AND_ATTRIBUTES<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> Privileges<span style="color: #008000;">;</span><br />
        <span style="color: #000000;">&#125;</span><br />
<br />
        <span style="color: #000000;">&#91;</span>DllImport<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;advapi32.dll&quot;</span>, CharSet <span style="color: #008000;">=</span> CharSet.<span style="color: #0600FF;">Auto</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
        <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">extern</span> <span style="color: #FF0000;">bool</span> OpenProcessToken<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> ProcessHandle, <span style="color: #FF0000;">int</span> DesiredAccess, <span style="color: #0600FF;">ref</span> <span style="color: #FF0000;">int</span> TokenHandle<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
        <span style="color: #000000;">&#91;</span>DllImport<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;kernel32.dll&quot;</span>, CharSet <span style="color: #008000;">=</span> CharSet.<span style="color: #0600FF;">Auto</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
        <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">extern</span> <span style="color: #FF0000;">int</span> GetCurrentProcess<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
        <span style="color: #000000;">&#91;</span>DllImport<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;advapi32.dll&quot;</span>, CharSet <span style="color: #008000;">=</span> CharSet.<span style="color: #0600FF;">Auto</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
        <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">extern</span> <span style="color: #FF0000;">bool</span> LookupPrivilegeValue<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> lpSystemName, <span style="color: #FF0000;">string</span> lpName, <span style="color: #000000;">&#91;</span>MarshalAs<span style="color: #000000;">&#40;</span>UnmanagedType.<span style="color: #FF0000;">Struct</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span> <span style="color: #0600FF;">ref</span> LUID lpLuid<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
        <span style="color: #000000;">&#91;</span>DllImport<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;advapi32.dll&quot;</span>, CharSet <span style="color: #008000;">=</span> CharSet.<span style="color: #0600FF;">Auto</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
        <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">extern</span> <span style="color: #FF0000;">bool</span> AdjustTokenPrivileges<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> TokenHandle, <span style="color: #FF0000;">int</span> DisableAllPrivileges, <span style="color: #000000;">&#91;</span>MarshalAs<span style="color: #000000;">&#40;</span>UnmanagedType.<span style="color: #FF0000;">Struct</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span> <span style="color: #0600FF;">ref</span> TOKEN_PRIVILEGES NewState, <span style="color: #FF0000;">int</span> BufferLength, <span style="color: #000000;">&#91;</span>MarshalAs<span style="color: #000000;">&#40;</span>UnmanagedType.<span style="color: #FF0000;">Struct</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span> <span style="color: #0600FF;">ref</span> TOKEN_PRIVILEGES PreviousState, <span style="color: #0600FF;">ref</span> <span style="color: #FF0000;">int</span> ReturnLength<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
        <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">bool</span> AdjustPrivileges<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
        <span style="color: #000000;">&#123;</span><br />
            TOKEN_PRIVILEGES tkNew <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> TOKEN_PRIVILEGES<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
            tkNew.<span style="color: #0000FF;">Privileges</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> LUID_AND_ATTRIBUTES<span style="color: #000000;">&#91;</span>ANYSIZE_ARRAY<span style="color: #000000;">&#93;</span><span style="color: #008000;">;</span><br />
            TOKEN_PRIVILEGES tkOld <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> TOKEN_PRIVILEGES<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
            tkOld.<span style="color: #0000FF;">Privileges</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> LUID_AND_ATTRIBUTES<span style="color: #000000;">&#91;</span>ANYSIZE_ARRAY<span style="color: #000000;">&#93;</span><span style="color: #008000;">;</span><br />
<br />
            LUID luid <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> LUID<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
            <span style="color: #FF0000;">int</span> token <span style="color: #008000;">=</span> <span style="color: #008000;">-</span><span style="color: #FF0000;">1</span><span style="color: #008000;">;</span><br />
            <span style="color: #FF0000;">int</span> oldluidSize <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span><br />
<br />
            <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>LookupPrivilegeValue<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">null</span>, SE_SYSTEMTIME_NAME, <span style="color: #0600FF;">ref</span> luid<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />
            <span style="color: #000000;">&#123;</span><br />
                <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>OpenProcessToken<span style="color: #000000;">&#40;</span>GetCurrentProcess<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<br />
                TOKEN_ADJUST_PRIVILEGES <span style="color: #008000;">|</span> TOKEN_QUERY, <span style="color: #0600FF;">ref</span> token<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />
                <span style="color: #000000;">&#123;</span><br />
                    tkNew.<span style="color: #0000FF;">PrivilegeCount</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">;</span><br />
                    tkNew.<span style="color: #0000FF;">Privileges</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Attributes</span> <span style="color: #008000;">=</span> SE_PRIVILEGE_ENABLED<span style="color: #008000;">;</span><br />
                    tkNew.<span style="color: #0000FF;">Privileges</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Luid</span> <span style="color: #008000;">=</span> luid<span style="color: #008000;">;</span><br />
                    <span style="color: #FF0000;">int</span> luidSize <span style="color: #008000;">=</span> Marshal.<span style="color: #008000;">SizeOf</span><span style="color: #000000;">&#40;</span><span style="color: #008000;">typeof</span><span style="color: #000000;">&#40;</span>TOKEN_PRIVILEGES<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
                    <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>AdjustTokenPrivileges<span style="color: #000000;">&#40;</span>token, 0, <span style="color: #0600FF;">ref</span> tkNew, luidSize, <span style="color: #0600FF;">ref</span> tkOld, <span style="color: #0600FF;">ref</span> oldluidSize<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />
                    <span style="color: #000000;">&#123;</span><br />
                        <span style="color: #0600FF;">return</span> true<span style="color: #008000;">;</span><br />
                    <span style="color: #000000;">&#125;</span><br />
                <span style="color: #000000;">&#125;</span><br />
            <span style="color: #000000;">&#125;</span><br />
            <span style="color: #0600FF;">return</span> false<span style="color: #008000;">;</span><br />
        <span style="color: #000000;">&#125;</span><br />
        <span style="color: #008080;">#endregion Code stolen from the Internet.</span></div></div>
<p>That code isn&#8217;t mine.  I don&#8217;t know whose it is and I don&#8217;t know what it does exactly.  All I know is it magically makes all the time stuff work, and for that I am grateful.  Anyway, now all you should have to do is add a call to AdjustPrivileges() at some point before you try to call SetSystemTimeAdjustment.  Like so:</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">    <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008000;">!</span>AdjustPrivileges<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />
    <span style="color: #000000;">&#123;</span><br />
        <span style="color: #0600FF;">throw</span> <span style="color: #008000;">new</span> Exception<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;AdjustPrivileges failed.&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
    <span style="color: #000000;">&#125;</span><br />
<br />
    <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #008000;">!</span>SetSystemTimeAdjustment<span style="color: #000000;">&#40;</span>312500, <span style="color: #0600FF;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />
    <span style="color: #000000;">&#123;</span><br />
        <span style="color: #0600FF;">throw</span> <span style="color: #008000;">new</span> Exception<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;SetSystemTimeAdjustment failed.&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
    <span style="color: #000000;">&#125;</span><br />
<br />
 </div></div>
<p>Before you run this, let me just warn you not to run this.  I don&#8217;t know what it&#8217;s going to do to your computer.  You&#8217;re changing time randomly.  That can never be a good thing.  So don&#8217;t do it.</p>
<p>Since you&#8217;re going to do it anyway, here&#8217;s two ways to try to get yourself out of an uncontrolled time slide.  Kill the program first, then try to resynchronize your clock by going into your taskbar clock and telling it to update the time.  If that doesn&#8217;t work, stop and restart the Windows Time Service.  And if that doesn&#8217;t work, well, I told you not to do it and you didn&#8217;t listen to me, so don&#8217;t go blaming me.</p>
<p>The source code is located here, in case you don&#8217;t feel like typing in everything by hand: <a href="http://www.mathpirate.net/svn/Projects/SpeedOfTime/">http://www.mathpirate.net/svn/Projects/SpeedOfTime/</a></p>
<p>Now, make sure you have a watch or a clock or something that will display seconds and that&#8217;s not tied to your computer in any way.  Make sure it&#8217;s roughly synchronized (within a second or two) of your computer.  Then press play and do the time warp.</p>
<p>What&#8217;s checked in will cause your computer to travel through time twice as fast as reality.  You can, of course, tweak the number and modify how fast or slow you want to go.  Pay attention to the read-out, though.  If the Windows Time Service is actively adjusting your time, it will likely override your temporal anomaly and either fix the clock outright, or at least modify the adjustment so you start to return to normality.  To prevent unwanted chronometric realignment, you may want to stop the Windows Time Service while you&#8217;re messing around.</p>
<p>For those of you smart enough not to play the home game, here&#8217;s a video which will demonstrate the effects of time compression and dilation.</p>
<p><a href="http://www.mathpirate.net/log/2010/03/20/temporal-mechanics-changing-the-speed-of-time-part-ii/#mediaPlayer_1323_0">Play Video </a></p>
<p>And now, here&#8217;s the effects of a non-linear temporal anomaly.</p>
<p><a href="http://www.mathpirate.net/log/2010/03/20/temporal-mechanics-changing-the-speed-of-time-part-ii/#mediaPlayer_1323_1">Play Video </a></p>
<ol class="footnotes"><li id="footnote_0_1323" class="footnote">I know you&#8217;re there, Agent Blackwood!</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.mathpirate.net/log/2010/03/20/temporal-mechanics-changing-the-speed-of-time-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Temporal Mechanics: Changing the Speed of Time</title>
		<link>http://www.mathpirate.net/log/2010/03/14/temporal-mechanics-changing-the-speed-of-time/</link>
		<comments>http://www.mathpirate.net/log/2010/03/14/temporal-mechanics-changing-the-speed-of-time/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 18:55:49 +0000</pubDate>
		<dc:creator>ThomasSchrantz</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[time travel]]></category>
		<category><![CDATA[w32time]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows time service]]></category>

		<guid isPermaLink="false">http://www.mathpirate.net/log/?p=1313</guid>
		<description><![CDATA[Until last week, I never really thought about my computer&#8217;s system clock.  I simply thought that it hummed along at a constant, smooth rate, always heading toward the future.  I figured that once a week, it would call a time server tethered to atomic clock somewhere and make sure that it&#8217;s in sync.  If not, [...]]]></description>
			<content:encoded><![CDATA[<p>Until last week, I never really thought about my computer&#8217;s system clock.  I simply thought that it hummed along at a constant, smooth rate, always heading toward the future.  I figured that once a week, it would call a time server tethered to atomic clock somewhere and make sure that it&#8217;s in sync.  If not, it would immediately correct the time and go about its business for another week.</p>
<p>Turns out, I was wrong.  The way Windows handles time, particularly when a member of a domain is a tad more complicated.  And, as it turns out, you generally want it that way.</p>
<p>Think about the implications of the method I described above.  If your system clock is bad, that means that in the span of a week, you can get ten or fifteen minutes off of real time.  Then, in one big jump, your clock gets corrected, jumping your system ten minutes into the future, or forcing it to re-live the past ten minutes over again.  On your home system, that&#8217;s probably not a huge deal.  Timestamps on all the movies you&#8217;re downloading might be off by a bit, big deal.  But in the business world, that would be bad.  Your Outlook reminders would fire off at different times for different people, e-mails and instant messages would have odd timestamps, and the Kerberos system used for authentication would randomly block people for being outside of an acceptable time range.</p>
<p>In short:  Mayhem.</p>
<p>So, when you&#8217;re joined to a domain, Windows typically gets a bit stricter over how it handles time synchronization.  It does this to keep all machines in line.  That&#8217;s why you hear the meeting reminder bell rising from fifteen machines in your cubicle farm at nearly the same moment.  The Windows Time Service is keeping everyone synchronized.</p>
<p>Now, there&#8217;s a good chance that you already knew that, if you&#8217;ve been around networks long enough.  But, there&#8217;s an equally good chance that you don&#8217;t know how the Windows Time Service is keeping everyone synchronized.  I had always assumed that the Time Service was keeping everyone in sync by resetting everyone&#8217;s clocks to the correct time every hour or so, and that no one ever noticed because your internal system clock kept good time.  In other words, at 1:03:27 PM, your computer would be told that it was 1:03:27 PM, so it would set the time, and it would still be 1:03:27 PM.</p>
<p>That ain&#8217;t what it does.</p>
<p>In fact, your computer&#8217;s clock doesn&#8217;t really matter to Windows.  Windows really only pays attention to it when it first starts up.  Beyond that, the magic of the Windows Time Service keeps things in line.</p>
<p>The Windows Time Service doesn&#8217;t really like setting your time at all, once it&#8217;s running.  It will do so, if your clock gets too far away from the time authority, but in general, it won&#8217;t set your time.  So, how does it keep a flock of computers running in perfect Outlook harmony?</p>
<p>Simple.</p>
<p>It changes the speed of time.</p>
<p>I&#8217;ll get into that, but first, let&#8217;s change your perception of time.  Time, at least from the perspective of a Windows machine, is not linear.  Instead, it&#8217;s a step function.  The exact values vary from system to system, but these are the basics:  Every 15 ms or so, the clock bumps its time value by 15 ms or so.  If you&#8217;ve ever done a Console.WriteLine(DateTime.Now.Ticks); inside a tight while loop<sup>1</sup>, you&#8217;ve seen the effects of this.  The value will remain constant for many iterations, then leap up, then stay at the new level for a while, then jump.  Similarly, if you&#8217;ve ever mistakenly tried to use DateTime for recording performance numbers, you&#8217;ve run into something similar.  All of your perf times are reporting 0ms, 15ms, or 31ms.  It&#8217;s always one of those three.  Never 7, never 12, never 24.  That&#8217;s because the resolution of the time is 15ms.</p>
<p>In other words, time looks like this:</p>
<p><a href="http://www.mathpirate.net/log/wp-content/uploads/2010/03/TimeEvenStep.png"><img class="alignnone size-medium wp-image-1315" title="TimeEvenStep" src="http://www.mathpirate.net/log/wp-content/uploads/2010/03/TimeEvenStep-300x300.png" alt="" width="300" height="300" /></a></p>
<p>The smooth black line is &#8220;real time&#8221; and the stepping red line is your computer&#8217;s time.</p>
<p>All is well in graph-land.  The time your computer reads might move in discrete chunks, but it&#8217;s always centered around real time, so you&#8217;re never more than 7.5 ms off of reality.</p>
<p>But what happens if the clock in your computer is bad?  The quartz crystal has gone on a vacation to a big sphinx with the Jackdaws or the cesium atom is vibrating 9192631771 times a second.  Your computer will think that it&#8217;s adding 15ms, but it&#8217;s actually adding slightly more or less time.  Let&#8217;s take a 5% error rate.  For every 15 ms of real time, your computer adds 15.75 ms to its clock.  That looks like this:</p>
<p><a href="http://www.mathpirate.net/log/wp-content/uploads/2010/03/TimeGraph-FivePercent.png"><img class="alignnone size-medium wp-image-1316" title="TimeGraph-FivePercent" src="http://www.mathpirate.net/log/wp-content/uploads/2010/03/TimeGraph-FivePercent-285x300.png" alt="" width="285" height="300" /></a></p>
<p>You&#8217;ve gone off the chart.  The error accumulates and time starts drifting.  At the end of this sample graph, which represents only 135 ms, your clock has already drifted so far that it now will never be correct.  At this rate, after ten minutes, you&#8217;ll be 30 seconds off.</p>
<p>Obviously, that&#8217;s not good.  What the system could do is reset your clock every ten minutes to the correct time.  Except that you&#8217;d notice a jump like that and you&#8217;d get annoyed.  Granted, 5% is a large error for a system clock, but the premise is the same regardless of the size of the error.  Small errors add up to big problems.  Even if you only drifted a second every ten minutes, that one second skip would cause trouble to enough people that it would be a major issue.  So, like I said, the Windows Time Service will change the speed of time to correct the clock.</p>
<p>It&#8217;s a bit like putting your finger on the second hand of a clock.  You can push it forward gently and the clock will move ahead, or you can resist the motion and the clock will fall behind.  That 15ms that the system adds to the clock is just a number.  On my machine, that number is 156250.<sup>2</sup>  That&#8217;s the number of 100ns units of time that will get added to the clock every time it ticks. <sup>3</sup>  But if your clock is too far ahead, all the system has to do is add a smaller number (Say, 150000) for a period of time, causing your computer&#8217;s clock to slow down, and letting reality catch up.</p>
<p>Back to the graph, this time with a 50% error for illustration purposes.</p>
<p><a href="http://www.mathpirate.net/log/wp-content/uploads/2010/03/TimeGraph-50Percent.png"><img class="alignnone size-medium wp-image-1317" title="TimeGraph-50Percent" src="http://www.mathpirate.net/log/wp-content/uploads/2010/03/TimeGraph-50Percent-201x300.png" alt="" width="201" height="300" /></a></p>
<p>It&#8217;s adding 22.5ms for every 15ms of real time.  Very quickly, your clock is going off the rails.  Let&#8217;s change the speed of time and fix this problem.</p>
<p><a href="http://www.mathpirate.net/log/wp-content/uploads/2010/03/TimeGraph-50PercentFix.png"><img class="alignnone size-medium wp-image-1318" title="TimeGraph-50PercentFix" src="http://www.mathpirate.net/log/wp-content/uploads/2010/03/TimeGraph-50PercentFix-244x300.png" alt="" width="244" height="300" /></a></p>
<p>The Windows Time Service saw the fact that the time was way off and changed the speed of time, slowing down the clock to two-thirds of its normal speed.  It started adding only 10ms of computer time every 15ms of real time.  This solved the problem very quickly, but has the unfortunate side effect of leaving your computer&#8217;s clock running too slow.  Now, instead of zooming ahead, it&#8217;s going to be falling further and further behind reality.  The solution, of course, is to speed time back up.</p>
<p>Now, the corrections don&#8217;t happen on this scale.  This is a huge simplification of the bizarre reality you&#8217;ll uncover if you ever watch the Windows Time Service work its magic.  Usually you&#8217;ll see something like a drift of 20ms over 10 minutes, then over the next ten minutes, the time service will slow the clock to lose those extra 20ms.  All day long, you&#8217;ll see your system drift in and out of phase with reality, but it should never get that far out of tune, and you&#8217;ll never notice what it does just by watching the clock.</p>
<p>Unless, of course, you deliberately set your clock ahead or behind&#8230;</p>
<p>You have to be careful, because the time service has a couple of cutoff thresholds where it will force a corrective time jump in order to fix the problem.  However, if you stay within those thresholds, you can watch w32time do some pretty awesome things.  Like make your system time gain seven minutes over the course of five real minutes, or make every second last two seconds.</p>
<p>TAKE THAT, EINSTEIN.</p>
<p>Not that I&#8217;m suggesting you try this or anything, but while you&#8217;re at work tomorrow (On a computer that&#8217;s on a domain and synching regularly with an authoritative time source), get some popcorn, set your clock ahead or behind about 3.5 minutes, and compare your computer&#8217;s clock (You have to watch the view with the second hand) to some external time source, like your watch or cell phone.  When I&#8217;ve done this, it&#8217;ll start slowly.  The time will remain where it is for a while, then all of a sudden, time will accelerate (or decelerate) drastically for a period of a few minutes, then it will level off.  Within about half an hour, that 3.5 minute gap will be pretty much closed, and it never had to skip or repeat a second.</p>
<p>Of course, the specifics change with different machines, different Windows versions, and different network time configurations.  You may have to fiddle and twizzle with knobs and dials to see any noticeable result.  Fortunately, there&#8217;s Registry Settings located under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time that give you lots of knobs and dials to fiddle and twizzle.  You don&#8217;t necessarily want to mess with any of them, and I&#8217;d strongly recommend finding a reference to what they do before you set out on a time bending adventure using them.  I&#8217;d also strongly recommend exporting a backup copy of that reg key before you go mucking about, otherwise be prepared to be late for everything for the rest of your life.</p>
<p>Oh, and did I mention that you can change the speed of time yourself?  That makes this so much more fun, especially if it&#8217;s not your computer that you&#8217;re changing the speed of time on.  I&#8217;ll show you how to do that next time.</p>
<p>(If there is a next time&#8230;  I think I may have triggered a paradox and my hand seems to be disappearing now&#8230;)</p>
<ol class="footnotes"><li id="footnote_0_1313" class="footnote">Go ahead, try it.</li><li id="footnote_1_1313" class="footnote">So, I lied.  It&#8217;s not 15ms, it&#8217;s 15.6ms, but I&#8217;m not typing 15.6ms all the time.</li><li id="footnote_2_1313" class="footnote">100 nanoseconds is the base unit of time in the Windows world.  Windows File Time is given in the number of 100ns ticks since January 1st, 1601.  Why that date, I&#8217;m not sure, but I think it has something to do with the Illuminati and a Star Trek fan who wasn&#8217;t good at remembering numbers exactly.  There are 10000 of these in 1ms, and 10000000 of them in a second.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.mathpirate.net/log/2010/03/14/temporal-mechanics-changing-the-speed-of-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Vacation Destination</title>
		<link>http://www.mathpirate.net/log/2010/03/08/new-vacation-destination/</link>
		<comments>http://www.mathpirate.net/log/2010/03/08/new-vacation-destination/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 06:25:32 +0000</pubDate>
		<dc:creator>ThomasSchrantz</dc:creator>
				<category><![CDATA[Misc. Nonsense]]></category>
		<category><![CDATA[atari]]></category>
		<category><![CDATA[atari 2600]]></category>
		<category><![CDATA[e.t.: the extra-terrestrial]]></category>

		<guid isPermaLink="false">http://www.mathpirate.net/log/?p=1310</guid>
		<description><![CDATA[
I am SO going there.
With my factory sealed copy in hand, of course.
This vacation just got so much more awesome.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mathpirate.net/log/wp-content/uploads/2010/03/AlamogordoLandfill.jpg"><img class="alignnone size-medium wp-image-1311" title="AlamogordoLandfill" src="http://www.mathpirate.net/log/wp-content/uploads/2010/03/AlamogordoLandfill-215x300.jpg" alt="" width="215" height="300" /></a></p>
<p>I am SO going there.</p>
<p>With my factory sealed copy in hand, of course.</p>
<p>This vacation just got so much more awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mathpirate.net/log/2010/03/08/new-vacation-destination/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
