<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>ThinkRobot</title>
	
	<link>http://think-robot.com</link>
	<description>Design &amp; Development Blog</description>
	<lastBuildDate>Tue, 09 Aug 2011 16:56:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Think-robot" /><feedburner:info uri="think-robot" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Edit BIOS in Lenovo ThinkPad x220t</title>
		<link>http://feedproxy.google.com/~r/Think-robot/~3/8znU91T5hvM/</link>
		<comments>http://think-robot.com/2011/08/edit-bios-in-lenovo-thinkpad-x220t/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 16:56:32 +0000</pubDate>
		<dc:creator>Joanna</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bios]]></category>
		<category><![CDATA[Lenovo]]></category>
		<category><![CDATA[tablet]]></category>
		<category><![CDATA[ThinkPad]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://think-robot.com/?p=302</guid>
		<description><![CDATA[As it&#8217;s changed from the previous model it had me scratching my head for a few minutes. To enter the BIOS setup just use F1 during laptop startup. Related Articles:openSUSE 11 on Lenovo Thinkpad X61 (tablet pc)Autloading modular forms &#038; models in Zend Framework 1.8Server Error 500 - htaccess require valid-userWordPress NextGen gallery tweakInstalling Windows [...]]]></description>
			<content:encoded><![CDATA[<p>As it&#8217;s changed from the previous model it had me scratching my head for a few minutes. To enter the BIOS setup just use <strong>F1 during laptop startup</strong>.</p>
<div id="crp_related"><h2>Related Articles:</h2><ul><li><a href="http://think-robot.com/2008/08/opensuse-11-on-lenovo-thinkpad-x61-tablet-pc/" rel="bookmark">openSUSE 11 on Lenovo Thinkpad X61 (tablet pc)</a></li><li><a href="http://think-robot.com/2009/07/autloading-modular-forms-models-in-zend-framework-18/" rel="bookmark">Autloading modular forms & models in Zend Framework 1.8</a></li><li><a href="http://think-robot.com/2008/08/server-error-500-htaccess-require-valid-user/" rel="bookmark">Server Error 500 - htaccess require valid-user</a></li><li><a href="http://think-robot.com/2008/11/wordpress-nextgen-gallery-tweak/" rel="bookmark">WordPress NextGen gallery tweak</a></li><li><a href="http://think-robot.com/2010/12/installing-windows-7-guest-on-vmware-7-on-opensuse-113-host/" rel="bookmark">Installing Windows 7 Guest on VMWare 7 on OpenSuse 11.3 Host</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Think-robot/~4/8znU91T5hvM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://think-robot.com/2011/08/edit-bios-in-lenovo-thinkpad-x220t/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://think-robot.com/2011/08/edit-bios-in-lenovo-thinkpad-x220t/</feedburner:origLink></item>
		<item>
		<title>WordPress update permission issues</title>
		<link>http://feedproxy.google.com/~r/Think-robot/~3/XWh-D_21xlI/</link>
		<comments>http://think-robot.com/2011/06/wordpress-update-permission-issues/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 22:24:19 +0000</pubDate>
		<dc:creator>Joanna</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://think-robot.com/?p=297</guid>
		<description><![CDATA[WordPress can often be such a pain to deal with&#8230; Recently I was trying to get an installation updated as well as some of the plugins. What should have been a straightforward task, turned out to be several hours of messing around with permissions and trying to figure out why even 777 isn&#8217;t enough for [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress can often be such a pain to deal with&#8230;</p>
<p>Recently I was trying to get an installation updated as well as some of the plugins. What should have been a straightforward task, turned out to be several hours of messing around with permissions and trying to figure out why even 777 isn&#8217;t enough for the updates to NOT fail and what user should own what.</p>
<p>Well it turns out that it&#8217;s only partly the fault of WordPress as it is an <strong>issue with the FTP server</strong>. Still some better messaging would be helpful&#8230;</p>
<p>There were mentions about a patch and fixes in potentially in the <strong>3.2 WP version</strong> related to the error I was getting:</p>
<pre><code>Could not copy file.: /public_html/wp-admin/css/theme-editor.dev.css</code></pre>
<p>However only after stumbling across <a href="http://www.aeromental.net/2011/01/11/automatic-update-public_htmlwp-admincsstheme-editor-dev-css/" class="external">this page</a> I found an easy and quick solution.</p>
<p>Turns out it was enough to just switch from Pure-FTPD to <strong>Pro-FTPD</strong>.</p>
<div id="crp_related"><h2>Related Articles:</h2><ul><li><a href="http://think-robot.com/2008/11/wordpress-nextgen-gallery-tweak/" rel="bookmark">WordPress NextGen gallery tweak</a></li><li><a href="http://think-robot.com/2008/11/nested-sortable-using-jtree-clickable-links/" rel="bookmark">Nested sortable using jTree - clickable links</a></li><li><a href="http://think-robot.com/2010/12/installing-windows-7-guest-on-vmware-7-on-opensuse-113-host/" rel="bookmark">Installing Windows 7 Guest on VMWare 7 on OpenSuse 11.3 Host</a></li><li><a href="http://think-robot.com/2008/08/server-error-500-htaccess-require-valid-user/" rel="bookmark">Server Error 500 - htaccess require valid-user</a></li><li><a href="http://think-robot.com/2010/12/zend-application-resource-plugin-loading-issues/" rel="bookmark">Zend Application Resource Plugin Loading Issues</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Think-robot/~4/XWh-D_21xlI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://think-robot.com/2011/06/wordpress-update-permission-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://think-robot.com/2011/06/wordpress-update-permission-issues/</feedburner:origLink></item>
		<item>
		<title>Top Level Cookies in Opera for Custom Domain Names</title>
		<link>http://feedproxy.google.com/~r/Think-robot/~3/rxh5DUW0blY/</link>
		<comments>http://think-robot.com/2011/04/top-level-cookies-in-opera-for-custom-domain-names/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 23:36:14 +0000</pubDate>
		<dc:creator>Joanna</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[top level]]></category>

		<guid isPermaLink="false">http://think-robot.com/?p=288</guid>
		<description><![CDATA[For our local development at work we all use the same fake domain &#8211; helps with setting API keys and other things across the board and isn&#8217;t hard to setup whatever system any new developer might have. It also happens to be not a &#8220;.com&#8221;: www.local.bnt &#8211; which is nice for not confusing it with [...]]]></description>
			<content:encoded><![CDATA[<p>For our local development at work we all use the same fake domain &#8211; helps with setting API keys and other things across the board and isn&#8217;t hard to setup whatever system any new developer might have. It also happens to be not a &#8220;.com&#8221;: <strong>www.local.bnt</strong> &#8211; which is nice for not confusing it with real sites.</p>
<p>While developing cross-subdomain authentication we suddenly realised that it didn&#8217;t work on Opera. After a bit of research it turns out that it&#8217;s not the setting of the cookie path (&#8220;.local.bnt&#8221;) that is the problem, but <a target="_blank" href="http://my.opera.com/yngve/blog/show.dml/267415">the way Opera checks which part of the domain name is the top level domain</a>:</p>
<blockquote><p>&#8220;Here at Opera we went for the rule-of-thumb method: When Opera is checking a cookie whose target domain matches certain criteriea (e.g. it is not a .com domain), <strong>we do a DNS name lookup for the target domain, to see if there is an IP address for that domain</strong>. If there is an IP address for the domain (e.g. example.no) we assume that the domain is a normal company domain, not a co.uk like domain, and therefore safe. If there is no IP address we assume that the domain is co.uk-like and therefore unsafe, and only allows the cookie to be set for the server that sent the cookie.&#8221;</p></blockquote>
<p>So that&#8217;s the problem right there and with an easy fix once you know the above&#8230; However the whole article is worth a read as it does shed some light on the multiple problems related to top level domains and cookies.</p>
<p>If you want to keep your random local domain name make sure your <strong>hosts file</strong> contains not only your sub domains, but the main one as well even if it is not used directly.</p>
<pre><code>127.0.0.1    www.local.bnt
<strong>127.0.0.1    local.bnt</strong>
</code></pre>
<div id="crp_related"><h2>Related Articles:</h2><ul><li><a href="http://think-robot.com/2009/05/doctrine-many-to-many-with-extra-fields/" rel="bookmark">Doctrine Many To Many With Extra Fields</a></li><li><a href="http://think-robot.com/2009/02/how-to-use-the-strong-ownership-list/" rel="bookmark">How To Use the Strong Ownership List</a></li><li><a href="http://think-robot.com/2010/03/multiple-changes-and-a-delete-on-same-object-in-doctrine/" rel="bookmark">Multiple changes and a delete on same object in doctrine</a></li><li><a href="http://think-robot.com/2009/12/phpunit-selenium-screenshot-path-problem/" rel="bookmark">PHPUnit & Selenium - screenshot path problem</a></li><li><a href="http://think-robot.com/2009/04/regex-for-autolinking-urls/" rel="bookmark">Regex for Autolinking URLs</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Think-robot/~4/rxh5DUW0blY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://think-robot.com/2011/04/top-level-cookies-in-opera-for-custom-domain-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://think-robot.com/2011/04/top-level-cookies-in-opera-for-custom-domain-names/</feedburner:origLink></item>
		<item>
		<title>jQuery Multiple Events Without Default Behaviour</title>
		<link>http://feedproxy.google.com/~r/Think-robot/~3/n9lTVMavq64/</link>
		<comments>http://think-robot.com/2011/03/jquery-multiple-events-without-default-behaviour/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 22:51:34 +0000</pubDate>
		<dc:creator>Joanna</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://think-robot.com/?p=276</guid>
		<description><![CDATA[Sometimes you trip over the little things. With several people working on the same page while we were recreating some JS functionality from scratch I&#8217;ve noticed one of my buttons suddenly stopped working. Scratched my head a bit, and for a minute thought that maybe it&#8217;s not having a &#8220;return false;&#8221; in my jQuery live() [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you trip over the little things.</p>
<p>With several people working on the same page while we were recreating some JS functionality from scratch I&#8217;ve noticed one of my buttons suddenly stopped working. Scratched my head a bit, and for a minute thought that maybe it&#8217;s not having a &#8220;return false;&#8221; in my jQuery live() event handler.</p>
<p>Turned out though that it was actually one of the other developers actually putting a &#8220;return false;&#8221; in their event handler that just happened to target the same element&#8230; </p>
<p>Ideally we needed to propagate the event through a variable number of events but prevent the default behaviour of a link kicking in. <strong>preventDefault()</strong> to the rescue! <img src='http://think-robot.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre><code>$('#tag').live('click', function(event){
    (...)
    event.preventDefault();
});
</code></pre>
<p>Now, before blindly applying this piece of code I&#8217;d encourage everyone to first read up on <a target="_blank" href="http://fuelyourcoding.com/jquery-events-stop-misusing-return-false/">why &#8220;return false;&#8221; is evil</a>. <img src='http://think-robot.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>And for a quick reference here&#8217;s a table featured on a related <a target="_blank" href="http://stackoverflow.com/questions/5302903/jquery-event-stopimmediatepropagation-vs-return-false">StackOverflow question</a>:</p>
<table>
<thead>
<tr>
<td>&nbsp;</td>
<th>stop propagation</th>
<th>prevent default action</th>
<th>prevent &#8220;same element&#8221; event handlers</th>
</tr>
</thead>
<tbody>
<tr>
<th>return false</th>
<td>X</td>
<td>X</td>
<td>&nbsp;</td>
</tr>
<tr>
<th>preventDefault</th>
<td>&nbsp;</td>
<td>X</td>
<td>&nbsp;</td>
</tr>
<tr>
<th>stopPropagation</th>
<td>X</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<th>stopImmediatePropagation</th>
<td>X</td>
<td>&nbsp;</td>
<td>X</td>
</tr>
</tbody>
</table>
<div id="crp_related"><h2>Related Articles:</h2><ul><li><a href="http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/" rel="bookmark">Hitch. Object-oriented event handlers with jQuery</a></li><li><a href="http://think-robot.com/2008/11/nested-sortable-using-jtree-clickable-links/" rel="bookmark">Nested sortable using jTree - clickable links</a></li><li><a href="http://think-robot.com/2009/04/zend_db_select-multiple-table-joins-explained/" rel="bookmark">Zend_Db_Select multiple table joins explained</a></li><li><a href="http://think-robot.com/2008/11/wordpress-nextgen-gallery-tweak/" rel="bookmark">WordPress NextGen gallery tweak</a></li><li><a href="http://think-robot.com/2011/01/enable-delayed-messages-in-zend_queue/" rel="bookmark">Enable delayed messages in Zend_Queue</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Think-robot/~4/n9lTVMavq64" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://think-robot.com/2011/03/jquery-multiple-events-without-default-behaviour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://think-robot.com/2011/03/jquery-multiple-events-without-default-behaviour/</feedburner:origLink></item>
		<item>
		<title>Enable delayed messages in Zend_Queue</title>
		<link>http://feedproxy.google.com/~r/Think-robot/~3/ZGzKEpLpuvA/</link>
		<comments>http://think-robot.com/2011/01/enable-delayed-messages-in-zend_queue/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 11:57:52 +0000</pubDate>
		<dc:creator>Joanna</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[classes]]></category>
		<category><![CDATA[examples]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[queue]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Zend_Queue]]></category>

		<guid isPermaLink="false">http://think-robot.com/?p=268</guid>
		<description><![CDATA[The default Zend_Queue DB implementation unfortunately does not allow you to pass a timeout value when saving a message on the queue. However not all is lost and you can easily extend the standard Zend classes to add that functionality. All you need is your own Db adapter and Queue class. For the adapter you [...]]]></description>
			<content:encoded><![CDATA[<p>The default Zend_Queue DB implementation unfortunately does not allow you to <strong>pass a timeout value</strong> when saving a message on the queue. However not all is lost and you can easily extend the standard Zend classes to add that functionality.</p>
<p>All you need is your own <strong>Db adapter</strong> and <strong>Queue class</strong>.</p>
<p>For the adapter you only need to overwrite <strong>the send()</strong> function. The highlighted code below is the only change to the original class (2 lines affected&#8230;). You could actually apply this without extending Zend_Queue, but this way will be easier if you ever need to update your Zend library.</p>
<pre><code>&lt;?php

class TS_Queue_Adapter_Db extends Zend_Queue_Adapter_Db {

    /**
     * Send a message to the queue
     *
     * @param  string     $message Message to send to the active queue
     * @param  Zend_Queue $queue
     * @param  Timestamp $timeout
     * @return Zend_Queue_Message
     * @throws Zend_Queue_Exception - database error
     */
    public function send($message, Zend_Queue $queue = null<strong>, $timeout = null</strong>){
        if ($this->_messageRow === null) {
            $this->_messageRow = $this->_messageTable->createRow();
        }

        if ($queue === null) {
            $queue = $this->_queue;
        }

        if (is_scalar($message)) {
            $message = (string) $message;
        }
        if (is_string($message)) {
            $message = trim($message);
        }

        if (!$this->isExists($queue->getName())) {
            require_once 'Zend/Queue/Exception.php';
            throw new Zend_Queue_Exception('Queue does not exist:' . $queue->getName());
        }

        $msg = clone $this->_messageRow;
        $msg->queue_id = $this->getQueueId($queue->getName());
        $msg->created = time();
        $msg->body = $message;
        $msg->md5 = md5($message);
<strong>        $msg->timeout = $timeout;</strong>

        try {
            $msg->save();
        } catch (Exception $e) {
            require_once 'Zend/Queue/Exception.php';
            throw new Zend_Queue_Exception($e->getMessage(), $e->getCode(), $e);
        }

        $options = array(
            'queue' => $queue,
            'data' => $msg->toArray(),
        );

        $classname = $queue->getMessageClass();
        if (!class_exists($classname)) {
            require_once 'Zend/Loader.php';
            Zend_Loader::loadClass($classname);
        }
        return new $classname($options);
    }
}</code></pre>
<p>Your Queue class only needs to extend the <strong>send()</strong> function again to allow you to pass the timeout through. obviously you can use this class to add other functionality too.</p>
<pre><code>&lt;?php

class TS_Queue extends Zend_Queue {

	/**
	 * Send a message to the queue
	 *
	 * @param  mixed $message message
	 * @return Zend_Queue_Message
	 * @throws Zend_Queue_Exception
	 */
	public function send($message, $timeout = null){
		return $this->getAdapter()->send($message, null, $timeout);
	}
}</code></pre>
<div id="crp_related"><h2>Related Articles:</h2><ul><li><a href="http://think-robot.com/2009/06/hitch-object-oriented-event-handlers-with-jquery/" rel="bookmark">Hitch. Object-oriented event handlers with jQuery</a></li><li><a href="http://think-robot.com/2009/04/zend_db_select-multiple-table-joins-explained/" rel="bookmark">Zend_Db_Select multiple table joins explained</a></li><li><a href="http://think-robot.com/2009/05/doctrine-many-to-many-with-extra-fields/" rel="bookmark">Doctrine Many To Many With Extra Fields</a></li><li><a href="http://think-robot.com/2008/12/using-zend_mail-and-google-smtp-to-send-emails/" rel="bookmark">Using Zend_Mail and Google SMTP to send emails</a></li><li><a href="http://think-robot.com/2010/12/zend-application-resource-plugin-loading-issues/" rel="bookmark">Zend Application Resource Plugin Loading Issues</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Think-robot/~4/ZGzKEpLpuvA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://think-robot.com/2011/01/enable-delayed-messages-in-zend_queue/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://think-robot.com/2011/01/enable-delayed-messages-in-zend_queue/</feedburner:origLink></item>
		<item>
		<title>Zend Application Resource Plugin Loading Issues</title>
		<link>http://feedproxy.google.com/~r/Think-robot/~3/MTqqsiwMjIU/</link>
		<comments>http://think-robot.com/2010/12/zend-application-resource-plugin-loading-issues/#comments</comments>
		<pubDate>Sat, 25 Dec 2010 17:27:17 +0000</pubDate>
		<dc:creator>Joanna</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://think-robot.com/?p=256</guid>
		<description><![CDATA[Admittedly thinking while feeling feverish is slightly impaired, but it took me a little while to figure this one out&#8230; Trying to integrate ZF 1.11 with Doctrine2 to as per this article, I was trying to be a smart-ass and use TS_Resource_EntityManager instead of the ugly looking TS_Resource_Entitymanager. Unfortunately all this got me was this [...]]]></description>
			<content:encoded><![CDATA[<p>Admittedly thinking while feeling feverish is slightly impaired, but it took me a little while to figure this one out&#8230; Trying to integrate ZF 1.11 with Doctrine2 to as per <a href="http://www.spiffyjr.me/2010/11/17/zend-framework-1-11-doctrine-2-lets-play-nice-part-1/" class="external">this article</a>, I was trying to be a smart-ass and use TS_Resource_EntityManager instead of the ugly looking TS_Resource_Entitymanager.</p>
<p>Unfortunately all this got me was this very unhelpful error:</p>
<pre><code>Zend_Application_Bootstrap_Exception with message Resource
matching <strong>"entityManager"</strong> not found</code></pre>
<p>It turns out that although the case of the resource name in the application.ini dosn&#8217;t really matter the class name does not like mixed case. So had to settle with <strong>TS_Resource_Entitymanager</strong> as the plugin name.</p>
<div id="crp_related"><h2>Related Articles:</h2><ul><li><a href="http://think-robot.com/2011/06/wordpress-update-permission-issues/" rel="bookmark">WordPress update permission issues</a></li><li><a href="http://think-robot.com/2009/07/redirect-in-controller-plugin-zend-framework-18/" rel="bookmark">Redirect in controller plugin - Zend Framework 1.8</a></li><li><a href="http://think-robot.com/2009/07/autloading-modular-forms-models-in-zend-framework-18/" rel="bookmark">Autloading modular forms & models in Zend Framework 1.8</a></li><li><a href="http://think-robot.com/2011/01/enable-delayed-messages-in-zend_queue/" rel="bookmark">Enable delayed messages in Zend_Queue</a></li><li><a href="http://think-robot.com/2010/12/installing-windows-7-guest-on-vmware-7-on-opensuse-113-host/" rel="bookmark">Installing Windows 7 Guest on VMWare 7 on OpenSuse 11.3 Host</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Think-robot/~4/MTqqsiwMjIU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://think-robot.com/2010/12/zend-application-resource-plugin-loading-issues/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://think-robot.com/2010/12/zend-application-resource-plugin-loading-issues/</feedburner:origLink></item>
		<item>
		<title>Installing Windows 7 Guest on VMWare 7 on OpenSuse 11.3 Host</title>
		<link>http://feedproxy.google.com/~r/Think-robot/~3/NbhNduZD4ys/</link>
		<comments>http://think-robot.com/2010/12/installing-windows-7-guest-on-vmware-7-on-opensuse-113-host/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 23:49:39 +0000</pubDate>
		<dc:creator>Joanna</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[OpenSuse]]></category>
		<category><![CDATA[ThinkPad]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[window 7]]></category>

		<guid isPermaLink="false">http://think-robot.com/?p=248</guid>
		<description><![CDATA[Maybe this will help anyone else stuck on the installation. For a long while my Windows 7 install inside VMWare 7 would get stuck at &#8220;expanding files 0%&#8221;. I kept thinking it was my machine and setup that was causing issue, after all a x64 tablet pc is not your most common config. Just in [...]]]></description>
			<content:encoded><![CDATA[<p>Maybe this will help anyone else stuck on the installation.</p>
<p>For a long while my Windows 7 install inside VMWare 7 would get stuck at <strong>&#8220;expanding files 0%&#8221;</strong>. I kept thinking it was my machine and setup that was causing issue, after all a x64 tablet pc is not your most common config. Just in case anyone is curious I&#8217;ve got a Thinkpad x201t.</p>
<p>After trying both 32bit and 64bit Windows 7 version, upgrading my RAM from 4GB to 8GB and trying out changing the virtual disk location from ntfs to ext3 and back I was quickly running out of options.</p>
<p>Unfortunately VMWare support is extremely picky about your os versions and didn&#8217;t even try to suggest anything unless I downgraded to OpenSuse 11.2 &#8211; which was not an option due to certain driver compatibility.</p>
<p>Fortunately I decided to give it one more go and instead of using my external dvd drive for the Windows 7 installation I <strong>saved the DVD as iso</strong> and run the installation that way. And there you go, that was the solution!</p>
<p>My suspicion was the fact that my DVD drive is usb powered, however while looking for a solution I saw similar questions being asked for other linux hosts and no mention of external DVD drives, so it might be a more generic issue.</p>
<div id="crp_related"><h2>Related Articles:</h2><ul><li><a href="http://think-robot.com/2008/08/opensuse-11-on-lenovo-thinkpad-x61-tablet-pc/" rel="bookmark">openSUSE 11 on Lenovo Thinkpad X61 (tablet pc)</a></li><li><a href="http://think-robot.com/2011/06/wordpress-update-permission-issues/" rel="bookmark">WordPress update permission issues</a></li><li><a href="http://think-robot.com/2009/12/phpunit-selenium-screenshot-path-problem/" rel="bookmark">PHPUnit & Selenium - screenshot path problem</a></li><li><a href="http://think-robot.com/2008/11/nested-sortable-using-jtree-clickable-links/" rel="bookmark">Nested sortable using jTree - clickable links</a></li><li><a href="http://think-robot.com/2008/08/server-error-500-htaccess-require-valid-user/" rel="bookmark">Server Error 500 - htaccess require valid-user</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Think-robot/~4/NbhNduZD4ys" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://think-robot.com/2010/12/installing-windows-7-guest-on-vmware-7-on-opensuse-113-host/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://think-robot.com/2010/12/installing-windows-7-guest-on-vmware-7-on-opensuse-113-host/</feedburner:origLink></item>
		<item>
		<title>PHP_AUTH_USER and PHP_AUTH_PW is null</title>
		<link>http://feedproxy.google.com/~r/Think-robot/~3/52E9o1IWLpg/</link>
		<comments>http://think-robot.com/2010/12/php_auth_user-and-php_auth_pw-is-null/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 19:30:41 +0000</pubDate>
		<dc:creator>Joanna</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://think-robot.com/?p=249</guid>
		<description><![CDATA[Ok, so you&#8217;re trying to setup password protection on your website using HTTP authentication. Unfortunately despite the request for password working your authentication keeps failing. If you check the output of your script and the password and username variables are not populated as expected it will usually be for one of two reasons. Working code [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so you&#8217;re trying to setup password protection on your website using HTTP authentication. Unfortunately despite the request for password working your authentication keeps failing. If you check the output of your script and the password and username variables are not populated as expected it will usually be for one of two reasons.</p>
<h2>Working code example</h2>
<pre><code>
$username = "expectedUsername";
$password = "expectedPassword";

if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != $username || $_SERVER['PHP_AUTH_PW'] != $password) {
  header('WWW-Authenticate: Basic realm=""');
  header('HTTP/1.0 401 Unauthorized');
  echo '&gt;h2>Authorization failed.&gt;/h2>';
  exit;
} else if($_SERVER['PHP_AUTH_USER'] != $username &#038; $_SERVER['PHP_AUTH_PW'] != $password){
  echo '&gt;h2>Authorization failed.&gt;/h2>';
  exit;
}</code></pre>
<h2>Most common reason for failure</h2>
<p>Firstly if you are using an older book or website as reference you will see <strong>$PHP_AUTH_USER</strong> mentioned instead of <strong>$_SERVER['PHP_AUTH_USER']</strong>. If you are using the former then this could be the reason for not seeing your variables populated.</p>
<h2>The reason that can take you by surprise</h2>
<p>If your code is correct (compare against the example) and you are using the $_SERVER variable format and still getting <strong>NULL</strong> inside both $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] it&#8217;s time to check your server settings.</p>
<p>HTTP authentication does not work with the <strong>cgi version of PHP</strong>, so if your hosting allows you will need to switch to PHP as Apache module or look for an alternative solution.</p>
<div id="crp_related"><h2>Related Articles:</h2><ul><li><a href="http://think-robot.com/2008/12/using-zend_mail-and-google-smtp-to-send-emails/" rel="bookmark">Using Zend_Mail and Google SMTP to send emails</a></li><li><a href="http://think-robot.com/2008/08/server-error-500-htaccess-require-valid-user/" rel="bookmark">Server Error 500 - htaccess require valid-user</a></li><li><a href="http://think-robot.com/2009/12/phpunit-selenium-screenshot-path-problem/" rel="bookmark">PHPUnit & Selenium - screenshot path problem</a></li><li><a href="http://think-robot.com/2008/08/opensuse-11-on-lenovo-thinkpad-x61-tablet-pc/" rel="bookmark">openSUSE 11 on Lenovo Thinkpad X61 (tablet pc)</a></li><li><a href="http://think-robot.com/2008/10/how-to-convert-pdt-projects-into-phpeclipse-projects/" rel="bookmark">How to convert PDT projects into PHPEclipse projects</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Think-robot/~4/52E9o1IWLpg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://think-robot.com/2010/12/php_auth_user-and-php_auth_pw-is-null/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://think-robot.com/2010/12/php_auth_user-and-php_auth_pw-is-null/</feedburner:origLink></item>
		<item>
		<title>Using TextMate for easier CSS3</title>
		<link>http://feedproxy.google.com/~r/Think-robot/~3/UeThwqqv5gU/</link>
		<comments>http://think-robot.com/2010/09/using-textmate-for-easier-css3/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 19:54:15 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[transform]]></category>

		<guid isPermaLink="false">http://think-robot.com/?p=236</guid>
		<description><![CDATA[Over the past couple of years Webkit has popularised many fancy new CSS tricks. Amongst these the ability to rotate an element is certainly one of the most useful. Fortunately it&#8217;s also widely supported in other browsers, even in lowly old IE right back to version 5.5. The &#8216;modern&#8217; browsers support this with a reasonably [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past couple of years Webkit has popularised many fancy new CSS tricks. Amongst these the ability to rotate an element is certainly one of the most useful. Fortunately it&#8217;s also widely supported in other browsers, even in lowly old IE right back to version 5.5. The &#8216;modern&#8217; browsers support this with a reasonably simple syntax</p>
<p><span id="more-236"></span></p>
<pre><code>[-vendor-prefix-]transform: rotate([angle]deg);</code></pre>
<p>so to use this to rotate an element by 15 degrees in Webkit (e.g. Safari, Chrome), Mozilla and Opera you&#8217;d use</p>
<pre><code>-moz-transform: rotate(15deg);
-o-transform: rotate(15deg);
-webkit-transform: rotate(15deg);
transform: rotate(15deg); </code></pre>
<p>We include the rule without a vendor prefix so that once browsers start to implement this without requiring the use of it our CSS will be ready.</p>
<p>Sadly the syntax for Internet Explorer is a little more cumbersome. It uses the	DXImageTransform.Microsoft.Matrix filter which is a little cryptic, but fortunately quite well documented on <a href="http://msdn.microsoft.com/en-us/library/ms533014(VS.85).aspx">MSDN</a>. We also need 2 variations of this filter, one for IE &lt; 8 and another for IE ≥ 8.</p>
<p>To use the filter the first thing we need to do is convert our angle into radians (angle in radians = angle in degrees * π / 180) then we work with the sine and cosine of this angle:</p>
<pre><code>DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',M11=[cos(angle)],M12=[-sin(angle)],M21=[sin(angle)],M22=[cos(angle)]);</code></pre>
<p>So if we take our rotate by 15 degrees example from above we&#8217;d end up with the following to cover all IE versions:</p>
<pre><code>filter:progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',M11=0.965925826289068,M12=-0.258819045102521,M21=0.258819045102521,M22=0.965925826289068);
-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand',M11=0.965925826289068,M12=-0.258819045102521,M21=0.258819045102521,M22=0.965925826289068)";</code></pre>
<p>Obviously we don&#8217;t really want to have to whip out a calculator and type 6 lines of CSS every time we want to rotate an element. To save myself a little time I created a <a href="http://www.macromates.com">TextMate</a> bundle that simplifies the process a bit. This bundle allows me to type the standard syntax.</p>
<pre><code>transform:rotate(-10deg)</code></pre>
<p>Then hit a keyboard shortcut to have TextMate fill in the rest.</p>
<p>To add this bundle go to Bundles &gt; Bundle Editor &gt; Show Bundle Editor</p>
<p>Select CSS from the list on the left and side of the editor and select Add new command from the buttons at the bottom. Paste the following into the Command(s) field</p>
<pre><code>#!/usr/bin/env ruby
line = $stdin.read
if line =~ /(\s*)transform\s*:\s*rotate\s*\(\s*(-?[0-9]+)\s*deg\s*\)/i
	rad = $2.to_i * Math::PI / 180
	cos = Math.cos(rad)
	sin = Math.sin(rad)

	print $`
	print $1 + "-moz-transform:rotate(" + $2 + "deg);\n"
	print $1 + "-o-transform:rotate(" + $2 + "deg);\n"
	print $1 + "-webkit-transform:rotate(" + $2 + "deg);\n"
	print $1 + "transform:rotate(" + $2 + "deg);\n"
	print $1 + "filter:progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',M11=" + 	cos.to_s + ",M12=" + (sin * -1).to_s + ",M21=" + sin.to_s + ",M22=" + cos.to_s + ");\n"
	print $1 + "-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand',M11=" + cos.to_s + ",M12=" + (sin * -1).to_s + ",M21=" + sin.to_s + ",M22=" + cos.to_s + ")\";\n"
	print $'
else
	print line
end</code></pre>
<p>Then select Save: Nothing, Input: Selected text or Line and Output: Replace Selected Text. Now you need to setup how you&#8217;ll trigger this. Select Activation: Key Equivalent and then enter the keyboard shortcut you&#8217;d like &#8211; I&#8217;m using <kbd>Shift + Cmd + R</kbd></p>
<p><img class="alignleft size-medium wp-image-237" style="margin-right: 1em; margin-bottom: 1em;" title="bundle-editor" src="http://think-robot.com/wp-content/uploads/2010/09/bundle-editor-300x180.png" alt="bundle-editor" width="300" height="180" /></p>
<p>Finally close the bundle editor and select Bundle &gt; Bundle Editor &gt; Reload Bundles and you should be good to go.</p>
<p>Of course there are many other CSS3 properties that up until now have been implemented using vendor prefixes in some browsers. We can simplify creating these with some more TextMate snippets. I&#8217;ll include a couple of examples here, firstly box-shadow. Webkit and Mozilla support this using a vendor prefix, Opera and Internet Explorer 9 use the standard property. The syntax is:</p>
<pre><code>[-vendor-prefix-]box-shadow: [x offset] [y offset] [blur radius] [color];</code></pre>
<p>So to create a drak grey shadow just offset slightly below an element we might use something like this:</p>
<pre><code>-moz-box-shadow: 0 2px 5px #333;
-webkit-box-shadow: 0 2px 5px #333;
box-shadow: 0 2px 5px #333;</code></pre>
<p>For the TextMate snippet we&#8217;ll use tab triggers and placeholders &#8211; this let you type a keyword and hit the tab key to insert the text of the snippet with placeholder values inserted with the first placeholder selected so you can fill in a value, tabbing again moves onto the next placeholder and so on. Open up the bundle editor from Bundles &gt; Bundle Editor &gt; Show Bundle Editor and select to add a new snippet under the CSS section. Paste the following into the snippet window:</p>
<pre><code>-moz-box-shadow: ${1:x offset} ${2:y offset} ${3:blur radius} ${4:color};
-webkit-box-shadow: ${1:x offset} ${2:y offset} ${3:blur radius} ${4:color};
box-shadow: ${1:x offset} ${2:y offset} ${3:blur radius} ${4:color};</code></pre>
<p>Select Activation: Tab Trigger and type in the word box as the trigger. Name this snippet box-shadow and exit the bundle editor. Relaod bundles to give it a try. In a CSS file now type box and hit the tab key. The following should be inserted:</p>
<pre><code>-moz-box-shadow: x offset y offset spread color;
-webkit-box-shadow: x offset y offset spread color;
box-shadow: x offset y offset spread color;</code></pre>
<p>with the x offset text highlighted. Starting to type will overwrite all the x offset placeholders, hitting tab again will move onto the y offset. Easy. You could add another snippet that provided box shadows using the inset modifier.</p>
<pre><code>[-vendor-prefix-]box-shadow: inset [x offset] [y offset] [blur radius] [color];</code></pre>
<p>border-radius might also be a good candidate for a time-saving snippet. Probably the most common use of this is where we want to specify equally rounded corners on all round our box. We could use the same style of tab triggered snippet as with the box-shadow example. The snippet would be very simple with just a single placeholder &#8211; something like this:</p>
<pre><code>-moz-border-radius: ${1:1em};
-webkit-border-radius: ${1:1em};
border-radius: ${1:1em};</code></pre>
<p>TextMate is a wonderful editor and snippets really do make this stuff a breeze.</p>
<div id="crp_related"><h2>Related Articles:</h2><ul><li><a href="http://think-robot.com/2011/06/wordpress-update-permission-issues/" rel="bookmark">WordPress update permission issues</a></li><li><a href="http://think-robot.com/2008/10/display-meetings-from-entourage-using-geektool/" rel="bookmark">Display Meetings From Entourage Using GeekTool</a></li><li><a href="http://think-robot.com/2008/11/wordpress-nextgen-gallery-tweak/" rel="bookmark">WordPress NextGen gallery tweak</a></li><li><a href="http://think-robot.com/2008/08/opensuse-11-on-lenovo-thinkpad-x61-tablet-pc/" rel="bookmark">openSUSE 11 on Lenovo Thinkpad X61 (tablet pc)</a></li><li><a href="http://think-robot.com/2010/08/mantis-theme-mock-up/" rel="bookmark">Mantis theme mock-up</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Think-robot/~4/UeThwqqv5gU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://think-robot.com/2010/09/using-textmate-for-easier-css3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://think-robot.com/2010/09/using-textmate-for-easier-css3/</feedburner:origLink></item>
		<item>
		<title>Mantis theme mock-up</title>
		<link>http://feedproxy.google.com/~r/Think-robot/~3/VQJ3HZu9ERA/</link>
		<comments>http://think-robot.com/2010/08/mantis-theme-mock-up/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 12:57:38 +0000</pubDate>
		<dc:creator>Joanna</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[MantisBT]]></category>
		<category><![CDATA[mock]]></category>

		<guid isPermaLink="false">http://think-robot.com/?p=226</guid>
		<description><![CDATA[At my new job we use MantisBT for our bug tracking and project management. Unfortunately despite good functionality the visual side is desperately lacking some love and attention. Tired of looking at the barely styled web app I decided to spruce it up a little bit. A teaser of the new design can be seen [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_225" class="wp-caption alignleft" style="width: 311px"><a href="http://think-robot.com/wp-content/uploads/2010/08/mantis-teaser.png"><img class="size-full wp-image-225" title="Mantis Design Teaser" src="http://think-robot.com/wp-content/uploads/2010/08/mantis-teaser.png" alt="Mantis Design Teaser" width="301" height="192" /></a><p class="wp-caption-text">Mantis Design Teaser</p></div>
<p style="clear:left;">At my new job we use MantisBT for our bug tracking and project management. Unfortunately despite good functionality the visual side is desperately lacking some love and attention. Tired of looking at the barely styled web app I decided to spruce it up a little bit. A teaser of the new design can be seen above.</p>
<p><strong>UPDATE [18/02/2011]:</strong></p>
<p>The theme is not ready yet, but I finally got round to start implementing it. For anyone interested in the work in progress: <a href="https://github.com/thinksentient/mantisbt">Mantis &#8211; MyTheme</a></p>
<div id="crp_related"><h2>Related Articles:</h2><ul><li><a href="http://think-robot.com/2009/02/improving-design-by-using-a-grid-system/" rel="bookmark">Improving Design by Using a Grid System</a></li><li><a href="http://think-robot.com/2008/06/atmedia-london-2008/" rel="bookmark">@media - London, 2008</a></li><li><a href="http://think-robot.com/2009/04/blog-revamp-complete/" rel="bookmark">Blog Revamp Complete</a></li><li><a href="http://think-robot.com/2010/09/using-textmate-for-easier-css3/" rel="bookmark">Using TextMate for easier CSS3</a></li><li><a href="http://think-robot.com/2009/02/firefox-ignores-tabs-but-not-spaces-in-a-pre-tag/" rel="bookmark">Firefox ignores tabs but not spaces in a pre tag</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Think-robot/~4/VQJ3HZu9ERA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://think-robot.com/2010/08/mantis-theme-mock-up/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://think-robot.com/2010/08/mantis-theme-mock-up/</feedburner:origLink></item>
	</channel>
</rss>

