<?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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Coderguy's Blog &#187; Quick Tip</title>
	<atom:link href="http://www.coderguy.com/category/quick-tip/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.coderguy.com</link>
	<description>Thoughts on code</description>
	<lastBuildDate>Mon, 19 Jul 2010 15:22:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>jQuery Ajax Call Return Value</title>
		<link>http://www.coderguy.com/2010/06/jquery-ajax-call-return-value/</link>
		<comments>http://www.coderguy.com/2010/06/jquery-ajax-call-return-value/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 20:12:09 +0000</pubDate>
		<dc:creator>coderguy</dc:creator>
				<category><![CDATA[Quick Tip]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.coderguy.com/?p=61</guid>
		<description><![CDATA[I found myself needing a really quick way to do an ajax call and get the value returned to a single var. I did a lot of searching and found a lot of convoluted responses that involved callbacks.  Using callbacks would be overkill for what I was doing. After much searching I finally found this [...]]]></description>
			<content:encoded><![CDATA[<p>I found myself needing a really quick way to do an ajax call and get the value returned to a single var.  I did a lot of searching and found a lot of convoluted responses that involved callbacks.  Using callbacks would be overkill for what I was doing. After much searching I finally found this <a href="http://api.jquery.com/jQuery.get/#comment-36282315">jQuery API comment</a>. The comment explains how to just get a single value returned from an ajax call.  Here is the key points:</p>
<ol>
<li>Make sure the call is synchronized. (async: false)  This will allow you to wait for the response and not assign a blank value.</li>
<li>Understand that when you make the $.ajax() call this the data that is normally passed to the callbacks is stored in $.ajax().responseText.</li>
</ol>
<p><code>var response = $.ajax({ type: "GET", url: "check.php", async: false }).responseText;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderguy.com/2010/06/jquery-ajax-call-return-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show Forgein Keys in MySQL</title>
		<link>http://www.coderguy.com/2009/11/show-forgein-keys-in-mysql/</link>
		<comments>http://www.coderguy.com/2009/11/show-forgein-keys-in-mysql/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 15:20:19 +0000</pubDate>
		<dc:creator>coderguy</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Quick Tip]]></category>
		<category><![CDATA[foreign keys]]></category>

		<guid isPermaLink="false">http://www.coderguy.com/?p=52</guid>
		<description><![CDATA[Here is a handy query I found the mysql reference manual for how to see all the foreign keys in a database: SELECT ke.referenced_table_name parent, ke.table_name child, ke.constraint_name FROM information_schema.KEY_COLUMN_USAGE ke WHERE ke.referenced_table_name IS NOT NULL ORDER BY ke.referenced_table_name;]]></description>
			<content:encoded><![CDATA[<p>Here is a handy query I found the mysql reference manual for how to see all the foreign keys in a database:</p>
<pre>
SELECT ke.referenced_table_name parent, ke.table_name child, ke.constraint_name
FROM information_schema.KEY_COLUMN_USAGE ke
WHERE ke.referenced_table_name IS NOT NULL
ORDER BY ke.referenced_table_name;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.coderguy.com/2009/11/show-forgein-keys-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Couchdb CURL gotcha</title>
		<link>http://www.coderguy.com/2009/10/couchdb-curl-gotcha/</link>
		<comments>http://www.coderguy.com/2009/10/couchdb-curl-gotcha/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 16:04:19 +0000</pubDate>
		<dc:creator>coderguy</dc:creator>
				<category><![CDATA[Quick Tip]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[curl]]></category>

		<guid isPermaLink="false">http://www.coderguy.com/?p=49</guid>
		<description><![CDATA[So this is one of those stupid little development issues that eats up an hour of your time.  I am documenting this in hopes that it will save someone from wasting an hour of your time. I am learning couchdb and using curl to interact with it&#8217;s RESTful api.  I wrote a view and was [...]]]></description>
			<content:encoded><![CDATA[<p>So this is one of those stupid little development issues that eats up an hour of your time.  I am documenting this in hopes that it will save someone from wasting an hour of your time.</p>
<p>I am learning couchdb and using curl to interact with it&#8217;s RESTful api.  I wrote a view and was trying to limit it by a key.  I was issuing the commands:</p>
<p><code>curl -X GET http://127.0.0.1:5984/blog/_design/posts/_view/by_author?key="rob"</code></p>
<p>I was getting a 500 error for invalid json.  When I pasted the URL in the web browser I got a valid response.  The problem was that you needed to escape the quotes on the curl call as %22 not &#8220;.</p>
<p><code>curl -X GET http://127.0.0.1:5984/blog/_design/posts/_view/by_author?key=%22rob%22</code></p>
<p>Keep in mind you only have to put the quotes around string values a not around numeric values.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderguy.com/2009/10/couchdb-curl-gotcha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get the Mime Type of a File</title>
		<link>http://www.coderguy.com/2009/08/get-the-mime-type-of-a-file/</link>
		<comments>http://www.coderguy.com/2009/08/get-the-mime-type-of-a-file/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 15:30:57 +0000</pubDate>
		<dc:creator>coderguy</dc:creator>
				<category><![CDATA[Quick Tip]]></category>

		<guid isPermaLink="false">http://www.coderguy.com/?p=36</guid>
		<description><![CDATA[If you would like to know the mime type of the file you can use the file command with the -i -b options.  Example: &#62; file -i -b 20090731.flv application/octet-stream]]></description>
			<content:encoded><![CDATA[<p>If you would like to know the mime type of the file you can use the file command with the -i -b options.  Example:</p>
<p>&gt; file -i -b 20090731.flv</p>
<p>application/octet-stream</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderguy.com/2009/08/get-the-mime-type-of-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Session Numeric Key Bug</title>
		<link>http://www.coderguy.com/2009/07/php-session-numeric-key-bug/</link>
		<comments>http://www.coderguy.com/2009/07/php-session-numeric-key-bug/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 16:03:07 +0000</pubDate>
		<dc:creator>coderguy</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Quick Tip]]></category>
		<category><![CDATA[Software Developement]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[sessions]]></category>

		<guid isPermaLink="false">http://www.coderguy.com/?p=34</guid>
		<description><![CDATA[I was working on a 404 page today.  The pages that detected the 404 and routed it to the 404 page, would try and set the $_SESSION['404'] variable.  After setting the variable I was able to use it on that page.  However, after the redirect the variable was missing.  I could set other variables, and [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a 404 page today.  The pages that detected the 404 and routed it to the 404 page, would try and set the $_SESSION['404'] variable.  After setting the variable I was able to use it on that page.  However, after the redirect the variable was missing.  I could set other variables, and they would remain from page to page.  I put in some extra debugging and received the message:</p>
<p>Notice: Unknown: Skipping numeric key 404</p>
<p>This lead me to rename my variable to $_SESSION['url404'], which would stay set on the redirect.  I have not found any documentation that says that numeric keys are illegal for sessions vars, but I believe it to be the case.</p>
<p>Hope this saves you time in your PHP coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderguy.com/2009/07/php-session-numeric-key-bug/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Refresh MySQL Autocomplete: \#</title>
		<link>http://www.coderguy.com/2009/06/refresh-mysql-autocomplete/</link>
		<comments>http://www.coderguy.com/2009/06/refresh-mysql-autocomplete/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 20:16:30 +0000</pubDate>
		<dc:creator>coderguy</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Quick Tip]]></category>
		<category><![CDATA[mysql autocomplete]]></category>

		<guid isPermaLink="false">http://www.coderguy.com/?p=32</guid>
		<description><![CDATA[Here is nifty little tip.  If you need to have your command line MySQL autocomplete enabled or refresh the just type \# at the command line. mysql&#62;\# This is great for those times when you creating a lot of tables.]]></description>
			<content:encoded><![CDATA[<p>Here is nifty little tip.  If you need to have your command line MySQL autocomplete enabled or refresh the just type \# at the command line.</p>
<p>mysql&gt;\#</p>
<p>This is great for those times when you creating a lot of tables.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderguy.com/2009/06/refresh-mysql-autocomplete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
