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.
The good news, as Nicholas Piasecki and some Linux users figured out, is that the USB scale conforms to the USB HID specifications, which helpfully standardize how USB scales should work (no joke).
So, I hacked together a Perl script (what else?) to read from this scale by accessing the hidraw# interface that Linux provides. In my case, I have hidraw4 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.
Edit: This code is now a Gist on GitHub.
(more…)
“I” is a subject pronoun. “Me” is an object pronoun. ‘K?
So…
I hit the car.
The car hit me.
Right? “I” goes before a verb, and “me” goes after a verb.
But… if somebody asks who ate the cake, you would be tempted to say, “It was me.” Nope. Wrong. Fail.
As any grammar nazi would tell you, that sentence is more properly rendered, “It was I. I stole the cake.” Duh. How could you not know that pronouns after a “to be” verb have to be in the subject form?
“Who stole the 2000 presidential election?”
“It was him he!”
Don’t you love English?
CAD file formats are a mess.
I’m trying to get a part made in Autodesk Inventor into Mastercam.
IGES is borked. Half the surfaces don’t come in.
SAT has a version mismatch or something, and it refuses to import.
I don’t have a license for STEP import, apparently, and STL (even if it isn’t NURBS) is messed up like IGES.
This is obviously an attempt by Autodesk to dominate the world.
… and I noticed something odd – Opera, Firefox, and Internet Explorer all handle DOM Style colors differently when a script gets the color as a string. Let’s say you make something’s color red.
- Internet Explorer will keep the format you wrote it – if you put #FF0000, it will give “#FF0000″. If you put rgb(255, 0, 0), it will give “rgb(255, 0, 0)”.
- Firefox will turn everything into the rgb(###, ###, ###), turning “#FF0000″ into “rgb(255, 0, 0)”.
- And to complicate everything, Opera converts all the colors into #hex notation, making rgb(255, 0, 0), become “#FF0000″.
Bothersome, ain’t it?