<?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>Aztekera</title>
	<atom:link href="http://blog.aztekera.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.aztekera.com</link>
	<description>Computers have problems.</description>
	<lastBuildDate>Tue, 07 Sep 2010 19:16:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Reading a USB Stamps.com scale</title>
		<link>http://blog.aztekera.com/archives/54</link>
		<comments>http://blog.aztekera.com/archives/54#comments</comments>
		<pubDate>Sat, 16 Jan 2010 01:18:05 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linuxy]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Standards]]></category>

		<guid isPermaLink="false">http://blog.aztekera.com/?p=54</guid>
		<description><![CDATA[I got suckered into one of those hard-to-cancel Stamps.com trials.  The upside is that they give you a $10 USB 5 lb. scale to use with their software.  The downside is that they want you to only use it with their software, and the company that makes the scale has since taken down [...]]]></description>
			<content:encoded><![CDATA[<p>I got suckered into one of those hard-to-cancel Stamps.com trials.  The upside is that they give you a $10 USB 5 lb. scale to use with their software.  The downside is that they want you to only use it with their software, and the company that makes the scale has since taken down their free USB-scale program.</p>
<p>The good news, as <a href="http://nicholas.piasecki.name/blog/2008/11/reading-a-stamps-com-usb-scale-from-c-sharp/">Nicholas Piasecki</a> and <a href="http://www.linuxquestions.org/questions/linux-hardware-18/installing-a-usb-scale-503125/">some Linux users</a> figured out, is that the USB scale conforms to the USB HID specifications, which helpfully standardize how USB scales should work (no joke).</p>
<p>So, I hacked together a Perl script (what else?) to read from this scale by accessing the <code>hidraw#</code> interface that Linux provides.  In my case, I have <code>hidraw4</code> hard-coded into the script itself.  Basically, it loops until it reads a good value from the scale, at which point it prints out the weight and exits.</p>
<p><b>Edit:</b> This code is now a <a href="http://gist.github.com/503896">Gist on GitHub</a>.</p>
<p><span id="more-54"></span></p>
<pre class="brush: perl; highlight: [14];">#!/usr/bin/perl

# I hereby release this script into the public domain.

use bytes;

my $data;

#prevents us from repeating messages
my $waitingflag = 0;

while (1) {

    $data = `cat /dev/hidraw4 | head -c 7`;

    my $report = ord(substr($data, 1, 1));
    my $status = ord(substr($data, 2, 1));
    my $unit   = ord(substr($data, 3, 1));
    my $exp    = ord(substr($data, 4, 1));
    my $lsb    = ord(substr($data, 5, 1));
    my $msb    = ord(substr($data, 6, 1));
    my $weight = ($msb * 255 + $lsb) / 10;
    if($exp != 255 &amp;&amp; $exp != 0) {
        $weight ^= $exp;
    }
    #print &quot;$report $status $unit $exp $weight\n&quot;;

    if($report != 0x03) {
      die &quot;Error reading scale data!\n&quot;;
    }

    if($status == 0x01) {
      die &quot;Scale reports FAULT!\n&quot;;
    } elsif ($status == 0x02 || $weight == 0) {
        if($waitingflag != 0x02) {
            print &quot;Zero'd...\n&quot;;
            $waitingflag = 0x02;
        }
    } elsif ($status == 0x03) {
        if($waitingflag != 0x03) {
            print &quot;Weighing...\n&quot;;
            $waitingflag = 0x03;
        }
    } elsif ($status == 0x04) {
        my $unitName = &quot;units&quot;;
        if($unit == 11) {
            $unitName = &quot;ounces&quot;;
        } elsif ($unit == 12) {
            $unitName = &quot;pounds&quot;;
        }
        print &quot;$weight $unitName\n&quot;;
        last;
    } elsif ($status == 0x05) {
        if($waitingflag != 0x05) {
            print &quot;Scale reports Under Zero...\n&quot;;
            $waitingflag = 0x05;
        }
    } elsif ($status == 0x06) {
        if($waitingflag != 0x06) {
            print &quot;Scale reports Over Weight!\n&quot;;
            $waitingflag = 0x06;
        }
    } elsif ($status == 0x07) {
        if($waitingflag != 0x07) {
            print &quot;Scale reports Calibration Needed!\n&quot;;
            $waitingflag = 0x07;
        }
    } elsif ($status == 0x08) {
        if($waitingflag != 0x08) {
            print &quot;Scale reports Re-zeroing Needed!\n&quot;;
            $waitingflag = 0x08;
        }
    } else {
        die &quot;Unknown status code: $status\n&quot;;
    }

}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.aztekera.com/archives/54/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>&#8220;EISA Configuration&#8221; partition won&#8217;t go away</title>
		<link>http://blog.aztekera.com/archives/52</link>
		<comments>http://blog.aztekera.com/archives/52#comments</comments>
		<pubDate>Tue, 21 Apr 2009 04:41:45 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.aztekera.com/?p=52</guid>
		<description><![CDATA[The symptom is typical: you check out the partitions on your hard drive in Windows Disk Manager only to find out that there&#8217;s a weird, inaccessible partition that&#8217;s of the type &#8220;EISA Configuration.&#8221;  What is it?  Can I get rid of it?
What is it?
It has become standard practice for manufacturers to include recovery [...]]]></description>
			<content:encoded><![CDATA[<p>The symptom is typical: you check out the partitions on your hard drive in Windows Disk Manager only to find out that there&#8217;s a weird, inaccessible partition that&#8217;s of the type &#8220;EISA Configuration.&#8221;  What is it?  Can I get rid of it?</p>
<p><strong>What is it?</strong></p>
<p>It has become standard practice for manufacturers to include recovery data or utilities on the hard drive to save them the costs of creating separate recovery disks for your computer.  The benefit is that you can always restore your computer without worrying about losing your restory disks, but the downside is that it&#8217;s taking space on your hard drive, and if your hard drive died, you don&#8217;t have any restore disks at all.</p>
<p>The &#8220;EISA Configuration&#8221; partition is not really an EISA Configuration partition.  <a href="http://en.wikipedia.org/wiki/Extended_Industry_Standard_Architecture">EISA is an obsolote IBM bus architecture.</a>  What&#8217;s really going on is that this partition is a regular FAT32 or NTFS partition, except that its identifier in the partition has been changed to 0xDE, which codes for &#8220;EISA Configuration.&#8221;  This way, Windows doesn&#8217;t try to mount it so you won&#8217;t accidentally mess with the files there.</p>
<p><strong>How do I get rid of it?</strong></p>
<p>Just delete it.  You may be able to delete this partition and then expand your regular Windows partition to fill the gap using Windows Disk Management MMC snap-in.  Just right-click on &#8220;My Computer&#8221; and select &#8220;Manage&#8230;&#8221; and find &#8220;Disk Management.&#8221;</p>
<p>Personally, I recommend using an <a href="http://www.ubuntu.com/getubuntu/download">Ubuntu live CD</a>.  With it, you can boot into Ubuntu, run GParted (a partition editor), delete the EISA Configuration partition and expand the Windows partition to fill in the remaining space.  Just be careful with your data.  Make a backup.</p>
<p><strong>It won&#8217;t go away!</strong></p>
<p>You may experience an issue where, after deleting your &#8220;EISA Configuration&#8221; partition, you boot your computer only to find out that another partition has magically turned into an &#8220;EISA Configuration&#8221; partition.  What happened here was that the manufacturer (Acer has been known to do this) put a small program in the Master Boot Record (MBR), the first 512 bytes of your hard drive.  Every time you boot that hard drive, their program runs and blindly changes the first (usually it&#8217;s the first one) partition on the hard drive to 0xDE, which codes for &#8220;EISA Configuration.&#8221;  Bad.</p>
<p>What you need to do is write in a new MBR to get rid of this program.  Be careful, because the MBR stores the partition table, without which your computer won&#8217;t know what partitions exist on your hard drive.  There are several tools that can do this; I won&#8217;t go into detail on each one.</p>
<ul>
<li>fixmbr.exe&mdash;on the XP or Vista Recovery Console</li>
<li><a href="http://www.sysint.no/nedlasting/mbrfix.htm">MbrFix.exe</a>&mdash;for Windows</li>
<li><a href="http://ms-sys.sourceforge.net/">ms-sys</a>&mdash;for Linux.  <a href="http://www.arsgeek.com/2008/01/15/how-to-fix-your-windows-mbr-with-an-ubuntu-livecd/">This guide to ms-sys</a> might be helpful.</li>
</ul>
<p><strong>Now my computer won&#8217;t boot!</strong></p>
<p>If Windows displays an error message saying that &#8220;hal.dll&#8221; could not be found (Windows XP) or that &#8220;rundll32.exe&#8221; could not be found, then what likely has happened is that your partition numbers have changed and Windows can&#8217;t find itself anymore.  On XP, if you know what you&#8217;re doing, you can <a href="http://support.microsoft.com/kb/289022">edit the &#8220;boot.ini&#8221; file</a> to point to the new partition number.  On Vista, you&#8217;re best off just running the automated recovery on the <a href="http://neosmart.net/blog/2008/windows-vista-recovery-disc-download/">Vista Recovery Console disc</a> until it&#8217;s fixed.  It might take several tries.</p>
<p><strong>My drive C: and D: got switched!</strong></p>
<p>It&#8217;s a regrettable problem when Windows, which originally was on the C: drive, suddenly gets switched to the D: drive.  You&#8217;ll find that a lot of things don&#8217;t work like this, but unfortunately, you can&#8217;t go into Disk Management and change the drive letters because you&#8217;re currently running Windows off that drive letter.  Microsoft has a <a href="http://support.microsoft.com/kb/223188">KB article detailing the procedure to switch them back</a>, but the process is simple.</p>
<p>Fire up regedit.exe and navigate to HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices, and rename the \DosDevices\C: and \DosDevices\D: keys around.  Or, you can delete all the keys in MountedDevices and Windows will automatically enumerate the partitions and reassign drive letters.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aztekera.com/archives/52/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Summer of Code 2009: WordPress proposal</title>
		<link>http://blog.aztekera.com/archives/51</link>
		<comments>http://blog.aztekera.com/archives/51#comments</comments>
		<pubDate>Thu, 02 Apr 2009 19:33:43 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Internets]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.aztekera.com/?p=51</guid>
		<description><![CDATA[Objective: Create a single-file PHP installer for WordPress that will automate the downloading, unpacking, and setup of a WordPress blog.
Reason: As of right now, setting up a WordPress blog involves a lot of fiddling with files.  The user must download the archive, unzip it on their computer, open a ftp connection to their server, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Objective:</strong> Create a single-file PHP installer for WordPress that will automate the downloading, unpacking, and setup of a WordPress blog.</p>
<p><strong>Reason:</strong> As of right now, setting up a WordPress blog involves a lot of fiddling with files.  The user must download the archive, unzip it on their computer, open a ftp connection to their server, upload all of the contents, hope that all the permissions are right, and navigate to the right directory.  Since WordPress is such a popular blogging software, many people (most of whom are not familiar with a Unix shell or do not have access to one) would benefit from a single-file installer.</p>
<p><strong>Deliverable:</strong> One (1) PHP file.  No other files can be included with this (unless embedded), since this would void much of the advantage of such a single-file installer.</p>
<p><strong>Basic procedure (a rough plan):</strong></p>
<ol>
<li>Instruct the user on the requirements of WordPress (needs hosting with PHP, etc.).</li>
<li>Instruct the user on downloading and uploading this installer, and subsequently running it.</li>
<li>Check the server environment for required components, correct permissions, etc.</li>
<li>Give the user some options on name, location, etc. and solicit other options like database credentials.</li>
<li>Download the latest WordPress distribution.</li>
<li>Unpack the distribution to the right place.</li>
<li>Proceed more-or-less with the &#8220;usual&#8221; install.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.aztekera.com/archives/51/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quickly search Java documentation in Firefox</title>
		<link>http://blog.aztekera.com/archives/50</link>
		<comments>http://blog.aztekera.com/archives/50#comments</comments>
		<pubDate>Wed, 04 Mar 2009 02:24:43 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.aztekera.com/?p=50</guid>
		<description><![CDATA[Firefox Quick Searches have become an ingrained habit for me after a lot of repeat searching.  Recently I&#8217;ve been working on a Java project and I&#8217;ve found myself needing to look up classes in the Java online documentation quite often.  To that end, I&#8217;ve set up a quick-search bookmark that will take me [...]]]></description>
			<content:encoded><![CDATA[<p>Firefox Quick Searches have become an ingrained habit for me after a lot of repeat searching.  Recently I&#8217;ve been working on a Java project and I&#8217;ve found myself needing to look up classes in the Java online documentation quite often.  To that end, I&#8217;ve set up a quick-search bookmark that will take me to the relevant documentation page by typing <q>java [keyword]</q> in the address bar.  It uses Google&#8217;s I&#8217;m Feeling Lucky search:<br />
<img src='http://files.aztekera.com/images/javaquicksearch.png' alt='The Javadoc quick search bookmark' class='alignnone' /><br />
Just add a bookmark with the string &#8220;<code>http://www.google.com/search?btnI=I%27m+Feeling+Lucky&#038;ie=UTF-8&#038;oe=UTF-8&#038;q=Java%206%20%s</code>&#8220;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aztekera.com/archives/50/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t buy from Musicnotes.com</title>
		<link>http://blog.aztekera.com/archives/49</link>
		<comments>http://blog.aztekera.com/archives/49#comments</comments>
		<pubDate>Sat, 10 Jan 2009 18:08:58 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Internets]]></category>

		<guid isPermaLink="false">http://blog.aztekera.com/?p=49</guid>
		<description><![CDATA[Let me list all the reasons why you might want to buy digital sheet music from Musicnotes.com:

It&#8217;s faster than having it shipped from Pepper&#8217;s.

and that&#8217;s pretty much it.
On the other hand, here&#8217;s some reasons to avoid Musicnotes.com:

You are forced to use their software
Musicnotes.com&#8217;s scores don&#8217;t come in any ordinary file.  You must use either [...]]]></description>
			<content:encoded><![CDATA[<p>Let me list all the reasons why you might want to buy digital sheet music from Musicnotes.com:</p>
<ul>
<li>It&#8217;s faster than having it shipped from Pepper&#8217;s.</li>
</ul>
<p>and that&#8217;s pretty much it.</p>
<p>On the other hand, here&#8217;s some reasons to avoid Musicnotes.com:<br />
<span id="more-49"></span></p>
<h2>You are forced to use their software</h2>
<p>Musicnotes.com&#8217;s scores don&#8217;t come in any ordinary file.  You must use either their Musicnotes Viewer or the Sibelius Scorch plug-in, depending on the score.  This means that you&#8217;re stuck with whatever operating system and browser they support; if you happen to be using different software, then you&#8217;re out of luck.</p>
<h2>A Ridiculous DRM System</h2>
<p>Of course, they have you use their software for a reason: DRM.  For the technologically-insulated people I envy, DRM stands for Digital Rights Management.  They dictate how you can use the music.  For Musicnotes.com, you are <strong>forced to print your only copy as soon as you download the music</strong>.  If your printer broke or ran out of ink or computer died, then you&#8217;ve just thrown your money down the drain.  The only recourse is to repurchase the score.  Yes, if it didn&#8217;t print right the first time, you&#8217;re screwed.</p>
<p>This brings me to my next point: <strong>you can only print out one copy.</strong>  You <em>might</em> think that the benefit of having a digital copy of your sheet music would be that you can print out as many copies as you want, but that&#8217;s not true with Musicnotes.com.  Obviously, the people running Musicnotes.com must be brain-dead if they didn&#8217;t realize that you could simply pop those print-outs into a copy machine.</p>
<h2>Score quality</h2>
<p>Of course, any scores you print out on your cheap inkjet printer or get from the copy machine won&#8217;t be the best quality, but that&#8217;s OK because <strong>Musicnotes.com&#8217;s scores are ugly to begin with.</strong>  How about an analogy?  Imagine a finely-printed, sturdily-bound book of classic literature.  Now imagine the same contents, except typed in Microsoft Word by a rank amateur.  That&#8217;s exactly the way it is with the traditional engraved scores that you might find at Pepper&#8217;s versus a digital Musicnotes.com score.</p>
<p>You might think that the advent of computers would have increased the quality of musical scores, but the exact opposite is true, not only for music but also for general typography.  When computers became popular, more and more people could use the new graphical word processors and type their own documents.  Of course, most people don&#8217;t know the first thing about typography: How wide should a page be? What to choose for leading?  What&#8217;s the difference between a font and a typeface?  Times New Roman&#8230; isn&#8217;t that what everybody uses?</p>
<p>The truth is, both musical scores and books used to be done by hand by trained professionals.  In the same way a printer would set a block of type to print books, an <em>engraver</em> would engrave a metal score to be printed.  Nowadays, in the rush to computerize everything, quality has been thrown out the window.</p>
<p><strong>Compare <q>Rhapsody in Blue</q> (a complex score) from Musicnotes.com:</strong><br />
<img src='http://files.aztekera.com/images/musicnotes_rhapsody.png' alt='Musicnotes.com\&#039;s Rhapsody in Blue' class='alignnone' /></p>
<p><strong>and from a <em>real</em> score:</strong><br />
<img src='http://files.aztekera.com/images/scanned_rhapsody.png' alt='Scanned Rhapsody in Blue' class='alignnone' /></p>
<p>If there ever was a way to suck the soul out of Rhapsody in Blue before a single note is played, Musicnotes.com has found it.  The ghastly mechanical engraving leaves excessive white space everywhere, and the stems and staff lines are razor thin.  Oh, actually having their software play this digital score is a supreme letdown, since the software doesn&#8217;t do trills, grace notes, or anything besides the most simple notation.</p>
<h2>Conclusion</h2>
<p>Call me picky for my attention to score quality if you like, but if their harsh DRM system hasn&#8217;t scared you away, I don&#8217;t know what will.  C&#8217;mon, a single print per purchase?  Musicnotes.com expressly states that their online store is like a real store: when you walk into your nearest music store and purchase sheet music, you get one copy and if you pour coffee over your one copy, then you&#8217;re out of luck.  What they don&#8217;t say, is that if you actually go to a real store, you will not only get to look at all the music before you purchase, but you will actually get a nicely-bound, quality copy that was professionally (or at least acceptably) printed on something other than an inkjet printer.</p>
<p>If you&#8217;re looking for sheet music on your computer, I recommend <a href="http://www.imslp.org/">IMSLP</a>.  IMSLP is a massive collection of public-domain sheet music that&#8217;s absolutely free to download, not to mention that they&#8217;re a good, non-profit cause.</p>
<p>If the convenience of the digital age coupled with a wide selection is what you were after, then maybe you should look around the Internet.  <a href="http://www.mutopiaproject.org/">Who</a> <a href="http://www.imslp.org/">knows</a> <a href="http://my-piano.blogspot.com/">what</a> <a href="http://icking-music-archive.org/ByComposer.php">you</a> <a href="http://ichigos.com/">might</a> <a href="http://www.4shared.com/network/search.jsp?sortType=1&#038;sortOrder=1&#038;sortmode=2&#038;searchName=chopin+valse&#038;searchmode=3&#038;searchName=chopin+valse&#038;searchDescription=&#038;searchExtention=pdf&#038;sizeCriteria=atleast&#038;sizevalue=10&#038;start=0">find</a>?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aztekera.com/archives/49/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to scan like a pro</title>
		<link>http://blog.aztekera.com/archives/48</link>
		<comments>http://blog.aztekera.com/archives/48#comments</comments>
		<pubDate>Sun, 09 Nov 2008 22:04:32 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://blog.aztekera.com/?p=48</guid>
		<description><![CDATA[Scanners have been around for a long time, and today&#8217;s scanners are cheap, are fast, and produce high-quality output.  Still, people haven&#8217;t figured how to make good scans&#8212;just take a look at scanned scores, manga, etc.&#8212;from their scanners.
This means the difference between:

and

Guide follows:

Get a good scanner
Get a scanner that produces good output, comes with [...]]]></description>
			<content:encoded><![CDATA[<p>Scanners have been around for a long time, and today&#8217;s scanners are cheap, are fast, and produce high-quality output.  Still, people haven&#8217;t figured how to make good scans&#8212;just take a look at scanned scores, manga, etc.&#8212;from their scanners.</p>
<p>This means the difference between:<br />
<img src="http://files.aztekera.com/images/proscan/bad_scan_example.png" alt="Poorly scanned image (62.4 KiB)" /><br />
and<br />
<img src="http://files.aztekera.com/images/proscan/good_scan_example.png" alt="Quality scan (30.3 KiB)" /></p>
<p>Guide follows:</p>
<p><span id="more-48"></span></p>
<h4>Get a good scanner</h4>
<p>Get a scanner that produces good output, comes with good software, and scans relatively fast.  You don&#8217;t want to wait around forever when you&#8217;re scanning many pages.  Even better, get one with a relatively large scanning bed.  Many formats are larger than letter paper, and you don&#8217;t want to cut off part of the image or have to stitch images together.</p>
<h4>Use good scan settings</h4>
<ol>
<li>In your scanner software, set it to scan at a high-resolution (At least 300 ppi is the best for documents with detail.  200 ppi might suffice for simpler documents).</li>
<li>For document type, choose either color or grayscale.  <strong>DO NOT choose black &#038; white.</strong>  Black &#038; white will turn your document into pepper!  You might have to experiment a little with this: For one scanner I had, scanning in color and then converting to grayscale was better than scanning in grayscale to begin with.</li>
<li>Choose a lossless file format.  If your software supports it, <strong>choose PNG</strong>.  Otherwise, choose TIFF or BMP.  <strong>Avoid JPG</strong> when dealing with documents: scanning software tend to produce poor-quality JPEGs, and it&#8217;s easy to accidentally save a <strong>grayscale</strong> JPG as a <strong>color</strong> JPG.  Not using JPG will avoid those oh-so-attractive blocky-blurry fuzzies around everything.</li>
<li>Don&#8217;t use auto-crop.  Manually set the scan size to the actual size of the paper before you scan.  This will help produce consistently-sized images.</li>
</ol>
<h4>When scanning</h4>
<ol>
<li>Make sure you know where the coordinate origin is.  One corner of the flatbed will have an arrow indicating the upper-left boundary.  Place the paper so that it perfectly fits into that corner.  When scanning thick books, make sure you pay close attention to where the scanned page is, since the cover will move around.</li>
<li>Scanner lids are detachable.  If you&#8217;re scanning a thick book, detach the lid.</li>
<li>Hold down the book!  Either put the lid on the book and press down on the lid, or just press down on the book with your hand.  This helps with printing near the spine and for pages that are bent or creased.  Keeping the entire page consistent is always better than having a large ugly gradient on one side.</li>
</ol>
<h4>Processing the files</h4>
<ol>
<li>Keep all your source images!  If you mess something up in post-processing, it is more convenient to simply start again with your source file, rather than re-scanning the page.</li>
<li>Use consistent naming!  Name your pages something like page01.png, page02.png, page03.png, etc.  This will save much time.</li>
<li>Convert all of your images to grayscale PNGs if they are not so already.  Smart people can run <code>mogrify -format PNG -type Grayscale page*.png</code> if the pages are named page01.png, page02.png, etc.</li>
<li>Rotate the image if needed.</li>
<li>Adjust your levels.  You want to make the background solid white, not gray, and the black text and lines to be perfectly black, without destroying the image.  Set your levels by using this guide:<br />
<img src="http://files.aztekera.com/images/proscan/histogram.png" alt="Histogram guide for setting levels" /><br />
The histogram represents how much of each color is in the image.  Move the black slider to the peak (or slightly more to the right) that represents the majority of the black.  Move the white past the large peak that represents the background white, so that almost all of it is cut off.</li>
<li>If you are using Adobe Photoshop, you can <strong>save</strong> the level adjustment by using the &#8220;Save&#8221; button in the Levels dialog.  If you are using GIMP, your last used levels adjustment is saved and dated in the drop-down menu labeled &#8220;Presets.&#8221;  Since you&#8217;re (hopefully) producing consistent scans, this will consistently and easily adjust the levels every time.
<p>GIMP Levels dialog:<br />
<img src="http://files.aztekera.com/images/proscan/gimp_levels.png" alt="GIMP levels dialog" /></p>
</li>
<li>Even better, if you&#8217;re using Adobe Photoshop, you can <strong>automate</strong> these actions.  Open an unprocessed image.  In the Actions window, make a new action.  Photoshop will begin recording your actions.  Do all your processing normally, and then hit the stop button in the Actions window.  Now, close that file and open up all of your unprocessed files.  Go to File&rarr;Automate&rarr;Batch&#8230;, choose your action, set it to run on your Opened Images, and let it get to work.  Make sure it&#8217;s saving the files in the right place.</li>
</ol>
<h4>Compiling the Images</h4>
<ol>
<li>If you&#8217;re smart, you&#8217;ll already have ImageMagick (try running &#8220;convert &#8211;version&#8221; to check).  This suite of command-line tools (including the aforementioned &#8220;mogrify&#8221;) makes image processing easy.  If not, you should <a href="http://www.imagemagick.org/script/binary-releases.php">download and install ImageMagick</a>.  Teaching you how to use your computer is beyond the scope of this article.</li>
<li>This is the ideal scenario:  You have a book scanned and processed as a series of 8-bit grayscale PNGs named book00.png, book01.png, book02.png, and so on.  To create a nice PDF of this, simply run &#8220;convert book*.png book.pdf&#8221;.  You are now a winner.  (Note: older versions of ImageMagick produce broken PDFs.  If you are unable to open your PDF in Adobe Reader, upgrade ImageMagick.)</li>
<li>I haven&#8217;t tried this, but it is theoretically possible to install the <a href="http://sourceforge.net/projects/pdfcreator/">PDFCreator</a> printer driver and then use Windows Picture and Fax Viewer to print out all the images (at once) as a &#8220;Full page fax print&#8221; to PDFCreator.  However, this will introduce extra margins and ignore your actual image size.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.aztekera.com/archives/48/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GParted stuck on &#8220;Scanning all devices&#8221;</title>
		<link>http://blog.aztekera.com/archives/47</link>
		<comments>http://blog.aztekera.com/archives/47#comments</comments>
		<pubDate>Sat, 23 Aug 2008 20:09:48 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Linuxy]]></category>

		<guid isPermaLink="false">http://blog.aztekera.com/?p=47</guid>
		<description><![CDATA[Ubuntu&#8217;s partition editor, GParted, usually scans all the hard drives when it starts.  However, in some cases, it will get stuck on this &#8220;Scanning all devices&#8221; step indefinitely.  By knowing what hard drive you want to edit, you can launch GParted specifically for that hard drive.  Either go into run or a [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntu&#8217;s partition editor, GParted, usually scans all the hard drives when it starts.  However, in some cases, it will get stuck on this &#8220;Scanning all devices&#8221; step indefinitely.  By knowing what hard drive you want to edit, you can launch GParted specifically for that hard drive.  Either go into run or a terminal, and run &#8220;gparted /dev/sda&#8221;, where &#8220;sda&#8221;, &#8220;sdb&#8221;, &#8220;sdc&#8221;, etc., is the identifier of your hard drive, and GParted will launch and immediately open that particular disk.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aztekera.com/archives/47/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux support for Genius WizardPen, Mousepen, UGEE, UC-Logic, DigiPro tablets</title>
		<link>http://blog.aztekera.com/archives/45</link>
		<comments>http://blog.aztekera.com/archives/45#comments</comments>
		<pubDate>Wed, 25 Jun 2008 19:00:19 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linuxy]]></category>

		<guid isPermaLink="false">http://blog.aztekera.com/archives/45</guid>
		<description><![CDATA[I noticed that today&#8217;s Woot was a DigiPro UC-Logic drawing tablet.  I happen to own a UC-Logic tablet: a &#8220;WP4158U 快速龙&#8221; made by Taiwanese company UGEE.  UC-Logic makes tablet technology for many different companies, and their USB interface is relatively standard and straightforward. (I naively tried reverse-engineering the USB communication for my tablet a couple [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed that today&#8217;s Woot was a DigiPro UC-Logic drawing tablet.  I happen to own a UC-Logic tablet: a &#8220;WP4158U 快速龙&#8221; made by Taiwanese company UGEE.  UC-Logic makes tablet technology for many different companies, and their USB interface is relatively standard and straightforward. (I naively tried reverse-engineering the USB communication for my tablet a couple years ago, and then didn&#8217;t know what to do with the results.)  All of the UC-Logic tablets, as well as Genius Wizardpens and even Aiptek tablets can be used in Linux with the &#8220;wizardpen&#8221; driver.</p>
<p>The basic instructions for setting up the wizardpen driver in Ubuntu can be found on <a target="_blank" href="https://help.ubuntu.com/community/TabletSetupWizardpen">the Ubuntu wiki</a>. If you use Ubuntu, use the instructions on there to install the driver; otherwise, do what your distribution needs.  However, the instructions on there for configuring udev and X.org are a bit overcomplicated and unnecessary.  You don&#8217;t need to create udev rules.  Instead, in your xorg.conf, add something like</p>
<pre><code>Section "InputDevice"
Identifier      "MyGenericTablet"
Option          "SendCoreEvents"        "true"
Driver          "wizardpen"
Option          "Name"        "Tablet WP5540U"
Option          "TopX"          "2199"    #Replace these numbers with
Option          "TopY"          "3598"    #numbers correct for your
Option          "BottomX"       "30325"   #own unique tablet by using
Option          "BottomY"       "29278"   #wizardpen-calibrate
Option          "MaxX"          "30325"
Option          "MaxY"          "29278"
EndSection </code></pre>
<p>Where the &#8220;Name&#8221; option is the name of your tablet.  You can find out the proper name of your tablet by running</p>
<p>$ cat /sys/bus/usb/devices/*/product</p>
<p>and looking for the line that would be your tablet.  Mine was simply called &#8220;TABLET DEVICE&#8221;, so that&#8217;s what I put in my config.  That way, X will now to use the wizardpen driver for the device that has that name, saving you the trouble of creating udev rules.</p>
<p>Next, don&#8217;t forget to add</p>
<pre>InputDevice "MyGenericTablet" "AlwaysCore"</pre>
<p>to your ServerLayout section.  Forgetting this little step will leave the configuration incomplete, and your tablet broken. After you restart X, start the GIMP, Inkscape, Krita, or whatever paint program you use.  Go into the configuration, into Extended Input Devices, and you should see a new entry that bears the name &#8220;MyGenericTablet&#8221; or whatever you called it.  You should be able to draw with pressure sensitivity with your fully-functional tablet.  However, one problem that might occur is that you get two separate cursors—your paint cursor and a regular mouse cursor—whose positions are not matched.  This is because your tablet is being reported twice: once in /dev/input/mice, and once with the tablet driver.</p>
<p>To fix this, you need to replace &#8220;/dev/input/mice&#8221; with &#8220;/dev/input/mouse#&#8221; where &#8220;mouse#&#8221; is the entry for your mouse.  The way I found out which one was the right one was by running &#8220;$ sudo cat /dev/mouse1&#8243;, moving my mouse, and seeing if any gibberish appeared on the screen.  I did the same for mouse2, etc. until I found the right one.  However, if you do this, be aware that you may need to change this entry when you change to a new mouse, because X.org is not longer set up to use aggregated mouses.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aztekera.com/archives/45/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Autodesk licensing issues?</title>
		<link>http://blog.aztekera.com/archives/46</link>
		<comments>http://blog.aztekera.com/archives/46#comments</comments>
		<pubDate>Tue, 17 Jun 2008 03:20:22 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.aztekera.com/archives/46</guid>
		<description><![CDATA[Are you having problems with your 3ds Max or other Autodesk license?  Need to change your serial number to a new one?  Does the program keep giving you a license error when you try to activate?
To reset your serial number so that the program asks you for a new one, start up regedit.  Look in [...]]]></description>
			<content:encoded><![CDATA[<p>Are you having problems with your 3ds Max or other Autodesk license?  Need to change your serial number to a new one?  Does the program keep giving you a license error when you try to activate?<br />
To reset your serial number so that the program asks you for a new one, start up regedit.  Look in HKLM\SOFWARE\Autodesk\[program name]\[version number] and you&#8217;ll see two keys, an &#8220;h_register&#8221; and l_register.&#8221;  If you delete both and restart your program, it will ask you for a new serial number.<br />
If it still fails, look in C:\Documents and Settings\All Users\Application Data\Autodesk\Software Licenses, and the *.dat file inside is your license file.  If you delete it or rename it to something safe (I would just add an underscore to the end), the program will restart the registration process without any erroneous information.  You might have to try this a couple times.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aztekera.com/archives/46/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Working Wi-Fi on Macbooks with Ubuntu Linux</title>
		<link>http://blog.aztekera.com/archives/44</link>
		<comments>http://blog.aztekera.com/archives/44#comments</comments>
		<pubDate>Mon, 26 May 2008 02:27:02 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linuxy]]></category>

		<guid isPermaLink="false">http://blog.aztekera.com/archives/44</guid>
		<description><![CDATA[To use a MacBook&#8217;s Atheros wireless chipset on Linux, you need to use Ndiswrapper with the provided Boot Camp drivers.

Get the wi-fi driver at makel.org. The one you&#8217;re looking for is drivers/Atheros/AtherosXPInstaller.exe.
Install ndiswrapper from apt.
Install unrar from apt.
Extract the drivers with &#8220;$ unrar x AtherosXPInstaller.exe&#8220;
Install the drivers with &#8220;$ ndiswrapper -i net5416.inf&#8220;
$ sudo modprobe ndiswrapper
$ [...]]]></description>
			<content:encoded><![CDATA[<p>To use a MacBook&#8217;s Atheros wireless chipset on Linux, you need to use Ndiswrapper with the provided Boot Camp drivers.</p>
<ol>
<li>Get the wi-fi driver at <a href="http://makel.org/articles/the_final_boot/">makel.org</a>. The one you&#8217;re looking for is drivers/Atheros/AtherosXPInstaller.exe.</li>
<li>Install ndiswrapper from apt.</li>
<li>Install unrar from apt.</li>
<li>Extract the drivers with &#8220;<strong>$ unrar x AtherosXPInstaller.exe</strong>&#8220;</li>
<li>Install the drivers with &#8220;<strong>$ ndiswrapper -i net5416.inf</strong>&#8220;</li>
<li><strong>$ sudo modprobe ndiswrapper</strong></li>
<li><strong>$ sudo echo >> /etc/modules &#8220;ndiswrapper&#8221;</strong></li>
<li>Delete the temporary files</li>
<li>The wireless should start working immediately.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.aztekera.com/archives/44/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
