<?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>Indirecthit</title>
	
	<link>http://www.indirecthit.com</link>
	<description>A Discussion on PHP, AJAX and Other Web Tools with a bit of startup talk</description>
	<lastBuildDate>Tue, 02 Mar 2010 14:34:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Indirecthit" /><feedburner:info uri="indirecthit" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Media, Cookies &amp; Domains</title>
		<link>http://feedproxy.google.com/~r/Indirecthit/~3/p_8UNXgAokA/</link>
		<comments>http://www.indirecthit.com/2010/03/02/media-cookies-domains/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 14:34:41 +0000</pubDate>
		<dc:creator>clong</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[static]]></category>

		<guid isPermaLink="false">http://www.indirecthit.com/?p=57</guid>
		<description><![CDATA[With all the brilliant tools (Google Page Speed, YSlow, etc.) out there, web professionals can now easily see a few basic things to improve page speed performance. One suggestion is to send static content from a cookieless domain. On most sites I&#8217;ve worked with, we serve static content from a media subdomain and then the [...]]]></description>
			<content:encoded><![CDATA[<p>With all the brilliant tools (<a title="Google Page Speed" href="http://code.google.com/speed/page-speed/">Google Page Speed</a>, <a title="YSlow" href="http://developer.yahoo.com/yslow/">YSlow</a>, etc.) out there, web professionals can now easily see a few basic things to improve page speed performance. One suggestion is to send static content from a cookieless domain. On most sites I&#8217;ve worked with, we serve static content from a media subdomain and then the real content from the main domain (without www). I know with cookies, if the domain is <strong>.indirecthit.com</strong> it would send that cookie to any subdomain on <strong>indirecthit.com</strong>, therefore the media subdomain would have a cookie. An easy change: remove the <strong>.</strong> from the cookie domain. But when I looked at the <a href="http://www.php.net" class="ubernym uttInitialism" onmouseover="domTT_activate(this, event, 'content', 'PHP: Hypertext Preprocessor' );"><abbr class="uttInitialism">PHP</abbr></a> manual for setcookie, I came across the following statement:</p>
<blockquote><p>The        <em>.</em> is not required but makes it compatible        with more browsers.</p></blockquote>
<p>That doesn&#8217;t sound very good, I want it to be compatible with all browsers&#8230;</p>
<p>I couldn&#8217;t find much on it, from what I did find I believe the reason it doesn&#8217;t work with all browsers is for security. If I had the domain <strong>er.com</strong>, and I set a cookie to the domain <strong>er.com</strong> (notice the missing <strong>.</strong>), the browser could match this with <strong>older.com</strong> or <strong>lesser.com</strong>. If the website at <strong>er.com</strong> set the cookie to <strong>er.com </strong>(without the first <strong>.</strong>), the web server on <strong>older.com </strong>or <strong>lesser.com</strong> can access this cookie&#8230;not good. Therefore, even if I remove the <strong>. </strong>from the domain, it still would match <strong>media.indirecthit.com</strong> and that domain wouldn&#8217;t be cookieless.Doesn&#8217;t solve my problem and isn&#8217;t compatible with most browsers.</p>
<p>The solution, is to split out your media server on a different domain such as <strong>indirecthitmedia.com</strong>. This is why when you visit some Google properties it loads media content from <strong>gstatic.com </strong>not<strong> media.google.com</strong> or <strong>google.com</strong>. And obviously you don&#8217;t set any cookies to this new media domain. You will now score a bit higher on <a title="Google Page Speed" href="http://code.google.com/speed/page-speed/">Google Page Speed</a> and <a title="YSlow" href="http://developer.yahoo.com/yslow/">YSlow</a>. Congrats!</p><img src="http://feeds.feedburner.com/~r/Indirecthit/~4/p_8UNXgAokA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.indirecthit.com/2010/03/02/media-cookies-domains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.indirecthit.com/2010/03/02/media-cookies-domains/</feedburner:origLink></item>
		<item>
		<title>Table Centering Inheritance</title>
		<link>http://feedproxy.google.com/~r/Indirecthit/~3/IbFIbePsjYM/</link>
		<comments>http://www.indirecthit.com/2008/11/10/table-centering-inheritance/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 00:31:26 +0000</pubDate>
		<dc:creator>clong</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.indirecthit.com/?p=41</guid>
		<description><![CDATA[I recently came across a little cross-browser issue with using the align attribute in tables. The problem was that we had some cells centering in Internet Explorer and Opera but not in Safari and Firefox. The result was how the inheritence of the align attribute is handled by the different browsers.
The first image below is [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across a little cross-browser issue with using the align attribute in tables. The problem was that we had some cells centering in Internet Explorer and Opera but not in Safari and Firefox. The result was how the inheritence of the align attribute is handled by the different browsers.</p>
<p>The first image below is in Opera, and the second is in Firefox. I wanted it to look like it does in Firefox.</p>
<p style="text-align: center;"><a href="http://www.indirecthit.com/wp-content/uploads/2008/11/picture-3.png"><img title="picture-3"  style="clear:both" src="http://www.indirecthit.com/wp-content/uploads/2008/11/picture-3-300x25.png" alt="" width="300" height="25" /></a></p>
<p style="text-align: center;"><a href="http://www.indirecthit.com/wp-content/uploads/2008/11/picture-4.png"><img title="picture-4" src="http://www.indirecthit.com/wp-content/uploads/2008/11/picture-4-299x25.png" alt="" width="299" height="25" style="clear:both" /></a></p>
<p><br/><br />
<br/><br />
<br/><br />
The <span class="ubernym uttInitialism" onmouseover="domTT_activate(this, event, 'content', 'Link to the spec: (&lt;a href=&quot;http://www.w3.org/MarkUp/&quot;&gt;link&lt;/a&gt;)','caption', 'HyperText Markup Language' );"><abbr class="uttInitialism">HTML</abbr></span> for the above is:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;table width=&quot;550px&quot; border=&quot;1&quot;&gt;
	&lt;tr&gt;
		&lt;td align=&quot;center&quot;&gt;
			&lt;table border=&quot;1&quot; width=&quot;80%&quot;&gt;
				&lt;tr&gt;
					&lt;td&gt;Apple Sauce&lt;/td&gt;
					&lt;td&gt;Pecan Pumpkin Butter&lt;/td&gt;
				&lt;/tr&gt;
			&lt;/table&gt;
		&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;</pre></td></tr></table></div>

<p>The problem is that the</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;td align=&quot;center&quot;&gt;</pre></div></div>

<p> is inherited by the tables within that table for IE and Opera but not for Firefox. It&#8217;s an easy fix, just make the next &lt;td&gt; into &lt;td align=&#8221;left&#8221;&gt; to fix it. It&#8217;s nothing major, probably very well known&#8230;but the first time I&#8217;ve come across it.</p><img src="http://feeds.feedburner.com/~r/Indirecthit/~4/IbFIbePsjYM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.indirecthit.com/2008/11/10/table-centering-inheritance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.indirecthit.com/2008/11/10/table-centering-inheritance/</feedburner:origLink></item>
		<item>
		<title>Private RSS Feeds &amp; Feed Readers</title>
		<link>http://feedproxy.google.com/~r/Indirecthit/~3/p-kP1tljWVA/</link>
		<comments>http://www.indirecthit.com/2008/06/12/private-rss-feeds-feed-readers/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 02:31:41 +0000</pubDate>
		<dc:creator>clong</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[blogs]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.indirecthit.com/?p=39</guid>
		<description><![CDATA[We&#8217;re planning an event here at Well.ca, a secret event. But that&#8217;s not what this post is about. To organize and send out invites for this event I suggested we use MyPunchBowl. I haven&#8217;t done much with it, but it looked half decent and I&#8217;ve heard good things about it.
There was one problem with MyPunchBowl, [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re planning an event here at <a href="http://www.well.ca" class="ubernym uttJustLink" onmouseover="domTT_activate(this, event, 'content', 'An online health store, the place I work.','caption', 'Well.ca' );">Well.ca</a>, a secret event. But that&#8217;s not what this post is about. To organize and send out invites for this event I suggested we use <a href="http://www.mypunchbowl.com/">MyPunchBowl</a>. I haven&#8217;t done much with it, but it looked half decent and I&#8217;ve heard good things about it.</p>
<p>There was one problem with <a href="http://www.mypunchbowl.com/">MyPunchBowl</a>, you were unable to add multiple hosts to an event. <a href="http://xandra.tumblr.com/">Alex</a> emailed support@mypunchbowl.com asking for a solution. That&#8217;s the last I heard about it till now.</p>
<p>I happen to use <a href="http://www.bloglines.com">Bloglines</a>, and I have a search in <a href="http://www.bloglines.com">Bloglines</a> for any posts on &#8220;<a href="http://www.well.ca" class="ubernym uttJustLink" onmouseover="domTT_activate(this, event, 'content', 'An online health store, the place I work.','caption', 'Well.ca' );">Well.ca</a>&#8221;. I was a bit surprised tonight when I came across a <span class="ubernym uttInitialism" onmouseover="domTT_activate(this, event, 'content', 'Really Simple Syndication' );"><abbr class="uttInitialism">RSS</abbr></span> entry that contained Alex&#8217;s email to support@mypunchbowl.com and the subsequent responses. It appears that <a href="http://www.mypunchbowl.com/">MyPunchBowl</a> uses <a href="http://sproutit.com/mailroom">Sproutit Mailroom</a> for their support emails, which has an <span class="ubernym uttInitialism" onmouseover="domTT_activate(this, event, 'content', 'Really Simple Syndication' );"><abbr class="uttInitialism">RSS</abbr></span> feed of support emails. Someone has subscribed to this <span class="ubernym uttInitialism" onmouseover="domTT_activate(this, event, 'content', 'Really Simple Syndication' );"><abbr class="uttInitialism">RSS</abbr></span> feed in <a href="http://www.bloglines.com">Bloglines</a> and was found by my search for &#8220;<a href="http://www.well.ca" class="ubernym uttJustLink" onmouseover="domTT_activate(this, event, 'content', 'An online health store, the place I work.','caption', 'Well.ca' );">Well.ca</a>&#8221;.</p>
<p>When you add a feed to <a href="http://www.bloglines.com">Bloglines</a>, you can mark the feed as &#8220;Private&#8221; or &#8220;Public&#8221;. The interesting thing is that marking a feed as &#8220;Private&#8221; means (from <a href="http://www.bloglines.com">Bloglines</a>): &#8220;Private subscriptions don&#8217;t show up in blogrolls and you will not be listed as a public subscriber. However, the feed and all its posts will remain available to the public via Bloglines and Ask.com Blog &amp; Feed Search&#8221;.</p>
<p>I don&#8217;t like putting stuff I want to keep private into <span class="ubernym uttInitialism" onmouseover="domTT_activate(this, event, 'content', 'Really Simple Syndication' );"><abbr class="uttInitialism">RSS</abbr></span> feeds and this confirms my feelings.</p>
<p>As a side note, the <span class="ubernym uttInitialism" onmouseover="domTT_activate(this, event, 'content', 'Really Simple Syndication' );"><abbr class="uttInitialism">RSS</abbr></span> feed in question can be accessed directly if you have the <span class="ubernym uttInitialism" onmouseover="domTT_activate(this, event, 'content', 'Uniform Resource Locator' );"><abbr class="uttInitialism">URL</abbr></span>. Maybe I&#8217;m being paranoid, but I don&#8217;t think this information should be so open.</p><img src="http://feeds.feedburner.com/~r/Indirecthit/~4/p-kP1tljWVA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.indirecthit.com/2008/06/12/private-rss-feeds-feed-readers/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.indirecthit.com/2008/06/12/private-rss-feeds-feed-readers/</feedburner:origLink></item>
		<item>
		<title>Django Caching Middleware &amp; Login Page</title>
		<link>http://feedproxy.google.com/~r/Indirecthit/~3/nUEHeYVdWMQ/</link>
		<comments>http://www.indirecthit.com/2008/06/02/django-caching-middleware-login-page/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 13:15:48 +0000</pubDate>
		<dc:creator>clong</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[StartupIndex]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cache]]></category>

		<guid isPermaLink="false">http://www.indirecthit.com/?p=37</guid>
		<description><![CDATA[Recently on StartupIndex.ca, I&#8217;ve noticed a problem where the first time you login it fails, the second time it works. I sat down last night, and spent some time attempting to solve this problem. My search on the greater web didn&#8217;t end up with very many results, I did find one mailing list thread on [...]]]></description>
			<content:encoded><![CDATA[<p>Recently on StartupIndex.ca, I&#8217;ve noticed a problem where the first time you login it fails, the second time it works. I sat down last night, and spent some time attempting to solve this problem. My search on the greater web didn&#8217;t end up with very many results, I did find one mailing list thread on &#8220;<a href="http://groups.google.ca/group/django-users/browse_thread/thread/3d0694201341c205/abf83324933b243f?hl=en&amp;lnk=st&amp;q=django+login+auth+fails+multiple#abf83324933b243f">django.contrib.auth.views.login failing cookie test</a>&#8220;. This wasn&#8217;t exactly what I was looking for, but it set me down the right path.</p>
<p>Django comes with a <a href="http://www.djangoproject.com/documentation/cache/#the-per-site-cache">caching middleware</a> that caches any request made to the site that doesn&#8217;t have a POST or GET. You can set the cache to only cache pages for anonymous (using CACHE_MIDDLEWARE_ANONYMOUS_ONLY). The second piece of the puzzle is that the login view for Django sets a test cookie when a visitor first comes to the page, if this is not there, the login will fail.</p>
<p>What happens is:</p>
<ol>
<li>Make a request to the login page without any GET or POST parameters.</li>
<li>Web server returns the cached page. (Note: this doesn&#8217;t set the cookie because no Python code has been run, the page returned is static)</li>
<li>The user enters in the login information and submits the information. This is sent to the server as a POST.</li>
<li>The server, because of the POST, now runs the login view. This fails because there was no cookie previously set, but it does set the cookie that should have been previously set.</li>
<li>The error message shown to the user is as if it was a failed attempt. If the user reenters the information, the login will now work as the cookie is now set.</li>
</ol>
<p>Hopefully that makes some sense.</p>
<p>What is the solution? Unfortunately, the <a href="http://www.djangoproject.com/documentation/cache/#the-per-site-cache">caching middleware</a> doesn&#8217;t allow you to fine-grain what it caches, it&#8217;s an all or nothing. There are two solutions:</p>
<ol>
<li>Always pass a GET param to the login page. By passing a GET param, the <a href="http://www.djangoproject.com/documentation/cache/#the-per-site-cache">caching middleware</a> will not return the cached page.</li>
<li>Turn off the  <a href="http://www.djangoproject.com/documentation/cache/#the-per-site-cache">caching middleware</a> and instead use the more fine-grained <a href="http://www.djangoproject.com/documentation/cache/#the-per-view-cache">per-view cache</a>.</li>
</ol>
<p>I&#8217;m trying the GET parameter. We&#8217;ll see how it works.</p><img src="http://feeds.feedburner.com/~r/Indirecthit/~4/nUEHeYVdWMQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.indirecthit.com/2008/06/02/django-caching-middleware-login-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.indirecthit.com/2008/06/02/django-caching-middleware-login-page/</feedburner:origLink></item>
		<item>
		<title>StartupIndex.ca Article in ComputerWorld Canada</title>
		<link>http://feedproxy.google.com/~r/Indirecthit/~3/ij80dz25DfE/</link>
		<comments>http://www.indirecthit.com/2008/05/30/startupindexca-article-in-computerworld-canada/#comments</comments>
		<pubDate>Fri, 30 May 2008 14:33:16 +0000</pubDate>
		<dc:creator>clong</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.indirecthit.com/?p=36</guid>
		<description><![CDATA[Jevon and I were interviewed by ComputerWorld Canada yesterday. The article just went up this morning. Can get to it here: http://www.itworldcanada.com/a/Daily-News/25b53438-4513-4bda-8527-0350f9672ae7.html]]></description>
			<content:encoded><![CDATA[<p><a href="http://startupnorth.ca">Jevon</a> and I were interviewed by ComputerWorld Canada yesterday. The article just went up this morning. Can get to it here: <a href="http://www.itworldcanada.com/a/Daily-News/25b53438-4513-4bda-8527-0350f9672ae7.html">http://www.itworldcanada.com/a/Daily-News/25b53438-4513-4bda-8527-0350f9672ae7.html</a></p><img src="http://feeds.feedburner.com/~r/Indirecthit/~4/ij80dz25DfE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.indirecthit.com/2008/05/30/startupindexca-article-in-computerworld-canada/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.indirecthit.com/2008/05/30/startupindexca-article-in-computerworld-canada/</feedburner:origLink></item>
		<item>
		<title>JSR 311 – Java REST Libraries</title>
		<link>http://feedproxy.google.com/~r/Indirecthit/~3/iWr2bPAnAfs/</link>
		<comments>http://www.indirecthit.com/2008/05/29/jsr-311-java-rest-libraries/#comments</comments>
		<pubDate>Fri, 30 May 2008 01:47:26 +0000</pubDate>
		<dc:creator>clong</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[rest]]></category>

		<guid isPermaLink="false">http://www.indirecthit.com/?p=35</guid>
		<description><![CDATA[I&#8217;m starting to work on a project at Well.ca using Java and REST. Knowing the amount of REST libraries out there for other languages, I figured there would be a good amount for Java. Wrong!
There is a Java specification currently in draft for REST, it&#8217;s called JSR 311. Now the problem with this is that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting to work on a project at <a href="http://www.well.ca" class="ubernym uttJustLink" onmouseover="domTT_activate(this, event, 'content', 'An online health store, the place I work.','caption', 'Well.ca' );">Well.ca</a> using Java and REST. Knowing the amount of REST libraries out there for other languages, I figured there would be a good amount for Java. Wrong!</p>
<p>There is a Java specification currently in draft for REST, it&#8217;s called <a href="https://jsr311.dev.java.net/">JSR 311</a>. Now the problem with this is that it is still a draft.</p>
<p>There are currently a few implementations of <a href="https://jsr311.dev.java.net/">JSR 311</a>:</p>
<ul>
<li><a href="https://jersey.dev.java.net/">Jersey</a> &#8211; Part of <a href="https://glassfish.dev.java.net/">Glassfish</a> (SUN&#8217;s open source JEE server)</li>
<li><a href="http://cxf.apache.org/">Apache CXF</a> &#8211; This was previously XFire, an implementation of SOAP for Java. It has also started to implement <a href="https://jsr311.dev.java.net/">JSR 311</a>. I think this implementation isn&#8217;t as fully featured as the other implementations.</li>
<li><a href="http://wiki.jboss.org/wiki/RESTeasy">RESTeasy</a> &#8211; JBoss&#8217;s implementation of <a href="https://jsr311.dev.java.net/">JSR 311</a>.</li>
</ul>
<p>There are a few other options for REST and Java. One option that has been around for a while is called <a href="http://www.restlet.org/">Restlet</a>. The creator of <a href="http://www.restlet.org/">Restlet</a> is involved in the writing of <a href="https://jsr311.dev.java.net/">JSR 311</a> but I don&#8217;t believe his project implements <a href="https://jsr311.dev.java.net/">JSR 311</a>. <em>Update[11-Jun-08]: As commented below by <cite><a rel="external nofollow" href="http://blog.noelios.com/">Jerome Louvel</a> and </cite><cite><a rel="external nofollow" href="http://stephankoo.wordpress.com/">Stephan Koops</a> there is an extension to Restlet to implement </cite><a href="https://jsr311.dev.java.net/">JSR 311</a>, more information can be found on the <a href="http://wiki.restlet.org/docs_1.1/g1/13-restlet/28-restlet/57-restlet.html">Restlet Wiki</a>.</em></p>
<p>Currently, I&#8217;m using <a href="http://cxf.apache.org/">Apache CXF</a> for my project. But I&#8217;m hoping to move to <a href="https://jersey.dev.java.net/">Jersey</a> or <a href="http://wiki.jboss.org/wiki/RESTeasy">RESTeasy</a> because they have a more complete implementation.</p>
<p>The problem with <a href="https://jersey.dev.java.net/">Jersey</a> is that it doesn&#8217;t play nice with <a href="http://hibernate.org/">Hibernate</a> and <a href="http://maven.apache.org/">Maven</a>. This is caused by <a href="http://hibernate.org/">Hibernate</a> requiring cglib which requires ASM 1.5.3, while <a href="https://jersey.dev.java.net/">Jersey</a> requires ASM 3. There are a few solutions described on the web, but they haven&#8217;t solved the problem for me. I&#8217;m hoping to work on this at some point, once I find a solution (if I do) then I&#8217;ll post it.</p><img src="http://feeds.feedburner.com/~r/Indirecthit/~4/iWr2bPAnAfs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.indirecthit.com/2008/05/29/jsr-311-java-rest-libraries/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.indirecthit.com/2008/05/29/jsr-311-java-rest-libraries/</feedburner:origLink></item>
		<item>
		<title>StartupIndex.ca Updated with Widgety Goodness</title>
		<link>http://feedproxy.google.com/~r/Indirecthit/~3/8697OTfkMNI/</link>
		<comments>http://www.indirecthit.com/2008/05/29/startupindexca-updated-with-widgety-goodness/#comments</comments>
		<pubDate>Thu, 29 May 2008 16:26:27 +0000</pubDate>
		<dc:creator>clong</dc:creator>
				<category><![CDATA[StartupIndex]]></category>
		<category><![CDATA[startupindex.ca]]></category>

		<guid isPermaLink="false">http://www.indirecthit.com/?p=34</guid>
		<description><![CDATA[I updated StartupIndex.ca yesterday with some new features.

Ali updated the map on the frontpage to be more intelligent and fixed some annoying problems with it. Now it looks better and responds better.
We now have widgets! See below for an example widget, but this code can be placed into any webpage to give information on a [...]]]></description>
			<content:encoded><![CDATA[<p>I updated <a href="http://startupindex.ca">StartupIndex.ca</a> yesterday with some new features.</p>
<ul>
<li><a href="http://aliasaria.ca/blog/" class="ubernym uttJustLink" onmouseover="domTT_activate(this, event, 'content', 'The founder &amp; CEO of Well.ca','caption', 'Ali Asaria' );">Ali</a> updated the map on the frontpage to be more intelligent and fixed some annoying problems with it. Now it looks better and responds better.</li>
<li>We now have widgets! See below for an example widget, but this code can be placed into any webpage to give information on a startup or investor listed on <a href="http://startupindex.ca">StartupIndex.ca</a>. You can access the widget for any startup or investor by the &#8220;Embed Widget&#8221; option on the profile page.</li>
<li>A new addition that is not visible from the frontend is a new framework for moderation edits to StartupIndex. This will increase our turn around on approving changes. I&#8217;m planning on releasing the code for this as a separate Django application in the near future. More on that soon.</li>
</ul>
<div class="startupindex-info_widgetdetails"><script src="http://startupindex.ca/widgets/startup/akoha/" type="text/javascript"></script></p>
<div class="startupindex-footer"><a href="http://startupindex.ca/"><img style="border: none; padding: 0; margin: 0;" src="http://media.startupindex.ca/images/startupindexca_logo_tiny.png" alt="" align="absmiddle" /></a></div>
</div><img src="http://feeds.feedburner.com/~r/Indirecthit/~4/8697OTfkMNI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.indirecthit.com/2008/05/29/startupindexca-updated-with-widgety-goodness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.indirecthit.com/2008/05/29/startupindexca-updated-with-widgety-goodness/</feedburner:origLink></item>
		<item>
		<title>Two New Tools for Web Dev</title>
		<link>http://feedproxy.google.com/~r/Indirecthit/~3/9cRd1wipki8/</link>
		<comments>http://www.indirecthit.com/2008/05/29/two-new-tools-for-web-dev/#comments</comments>
		<pubDate>Thu, 29 May 2008 16:17:55 +0000</pubDate>
		<dc:creator>clong</dc:creator>
				<category><![CDATA[JavaScript/Ajax]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://www.indirecthit.com/?p=32</guid>
		<description><![CDATA[
IETester was just released, this tool looks to be incredibly handy. Right now it&#8217;s in Alpha, but I&#8217;m still planning on using it. Previously I used Multiple IE, but I found that to be a little buggy and prone to not work at all at times. I&#8217;m planning on giving it a try sometime today, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.indirecthit.com/wp-content/uploads/2008/05/ietester-02.png"><img class="alignleft size-full wp-image-33" title="ietester-02" src="http://www.indirecthit.com/wp-content/uploads/2008/05/ietester-02.png" alt="" width="250" height="145" /></a></p>
<p><a href="http://www.my-debugbar.com/wiki/IETester/HomePage">IETester</a> was just released, this tool looks to be incredibly handy. Right now it&#8217;s in Alpha, but I&#8217;m still planning on using it. Previously I used <a href="http://tredosoft.com/Multiple_IE">Multiple IE</a>, but I found that to be a little buggy and prone to not work at all at times. I&#8217;m planning on giving it a try sometime today, maybe it will solve at least some problems on testing with IE.</p>
<p>A little late, but <a href="http://google.com">Google</a> released an <a href="http://code.google.com/apis/ajaxlibs/">API for loading common JS libraries</a> (such as <a href="http://jquery.com/">JQuery</a>, <a href="http://www.prototypejs.org/">Prototype</a>, <a href="http://mootools.net/">Mootools</a>, etc.) from their network of CDNs. This will also increase the chances of someone having the common library cached, instead of having to download an individual copy of JQuery for each site they visit. It&#8217;s not a new idea, <a href="http://aol.com"><span class="ubernym uttInitialism" onmouseover="domTT_activate(this, event, 'content', 'Still the largest internet service provider in the world (&lt;a href=&quot;http://www.aol.com&quot;&gt;link&lt;/a&gt;)','caption', 'America Online' );"><abbr class="uttInitialism">AOL</abbr></span></a> has hosted the <a href="http://dojotoolkit.org/">Dojo JS library</a> on it&#8217;s CDN for the past few years (<a href="http://dev.aol.com/dojo">more details</a>). Still, I&#8217;m glad to see it expand into other libraries. I will probably move <a href="http://startupindex.ca">StartupIndex.ca</a> to load the <a href="http://jquery.com/">JQuery library</a> from <a href="http://google.com">Google</a>.</p><img src="http://feeds.feedburner.com/~r/Indirecthit/~4/9cRd1wipki8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.indirecthit.com/2008/05/29/two-new-tools-for-web-dev/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.indirecthit.com/2008/05/29/two-new-tools-for-web-dev/</feedburner:origLink></item>
		<item>
		<title>StartupIndex: It’s ALIVE!</title>
		<link>http://feedproxy.google.com/~r/Indirecthit/~3/wpj4089L9kE/</link>
		<comments>http://www.indirecthit.com/2008/04/29/startupindex-its-alive/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 03:51:12 +0000</pubDate>
		<dc:creator>clong</dc:creator>
				<category><![CDATA[StartupIndex]]></category>

		<guid isPermaLink="false">http://www.indirecthit.com/?p=31</guid>
		<description><![CDATA[StartupIndex was launched tonight at StartupCampToronto. I&#8217;m really excited to see where this goes. We have lots of plans for the future, lots and lots of features and information. I&#8217;ll keep this blog updated when major updates are made. For now, check out StartupIndex and read Jevon&#8217;s post about StartupIndex on StartupNorth. Only a few [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://startupindex.ca">StartupIndex</a> was launched tonight at StartupCampToronto. I&#8217;m really excited to see where this goes. We have lots of plans for the future, lots and lots of features and information. I&#8217;ll keep this blog updated when major updates are made. For now, check out <a href="http://startupindex.ca">StartupIndex</a> and read <a href="http://www.startupnorth.ca/2008/04/29/startupindexca-free-our-data-free-the-community/">Jevon&#8217;s post</a> about <a href="http://startupindex.ca">StartupIndex</a> on <a href="http://www.startupnorth.ca">StartupNorth</a>. Only a few hours after the launch, and we&#8217;re already starting to see some input from the community!</p>
<p>Let us know if you see any problems, or have any brilliant ideas for where the site should go.</p><img src="http://feeds.feedburner.com/~r/Indirecthit/~4/wpj4089L9kE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.indirecthit.com/2008/04/29/startupindex-its-alive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.indirecthit.com/2008/04/29/startupindex-its-alive/</feedburner:origLink></item>
		<item>
		<title>Django: Difference Between Two Model Instances</title>
		<link>http://feedproxy.google.com/~r/Indirecthit/~3/lWXInC5IUHk/</link>
		<comments>http://www.indirecthit.com/2008/04/29/django-difference-between-two-model-instances/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 18:48:19 +0000</pubDate>
		<dc:creator>clong</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.indirecthit.com/?p=30</guid>
		<description><![CDATA[Just a quick snippet, I call this code on a site I&#8217;m working on to handle some basic moderation. It finds the difference between the two instances, and returns a dictionary of the changes. The key in the dictionary is the field name, each value in the dictionary is a tuple containing the new and [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick snippet, I call this code on a site I&#8217;m working on to handle some basic moderation. It finds the difference between the two instances, and returns a dictionary of the changes. The key in the dictionary is the field name, each value in the dictionary is a tuple containing the new and old value of the field.</p>
<p>You can pass it the excludes field to exclude certain fields from being compared. It does not compare AutoField or RelatedField&#8217;s.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> django.<span style="color: black;">db</span>.<span style="color: black;">models</span> <span style="color: #ff7700;font-weight:bold;">import</span> fields
<span style="color: #ff7700;font-weight:bold;">def</span> get_changes_between_models<span style="color: black;">&#40;</span>model1, model2, excludes = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>:
    changes = <span style="color: black;">&#123;</span><span style="color: black;">&#125;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> field <span style="color: #ff7700;font-weight:bold;">in</span> model1._meta.<span style="color: black;">fields</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: black;">&#40;</span><span style="color: #008000;">isinstance</span><span style="color: black;">&#40;</span>field, <span style="color: black;">&#40;</span>fields.<span style="color: black;">AutoField</span>, fields.<span style="color: black;">related</span>.<span style="color: black;">RelatedField</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> 
                <span style="color: #ff7700;font-weight:bold;">or</span> field.<span style="color: black;">name</span> <span style="color: #ff7700;font-weight:bold;">in</span> excludes<span style="color: black;">&#41;</span>:
            <span style="color: #ff7700;font-weight:bold;">if</span> field.<span style="color: black;">value_from_object</span><span style="color: black;">&#40;</span>model1<span style="color: black;">&#41;</span> <span style="color: #66cc66;">!</span>= field.<span style="color: black;">value_from_object</span><span style="color: black;">&#40;</span>model2<span style="color: black;">&#41;</span>:
                changes<span style="color: black;">&#91;</span>field.<span style="color: black;">verbose_name</span><span style="color: black;">&#93;</span> = <span style="color: black;">&#40;</span>field.<span style="color: black;">value_from_object</span><span style="color: black;">&#40;</span>model1<span style="color: black;">&#41;</span>,
                                                   field.<span style="color: black;">value_from_object</span><span style="color: black;">&#40;</span>model2<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> changes</pre></td></tr></table></div>

<p><em>Based off of code from <a href="http://code.google.com/p/django-modelhistory/">Django Modelhistory</a>.</em></p><img src="http://feeds.feedburner.com/~r/Indirecthit/~4/lWXInC5IUHk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.indirecthit.com/2008/04/29/django-difference-between-two-model-instances/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.indirecthit.com/2008/04/29/django-difference-between-two-model-instances/</feedburner:origLink></item>
	</channel>
</rss>
