2007 Nov 19, 3:47I really appreciate that
the first gen Zune's get the new Zune's
firmware and software. I like the updated Zune software personally because its faster and simpler, has better podcast support, and the whole social thing has is on their website now. So, I guess
I like the software because it has new features that should have been there in the first place.
The social thing is like a Zune social network. It uses your Xbox Live friends to seed your Zune friends list, lets you do the expected social network stuff, lets you preview songs, and unlike first
gen Zunes which required face to face time with other Zune owners, allows you to send songs to people. It also lets you display your recently played tracks and your favorite tracks, similar to what
Last.FM has, via a
Zune Card. I like the Zune Card from a technical perspective because it
separates
the
Zune Card view, written in flash from the
User Card data which is in XML. I hope
they intend to keep the XML available via this UserCard Service because I think there's potential to easily do cool things.
microsoft technical music zune social 2007 Nov 15, 4:01I too was disappointed by the Media Center integration but for other reasons...
article zune mp3 tv music video 2007 Nov 12, 1:48A guide to the why of various nerdy behavior. I find some of this applicable to me.
nerd humor article tips social howto via:swannman 2007 Nov 9, 2:38Jon's leaving for Germany today which of course is sad. On Wednesday, Jon came over and we watched
Hackers. There's a few things you probably wouldn't
notice without repeated viewings of the film:
- Phantom Phreak is arrested and you never hear what happens to him. This is unlike Joey who is arrested but appears in the final hacking scene.
- Marc Anthony appears in the movie as a secret service agent.
- Everyone in the movie loves Coke.
- Hackers is the greatest movie of all time: it represents the pinnacle of human artistic achievement.
In similar ex college roommate news, I'm going to California over the weekend for Angie and Kane's goodbye party. They're heading for Australia for like a year or something. Angie's got a
blog about her travels but rarely seems to update it. I'll get to see Carissa and Elijah there too, almost completing the ex college roommate
experience. To avoid confusion I should mention that unlike everyone else I know, Carissa and Elijah aren't leaving the country.
personal nontechnical 2007 Nov 7, 9:44Paper on how to apply honeybee protocol to managing Internet hosting.
bee internet web research paper 2007 Nov 4, 11:20This weekend Sarah and I went to Tariq's house warming party in Issaquah and then to Seattle for Jon's going away party at Pike's Pub. On the drive over, just after getting through traffic on I-5
South, I saw emergency vehicles lights on the North bound side and suddenly found my lane stopped. I found out why when a man ran from the left most lane to my lane the right most, then darted left
one lane and back right again. Cars started leaving my lane and I could see the man now lounging on the pavement in front of a jeep. Apparently not hurt, he got up and started walking down the
highway. He didn't appear to be in his right mind and after walking by our car Sarah reported it to 911. The rest of the night went on as normal and I had fun with Jon and his friends. It'll be sad
to see him go next week.
nontechnical 2007 Oct 31, 10:41Upload your data and visualize it in various interesting ways using Java applets from IBM.
visualization java applet ibm analysis graph 2007 Oct 12, 4:08As noted in the
XSL Transformations spec you can create the identity transform using the xsl:copy element. With the MSXML implementation of xsl:copy
the example the spec gives produces slightly ugly elements. For instance given it produces . In order to ensure empty elements turn out pretty I've modified the example as follows:
This got me thinking about inverting XSLTs. Clearly in general an XSLT isn't invertible since an XSLT can completely ignore the input XML and produce something else entirely but then the above is an
example of an XSLT that is invertible. So there is a subset of XSLTs that are invertible, how might you produce the inverse of an XSLT, and would this ever be useful?
xml msxml inverse xlst xsl 2007 Oct 12, 3:20And now to fit in better with the rest of the emo kids on LJ, in no particular order here are some reasons why I feel old:
- I've attended friends weddings sorted chronologically by when I met them: Lucas from high school, followed by Carissa from college,
and then Palak from Microsoft.
- I rarely get carded for alcohol.
- Jon's moving to Germany soon -- this time permanently. He's already started the process of getting rid of possessions he's not taking with him like his car and TV. However, after doing so he
couldn't maintain his smug "I don't even own a TV" attitude and ended up trading me my small CRT TV
(as mentioned previously) for his DDR pads and games. A good trade for both since we were each looking to dump these items. So far I've
only convinced Sarah to try DDR once with me. Somehow I've gotten much worse at something I wasn't that great at to begin with.
- I have business cards.
- I still have semi-monthly nightmares in which I'm taking a Linear Algebra course for which I haven't studied or done homework in years. This differs from the more frequent nightmares I had
immediately after finishing that series of classes in which I was taking the final and it was all on the one topic I didn't study. In reality, the prof. had done his PhD work on this one topic and
I, correctly betting it wouldn't appear on the final, didn't study it. Apparently this was a traumatic bet for me to make given the wake of destruction left on my dreams.
- I have to remind myself that 2005 was two years ago.
personal nontechnical 2007 Oct 9, 4:41Notes on using XSLT on FOAF XML files. Apparently its not super simple due to the various equivalent ways of representing the same RDF in XML.
xml foaf xslt xsl reference rdf semanticweb 2007 Sep 27, 11:20A page demonstrating a java applet that produces histograms
java applet html graph histogram 2007 Sep 12, 6:54I'm visiting
Wikipedia more and more recently but I always find myself reading the referenced webpages to get the full context of quotes and for
more info. Basically I use Wikipedia as an introduction and a place to look for links. For times when I'm looking for opinions rather than facts I like to use
Everything2. No need to check references there.
There's the much hyped
WikiScanner tool which reports who has been making anonymous (thought to be anonymous at the time anyway) edits to
Wikipedia. Its humorous and interesting in a few cases, but in general I think its stretching to say that because an IP address range is owned by a corporation and someone edited Wikipedia on an IP
in that range that you can attribute that edit to that corporation. If I edited Wikipedia I'd probably do a bit of that during my lunch break, but that wouldn't mean that Microsoft wants the
Wikipedia pages for Weird Al, Dave Risney, URIs, or whatever else I would edit on Wikipedia changed.
Also, via
Everything Is Miscellaneous I found the tool
Wiki Dashboard. Wiki Dashboard proxies
Wikipedia and on each page shows a timeline view at the top with who made edits and when. Its nice to see a gentle curve down from an initial spike at the beginning for topics you don't imagine to be
controversial. As the canonical test page for this service I looked up 'Elephant' the
Wikipedia page Stephen Colbert
suggested folks vandalize on his show on 2006 July 31st. If you look at the
Wiki Dashboard Elephant page you can see a very large spike
in edits on that date. That's all I need to see.
As a side note, for the link on Stephen Colbert suggesting folks vandalize Wikipedia I linked to a Wikipedia article. Is it inappropriate to provide info about Wikipedia being vandalized and thus
incorrect via a link to a Wikipedia article?
wikidashboard stephen-colbert wikality wikipedia wikiscanner colbert-report 2007 Sep 10, 4:29Bookmarklet suggestions for the iPhone.
apple iphone bookmarklets browser hack script javascript 2007 Aug 30, 4:17How to encode an ampersand so that it will appear literally in a Windows control.
msdn microsoft reference ui gui windows programming ampersand encoding 2007 Aug 15, 3:20Listened to RSnake talk about this in person at one point. Pretty interesting without his scenario video with niave female Internet user narration.
ajax rsnake via:swannman reference dns security javascript dns-rebinding 2007 Aug 15, 3:30I've been experimenting with adding video to my webpage. I tried to
embed video in my livejournal blog posts previously however ran into
some issues with that. When creating the LJ post I added an
tag but when I submit that tags
turned into an
technical youtube video personal livejournal homepage 2007 Aug 10, 9:25A POSIX subsystem to build UNIX applications on top of on Windows.
unix microsoft posix programming c windows via:swannman 2007 Aug 9, 5:41To satisfy my hands which have already learned to type *nix commands I like to install
Win32 versions of common GNU utilities. Unfortunately, the
which
command is a rather literal port and requires you to enter the entire name of the command for which you're looking. That is '
which which
' won't find itself but
'
which which.exe
' will. This makes this almost useless for me so I thought to write my own as a batch file. I had learned about a few goodies available in cmd.exe that I thought would
make this an easy task. It turned out to be more difficult than I thought.
for /F "usebackq tokens=*" %%a in ( `"echo %PATH:;=& echo %"` ) do (
for /F "usebackq tokens=*" %%b in ( `"echo %PATHEXT:;=& echo %"` ) do (
if exist "%%a"\%1%%b (
for %%c in ( "%%a"\%1%%b ) do (
echo %%~fc
)
)
)
)
The environment variables
PATH
and
PATHEXT
hold the list of paths to search through to find commands, and the extensions of files that should be run as
commands respectively. The '
for /F "usebackq tokens=*" %%a in (...) do (...)
' runs the '
do
' portion with
%%a
sequentially taking on the value of every line in
the '
in
' portion. That's nice, but
PATH
and
PATHEXT
don't have their elements on different lines and I don't know of a way to escape a newline character to
appear in a batch file. In order to get the
PATH
and
PATHEXT
's elements onto different lines I used the
%ENV:a=b%
syntax which replaces occurrences of a with b
in the value of ENV. I replaced the '
;
' delimiter with the text '
& echo
' which means
%PATHEXT:;=& echo%
evaluates to something like "
echo
.COM& echo .EXE& echo .BAT& ...
". I have to put the whole expression in double quotes in order to escape the '&' for appearing in the batch file. The
usebackq
and
the backwards quotes means that the backquoted string should be replaced with the output of the execution of its content. So in that fashion I'm able to get each element of the env. variable onto new
lines. The rest is pretty straight forward.
Also, it supports wildcards:
C:\Users\davris>which.cmd *hi*
C:\Windows\System32\GRAPHICS.COM
C:\Windows\System32\SearchIndexer.exe
D:\bin\which.exe
D:\bin\which.cmd
which cmd technical batch for 2007 Aug 6, 5:40I was messing with the
XSLT to XSL Converter source which is a
javascript file that can be run with cscript.exe. I've changed it to be like a very basic version of
xsltproc that simply runs an XML file through
an XSLT. I also wanted to run this from the command prompt without writing "cscript ..." everytime. I decided to make like perl programmers I've seen and make a JS file that works as a batch file and
a JS file at the same time.
Here's a basic version of what I ended doing applied to a 'hello world' script named helloworld.cmd:
/* 2> NUL
@echo off
cscript /e:javascript /nologo "%~f0" %*
@goto :eof
Hello World
Says 'Hello world.' when you run it.
*/
var outText = 'Hello world.';
WScript.Echo(outText);
Running this on a command prompt gives the following:
C:\Users\davris>helloworld
C:\Users\davris>/* 2>NUL
Hello world.
However, after a little more experimentation I found this was slightly overkill for my purposes since if I rename the file to helloworld.js and just type its name like a command it is
run by cscript:
C:\Users\davris>helloworld
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.
Hello world.
So this time I didn't need all that but if ever in the future I need to run a batch file then a JS file I can do it with one file...
cmd js technical cscript batch xslt xsl javascript