<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en" xml:base="http://www.onlineaspect.com/wp-atom.php">
	<title type="text">Online Aspect by Josh Fraser</title>
	<subtitle type="text">a blog about building stuff on the web</subtitle>

	<updated>2009-10-09T22:50:40Z</updated>
	<generator uri="http://wordpress.org/" version="2.7.1">WordPress</generator>

	<link rel="alternate" type="text/html" href="http://www.onlineaspect.com" />
	<id>http://www.onlineaspect.com/feed/atom/</id>
	

	<link rel="hub" href="http://pubsubhubbub.appspot.com" /><link rel="hub" href="http://superfeedr.com/hubbub" />		<geo:lat>40.020885</geo:lat><geo:long>-105.296733</geo:long><link rel="self" href="http://feeds.feedburner.com/OnlineAspect" type="application/atom+xml" /><feedburner:emailServiceId>OnlineAspect</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FOnlineAspect" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FOnlineAspect" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FOnlineAspect" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/OnlineAspect" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FOnlineAspect" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FOnlineAspect" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FOnlineAspect" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><entry>
		<author>
			<name>Josh Fraser</name>
						<uri>http://www.joshfraser.com</uri>
					</author>
		<title type="html"><![CDATA[One of my favorite quotes]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OnlineAspect/~3/MM1aL8iQt6Y/" />
		<id>http://www.onlineaspect.com/?p=539</id>
		<updated>2009-10-04T08:36:47Z</updated>
		<published>2009-10-04T08:36:47Z</published>
		<category scheme="http://www.onlineaspect.com" term="Uncategorized" /><category scheme="http://www.onlineaspect.com" term="failure" /><category scheme="http://www.onlineaspect.com" term="quotes" /><category scheme="http://www.onlineaspect.com" term="struggle" /><category scheme="http://www.onlineaspect.com" term="success" />		<summary type="html">Thanks Theodore Roosevelt.  This inspires me every time I read it:
It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face is [...]</summary>
		<content type="html" xml:base="http://www.onlineaspect.com/2009/10/04/one-of-my-favorite-quotes/">&lt;p&gt;Thanks Theodore Roosevelt.  This inspires me every time I read it:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming; but who does actually strive to do the deeds; who knows great enthusiasms, the great devotions; who spends himself in a worthy cause; who at the best knows in the end the triumph of high achievement, and who at the worst, if he fails, at least fails while daring greatly, so that his place shall never be with those cold and timid souls who neither know victory nor defeat.&lt;/p&gt;&lt;/blockquote&gt;
&lt;img src="http://feeds.feedburner.com/~r/OnlineAspect/~4/MM1aL8iQt6Y" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.onlineaspect.com/2009/10/04/one-of-my-favorite-quotes/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.onlineaspect.com/2009/10/04/one-of-my-favorite-quotes/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://www.onlineaspect.com/2009/10/04/one-of-my-favorite-quotes/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Josh Fraser</name>
						<uri>http://www.joshfraser.com</uri>
					</author>
		<title type="html"><![CDATA[Head to head: PubSubHubbub vs. rssCloud]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OnlineAspect/~3/OoUadRItNGg/" />
		<id>http://www.onlineaspect.com/?p=531</id>
		<updated>2009-09-10T05:02:51Z</updated>
		<published>2009-09-10T04:53:56Z</published>
		<category scheme="http://www.onlineaspect.com" term="Uncategorized" /><category scheme="http://www.onlineaspect.com" term="pubsubhubbub" /><category scheme="http://www.onlineaspect.com" term="real-time" /><category scheme="http://www.onlineaspect.com" term="rsscloud" />		<summary type="html">Today I was honored to write my first guest post for TechCrunch in an attempt to give a detailed comparison of PubSubHubbub and rssCloud both from a technical and business perspective.  I&amp;#8217;m pretty sure I can now lay claim to one of the geekiest posts to ever make it onto TechCrunch.
The post was titled [...]</summary>
		<content type="html" xml:base="http://www.onlineaspect.com/2009/09/09/head-to-head-pubsubhubbub-vs-rsscloud/">&lt;p&gt;Today I was honored to write my first guest post for TechCrunch in an attempt to give a detailed comparison of &lt;a href="http://code.google.com/p/pubsubhubbub/"&gt;PubSubHubbub&lt;/a&gt; and &lt;a href="http://rsscloud.org/"&gt;rssCloud&lt;/a&gt; both from a technical and business perspective.  I&amp;#8217;m pretty sure I can now lay claim to one of the geekiest posts to ever make it onto TechCrunch.&lt;/p&gt;
&lt;p&gt;The post was titled &lt;a href="http://www.techcrunch.com/2009/09/09/rsscloud-vs-pubsubhubbub-why-the-fat-pings-win/"&gt;RSSCloud Vs. PubSubHubbub: Why The Fat Pings Win&lt;/a&gt; and was really a follow up to my previous post on &lt;a href="http://www.onlineaspect.com/2009/05/25/the-protocols-powering-the-real-time-web/"&gt;The Protocols Powering the Real-time Web&lt;/a&gt;.  If you&amp;#8217;re arriving here for the first time from TechCrunch, that post is a good place to start.&lt;/p&gt;
&lt;p&gt;As a reminder, you can add PuSH support to your own blog by downloading my &lt;a href="http://wordpress.org/extend/plugins/pubsubhubbub/"&gt;WordPress plugin for PubSubHubbub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I can&amp;#8217;t tell you how incredibly exciting it is for me to be a part of something that I believe will be the future of the web.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/OnlineAspect/~4/OoUadRItNGg" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.onlineaspect.com/2009/09/09/head-to-head-pubsubhubbub-vs-rsscloud/#comments" thr:count="3" />
		<link rel="replies" type="application/atom+xml" href="http://www.onlineaspect.com/2009/09/09/head-to-head-pubsubhubbub-vs-rsscloud/feed/atom/" thr:count="3" />
		<thr:total>3</thr:total>
	<feedburner:origLink>http://www.onlineaspect.com/2009/09/09/head-to-head-pubsubhubbub-vs-rsscloud/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Josh Fraser</name>
						<uri>http://www.joshfraser.com</uri>
					</author>
		<title type="html"><![CDATA[Coding for the unexpected]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OnlineAspect/~3/nWC0Yf4DrVE/" />
		<id>http://www.onlineaspect.com/?p=518</id>
		<updated>2009-09-01T00:56:15Z</updated>
		<published>2009-08-31T18:33:36Z</published>
		<category scheme="http://www.onlineaspect.com" term="Uncategorized" /><category scheme="http://www.onlineaspect.com" term="coding" /><category scheme="http://www.onlineaspect.com" term="Immutability" /><category scheme="http://www.onlineaspect.com" term="integrated web" /><category scheme="http://www.onlineaspect.com" term="thoughts" />		<summary type="html">You could write a piece of code, run it a million times, wait ten years, run it again and get exactly the same results.  At least that&amp;#8217;s what I used to believe.
One of the things I love about computers is that they are boringly consistent.  Given the same input, a computer will return the same [...]</summary>
		<content type="html" xml:base="http://www.onlineaspect.com/2009/08/31/coding-for-the-unexpected/">&lt;p&gt;You could write a piece of code, run it a million times, wait ten years, run it again and get exactly the same results.  At least that&amp;#8217;s what I used to believe.&lt;/p&gt;
&lt;p&gt;One of the things I love about computers is that they are boringly consistent.  Given the same input, a computer will return the same output EVERY SINGLE TIME.  Likewise, code doesn&amp;#8217;t change.  I could save a file on my computer and if it weren&amp;#8217;t for hardware failure it would remain the same byte-for-byte until the end of time.  Code doesn&amp;#8217;t change. It&amp;#8217;s just a bunch of mathematical statements bound together by rules of logic that are burned into a tiny computer chip.  Or in geek terminology, code is &lt;a href="http://en.wikipedia.org/wiki/Immutability"&gt;immutable&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In theory this sounds great.  The problem is it doesn&amp;#8217;t mesh with the everyday reality of my life.  My code breaks all the time without me changing a thing.&lt;/p&gt;
&lt;p&gt;I remember getting an email from someone complaining that they couldn&amp;#8217;t login to an application I had written.  The strange thing about this was that I hadn&amp;#8217;t touched that code in years.  The servers were being managed and had been pretty reliable.  How could my application break if no one had broken it?  I SSH&amp;#8217;d onto the server and quickly realized my server logs had gotten so large that there wasn&amp;#8217;t any room left on the hard drive for new session files to be created.  I deleted the log files and changed my server settings to stop it from happening again.&lt;/p&gt;
&lt;p&gt;Since then I&amp;#8217;ve had countless experiences where code broke unexpectedly.  The culprits vary.  Sometimes it&amp;#8217;s hardware failure.  Sometimes an unchecked log file.  More often, it&amp;#8217;s the result of user input that I didn&amp;#8217;t anticipate or an integration with an external service that fails.&lt;/p&gt;
&lt;p&gt;You would think that we would be getting better at anticipating and preventing these sort of issues from happening.   But from what I can tell, these sort of issues are happening MORE OFTEN these days, not less.  On one hand, we&amp;#8217;re getting smarter.  We&amp;#8217;ve learned from our mistakes  about truncating server logs and baking in automatic fail-over for hardware issues.  But there&amp;#8217;s a bigger trend happening on the web right now that is throwing some huge variables into the equation.  Very few applications stand alone anymore.  Every application now has a million integrations with Twitter, Facebook, Flickr, YouTube&amp;#8230; you name it!   And guess what?  Every one of those services throws another kink into the chain, giving us more uncertainty and more points of failure to try and anticipate.&lt;/p&gt;
&lt;p&gt;The integrated web is here to stay.  As developers, we need to figure out how we&amp;#8217;re going to deal with this new layer of uncertainty in our applications.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/OnlineAspect/~4/nWC0Yf4DrVE" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.onlineaspect.com/2009/08/31/coding-for-the-unexpected/#comments" thr:count="2" />
		<link rel="replies" type="application/atom+xml" href="http://www.onlineaspect.com/2009/08/31/coding-for-the-unexpected/feed/atom/" thr:count="2" />
		<thr:total>2</thr:total>
	<feedburner:origLink>http://www.onlineaspect.com/2009/08/31/coding-for-the-unexpected/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Josh Fraser</name>
						<uri>http://www.joshfraser.com</uri>
					</author>
		<title type="html"><![CDATA[My wish list for Facebook]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OnlineAspect/~3/gzBupXVW2k8/" />
		<id>http://www.onlineaspect.com/?p=498</id>
		<updated>2009-08-31T18:28:11Z</updated>
		<published>2009-08-30T00:41:48Z</published>
		<category scheme="http://www.onlineaspect.com" term="Uncategorized" /><category scheme="http://www.onlineaspect.com" term="facebook" /><category scheme="http://www.onlineaspect.com" term="random" />		<summary type="html">I&amp;#8217;m a big fan of Facebook.  It&amp;#8217;s one of the few services I use every day and I find it to be invaluable for keeping up with people.  One of the results of using any service a lot, is that it makes it really easy to point out the flaws and features that are [...]</summary>
		<content type="html" xml:base="http://www.onlineaspect.com/2009/08/29/my-wish-list-for-facebook/">&lt;p&gt;I&amp;#8217;m a big fan of &lt;a href="http://www.facebook.com"&gt;Facebook&lt;/a&gt;.  It&amp;#8217;s one of the few services I use every day and I find it to be invaluable for keeping up with people.  One of the results of using any service a lot, is that it makes it really easy to point out the flaws and features that are missing.  Here are a few things I&amp;#8217;d love to see implemented in Facebook:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I wish&lt;/strong&gt; Facebook had nested comments on newsfeed items.  I often find myself annoyed by the flood of notifications I receive after other people interact with an item I commented on or liked.  As a result, I find myself commenting less when I think it&amp;#8217;s likely I&amp;#8217;m going to be spammed.  Nested comments would solve this problem as I could receive notifications only for direct replies to what I said.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I wish&lt;/strong&gt; I could untag myself in pictures.  This feature doesn&amp;#8217;t seem to be working consistently.  I click &amp;#8220;remove tag&amp;#8221; and Facebook redirects me to my profile page without untagging me.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I wish&lt;/strong&gt; the vertical spacing on the top header was even in the new design. &lt;a href="http://www.onlineaspect.com/uploads/fixfb.user.js"&gt; I&amp;#8217;m OCD&lt;/a&gt;.  Small details like this tend to drive me crazy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I wish&lt;/strong&gt; the messaging system worked better.  The two main things I want are reply-by-email and my inbox count in facebook to be automatically decremented after I read a notification email.  This could easily implemented by adding a simple beacon to the notification emails.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I wish&lt;/strong&gt; chat worked with XMPP as &lt;a href="http://developers.facebook.com/news.php?blog=1&amp;amp;story=110"&gt;promised&lt;/a&gt; over a year ago.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I really wish &lt;/strong&gt;Facebook would let me use the API to map Facebook ID&amp;#8217;s to a given list of email addresses.&lt;/p&gt;
&lt;p&gt;That&amp;#8217;s my list.  What did I miss?&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/OnlineAspect/~4/gzBupXVW2k8" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.onlineaspect.com/2009/08/29/my-wish-list-for-facebook/#comments" thr:count="7" />
		<link rel="replies" type="application/atom+xml" href="http://www.onlineaspect.com/2009/08/29/my-wish-list-for-facebook/feed/atom/" thr:count="7" />
		<thr:total>7</thr:total>
	<feedburner:origLink>http://www.onlineaspect.com/2009/08/29/my-wish-list-for-facebook/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Josh Fraser</name>
						<uri>http://www.joshfraser.com</uri>
					</author>
		<title type="html"><![CDATA[Restarting mysql master-master replication]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OnlineAspect/~3/7ach2AFSvIo/" />
		<id>http://www.onlineaspect.com/?p=480</id>
		<updated>2009-08-23T07:09:57Z</updated>
		<published>2009-08-23T00:56:22Z</published>
		<category scheme="http://www.onlineaspect.com" term="Uncategorized" /><category scheme="http://www.onlineaspect.com" term="database replication" /><category scheme="http://www.onlineaspect.com" term="mysql" />		<summary type="html">These are the steps for restarting master-master replication where replication has stopped due to a slave IO issue.  You can tell if this solution applies to you by typing &amp;#8220;show slave status\G;&amp;#8221; at the mysql prompt.  If &amp;#8220;Slave_IO_Running: No&amp;#8221;, on one or both databases, try this:
on db1:
mysql
STOP SLAVE;
FLUSH TABLES WITH READ LOCK;
on db2:
mysql
STOP SLAVE;
FLUSH TABLES [...]</summary>
		<content type="html" xml:base="http://www.onlineaspect.com/2009/08/22/restarting-mysql-master-master-replication/">&lt;p&gt;These are the steps for restarting master-master replication where replication has stopped due to a slave IO issue.  You can tell if this solution applies to you by typing &amp;#8220;show slave status\G;&amp;#8221; at the mysql prompt.  If &amp;#8220;Slave_IO_Running: No&amp;#8221;, on one or both databases, try this:&lt;/p&gt;
&lt;p&gt;on db1:&lt;/p&gt;
&lt;div class="codecolorer-container mysql blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:620px;"&gt;&lt;div class="mysql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"&gt;mysql&lt;br /&gt;
STOP SLAVE&lt;span style="color: #000033;"&gt;;&lt;/span&gt;&lt;br /&gt;
FLUSH &lt;span style="color: #990099; font-weight: bold;"&gt;TABLES&lt;/span&gt; &lt;span style="color: #990099; font-weight: bold;"&gt;WITH&lt;/span&gt; &lt;span style="color: #990099; font-weight: bold;"&gt;READ&lt;/span&gt; &lt;span style="color: #990099; font-weight: bold;"&gt;LOCK&lt;/span&gt;&lt;span style="color: #000033;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;on db2:&lt;/p&gt;
&lt;div class="codecolorer-container mysql blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:620px;"&gt;&lt;div class="mysql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"&gt;mysql&lt;br /&gt;
STOP SLAVE&lt;span style="color: #000033;"&gt;;&lt;/span&gt;&lt;br /&gt;
FLUSH &lt;span style="color: #990099; font-weight: bold;"&gt;TABLES&lt;/span&gt; &lt;span style="color: #990099; font-weight: bold;"&gt;WITH&lt;/span&gt; &lt;span style="color: #990099; font-weight: bold;"&gt;READ&lt;/span&gt; &lt;span style="color: #990099; font-weight: bold;"&gt;LOCK&lt;/span&gt;&lt;span style="color: #000033;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990099; font-weight: bold;"&gt;SHOW&lt;/span&gt; MASTER &lt;span style="color: #990099; font-weight: bold;"&gt;STATUS&lt;/span&gt;&lt;span style="color: #000033;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;on db1:&lt;/p&gt;
&lt;div class="codecolorer-container mysql blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:620px;"&gt;&lt;div class="mysql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"&gt;&lt;span style="color: #808080; font-style: italic;"&gt;# get the values for log_file &amp;amp; log_pos from db2's master status in the previous step&lt;/span&gt;&lt;br /&gt;
CHANGE MASTER &lt;span style="color: #990099; font-weight: bold;"&gt;TO&lt;/span&gt; MASTER_LOG_FILE &lt;span style="color: #CC0099;"&gt;=&lt;/span&gt;&lt;span style="color: #008000;"&gt;'mysql-bin.000...'&lt;/span&gt;&lt;span style="color: #000033;"&gt;,&lt;/span&gt;MASTER_LOG_POS&lt;span style="color: #CC0099;"&gt;=&lt;/span&gt;&lt;span style="color: #008080;"&gt;123456&lt;/span&gt;&lt;span style="color: #000033;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990099; font-weight: bold;"&gt;SHOW&lt;/span&gt; MASTER &lt;span style="color: #990099; font-weight: bold;"&gt;STATUS&lt;/span&gt;&lt;span style="color: #000033;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;on db2:&lt;/p&gt;
&lt;div class="codecolorer-container mysql blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:620px;"&gt;&lt;div class="mysql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"&gt;&lt;span style="color: #808080; font-style: italic;"&gt;# get the values for log_file &amp;amp; log_pos from db1's master status in the previous step&lt;/span&gt;&lt;br /&gt;
CHANGE MASTER &lt;span style="color: #990099; font-weight: bold;"&gt;TO&lt;/span&gt; MASTER_LOG_FILE &lt;span style="color: #CC0099;"&gt;=&lt;/span&gt;&lt;span style="color: #008000;"&gt;'mysql-bin.000...'&lt;/span&gt;&lt;span style="color: #000033;"&gt;,&lt;/span&gt;MASTER_LOG_POS&lt;span style="color: #CC0099;"&gt;=&lt;/span&gt;&lt;span style="color: #008080;"&gt;123456&lt;/span&gt;&lt;span style="color: #000033;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #990099; font-weight: bold;"&gt;START&lt;/span&gt; SLAVE&lt;span style="color: #000033;"&gt;;&lt;/span&gt;&lt;br /&gt;
UNLOCK &lt;span style="color: #990099; font-weight: bold;"&gt;TABLES&lt;/span&gt;&lt;span style="color: #000033;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;on db1:&lt;/p&gt;
&lt;div class="codecolorer-container mysql blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:620px;"&gt;&lt;div class="mysql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"&gt;&lt;span style="color: #990099; font-weight: bold;"&gt;START&lt;/span&gt; SLAVE&lt;span style="color: #000033;"&gt;;&lt;/span&gt;&lt;br /&gt;
UNLOCK &lt;span style="color: #990099; font-weight: bold;"&gt;TABLES&lt;/span&gt;&lt;span style="color: #000033;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I&amp;#8217;m posted this mainly for personal reference.  Keep in mind I&amp;#8217;m a sysadmin by necessity, not preference.  Attempt this at your own risk.  Don&amp;#8217;t expect to see many posts like this from me.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/OnlineAspect/~4/7ach2AFSvIo" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.onlineaspect.com/2009/08/22/restarting-mysql-master-master-replication/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.onlineaspect.com/2009/08/22/restarting-mysql-master-master-replication/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://www.onlineaspect.com/2009/08/22/restarting-mysql-master-master-replication/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Josh Fraser</name>
						<uri>http://www.joshfraser.com</uri>
					</author>
		<title type="html"><![CDATA[Choosing your audience]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OnlineAspect/~3/JsGWdXEYm7M/" />
		<id>http://www.onlineaspect.com/?p=472</id>
		<updated>2009-08-23T08:33:15Z</updated>
		<published>2009-08-21T08:03:20Z</published>
		<category scheme="http://www.onlineaspect.com" term="Uncategorized" /><category scheme="http://www.onlineaspect.com" term="blogging" /><category scheme="http://www.onlineaspect.com" term="community" /><category scheme="http://www.onlineaspect.com" term="reflection" />		<summary type="html">For every blog post I write, I pick an audience.
For me, it boils down to two options: the first is to write for my RSS subscribers, my loyal readers, my friends, my community.  The second option is to write for strangers, random people searching Google, the people who stumble upon my blog every day because [...]</summary>
		<content type="html" xml:base="http://www.onlineaspect.com/2009/08/21/choosing-your-audience/">&lt;p&gt;For every blog post I write, I pick an audience.&lt;/p&gt;
&lt;p&gt;For me, it boils down to two options: the first is to write for my RSS subscribers, my loyal readers, my friends, my community.  The second option is to write for strangers, random people searching Google, the people who stumble upon my blog every day because of something I wrote that matches what they were seeking.&lt;/p&gt;
&lt;p&gt;TechCrunch writes for the community.  Mashable writes for Google.&lt;/p&gt;
&lt;p&gt;I realize that&amp;#8217;s a pretty broad generalization, but just look at the data.  The three featured posts on TechCrunch right now are &lt;a href="http://www.techcrunch.com/2009/08/20/facebook-syndicates-updates-from-pages-to-twitter-still-holds-user-updates-hostage/"&gt;No User Updates?&lt;/a&gt;, &lt;a href="http://www.techcrunch.com/2009/08/20/twitter-can-now-know-where-you-tweet/"&gt;Location&lt;/a&gt; and &lt;a href="http://www.techcrunch.com/2009/08/20/chad-hurley-that-f1-racing-team-i-invested-in-is-just-like-youtube/"&gt;Comparisons&lt;/a&gt;.  They may be catchy titles, but probably not anything that would rank well in Google.  Mashable, in comparison, has an entire &lt;a href="http://mashable.com/category/how-to-web/"&gt;How-to series&lt;/a&gt; permalinked from their top navigation.  This series contains posts like &lt;a href="http://mashable.com/2009/04/16/retweet-guide/"&gt;HOW TO: Retweet on Twitter&lt;/a&gt; and &lt;a href="http://mashable.com/2009/08/13/download-youtube-videos-to-desktop/"&gt;HOW TO: Download YouTube Videos to Your Desktop&lt;/a&gt;.  Guess what?  Almost every post in Mashable&amp;#8217;s How-to section is the top result for its title phrase in Google.  Mashable is obviously milking the Google traffic for all it&amp;#8217;s worth.  Meanwhile, TechCrunch doesn&amp;#8217;t seem to even consider the SEO implications of their posts.&lt;/p&gt;
&lt;p&gt;I think it&amp;#8217;s obvious that both strategies can work.  What I find interesting is how hard it is to write for both audiences at the same time.&lt;/p&gt;
&lt;p&gt;If you decide to start writing for Google, the first thing you should do is turn your title into something that looks more like a search query.  If you&amp;#8217;re really thorough, you will Google the title you want to use and check the PageRank of the existing results to make sure you can dominate that phrase.  It&amp;#8217;s amazing how well this simple strategy can work.  Sure, your newly devised titles aren&amp;#8217;t as engaging as they used to be, but you&amp;#8217;ll start seeing far more traffic from Google.  Best of all, the traffic shows up regardless of whether you create new content or not.  The danger of course is that you&amp;#8217;ll start alienating your core audience.  This happens when you give in to the temptation to write broader and broader content.  There are far more beginners than intermediates, so the fastest way to get more traffic is to dumb things down.  After all, the top &amp;#8220;how to&amp;#8221; result on Google isn&amp;#8217;t &amp;#8220;how to implement pubsubhubbub&amp;#8221; it&amp;#8217;s &amp;#8220;how to tie a tie&amp;#8221;.  Traffic is addictive.  If you&amp;#8217;re not careful, you&amp;#8217;ll soon find yourself writing at the intermediate level instead of expert.  You&amp;#8217;ll slowly lose your original audience which is now getting content it didn&amp;#8217;t sign up for, but don&amp;#8217;t worry - you&amp;#8217;ll more than make up for the pageviews you lose.  Heck, the new audience is much better at clicking on ads anyway.  Everyone has to decide for themselves whether it is worth the trade.&lt;/p&gt;
&lt;p&gt;When I write on this blog, I&amp;#8217;m usually torn about which audience to pick.  50% of my traffic comes from Google, and my posts are pretty evenly split between the two audiences.  A lot of times when I solve a tricky problem with some code I want to share my solution to help someone out there from wasting hours of their life like I did.  It&amp;#8217;s my way of giving back to the countless strangers that have helped me out by documenting their solutions along the way.  Posts written for Google send along a good bit of traffic, but I also enjoy writing posts that will never be found via Google.  &lt;a href="http://www.onlineaspect.com/2009/05/25/the-protocols-powering-the-real-time-web/"&gt;The protocols powering the real-time web&lt;/a&gt; doesn&amp;#8217;t get much traffic from Google, but the discussion that post generated was amazing.  My goal for this blog is simply to share what I am learning, and that holds true regardless of who reads it.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;d love to hear your thoughts.  Is one audience inherently better than the other?  Do you think it&amp;#8217;s possible to maintain both?&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/OnlineAspect/~4/JsGWdXEYm7M" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.onlineaspect.com/2009/08/21/choosing-your-audience/#comments" thr:count="2" />
		<link rel="replies" type="application/atom+xml" href="http://www.onlineaspect.com/2009/08/21/choosing-your-audience/feed/atom/" thr:count="2" />
		<thr:total>2</thr:total>
	<feedburner:origLink>http://www.onlineaspect.com/2009/08/21/choosing-your-audience/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Josh Fraser</name>
						<uri>http://www.joshfraser.com</uri>
					</author>
		<title type="html"><![CDATA[Splitting names]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OnlineAspect/~3/Y1PBJ_EFF1U/" />
		<id>http://www.onlineaspect.com/?p=431</id>
		<updated>2009-08-18T23:19:58Z</updated>
		<published>2009-08-17T16:00:59Z</published>
		<category scheme="http://www.onlineaspect.com" term="Uncategorized" /><category scheme="http://www.onlineaspect.com" term="algorithm" /><category scheme="http://www.onlineaspect.com" term="code" /><category scheme="http://www.onlineaspect.com" term="parsing names" /><category scheme="http://www.onlineaspect.com" term="php" />		<summary type="html">Update 8/18/09: This project has been moved to Google Code.
Please visit http://code.google.com/p/php-name-parser/ for the latest version.
The quest
I&amp;#8217;m on a ongoing search to find the best algorithm for splitting a full name into a first name and a last name.  I&amp;#8217;m sure this sounds like a ridiculously trivial quest &amp;#8212; just explode the string on [...]</summary>
		<content type="html" xml:base="http://www.onlineaspect.com/2009/08/17/splitting-names/">&lt;div class='highlight'&gt;&lt;strong&gt;Update 8/18/09:&lt;/strong&gt; This project has been moved to Google Code.&lt;br /&gt;
Please visit &lt;a href='http://code.google.com/p/php-name-parser/'&gt;http://code.google.com/p/php-name-parser/&lt;/a&gt; for the latest version.&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;The quest&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m on a ongoing search to find the best algorithm for splitting a full name into a first name and a last name.  I&amp;#8217;m sure this sounds like a ridiculously trivial quest &amp;#8212; just explode the string on a space, right?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The challenge&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But how do you tell the difference between people with double first names like Jo Ann Smith and people with double last names like Jo Von Trapp?  What would you do if I gave you a double first name AND and a double last name at the same time?&lt;/p&gt;
&lt;p&gt;Did you remember that you might need to parse out prefixes (Mr, Mrs, etc) and suffixes (II, Jr, PhD, etc)?&lt;/p&gt;
&lt;p&gt;How do you turn Paul T. S. Williams into Paul Williams while intelligently deducing that that T. James Adams probably wants to go by James Adams, but T. Adams should probably stay as T. Adams?&lt;/p&gt;
&lt;p&gt;And how do you straighten out the capitalization?  I MIGHT WRITE IN ALL CAPS or all lowercase.  Most names have the first letter capitalized and everything else in lowercase, but of course there are exceptions.  J.P. likes to have both initials capitalized and Mr. McDonald always gets fussy when you forget to capitalize the D.  Oh, and I hope you&amp;#8217;re prepared for other anomalies like people with dashes in their name.&lt;/p&gt;
&lt;p&gt;As you have probably realized by now, splitting a full name into its proper parts is a little more complicated than it appears on the surface.&lt;/p&gt;
&lt;p&gt;I wrote the first version of my name-parsing algorithm two years ago and I&amp;#8217;ve been gradually refining it ever since.  It&amp;#8217;s not perfect, but it&amp;#8217;s improved a lot over time.  I&amp;#8217;m posting this code along with a demo in hopes that it will spur contributions to improve its accuracy even more. Throw the hardest names you know at it and let me know how it performs.  I know I&amp;#8217;m missing words for the various dictionaries of prefixes, suffixes, and compound name identifiers.  Please let me know what I missed.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The demo&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.onlineaspect.com/examples/parsing_names/index.php"&gt;Splitting names demo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The algorithm&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We start by splitting the full name into separate words.  We then do a dictionary lookup on the first and last words to see if they are a common prefix or suffix.  Next, we take the middle portion of the string (everything minus the prefix &amp;amp; suffix) and look at everything except the last word of that string.  We then loop through each of those words concatenating them together to make up the first name.  While we&amp;#8217;re doing that, we watch for any indication of a compound last name.  It turns out that almost every compound last name starts with 1 of 15 prefixes (Von, Van, Vere, etc).  If we see one of those prefixes, we break out of the first name loop and move on to concatenating the last name.  We handle the capitalization issue by checking for camel-case before uppercasing the first letter of each word and lowercasing everything else.  I wrote special cases for periods and dashes.  We also have a couple other special cases, like ignoring words in parentheses all-together.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The code&lt;/strong&gt;&lt;/p&gt;
&lt;div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:620px;"&gt;&lt;div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;&amp;lt;?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// split full names into the following parts:&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// - prefix / salutation &amp;nbsp;(Mr., Mrs., etc)&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// - given name / first name&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// - middle initials&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// - surname / last name &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// - suffix (II, Phd, Jr, etc)&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; split_full_name&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$full_name&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$full_name&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;trim&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$full_name&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// split into words&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$unfiltered_name_parts&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;explode&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #000088;"&gt;$full_name&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// completely ignore any words in parentheses&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;foreach&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$unfiltered_name_parts&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;as&lt;/span&gt; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #339933;"&gt;!=&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;(&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$name_parts&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$num_words&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;sizeof&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$name_parts&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// is the first word a title? (Mr. Mrs, etc)&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$salutation&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; is_salutation&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$name_parts&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;0&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$suffix&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; is_suffix&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$name_parts&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #990000;"&gt;sizeof&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$name_parts&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&lt;/span&gt;1&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// set the range for the middle part of the name (trim prefixes &amp;amp; suffixes)&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$start&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$salutation&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; ? 1 &lt;span style="color: #339933;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$end&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$suffix&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; ? &lt;span style="color: #000088;"&gt;$num_words&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&lt;/span&gt;1 &lt;span style="color: #339933;"&gt;:&lt;/span&gt; &lt;span style="color: #000088;"&gt;$num_words&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// concat the first name&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;for&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$i&lt;/span&gt;&lt;span style="color: #339933;"&gt;=&lt;/span&gt;&lt;span style="color: #000088;"&gt;$start&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #000088;"&gt;$i&lt;/span&gt; &lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color: #000088;"&gt;$end&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #000088;"&gt;$i&lt;/span&gt;&lt;span style="color: #339933;"&gt;++&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #000088;"&gt;$name_parts&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$i&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// move on to parsing the last name if we find an indicator of a compound last name (Von, Van, etc)&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// we use $i != $start to allow for rare cases where an indicator is actually the first name (like &amp;quot;Von Fabella&amp;quot;)&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;is_compound_lname&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #339933;"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color: #000088;"&gt;$i&lt;/span&gt; &lt;span style="color: #339933;"&gt;!=&lt;/span&gt; &lt;span style="color: #000088;"&gt;$start&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;break&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// is it a middle initial or part of their first name?&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// if we start off with an initial, we'll call it the first name&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;is_initial&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// is the initial the first word? &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$i&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #000088;"&gt;$start&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// if so, do a look-ahead to see if they go by their middle name &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// for ex: &amp;quot;R. Jason Smith&amp;quot; =&amp;gt; &amp;quot;Jason Smith&amp;quot; &amp;amp; &amp;quot;R.&amp;quot; is stored as an initial&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// but &amp;quot;R. J. Smith&amp;quot; =&amp;gt; &amp;quot;R. Smith&amp;quot; and &amp;quot;J.&amp;quot; is stored as an initial&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;is_initial&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$name_parts&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$i&lt;/span&gt;&lt;span style="color: #339933;"&gt;+&lt;/span&gt;1&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$fname&lt;/span&gt; &lt;span style="color: #339933;"&gt;.=&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #990000;"&gt;strtoupper&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$initials&lt;/span&gt; &lt;span style="color: #339933;"&gt;.=&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #990000;"&gt;strtoupper&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// otherwise, just go ahead and save the initial&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$initials&lt;/span&gt; &lt;span style="color: #339933;"&gt;.=&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #990000;"&gt;strtoupper&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$fname&lt;/span&gt; &lt;span style="color: #339933;"&gt;.=&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;fix_case&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// check that we have more than 1 word in our string&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$end&lt;/span&gt;&lt;span style="color: #339933;"&gt;-&lt;/span&gt;&lt;span style="color: #000088;"&gt;$start&lt;/span&gt; &lt;span style="color: #339933;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// concat the last name&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;for&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$i&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #000088;"&gt;$i&lt;/span&gt; &lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color: #000088;"&gt;$end&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; &lt;span style="color: #000088;"&gt;$i&lt;/span&gt;&lt;span style="color: #339933;"&gt;++&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$lname&lt;/span&gt; &lt;span style="color: #339933;"&gt;.=&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;fix_case&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$name_parts&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$i&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// otherwise, single word strings are assumed to be first names&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$fname&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; fix_case&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$name_parts&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$i&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// return the various parts in an array&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$name&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'salutation'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #000088;"&gt;$salutation&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$name&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'fname'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;trim&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$fname&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$name&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'initials'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;trim&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$initials&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$name&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'lname'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;trim&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$lname&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$name&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'suffix'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #000088;"&gt;$suffix&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #000088;"&gt;$name&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// detect and format standard salutations &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// I'm only considering english honorifics for now &amp;amp; not words like &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; is_salutation&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// ignore periods&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;str_replace&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'.'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;''&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #990000;"&gt;strtolower&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// returns normalized values&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;mr&amp;quot;&lt;/span&gt; &lt;span style="color: #339933;"&gt;||&lt;/span&gt; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;master&amp;quot;&lt;/span&gt; &lt;span style="color: #339933;"&gt;||&lt;/span&gt; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;mister&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;Mr.&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;mrs&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;Mrs.&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;miss&amp;quot;&lt;/span&gt; &lt;span style="color: #339933;"&gt;||&lt;/span&gt; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;ms&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;Ms.&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;dr&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;Dr.&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;rev&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;Rev.&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;fr&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;Fr.&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #009900; font-weight: bold;"&gt;false&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// &amp;nbsp;detect and format common suffixes &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; is_suffix&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// ignore periods&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;str_replace&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'.'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;''&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// these are some common suffixes - what am I missing?&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$suffix_array&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;array&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'I'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'II'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'III'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'IV'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'V'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'Senior'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'Junior'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'Jr'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'Sr'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'PhD'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'APR'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'RPh'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'PE'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'MD'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'MA'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'DMD'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'CME'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;foreach&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$suffix_array&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;as&lt;/span&gt; &lt;span style="color: #000088;"&gt;$suffix&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #990000;"&gt;strtolower&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$suffix&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #990000;"&gt;strtolower&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #000088;"&gt;$suffix&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #009900; font-weight: bold;"&gt;false&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// detect compound last names like &amp;quot;Von Fange&amp;quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; is_compound_lname&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;strtolower&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// these are some common prefixes that identify a compound last names - what am I missing?&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$words&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;array&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'vere'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'von'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'van'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'de'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'del'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'della'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'di'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'da'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'pietro'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'vanden'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'du'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'st.'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'st'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'la'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'ter'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #990000;"&gt;array_search&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #000088;"&gt;$words&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// single letter, possibly followed by a period&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; is_initial&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #990000;"&gt;strlen&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; 1&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #339933;"&gt;||&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #990000;"&gt;strlen&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; 2 &lt;span style="color: #339933;"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;.&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// detect mixed case words like &amp;quot;McDonald&amp;quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// returns false if the string is all one case&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; is_camel_case&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #990000;"&gt;preg_match&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;quot;|[A-Z]+|s&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #339933;"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color: #990000;"&gt;preg_match&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;quot;|[a-z]+|s&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #009900; font-weight: bold;"&gt;true&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #009900; font-weight: bold;"&gt;false&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// ucfirst words split by dashes or periods&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// ucfirst all upper/lower strings, but leave camelcase words alone&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; fix_case&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// uppercase words split by dashes, like &amp;quot;Kimura-Fay&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; safe_ucfirst&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// uppercase words split by periods, like &amp;quot;J.P.&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; safe_ucfirst&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;quot;.&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;// helper function for fix_case&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; safe_ucfirst&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$seperator&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #666666; font-style: italic;"&gt;// uppercase words split by the seperator (ex. dashes or periods)&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$parts&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #990000;"&gt;explode&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$seperator&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;foreach&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$parts&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;as&lt;/span&gt; &lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000088;"&gt;$words&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;is_camel_case&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; ? &lt;span style="color: #000088;"&gt;$word&lt;/span&gt; &lt;span style="color: #339933;"&gt;:&lt;/span&gt; &lt;span style="color: #990000;"&gt;ucfirst&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #990000;"&gt;strtolower&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$word&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #990000;"&gt;implode&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$seperator&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #000088;"&gt;$words&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/OnlineAspect/~4/Y1PBJ_EFF1U" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.onlineaspect.com/2009/08/17/splitting-names/#comments" thr:count="2" />
		<link rel="replies" type="application/atom+xml" href="http://www.onlineaspect.com/2009/08/17/splitting-names/feed/atom/" thr:count="2" />
		<thr:total>2</thr:total>
	<feedburner:origLink>http://www.onlineaspect.com/2009/08/17/splitting-names/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Josh Fraser</name>
						<uri>http://www.joshfraser.com</uri>
					</author>
		<title type="html"><![CDATA[Stop flash from covering HTML content]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OnlineAspect/~3/zhGTAT7GcZE/" />
		<id>http://www.onlineaspect.com/?p=408</id>
		<updated>2009-09-08T16:16:29Z</updated>
		<published>2009-08-13T10:15:00Z</published>
		<category scheme="http://www.onlineaspect.com" term="Uncategorized" /><category scheme="http://www.onlineaspect.com" term="hide flash" /><category scheme="http://www.onlineaspect.com" term="javascript" /><category scheme="http://www.onlineaspect.com" term="jquery" /><category scheme="http://www.onlineaspect.com" term="remove flash" /><category scheme="http://www.onlineaspect.com" term="wmode" /><category scheme="http://www.onlineaspect.com" term="wmode to transparent" />		<summary type="html">Browse through a few developer forums and you will find lots of people pulling their hair out over flash content covering up their dropdown menus or modal windows.  The problem is especially bad in IE (surprise, surprise).  The fix is actually quite simple as long as you can edit the embed code for your [...]</summary>
		<content type="html" xml:base="http://www.onlineaspect.com/2009/08/13/javascript_to_fix_wmode_parameters/">&lt;p&gt;Browse through a few developer forums and you will find lots of people pulling their hair out over flash content covering up their dropdown menus or modal windows.  The problem is especially bad in IE (surprise, surprise).  The fix is actually quite simple as long as you can edit the embed code for your flash. The trick is to change the wmode parameter to either &amp;#8220;transparent&amp;#8221; or &amp;#8220;opaque&amp;#8221;.  You should do this for both the &amp;lt;embed&amp;gt; and &amp;lt;object&amp;gt; tags like this:&lt;/p&gt;
&lt;div class="codecolorer-container html4strict blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:620px;"&gt;&lt;div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;object&lt;/span&gt; &lt;span style="color: #000066;"&gt;width&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;200&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;height&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;300&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;data&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;example.swf&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;type&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;application/x-shockwave-flash&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;param&lt;/span&gt; &lt;span style="color: #000066;"&gt;name&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;quality&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;value&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;high&amp;quot;&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;param&lt;/span&gt; &lt;span style="color: #000066;"&gt;name&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;wmode&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;value&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;transparent&amp;quot;&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;param&lt;/span&gt; &lt;span style="color: #000066;"&gt;name&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;src&amp;quot;&lt;/span&gt; &lt;span style="color: #000066;"&gt;value&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;&amp;quot;example.swf&amp;quot;&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;object&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The problem is you don&amp;#8217;t always have the option of changing the embed code.  What if you&amp;#8217;re developing a JavaScript widget and don&amp;#8217;t have any control over how the flash is embedded?  The solution is more complicated than you would expect.  It turns out there are a slew of IE bugs around the &amp;lt;object&amp;gt; tag that escalate what should be a simple task into a real headache.  Basically you need to replace each &amp;lt;embed&amp;gt; and &amp;lt;object&amp;gt; tag with a cloned version that has had its wmode parameter fixed.  Here&amp;#8217;s how you do it:&lt;/p&gt;
&lt;div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:620px;"&gt;&lt;div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"&gt;&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt;script type&lt;span style="color: #339933;"&gt;=&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #003366; font-weight: bold;"&gt;function&lt;/span&gt; fix_flash&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #006600; font-style: italic;"&gt;// loop through every embed tag on the site&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #003366; font-weight: bold;"&gt;var&lt;/span&gt; embeds &lt;span style="color: #339933;"&gt;=&lt;/span&gt; document.&lt;span style="color: #660066;"&gt;getElementsByTagName&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;'embed'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000066; font-weight: bold;"&gt;for&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;i&lt;span style="color: #339933;"&gt;=&lt;/span&gt;&lt;span style="color: #CC0000;"&gt;0&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; i&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt;embeds.&lt;span style="color: #660066;"&gt;length&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; i&lt;span style="color: #339933;"&gt;++&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &amp;nbsp;&lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; embed &lt;span style="color: #339933;"&gt;=&lt;/span&gt; embeds&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;i&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #003366; font-weight: bold;"&gt;var&lt;/span&gt; new_embed&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #006600; font-style: italic;"&gt;// everything but Firefox &amp;amp; Konqueror&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000066; font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;embed.&lt;span style="color: #660066;"&gt;outerHTML&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #003366; font-weight: bold;"&gt;var&lt;/span&gt; html &lt;span style="color: #339933;"&gt;=&lt;/span&gt; embed.&lt;span style="color: #660066;"&gt;outerHTML&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #006600; font-style: italic;"&gt;// replace an existing wmode parameter&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000066; font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;html.&lt;span style="color: #660066;"&gt;match&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #009966; font-style: italic;"&gt;/wmode\s*=\s*('|&amp;quot;)[a-zA-Z]+('|&amp;quot;)/i&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_embed &lt;span style="color: #339933;"&gt;=&lt;/span&gt; html.&lt;span style="color: #660066;"&gt;replace&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #009966; font-style: italic;"&gt;/wmode\s*=\s*('|&amp;quot;)window('|&amp;quot;)/i&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;&amp;quot;wmode='transparent'&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #006600; font-style: italic;"&gt;// add a new wmode parameter&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000066; font-weight: bold;"&gt;else&lt;/span&gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_embed &lt;span style="color: #339933;"&gt;=&lt;/span&gt; html.&lt;span style="color: #660066;"&gt;replace&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #009966; font-style: italic;"&gt;/&amp;lt;embed\s/i&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;&amp;quot;&amp;lt;embed wmode='transparent' &amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #006600; font-style: italic;"&gt;// replace the old embed object with the fixed version&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; embed.&lt;span style="color: #660066;"&gt;insertAdjacentHTML&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;'beforeBegin'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;new_embed&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; embed.&lt;span style="color: #660066;"&gt;parentNode&lt;/span&gt;.&lt;span style="color: #660066;"&gt;removeChild&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;embed&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #000066; font-weight: bold;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #006600; font-style: italic;"&gt;// cloneNode is buggy in some versions of Safari &amp;amp; Opera, but works fine in FF&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_embed &lt;span style="color: #339933;"&gt;=&lt;/span&gt; embed.&lt;span style="color: #660066;"&gt;cloneNode&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #003366; font-weight: bold;"&gt;true&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000066; font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #339933;"&gt;!&lt;/span&gt;new_embed.&lt;span style="color: #660066;"&gt;getAttribute&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;'wmode'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #339933;"&gt;||&lt;/span&gt; new_embed.&lt;span style="color: #660066;"&gt;getAttribute&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;'wmode'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;.&lt;span style="color: #660066;"&gt;toLowerCase&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;==&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;'window'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_embed.&lt;span style="color: #660066;"&gt;setAttribute&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;'wmode'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;'transparent'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; embed.&lt;span style="color: #660066;"&gt;parentNode&lt;/span&gt;.&lt;span style="color: #660066;"&gt;replaceChild&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;new_embed&lt;span style="color: #339933;"&gt;,&lt;/span&gt;embed&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #006600; font-style: italic;"&gt;// loop through every object tag on the site&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #003366; font-weight: bold;"&gt;var&lt;/span&gt; objects &lt;span style="color: #339933;"&gt;=&lt;/span&gt; document.&lt;span style="color: #660066;"&gt;getElementsByTagName&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;'object'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #000066; font-weight: bold;"&gt;for&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;i&lt;span style="color: #339933;"&gt;=&lt;/span&gt;&lt;span style="color: #CC0000;"&gt;0&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; i&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt;objects.&lt;span style="color: #660066;"&gt;length&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; i&lt;span style="color: #339933;"&gt;++&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; object &lt;span style="color: #339933;"&gt;=&lt;/span&gt; objects&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;i&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #003366; font-weight: bold;"&gt;var&lt;/span&gt; new_object&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #006600; font-style: italic;"&gt;// object is an IE specific tag so we can use outerHTML here&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000066; font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;object.&lt;span style="color: #660066;"&gt;outerHTML&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #003366; font-weight: bold;"&gt;var&lt;/span&gt; html &lt;span style="color: #339933;"&gt;=&lt;/span&gt; object.&lt;span style="color: #660066;"&gt;outerHTML&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #006600; font-style: italic;"&gt;// replace an existing wmode parameter&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000066; font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;html.&lt;span style="color: #660066;"&gt;match&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #009966; font-style: italic;"&gt;/&amp;lt;param\s+name\s*=\s*('|&amp;quot;)wmode('|&amp;quot;)\s+value\s*=\s*('|&amp;quot;)[a-zA-Z]+('|&amp;quot;)\s*\/?\&amp;gt;/i&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_object &lt;span style="color: #339933;"&gt;=&lt;/span&gt; html.&lt;span style="color: #660066;"&gt;replace&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #009966; font-style: italic;"&gt;/&amp;lt;param\s+name\s*=\s*('|&amp;quot;)wmode('|&amp;quot;)\s+value\s*=\s*('|&amp;quot;)window('|&amp;quot;)\s*\/?\&amp;gt;/i&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;&amp;quot;&amp;lt;param name='wmode' value='transparent' /&amp;gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #006600; font-style: italic;"&gt;// add a new wmode parameter&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000066; font-weight: bold;"&gt;else&lt;/span&gt; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_object &lt;span style="color: #339933;"&gt;=&lt;/span&gt; html.&lt;span style="color: #660066;"&gt;replace&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #009966; font-style: italic;"&gt;/&amp;lt;\/object\&amp;gt;/i&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;&amp;quot;&amp;lt;param name='wmode' value='transparent' /&amp;gt;&lt;span style="color: #000099; font-weight: bold;"&gt;\n&lt;/span&gt;&amp;lt;/object&amp;gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #006600; font-style: italic;"&gt;// loop through each of the param tags&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #003366; font-weight: bold;"&gt;var&lt;/span&gt; children &lt;span style="color: #339933;"&gt;=&lt;/span&gt; object.&lt;span style="color: #660066;"&gt;childNodes&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000066; font-weight: bold;"&gt;for&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;j&lt;span style="color: #339933;"&gt;=&lt;/span&gt;&lt;span style="color: #CC0000;"&gt;0&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; j&lt;span style="color: #339933;"&gt;&amp;lt;&lt;/span&gt;children.&lt;span style="color: #660066;"&gt;length&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt; j&lt;span style="color: #339933;"&gt;++&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #000066; font-weight: bold;"&gt;if&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;children&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;j&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;.&lt;span style="color: #660066;"&gt;getAttribute&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;'name'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;.&lt;span style="color: #660066;"&gt;match&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #009966; font-style: italic;"&gt;/flashvars/i&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_object &lt;span style="color: #339933;"&gt;=&lt;/span&gt; html.&lt;span style="color: #660066;"&gt;replace&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #009966; font-style: italic;"&gt;/&amp;lt;param\s+name\s*=\s*('|&amp;quot;)flashvars('|&amp;quot;)\s+value\s*=\s*('|&amp;quot;)[^'&amp;quot;]*('|&amp;quot;)\s*\/?\&amp;gt;/i&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;&amp;quot;&amp;lt;param name='flashvars' value='&amp;quot;&lt;/span&gt;&lt;span style="color: #339933;"&gt;+&lt;/span&gt;children&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;j&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;.&lt;span style="color: #660066;"&gt;getAttribute&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;'value'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;+&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;&amp;quot;' /&amp;gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #006600; font-style: italic;"&gt;// replace the old embed object with the fixed versiony&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; object.&lt;span style="color: #660066;"&gt;insertAdjacentHTML&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #3366CC;"&gt;'beforeBegin'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;new_object&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; object.&lt;span style="color: #660066;"&gt;parentNode&lt;/span&gt;.&lt;span style="color: #660066;"&gt;removeChild&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;object&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #339933;"&gt;&amp;lt;/&lt;/span&gt;script&lt;span style="color: #339933;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This solution is adapted from &lt;a href="http://www.qindex.info/Q_get.php?g_clss=forum&amp;amp;g_prcss=thrd&amp;amp;g_tmplt=&amp;amp;g_brd=5&amp;amp;g_pg=1&amp;amp;g_thrd=98"&gt;code I found on QIndex&lt;/a&gt;.  Hopefully this version is a little cleaner and easier for people to find.  &lt;/p&gt;
&lt;div class='highlight'&gt;&lt;b&gt;Note:&lt;/b&gt; There is also a &lt;a href='http://www.nobilesoft.com/Scripts/fix_wmode2transparent_swf.js'&gt;jquery version&lt;/a&gt; of this code, complements of &lt;a href='http://www.nobilesoft.com/'&gt;José Nobile&lt;/a&gt;.&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/OnlineAspect/~4/zhGTAT7GcZE" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.onlineaspect.com/2009/08/13/javascript_to_fix_wmode_parameters/#comments" thr:count="15" />
		<link rel="replies" type="application/atom+xml" href="http://www.onlineaspect.com/2009/08/13/javascript_to_fix_wmode_parameters/feed/atom/" thr:count="15" />
		<thr:total>15</thr:total>
	<feedburner:origLink>http://www.onlineaspect.com/2009/08/13/javascript_to_fix_wmode_parameters/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Josh Fraser</name>
						<uri>http://www.joshfraser.com</uri>
					</author>
		<title type="html"><![CDATA[Search plugin for Google Caffeine]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OnlineAspect/~3/OKLO4Zb55Ys/" />
		<id>http://www.onlineaspect.com/?p=386</id>
		<updated>2009-08-11T07:05:38Z</updated>
		<published>2009-08-11T05:20:21Z</published>
		<category scheme="http://www.onlineaspect.com" term="Uncategorized" /><category scheme="http://www.onlineaspect.com" term="firefox" /><category scheme="http://www.onlineaspect.com" term="google" /><category scheme="http://www.onlineaspect.com" term="plugin" /><category scheme="http://www.onlineaspect.com" term="search" />		<summary type="html">I read on Mashable and TechCrunch tonight that Google has released a developer preview of the next version of Google (code name Caffeine).  Wanting to try it out, I did a quick search to see if I could find a search plugin for Firefox.  Finding none, I decided to write one myself.  If you&amp;#8217;re using [...]</summary>
		<content type="html" xml:base="http://www.onlineaspect.com/2009/08/10/google-sandbox-plugin/">&lt;p&gt;I read on &lt;a href="http://mashable.com/2009/08/10/google-new-version/"&gt;Mashable&lt;/a&gt; and &lt;a href="http://www.techcrunch.com/2009/08/10/caffeine-its-google-on-red-bull-or-something/"&gt;TechCrunch&lt;/a&gt; tonight that Google has released a &lt;a href="http://www2.sandbox.google.com"&gt;developer preview&lt;/a&gt; of the next version of Google (code name Caffeine).  Wanting to try it out, I did a quick search to see if I could find a search plugin for Firefox.  Finding none, I decided to write one myself.  If you&amp;#8217;re using Firefox, you should be able to &lt;a onclick="window.external.AddSearchProvider('http://onlineaspect.com/uploads/googlesandbox.xml');"&gt;click here to install my Google Sandbox search plugin&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And yes, I tried to upload my plugin to the Mozilla directory but I keep getting a &amp;#8220;Not a valid install package&amp;#8221; error.  I don&amp;#8217;t have time to trouble shoot this right now.  If anyone can tell me what I&amp;#8217;m doing wrong, I would much appreciate it.  I also didn&amp;#8217;t have time to figure out Google&amp;#8217;s URL to enable auto-completion.  If you happen to know the URL for the auto-complete AJAX request, please let me know in the comments.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/OnlineAspect/~4/OKLO4Zb55Ys" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.onlineaspect.com/2009/08/10/google-sandbox-plugin/#comments" thr:count="3" />
		<link rel="replies" type="application/atom+xml" href="http://www.onlineaspect.com/2009/08/10/google-sandbox-plugin/feed/atom/" thr:count="3" />
		<thr:total>3</thr:total>
	<feedburner:origLink>http://www.onlineaspect.com/2009/08/10/google-sandbox-plugin/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Josh Fraser</name>
						<uri>http://www.joshfraser.com</uri>
					</author>
		<title type="html"><![CDATA[Having fun with Proximity for mac]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/OnlineAspect/~3/U2x27Fm5V38/" />
		<id>http://www.onlineaspect.com/?p=353</id>
		<updated>2009-07-20T17:37:26Z</updated>
		<published>2009-07-20T16:00:39Z</published>
		<category scheme="http://www.onlineaspect.com" term="Uncategorized" /><category scheme="http://www.onlineaspect.com" term="applescript" /><category scheme="http://www.onlineaspect.com" term="code" /><category scheme="http://www.onlineaspect.com" term="hacks" />		<summary type="html">One of the things I love about my mac is how easy it is to hack things to work the way I want.   I&amp;#8217;m always amazed by how many easy hooks there are into system settings and native applications.
I recently stumbled upon a neat application called Proximity.  Proximity detects when a selected device [...]</summary>
		<content type="html" xml:base="http://www.onlineaspect.com/2009/07/20/having-fun-with-proximity-for-mac/">&lt;p&gt;One of the things I love about my mac is how easy it is to hack things to work the way I want.   I&amp;#8217;m always amazed by how many easy hooks there are into system settings and native applications.&lt;/p&gt;
&lt;p&gt;I recently stumbled upon a neat application called &lt;a href="http://code.google.com/p/reduxcomputing-proximity/"&gt;Proximity&lt;/a&gt;.  Proximity detects when a selected device (cell phone, wireless mouse, etc) comes in or out of bluetooth range and executes selected scripts.  Since my iPhone is almost always with me, I decided to write a couple scripts to password protect my laptop when my iPhone isn&amp;#8217;t around, and unlock it when I return.  As an added bonus, my code also mutes my audio and sets an away message on iChat when I leave.  It then sets my status to &amp;#8220;available&amp;#8221; when I return.&lt;/p&gt;
&lt;p&gt;&lt;img class="aligncenter" title="Proximity Screenshot" src="http://www.onlineaspect.com/uploads/proximity_screenshot.png" alt="" width="480" height="454" /&gt;&lt;/p&gt;
&lt;p&gt;The cool thing about this is that it keeps my laptop secure without having to mess with a screen-saver password all the time.  I can think of a lot of other uses for this technology.  For example, I wonder how many people would like to have a notification pop up when their boss is about to walk into the room, or just have a bluetooth device automatically sync when it&amp;#8217;s in range of their computer.  I should add that Bluetooth detection has its limitations, particularly because the underlying hardware makes it tough to detect realtime changes causing a significant lag.  You also don&amp;#8217;t have anyway to detect the strength of the signal to get any sense of how far away the device is from your computer &amp;#8212; it&amp;#8217;s entirely binary &amp;#8212; the device is on and in-range or it&amp;#8217;s not.  That said, it&amp;#8217;s still a powerful demonstration of what can be accomplished with technology when you start getting creative.&lt;/p&gt;
&lt;p&gt;Here are my scripts.  First, the one that gets executed whenever my iPhone goes &lt;a href="http://www.onlineaspect.com/uploads/out_of_range.scpt"&gt;out of range&lt;/a&gt;:&lt;/p&gt;
&lt;div class="codecolorer-container applescript blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:620px;"&gt;&lt;div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"&gt;&lt;span style="color: #808080; font-style: italic;"&gt;-- mute volume&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #ff0033; font-weight: bold;"&gt;set&lt;/span&gt; volume &lt;span style="color: #ff0033; font-weight: bold;"&gt;with&lt;/span&gt; output muted&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #808080; font-style: italic;"&gt;-- set status to away&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt; &lt;span style="color: #0066ff;"&gt;application&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;quot;iChat&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #ff0033; font-weight: bold;"&gt;set&lt;/span&gt; status &lt;span style="color: #ff0033; font-weight: bold;"&gt;to&lt;/span&gt; away&lt;br /&gt;
&lt;span style="color: #ff0033; font-weight: bold;"&gt;end&lt;/span&gt; &lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #808080; font-style: italic;"&gt;-- turn on the screen saver password&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt; &lt;span style="color: #0066ff;"&gt;application&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;quot;System Events&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt; security preferences&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #ff0033; font-weight: bold;"&gt;set&lt;/span&gt; &lt;span style="color: #0066ff;"&gt;properties&lt;/span&gt; &lt;span style="color: #ff0033; font-weight: bold;"&gt;to&lt;/span&gt; &lt;span style="color: #000000;"&gt;&amp;#123;&lt;/span&gt;require password &lt;span style="color: #ff0033; font-weight: bold;"&gt;to&lt;/span&gt; wake:&lt;span style="color: #0066ff;"&gt;true&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #ff0033; font-weight: bold;"&gt;end&lt;/span&gt; &lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #ff0033; font-weight: bold;"&gt;end&lt;/span&gt; &lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #808080; font-style: italic;"&gt;-- activate the screen saver&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt; &lt;span style="color: #0066ff;"&gt;application&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;quot;ScreenSaverEngine&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0033; font-weight: bold;"&gt;to&lt;/span&gt; &lt;span style="color: #0066ff;"&gt;activate&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #808080; font-style: italic;"&gt;-- if the above line doesn't work, try uncommenting this instead:&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #808080; font-style: italic;"&gt;-- do script &amp;quot;/System/library/Frameworks/Screensaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;And, &lt;a href="http://www.onlineaspect.com/uploads/in_range.scpt"&gt;in range&lt;/a&gt;:&lt;/p&gt;
&lt;div class="codecolorer-container applescript blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:620px;"&gt;&lt;div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"&gt;&lt;span style="color: #808080; font-style: italic;"&gt;-- set status to available&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt; &lt;span style="color: #0066ff;"&gt;application&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;quot;iChat&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #ff0033; font-weight: bold;"&gt;set&lt;/span&gt; status &lt;span style="color: #ff0033; font-weight: bold;"&gt;to&lt;/span&gt; available&lt;br /&gt;
&lt;span style="color: #ff0033; font-weight: bold;"&gt;end&lt;/span&gt; &lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #808080; font-style: italic;"&gt;-- disable screen saver password&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt; &lt;span style="color: #0066ff;"&gt;application&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;quot;System Events&amp;quot;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt; security preferences&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #ff0033; font-weight: bold;"&gt;set&lt;/span&gt; &lt;span style="color: #0066ff;"&gt;properties&lt;/span&gt; &lt;span style="color: #ff0033; font-weight: bold;"&gt;to&lt;/span&gt; &lt;span style="color: #000000;"&gt;&amp;#123;&lt;/span&gt;require password &lt;span style="color: #ff0033; font-weight: bold;"&gt;to&lt;/span&gt; wake:&lt;span style="color: #0066ff;"&gt;false&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style="color: #ff0033; font-weight: bold;"&gt;end&lt;/span&gt; &lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #ff0033; font-weight: bold;"&gt;end&lt;/span&gt; &lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #808080; font-style: italic;"&gt;-- turn off the screen saver&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #ff0033; font-weight: bold;"&gt;tell&lt;/span&gt; &lt;span style="color: #0066ff;"&gt;application&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;quot;ScreenSaverEngine&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0033; font-weight: bold;"&gt;to&lt;/span&gt; &lt;span style="color: #0066ff;"&gt;quit&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Let me know if you come up with any other applications for this or have suggestions for other functionality I should add to my fancy phone-triggered security system.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/OnlineAspect/~4/U2x27Fm5V38" height="1" width="1"/&gt;</content>
		<link rel="replies" type="text/html" href="http://www.onlineaspect.com/2009/07/20/having-fun-with-proximity-for-mac/#comments" thr:count="9" />
		<link rel="replies" type="application/atom+xml" href="http://www.onlineaspect.com/2009/07/20/having-fun-with-proximity-for-mac/feed/atom/" thr:count="9" />
		<thr:total>9</thr:total>
	<feedburner:origLink>http://www.onlineaspect.com/2009/07/20/having-fun-with-proximity-for-mac/</feedburner:origLink></entry>
	</feed>
