<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Disqus - Latest Comments for David Stone</title><link>http://disqus.com/people/b6fce1fe2ff5c31e4a23e1c9cd5f32bb/</link><description></description><language>en</language><lastBuildDate>Fri, 10 Aug 2007 15:25:33 -0000</lastBuildDate><item><title>Re: Remove array item</title><link>http://lifeisgrand.disqus.com/remove_array_item/#comment-1280686</link><description>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.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Thu, 13 Jul 2006 17:24:24 -0000</pubDate></item><item><title>Re: Remove array item</title><link>http://lifeisgrand.disqus.com/remove_array_item/#comment-1280688</link><description>You'd think...but setting this = this.filter... actually results in an error because you're not allowed to re-assign to this.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Fri, 14 Jul 2006 12:15:17 -0000</pubDate></item><item><title>Re: Remove array item</title><link>http://lifeisgrand.disqus.com/remove_array_item/#comment-1280690</link><description>But is that really better than the iteration and the splice?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Fri, 14 Jul 2006 15:55:17 -0000</pubDate></item><item><title>Re: Remove array item</title><link>http://lifeisgrand.disqus.com/remove_array_item/#comment-1280691</link><description>Here. This:&lt;br&gt;&lt;br&gt;Array.prototype.remove = function(item_to_remove)&lt;br&gt;{&lt;br&gt;   var index;&lt;br&gt;   while((index = this.indexOf(item_to_remove)) != -1)&lt;br&gt;   {&lt;br&gt;      this.splice(index, 1);&lt;br&gt;   }&lt;br&gt;}&lt;br&gt;&lt;br&gt;That'll remove all of the items that match. For instance:&lt;br&gt;&lt;br&gt;var filtered = [1, 2, 3, 4, 5, 6, 5, 7, 8, 5, 9, 10];&lt;br&gt;filtered.remove(5);&lt;br&gt;document.write(filtered);&lt;br&gt;&lt;br&gt;1,2,3,4,6,7,8,9,10</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Fri, 14 Jul 2006 16:40:42 -0000</pubDate></item><item><title>Re: Remove array item</title><link>http://lifeisgrand.disqus.com/remove_array_item/#comment-1280692</link><description>Better:&lt;br&gt;&lt;br&gt;Array.prototype.remove = function(item_to_remove)&lt;br&gt;{&lt;br&gt;var index;&lt;br&gt;while((index = this.indexOf(item_to_remove)) != -1)&lt;br&gt;{&lt;br&gt;this.splice(index, 1);&lt;br&gt;}&lt;br&gt;return this;&lt;br&gt;}&lt;br&gt;&lt;br&gt;That way you can do:&lt;br&gt;&lt;br&gt;var filtered = [1, 2, 3, 4, 5, 6, 5, 7, 8, 5, 9, 10].remove(5);&lt;br&gt;document.write(filtered);</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Fri, 14 Jul 2006 16:46:17 -0000</pubDate></item><item><title>Re: Remove array item</title><link>http://lifeisgrand.disqus.com/remove_array_item/#comment-1280695</link><description>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: &lt;a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array" rel="nofollow"&gt;http://developer.mozilla.org/en/docs/Core_JavaS...&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Mon, 17 Jul 2006 13:43:58 -0000</pubDate></item><item><title>Re: jQuery and GreaseMonkey</title><link>http://lifeisgrand.disqus.com/jquery_and_greasemonkey/#comment-1280747</link><description>Same trick we use in CPhog:&lt;br&gt;&lt;br&gt;var theScript = document.createElement("script");&lt;br&gt;theScript.src = "http://jquery.com/src/latest.js";&lt;br&gt;theScript.language = "javascript";&lt;br&gt;document.body.insertBefore(theScript, document.body.firstChild);&lt;br&gt;&lt;br&gt;:)&lt;br&gt;&lt;br&gt;I even opened up Firebug to try it out...it works. :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Sun, 23 Jul 2006 19:33:51 -0000</pubDate></item><item><title>Re: jQuery and GreaseMonkey</title><link>http://lifeisgrand.disqus.com/jquery_and_greasemonkey/#comment-1280749</link><description>Yeah. That's actually a better idea. It was kinda late last night when I wrote that. ;)&lt;br&gt;&lt;br&gt;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.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Mon, 24 Jul 2006 13:42:28 -0000</pubDate></item><item><title>Re: A first podcast</title><link>http://lifeisgrand.disqus.com/a_first_podcast/#comment-1280775</link><description>Heh. It's always kinda weird to find out what other CPians sound like.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Thu, 03 Aug 2006 12:17:21 -0000</pubDate></item><item><title>Re: On buying WinZip</title><link>http://lifeisgrand.disqus.com/on_buying_winzip/#comment-1280845</link><description>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.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Fri, 11 Aug 2006 14:20:38 -0000</pubDate></item><item><title>Re: Site browsers</title><link>http://lifeisgrand.disqus.com/site_browsers/#comment-1281239</link><description>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.&lt;br&gt;&lt;br&gt;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.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Fri, 22 Sep 2006 16:59:18 -0000</pubDate></item><item><title>Re: Mrs. Wallace</title><link>http://lifeisgrand.disqus.com/mrs_wallace/#comment-1281791</link><description>Dude. That's awesome. Thanks for linking to that, Paul. :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Thu, 22 Feb 2007 16:41:37 -0000</pubDate></item><item><title>Re: The Motion Picture</title><link>http://lifeisgrand.disqus.com/the_motion_picture/#comment-1282480</link><description>You realize that TMP is one of the worst trek movies of them all...right?&lt;br&gt;&lt;br&gt;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.&lt;br&gt;&lt;br&gt;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</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Stone</dc:creator><pubDate>Fri, 10 Aug 2007 15:25:33 -0000</pubDate></item></channel></rss>