<?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>Hello, I am Sean Murphy &#187; search</title>
	<atom:link href="http://iamseanmurphy.com/tag/search/feed/" rel="self" type="application/rss+xml" />
	<link>http://iamseanmurphy.com</link>
	<description>Thoughts, news, code by Sean Murphy</description>
	<lastBuildDate>Thu, 26 Jan 2012 02:37:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Binary Search for Javascript Arrays</title>
		<link>http://iamseanmurphy.com/2009/04/29/binary-search-for-javascript-arrays/</link>
		<comments>http://iamseanmurphy.com/2009/04/29/binary-search-for-javascript-arrays/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 21:41:12 +0000</pubDate>
		<dc:creator>Sean Murphy</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[binary search]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://iamseanmurphy.com/2009/04/29/binary-search-for-javascript-arrays/</guid>
		<description><![CDATA[If you need to search through a large array, or you search arrays frequently in your Javascript code, or if you do both, chances are a binary search will give you better performance than a linear search (read: for loop). One caveat, however, is that binary search algorithms only work on sorted arrays. Here is [...]]]></description>
			<content:encoded><![CDATA[<p>If you need to search through a large array, or you search arrays frequently in your Javascript code, or if you do both, chances are a binary search will give you better performance than a linear search (read: for loop). One caveat, however, is that binary search algorithms only work on sorted arrays. Here is a binary search function I sometimes use in my code:</p>
<p><span id="more-34"></span></p>
<pre name="code" class="js">Array.prototype.binSearch = function(needle, case_insensitive) {
    if (!this.length) return -1;

	var high = this.length - 1;
	var low = 0;
	case_insensitive = (typeof(case_insensitive) !== 'undefined' &amp;&amp; case_insensitive) ? true:false;
	needle = (case_insensitive) ? needle.toLowerCase():needle;

	while (low &lt;= high) {
		mid = parseInt((low + high) / 2)
		element = (case_insensitive) ? this[mid].toLowerCase():this[mid];
		if (element &gt; needle) {
			high = mid - 1;
		} else if (element &lt; needle) {
			low = mid + 1;
		} else {
			return mid;
		}
	}

	return -1;
};</pre>
]]></content:encoded>
			<wfw:commentRss>http://iamseanmurphy.com/2009/04/29/binary-search-for-javascript-arrays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursive Find and Replace With grep and Perl</title>
		<link>http://iamseanmurphy.com/2009/04/11/recursive-find-and-replace-with-grep-and-perl/</link>
		<comments>http://iamseanmurphy.com/2009/04/11/recursive-find-and-replace-with-grep-and-perl/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 20:51:56 +0000</pubDate>
		<dc:creator>Sean Murphy</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[find/replace]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://iamseanmurphy.com/2009/04/11/recursive-find-and-replace-with-grep-and-perl/</guid>
		<description><![CDATA[I thought it might be a nice idea to start posting useful little commands and bits of code every now and then&#8211;ones I&#8217;ve found to be particularly useful. So here&#8217;s the first one, recursive find and replace. A masterfully crafted regular expression paired with this command can save you hours of tedious work. This will [...]]]></description>
			<content:encoded><![CDATA[<p>I thought it might be a nice idea to start posting useful little commands and bits of code every now and then&#8211;ones I&#8217;ve found to be particularly useful. So here&#8217;s the first one, recursive find and replace. A masterfully crafted regular expression paired with this command can save you hours of tedious work.</p>
<p><span id="more-32"></span><br />
This will search all files recursively for SEARCH_STRING and replace all occurrences of SEARCH_STRING with REPLACE_STRING throughout each unique file found. It also creates a backup of each modified file so that FILE is backed-up as FILE~ (with a tilde).</p>
<pre name="code" class="python">grep -R --files-with-matches 'SEARCH_STRING' . | sort | uniq | xargs perl -pi~ -e 's/SEARCH_STRING/REPLACE_STRING/'</pre>
]]></content:encoded>
			<wfw:commentRss>http://iamseanmurphy.com/2009/04/11/recursive-find-and-replace-with-grep-and-perl/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Taking The Pain Out Of Domain Hunting</title>
		<link>http://iamseanmurphy.com/2009/03/30/taking-the-pain-out-of-domain-hunting/</link>
		<comments>http://iamseanmurphy.com/2009/03/30/taking-the-pain-out-of-domain-hunting/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 17:22:45 +0000</pubDate>
		<dc:creator>Sean Murphy</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[trionym]]></category>
		<category><![CDATA[whois]]></category>

		<guid isPermaLink="false">http://iamseanmurphy.com/2009/03/30/taking-the-pain-out-of-domain-hunting/</guid>
		<description><![CDATA[Coming up with a suitable name for a business, product, or website is something I do on a fairly regular basis. In brainstorming a name I often make lists of words I&#8217;d like to use, like adjectives and nouns than relate the product. Then I start combining the words to create a unique name and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://iamseanmurphy.com/wp-content/uploads/2009/04/screenshot.jpg" alt="Trionym Screenshot" /></p>
<p>Coming up with a suitable name for a business, product, or website is something I do on a fairly regular basis. In brainstorming a name I often make lists of words I&#8217;d like to use, like adjectives and nouns than relate the product. Then I start combining the words to create a unique name and check to see if the related domain is taken or not. The problem is that even though I may have come up with a name I really like, if the domain name is taken, it isn&#8217;t worth keeping.</p>
<p><span id="more-29"></span><br />
These days a LOT of domains are taken, either by people using them or companies squatting them. So to make this whole process a little easier I built a website that takes most of the work out of hunting for a good domain: <a href="http://trionym.org">Trionym</a>.The idea is fairly simple: enter up to three lists of words, choose which Top-Level Domains you&#8217;re willing to use, and search. Trionym will then create all the possible word combinations and check whois databases to see if the domains are registered. It&#8217;s relatively simple for now, but I&#8217;m considering adding more options, so if there&#8217;s a feature you&#8217;d like to see just let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://iamseanmurphy.com/2009/03/30/taking-the-pain-out-of-domain-hunting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

