<?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>Feet Have Been &#187; Search</title>
	<atom:link href="http://wheremy.feethavebeen.com/tag/search/feed/" rel="self" type="application/rss+xml" />
	<link>http://wheremy.feethavebeen.com</link>
	<description>Sometimes, you just go where your feet take you</description>
	<lastBuildDate>Tue, 24 Jan 2012 17:39:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Search array for Substring</title>
		<link>http://wheremy.feethavebeen.com/2010/07/search-array-for-substring/</link>
		<comments>http://wheremy.feethavebeen.com/2010/07/search-array-for-substring/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 14:56:22 +0000</pubDate>
		<dc:creator>xangelo</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[Search]]></category>

		<guid isPermaLink="false">http://wheremy.feethavebeen.com/?p=397</guid>
		<description><![CDATA[Occasionally you&#8217;ll need to create some sort of auto-complete field. While you could power this entirely via AJAX requests on a per-character basis, with limited resources, you may want to look at this alternative. Essentially you&#8217;ll create a javascript array containing allowed values. Whenever a user types in some characters, we can use some regex [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally you&#8217;ll need to create some sort of auto-complete field. While you could power this entirely via AJAX requests on a per-character basis, with limited resources, you may want to look at this alternative.</p>
<p>Essentially you&#8217;ll create a javascript array containing allowed values. Whenever a user types in some characters, we can use some regex coupled with a quick iteration to see if whatever the user entered is valid. If it is, we can easily return the matched values.</p>
<p>The function below is written in straight JavaScript. I monitor my keypress events via jQuery, but any way you want to do it is fine. Just make sure you call arrayFind() with the string you want to find and the array you want to search in.</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">function arrayFind(needle,haystack) {
var matchList = [];
var regex = new RegExp(needle,'gi');
for(i in haystack) {
	if(haystack[i].match(regex)) {
		matchList[matchList.length] = haystack[i];
	}
}
return matchList;
}</pre></div></div>

<p>If you didn&#8217;t need to use a variable for the regex you could eliminate that line and just use /searchterm/gi for a global case-insensitive search of the array. Since we are however, we need to make use of the RegExp object.</p>
]]></content:encoded>
			<wfw:commentRss>http://wheremy.feethavebeen.com/2010/07/search-array-for-substring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;ve been Binged.</title>
		<link>http://wheremy.feethavebeen.com/2009/09/ive-been-binged/</link>
		<comments>http://wheremy.feethavebeen.com/2009/09/ive-been-binged/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 00:34:45 +0000</pubDate>
		<dc:creator>xangelo</dc:creator>
				<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Search]]></category>

		<guid isPermaLink="false">http://wheremy.feethavebeen.com/?p=155</guid>
		<description><![CDATA[I&#8217;ve always been a little apprehensive of new Microsoft products, but this year they&#8217;ve continued to surprise me. First there was the beta version of Windows 7, which rendered my usual quip about not using anything beta and by Microsoft fairly useless (Why don&#8217;t you just wait till it comes out? It&#8217;ll be buggy enough [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wheremy.feethavebeen.com/wp-content/uploads/2009/09/Bing-Mozilla-Firefox.jpg"><img class="aligncenter size-medium wp-image-156" title="Bing!" src="http://wheremy.feethavebeen.com/wp-content/uploads/2009/09/Bing-Mozilla-Firefox-300x58.jpg" alt="Bing!" width="300" height="58" /></a></p>
<p>I&#8217;ve always been a little apprehensive of new Microsoft products, but this year they&#8217;ve continued to surprise me. First there was the beta version of Windows 7, which rendered my usual quip about not using anything beta and by Microsoft fairly useless (Why don&#8217;t you just wait till it comes out? It&#8217;ll be buggy enough to SEEM like it&#8217;s in beta). And now Bing. I&#8217;ve tried my very hardest to hate it and to think that Google was the clear winner, but I just couldn&#8217;t do it.</p>
<p>Before I begin comparing the two, let me just say that I&#8217;m still a huge Google fan. I&#8217;ve been since I started using computers and when they launched gMail, I actually paid for a beta invite. I&#8217;ve been using gMail and converting people to Google ever since. I know that by using Google so much they pretty much own my data, but I don&#8217;t care. I know I&#8217;ll continue to use them.</p>
<p>That being said, I hope they take a few pages from Microsoft.</p>
<p>Bing works. I know there&#8217;s the whole oxymoron joke going around about &#8220;Microsoft Works&#8221; but Bing really does work. I spent 4 days using Google to do some research for my day job. I can&#8217;t speak about WHAT I was looking for (I believe it falls under confidentiality agreements and such) but suffice it to say that I thought it should be fairly easy to find. It wasn&#8217;t. I wasted about 4 days worth of time looking things up. Then on a whim I decided to check out Bing. Imagine my surprise when the first time I ever use it it shows me exactly the results that I&#8217;d been hoping to find. Despite all our anecdotes about books and judges, first impressions really do matter. And Microsoft really hit it. I was actually floored. It made me consider how well the other Live services were coming along.</p>
<p>I haven&#8217;t had a chance to test out ALL of Bings options, but another thing I loved was the ability to keep scrolling during image searches. I hate page reloads and generally anything that might slow down my multi-tasking, and so being able to scroll through hundreds of images in one go was a great idea.</p>
<p>Currently I use Bing for all my searches and have been for the past few days. The only thing I really don&#8217;t like is the very busy interface that they have but I&#8217;m willing to give Microsoft the benefit of the doubt with this one. Things are really easy to see, and I like the addition excerpt feature, so I can live with the busy interface.</p>
<p>Now I can&#8217;t vouch for the rest of the Live services, but I WILL say that I really like the idea of the Live platform and being powered by Bing search I think Microsoft really has a chance to change peoples perceptions of them&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://wheremy.feethavebeen.com/2009/09/ive-been-binged/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

