manual page 2 - Dave's Blog

Search
My timeline on Mastodon

Canon SD800is SD850is Digital Camera owners manual

2008 Mar 3, 10:16The manual for the SD800IS digital camera.PermalinkCommentscamera manual reference product canon sd800is pdf

Snap Shots Manual

2008 Feb 11, 10:07Snap Shots manual describes what they do with various kinds of URIs.PermalinkCommentsreference uri snapshot

Worse Than Failure - Character encoding WTF

2007 Oct 19, 4:10FTA: 'This letter was sent to a Russian student by her French friend, who manually wrote the address that he received by e-mail. His e-mail client, unfortunately, was not set up correctly to display Cyrillic characters, so they were substituted with diacrPermalinkCommentsencoding charset unicode language humor article

RAZR Phone

2007 Sep 4, 10:49Razr phone manual.PermalinkCommentsrazr phone manual reference motorola

SONY KDL-32S2000 user manual - Manual de instrucciones

2007 Aug 25, 6:02Manual for the Sony KDL 32S2000 TV.PermalinkCommentsreference tv product

Problems with Zenith P42W46X 42 in. EDTV Plasma Television

2007 Aug 18, 10:46Notes on problem shooting the TV including a scanned version of the manual.PermalinkCommentstv zenith purchase product reference

Second Life Translator

2007 Jul 4, 10:58Hackdiary
I really enjoy reading Matt Biddulph's blog hackdiary. An entry some time ago talked about his Second Life flickr screen which is a screen in Second Life that displays images from flickr.com based on viewers suggested tags. I'm a novice to the Second Life scripting API and so it was from this blog post I became aware of the llHTTPRequest. This is like the XMLHttpRequest for Second Life code in that it lets you make HTTP requests. I decided that I too could do something cool with this.

Translator
I decided to make a translator object that a Second Life user would wear that would translate anything said near them. The details aren't too surprising: The translator object keeps an owner modifiable list of translation instructions each consisting of who to listen to, the language they speak, who to tell the translation to, and into what language to translate. When the translator hears someone, it runs through its list of translation instructions and when it finds a match for the speaker uses the llHTTPRequest to send off what was said to Google translate. When the result comes back the translator simply says the response.

Issues
Unfortunately, the llHTTPRequest limits the response size to 2K and no translation site I can find has the translated text in the first 2K. There's a flag HTTP_BODY_MAXLENGTH provided but it defaults to 2K and you can't change its value. So I decided to setup a PHP script on my site to act as a translating proxy and parse the translated text out of the HTML response from Google translate. Through experimentation I found that their site can take parameters text and langpair queries in the query like so: http://translate.google.com/translate_t?text=car%20moi%20m%C3%AAme%20j%27en%20rit&langpair=fr|en. On the topic of non US-ASCII characters (which is important for a translator) I found that llHTTPRequest encodes non US-ASCII characters as percent-encoded UTF-8 when constructing the request URI. However, when Google translate takes parameters off the URI it only seems to interpret it as percent-encoded UTF-8 when the user-agent is IE's. So after changing my PHP script to use IE7's user-agent non US-ASCII character input worked.

In Use
Actually using it in practice is rather difficult. Between typos, slang, abbreviations, and the current state of the free online translators its very difficult to carry on a conversation. Additionally, I don't really like talking to random people on Second Life anyway. So... not too useful.PermalinkCommentspersonal translate second-life technical translator sl code google php llhttprequest

New XSLT - IE7 XML Source View Upgrade Part 2

2007 May 11, 8:55Last time, I had written some resource tools to allow me to view and modify Windows module resources in my ultimate and noble quest to implement the XML content-type fragment in IE7. Using the resource tools I found that MSXML3.DLL isn't signed and that I can replace the XSLT embedded resource with my own, which is great news and means I could continue in my endevour. In the following I discuss how I came up with this replacement for IE7's XML source view.

At first I thought I could just modify the existing XSLT but it turns out that it isn't exactly an XSLT, rather its an IE5 XSL. I tried using the XSL to XSLT converter linked to on MSDN, however the resulting document still requires manual modification. But I didn't want to muck about in their weird language and I figured I could write my own XSLT faster than I could figure out how theirs worked.

I began work on the new XSLT and found it relatively easy to produce. First I got indenting working with all the XML nodes represented appropriately and different CSS classes attached to them to make it easy to do syntax highlighting. Next I added in some javascript to allow for closing and opening of elements. At this point my XSLT had the same features as the original XSL.

Next was the XML mimetype fragment which uses XPointer, a framework around various different schemes for naming parts of an XML document. I focused on the XPointer scheme which is an extended version of XPath. So I named my first task as getting XPaths working. Thankfully javascript running in the HTML document produced by running my XSLT on an XML document has access to the original XML document object via the document.XMLDocument property. From this this I can execute XPaths, however there's no builtin way to map from the XML nodes selected by the XPath to the HTML elements that I produced to represent them. So I created a recursive javascript function and XSLT named-template that both produce the same unique strings based on an XML node's position in the document. For instance 'a3-e2-e' is the name produced for the 3rd attribute of the second element of the root element of the XML document. When producing the HTML for an XML node, I add an 'id' attribute to the HTML with the unique string of the XML node. Then in javascript when I execute an XPath I can discover the unique string of each node in the selected set and map each of them to their corresponding positions in the HTML.

With the hard part out of the way I changed the onload to get the fragment of the URI of the current document, interpret it as an XPath and highlight and navigate to the selected nodes. I also added an interactive floating bar from which you can enter your own XPaths and do the same. On a related note, I found that when accessing XML files via the file URI scheme the fragment is stripped off and not available to the javascript.

The next steps are of course to actually implement XPointer framework parsing as well as the limited number of schemes that the XPointer framework specifies.PermalinkCommentsxml xpointer msxml res xpath xslt resource ie7 technical browser ie xsl

PHP Manual

2007 Jan 19, 5:06PHP standes for "PHP Hypertext Preprocessor". Its an open source, server side scripting language. Its running my homepage.PermalinkCommentsphp programming reference development web webdesign code documentation software open-source opensource quickreference

Moved to Server-Side Scripting

2007 Jan 19, 9:15I've moved my homepage to server-side scripting. Previously I've mentioned that I was using client side scripting to interpret and sort my livejournal and delicious entries together. Now I'm using PHP and XSLTs to process and sort my livejournal, delicious, flickr, and librarything entries. See my homepage for the finished result.
LibraryThing is pretty cool despite being pretty niche. Its like flickr but for books. I display a random sampling of the covers of books I have listed in librarything on my page. I've also hooked the display of the covers of my book up to the corner image. Now when you hover over the cover of a book a bigger picture of its cover appears in the corner of the webpage. Also, flickr entries in the main section how have the same on hover behavior.
This may not be the best use of my time, but its still fun.PermalinkCommentslibrarything xslt delicious homepage flickr technical php livejournal script

Fiddler2 HTTP Debugger - Fiddler2

2006 Nov 27, 11:23Fiddler2 is a free tool that lets you view and fiddle with HTTP and now HTTPS traffic! Supports automated modification of traffic using javascript as well as manual modification using breakpoints. Very cool tool.PermalinkCommentseric-lawrence tool tools free internet http debugger debug fiddler fiddler2 microsoft proxy

Apache Ant User Manual

2005 Apr 3, 7:14User Manual for Ant the make program for JavaPermalinkCommentsapache ant make java development

The GNU Awk User's Guide - Table of Contents

2005 Apr 2, 1:26User manual fo GNU awk the string manipulation languagePermalinkCommentsawk GNU development reference
Older EntriesNewer Entries Creative Commons License Some rights reserved.