2007 Jun 7, 5:29The other day I had the best idea for my Wii remote. Clearly I should use it to control the rotation of Tetris pieces in my
N-dimensional
Tetris game Polytope Tetris. One of the
issues I described with Polytope Tetris is user input. Given a Wii remote the
user could rotate a piece through 3 dimensions in a manner that's much easier to adjust to than particular keys on the keyboard.
Anyway, I did a little
research into how this might work. I knew that the Wii remote used infrared for absolute positioning and
Bluetooth for everything else (LEDs, speaker, accels.) I bought a
Bluetooth adapter for my PC after realizing that none of my
computers had one already. I used
GlovePIE to ensure that my Wii remote could connect and successfully communicate with my computer.
GlovePIE is actually pretty cool -- it provides a simple script layer over the Wii remote to control things like your mouse.
Since Polytope Tetris is in Java I looked for and found a
Java library for operating with the Wii remote and a long
forum thread discussing its use. I then read up on
Bluetooth in Java. Apparently JSR 82 is the name of the standard that describes the API a Bluetooth stack should expose
in Java. That is, to get Bluetooth working in Java one needs an additional package for Java that actually implements the Bluetooth Java API. This package would depend on the system so I suppose I
can't fault Sun for not including it... Where to find such a package? I found a
comparison list of implementations and tried the ones
that support javax.bluetooth.
None of them worked for me because none can address USB devices it seems or they cost money and I couldn't get the trial version working. I also tried
bluesock (not listed on the previous list) which seemed promising and could produce an address for my Wii remote as a connected device but couldn't use
that address.
And I thought that after I found the Wii remote Java library it would be easy... Oh well...
java bluetooth wii technical remote jsr82 tetris polytopetetris wiimote 2007 May 22, 3:22I've created an
update to the IE7 feed display.
After working on my
update to the XML source view I tried running my resourcelist program on other IE DLLs including ieframe. I found that
one of the resources in ieframe is the XSLT used to turn an
RSS feed into the IE7 feed display.
My first thought for this was that I could embed enclosures into the feed display. For instance, have controls for youtube.com videos or podcast audio files directly in the feed display. However, I
found that I can't use object or embed tags that rely on ActiveX controls in the page or in frames in the feed display.
With that through I decided I could at least add support for some RSS extensions. Thanks to
IE7's RSS platform which provides a
normalized view of RSS feeds it was really easy to do this. I went to several popular RSS feeds and RSS feeds that I like and took a look at the source to see what extensions I might want to add
support for.
For
digg.com I added support for
their RSS extension which includes digg count, and submitter name and icon. I
added the digg count in a box on the right and tried to make it fit in stylistically. For the
iTunes RSS extension
I add the feed icon, feed author, and descriptions. I was surprised by how much of the podcasts content was missing from the feed view. I also added support for a few other misc things: the
slash RSS extension's section and department, the feed description to the top of the feed display, and the atom author icon.
I wonder what other goodies lurk in IE's resources...
feed res slashdot digg resource itunes technical browser ie rss extension 2007 May 17, 5:16Previously I created some
resource tools and then I used them to
overwrite msxml3's
XML source view. In this update I've added support for the XPointer Framework.
This time around I've started to add support for the
XPointer Framework to my
XML source view and
I've added
installation instructions. The framework consists of a series of pointer segments each of which has a scheme name followed
by data in parenthesis. For example 'scheme1(data1)scheme2(data2)scheme3(data3)'. A pointer segment resolves to a portion of the XML document based on the data and the scheme name. The whole pointer
resolves to the first segment that successfully resolves. That is, from the example, if scheme1 resolves to nothing and scheme2 resolves to something then that's used and scheme3 is ignored. In
addition to the framework I've added support for the
xmlns scheme which binds namespace prefixes to a namespace URI and the
element scheme which is a simple way to resolve to particular elements in an XML. I also have limited support for the
xpointer scheme the content of which is resolved as an
XPath with some extra functions (which I don't support --
hence the limited). I've also thrown in schemes for the two
SelectionLanguage values supported by msxml3.
Next time I might try to support the xpointer functions that aren't in xpath using
msxml script. But I think I'm losing steam on
this project... we'll see.
resource technical xml xpointer res xpath xslt 2007 May 13, 12:16My parents and grandmother came to visit the weekend before this current weekend, starting Friday May 4th. They arrived via their new motor-home which is quite the machine. Of course its my parents
motor-home so its very well decorated inside including drapes and mini-chandelier. I didn't have a memory card for my camera at the time but I'm sure my parents will put up photos on their
new blog dedicated to their motor-home at some point in the future.
At any rate, they parked the motor-home in an
RV park in Issaquah so that Friday night I drove over to them and we ate at the conveniently
closely located
Pogachas. The next day they came over and I showed them the various cool looking things my computer connected to my flat
screen TV can do. This includes
Vista Media Center showing my photos from recent trips and
Google Earth mapping out our respective homes and my recent trips (and Paris). Additionally, we played Wii which, unsurprisingly based on anecdotal evidence
from varied sources across the Internet, was a seeming hit. Mom broke records playing bowling with my dad and I, Dad did an excellent job fishing, and Grandma's slow but steady win's the race
approach to cow racing worked very well.
The next day I drove them to Seattle and we walked around Pike's Place. My parents made dinner that night at my place which was very good and made my apartment actually smell like cooked food. Also,
we exchanged Christmas gifts. For the past two years I've flown back to my parents' house for Christmas and ended up with gifts I couldn't take with me in both directions. Those I left at their house
they drove up and I was able to give them the ones I left at my place. They started the drive back the next day. I really enjoyed seeing them here.
motorhome family personal nontechnical 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.
xml xpointer msxml res xpath xslt resource ie7 technical browser ie xsl 2007 May 9, 10:07My XML source viewer written as XSLT to replace the builtin IE XML source viewer.
projects me xml xslt ie ie7 windows browser 2007 May 9, 9:47MSDN documentation on the res URI scheme which resolves resources in Windows modules.
msdn uri res microsoft schema scheme resource module 2007 May 9, 4:15I read about
text/xml URI fragment resolution a few months ago. I was interested to find another kind of fragment reference other than the text/html URI
fragment but of course I didn't find an implementation in IE, Firefox, or Opera. I decided to see how much work would be required to implement this in IE.
In IE and Firefox when you open an XML file that doesn't have an XML stylesheet the XML source is rendered with syntax highlighting. In IE I also noticed that the gold bar appears when you open an
XML file off of your local machine. To me this suggested that the XML source was being rendered as HTML which I assumed was produced by running an XSLT on the source XML file. If so, I figured I
could modify the XSLT to implement text/xml URI fragments. I ran
FileMon to see if iexplore.exe loaded an
XSLT file when opening an XML file. Only the XML file and MSXML3.DLL were opened and no XSLTs were loaded as files. My next hope for modifying the XSLT was if it existed as a resource in MSXML3.DLL.
I did a findstr on the DLL for SCRIPT and found an XSLT so I decided to check for resources in MSXML3.DLL. Unfortunately my previous resource viewer didn't work correctly so I decided to write my
own.
I created
resource tools to view and modify resources in Windows modules. The viewer outputs HTML with links to the
individual resources of a module using the
res URI scheme that's built into IE. The modifier is a simple command line tool that
replaces or adds one resource at a time to a module.
Using these tools I found that the XSLT was stored as a resource in MSXML3.DLL. I'll talk more about the existing XSLT and the one I replaced it with next time.
resource technical xml msxml res xslt xsl 2007 May 2, 1:39From The Onion News Network: "In The Know: Do You Remember Life Before The Segway? Panelists discuss how the Segway personal transporter has revolutionized American life."
humor onion segway video 2007 Apr 15, 4:06For the past several months I've seen various articles suggesting why bees are disappearing. At first I thought this was another crackpot's article that somehow made it onto digg.com. But they keep
coming and sometimes from credible sources. After the article I saw tonight I thought I should go back and put together the various articles I've read on this topic. Bees may be disappearing due to
pesticides,
new organic pathogens,
genetically modified crops,
mobile
phones, or
climate change. Apparently,
the US hasn't been keeping accurate counts of its
bees so we don't know the extent of the situation. There's an
interview with Maryann Frazier, M.S., of the Dept.
of Etymology at Penn State and a
congressional hearing on the matter.
I know this is all very serious and could signal the end of our ecosystem as we know it, but I can't help throwing in the following links as well. The bees could be
hiding in this Florida couple's kitchen. Or perhaps they're laying low while being
trained by the government to fight terrorism. Or
they're hiding in extra dimensions that we mere humans can't perceive (I'm fairly certain that's what this
article is suggesting. Really. Read it. Seriously. Its awesome.)
roundup personal bees nontechnical 2007 Apr 12, 10:55Uniform Resource Names (URNs) are intended to serve as persistent, location-independent, source identifiers. This document sets forward the canonical syntax for URNs.
urn uri rfc reference internet namespace standard 2007 Mar 28, 3:53Software to convert DVDs or other video into something for your iPod. Recommended to me by Matt.
ipod encoding itunes open-source software transcode tv 2007 Mar 21, 12:14This program will tell you how to install an application if you try to use one that it knows about and that you don't have installed.
bash blog opensource tool ubuntu article linux tips 2007 Mar 20, 6:06View and temporarily edit the source of websites. Your changes to the source will be reflected immediately.
css webdesign tools design development javascript website 2007 Mar 15, 10:36A URI scheme named 'geo' that names a geographical location.
geo uri schema reference internet rfc standard ietf 2007 Feb 23, 12:25Humorous article mocking Dane Cook
humor comedy satire onion dane-cook article neat-fp 2007 Feb 21, 6:30Standard describing the requirements of URNs.
urn standard reference rfc ietf uri 2007 Jan 19, 5:06PHP standes for "PHP Hypertext Preprocessor". Its an open source, server side scripting language. Its running my homepage.
php programming reference development web webdesign code documentation software open-source opensource quickreference 2007 Jan 11, 12:28Apache HTTP Server running on my new server. Fun.
apache api open-source opensource reference http documentation server 2007 Jan 11, 12:01Xmin lets you run your X Windows applications remotely via SSH on Windows. Useful with my new server. Awesome!
windows x11 xserver software linux x xwindows client free open-source opensource remote unix