2009 Jul 16, 3:28"I was up a ladder painting when I got the call from a lady with an American accent from Apple saying she was the head of legal affairs and that they wanted to acknowledge the work that I had
done"
humor history music apple legal patent ipod ip 2009 Jul 14, 4:28"Can you please let the staff use an alternative web browser called Firefox? I just – (applause) – I just moved to the State Department from the National Geospatial Intelligence Agency and was
surprised that State doesn’t use this browser." Starts at 26:30 in the video.
firefox government via:boingboing video browser web clinton technical 2009 Jun 29, 4:19
I've looked at my web server logs previously to see if anyone had used my Web Frotz Interpreter and until recently didn't realize that awstats (the web server log report generator) was truncating the query from my URL, so I couldn't tell that anyone was actually using
it. But after grepping the logs manually I've pulled out the URLs of visitor's text adventure sessions. If you'll recall, my Web Frotz Interpreter stores the game state in the
URL so its easy to see user's game states in the web server logs.
I've put some of the links up on the Web Frotz Interpreter page. Some of the interesting ones:
server-logs technical zork frotz pants interactive-fiction uri if 2009 Jun 29, 1:20"The Music of Erich Zann is a short film based on the story by H.P. Lovecraft. Though conditions inside the abandoned Savoy Hotel made this a very challenging project (Sub-freezing temperatures;
cramped quarters; enough dust to suffocate Cthulhu himself), I was thrilled with the opportunity to work in such a haunting location, with such a talented and dedicated group of filmmakers."
chris-shelton hp-lovecraft video movie 2009 Jun 27, 3:42
I've hooked up the printer/scanner to the Media Center PC since I leave that on all the time anyway so we can have a networked printer. I wanted to hook up the scanner in a somewhat similar fashion
but I didn't want to install HP's software (other than the drivers of course). So I've written my own script for scanning in PowerShell that does the following:
- Scans using the Windows Image Acquisition APIs via COM
- Runs OCR on the image using Microsoft Office Document Imaging via COM (which may already be on your PC if you have Office installed)
- Converts the image to JPEG using .NET Image APIs
- Stores the OCR text into the EXIF comment field using
.NET Image APIs (which means Windows Search can index the image by the text in the image)
- Moves the image to the public share
Here's the actual code from my scan.ps1 file:
param([Switch] $ShowProgress, [switch] $OpenCompletedResult)
$filePathTemplate = "C:\users\public\pictures\scanned\scan {0} {1}.{2}";
$time = get-date -uformat "%Y-%m-%d";
[void]([reflection.assembly]::loadfile( "C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll"))
$deviceManager = new-object -ComObject WIA.DeviceManager
$device = $deviceManager.DeviceInfos.Item(1).Connect();
foreach ($item in $device.Items) {
$fileIdx = 0;
while (test-path ($filePathTemplate -f $time,$fileIdx,"*")) {
[void](++$fileIdx);
}
if ($ShowProgress) { "Scanning..." }
$image = $item.Transfer();
$fileName = ($filePathTemplate -f $time,$fileIdx,$image.FileExtension);
$image.SaveFile($fileName);
clear-variable image
if ($ShowProgress) { "Running OCR..." }
$modiDocument = new-object -comobject modi.document;
$modiDocument.Create($fileName);
$modiDocument.OCR();
if ($modiDocument.Images.Count -gt 0) {
$ocrText = $modiDocument.Images.Item(0).Layout.Text.ToString().Trim();
$modiDocument.Close();
clear-variable modiDocument
if (!($ocrText.Equals(""))) {
$fileAsImage = New-Object -TypeName system.drawing.bitmap -ArgumentList $fileName
if (!($fileName.EndsWith(".jpg") -or $fileName.EndsWith(".jpeg"))) {
if ($ShowProgress) { "Converting to JPEG..." }
$newFileName = ($filePathTemplate -f $time,$fileIdx,"jpg");
$fileAsImage.Save($newFileName, [System.Drawing.Imaging.ImageFormat]::Jpeg);
$fileAsImage.Dispose();
del $fileName;
$fileAsImage = New-Object -TypeName system.drawing.bitmap -ArgumentList $newFileName
$fileName = $newFileName
}
if ($ShowProgress) { "Saving OCR Text..." }
$property = $fileAsImage.PropertyItems[0];
$property.Id = 40092;
$property.Type = 1;
$property.Value = [system.text.encoding]::Unicode.GetBytes($ocrText);
$property.Len = $property.Value.Count;
$fileAsImage.SetPropertyItem($property);
$fileAsImage.Save(($fileName + ".new"));
$fileAsImage.Dispose();
del $fileName;
ren ($fileName + ".new") $fileName
}
}
else {
$modiDocument.Close();
clear-variable modiDocument
}
if ($ShowProgress) { "Done." }
if ($OpenCompletedResult) {
. $fileName;
}
else {
$result = dir $fileName;
$result | add-member -membertype noteproperty -name OCRText -value $ocrText
$result
}
}
I ran into a few issues:
- MODI doesn't seem to be in the Office 2010 Technical Preview I installed first. Installing Office 2007 fixed that.
- The MODI.Document class, at least via PowerShell, can't be instantiated in a 64bit environment. To run the script on my 64bit OS I had to start powershell from the 32bit cmd.exe
(C:\windows\syswow64\cmd.exe).
- I was planning to hook up my script to the scanner's 'Scan' button, but
HP didn't get the button working for their Vista driver. Their workaround is "don't do that!".
- You must call Image.Dispose() to get .NET to release its reference to the corresponding image file.
- In trying to figure out how to store the text in the files comment, I ran into a dead-end trying to find the corresponding setter for GetDetailsOf which folks like James O'Neil use in PowerShell for interesting ends.
technical scanner ocr .net modi powershell office wia 2009 Jun 22, 3:09"Web/browser-security maven and coder Adam Barth has been working on implementing a content sniffer in WebKit, based on a content-sniffing algorithm that was originally specified in the HTML5 draft,
but that's now specified as a separate IETF draft that Adam is editing and that's titled, Content-Type Processing Model."
mime mime-sniffing webkit http technical 2009 Jun 20, 9:39If you have Office installed you may have an OCR library sitting on your hard drive just waiting to be used via C#...
ocr microsoft office .net automation scanner camera windows technical 2009 Jun 12, 12:17Propaganda poster styled RTFM.
humor tshirt mao rtfm internet art propaganda 2009 Jun 8, 3:58"Everyone can file bugs against HTML5, including you. To be clear, that something is filed in the W3C bug database does not mean it is likely it will be included."
html5 blog bug html w3c 2009 May 29, 9:17"Anyway, the idea is to find techniques, be they arrays of bright infrared LEDs, or paints that shine well in infrared but are not obvious in visible light, and create invisible graffiti that only
shows up in tourist photos and videos."
humor graffiti ir ir-paint magic tourist photography 2009 May 22, 6:55"So many of our grandparents were racist, and some of our parents are homophobes. Which of our own closely held beliefs will our own children and grandchildren by appalled by?" I thought about this
too but didn't come up with as good answers.
racism via:kottke 2009 May 8, 8:23
I watched the new Star Trek movie Thursday morning, along with many others who work on Windows. Microsoft rented out a theater and played the movie on all screens. I greatly enjoyed the movie!
Spoilers follow... I'm obviously not the biggest Star Trek nerd (or at least TOS nerd) since I didn't even pick up on the fact that Kirk's dad being dead was a discrepancy from the TV series. I
only figured out the alternate time-line stuff when they killed most of the Vulcans. I was just surprised they didn't set right what once went wrong by the end of the movie with some more time
travel magic to bring back Vulcan. On that note, I'm pretty sure the Spock-Spock conversation at the end, is Nimoy Spock sending Sylar Spock off to school so that Nimoy Spock can get freaky
repopulating the Vulcan race. Although at first after his 'two places at once' comment I thought he was saying... something else. Also, was the main evil guy a random miner turned psycho? And his
crazy looking spaceship that destroys the Federation fleet was just a mining vessel from the future? Once they invent time travel anybody can get drunk, go back in time, and conquer Earth.
personal2 nerd movie star-trek spoliers time-travel 2009 May 6, 12:56Time lapse photography from the perspective of a large ship at night in Texas. "The camera was fastened to an outside rail and set to take a photo every six seconds. Quicktime then assembled the
photos into a .mov file that plays back at 12 frames per second. So, one minute of movie time represents 72 minutes of trip time on the channel. The first half begins just below the Port of Houston
Authority Turning Basin (the very end of the channel) and continues down to Green's Bayou."
flickr video photography travel camera texas ship boat 2009 May 3, 9:38"The online features for The Sims 3 have been detailed, and it will include a new in-game store for purchasing items as well as a heap of social networking features."
for:hellosarah 2009 May 3, 10:36
Looking at the HTTP traffic of Netflix under Fiddler I could see the HTTP request that added a movie to my queue and didn't see anything obvious that would
prevent a CSRF. Sure enough its pretty easy to create a page that, if the user has set Netflix to auto-login, will add movies to the user's queue without their knowledge. I thought this was pretty
neat, because I could finally get people to watch Primer. However, when I searched for Netflix CSRF I found that this issue has been known and reported to Netflix since 2006. Again my thoughts stolen from me and the
theif doesn't even have the common decency to let me have the thought first!
With this issue known for nearly three years its hard to continue calling it an issue. Really they should just document it in their API docs and be
done with it. Who knows what Netflix based web sites and services they'll break if they try to change this behavior? For instance, follow this link to add my Netflix recommended movies to your queue.
technical stolen-thoughts csrf netflix security 2009 May 3, 9:17
Netflix lets you watch a subset of their movies online via their website and a subset of those movies are available to watch on the Xbox 360's Netflix app. so its not always easy to find movies to
watch on Xbox 360. Yet, I regularly see my Xbox friends using the Netflix app and its a shame they didn't make an easy way to share movie recommendations with your friends. Instead we must share
movie recommendations the old fashioned way. Here's the movies I've found and enjoyed on my 360.
-
Weeds
-
You don't have to be a stoner to enjoy this humorous and dramatic satire featuring a widow trying to raise her children and deal pot in suburbia.
-
Avatar The Last Airbender
-
An American animated series that's an amalgamation of various Asian art, history, religion, etc. that maintains a great story line.
-
Paprika
-
If you enjoyed Paranoia Agent you'll enjoy this movie in the same animation style and by the same director and
writer, Satoshi Kon. Its like a feature length version of a Paranoia Agent episode in which a dream machine lets outsiders view one's dreams but eventually leads to blurring the dreams and
reality.
-
Grindhouse Planet Terror
-
I didn't see either of the Grindhouse movies when they first came out, but of the two, Planet Terror is the more humorous and exciting gore filled parody.
-
Outsourced
-
A refreshing romantic comedy that still has a few of the over played tropes but is easy to enjoy despite that.
-
The King of Kong
-
A hilarious documentary on the struggle between the reigning champ hot-sauce salesman and the underdog Washington state high school science teacher to obtain the Donkey Kong world record high
score. After watching, checkout this interview with the creators of the movie and the
villain.
-
Primer
-
I've mentioned Primer before, but I put it on
here again because its really good and you still haven't seen it, have you?
movie personal netflix 2009 Apr 21, 1:28Fallout 3's May 5th DLC removes old ending, adds new quests, new levels, new perks. Sounds good! "In a nutshell, Broken Steel will remove the game's ending entirely, with Bethesda's Pete Hines saying
simply to fans that called for an open-ended resolution, "We got the idea." Players will still have to make the final choice, but following that climax the game will continue, presenting new epilogue
quests, another 10 levels to gain, and new perks, monsters and achievements to keep the climb interesting."
game videogame news fallout3 fallout 2009 Apr 20, 3:14This site does user generated reports on (mostly) spam phone numbers. They have a RESTful API to get at that data too! I'm looking for more like this.
api phone spam search reference telemarketing telephone lookup 2009 Apr 15, 7:42"If you're like us, you live in constant fear of slipping into a wormhole and getting spit out in the 13th century, and the only real useful knowledge you have for your ignorant ancestors is 'watch
out for that Hitler guy' and 'some of the Popes are evil.'" Its like they're inside my head! Love this shirt and poster telling you everything you need to know in case you accidentally fall back in
time.
time-travel time shirt poster wishlist gift awesome 2009 Apr 15, 7:38The Improv Everywhere's "Best Funeral Ever" April fools prank is reported as news and then runs into copyright issues: "The biggest fools of all were the CW 11 news team who reported on the funeral
as if it actually happened... I of course uploaded their story to my personal YouTube channel to show the world their lack of journalism skills. Tonight I got a copyright notice from YouTube
informing me that Tribune ... had filed a copyright claim against the video and that it had been removed."
copyright humor video prank improv-everywhere funeral via:boingboing