DISQUS

David Stone's picture

Unregistered

Feeds

aliases

  • David Stone

David Stone

1 year ago

in The Motion Picture on Life is grand
You realize that TMP is one of the worst trek movies of them all...right?

Wrath of Khan, of course, more than makes up for its deficiencies. But seriously, TMP always feels like they tried to take a one hour episode and turn it into a feature length film. And they half succeeded, but only by interspersing several 10 minute musical overtures between bits of dialogue.

BTW, I managed to score the box set of all the directors cut ST films for about $35 the other day when Borders was doing a 40% off all box sets promotion. :-D

1 year ago

in Mrs. Wallace on Life is grand
Dude. That's awesome. Thanks for linking to that, Paul. :)

2 years ago

in Site browsers on Life is grand
This wouldn't be that hard. You'd have to host Gecko (look to Camino for hosting Gecko in a Cocoa environment) and hook the Dock. That's about it.

Also, you can use the Gmail notifier. You'd just have to hack the JS inside the XPI (which is just a zip file with a different extension). I'm sure it's just a matter of pointing it at a different domain.

2 years ago

in On buying WinZip on Life is grand
Bleh. WinZip sucks. 7zip is where it's at. Even if you never use the archive browser, the shell integration is so powerful it's ridiculous. And fast too...freaking fast.

2 years ago

in A first podcast on Life is grand
Heh. It's always kinda weird to find out what other CPians sound like.

2 years ago

in jQuery and GreaseMonkey on Life is grand
Yeah. That's actually a better idea. It was kinda late last night when I wrote that. ;)

Another thing that breaks-ish is that if you include all sites with that user script, then secure sites won't be marked as secure because some items aren't secured.

2 years ago

in jQuery and GreaseMonkey on Life is grand
Same trick we use in CPhog:

var theScript = document.createElement("script");
theScript.src = "http://jquery.com/src/latest.js";
theScript.language = "javascript";
document.body.insertBefore(theScript, document.body.firstChild);

:)

I even opened up Firebug to try it out...it works. :)

2 years ago

in Remove array item on Life is grand
Andrew: Here's the JS Array Object documentation that lists what functions Array does have. As you can see, map is in there. And I think reduce is kinda like every: http://developer.mozilla.org/en/docs/Core_JavaS...

2 years ago

in Remove array item on Life is grand
Better:

Array.prototype.remove = function(item_to_remove)
{
var index;
while((index = this.indexOf(item_to_remove)) != -1)
{
this.splice(index, 1);
}
return this;
}

That way you can do:

var filtered = [1, 2, 3, 4, 5, 6, 5, 7, 8, 5, 9, 10].remove(5);
document.write(filtered);

2 years ago

in Remove array item on Life is grand
Here. This:

Array.prototype.remove = function(item_to_remove)
{
var index;
while((index = this.indexOf(item_to_remove)) != -1)
{
this.splice(index, 1);
}
}

That'll remove all of the items that match. For instance:

var filtered = [1, 2, 3, 4, 5, 6, 5, 7, 8, 5, 9, 10];
filtered.remove(5);
document.write(filtered);

1,2,3,4,6,7,8,9,10

2 years ago

in Remove array item on Life is grand
But is that really better than the iteration and the splice?

2 years ago

in Remove array item on Life is grand
You'd think...but setting this = this.filter... actually results in an error because you're not allowed to re-assign to this.

2 years ago

in Remove array item on Life is grand
I'd tend to say that using the Array.filter method would be a cleaner way of doing it...but filter doesn't change the actual array, so you couldn't use that.
Returning? Login