pub page 8 - Dave's Blog

Search
My timeline on Mastodon

Date Time Formats

2007 Sep 27, 2:17Starting on a new simple project I wanted to get the history of my Delicious links. Delicious has an export tool available via the settings section so I thought I'd try that. However, the links aren't exported in XML not even in XHTML but rather in HTML. Shocking. An example:
"Don't Tase Me, Bro!" (UF Student Tasered Remix)
Remix of the 'Don't tase me, bro!' guy getting tasered.At this point I'm already not going to use this file because its in HTML but I'm even more disgusted by those date time values. Raymond Chen of the Old New Thing posted about recognizing timestamps and timestamp sentinel values. From the first blog post and with the use of a calculator for base conversion one can tell that those are UNIX style timestamps counting the number of seconds since 1970.

It reminds me of my hatred for the MIME date time format I developed working on my webpage's server side parsing of atom and RSS. Atom is of course my favorite as Atom uses the Internet date time format described in the following documents. Here's an example of one 2007-09-27T020:50:00.000-08:00 On the other hand the evil and villainous RSS uses the MIME date time format now described in the more recent IETF MIME standard. Here's an example Thu, 27 Sep 2007 20:50:00 -0800
The Internet date time format has the advantage of being so easy to sort. An alphabetic sort with normal C-style collation rules of strings containing Internet date times will also sort them chronologically. This is not the case for the MIME date time due to the preceding day of the week and the spelled out month name. This also means that when producing these you have to figure out the day of the week and when parsing them you have to match month names rather than just parsing out numbers. Anyway now days if I see mention of a date time in a new proposed standard or spec I be sure to point out the numerous advantages of the Internet date time format.
PermalinkCommentsdate xml html feed time technical date-time code atom rss

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

Technophilia: Where to find public records online - Lifehacker

2007 Jul 23, 3:19List of sites to find public information on folks.PermalinkCommentsbackground search database birthday library identity privacy public phone lifehack

Pick Your Candidate (2008 Presidential Candidates)

2007 Jul 22, 7:50Enter your views on various topics and see which candidates publicly stated opinions most match.PermalinkCommentsgovernment politics quiz vote

Seattle Department of Transportation: City's Old Street Signs Now Available to the Public

2007 Jul 14, 3:17Purchase used Seattle street signs from the Seattle DOT.PermalinkCommentsgovernment street signs purchase shopping seattle

Backup Notes

2007 Jul 13, 8:30I bought an external backup drive a few weekends ago. I've previously setup a Subversion repository so I decided to move everything into the repository and then back it up. So in went the contents of all of my %USERPROFILE% and ~ directories with a bit of sorting and pruning. Not too much though given its much easier to dump in everything and search for what I want then to take the time to examine and grade each file. What follows are the notes I took while setting this up. It takes me a bit of time to look up the help on each command so I figure I'll write it all down here for the benefit of myself and potentially others...

Setting Up the Backup Drive For Linux
I first changed the filesystem on the drive to ext3. I plugged it into my USB2.0 port and ran fdisk:

sudo fdisk /dev/sda

Useful commands I used to do this follow mostly in order:
m
help
p
print current partitions
d
delete current partition
n
create new partition (I used the defaults)
w
write changes and exit
Then I formatted for ext3.

sudo mkfs.ext3 /dev/sda1

I made it easy to mount:

sudo vim /etc/fstab
# added line to end:
/dev/sda1 /media/backup ext3 rw,user,noauto 0 0

I setup the directory structure on the disk

mount /media/backup
sudo mkdir /media/backup/users
sudo mkdir /media/backup/users/dave
sudo chown dave:dave /media/backup/users/dave


After all that its easy to make a copy of the Subversion repository:

mount /media/backup
cp -Rv /home/dave/svn /media/backup/users/dave/
umount /media/backup

Next on the agenda is to add a cron job to do this regularly.

Subversion Command Reference
On a machine that has local access to the Subversion repository you can check out a specific subdirectory as follows using the file scheme:

svn co file:///home/dave/svn/trunk/web/dave%40deletethis.net/public_html

Note also that although one of my directories is named 'dave@deletethis.net' Subversion requires the '@' to be percent-encoded.
Other useful subversion commands:
svn help
help
svn list file:///home/dave/svn/
list all files in root dir of svn depot
svn list -R file:///home/dave/svn/
list all files in svn depot
svn list -R file:///home/dave/svn/ | grep \/$
list all directories
svn status
List status of all files in the working copy directory as in - modified, not in repository, etc
svn update
Brings the working copy up to date wrt the repository
svn commit
Commit changes from the working copy to the repository
svn add / move / delete
Perform the specified action -- occurs immediately


Setting up Windows Client for Auto Auth into SVN
When using an SVN client on Windows via svn+ssh its useful to have the Windows automatically generate connections to the SVN server. I use putty on my Windows machines so I read the directions on using public keys with putty.

putty.exe dave@deletethis.net
cd .ssh
vim authorized_keys # leave the putty window open for now
puttygen.exe
Click the 'generate' button
Move the mouse around until finished
Copy text in 'Public key for pasting into OpenSSH authorized_keys file:' to putty window & save & close putty window
Enter Key passphrase & Comment in puttygen
Save the private key somewhere private
pageant.exe
'Add Key' the private key just saved.



Checking out using Tortoise SVN
On one of my Windows machines I've already installed Tortoise SVN. Checking out from my SVN repository was really easy. I just right clicked in Explorer in a directory and selected "SVN Checkout...". Then in the following dialog I entered the svn URI:

svn+ssh://dave@deletethis.net/home/dave/svn/trunk/web/dave%40deletethis.net/public_html/

Note again that the '@' that is part of the directory name is percent-encoded as '%40' while the '@' in the userinfo is not.

Windows Command Line Check Out
On my media center I didn't want to install Tortoise SVN so rather I used the command line tool. I setup pageant like before the only difficulty was getting the SVN command line tool to use putty. With the default configuration you can use the SVN_SSH environment variable to point at a compliant SSH command line tool. The trick is that its interpreted as a backslash escaped string. So I set mine thusly:

set SVN_SSH=C:\\users\\dave\\bin\\putty\\plink.exe

The escaping solved the vague error I received about not being able to create the tunnel.PermalinkCommentsbackup technical personal windows svn linux subversion

WSDOT Seattle Area Traffic - I-5: NE 45th St

2007 May 29, 5:59Traffic map of the seattle area.PermalinkCommentstraffic camera car public government tool free travel

Web Mashups Turn Citizens Into Washington's Newest Watchdogs (Wired)

2007 May 2, 1:12Voting records from congress people available as well as money trail information.PermalinkCommentsarticle politics mashup web blog social public privacy voting

Trivia

2007 Apr 21, 11:38This previous Wednesday, I went to trivia at the Wilde Rover. Our team consisted of Sarah, myself, Jane, Eric, Rachel, and Ansen. Before the last round we were 16th (out of ~32) but after the final round we were 6th! The previous time Sarah played there the exact same thing happened. Of course you must be in the top five to win money (or last place who gets their money back). You could say, of those who didn't get any money we did the best! I didn't contribute too much except for spotting a street from Paris in the picture round and knowing which generation the Wii is of Nintendo home consoles. Mostly I focused on increasing our bill =)PermalinkCommentsbar game personal trivia nontechnical

Hole-in-the-Wall Experiment

2007 Apr 12, 2:29Social experminet to see what happens when a computer is made publicly available to poor children with no previous knowledge of computers or the English language.PermalinkCommentscomputer computer-literacy india article experiment education internet

Bunny Weekend

2007 Apr 8, 3:46This weekend was fun. Sarah and I went out for Jane's Birthday. We ate at a little Italian restaurant where our group was almost too large for the place and afterwards went to the Viceroy lounge. The website apparently isn't very representative because although I looked at it before going out and I'd been to the place previously, I didn't realize it was the same location until we got there.

I got several games for my Wii through Sarah's connections including Wii Play and The Legend of Zelda: Twilight Princess. We played both of them and I thought Find Mii was especially fun.

Sarah's bunny is getting pretty big. Its been biting through wires now includig part way through the power cord to the cable box. You'd think after getting to the copper that it would learn to stop. At any rate, it didn't hide any eggs. I don't have any new photos but you can see the old bunny photos via my Vizicious tool.PermalinkCommentspersonal nontechnical seatle wii

'Talking' CCTV scolds offenders (BBC NEWS | UK | England)

2007 Apr 5, 11:45British cameras watching the public now have loudspeakers hooked up to scold people behaving inappropriately. What year is it?PermalinkCommentsparanoia government tv camera article bbc

Using public keys for SSH authentication

2007 Mar 19, 3:13Documentation on setting up SSH to use keys.PermalinkCommentssecurity ssh howto key publickey putty

Vizicious Update

2007 Mar 14, 12:44I've been working on a personal project Vizicious. Vizicious displays a graph of your delicious links or (this is the new part) your flickr photos.

I had this previously on my old website but I've rewritten it and separated out the presentation portion from the part that does all the real work. This means its alot easier for me to incorporate new kinds of input (like flickr feeds).

Anyway, if you're not interested in the details just click here to see my photos tagged 'france' run through Vizicious.PermalinkCommentsvizicious technical homepage

RDFa Primer 1.0

2006 Nov 28, 5:11RDFa is a syntax for expressing such metadata in XHTML. The rendered, hypertext data of XHTML is reused by the RDFa markup, so that publishers don't repeat themselves. The underlying abstract metadata representation is RDF, which lets publishers build thePermalinkCommentshtml metadata semanticweb rdf specification w3c xml xhtml rdfa reference

Index of /Public/MAPPINGS/VENDORS

2006 Nov 27, 2:41Unicode's own list of mappings from Unicode to and from various vendor specific implementations of codepages.PermalinkCommentscode development programming unicode codepage reference

Commercial Exploitation of Europe's Public Sector Information

2006 Nov 27, 2:15Public bodies are by far the largest producers of information in Europe. This information is recognised as a major, but so far under-exploited asset, which could and should be a fundamental building block of the ‘new economy’ in the Information SociPermalinkCommentsstudy economics europe public-domain information government read

Top 10 Public Domain Movies - Wired 14.10: START

2006 Oct 4, 1:16Top 10 Public Domain MoviesPermalinkCommentsarticle copyright domain free public movie video torrent read

Pierced Eyeglasses [The Publisher’s Ring]

2006 May 22, 3:46The idea of hanging eyeglasses from a piercing or a combination of piercings or even transdermal implants is something that a lot of us have toyed with — as I was writing this, my old boss Tom Brazda reminded me that almost ten years ago we made a set oPermalinkCommentscool culture hardware glasses piercing design weird bodymod

» Is there media bias for Firefox over IE? | George Ou | TechRepublic.com

2006 Apr 17, 11:30PermalinkCommentsblog firefox ie web internet open-source mozilla microsoft media-bias
Older EntriesNewer Entries Creative Commons License Some rights reserved.