amp page 6 - Dave's Blog

Search
My timeline on Mastodon

Hand Drawn QR Code for Marc Jacobs - PSFK.com

2009 Jul 1, 6:21"The QR code, used to store and decode small bits of data via printed symbol, received an artistic rendering by SET as part of its campaign for Marc by Marc Jacobs." I like the idea although in this case its not very subtle or different from a regular QR code IMHO. Also, I was surprised that my phone could still read the QR code in this form.PermalinkCommentsqr qrcode marketing art internet mobile technical

Common Web Server software comparison report

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."PermalinkCommentshttp statistics server internet http-header via:mnot technical

The Music of Erich Zann

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."PermalinkCommentschris-shelton hp-lovecraft video movie

OpenSearchDescriptionToHTML Tool

2009 Jun 10, 3:36

I've made an OpenSearchDescriptionToHTML XSLT that given an OpenSearch description file produces HTML that describes that file, lets you install it, or search with it. For example, here's a Google OpenSearch description that uses my OpenSearchDescriptionToHTML XSLT.

I had just created an OpenSearch description for WolframAlpha at work and was going about the process of adding another install link to my search provider page so that I could install it. Thinking about it, I realized I could apply an XSLT to the OpenSearch description XML to produce the HTML automatically so I wouldn't have to modify additional documents everytime I create and want to install a new OpenSearch description. While I was in there writing the XSLT I figure why not let the user try out searching with the OpenSearch description file too. And lastly I made the XSLT apply to itself to produce HTML describing its own usage.

Incidentally, I added WolframAlpha at work to replace my FileInfo search provider for the purposes of searching for information about particular Unicode characters. For instance, look at WolframAlpha's lovely output for this search for "Bopomofo zh".

PermalinkCommentstechnical xml wolframalpha opensearchdescriptiontohtml xslt opensearch

Who you calling boring?

2009 Jun 2, 4:00"A notice was sent out by the real estate department with the provocative subject line Campus notification - Building 7: Marking Boring Locations."PermalinkCommentshumor english language boring

The Sheep Market

2009 May 13, 10:35In my first linear algebra book they had examples of linear tranformations applied to an image of a cartoon sheep. The fist example was a shear mapping.PermalinkCommentssheep humor amazon mechanicalturk via:swannman

Presentation - Integrating Web Innovations into Museums - "Going Analog"

2009 May 3, 4:36Besides being an interesting presentation with real world examples off Web ideas applied to museums, the presentation itself (although its all icky flash) is lovely.PermalinkCommentsvia:mattb museum flash presentation visualization

Netflix Watch Instantly Recommendations

2009 May 3, 9:17
WeedsAvatar The Last AirbenderPaprikaGrindhouse Planet TerrorOutsourcedThe King of KongPrimer

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?
PermalinkCommentsmovie personal netflix

Please help with PhoneStateIntentReceiver WORKING example :: anddev.org - Android Development Community | Android Tutorials

2009 Apr 20, 4:23Some folks stab in the dark at handling incoming phone calls on Android.PermalinkCommentsandroid phone cellphone api java development

Mark Finkle's Weblog - Firefox 3 - Web Protocol Handlers

2009 Apr 7, 12:12HTML5's registerProtocolHandler seems to come from a cool FireFox 3 feature: "With web protocol handlers, the web application can register the specific protocol it wants to handle. Firefox will then prompt the user to choose which of the registered applications (web or desktop) it should use to handle the action. Any protocol, real or imaginary, can be used - mailto: is only one example, webcal:, tel: and fax: are others."PermalinkCommentsfirefox uri scheme protocol mozilla html5 registerProtocolHandler

Thoughts on registerProtocolHandler in HTML 5

2009 Apr 7, 9:02

I'm a big fan of the concept of registerProtocolHandler in HTML 5 and in FireFox 3, but not quite the implementation. From a high level, it allows web apps to register themselves as handlers of an URL scheme so for (the canonical) example, GMail can register for the mailto URL scheme. I like the concept:

However, the way its currently spec'ed out I don't like the following: PermalinkCommentsurl template registerprotocolhandler firefox technical url scheme protocol boring html5 uri urn

Notes on Creating Internet Explorer Extensions in C++ and COM

2009 Mar 20, 4:51

Working on Internet Explorer extensions in C++ & COM, I had to relearn or rediscover how to do several totally basic and important things. To save myself and possibly others trouble in the future, here's some pertinent links and tips.

First you must choose your IE extensibility point. Here's a very short list of the few I've used:

Once you've created your COM object that implements IObjectWithSite and whatever other interfaces your extensibility point requires as described in the above links you'll see your SetSite method get called by IE. You might want to know how to get the top level browser object from the IUnknown site object passed in via that method.

After that you may also want to listen for some events from the browser. To do this you'll need to:

  1. Implement the dispinterface that has the event you want. For instance DWebBrowserEvents2, or HTMLDocumentEvents, or HTMLWindowEvents2. You'll have to search around in that area of the documentation to find the event you're looking for.
  2. Register for events using AtlAdvise. The object you need to subscribe to depends on the events you want. For example, DWebBrowserEvents2 come from the webbrowser object, HTMLDocumentEvents come from the document object assuming its an HTML document (I obtained via get_Document method on the webbrowser), and HTMLWindowEvents2 come from the window object (which oddly I obtained via calling the get_script method on the document object). Note that depending on when your SetSite method is called the document may not exist yet. For my extension I signed up for browser events immediately and then listened for events like NavigateComplete before signing up for document and window events.
  3. Implement IDispatch. The Invoke method will get called with event notifications from the dispinterfaces you sign up for in AtlAdvise. Implementing Invoke manually is a slight pain as all the parameters come in as VARIANTs and are in reverse order. There's some ATL macros that may make this easier but I didn't bother.
  4. Call AtlUnadvise at some point -- at the latest when SetSite is called again and your site object changes.

If you want to check if an IHTMLElement is not visible on screen due how the page is scrolled, try comparing the Body or Document Element's client height and width, which appears to be the dimensions of the visible document area, to the element's bounding client rect which appears to be its position relative to the upper left corner of the visible document area. I've found this to be working for me so far, but I'm not positive that frames, iframes, zooming, editable document areas, etc won't mess this up.

Be sure to use pointers you get from the IWebBrowser/IHTMLDocument/etc. only on the thread on which you obtained the pointer or correctly marshal the pointers to other threads to avoid weird crashes and hangs.

Obtaining the HTML document of a subframe is slightly more complicated then you might hope. On the other hand this might be resolved by the new to IE8 method IHTMLFrameElement3::get_contentDocument

Check out Eric's IE blog post on IE extensibility which has some great links on this topic as well.

PermalinkCommentstechnical boring internet explorer com c++ ihtmlelement extension

Justin Frankel's blog

2009 Mar 10, 9:22Justin Frankel (Previously Winamp/Nullsoft guy) makes a designated graffiti box on his garage with the note: "All are welcome to express themselves in the box below. Printing within the above box is hereby expressly permitted and shall not be considered 'graffiti' in accordance with article #23 of the San Francico Municipal Code." Before graffiti: , And with graffiti:PermalinkCommentsgraffiti cultural-disobediance legal san-francisco nullsoft justin-frankel blog

The 'Is It UTF-8?' Quick and Dirty Test

2009 Mar 6, 5:16

I've found while debugging networking in IE its often useful to quickly tell if a string is encoded in UTF-8. You can check for the Byte Order Mark (EF BB BF in UTF-8) but, I rarely see the BOM on UTF-8 strings. Instead I apply a quick and dirty UTF-8 test that takes advantage of the well-formed UTF-8 restrictions.

Unlike other multibyte character encoding forms (see Windows supported character sets or IANA's list of character sets), for example Big5, where sticking together any two bytes is more likely than not to give a valid byte sequence, UTF-8 is more restrictive. And unlike other multibyte character encodings, UTF-8 bytes may be taken out of context and one can still know that its a single byte character, the starting byte of a three byte sequence, etc.

The full rules for well-formed UTF-8 are a little too complicated for me to commit to memory. Instead I've got my own simpler (this is the quick part) set of rules that will be mostly correct (this is the dirty part). For as many bytes in the string as you care to examine, check the most significant digit of the byte:

F:
This is byte 1 of a 4 byte encoded codepoint and must be followed by 3 trail bytes.
E:
This is byte 1 of a 3 byte encoded codepoint and must be followed by 2 trail bytes.
C..D:
This is byte 1 of a 2 byte encoded codepoint and must be followed by 1 trail byte.
8..B:
This is a trail byte.
0..7:
This is a single byte encoded codepoint.
The simpler rules can produce false positives in some cases: that is, they'll say a string is UTF-8 when in fact it might not be. But it won't produce false negatives. The following is table from the Unicode spec. that actually describes well-formed UTF-8.
Code Points 1st Byte 2nd Byte 3rd Byte 4th Byte
U+0000..U+007F 00..7F
U+0080..U+07FF C2..DF 80..BF
U+0800..U+0FFF E0 A0..BF 80..BF
U+1000..U+CFFF E1..EC 80..BF 80..BF
U+D000..U+D7FF ED 80..9F 80..BF
U+E000..U+FFFF EE..EF 80..BF 80..BF
U+10000..U+3FFFF F0 90..BF 80..BF 80..BF
U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF
U+100000..U+10FFFF F4 80..8F 80..BF 80..BF

PermalinkCommentstest technical unicode boring charset utf8 encoding

Official Google Webmaster Central Blog: Specify your canonical

2009 Feb 14, 5:41"Now, you can simply add this link tag to specify your preferred version... and Google will understand that the duplicates all refer to the canonical URL: http://www.example.com/product.php?item=swedish-fish. Additional URL properties, like PageRank and related signals, are transferred as well."PermalinkCommentsvia:mattb google link html url uri canonical canonicalization web

PolitiFact | The Obameter: Tracking Barack Obama's Campaign Promises

2009 Jan 24, 2:42"PolitiFact has compiled about 500 promises that Barack Obama made during the campaign and is tracking their progress on our Obameter. We rate their status as No Action, In the Works or Stalled. Once we find action is completed, we rate them Promise Kept, Compromise or Promise Broken."PermalinkCommentspolitics news government obama election president tracking

Paper: "moral panic" behind attempts to link games, violence

2009 Jan 22, 9:43'Behind the press reports, the academic community has been engaged in a hot debate over whether the evidence supports a connection between the violent content of games and any behavioral effects. One of the researchers who has argued forcefully that it's not is Christopher Ferguson, who has just published a paper that argues that the continued societal focus on games as a causal factor in violence is an example of what's termed a "moral panic."'PermalinkCommentsgame violence society videogames

Digital Urban: The City as a Canvas: Video Projection Showreel 2009

2009 Jan 15, 6:02Projecting giant images onto buildings that appear to interact with their surface. Lovely video. "We have posted quite a few times now about using projectors in the city to beam images onto Architecture and the screengrab above is one from one the best examples we have seen so far."PermalinkCommentsvideo graffiti cultural-disobediance art technology projector light

Dopplr Blog - Blog Archive - Dopplr presents the Personal Annual Report 2008: freshly generated for you, and Barack Obama…

2009 Jan 15, 4:57Lovely travel visualization: "We've generated what we call the Personal Annual Report for all our users. It's a unique-to-you PDF of data, visualisations and factoids about your travel in 2008, that we're delivering over the next week via email to every Dopplr user who travelled in 2008. To give you an example, we thought we'd show you the Personal Annual Report of someone who's had a very busy 2008 - President Elect Barack Obama."PermalinkCommentsvia:mattb visualization blog dopplr obama travel statistics map

A rare peek at Homeland Security's files on travelers - This Just In - Budget Travel

2009 Jan 12, 12:48Results of a FOIA request for the DHS travel records: "I had been curious about what's in my travel dossier, so I made a Freedom of Information Act (FOIA) request for a copy. I'm posting here a few sample pages of what officials sent me."PermalinkCommentsfoia security airplane airport privacy government information
Older EntriesNewer Entries Creative Commons License Some rights reserved.