<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>GiveGoodWeb</title>
	<atom:link href="http://www.givegoodweb.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.givegoodweb.com</link>
	<description>Web n' What-Not</description>
	<pubDate>Mon, 23 Aug 2010 21:57:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Pear DB and &#8220;DB Error: already exists&#8221; On Insert</title>
		<link>http://www.givegoodweb.com/post/149/pear-db-and-db-error-already-exists-on-insert</link>
		<comments>http://www.givegoodweb.com/post/149/pear-db-and-db-error-already-exists-on-insert#comments</comments>
		<pubDate>Thu, 24 Jun 2010 01:11:41 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.givegoodweb.com/?p=149</guid>
		<description><![CDATA[Note that this post relates to using a MySQL database in conjunction with the PEAR DB module, or any other PEAR module that depends on DB - like DB_TABLE (which I&#8217;ve been enjoying).
You might run into this error if you switch over from using PHP&#8217;s built-in MySQL functions, over to a database abstraction layer, which [...]]]></description>
			<content:encoded><![CDATA[<p>Note that this post relates to using a MySQL database in conjunction with the <a href="http://pear.php.net/package/DB">PEAR DB</a> module, or any other PEAR module that depends on DB - like <a href="http://pear.php.net/package/DB_Table">DB_TABLE</a> (which I&#8217;ve been enjoying).</p>
<p>You might run into this error if you switch over from using <a href="http://php.net/manual/en/book.mysql.php">PHP&#8217;s built-in MySQL functions</a>, over to a database abstraction layer, which is what I did on a recent project. After much banging-the-head-on-the-desk, I finally figured out that PEAR DB doesn&#8217;t use the same auto-increment sequence that the actual MySQL engine does.</p>
<p>For example, you may have a database using a CMS that doesn&#8217;t use PEAR. You do your various inserts, and inevitably, your deletes. So, your auto-increment column might start out in a perfect sequence like 1 - 2 - 3 - 4 - 5, etc. But then say the first two get deleted, so now your sequence id&#8217;s are 3 - 4 - 5. But then you insert again, and your CMS, using the DBMS directly, knows to use 6 for the next auto-increment value.</p>
<p>But then say you switch over to PEAR DB, and why wouldn&#8217;t you? It&#8217;s great - and readily bundled into most PHP installations. But then you notice, taking the above example, that your next insert starts at 1. Then the next insert produces an id of 2. And then you get to 3 and WHOA what happens, <strong>&#8220;DB Error: already exists&#8221;</strong> that&#8217;s wtf happens. <a href="http://pear.php.net/manual/en/package.database.db.intro-sequences.php">PEAR DB ignores MySQL&#8217;s auto-increment sequence and makes its own</a> <em>(jump down to the notes/warnings in red)</em>.<a href="http://pear.php.net/manual/en/package.database.db.intro-sequences.php"></a></p>
<p>You may also notice that you have table names with &#8220;_seq&#8221; at the end.</p>
<p>Why is this? I have no idea - but it&#8217;s <em>stooooopid</em>. Is there some reason for this? Seriously, please enlighten me! I mean, what&#8217;s an example of where you&#8217;d like to use more than 1 sequence?</p>
<p><img class="alignright size-medium wp-image-151" title="seq" src="http://www.givegoodweb.com/wp-content/uploads/2010/06/seq-300x206.gif" alt="seq" width="300" height="206" />So what to do? You need to alter those &#8220;_seq&#8221; tables, that&#8217;s what. So if you&#8217;re having trouble inserting into a table named &#8220;products&#8221; - get MySQL&#8217;s &#8220;Next Autoindex&#8221; value, which you can easily do in <a href="http://www.phpmyadmin.net">phpMyAdmin</a> on a table&#8217;s &#8220;structure&#8221; tab (see the screenshot, where it&#8217;s 20).</p>
<p>Now, go into the <em>products_seq</em> table, and change the id to that number (20 in this case). Now you shouldn&#8217;t have any problems.</p>
<p>So the moral of the story is, if you start out using a PEAR database abstraction layer, you&#8217;ll never have this problem. But if you&#8217;re unlucky enough to not have done that in the first place and switch over to it, you may have this issue and this is a quick fix.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.givegoodweb.com/post/149/pear-db-and-db-error-already-exists-on-insert/feed</wfw:commentRss>
		</item>
		<item>
		<title>Fancybox: Reload Parent Page When Closed</title>
		<link>http://www.givegoodweb.com/post/145/fancybox-reload-parent-page-when-closed</link>
		<comments>http://www.givegoodweb.com/post/145/fancybox-reload-parent-page-when-closed#comments</comments>
		<pubDate>Tue, 15 Jun 2010 23:15:42 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.givegoodweb.com/?p=145</guid>
		<description><![CDATA[ How to get that darn parent page to refresh itself when you close Fancybox.]]></description>
			<content:encoded><![CDATA[<p>This caused me a bit of a headache. I knew you had to use the <a href="http://fancybox.net/api">onClosed option</a> in your <a href="http://fancybox.net/">Fancybox</a> call, but wasn&#8217;t sure how to use it. For example, if you have a page full of images, and use Fancybox to add/edit those images, then you want that parent page to refresh when you close the Fancybox to show any changes you made.</p>
<p>In this example, I attach a Fancybox to any link with the class &#8220;editImage.&#8221; When it&#8217;s closed, the parent will refresh:</p>
<pre>$("a.editImage").fancybox({
  'width': 800,
  'height': 450,
  'onClosed': function() {
    parent.location.reload(true); ;
  }
});</pre>
<p>If you&#8217;re not sure what this means or how to use Fancybox, you should <a href="http://fancybox.net/howto">hop over here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.givegoodweb.com/post/145/fancybox-reload-parent-page-when-closed/feed</wfw:commentRss>
		</item>
		<item>
		<title>TextExpander Stopped Working? Try this.</title>
		<link>http://www.givegoodweb.com/post/142/textexpander-stopped-working-try-this</link>
		<comments>http://www.givegoodweb.com/post/142/textexpander-stopped-working-try-this#comments</comments>
		<pubDate>Wed, 02 Jun 2010 16:01:12 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[OS X]]></category>

		<category><![CDATA[gtd]]></category>

		<guid isPermaLink="false">http://www.givegoodweb.com/?p=142</guid>
		<description><![CDATA[Suddenly I noticed that my beloved TextExpander just stops working/expanding for no apparent reason. Restarting the app didn&#8217;t work, but what does work is restarting Firefox.
I guess there&#8217;s some conflict between Firefox version 3.6.x and the TextExpander engine. So the quick fix seems to be to just restart Firefox when this happens.
Evidently, this isn&#8217;t fixed [...]]]></description>
			<content:encoded><![CDATA[<p>Suddenly I noticed that my beloved <a href="http://www.smileonmymac.com/TextExpander/">TextExpander</a> just stops working/expanding for no apparent reason. Restarting the app didn&#8217;t work, but what does work is restarting Firefox.</p>
<p>I guess there&#8217;s some conflict between Firefox version 3.6.x and the TextExpander engine. So the quick fix seems to be to just restart Firefox when this happens.</p>
<p>Evidently, this isn&#8217;t fixed in TE3 - so no need to upgrade with hope of this getting fixed (at least not of this writing).</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.givegoodweb.com/post/142/textexpander-stopped-working-try-this/feed</wfw:commentRss>
		</item>
		<item>
		<title>Baiduspider, Twiceler, and Yeti - Bad Robots!</title>
		<link>http://www.givegoodweb.com/post/136/baiduspider-twiceler-and-yeti-bad-robots</link>
		<comments>http://www.givegoodweb.com/post/136/baiduspider-twiceler-and-yeti-bad-robots#comments</comments>
		<pubDate>Fri, 02 Apr 2010 18:22:29 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://www.givegoodweb.com/?p=136</guid>
		<description><![CDATA[One of the websites I manage had been experiencing tremendous use in bandwidth. &#8220;Sweet!&#8221; we thought, a solid boost in traffic is a good thing. But as time went by, it kept going up and up in an unreal way - something was awry. After checking the log files, I saw that the 3 bots [...]]]></description>
			<content:encoded><![CDATA[<p>One of the websites I manage had been experiencing tremendous use in bandwidth. &#8220;Sweet!&#8221; we thought, a solid boost in traffic is a good thing. But as time went by, it kept going up and up in an unreal way - something was awry. After checking the log files, I saw that the 3 bots mentioned above seemed to be literally attacking the website. After some Googling, I found that some or all of these robots have run amuck on other websites too, and are generally worthless as far as supplying any valuable traffic - so I just blocked them all by placing the following in my .htaccess file:</p>
<pre>Options +FollowSymLinks
RewriteEngine on

# block bad bots

RewriteCond %{HTTP_USER_AGENT} ^Baiduspider [NC]
RewriteRule ^.*$ http://google.com/ [R,L]

RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5(.*)Twiceler
RewriteRule . http://www.cuill.com/your_bot_sucks [R=301]

RewriteCond %{HTTP_USER_AGENT} ^Yeti [NC]
RewriteRule ^.*$ http://google.com/ [R,L]

# end bad bots</pre>
<p>The above is a combination of various Googling<em> (I wish I kept the links so I can thank the fine folks that helped me address this)</em>. You can send them away to any site you like - in the first and last I just kicked them to Google, and for the second I sent the robot back to it&#8217;s own site. My bandwidth now seems to back down to normal levels. Try them out, monitor your bandwidth and log files, and tweak as needed - good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.givegoodweb.com/post/136/baiduspider-twiceler-and-yeti-bad-robots/feed</wfw:commentRss>
		</item>
		<item>
		<title>Drupal - Select List &#8220;default_value&#8221;</title>
		<link>http://www.givegoodweb.com/post/132/drupal-select-list-default_value</link>
		<comments>http://www.givegoodweb.com/post/132/drupal-select-list-default_value#comments</comments>
		<pubDate>Mon, 29 Mar 2010 22:19:08 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://www.givegoodweb.com/?p=132</guid>
		<description><![CDATA[After beating my head against the desk the past hour, I finally figured out that to set a default value on a plain select list, you need to use &#8220;#value&#8221; and not &#8220;#default_value&#8221;. So, for example, say I have an array of banks consisting of the bank id and the bank name, like so:
$banks = [...]]]></description>
			<content:encoded><![CDATA[<p>After beating my head against the desk the past hour, I finally figured out that to set a default value on a plain select list, you need to use &#8220;#value&#8221; and not &#8220;#default_value&#8221;. So, for example, say I have an array of banks consisting of the bank id and the bank name, like so:</p>
<pre>$banks = array(14=&gt;"bank one", 22=&gt;"bank two);</pre>
<p>I then want to construct a simple select form element, this WILL NOT work:</p>
<pre>$form['drop'] = array(
 #id' =&gt; "bank_drop",
 '#type' =&gt; 'select',
 '#title' =&gt; 'test',
 '#options' =&gt; $banks,
 '<span style="color: #ff0000;">#default_value</span>' =&gt; 22  // will NOT work!
);</pre>
<p>But this works:</p>
<pre>$form['drop'] = array(
  #id' =&gt; "bank_drop",
  '#type' =&gt; 'select',
  '#title' =&gt; 'test',
  '#options' =&gt; $banks,
  '<span style="color: #339966;"><strong>#value</strong></span>' =&gt; 22  // works!
);</pre>
<p>This was on Drupal 6.15</p>
<p>Hope that saves someone some headache :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.givegoodweb.com/post/132/drupal-select-list-default_value/feed</wfw:commentRss>
		</item>
		<item>
		<title>Sizing and Positioning Fancybox</title>
		<link>http://www.givegoodweb.com/post/125/sizing-and-positioning-fancybox</link>
		<comments>http://www.givegoodweb.com/post/125/sizing-and-positioning-fancybox#comments</comments>
		<pubDate>Mon, 15 Feb 2010 19:16:54 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.givegoodweb.com/?p=125</guid>
		<description><![CDATA[You&#8217;ve probably seen Fancybox all over the place. In a way, it&#8217;s the living-successor of ThickBox and Lightbox.
I was recently on a project where I had to both size and place it. Sizing it it easy. Say you have a link tag with an id of opener, like this:
&#60;a id="opener" href="http://www.google.com"&#62;Google&#60;/a&#62;
To create and size the [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve probably seen <a href="http://fancybox.net">Fancybox</a> all over the place. In a way, it&#8217;s the living-successor of ThickBox and Lightbox.</p>
<p>I was recently on a project where I had to both size and place it. Sizing it it easy. Say you have a link tag with an id of opener, like this:</p>
<pre>&lt;a id="opener" href="http://www.google.com"&gt;Google&lt;/a&gt;</pre>
<p>To create and size the fancybox that will open when it&#8217;s clicked, you&#8217;d just add the following javascript to your page:</p>
<pre>&lt;script type="text/javascript" charset="utf-8"&gt;<br style="font-size: 18px; line-height: 27px;" />  $(document).ready(function(){<br style="font-size: 18px; line-height: 27px;" />  $("#opener").fancybox({<br style="font-size: 18px; line-height: 27px;" />    'width': 390,<br style="font-size: 18px; line-height: 27px;" />    'height': 400<br style="font-size: 18px; line-height: 27px;" />  });<br style="font-size: 18px; line-height: 27px;" />});</pre>
<p>Note that pixels is assumed, you should not say something like &#8220;390 pixels&#8221; like you would in css, it won&#8217;t work then.</p>
<p>So, above we have defined a fancybox that is 390 pixels wide, and 400 pixels high. Next we need to position it.</p>
<p><em>(Note this is based on Fancybox 1.3 - I can&#8217;t say if it&#8217;ll work with other versions.)</em></p>
<p>Fancybox puts everything in a layer with an id of &#8220;fancybox-wrap&#8221; - so we can easily manipulate it with basic css, like so:</p>
<pre>#fancybox-wrap {
  margin: -70px 0 0 290px;
}</pre>
<p>You can do the same with padding, maybe even positioning.</p>
<p>Hope that helps someone!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.givegoodweb.com/post/125/sizing-and-positioning-fancybox/feed</wfw:commentRss>
		</item>
		<item>
		<title>Drupal: Redirecting a User After Login</title>
		<link>http://www.givegoodweb.com/post/121/drupal-redirecting-a-user-after-login</link>
		<comments>http://www.givegoodweb.com/post/121/drupal-redirecting-a-user-after-login#comments</comments>
		<pubDate>Thu, 07 Jan 2010 20:21:52 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://www.givegoodweb.com/?p=121</guid>
		<description><![CDATA[This has me beating my head on the desk a bit. I&#8217;m coding up a Drupal 6 module, and wanted to redirect the user after logging in, depending on what role they belong to.
In this example, let&#8217;s say I have a role called &#8220;treasurer&#8221; - and anyone that&#8217;s logged in and not a treasurer is [...]]]></description>
			<content:encoded><![CDATA[<p>This has me beating my head on the desk a bit. I&#8217;m coding up a Drupal 6 module, and wanted to redirect the user after logging in, depending on what role they belong to.</p>
<p>In this example, let&#8217;s say I have a role called &#8220;treasurer&#8221; - and anyone that&#8217;s logged in and <em>not</em> a treasurer is an administrator. In my module (called mymod here), I knew that <a href="http://api.drupal.org/api/function/hook_user/6">hook_user</a> would do the trick somehow. Note that in hook_user, the $op variable contains what operation is being performed, and &#8220;login&#8221; is an option we can use here. So, this will fire right after the login form is processed and the user is loaded. The $account variable contains the entire $user object being worked on (so we can use it instead of a <em>&#8220;global $user&#8221;</em> declaration). Here&#8217;s what I originally wanted to do but <strong>it does not work</strong>:</p>
<pre>function mymod_user($op, &amp;$edit, &amp;$account, $category = NULL) {
  switch ($op) {
    case 'login':
      if (in_array('treasurer', $account-&gt;roles)) {
        drupal_goto('user/' . $account-&gt;uid);
      } else {
        drupal_goto('admin/users');
      }
      break;
    default:
      // nothing
      break;
  }
}</pre>
<p>We can&#8217;t  use <a href="http://api.drupal.org/api/function/drupal_goto/6">drupal_goto</a> here, surprisingly. But after a little Googling, here is the way to do it - <strong>this works</strong>:</p>
<pre>function mymod_user($op, &amp;$edit, &amp;$account, $category = NULL) {
  switch ($op) {
    case 'login':
      if (in_array('treasurer', $account-&gt;roles)) {
        $_REQUEST['destination'] = 'user/' . $account-&gt;uid;
      } else {
        $_REQUEST['destination'] = 'admin/user/user';
      }
      break;
    default:
      // nothing
      break;
  }
}</pre>
<p>In short, we just need to set $_REQUEST['destination'] to whatever we want. In the above example, if the user is a treasurer, we sent them to their user account page. Otherwise, we know that it&#8217;s an administrator (since that&#8217;s the only other role I set up), and we show the admin all the users. Tailor to your needs. Note that if your destination has a url alias setup, this will automatically fetch the alias too. Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.givegoodweb.com/post/121/drupal-redirecting-a-user-after-login/feed</wfw:commentRss>
		</item>
		<item>
		<title>Tweeting from Launchbar</title>
		<link>http://www.givegoodweb.com/post/115/tweeting-from-launchbar</link>
		<comments>http://www.givegoodweb.com/post/115/tweeting-from-launchbar#comments</comments>
		<pubDate>Mon, 07 Dec 2009 21:27:24 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.givegoodweb.com/?p=115</guid>
		<description><![CDATA[I&#8217;ve been checking out Launchbar, thinking replacing my beloved Quicksilver because supposedly it is not being worked on much anymore. While viewing these very helpful Launchbar Video tutorials, I noticed one of them was about Tweeting from Launchbar. For firing off a quick tweet, this is very handy.
However, I had problems getting the script mentioned [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been checking out <a href="http://www.obdev.at/products/launchbar/index.html">Launchbar</a>, thinking replacing my beloved Quicksilver because supposedly it is not being worked on much anymore. While viewing these <a href="http://www.zettt.de/2009/04/mac-launchbar-tutorial-1/">very helpful Launchbar Video tutorials</a>, I noticed one of them was about <a href="http://www.zettt.de/2009/04/mac-launchbar-tutorial-5/">Tweeting from Launchbar</a>. For firing off a quick tweet, this is very handy.</p>
<p>However, I had problems getting the script mentioned in the tutorial to work. After some more searching and tweaking, I can came up with this script, which works well enough for me and gives Launchbar credit for the tweet, which makes you look super cool/geeky as most folks will probably be like <em>what the hell is this Launchbar???</em></p>
<p><em><a href="http://tr.im/GWR1"><img class="alignnone size-full wp-image-116" title="cartman-tweet" src="http://www.givegoodweb.com/wp-content/uploads/2009/12/cartman-tweet.png" alt="cartman-tweet" width="358" height="93" /></a><br />
</em></p>
<p>To use this script, open up Script Editor and copy it in, Compile and save it into ~/Library/Application Support/LaunchBar/Actions - where Launchbar should pick it up. From there, just use as <a href="http://www.zettt.de/2009/04/mac-launchbar-tutorial-5/">shown in the video</a>. Note this assumes you have <a href="http://growl.info/">Growl</a> installed - which you should ;)</p>
<pre>using terms from application "LaunchBar"
    on handle_string(tweet)
        -- Init
        my growlRegister()
        set charcount_max to 140
        set charcount_tweet to (count characters of tweet)

        -- Check message length
        if charcount_tweet ? charcount_max then
            -- Get credentials for twitter.com
            tell application "Keychain Scripting"
                set twitter_key to first Internet key of current keychain whose server is "twitter.com"
                set twitter_login to quoted form of (account of twitter_key &amp; ":" &amp; password of twitter_key)
            end tell

            set twitter_status to quoted form of ("source=launchbarat&amp;status=" &amp; tweet)
            try
                -- Send tweet
                do shell script "curl --user " &amp; twitter_login &amp; " --data-binary " &amp; twitter_status &amp; " http://twitter.com/statuses/update.json"
                -- Display success message
                growlNotify("Tweet Sent:", tweet)
            on error
                -- Display error message
                growlNotify("Error Tweeting.", "Try again?")
            end try
        else
            -- Tweet is too long
            growlNotify("Tweet Too Long", "Tweet is " &amp; charcount_tweet &amp; " characters long. The maximum length is " &amp; charcount_max &amp; " characters.")
        end if
    end handle_string
end using terms from

using terms from application "GrowlHelperApp"
    -- Register Growl
    on growlRegister()
        tell application "GrowlHelperApp"
            register as application "Tweet" all notifications {"Alert"} default notifications {"Alert"} icon of application "Script Editor.app"
        end tell
    end growlRegister

    -- Notify using Growl
    on growlNotify(grrTitle, grrDescription)
        tell application "GrowlHelperApp"
            notify with name "Alert" title grrTitle description grrDescription application name "Tweet"
        end tell
    end growlNotify
end using terms from</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.givegoodweb.com/post/115/tweeting-from-launchbar/feed</wfw:commentRss>
		</item>
		<item>
		<title>Finding Duplicates in MySQL</title>
		<link>http://www.givegoodweb.com/post/113/finding-duplicates-in-mysql</link>
		<comments>http://www.givegoodweb.com/post/113/finding-duplicates-in-mysql#comments</comments>
		<pubDate>Wed, 25 Nov 2009 17:31:08 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.givegoodweb.com/?p=113</guid>
		<description><![CDATA[I get quite a few Excel files from clients that need to get cleaned up and inserted in to MySQL. Sometimes the import goes smoothly, sometimes it doesn&#8217;t. This last time, I had 3,741 rows in an Excel file, but somehow wound up with 3,751 rows in the database - what went wrong? Don&#8217;t know, [...]]]></description>
			<content:encoded><![CDATA[<p>I get quite a few Excel files from clients that need to get cleaned up and inserted in to MySQL. Sometimes the import goes smoothly, sometimes it doesn&#8217;t. This last time, I had 3,741 rows in an Excel file, but somehow wound up with 3,751 rows in the database - what went wrong? Don&#8217;t know, and don&#8217;t have time to figure it out - so I just used this query to isolate all the duplicates.</p>
<p>My database table consists of nothing more than an id, a part number (number), a description, and a price. Here&#8217;s the query that located all duplicate part numbers - from there I was able to easily delete them:</p>
<pre>SELECT number,
 COUNT(number) AS NumOccurrences
FROM part_prices_new
GROUP BY number
HAVING ( COUNT(number) &gt; 1 )</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.givegoodweb.com/post/113/finding-duplicates-in-mysql/feed</wfw:commentRss>
		</item>
		<item>
		<title>Easily Search a Twitter Stream</title>
		<link>http://www.givegoodweb.com/post/107/easily-search-a-twitter-stream</link>
		<comments>http://www.givegoodweb.com/post/107/easily-search-a-twitter-stream#comments</comments>
		<pubDate>Wed, 18 Nov 2009 21:45:05 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.givegoodweb.com/?p=107</guid>
		<description><![CDATA[I occasionally see people wondering how to search their Twitter stream, or anybody&#8217;s Twitter stream for that matter. Sure, you can easily search all of twitter for something, but what about limiting a search to a particular user? Twitter&#8217;s search features are pretty hit or miss for such specific searches, so as long as the [...]]]></description>
			<content:encoded><![CDATA[<p>I occasionally see people wondering how to search their Twitter stream, or anybody&#8217;s Twitter stream for that matter. Sure, you can easily search <em>all </em>of twitter for something, but what about limiting a search to a particular user? Twitter&#8217;s search features are pretty hit or miss for such specific searches, so as long as the account being searched is public and accessible to anyone, Google will have indexed it much more efficiently than Twitter.</p>
<p>So&#8230; I would try to explain how to use Google to restrict a search to a particular website or even part of a website. That wasn&#8217;t working so well. So I just made a website that does it for you - <a title="Twitter stream search" href="http://www.searchapeepstweets.com/">Search a Peep&#8217;s Tweets</a>. It even remembers your most recent searches for you.</p>
<div class="mceTemp">
<dl id="attachment_108" class="wp-caption alignnone" style="width: 411px;">
<dt class="wp-caption-dt"><a href="http://www.searchapeepstweets.com/"><img class="size-medium wp-image-108" title="sapt" src="http://www.givegoodweb.com/wp-content/uploads/2009/11/sapt-300x191.png" alt="Searc a Peep's Tweets" width="401" height="255" /></a></dt>
</dl>
</div>
<p>As a comparison, I used Twitter&#8217;s <em>advanced search</em> to search my Twitter account (stoptime) for &#8220;beer&#8221; -  I get <a title="no results!" href="http://search.twitter.com/search?q=&amp;ands=beer&amp;phrase=&amp;ors=&amp;nots=&amp;tag=&amp;lang=all&amp;from=stoptime&amp;to=&amp;ref=&amp;near=&amp;within=15&amp;units=mi&amp;since=&amp;until=&amp;rpp=15">no results</a>. The same search on Google gives me <a title="leave search to the masters" href="http://www.google.com/search?q=beer+site%3Atwitter.com%2Fstoptime">10 results</a>. So hopefully this&#8217;ll be useful and easy, cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.givegoodweb.com/post/107/easily-search-a-twitter-stream/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
