dev page 8 - Dave's Blog

Search
My timeline on Mastodon

Android Developer Challenge

2009 Dec 3, 2:20"We're pleased to announce the overall winners in the Android Developer Challenge 2. These winners were selected after two rounds of scoring by thousands of Android users as well as an official panel of judges. Please see our official page for more information about the challenge."PermalinkCommentscellphone android google app contest

English Shellcode

2009 Nov 27, 6:10"What follows is a brief description of the method we have developed for encoding arbitrary shellcode as English text. This English shellcode is completely self-contained, i.e., it does not require an external loader, and executes as valid IA32 code."PermalinkCommentssecurity polyglot intel paper research programming hack obfuscation english language technical system:filetype:pdf system:media:document

RFC battle: Browsers vs. programming languages - cat /dev/random | grep security -

2009 Nov 25, 7:09Relative URI resolution differences in browsers vs programming language libraries.PermalinkCommentsvia:ericlaw url uri rfc web browser programming dotnet java technical

Inspirations typographiques françaises | Pixiome : nouvelles inspirations et tendances.

2009 Nov 23, 1:21"Je vous propose aujourd’hui de découvrir le travail de StarType, un ex typographe qui a connu le temps du plomb et travaillé dans de nombreuses imprimeries pour évoluer et devenir graphiste par la suite."PermalinkCommentstypography advertising font french design history

Ajaxian » New SVG Web Release: Gelatinous Cube

2009 Nov 23, 12:38Update to SVG Web: "SVG Web is a JavaScript library which provides SVG support on many browsers, including Internet Explorer, Firefox, and Safari. Using the library plus native SVG support you can instantly target close to 100% of the existing installed web base."PermalinkCommentssvg development web browser ie firefox safari javascript technical

Surfin’ Safari - Blog Archive » WebKit nightlies support HTML5 noreferrer link relation

2009 Nov 20, 3:08"WebKit nightlies now support the HTML5 noreferrer link relation, a neat little feature that allows web developers to prevent browsers from sending the Referrer: header when navigating either anchor or area elements."PermalinkCommentstechnical html5 html webkit link referer http http-header web browser

The Expurgation of Maniac Mansion

2009 Oct 30, 10:41All the stuff Nintendo forces developers to take out of the Nintendo Maniac Mansion port. I had read this before and didn't connect after watching Douglas Crockford's JavaScript talk that this was the same guy.PermalinkCommentsdouglas-crockford game videogame nintendo censorship pc history geek

There is no WebKit on Mobile

2009 Oct 7, 8:10Quirksmode does a chart comparing the differences in various versions of WebKit: "There’s iPhone WebKit, Android WebKit, S60 WebKit (at least two versions each), Bolt, Iris, Ozone, and Palm Pre, and I don’t doubt that I’ve overlooked a few minor WebKits along the way. All 10 mobile WebKits I’ve identified so far are subtly or wildly different."PermalinkCommentscompatibility web development browser webkit apple google android iphone safari technical via:mattb

Printing police handcuff keys … « blackbag

2009 Sep 16, 4:48"German SSDeV member Ray is known all around the world for his impressive collection of handcuffs and his fun ways of opening most of them. ... At HAR he pulled another stunt: He used a 3D printer to print handcuff keys. And not just any ordinary handcuff key … no, it’s the official handcuff key from the Dutch police!" Plus at the bottom a story on the legality of possessing handcuff keys.PermalinkCommentslegal security printer 3d key handcuff police

Dive Into HTML 5 by Mark Pilgrim with illustrations from the Public Domain

2009 Aug 21, 3:26"Dive Into HTML 5 seeks to elaborate on a hand-picked Selection of features from the HTML 5 specification and other fine Standards. I shall publish Drafts periodically, as time permits." Lovely design.PermalinkCommentsvia:waxy reference programming howto design html5 typography mark-pilgrim html web development technical

Creating Accelerators for Other People's Web Services

2009 Aug 18, 4:19

Before we shipped IE8 there were no Accelerators, so we had some fun making our own for our favorite web services. I've got a small set of tips for creating Accelerators for other people's web services. I was planning on writing this up as an IE blog post, but Jon wrote a post covering a similar area so rather than write a full and coherent blog post I'll just list a few points:

PermalinkCommentstechnical accelerator ie8 ie

DSC04581 on Flickr - Photo Sharing!

2009 Aug 13, 9:46An awesome health care protest sign. I've made a huge mistake.
PermalinkCommentshumor photo obama politics television arrested-development sign protest

IEBlog : Engineering POV: IE6

2009 Aug 12, 4:55"As a browser supplier, we want people to switch to the latest version of IE...", "Dropping support for IE6 is not an option because we committed to supporting the IE included with Windows for the lifespan of the product.", followed by a large number of comments from irate webdevs who missed the point.PermalinkCommentsblog microsoft ie ie6 dean-hachamovitch technical

Self-Portrait Machine - we make money not art

2009 Jul 27, 4:29"Jen Hui Liao's Self-Portrait Machine is a device that takes a picture of the sitter and draws it but with the model's help. The wrists of the individual are tied to the machine and it is his or her hands that are guided to draw the lines that will eventually form the portrait." With video!PermalinkCommentsvideo drawing art technology machine robot automation self-portrait

Town Hall Meeting to Announce the Quadrennial Diplomacy and Development Review (QDDR)

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.PermalinkCommentsfirefox government via:boingboing video browser web clinton technical

Digg the Blog - Blog Archive - Much Ado About IE6

2009 Jul 10, 9:43"This goes directly to why most folks use IE6: they don't have a choice. Three out of four IE6 users on Digg said they can't upgrade due to some technical or workplace reason."PermalinkCommentsie digg ie6 statistics web development browser technical

WGMX 4 - Zombocalypse on Vimeo

2009 Jun 30, 4:59"Congratulations on not being devoured and purchasing the Wagglemax Zombocalypse TM Survival Kit"PermalinkCommentshumor video commercial ad apocalypse zombie horror for:hellosarah videogame

PowerShell Scanning Script

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:

  1. Scans using the Windows Image Acquisition APIs via COM
  2. Runs OCR on the image using Microsoft Office Document Imaging via COM (which may already be on your PC if you have Office installed)
  3. Converts the image to JPEG using .NET Image APIs
  4. 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)
  5. 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:

PermalinkCommentstechnical scanner ocr .net modi powershell office wia

Internationalization Best Practices: Specifying Language in XHTML and HTML Content

2009 Jun 25, 1:53"The document provides practical best practices related to specifying the language of content that HTML content authors can use to ensure that their HTML is easily adaptable for an international audience. These are best practices that are best addressed from the start of content development if unnecessary costs and resource issues are to be avoided later on."PermalinkCommentslanguage i18n internationalization html w3c xml reference xhtml technical

Cory Doctorow's Futuristic Tales of the Here and Now reaches 30,000 downloads | Robot Comics

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."PermalinkCommentscory-doctorow comic android iphone mobile download book free
Older EntriesNewer Entries Creative Commons License Some rights reserved.