urn page 12 - Dave's Blog

Search
My timeline on Mastodon

Easy Come Easy Go

2007 Sep 14, 7:37I previously mentioned how much I enjoyed my new office. Well my team has moved to a new building and although we get more offices total meaning no one on the team has to share an office, this building has less windowed surface area which means less people get window offices. Since I received the window office recently I'm kicked out now in FIFO order. Stacks are so sad.PermalinkCommentsmicrosoft work personal office nontechnical

Slashdot | LiveJournal Says Users are Responsible for Content of Links

2007 Sep 4, 1:52Do I need to look for a new blogging service? I'll just keep backing up my content...PermalinkCommentsblog censorship internet livejournal

Communications: No Quechup please

2007 Sep 4, 1:28I got a quechup invite this morning. Thankfully not from someone I know so I was already tempted to trash the letter. Turns out to be a bit of a spamming issue.PermalinkCommentsspam quechup network social privacy

ErrorZilla err ErrorSoft

2007 Aug 21, 4:04Seeing ErrorZilla I realized I could easily do a similar thing to the IE7 404 page using the same technique I used for the XML view and the feed view.

So that's what I did: I made a new 404 page for IE7. There's not much new here technically if you've read the previous blog entries to which I linked. My 404 page change adds links to the Internet Archive, the Coral Cache, and Whois Tool.PermalinkCommentsarchive personal res cache resource ie7 technical browser whois 404 error extension

Video Woes

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 PermalinkCommentstechnical youtube video personal livejournal homepage

Bunny Sniff and Shake

2007 Aug 13, 3:35
I've been told that family members after reading my webpage which contains some technical related material would turn to my cousins webpage. So, in an effort to not drive away readers I've...
From: David Risney
Views: 328
3 ratings
Time: 00:08 More in Pets & Animals
PermalinkCommentsvideo

Which which - Batch File Hackiness

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
PermalinkCommentswhich cmd technical batch for

Moved

2007 Aug 6, 4:07I've moved from my previous apartment in Redmond into Sarah's condo in Kirkland. Over the past week I'd been coming home from work and packing and sorting all of my belongings. Everything had a few destination options: I donated two carts of computer related junk (two CRTs, two desktops, six laptops, untold number of cables, piles of network and sound cards, etc) to RE-PC and six garbage bags of clothing that I either never wear or into which I have worn holes into friendly looking clothing donation bins. Of course I still need to find some place to get rid of my 15 inch CRT TV, VCR, DVD player, and X-Box. I finally emptied my bags of coins that had been collecting for about seven years (one of the bags was from my college orientation) through Coinstar and got ~$160. Some items seemed to fit very well at work like my satirical RIAA propaganda poster and my Darth Vader Nutcracker. This past weekend I had movers come and actually move my furniture. Most of its now in storage except for my living room which is moved into Sarah's second bedroom. Now all I have to do is unpack...PermalinkCommentsmove personal repc recycle nontechnical

Wp64 Issues

2007 Aug 6, 3:43Miladin told me about the Visual Studio compiler's promising option Wp64 that finds 64bit portability issues when compiling in 32bit. If, for instance, you cast from a (long*) to a (long) you get a W4 warning. However, the #defines are still set for 32bit builds. This means that other parts of the code can make assumptions based on the #defines that are valid on 32bit but generate 64bit errors or warnings.

For instance, in winuser.h the public published Windows header file there's the following:
...
#ifdef _WIN64
...
WINUSERAPI
LONG_PTR
WINAPI
SetWindowLongPtrA(
    __in HWND hWnd,
    __in int nIndex,
    __in LONG_PTR dwNewLong);
...
#else  /* _WIN64 */
...
#define SetWindowLongPtrA   SetWindowLongA
...
#endif /* _WIN64 */
...
In 64bit everything's normal but in 32bit SetWindowLongPtrA is #defined to SetWindowLongA which takes a LONG rather than a LONG_PTR. So take the following code snippet:
...
LONG_PTR inputValue = 0;
LONG_PTR error = SetWindowLongPtrA(hWnd, nIndex, inputValue);
...
This looks fine but generates warnings with the Wp64 flag.

In 64 bit, p is cast to (LONG_PTR) and that's great because we're actually calling SetWindowLongPtrA which takes a LONG_PTR. In 32 bit, p is cast to (LONG_PTR) which is then implicitly cast to (LONG) because we're actually calling SetWindowLongA. LONG and LONG_PTR are the same size in 32bit which is fine but if you turn on the Wp64 flag there's a W4 warning because of the implicit cast from a larger size to a smaller size if you were to compile for 64bit. So even though doing a 32bit or 64bit compile would have worked just fine, if you turn on the Wp64 flag for 32bit you'd get an error here.

It looks like I'm the most recent in a list of people to notice this issue. Well I investigated this so... I'm blogging about it too!PermalinkCommentswp64 technical 64bit compiler c++ visual-studio setwindowlongptra

How do I download all of my journal entries? - FAQ Question #8 - LiveJournal FAQ

2007 Jul 25, 10:08LiveJournal's FAQ describes how to download all of your blog entries. Seems like a good idea after LiveJournal disappeared for the day yesterday.PermalinkCommentsbackup howto livejournal blog

Ozzie

2007 Jun 25, 3:13I keep seeing 'Ozzie' on emails and such now due mainly to Ray Ozzie who is now the Chief Software Architect at Microsoft and his brother Jack Ozzie. Whenever I see his name I think of Ozzie from Chrono Trigger. He was one third of a trio of villains, the other two being Flea and Slash. I feel like I should be thinking of the Ozzy for which this Ozzie was named but I really don't.
Ray Ozzie. Links to license.Ozzie from Chrono Trigger. Links to license.Ozzy Osbourne. Links to license.
My next thought on Ozzie is the Scottish guy who went to my high school. He'd shout 'Ozzie! Ozzie! Ozzie!' to which listeners were compelled to respond 'Oi! Oi! Oi!'. The wikipedia article on the chant has some thoughts on the origins but I suppose at Microsoft it could take on entirely new meaning. I really hope I'm someday in a meeting with Ray or Jack Ozzie and have the opportunity...PermalinkCommentsozzy personal ozzie random nontechnical

Home : Nature Precedings

2007 Jun 18, 10:49"Nature Precedings is trying to overcome those limitations by giving researchers a place to post documents such as preprints and presentations in a way that makes them globally visible and citable."PermalinkCommentsscience research journal nature database collaboration archive community

RFC 2388 Returning Values from Forms: multipart/form-data

2007 Jun 15, 3:44Info on the format of the MIME type that contains data from an HTML form submission of enctype multipart/form-data.PermalinkCommentsform html mime multipart encoding rfc reference internet ietf

BBQ x 2

2007 Jun 11, 3:36This past weekend I was invited to two BBQs. Consequently, the weather took a break from the heat to drizzle.

The first was a lunch BBQ in celebration of Sarah's mom getting her Masters degree. Sarah and I went to her sister's house on the East-side where we had traditional foods you might associate with a BBQ including some enjoyable sausage. There was a bit of Wii to be had and Sarah's mom killed at bowling. Sarah seemed a bit dismayed at this. I guess Sarah didn't expect it since she's had more experience compared to her mom who was playing for the first time.

For dinner we drove over to Seattle to have a BBQ at Jeannie's house. Jeannie's family and my family became friends through our church when I was born and Jeannie even babysat me. The second bit about the babysitting is how Jeannie would introduce me at the BBQ. I met her boyfriend who seems like a cool guy. He works for Microsoft as a consultant and has traveled to various countries for his job. Guests had been instructed to bring side dishes and so there was quite a spread which was eclectic as well. We brought red potatoes, humus, and pita bread. As it turns out, one of the other guests had produced humus in bulk as a supplier and apparently had a grudge against the big humus chains. We played it cool and she didn't say anything so we can only assume she didn't know it was us. Jeannie was a great hostess and I had a fun time.PermalinkCommentsbbq washington personal nontechnical

WebWorld of J.P: Project - CatCamera using VistaQuest VQ1005

2007 Jun 3, 11:31Attaches digital camera to cat and creates photo journey.PermalinkCommentsart camera cat hack diy images humor photography photos electronics

IE7 Feed Display Update

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...PermalinkCommentsfeed res slashdot digg resource itunes technical browser ie rss extension

XPointer Framework - IE7 XML Source View Upgrade Part 3

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.PermalinkCommentsresource technical xml xpointer res xpath xslt

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

San Francisco Trip

2007 May 11, 7:48Hotel Diva BedAfter Carissa and Elijah's wedding Sarah and I went to San Francisco. We drove in, well Sarah drove anyway, still in the PT Cruiser Sunday morning and checked into our hotel, Hotel Diva. I was originally concerned that I wouldn't fit in as I don't really consider myself a diva, however the hotel was cool. They have Internet rooms setup in various themes, the front desk is always staffed, our room had a very modern look, and when we entered the flat-screen over the front desk was playing an episode of Aqua Teen Hunger Force.

Outside the SF Museum of Modern ArtWe walked around a bit before going to the SF Museum of Modern Art. There was a Picasso exhibit at the time which we could see for only $3 more. It felt kind of wrong like my ticket was super-sized. I think the most memorable piece I saw was three white panels which consisted of three blank panels. Art. Sure. After that Sarah wanted to see the giant Hello Kitty store she had heard of from her sister. We ended up going to the Westfield Shopping center which has a disappointingly average sized Hello Kitty store. Apparently the giant one is gone. That night we went to First Crush for dinner. I had a flight of wine which consists of three one-third sized glasses of various but complimentary wines. It was a great restaurant in terms of food, drink, atmosphere and service.

Sarah & I Pier 39The next morning we were even more the tourists when we went down to Fisherman's Wharf and Pier 39. We visited the famous wax museum and purchased multiple pounds of taffy. On the way back to the Oakland airport we got to experience a little traffic as part of the 580 freeway had collapsed the morning we arrived and was still under repair on our way out. We survived of course and I think the trip went rather well.PermalinkCommentssanfrancisco personal california sfmoma nontechnical

Neologies.net: Turn off that annoying clicking sound in Internet Explorer/Windows Explorer

2007 May 9, 7:40Turn off the clicking sound during IE navigation via the Control Panel.PermalinkCommentsie browser sound audio microsoft
Older EntriesNewer Entries Creative Commons License Some rights reserved.