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

<channel>
	<title>Mehigh</title>
	<atom:link href="http://mehigh.biz/feed" rel="self" type="application/rss+xml" />
	<link>http://mehigh.biz</link>
	<description>Rockstar Web Developer</description>
	<lastBuildDate>Fri, 16 Mar 2012 12:57:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19948</generator>
		<item>
		<title>Bias Lightning &#8211; dramatically improves screen viewing experience in the dark</title>
		<link>http://mehigh.biz/ergonomics/bias-lightning-dramatically-improves-screen-viewing-experience-in-the-dark.html</link>
		<comments>http://mehigh.biz/ergonomics/bias-lightning-dramatically-improves-screen-viewing-experience-in-the-dark.html#comments</comments>
		<pubDate>Fri, 16 Mar 2012 12:44:36 +0000</pubDate>
		<dc:creator>mehigh</dc:creator>
				<category><![CDATA[Ergonomics]]></category>

		<guid isPermaLink="false">http://mehigh.biz/?p=65</guid>
		<description><![CDATA[After reading all the positive reviews about bias lightning, I thought to give it a try&#8230; so I started off with the theory. The basics that you need are the following: a light source with cold natural light (ideal is to have a temperature of 6500K) the light source to be powerful enough such that [...]]]></description>
			<content:encoded><![CDATA[<p>After reading all the positive reviews about bias lightning, I thought to give it a try&#8230; so I started off with the theory.</p>
<p>The basics that you need are the following:</p>
<ul>
<li>a light source with cold natural light (ideal is to have a temperature of 6500K)</li>
<li>the light source to be powerful enough such that the reflected amount of light would be at least 10% the maximum light the screen can produce (under normal viewing conditions, not talking about dynamic contrasts or other such gimmicks)</li>
<li>a neutral gray or white wall behind the screen (I didn&#8217;t have the luxury to get this, but we&#8217;ll get to that a bit later)</li>
<li>patience to set it all up and do a bit of math</li>
</ul>
<h3>The light</h3>
<p>I found my screen to emit 130 cd/m2 under the settings I use it (THX).</p>
<p>I&#8217;ve computed the surface of my screen (42&#8242; 10:9) &#8211; 93cm (width) * 52.3cm (height) ~ 0.48 m2.</p>
<p>130 cd / m2 * 0.48 m2 = <strong>62.4 cd</strong></p>
<p>Most light sources (like LEDs) have their power measured in lumen. And since 1 cd = 12.57 lumen, we get to a computed <strong>784 lumen</strong> emitted by my screen.</p>
<p>Then we get the amount of light required to bounce off the surface behind the screen to be of at least 10% of 784 lumen, which is ~79 lumen.</p>
<p>Since I don&#8217;t have a 100% reflective surface, I assume about 50% of the light is reflected, which means I would need a light source of at least <strong>160 lumen</strong>.</p>
<h3>The light source choice<a href="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2012/03/sms-5050.png"><img class="alignright size-thumbnail wp-image-69" title="sms-5050" src="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2012/03/sms-5050-150x150.png" alt="" width="150" height="150" /></a></h3>
<p>In order to obtain a better spread light, the best choice would be to have an array of LEDs going around the perimeter of the screen, in the back.</p>
<p>On my particular setup I required 3 meters of LED band.</p>
<p>There are two options for the LEDs:</p>
<ul>
<li>SMD 3528 (cheaper, emit a lower amount of light, best for bias lightning if you have a neutral colored background &#8211; they come in single colors)</li>
<li>SMD 5050 (or the so called RGB LEDs, have a higher light output, in the 30 leds / meter setup they emit around 250 lumen / meter, while in the 60 leds / meter denser array most emit around 500 lumen / meter)</li>
</ul>
<p>To make a paralel of the amount of light with the regular light bulbs &#8211; an &#8216;old-school&#8217; 100 Watts incandescent light-bulb emits about 1400 lumen)</p>
<p><a href="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2012/03/led-glued-to-the-screen.jpg"><img class="alignright size-thumbnail wp-image-71" title="led-glued-to-the-screen" src="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2012/03/led-glued-to-the-screen-150x150.jpg" alt="" width="150" height="150" /></a><br />
I had chosen SMD 5050 over the SMD 3528, as I would be able to tackle their coloring in order to obtain a much more neutral color after bouncing from the back of the screens material coloring.</p>
<p>I&#8217;ve went with a 3m stripe of SMD 5050 RGB leds, with a density of 30 leds per meter, and although that would add up to 750 lumens (which is way too much), the controller allowed 10 steps of lower / increase the light emitted. (down to 10% of the maximum light output).</p>
<h3>Setting it all up</h3>
<p><a href="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2012/03/the-led-end-cut.jpg"><img class="alignright size-thumbnail wp-image-70" title="the-led-end-cut" src="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2012/03/the-led-end-cut-150x150.jpg" alt="" width="150" height="150" /></a><br />
I&#8217;ve bought a stripe of 5 meters of 5050 RGB SMD LEDs, of which I had cut of 3 meters (it can be cut at each 3 LEDs, easily with a pair of scissors).</p>
<p><a href="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2012/03/led-remote.jpg"><img src="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2012/03/led-remote.jpg" alt="" title="led-remote" width="106" height="238" class="alignleft size-full wp-image-75" /></a></p>
<p>I&#8217;ve powered it with a 5A, 12V power adapter (capable of powering up to 10 meters of 5050 LEDs).</p>
<p>I used an RGB Led controller which had an infrared remote capable to store color / intensity preferences.</p>
<p>The LED stripe had an adhesive tape, which I glued to the back of the screen.</p>
<h3>The result</h3>
<p>Indeed, as per my calculations going for 20%-30% of their power source (which would go to 150 &#8211; 225 lumen) was indeed providing the best experience.</p>
<p>To take out some of the pink in the background, I setup the LEDs to go with a bit of a colder color to compansate, and I am really pleased with the end result:</p>
<p style="text-align: center;"><a href="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2012/03/bias-lightning.jpg"><img class=" wp-image-68 aligncenter" title="bias-lightning" src="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2012/03/bias-lightning-620x419.jpg" alt="" width="620" height="419" /></a></p>
<p>Disclaimer: This is not a professional advice, I had gotten to the conclusions listed in this post after browsing the web and reading various people opinions on forums. If you want the best quality out of your setup, you should hire a professional.</p>
<p>If you had made a similar setup, or are going to, let me know your thoughts by commenting below. Do share what&#8217;s your experience with bias lightning.</p>
]]></content:encoded>
			<wfw:commentRss>http://mehigh.biz/ergonomics/bias-lightning-dramatically-improves-screen-viewing-experience-in-the-dark.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avoid Initial Slow Loading Times of Rails apps under Apache &amp; Passenger</title>
		<link>http://mehigh.biz/rails/avoid-initial-slow-loading-times-of-rails-apps-under-apache-passenger.html</link>
		<comments>http://mehigh.biz/rails/avoid-initial-slow-loading-times-of-rails-apps-under-apache-passenger.html#comments</comments>
		<pubDate>Sat, 19 Feb 2011 20:17:41 +0000</pubDate>
		<dc:creator>mehigh</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Passenger]]></category>

		<guid isPermaLink="false">http://mehigh.biz/?p=31</guid>
		<description><![CDATA[If you have enough RAM on your server, then you will probably want to avoid the lengthy booting times you experience after an application idles. There are 2 solutions I could find used to solve this problem: 1. Use a cron job to access the application every couple of minutes to keep it in memory. [...]]]></description>
			<content:encoded><![CDATA[<p>If you have enough RAM on your server, then you will probably want to avoid the lengthy booting times you experience after an application idles.</p>
<p>There are 2 solutions I could find used to solve this problem:</p>
<h2>1. Use a cron job to access the application every couple of minutes to keep it in memory.</h2>
<p>One of the &#8216;raw&#8217; solutions used are setting up a cron job to automatically access the application every few minutes and therefore keep it in memory.</p>
<pre>crontab -e
</pre>
<p>And use nano (or your favorite editor) to add this at the end of the cron jobs:</p>
<pre>*/5 * * * * wget <a href="http://www.example.com" rel="nofollow">http://www.example.com</a> &gt; /dev/null
</pre>
<p>This issues a wget request every 5 minutes and trashes the response.</p>
<h2>2. Setup passenger not to automatically kill the rails processes.</h2>
<p>But, on the other hand, if you have access to the server&#8217;s configuration, a better approach is to modify a few of Passenger&#8217;s constants:</p>
<p><a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengermaxpoolsize_lt_integer_gt" target="_blank">PassengerMaxPoolSize</a> 30 (use 15 if you have a machine with 1GB, 30 if you have 2GB of RAM, etc.). This will enable more processes to be spawned if necessary.</p>
<p><a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerPoolIdleTime" target="_blank">PassengerPoolIdleTime</a> 0 (using 0, application instances will not be shutdown unless it&#8217;s really necessary &#8211; when the available resources on the server are low)</p>
<p>On an Ubuntu machine, you would have to edit the <strong>/etc/apache2/httpd.conf</strong> file by adding these two lines:</p>
<pre>PassengerMaxPoolSize 30
PassengerPoolIdleTime 0
</pre>
<p>Restart apache</p>
<pre>sudo /etc/init.d/apache2 restart</pre>
<p>And you should not have that slow boot problem anymore.</p>
<h3>*3. Use nginx + thin</h3>
]]></content:encoded>
			<wfw:commentRss>http://mehigh.biz/rails/avoid-initial-slow-loading-times-of-rails-apps-under-apache-passenger.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Mac-alike Rails Development Environment</title>
		<link>http://mehigh.biz/rails/windows-mac-alike-rails-development-environment.html</link>
		<comments>http://mehigh.biz/rails/windows-mac-alike-rails-development-environment.html#comments</comments>
		<pubDate>Mon, 03 Jan 2011 20:16:07 +0000</pubDate>
		<dc:creator>mehigh</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://mehigh.biz/?p=29</guid>
		<description><![CDATA[As I already been using e-texteditor (for quite a few years), which is a clone of Mac-only Textmate, I thought to give setting up a mac-alike rails development environment a go. Since I had a ton of compatibility problems when developing under vanilla Windows (with Ruby1.9 and rails3, a lost of gems failed to work, [...]]]></description>
			<content:encoded><![CDATA[<p>As I already been using e-texteditor (for quite a few years), which is a clone of Mac-only Textmate, I thought to give setting up a mac-alike rails development environment a go.</p>
<p>Since I had a ton of compatibility problems when developing under vanilla Windows (with Ruby1.9 and rails3, a lost of gems failed to work, etc.), I hope the Unix-path is much smoother.</p>
<p>Let&#8217;s see how we can get it going&#8230;</p>
<h2>Step 1: Install cygwin</h2>
<p>You will need in to select the following in addition to the the default selected configuration (italic = requirements for the Nokogiri gem):</p>
<ul>
<li>make</li>
<li>gcc</li>
<li>libiconv</li>
<li>openssl</li>
<li>ruby</li>
<li><em>libiconv</em></li>
<li><em>libxml2</em></li>
<li><em>libxml2-devel</em></li>
<li><em>libxslt</em></li>
<li><em>libxslt-devel</em><strong>
<p></strong></li>
</ul>
<h2>Step 2: Use Console with Cygwin by default</h2>
<p>Console was one of the tips I didn&#8217;t know about ( <a href="http://sourceforge.net/projects/console/" target="_blank">http://sourceforge.net/projects/console/</a> ), it&#8217;s much nicer than the old &#8216;cmd&#8217;, and most of all you can set it up to start a cygwin console by default</p>
<p>Quote from <a href="http://garbageburrito.com/blog/entry/391/a-macesque-rails-development-environment-on-windows" rel="nofollow">http://garbageburrito.com/blog/entry/391/a-macesque-rails-development-environment-on-windows</a>:</p>
<p>You&#8217;ll want to setup cygwin as a Console Tab.  Just go into the settings and click &#8220;Add&#8221; under &#8220;Tabs&#8221;.  Use the following as the &#8220;Shell&#8221;.</p>
<pre>c:\cygwin\bin\bash --login -i</pre>
<p>If you want it to automatically open cygwin when you start Console, just move it to the top of the Tabs list.</p>
<p>Just in case you encounter errors with</p>
<pre>rvm install 1.8.7</pre>
<p>Checkout this post about readline: <a href="http://rvm.beginrescueend.com/packages/readline/" target="_blank">http://rvm.beginrescueend.com/packages/readline/</a>.</p>
<pre>rvm package install readline</pre>
<h2>Step 3a: Ruby 1.8.7</h2>
<p>Ruby 1.8.7 is already installed in cygwin, so if you want to use this one, you&#8217;re ready to go.</p>
<h2>Step 3b: If you want RVM</h2>
<p>Follow the instructions from <a href="http://rvm.beginrescueend.com/rvm/install/" rel="nofollow">http://rvm.beginrescueend.com/rvm/install/</a></p>
<pre>bash &lt; &lt;( curl <a href="http://rvm.beginrescueend.com/releases/rvm-install-head" rel="nofollow">http://rvm.beginrescueend.com/releases/rvm-install-head</a> )</pre>
<p>Modify ~/<strong>.bash_profile</strong> by appending at the very end, after all path loads etc:</p>
<pre>[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.</pre>
<p>Install ruby with</p>
<pre>rvm install 1.8.7</pre>
<pre>rvm install 1.9.2</pre>
<h2>Step 3c: Compile Latest Ruby (without RVM)</h2>
<p>Download the Ruby 1.9 source from <a href="http://www.ruby-lang.org/en/downloads/" target="_blank">http://www.ruby-lang.org/en/downloads/</a> (downloaded the latest stable Ruby 1.9.2-p136 at the time of writing)</p>
<pre>tar xvf ruby-1.2.2-p136.tar.gz</pre>
<pre>cd ruby-1.9.2-p136</pre>
<pre>./configure</pre>
<p>(lasts ~5-10 minutes)</p>
<pre>make -j 3</pre>
<p>(use 3 if you have 2 cores, 5 if you have 4 cores, etc.)</p>
<pre>make install</pre>
<pre>ruby -v</pre>
<p>to confirm the new version</p>
<p>(find more in-depth instructions here: <a href="http://www.curphey.com/2010/05/installing-and-configuring-ruby-1-9-from-source-using-cygwin/" target="_blank">http://www.curphey.com/2010/05/installing-and-configuring-ruby-1-9-from-source-using-cygwin/</a>)</p>
<h2>Step 4: Avoid the default installation of ri and rdoc from ruby gems</h2>
<p>To avoid the installing of documentation (as I usually check the online documentation):<br />
create <strong>.gemrc</strong> file in your cygwin home directory (<strong>~</strong>) with the following contents:</p>
<pre>gem: --no-ri --no-rdoc</pre>
<h2>Step 5: Install sqlite</h2>
<p>Downloaded the latest sqlite tarball containing the amalgamation for SQLite 3 from <a href="http://www.sqlite.org/download.html" target="_blank">http://www.sqlite.org/download.html</a>.</p>
<pre>tar xvf sqlite-autoconf-3070400.tar.gz</pre>
<pre>cd sqlite-autoconf-3070400</pre>
<pre>./configure</pre>
<pre>make -j 3</pre>
<p>(use 3 if you have 2 cores, 5 if you have 4 cores, etc.)</p>
<pre>make install</pre>
<h2>Step 6. Install Rails 3</h2>
<pre>gem install rails</pre>
<h2>Step 7. Create &amp; start the first Rails3 app</h2>
<pre>rails new testapp</pre>
<pre>cd testapp</pre>
<pre>bundle install</pre>
<p>(this will install sqlite3-ruby gem)</p>
<pre>rails s</pre>
<p>That&#8217;s it!</p>
<p><a href="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2011/01/cygwin-rails-windows.png"><img class="aligncenter size-full wp-image-105" title="cygwin-rails-windows" src="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2011/01/cygwin-rails-windows.png" alt="" width="637" height="391" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mehigh.biz/rails/windows-mac-alike-rails-development-environment.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; get_search_link() enhancer</title>
		<link>http://mehigh.biz/wordpress/wordpress-get_search_link-enhancer.html</link>
		<comments>http://mehigh.biz/wordpress/wordpress-get_search_link-enhancer.html#comments</comments>
		<pubDate>Tue, 30 Nov 2010 20:15:16 +0000</pubDate>
		<dc:creator>mehigh</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://mehigh.biz/?p=26</guid>
		<description><![CDATA[You already know that when performing the search in WordPress, the URL becomes something with: /?s=lorem+ipsum in the end. An odd fact was that get_search_link() returns something like /search/lorem+ipsum. So if you&#8217;re using a theme that creates a link to the search results page you&#8217;ll receive a different URL compared to the one that you [...]]]></description>
			<content:encoded><![CDATA[<p>You already know that when performing the search in WordPress, the URL becomes something with:<br />
<strong>/?s=lorem+ipsum</strong> in the end.</p>
<p>An odd fact was that get_search_link() returns something like <strong>/search/lorem+ipsum</strong>. So if you&#8217;re using a theme that creates a link to the search results page you&#8217;ll receive a different URL compared to the one that you receive when performing an actual search (two pages at different URLs showing the exact same content is no good).</p>
<p>Therefore I created a small snippet that fixes this when inserted in the functions.php file from your theme &#8211; making get_search_link() return the exact same URL that one would receive when performing a search.</p>
<p><code><br />
function simple_search_link($link)<br />
{<br />
	$link = str_replace('/search/','/?s=',$link);<br />
	$link = rtrim($link, '/');<br />
	return $link;<br />
}<br />
add_filter('search_link','simple_search_link');<br />
</code></p>
<p>I&#8217;ve used the <a href="http://php.net/manual/en/function.str-replace.php" target="_blank">str-replace</a> to replace the /search/ with /?s=, and the <a href="http://php.net/manual/en/function.rtrim.php" target="_blank">rtrim</a> function to strip the trailing /.<br />
Now the exact same URL is used for both the get_search_link as actual searches.</p>
<p>This would also mean a better performance if you&#8217;re using caching.</p>
]]></content:encoded>
			<wfw:commentRss>http://mehigh.biz/wordpress/wordpress-get_search_link-enhancer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enhance reCaptcha accessibility with disabled images</title>
		<link>http://mehigh.biz/js/enhance-recaptcha-accessibility.html</link>
		<comments>http://mehigh.biz/js/enhance-recaptcha-accessibility.html#comments</comments>
		<pubDate>Fri, 26 Nov 2010 20:13:57 +0000</pubDate>
		<dc:creator>mehigh</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Accessibility]]></category>

		<guid isPermaLink="false">http://mehigh.biz/?p=23</guid>
		<description><![CDATA[I&#8217;ve encountered an accessibility problem these days&#8230; default reCaptcha isn&#8217;t properly accessible when the images are disabled. A solution is to detect the availability of images, and if they are disabled to manually adjust the styling of the problematic elements. Basically doing this: Now to share how that was accomplished. 1. Uploaded 2 files: blank.gif [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve encountered an accessibility problem these days&#8230; default reCaptcha isn&#8217;t properly accessible when the images are disabled.</p>
<p>A solution is to detect the availability of images, and if they are disabled to manually adjust the styling of the problematic elements.<br />
Basically doing this:<br />
<img src="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2010/11/recaptcha-made-accessible.png" alt="reCaptcha made accessible" title="reCaptcha made accessible" width="300" height="200" class="aligncenter size-full wp-image-72" /></p>
<p>Now to share how that was accomplished. </p>
<p>1. Uploaded 2 files:</p>
<ul>
<li><a href="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2010/11/blank.gif" target="_blank">blank.gif</a> to the root of the domain</li>
<li><a href='http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2010/11/captcha-accessiblity-enhancer.js'>captcha-accessiblity-enhancer</a> to the root of the domain (it&#8217;s better to store all your JS file in a designated folder, but that is irrelevant for demo purposes)</li>
</ul>
<p>2. Embeded the JS (before the body closing tag &#8211; &lt;/body&gt;)<br />
<code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;<br />
&lt;script src="/captcha-accessiblity-enhancer.js" type="text/javascript"&gt;&lt;/script&gt;</code></p>
<p>And that&#8217;s it. The people with disabled images will be able to properly use the reCaptcha now.</p>
]]></content:encoded>
			<wfw:commentRss>http://mehigh.biz/js/enhance-recaptcha-accessibility.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Explorer &amp; Elements with an ID get a matching global variable in JS</title>
		<link>http://mehigh.biz/js/internet-explorer-elements-with-an-id-get-a-matching-global-variable-in-js.html</link>
		<comments>http://mehigh.biz/js/internet-explorer-elements-with-an-id-get-a-matching-global-variable-in-js.html#comments</comments>
		<pubDate>Fri, 26 Nov 2010 20:13:10 +0000</pubDate>
		<dc:creator>mehigh</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://mehigh.biz/?p=21</guid>
		<description><![CDATA[Object doesn't support this property or method If you&#8217;re getting an odd behavior on your scripts in Internet Explorer, try adjusting their name (for example by adjusting their names with a unique prefix) just to make sure that there isn&#8217;t any element in the page you&#8217;re working on with the same ID as your variable [...]]]></description>
			<content:encoded><![CDATA[<pre>Object doesn't support this property or method</pre>
<p>If you&#8217;re getting an odd behavior on your scripts in Internet Explorer, try adjusting their name (for example by adjusting their names with a unique prefix) just to make sure that there isn&#8217;t any element in the page you&#8217;re working on with the same ID as your variable name.</p>
<p><img src="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2010/11/object-doesnt-support-this-property-or-method.png" alt="Object doesn&#039;t support this property or method" title="Object doesn&#039;t support this property or method" width="432" height="282" class="aligncenter size-full wp-image-67" /></p>
<p>If you want to read a much elaborate explanation, go check out Rick Strahl&#8217;s post here: <a href="http://www.west-wind.com/weblog/posts/677442.aspx" target="_blank">Internet Explorer Global Variable Blow ups</a>, but the above should get you going in no time (and help you avoid some headaches).</p>
]]></content:encoded>
			<wfw:commentRss>http://mehigh.biz/js/internet-explorer-elements-with-an-id-get-a-matching-global-variable-in-js.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding wmode transparent to WordPress 3 media embeds</title>
		<link>http://mehigh.biz/wordpress/adding-wmode-transparent-to-wordpress-3-media-embeds.html</link>
		<comments>http://mehigh.biz/wordpress/adding-wmode-transparent-to-wordpress-3-media-embeds.html#comments</comments>
		<pubDate>Mon, 22 Nov 2010 20:12:04 +0000</pubDate>
		<dc:creator>mehigh</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://mehigh.biz/?p=19</guid>
		<description><![CDATA[In case you have a website that uses dropdowns you probably noticed the dropdown panel might get under the flash media (like Youtube video embeds). The fix to this is to setup the wmode attribue to transparent&#8230; but how do we do it in WordPress? Since WordPress 2.9 has enabled us to easily embed videos [...]]]></description>
			<content:encoded><![CDATA[<p>In case you have a website that uses dropdowns you probably noticed the dropdown panel might get under the flash media (like Youtube video embeds). The fix to this is to setup the wmode attribue to transparent&#8230; but how do we do it in WordPress? </p>
<p><img src="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2010/11/wmode-opaque-dropdown.png" alt="" title="wmode-opaque-dropdown" width="449" height="269" class="aligncenter size-full wp-image-61" /></p>
<p>Since WordPress 2.9 has enabled us to easily embed videos ( <a href="http://codex.wordpress.org/Embeds" target="_blank">codex.wordpress.org/Embeds</a> ), it also means we don&#8217;t have the ability to change the embed code (to add the wmode transparent for example), and that&#8217;s why we have to rely on applying a filter that does that for us.</p>
<p>Simply paste the following at the beginning of your theme&#8217;s functions.php (after &lt;?php ), and the wmode attribute will be setup automatically:</p>
<pre>function add_video_wmode_transparent($html, $url, $attr) {
   if (strpos($html, &quot;&lt;embed src=&quot; ) !== false) {
    	return str_replace('&lt;/param&gt;&lt;embed', '&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed wmode="transparent" ', $html);
   } else {
        return $html;
   }
}
add_filter('embed_oembed_html', 'add_video_wmode_transparent', 10, 3);</pre>
<h2>Update</h2>
<p>As Theo pointed out, the videos can come in in iframes instead of object elements. To make the videos transparent in those cases as well, here&#8217;s the updated snippet:</p>
<pre>function add_video_wmode_transparent($html, $url, $attr) {

if ( strpos( $html, "&lt;embed src=" ) !== false )
   { return str_replace('&lt;/param&gt;&lt;embed', '&lt;/param&gt;&lt;param name="wmode" value="opaque"&gt;&lt;/param&gt;&lt;embed wmode="opaque" ', $html); }
elseif ( strpos ( $html, 'feature=oembed' ) !== false )
   { return str_replace( 'feature=oembed', 'feature=oembed&#038;wmode=opaque', $html ); }
else
   { return $html; }
}
add_filter( 'embed_oembed_html', 'add_video_wmode_transparent', 10, 3);
</pre>
<p>A demo video embedded using built-in oEmbed:</p>
<p><span style="text-align:center; display: block;"><a href="http://mehigh.biz/wordpress/adding-wmode-transparent-to-wordpress-3-media-embeds.html"><img src="http://img.youtube.com/vi/6lbDyXu7gUQ/2.jpg" alt="" /></a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://mehigh.biz/wordpress/adding-wmode-transparent-to-wordpress-3-media-embeds.html/feed</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>jQuery Easy Slideshow Plugin</title>
		<link>http://mehigh.biz/js/there-exists-no-other-js-sideshow-plug-i.html</link>
		<comments>http://mehigh.biz/js/there-exists-no-other-js-sideshow-plug-i.html#comments</comments>
		<pubDate>Wed, 21 Jul 2010 20:10:21 +0000</pubDate>
		<dc:creator>mehigh</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://mehigh.biz/?p=17</guid>
		<description><![CDATA[There exists no other JS sideshow plug-in for me&#8230;. just Cycler: http://jquery.malsup.com/cycle/ Why bother using complicated alternatives&#8230; when you can do it in just one line? $(&#8216;.slider&#8217;).cycle({fx: &#8216;fade&#8217;});]]></description>
			<content:encoded><![CDATA[<p>There exists no other JS sideshow plug-in for me&#8230;. just Cycler:</p>
<p><a href="http://jquery.malsup.com/cycle/" rel="nofollow">http://jquery.malsup.com/cycle/</a></p>
<p>Why bother using complicated alternatives&#8230; when you can do it in just one line?<br />
$(&#8216;.slider&#8217;).cycle({fx: &#8216;fade&#8217;});</p>
]]></content:encoded>
			<wfw:commentRss>http://mehigh.biz/js/there-exists-no-other-js-sideshow-plug-i.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TR Backgrounds &amp; Fixing IE</title>
		<link>http://mehigh.biz/css/tr-backgrounds-fixing-ie.html</link>
		<comments>http://mehigh.biz/css/tr-backgrounds-fixing-ie.html#comments</comments>
		<pubDate>Fri, 09 Jul 2010 20:08:22 +0000</pubDate>
		<dc:creator>mehigh</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://mehigh.biz/?p=15</guid>
		<description><![CDATA[I was struggling to get some cross-browser rounded corners zebra table rows&#8230; but since the table required vertical-align:middle&#8230; applying the top right AND bottom right corners was impossible&#8230; up until I found out that CSS background-image on TR actually works cross-browser It works out of the box for most standards-compliant browsers&#8230; and a minor tweak [...]]]></description>
			<content:encoded><![CDATA[<p>I was struggling to get some cross-browser rounded corners zebra table rows&#8230; but since the table required vertical-align:middle&#8230; applying the top right AND bottom right corners was impossible&#8230; up until I found out that CSS background-image on TR actually works cross-browser <img src='http://www.mehigh.biz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
It works out of the box for most standards-compliant browsers&#8230; and a minor tweak is required for our older IE7 to kick in and apply it as well: at position:relative; to the table row.</p>
]]></content:encoded>
			<wfw:commentRss>http://mehigh.biz/css/tr-backgrounds-fixing-ie.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Badminton Relaxation</title>
		<link>http://mehigh.biz/status/badminton-relaxation.html</link>
		<comments>http://mehigh.biz/status/badminton-relaxation.html#comments</comments>
		<pubDate>Tue, 15 Jun 2010 20:07:22 +0000</pubDate>
		<dc:creator>mehigh</dc:creator>
				<category><![CDATA[Status]]></category>

		<guid isPermaLink="false">http://mehigh.biz/?p=13</guid>
		<description><![CDATA[Badminton &#8211; this is a game I find being really relaxing&#8230; but with the right &#8216;tools&#8217;. Some low-quality racquets might blow the fun out of it, but the good news is that decent racquets can be found easily in the 20$ range&#8230; the fun you have playing with them: invaluable. Just got a Badminton Basic [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2010/06/head-badminton-basic_kit1.jpg" class="thickbox" title="HEAD - Badminton Basic Kit"><img class="alignright size-thumbnail wp-image-30" title="head-badminton-basic_kit" src="http://mehigh.biz.s3.amazonaws.com/wp-content/uploads/2010/06/head-badminton-basic_kit1-150x150.jpg" alt="" width="150" height="150" /></a>Badminton &#8211; this is a game I find being really relaxing&#8230; but with the right &#8216;tools&#8217;.<br />
Some low-quality racquets might blow the fun out of it, but the good news is that decent racquets can be found easily in the 20$ range&#8230; the fun you have playing with them: invaluable.</p>
<p>Just got a Badminton Basic Kit from Head (cheers to Dia_Fantasy for recommending these to me)&#8230; and I played with them until I could hardly see the shuttles in the night  <img src='http://mehigh.biz/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Bottom line: Go out and play !</p>
]]></content:encoded>
			<wfw:commentRss>http://mehigh.biz/status/badminton-relaxation.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

