2009 Jul 1, 2:24Stats on HTTP servers and HTTP server response headers. "Current statistics are based on a sample of 84604 probed servers, gathered in the last 386 days."
http statistics server internet http-header via:mnot technical 2009 Jun 30, 4:59"Congratulations on not being devoured and purchasing the Wagglemax Zombocalypse TM Survival Kit"
humor video commercial ad apocalypse zombie horror for:hellosarah videogame 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 25, 11:45"Cory Doctorow's Futuristic Tales of the Here and Now is the Creative Commons comics adaptation of six short stories by Boing Boing editor and science-fiction writer Cory Doctorow... The result are
eight Creative Commons mobile comics specifically designed for iPhone, iPod touch and Android devices."
cory-doctorow comic android iphone mobile download book free 2009 Jun 19, 3:34"Don Murphy, producer of such films as Natural Born Killers and From Hell, has bought a film option on Little Brother." You should read Little Brother. Its available via Creative Commons so you can,
right now, go read the first chapter
little-brother cory-doctorow don-murphy movie film literature book 2009 Jun 12, 9:02"Because linking to sources and resources is the key gesture to being a citizen of the Web and not just a product on the Web...If, on the other hand, you want to embrace the traits that make blogs,
Twitter, and so many other online communication tools a vital part of the daily life of your readers, your news site shouldn't feel like an endpoint in the conversation. It should feel like the
beginning."
via:sambrook journalism news internet web article link 2009 Jun 4, 11:08"For our latest mission, Agent Lathan gave out 2,000 high fives by standing next to a subway escalator during the morning rush. Five additional agents spread out along the adjacent stairs, holding
signs that prepared commuters for the upcoming high five fun."
humor improv-everywhere high-five escalator video youtube nyc subway 2009 Jun 1, 2:03Wow, read this without expectations of what its about. This is the second identity-theft/Internet/personal-relationships story I've read. It makes me think we need VeriSign to do cert verification
for personal relationships but then I must remind myself that this must not be very common...
via:swannman identity identity-theft story psychology web blog joey-devilla 2009 May 27, 3:01"The Microsoft Connect service is a web-platform for communication between Microsoft Software Engineers and their developer community... Unfortunately the sign-up and feature request process is a
little confusing, and long-winded, so I have put together a guide to help people get to the right place."
microsoft internet ie ie8 ie9 html5 canvas humor reference screenshot 2009 May 13, 11:21Lots of interesting notes on the company culture of Zappos. "Yesterday I was lucky enough to visit Zappos and get a tour and talk with some of their executives, including Tony Hsieh, CEO."
twitter marketing business culture zappos shoes ecommerce 2009 May 13, 10:17"Harvard's Office for Scholarly Communication has brought Kenneth Crews of Columbia Law School to talk about "Protecting Your Scholarship: Copyrights, Publication Agreements, and Open Access.""
harvard kenneth-crews berkman david-weinberger blog copyright talk live-blog 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 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 May 1, 12:09"If I'm reading the pop-up window correctly, domain registrar Godaddy recommends against purchasing .tv domain names because the island of Tuvalu, which the domain represents, is sinking."
humor dns domain godaddy tv via:boingboing 2009 Apr 23, 4:46Some lovely data visualizations. Is their Crimespotting visualization supposed to look like the map interface from GTA3SA? "Since 2001, Stamen has developed a reputation for beautiful and
technologically sophisticated projects in a diverse range of commercial and cultural settings."
blog web art visualization information interactive interface portfolio mashup 2009 Apr 23, 2:22Review of mime sniffing based XSS attacks with recommended protections for both web sites and browsers. Also, surprising to me since I rarely see it in this sort of a paper, thought and stats on the
compat. affects of their recommended changes for browsers. Very happy to see that in there!
web security ie browser xss sniff mime firefox chrome safari html html5 2009 Apr 21, 1:13List of humorous comments folks have found in source code.
humor code programming comment via:scott 2009 Apr 20, 5:49Some awesome quotes from this video. Really need to watch the whole thing through though to fully experience the humor. "This is the most impressive business card I've ever seen. Its mine." On the
topic of its non-standard size: "It doesn't fit in a rolodex because it doesn't belong in a rolodex." More from the comments:
humor video via:boingboing viral business-card 2009 Apr 20, 4:23Some folks stab in the dark at handling incoming phone calls on Android.
android phone cellphone api java development