Second page 2 - Dave's Blog

Search
My timeline on Mastodon

Feasibility and Real-World Implications of Web Browser

2010 May 23, 4:32"The ability to detect visitors' browsing history requires just a few lines of code. Armed with a list of websites to check for, a malicious webmaster can scan over 25 thousand links per second (1.5 million links per minute) in almost every recent browser."PermalinkCommentstechnical privacy security web browser

Shepard Fairey - Interview Magazine

2010 May 10, 8:59Iggy Pop interviews Shepard Fairey, including his Obama HOPE poster and AP lawsuit:

"... but the American public is generally pretty superficial, so an image like that just allows them to project whatever limited idea they have onto it. Obviously, not everyone is like that—I actually think there were a lot of people who were bummed by the image because they felt it was shallow propaganda."

"If I spend time conceiving and making a piece of art and somebody else sees that it has market value and replicates it in order to steal part of my market, then that’s not cool. But the way I make art—the way a lot of people make art—is as an extension of language and communication, where references are incredibly important. It’s about making a work that is inspired by something preexisting but changes it to have a new value and meaning that doesn’t in any way take away from the original—and, in fact, might provide the original with a second life or a new audience."
PermalinkCommentsart legal law ip shepard-fairey obey interview

View PDFs on Android

2010 Jan 10, 4:07

Irritatingly, my G1 won't show me PDFs so I've made the Google Docs PDF viewer which will load PDFs on the web up in Google Docs. Google Docs has the useful ability to display PDFs in web browsers without any Adobe software and works (mostly) on Android.

This was very easy to put together as an Android activity. First its necessary to register the application as handling PDFs from the web. This is done via the intent-filter declaration in the manifest:

   intent-filter
      action android:name="android.intent.action.VIEW"/
      data android:scheme="http" android:mimeType="application/pdf"/
      category android:name="android.intent.category.DEFAULT"/
      category android:name="android.intent.category.BROWSABLE"/
   /intent-filter
The action part says my activity will view PDFs, the data part says it accepts data with the PDF mime-type and with a URL that has an HTTP scheme. The browsable category is necessary to allow links from a browser to open this activity.

Second, the activity opens up the browser to Google Docs pointing to the PDF.

   Intent intent = new Intent();
   intent.setAction(getIntent().getAction());
   intent.setData(Uri.parse(
    "http://docs.google.com/gview?embedded=true&url=" + 
    percentEncodeForQuery(getIntent().getData().toString())));

   startActivity(intent);
This is very simple code to invoke a new intent browsing to a newly constructed URL for the PDF in Google Docs. That was easy.PermalinkCommentsgoogle docs technical g1 code activity programming android google pdf

Cheap Multiplayer Tricks for New Super Mario Bros. Wii

2010 Jan 5, 1:47

The New Super Mario Bros. Wii is a great game. Its the fun of old school Mario with the addition of great graphics and the kind of multiplayer I've wanted for Mario since playing the original as a child: its got up to four player simultaneous cooperative multiplayer. I recommend it to anyone who has enjoyed Mario in the past. Watch this amazing video of level 1-3 you can unlock in the game.

As noted elsewhere, multiple players attempting to navigate platforms, grab power ups, and throw turtle shells creates new challenges but along with that there's new ways to be incredibly cheap.

Jumping Higher
A second player means a head one can jump on to reach higher locations. Jump on your friend's head at the apex of their jump while holding down the jump button yourself for maximum jumping. In the game you can also grab other players and hold them over your head. This is useful for reaching the top of the flagpole at the end of levels. On that same line, if the player you grab has a flying cap you can now use them to fly in the same manner you would use a flying block which makes it easy to get two players to the top of the finish flagpole if only one of you has a flying cap.
Power-Ups
Normal power-up blocks now spawn enough power-ups for everyone. A mushroom is spawned for each small player and full power-ups for the rest, except in the case everyone is small: then one of the power-ups is a full power-up. If there's two players and you're both small, the full power-up always jumps out of the block to the right. Some hidden power-up blocks only give out one power-up and in that case its a mushroom or not based on the player who hits the block - so be sure that a big player hits that if you have one.
Death & Bubbles
When a player dies but at least one other player lives the dead player comes back in a limbo bubble from which they must be released before they may play again. Because of this, in a tough spot you can send one player in and leave a second behind. If the first dies you don't lose your place in the level and the first comes back in a bubble ready to try again. For instance, if you're trying to get the last star coin in 2-1 which sits just above the abyss, one player can just jump to their death for it and as long as another player lives you've collected the coin. However you need not sacrifice your life to do this: you can press down and 'a' to force yourself into a bubble saving yourself from death. This is true in general as long as you have enough time to see your death coming. This is also useful if one player runs ahead to the right. The screen will expand a bit but then it will just move to the right following the player in the lead. Players left behind walls or now forced into lava pits will die unless they use the bubble.
Misc.
  • If all players hit the ground at the same time from a ground pound it acts like hitting a pow block, killing the enemies on the screen.
  • If you hold a player who has a projectile power over your head they can still use their power.
  • Bubbles can be popped by hitting them with your fire or ice projectiles as well as thrown shells or blocks.
  • All players get the extra lives from anyone collecting 100 coins or finishing a level with more than 7 enemies on the screen.
PermalinkCommentsmultiplayer mario wii

Fun With the Minneapolis Mayoral Race - Boing Boing

2009 Nov 3, 5:02The sample ballot for Minneapolis elections is awesome (see second to last entry)PermalinkCommentshumor politics image

Brutal Mario ROM Hack - Play This Thing!

2009 Oct 25, 5:50Every level has its own twist. In one, P switches stop time as in enemies freeze as well as the level clock, which starts at 60 seconds. The enemies are taken from previous Mario games, Donkey Kong Country, Chrono Trigger, and others. Entertaining!
PermalinkCommentsgame mario download hack rom emulate nes nintendo japanese

Comcast Digital Switch Impact on My Windows Media Center

2009 Sep 25, 2:19

Amateur wireless station (LOC)Irritatingly out of line with what their commercials say, in my area Comcast, under the covers of the national broadcast digital switch, is sneaking in their own switch to digital, moving channels above 30 to their own digital format. Previously, I had Windows 7 Media Center running on a PC with a Hauppauge PVR500 which can decode two television signals at once setup to record shows I like. The XBox 360 works great as a Media Center client letting me easily watch the recorded shows over my home network on my normal TV.

Unfortunately with Comcast's change, now one needs a cable box or a Comcast digital to analog converter in order to view their signal, but Comcast is offering up to two free converters for those who'd like them. The second of my two free converters I hooked up to the Media Center PC and I got the IR Blaster that came with my Hauppauge out of the garage. I plugged in the USB IR Blaster to my PC, connected one of the IR transmitters to the 1st port on the IR Blaster, and sat the IR transmitter next to the converter's IR receiver. I went through the Media Center TV setup again and happily it was able to figure out how to correctly change the channel on the converter. So I can record now, however:

  1. I can only record one thing at a time now
  2. Changing the channel is slow taking many seconds (no flipping through channels for me)
  3. The Hauppauge card can't know if the channel change worked. So if it tries to change to HBO (I get it for free with one of the Comcast packages) which is encrypted and the converted won't show, the channel doesn't change but the PC doesn't know it and ends up recording some other channel.
To fix (3) I need to manually go through and remove channels I don't have from the Media Center. To fix (1) I may be able to get a second IR transmitter, a third digital converter, hook it up to one of the other inputs on my Hauppauge, and go back through the Media Center TV setup. There's no fix for (2) but that's not so bad. All in all, its just generally frustrating that they're breaking my setup with no obvious benefit.PermalinkCommentsdigital tv hauppauge mce cable windows media center comcast

Time/Date Conversion Tool

2009 Aug 28, 3:39

I built timestamp.exe, a Windows command line tool to convert between computer and human readable date/time formats mostly for working on the first run wizard for IE8. We commonly write out our dates in binary form to the registry and in order to test and debug my work it became useful to be able to determine to what date the binary value of a FILETIME or SYSTEMTIME corresponded or to produce my own binary value of a FILETIME and insert it into the registry.

For instance, to convert to a binary value:

[PS C:\] timestamp -inString 2009/08/28:10:18 -outHexValue -convert filetime
2009/08/28:10:18 as FILETIME: 00 7c c8 d1 c8 27 ca 01

Converting in the other direction, if you don't know what format the bytes are in, just feed them in and timestamp will try all conversions and list only the valid ones:

[PS C:\] timestamp -inHexValue  "40 52 1c 3b"
40 52 1c 3b as FILETIME: 1601-01-01:00:01:39.171
40 52 1c 3b as Unix Time: 2001-06-05:03:30:08.000
40 52 1c 3b as DOS Time: 2009-08-28:10:18:00.000
(it also supports OLE Dates, and SYSTEMTIME which aren't listed there because the hex value isn't valid for those types). Or use the guess option to get timestamp's best guess:
[PS C:\] timestamp -inHexValue  "40 52 1c 3b" -convert guess
40 52 1c 3b as DOS Time: 2009-08-28:10:18:00.000

When I first wrote this I had a bug in my function that parses the date-time value string in which I could parse 2009-07-02:10:18 just fine, but I wouldn't be able to parse 2009-09-02:10:18 correctly. This was my code:

success = swscanf_s(timeString, L"%hi%*[\\/- ,]%hi%*[\\/- ,]%hi%*[\\/- ,Tt:.]%hi%*[:.]%hi%*[:.]%hi%*[:.]%hi", 
&systemTime->wYear,
&systemTime->wMonth,
&systemTime->wDay,
&systemTime->wHour,
&systemTime->wMinute,
&systemTime->wSecond,
&systemTime->wMilliseconds) > 1;
See the problem?

To convert between these various forms yourself read The Old New Thing date conversion article or Josh Poley's date time article. I previously wrote about date formats I like and dislike.

PermalinkCommentsdate date-time technical time windows tool

Scalable Vector Graphics (SVG) 1.1 (Second Edition)

2009 Aug 24, 4:57"This specification defines the features and syntax for Scalable Vector Graphics (SVG) Version 1.1, a modularized language for describing two-dimensional vector and mixed vector/raster graphics in XML."PermalinkCommentssvg graphic web xml reference w3c technical

Linking to or Embedding a Portion of a Video

2009 Jun 19, 10:12

I'm excited by HTML5's video tag as are plenty of other people. Once that comes about and once media fragments are adopted, linking to or embedding a portion of a video will be as easy as using the correct fragment on your URL thanks to the Media Fragments WG who has been hard at work since the last time I looked at fragments.

However, until that work is embraced by browsers, embedding portions of videos will continue to require work specific to the site from which you are embedding the video. On the YouTube blog they wrote about how to "link to the best parts in your videos", using a fragment syntax like '#t=1m15s' to start playback of the associated video at 1 minute and 15 seconds. Of course if you want to embed part of a Hulu video it will be different. Although I haven't found an authoritative source describing the URL syntax to use, you can follow Hulu's video guide on linking to part of a video and note how the URL changes as you adjust the slider on the time-line. It looks like their syntax for linking to a Hulu page is to add '?c=[start time in seconds](:[end time in seconds])' with the colon and end time optional in order to link to a portion of a video. And the syntax for embedding appears to be "http://www.hulu.com/embed/.../[start time in seconds](/[end time in seconds])" again with the end time optional.

For more sites, check out the Media Fragments WG's list of existing applications' proprietary fragmenting schemes.

PermalinkCommentshulu technical media fragment wg url youtube video html5 uri fragment

What happened to me and the new girl (or: "The girl who cried Webmaster") - The Adventures of Accordion Guy in the 21st Century

2009 Jun 1, 2:03Wow, read this without expectations of what its about. This is the second identity-theft/Internet/personal-relationships story I've read. It makes me think we need VeriSign to do cert verification for personal relationships but then I must remind myself that this must not be very common...PermalinkCommentsvia:swannman identity identity-theft story psychology web blog joey-devilla

Infrared Paint Link Roundup

2009 May 29, 2:50

I like the idea of QR codes, encoding URLs and placing them on real world objects, but the QR codes themselves are kind of ugly. To make them less obvious I thought I could spray QR codes on to an object with an infrared reflective paint and shine infrared light on the QR codes, since most cameras, for instance the camera in my G1 phone, pick up infrared that our eyes do not.

In my search for infrared paint I've found a seller of IR ink (via programming forum) and an Infrared Paint Recipe (via IR FAQ).

In looking for this paint I've found that it comes up a lot in relation to the military for things like paint markers that are visible at night with proper equipment, and paint that absorbs IR light to make vehicles less obvious to night vision goggles. Even though the first reflects infrared light and the second absorbs it websites end up refering to both as infrared paint which made it difficult to search.

Additionally I found links to some other geeky infrared projects:

PermalinkCommentsir paint technical ir infrared qr qr code

Caught with Fake Info for Albertson Grocery Card

2009 May 25, 3:02

QFC grocery card barcodeChecking out at a grocery store to which I rarely go, the cashier asks me if I want an Albertson's card. I respond sure and she hands me the form on which I give up my personal information. I ask if I need to fill this out now, and she says yeah and it will only take two minutes, which surprised me because at QFC they just hand me a new card and send me on my way. I fill in my phone number as the first ten digits of pi so I don't have to worry about getting phone calls but its something I can remember next time I'm there and don't bring the card.

I turn to leave and the cashier asks me is that a '759' or '159' in my phone number. I stop for a second because I only know the digits as a sequence from the start and pause long enough reciting it in my head that its clear its not my phone number. And she calls me out on it: "Is that your real phone number?" I sigh, "No, does it have to be? Are you going to call me?" "Yeah," she says, "I'll call you." (ha ha) "Well I'll try entering this number," she says doubting the computer will accept the fake phone number. "On the number's already registered," she says, "So you already had a card." "No," says the manager who had walked up during for this exchange, "It means someone else used that same number." So the moral of the story is, try your fake phone number before trying to use it to get a new card.

PermalinkCommentspersonal2 pi albertsons

Night Run II, 1st Half on Flickr - Photo Sharing!

2009 May 6, 12:56Time lapse photography from the perspective of a large ship at night in Texas. "The camera was fastened to an outside rail and set to take a photo every six seconds. Quicktime then assembled the photos into a .mov file that plays back at 12 frames per second. So, one minute of movie time represents 72 minutes of trip time on the channel. The first half begins just below the Port of Houston Authority Turning Basin (the very end of the channel) and continues down to Green's Bayou."PermalinkCommentsflickr video photography travel camera texas ship boat

The Super Mario Bros. 3 'rainbow riding' LUA hack - Offworld

2009 Apr 15, 7:30Another cool Mario hack via some sort of awesome emulator: "...the FCEUX emulator includes a second LUA script that turns Super Mario Bros. 3 into the DS game Nintendo never made. The hack disables direct control of Mario completely, and only allows you to manipulate him (and protect him from the rest of the world) via mouse-drawn lines ala the DS's Kirby Canvas Curse and Atari's The Chase."PermalinkCommentsgame video mario smb3 videogame emulator

A Bulbdial Clock - Evil Mad Scientist Laboratories

2009 Apr 9, 8:56Someone implemented the Ironic Sans artificial sundial clock concept! "Last year David Friedman published on his blog Ironic Sans an interesting design concept for something that he called The Bulbdial Clock. That's like a sundial, but with better resolution-- not just an hour hand, but a minute and second hand as well, each given as a shadow from moving artificial light sources (bulbs). We've recently put together a working bulbdial clock, with an implementation somewhat different from that of the original concept."PermalinkCommentshowto diy clock led sundial via:swannman

Platonic Ideals in Anathem and The Atrocity Archives

2009 Apr 7, 11:58
The Atrocity ArchivesThe Jennifer MorgueAnathem

This past week I finished Anathem and despite the intimidating physical size of the book (difficult to take and read on the bus) I became very engrossed and was able to finish it in several orders of magnitude less time than what I spent on the Baroque Cycle. Whereas reading the Baroque Cycle you can imagine Neal Stephenson sifting through giant economic tomes (or at least that's where my mind went whenever the characters began to explain macro-economics to one another), in Anathem you can see Neal Stephenson staying up late pouring over philosophy of mathematics. When not exploring philosophy, Anathem has an appropriate amount of humor, love interests, nuclear bombs, etc. as you might hope from reading Snow Crash or Diamond Age. I thoroughly enjoyed Anathem.

On the topic of made up words: I get made up words for made up things, but there's already a name for cell-phone in English: its "cell-phone". The narrator notes that the book has been translated into English so I guess I'll blame the fictional translator. Anyway, I wasn't bothered by the made up words nearly as much as some folk. Its a good thing I'm long out of college because I can easily imagine confusing the names of actual concepts and people with those from the book, like Hemn space for Hamming distance. Towards the beginning, the description of slines and the post-post-apocalyptic setting reminded me briefly of Idiocracy.

Recently, I've been reading everything of Charles Stross that I can, including about a month ago, The Jennifer Morgue from the surprisingly awesome amalgamation genre of spy thriller and Lovecraft horror. Its the second in a series set in a universe in which magic exists as a form of mathematics and follows Bob Howard programmer/hacker, cube dweller, and begrudging spy who works for a government agency tasked to suppress this knowledge and protect the world from its use. For a taste, try a short story from the series that's freely available on Tor's website, Down on the Farm.

Coincidentally, both Anathem and the Bob Howard series take an interest in the world of Platonic ideals. In the case of Anathem (without spoiling anything) the universe of Platonic ideals, under a different name of course, is debated by the characters to be either just a concept or an actual separate universe and later becomes the underpinning of major events in the book. In the Bob Howard series, magic is applied mathematics that through particular proofs or computations awakens/disturbs/provokes unnamed horrors in the universe of Platonic ideals to produce some desired effect in Bob's universe.

PermalinkCommentsatrocity archives neal stephenson jennifer morgue plato bob howard anathem

DIY Pepsi Challenge

2009 Jan 25, 5:39

Deutsches MuseumMicrosoft isn't completely shielded from our economies issues but I still have a job and still get free soda. While that's all still the case, I decided to test Sarah's claimed ability to differentiate between Pepsi, Coke, and their diet counterparts by taste alone. I poured the four sodas into marked cups and Sarah and I each took two runs through the cups with the following guesses.

Soda Identification Challenge Results
Drink Sarah Dave
Guess 1 Guess 2 Guess 1 Guess 2
Coke Coke Coke Pepsi Diet Pepsi
Diet Coke Diet Coke Diet Pepsi Diet Coke Diet Coke
Pepsi Pepsi Pepsi Coke Coke
Diet Pepsi Diet Pepsi Diet Coke Diet Pepsi Pepsi
Total (out of 8) 6 3

As you can see from the results, Sarah's claimed ability to identify Coke and Pepsi by taste is confirmed. The first run through she got completely correct and on the second run only mistook Diet Pepsi for Diet Coke. Her excuse for the error on the second run was a tainted palate from the first run. I on the other hand was mostly incorrect. Surprisingly though my incorrect answers were mostly consistent between run one and two. For instance I thought Pepsi was Coke in both runs.

PermalinkCommentscoke microsoft waste of soda pepsi waste of time soda

Pro Pants! 2K9

2009 Jan 20, 2:25"Pro Pants, now in its second year, is a counter-movement to Improv Everywhere's annual No Pants! Subway Ride. The Pro Pants mission is to inform pantsless riders about the joys and advantages of pants and to persuade them to accept pants into their lives." Don't you hate pants?PermalinkCommentshumor pants subway improv-everywhere

Instaviz: Graph Sketching for your iPhone

2009 Jan 15, 8:00Cool application that turns your sketches into graphs. I wonder if this can ever come to my phone? "Sketch a rough shape with your finger and Instaviz transforms what you drew in a split second. Sketch a link between two shapes and Instaviz quickly redraws the graph with the best layout."PermalinkCommentsgraph visualization iphone graphviz phone software application development
Older EntriesNewer Entries Creative Commons License Some rights reserved.