<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:at="http://www.sixapart.com/ns/at"
    xmlns:icbm="http://postneo.com/icbm"
    xmlns:rvw="http://purl.org/NET/RVW/0.2/"
    xmlns:media="http://search.yahoo.com/mrss">
    <channel>
        <title>befog, befuddle, bemuse</title>
        <link>http://raisondetre.vox.com/library/posts/page/1/</link>
        <description>My inifinite gears of acyclic thoughts</description>
        <language>en</language>
        <generator>Vox</generator>
        <lastBuildDate>Thu, 25 Oct 2007 11:35:45 +0800</lastBuildDate>
        <copyright>Copyright 2007</copyright>
        <docs>http://blogs.law.harvard.edu/tech/rss</docs>  
 
        <item>
            <title>Depth of Traversal</title>
            <link>http://raisondetre.vox.com/library/post/depth-of-traversal.html?_c=feed-rss-full</link>   
            <author>nobody@vox.com(Jesse P.)</author>
            <comments>http://raisondetre.vox.com/library/post/depth-of-traversal.html?_c=feed-rss-full</comments>
            <guid isPermaLink="true">http://raisondetre.vox.com/library/post/depth-of-traversal.html?_c=feed-rss-full</guid> 
            <pubDate>Thu, 25 Oct 2007 11:35:45 +0800</pubDate>         
            
            <description>    &lt;p&gt;We can see that there are three main models: user, photoset, and photo.
The models are interlinked with the following possibilities:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;photoset can link to { photo, user }&lt;/li&gt;&lt;li&gt;photo can link to { photoset, user }&lt;/li&gt;&lt;li&gt;user can link to { photoset, photo, user }&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;A more detailed description of these linkages are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;photoset links to &lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;users (as commenters)&lt;/li&gt;&lt;li&gt;photos (as children)&lt;/li&gt;&lt;li&gt;user (as owner)&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;photo links to &lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;photosets (as parents)&lt;/li&gt;&lt;li&gt;users (as favoriters)&lt;/li&gt;&lt;li&gt;users (as commenters)&lt;/li&gt;&lt;li&gt;users (as noters)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;users (as taggers)&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;user links to &lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;photosets (as children)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;photos (as children)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;users (as contacts)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;photos (as favorites)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;With
the three main &amp;quot;concepts&amp;quot; linking to each other, i.e. users, photosets,
and photos, we face a problem of how deep to traverse the linkages. One
approach is to impose some kind of degree or hop count. Here, we can
define a limit of degree k to mean that the traversal will stop going
deeper if it reaches any model for the kth time.&lt;/p&gt;&lt;p&gt;Thus, for k = 2 and since our starting point is always a photoset, we have:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;photoset -&amp;gt; user -&amp;gt; photoset&lt;/strong&gt;, i.e. photosets owned by the user(s) who (commented|owned) the photoset&lt;/li&gt;&lt;li&gt;&lt;strong&gt;photoset -&amp;gt; user -&amp;gt; user&lt;/strong&gt;, i.e. users who are contacts of the user who (commented|owned) the photoset&lt;/li&gt;&lt;li&gt;&lt;strong&gt;photoset -&amp;gt; user -&amp;gt; photo -&amp;gt; user&lt;/strong&gt;,
i.e. users who (favorited|commented|noted|tagged) photos (belonging
to|favorited by) user(s) who (commented|owned) the photoset &lt;/li&gt;&lt;li&gt;&lt;strong&gt;photoset -&amp;gt; user -&amp;gt; photo -&amp;gt; photoset&lt;/strong&gt;,&amp;#160; i.e. photosets that contain the photos (belonging to|favorited by) user(s) who (commented|owned) the photoset&lt;/li&gt;&lt;li&gt;&lt;strong&gt;photoset -&amp;gt; photo -&amp;gt; photoset&lt;/strong&gt;, i.e. other photosets that contain the same photos as the photoset&lt;/li&gt;&lt;li&gt;&lt;strong&gt;photoset -&amp;gt; photo -&amp;gt; user -&amp;gt; user&lt;/strong&gt;, i.e. users who are contacts of the user who (favorited|commented|noted|tagged) photos belonging to the photoset&lt;/li&gt;&lt;li&gt;&lt;strong&gt;photoset -&amp;gt; photo -&amp;gt; user -&amp;gt; photo&lt;/strong&gt;, i.e. photos (belonging to|favorited by) users who (favorited|commented|noted|tagged) photos belonging to the photoset&lt;/li&gt;&lt;li&gt;&lt;strong&gt;photoset -&amp;gt; photo -&amp;gt; user -&amp;gt; photoset&lt;/strong&gt;, i.e. photosets belonging to users who (favorited|commented|noted|tagged) photos belonging to the photoset&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;  &lt;/p&gt;    &lt;p style=&quot;clear:both;&quot;&gt; 
    &lt;a href=&quot;http://raisondetre.vox.com/library/post/depth-of-traversal.html?_c=feed-rss-full#comments&quot;&gt;Read and post comments&lt;/a&gt;   |   
    &lt;a href=&quot;http://www.vox.com/share/6a00d414348ff43c7f00e398b676b50004?_c=feed-rss-full&quot;&gt;Send to a friend&lt;/a&gt; 
&lt;/p&gt;
 
            </description> 
            <category domain="http://raisondetre.vox.com/tags/">flickr</category> 
            <category domain="http://raisondetre.vox.com/tags/">phan</category> 
            <category domain="http://raisondetre.vox.com/tags/">data collection</category>   
        </item> 
 
        <item>
            <title>Dataset collection with Flickr</title>
            <link>http://raisondetre.vox.com/library/post/dataset-collection-with-flickr.html?_c=feed-rss-full</link>   
            <author>nobody@vox.com(Jesse P.)</author>
            <comments>http://raisondetre.vox.com/library/post/dataset-collection-with-flickr.html?_c=feed-rss-full</comments>
            <guid isPermaLink="true">http://raisondetre.vox.com/library/post/dataset-collection-with-flickr.html?_c=feed-rss-full</guid> 
            <pubDate>Tue, 23 Oct 2007 01:31:51 +0800</pubDate>         
            
            <description>    &lt;p&gt;So Ive basically done the following for the past few days (since Wednesday):&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Enumerate all functions in flickr as &lt;a href=&quot;http://aye.comp.nus.edu.sg/%7Ejeprab/PhAn/flickrFullAPI.xlsx&quot;&gt;a table&lt;/a&gt;. The &lt;a href=&quot;http://flickr.com/services/api/&quot;&gt;webpages&lt;/a&gt; they provided was not useful for inter-function comparisons&lt;/li&gt;&lt;li&gt;Trimmed down the api to just &lt;a href=&quot;http://aye.comp.nus.edu.sg/%7Ejeprab/PhAn/flickrTrimmedAPI.pdf&quot;&gt;the functions&lt;/a&gt; I need / can use (most require user authentication and was not usable)&lt;/li&gt;&lt;li&gt;And &lt;a href=&quot;http://aye.comp.nus.edu.sg/%7Ejeprab/PhAn/flickrResponseDiagram.pdf&quot;&gt;analyzed&lt;/a&gt; the responses from those functions&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Designed &lt;a href=&quot;http://aye.comp.nus.edu.sg/%7Ejeprab/PhAn/flickrSchema.pdf&quot;&gt;a schema&lt;/a&gt; for storing the data&lt;/li&gt;&lt;li&gt;Designed the &lt;a href=&quot;http://aye.comp.nus.edu.sg/%7Ejeprab/PhAn/flickrProgramFlow.pdf&quot;&gt;program flow&lt;/a&gt; that fetches the data&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;br /&gt;Next is to actually write the program. I&amp;#39;ve decided to script it with ruby and have the data stored as flat files, i.e. there will be one file for each table. The files will probably be CSV or TSV with the first line listing the attribute names. Since field values can also be data structures and not mere strings, e.g. Hashes, Arrays, etc, I will encode all field values into JSON. As for the photo files, they will be stored as a set of photoset folders. The filenames will be the photo_id. The folder name will be the photoset_id.&lt;/p&gt;     &lt;p style=&quot;clear:both;&quot;&gt; 
    &lt;a href=&quot;http://raisondetre.vox.com/library/post/dataset-collection-with-flickr.html?_c=feed-rss-full#comments&quot;&gt;Read and post comments&lt;/a&gt;   |   
    &lt;a href=&quot;http://www.vox.com/share/6a00d414348ff43c7f00e398b580370001?_c=feed-rss-full&quot;&gt;Send to a friend&lt;/a&gt; 
&lt;/p&gt;
 
            </description> 
            <category domain="http://raisondetre.vox.com/tags/">flickr</category> 
            <category domain="http://raisondetre.vox.com/tags/">phan</category> 
            <category domain="http://raisondetre.vox.com/tags/">data collection</category>   
        </item> 
 
        <item>
            <title>Dynamically written JavaScript functions</title>
            <link>http://raisondetre.vox.com/library/post/dynamically-written-javascript-functions.html?_c=feed-rss-full</link>   
            <author>nobody@vox.com(Jesse P.)</author>
            <comments>http://raisondetre.vox.com/library/post/dynamically-written-javascript-functions.html?_c=feed-rss-full</comments>
            <guid isPermaLink="true">http://raisondetre.vox.com/library/post/dynamically-written-javascript-functions.html?_c=feed-rss-full</guid> 
            <pubDate>Mon, 16 Jul 2007 14:14:34 +0800</pubDate>         
            
            <description>    &lt;p&gt;So Im working on this other project now and I am faced with the following situation:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A server script renders an element&amp;#39;s onclick handler as calling a function with an array as its parameter, e.g. &lt;br /&gt;&amp;lt;div onclick=&amp;quot;some_function(this, new Array(&amp;#39;1&amp;#39;,&amp;#39;2&amp;#39;,&amp;#39;3&amp;#39;));&amp;quot;&amp;gt;Some content&amp;lt;/div&amp;gt;&lt;/li&gt;&lt;li&gt;Everytime some_function() is called, it needs to create another div after it but with the array altered, i.e. &lt;br /&gt;&amp;lt;div onclick=&amp;quot;some_function(this, new Array(&amp;#39;1&amp;#39;,&amp;#39;2&amp;#39;,&amp;#39;3&amp;#39;));&amp;quot;&amp;gt;Some content&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div onclick=&amp;quot;some_function(this, new Array(&amp;#39;2&amp;#39;,&amp;#39;3&amp;#39;));&amp;quot;&amp;gt;Content generated by some_function()&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Eventually, the array has no elements left and what I want left is:&lt;br /&gt;&amp;lt;div onclick=&amp;quot;some_function(this, new Array(&amp;#39;1&amp;#39;,&amp;#39;2&amp;#39;,&amp;#39;3&amp;#39;));&amp;quot;&amp;gt;Some content&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div onclick=&amp;quot;some_function(this, new Array(&amp;#39;2&amp;#39;,&amp;#39;3&amp;#39;));&amp;quot;&amp;gt;Content generated by some_function()&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div onclick=&amp;quot;some_function(this, new Array(&amp;#39;3&amp;#39;));&amp;quot;&amp;gt;Second content generated by some_function()&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;Last content generated by some_function()&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What does some_function() look like?&lt;/li&gt;&lt;/ul&gt;The situation is non trivial because of the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&amp;quot;onclick&amp;quot; is not a DOM attribute, so you can&amp;#39;t assign it a string like:&lt;br /&gt; divElement.setAttribute(&amp;quot;onclick&amp;quot;, some_function_string);&lt;br /&gt;Actually this does work in Firefox 2 but it may not work in other browsers (and thats the way it should be).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;To assign an onclick handler, you specify a function not a string, i.e.&lt;br /&gt;divElement.onclick = function() { some_function(this, new Array(&amp;#39;1&amp;#39;,&amp;#39;2&amp;#39;,&amp;#39;3&amp;#39;)); };&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;So the roundabout solution of doing this (which works but Im not sure of anything that can be wrong or stupid about it) is:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Convert the function into a string, i.e. (in this case the function I&amp;#39;m interested in is the onclick handler of the divElement)&lt;br /&gt;var onclick_string = divElement.onclick.toString;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Modify the string via string functions and regex (in this case I want to change the array being passed to some_function()):&lt;br /&gt;// Set value to &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;, or &amp;quot;3&amp;quot; depending on which one we want to remove&lt;br /&gt;var re_value = new RegExp(&amp;quot;[\&amp;quot;&amp;#39;]&amp;quot;+value+&amp;quot;[\&amp;quot;&amp;#39;][,]*&amp;quot;);&lt;br /&gt;onclick_string = onclick_string.replace(re_value, &amp;quot;&amp;quot;);&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Modify the string to exclude everything but the function body:&lt;br /&gt;onclick_text = onclick_text.replace(/[^{]*?{/, &amp;quot;&amp;quot;); // delete everything before and including first &amp;quot;{&amp;quot;&lt;br /&gt;onclick_text = onclick_text.replace(/}[^}]*$/, &amp;quot;&amp;quot;); // delete everything after and including last &amp;quot;}&amp;quot;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Create a new Function object with the string as its body:&lt;br /&gt;var new_onclick = new Function(onclick_text);&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Now we have a modified function ready to be used!!&lt;br /&gt;newDivElement.onclick = new_onclick;&lt;/li&gt;&lt;/ul&gt;The above method can be used to dynamically write your javascript functions. I guess there is no real trick here. Just three things:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Convert the function to a string&lt;/li&gt;&lt;li&gt;Do string manipulation to edit the function&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Convert the string back to a function&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt; &lt;/p&gt;    &lt;p style=&quot;clear:both;&quot;&gt; 
    &lt;a href=&quot;http://raisondetre.vox.com/library/post/dynamically-written-javascript-functions.html?_c=feed-rss-full#comments&quot;&gt;Read and post comments&lt;/a&gt;   |   
    &lt;a href=&quot;http://www.vox.com/share/6a00d414348ff43c7f00d09e82912abe2b?_c=feed-rss-full&quot;&gt;Send to a friend&lt;/a&gt; 
&lt;/p&gt;
 
            </description> 
            <category domain="http://raisondetre.vox.com/tags/">javascript</category> 
            <category domain="http://raisondetre.vox.com/tags/">dom</category>   
        </item> 
 
        <item>
            <title>Absolutely Relatively Fixed</title>
            <link>http://raisondetre.vox.com/library/post/absolutely-relatively-fixed.html?_c=feed-rss-full</link>   
            <author>nobody@vox.com(Jesse P.)</author>
            <comments>http://raisondetre.vox.com/library/post/absolutely-relatively-fixed.html?_c=feed-rss-full</comments>
            <guid isPermaLink="true">http://raisondetre.vox.com/library/post/absolutely-relatively-fixed.html?_c=feed-rss-full</guid> 
            <pubDate>Tue, 03 Jul 2007 12:02:57 +0800</pubDate>         
            
            <description>    &lt;p&gt;Actually its not fixed yet. What i mean to say is:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;My entire system is a single page layout and hence the logical way of designing this is to layout my elements with position: fixed, i.e. fixed to the points on the screen and not the containing element (position: absolute).&lt;/li&gt;&lt;li&gt;Actually *hehe* I set them to be position: absolute at first, but thats only because positioning them relative to the containing element gives the same effect as positioning relative to the screen.&lt;/li&gt;&lt;li&gt;Alright, so turns out that IE7 behaves wierd when I use position: absolute (I can no longer remember why or how), so I changed them to position: fixed.&lt;/li&gt;&lt;li&gt;But hohoho IE6 doesnt support position: fixed. So I had to change them to position: absolute. This is where the fun begins: In setting position:absolute, you cant set all four top, left, right, and bottom corner offsets. Only a pair (e.g. top, left) is allowed and then you have to set height and width.&lt;/li&gt;&lt;li&gt;So now for IE6, I have to hack my way to make them display correctly with a combination of unmentionable paddings, margins, and my most poweful tool: position: relative (which can offset from top, left, right and bottom -- but its presence affects sibling elements unlike position: absolute&amp;#160; or position: fixed)&lt;/li&gt;&lt;/ol&gt;I think Im about 80% done. But I cant really say. Im not even sure if I can emulate the proper layout with such restrictions. Why cant everyone &lt;a href=&quot;http://www.mozilla.org/products/firefox/&quot;&gt;just&lt;/a&gt; &lt;a href=&quot;http://www.apple.com/safari/download/&quot;&gt;ugrade&lt;/a&gt; &lt;a href=&quot;http://channels.netscape.com/ns/browsers/download.jsp&quot;&gt;their&lt;/a&gt; &lt;a href=&quot;http://www.microsoft.com/windows/ie/downloads/default.asp&quot;&gt;browsers&lt;/a&gt;. Its free you know?&lt;br /&gt; &lt;/p&gt;    &lt;p style=&quot;clear:both;&quot;&gt; 
    &lt;a href=&quot;http://raisondetre.vox.com/library/post/absolutely-relatively-fixed.html?_c=feed-rss-full#comments&quot;&gt;Read and post comments&lt;/a&gt;   |   
    &lt;a href=&quot;http://www.vox.com/share/6a00d414348ff43c7f00cd973c2f3a4cd5?_c=feed-rss-full&quot;&gt;Send to a friend&lt;/a&gt; 
&lt;/p&gt;
 
            </description> 
            <category domain="http://raisondetre.vox.com/tags/">css</category> 
            <category domain="http://raisondetre.vox.com/tags/">internet explorer</category>   
        </item> 
 
        <item>
            <title>IE6 compatibility: Pruning your DOM tree with display: none;</title>
            <link>http://raisondetre.vox.com/library/post/ie6-compatibility-pruning-your-dom-tree-with-display-none.html?_c=feed-rss-full</link>   
            <author>nobody@vox.com(Jesse P.)</author>
            <comments>http://raisondetre.vox.com/library/post/ie6-compatibility-pruning-your-dom-tree-with-display-none.html?_c=feed-rss-full</comments>
            <guid isPermaLink="true">http://raisondetre.vox.com/library/post/ie6-compatibility-pruning-your-dom-tree-with-display-none.html?_c=feed-rss-full</guid> 
            <pubDate>Mon, 02 Jul 2007 23:31:56 +0800</pubDate>         
            
            <description>    &lt;p&gt;Arrggh... Ive spent the past four hours fixing my standards-compliant layout to fit to IE6&amp;#39;s needs. And from this ridiculous layout:&lt;/p&gt;
    
    
    

    
    
    
&lt;div at:enclosure=&quot;asset&quot; at:xid=&quot;6a00d414348ff43c7f00d41443853e685e&quot; at:format=&quot;extra-large&quot; at:align=&quot;center&quot;
    class=&quot;enclosure enclosure-center enclosure-extra-large photo-enclosure&quot; 
     style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;enclosure-inner&quot;
    
        style=&quot;padding: 9px; border: 1px solid; width: px; margin: 10px auto;&quot;
    &gt;
    &lt;div class=&quot;enclosure-list&quot;&gt;
        &lt;div class=&quot;enclosure-item photo-asset last&quot;&gt;
    
            &lt;div class=&quot;enclosure-image&quot;&gt;
        
                &lt;a href=&quot;http://raisondetre.vox.com/library/photo/6a00d414348ff43c7f00d41443853e685e.html&quot;&gt;&lt;img src=&quot;http://a6.vox.com/6a00d414348ff43c7f00d41443853e685e-500pi&quot; alt=&quot;Ie6_1&quot; title=&quot;Ie6_1&quot; /&gt;&lt;/a&gt;
        
            &lt;/div&gt;
            &lt;div class=&quot;enclosure-meta&quot;&gt;
                &lt;div class=&quot;enclosure-asset-name&quot;&gt;&lt;a href=&quot;http://raisondetre.vox.com/library/photo/6a00d414348ff43c7f00d41443853e685e.html&quot; title=&quot;Ie6_1&quot;&gt;Ie6_1&lt;/a&gt;&lt;/div&gt;
            &lt;/div&gt;
    
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;!-- end enclosure --&gt;
&lt;p&gt;
All I have now is just:&lt;/p&gt;
    
    
    

    
    
    
&lt;div at:enclosure=&quot;asset&quot; at:xid=&quot;6a00d414348ff43c7f00d09e7dd902be2b&quot; at:format=&quot;extra-large&quot; at:align=&quot;center&quot;
    class=&quot;enclosure enclosure-center enclosure-extra-large photo-enclosure&quot; 
     style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;enclosure-inner&quot;
    
        style=&quot;padding: 9px; border: 1px solid; width: px; margin: 10px auto;&quot;
    &gt;
    &lt;div class=&quot;enclosure-list&quot;&gt;
        &lt;div class=&quot;enclosure-item photo-asset last&quot;&gt;
    
            &lt;div class=&quot;enclosure-image&quot;&gt;
        
                &lt;a href=&quot;http://raisondetre.vox.com/library/photo/6a00d414348ff43c7f00d09e7dd902be2b.html&quot;&gt;&lt;img src=&quot;http://a2.vox.com/6a00d414348ff43c7f00d09e7dd902be2b-500pi&quot; alt=&quot;Ie6_2&quot; title=&quot;Ie6_2&quot; /&gt;&lt;/a&gt;
        
            &lt;/div&gt;
            &lt;div class=&quot;enclosure-meta&quot;&gt;
                &lt;div class=&quot;enclosure-asset-name&quot;&gt;&lt;a href=&quot;http://raisondetre.vox.com/library/photo/6a00d414348ff43c7f00d09e7dd902be2b.html&quot; title=&quot;Ie6_2&quot;&gt;Ie6_2&lt;/a&gt;&lt;/div&gt;
            &lt;/div&gt;
    
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;!-- end enclosure --&gt;
&lt;p&gt;
In other words, the top part is done. Im fixing the CSS by setting display: none to all major containers and then work my way down the DOM tree; slowly fixing each &amp;lt;div&amp;gt; one at a time.&lt;/p&gt;&lt;p&gt;Onwards!&lt;/p&gt;    &lt;p style=&quot;clear:both;&quot;&gt; 
    &lt;a href=&quot;http://raisondetre.vox.com/library/post/ie6-compatibility-pruning-your-dom-tree-with-display-none.html?_c=feed-rss-full#comments&quot;&gt;Read and post comments&lt;/a&gt;   |   
    &lt;a href=&quot;http://www.vox.com/share/6a00d414348ff43c7f00d41447a7a46a47?_c=feed-rss-full&quot;&gt;Send to a friend&lt;/a&gt; 
&lt;/p&gt;
 
            </description> 
            <category domain="http://raisondetre.vox.com/tags/">css</category> 
            <category domain="http://raisondetre.vox.com/tags/">internet explorer</category> 
            <category domain="http://raisondetre.vox.com/tags/">dom</category>    
        </item> 
 
        <item>
            <title>Running IE 6 alongside IE 7</title>
            <link>http://raisondetre.vox.com/library/post/running-ie-6-alongside-ie-7.html?_c=feed-rss-full</link>   
            <author>nobody@vox.com(Jesse P.)</author>
            <comments>http://raisondetre.vox.com/library/post/running-ie-6-alongside-ie-7.html?_c=feed-rss-full</comments>
            <guid isPermaLink="true">http://raisondetre.vox.com/library/post/running-ie-6-alongside-ie-7.html?_c=feed-rss-full</guid> 
            <pubDate>Mon, 02 Jul 2007 11:46:31 +0800</pubDate>         
            
            <description>    &lt;p&gt;So ive been trying to get hold of some working IE 5.5+ to test my system but lo and behold, despite many web statistics out there, everyone i know seems to be using IE 7. I can get access to IE6, but I will have to travel to the school library for that: work there, debug there, etc.&lt;/p&gt;&lt;p&gt;Anyway, I scoured the net for some way to run both side-by-side and found an msn article (can&amp;#39;t remember where) that says that the best way is to run Ms Virtual PC 2007. So I did. Managed to install the free program, and ho ho ho. I have no idea why I assumed it came with Windows inside it. Anyway, so I had to reinstall windows XP SP2. That took ages to do. And then even after it started running, my installation ran like steamed rice (not engine). It took an hour or two just to load windows. And dunn get me started on trying to run IE. I even had to activate windows and that took very long as well. Not sure what I did wrong. Im running it on my Dell Inspiron 6000, so it shouldnt be that much of a problem. I noticed that Virtual PC 2007 didnt take that much memory, but the hd accesses are a lot and my CPU is always stuck at 90% to 100%. &lt;/p&gt;&lt;p&gt;Thats when I descovered &lt;a href=&quot;http://tredosoft.com/Multiple_IE&quot;&gt;Multiple IE&lt;/a&gt; *yay*&lt;/p&gt;&lt;p&gt;It installs fast, works almost great (I think). I ran IE6 and it opens the msn start page and shows some errors on the page. That can&amp;#39;t be right, can it? &lt;br /&gt; &lt;/p&gt;    &lt;p style=&quot;clear:both;&quot;&gt; 
    &lt;a href=&quot;http://raisondetre.vox.com/library/post/running-ie-6-alongside-ie-7.html?_c=feed-rss-full#comments&quot;&gt;Read and post comments&lt;/a&gt;   |   
    &lt;a href=&quot;http://www.vox.com/share/6a00d414348ff43c7f00d414435ba2685e?_c=feed-rss-full&quot;&gt;Send to a friend&lt;/a&gt; 
&lt;/p&gt;
 
            </description> 
            <category domain="http://raisondetre.vox.com/tags/">microsoft</category> 
            <category domain="http://raisondetre.vox.com/tags/">internet explorer</category>   
        </item> 
 
        <item>
            <title>Javascript onKeyPress, onKeyDown, onKeyUp </title>
            <link>http://raisondetre.vox.com/library/post/javascript-onkeypress-onkeydown-onkeyup.html?_c=feed-rss-full</link>   
            <author>nobody@vox.com(Jesse P.)</author>
            <comments>http://raisondetre.vox.com/library/post/javascript-onkeypress-onkeydown-onkeyup.html?_c=feed-rss-full</comments>
            <guid isPermaLink="true">http://raisondetre.vox.com/library/post/javascript-onkeypress-onkeydown-onkeyup.html?_c=feed-rss-full</guid> 
            <pubDate>Fri, 29 Jun 2007 03:28:20 +0800</pubDate>         
            
            <description>    &lt;p&gt;A very good place to start if you want to capture keyboard events with JavaScript: &lt;a href=&quot;http://www.quirksmode.org/js/keys.html&quot;&gt;http://www.quirksmode.org/js/keys.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Rule of thumb (i guess) is:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Use keyDown or keyUp, not keyPress&lt;/li&gt;&lt;li&gt;Use keyCode instead of charCode&lt;/li&gt;&lt;li&gt;Use the link above and scroll to the bottom to check the keyCodes of various keys :)&lt;/li&gt;&lt;/ol&gt;And with this, the system now correctly handles keyboard event (up, down, tab, and enter) on Safari 3, IE 7, and Firefox 2. &lt;br /&gt; &lt;/p&gt;    &lt;p style=&quot;clear:both;&quot;&gt; 
    &lt;a href=&quot;http://raisondetre.vox.com/library/post/javascript-onkeypress-onkeydown-onkeyup.html?_c=feed-rss-full#comments&quot;&gt;Read and post comments&lt;/a&gt;   |   
    &lt;a href=&quot;http://www.vox.com/share/6a00d414348ff43c7f00d41448d8a43c7f?_c=feed-rss-full&quot;&gt;Send to a friend&lt;/a&gt; 
&lt;/p&gt;
 
            </description> 
            <category domain="http://raisondetre.vox.com/tags/">javascript</category>   
        </item> 
 
        <item>
            <title>Auto-Shrink Bug in IE</title>
            <link>http://raisondetre.vox.com/library/post/auto-shrink-bug-in-ie.html?_c=feed-rss-full</link>   
            <author>nobody@vox.com(Jesse P.)</author>
            <comments>http://raisondetre.vox.com/library/post/auto-shrink-bug-in-ie.html?_c=feed-rss-full</comments>
            <guid isPermaLink="true">http://raisondetre.vox.com/library/post/auto-shrink-bug-in-ie.html?_c=feed-rss-full</guid> 
            <pubDate>Fri, 29 Jun 2007 00:54:21 +0800</pubDate>         
            
            <description>    &lt;p&gt;So Im trying to make my system (that works perfectly in Firefox and is almost perfect in Safari) to work for Internet Explorer (7 first and then Im going to tackle version 6).&lt;/p&gt;&lt;p&gt;And im facing with this wierd shrinking problem. I have some divs that are positioned absolute and restricted only by a top, left, right, bottom and min-width CSS properties. The thing is, sometimes, e.g. when I change the display/visibility property of some other div, the other divs decide to shrink to min-width. Huh???&lt;/p&gt;&lt;p&gt;So Im preparing my arsenal of books to refer to. The internet hasnt been very helpful cuz I probably cant really pinpoint the exact problem. I tried isolating just an absolute div and another that I hide/show and the problem is not reproduced. &lt;/p&gt;&lt;p&gt;Alright, one from my arsenal of CSS resources &lt;strong&gt;should&lt;/strong&gt; have the answer:&lt;/p&gt;&lt;div at:enclosure=&quot;asset&quot; at:xid=&quot;6a00d414348ff43c7f00d41446682e6a47 6a00d414348ff43c7f00d41448cc6c3c7f 6a00d414348ff43c7f00d4144668026a47 6a00d414348ff43c7f00d09e7c976abe2b 6a00d414348ff43c7f00d41448cc273c7f 6a00d414348ff43c7f00d4144245fd685e 6a00d414348ff43c7f00d4144667a86a47 6a00d414348ff43c7f00d4144667946a47 6a00d414348ff43c7f00cd973aba884cd5 6a00d414348ff43c7f00d4144245ac685e 6a00d414348ff43c7f00d09e7c96d4be2b&quot; at:format=&quot;strip-horizontal&quot; at:align=&quot;center&quot; class=&quot;enclosure enclosure-center enclosure-strip enclosure-strip-horizontal&quot;  style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;enclosure-inner&quot; style=&quot; margin: 5px; border: 1px solid; text-align: center;&quot;&gt;





        




&lt;a href=&quot;http://raisondetre.vox.com/library/book/6a00d414348ff43c7f00d41446682e6a47.html&quot; class=&quot;enclosure-strip-link&quot; title=&quot;Accessible XHTML and CSS Web Sites Problem Design Solution&quot;&gt;&lt;img src=&quot;http://a6.vox.com/6a00d414348ff43c7f00d41446682e6a47-120pi&quot; alt=&quot;Accessible XHTML and CSS Web Sites Problem Design Solution&quot; class=&quot;enclosure-strip-image&quot; style=&quot;margin: 5px; border: 0;&quot; /&gt;&lt;/a&gt;





        




&lt;a href=&quot;http://raisondetre.vox.com/library/book/6a00d414348ff43c7f00d41448cc6c3c7f.html&quot; class=&quot;enclosure-strip-link&quot; title=&quot;CSS: The Definitive Guide&quot;&gt;&lt;img src=&quot;http://a4.vox.com/6a00d414348ff43c7f00d41448cc6c3c7f-120pi&quot; alt=&quot;CSS: The Definitive Guide&quot; class=&quot;enclosure-strip-image&quot; style=&quot;margin: 5px; border: 0;&quot; /&gt;&lt;/a&gt;





        




&lt;a href=&quot;http://raisondetre.vox.com/library/book/6a00d414348ff43c7f00d4144668026a47.html&quot; class=&quot;enclosure-strip-link&quot; title=&quot;CSS Mastery: Advanced Web Standards Solutions&quot;&gt;&lt;img src=&quot;http://a2.vox.com/6a00d414348ff43c7f00d4144668026a47-120pi&quot; alt=&quot;CSS Mastery: Advanced Web Standards Solutions&quot; class=&quot;enclosure-strip-image&quot; style=&quot;margin: 5px; border: 0;&quot; /&gt;&lt;/a&gt;





        




&lt;a href=&quot;http://raisondetre.vox.com/library/book/6a00d414348ff43c7f00d09e7c976abe2b.html&quot; class=&quot;enclosure-strip-link&quot; title=&quot;CSS Web Design For Dummies (For Dummies (Computer/Tech))&quot;&gt;&lt;img src=&quot;http://a2.vox.com/6a00d414348ff43c7f00d09e7c976abe2b-120pi&quot; alt=&quot;CSS Web Design For Dummies (For Dummies (Computer/Tech))&quot; class=&quot;enclosure-strip-image&quot; style=&quot;margin: 5px; border: 0;&quot; /&gt;&lt;/a&gt;





        




&lt;a href=&quot;http://raisondetre.vox.com/library/book/6a00d414348ff43c7f00d41448cc273c7f.html&quot; class=&quot;enclosure-strip-link&quot; title=&quot;HTML, XHTML, and CSS, Sixth Edition (Visual Quickstart Guide)&quot;&gt;&lt;img src=&quot;http://a7.vox.com/6a00d414348ff43c7f00d41448cc273c7f-120pi&quot; alt=&quot;HTML, XHTML, and CSS, Sixth Edition (Visual Quickstart Guide)&quot; class=&quot;enclosure-strip-image&quot; style=&quot;margin: 5px; border: 0;&quot; /&gt;&lt;/a&gt;





        




&lt;a href=&quot;http://raisondetre.vox.com/library/book/6a00d414348ff43c7f00d4144245fd685e.html&quot; class=&quot;enclosure-strip-link&quot; title=&quot;Beginning CSS Web Development: From Novice to Professional&quot;&gt;&lt;img src=&quot;http://a5.vox.com/6a00d414348ff43c7f00d4144245fd685e-120pi&quot; alt=&quot;Beginning CSS Web Development: From Novice to Professional&quot; class=&quot;enclosure-strip-image&quot; style=&quot;margin: 5px; border: 0;&quot; /&gt;&lt;/a&gt;





        




&lt;a href=&quot;http://raisondetre.vox.com/library/book/6a00d414348ff43c7f00d4144667a86a47.html&quot; class=&quot;enclosure-strip-link&quot; title=&quot;CSS: The Missing Manual&quot;&gt;&lt;img src=&quot;http://a0.vox.com/6a00d414348ff43c7f00d4144667a86a47-120pi&quot; alt=&quot;CSS: The Missing Manual&quot; class=&quot;enclosure-strip-image&quot; style=&quot;margin: 5px; border: 0;&quot; /&gt;&lt;/a&gt;





        




&lt;a href=&quot;http://raisondetre.vox.com/library/book/6a00d414348ff43c7f00d4144667946a47.html&quot; class=&quot;enclosure-strip-link&quot; title=&quot;CSS Cookbook, 2nd Edition&quot;&gt;&lt;img src=&quot;http://a4.vox.com/6a00d414348ff43c7f00d4144667946a47-120pi&quot; alt=&quot;CSS Cookbook, 2nd Edition&quot; class=&quot;enclosure-strip-image&quot; style=&quot;margin: 5px; border: 0;&quot; /&gt;&lt;/a&gt;





        




&lt;a href=&quot;http://raisondetre.vox.com/library/book/6a00d414348ff43c7f00cd973aba884cd5.html&quot; class=&quot;enclosure-strip-link&quot; title=&quot;Beginning Web Programming with HTML, XHTML, and CSS (Wrox Beginning Guides)&quot;&gt;&lt;img src=&quot;http://a0.vox.com/6a00d414348ff43c7f00cd973aba884cd5-120pi&quot; alt=&quot;Beginning Web Programming with HTML, XHTML, and CSS (Wrox Beginning Guides)&quot; class=&quot;enclosure-strip-image&quot; style=&quot;margin: 5px; border: 0;&quot; /&gt;&lt;/a&gt;





        




&lt;a href=&quot;http://raisondetre.vox.com/library/book/6a00d414348ff43c7f00d4144245ac685e.html&quot; class=&quot;enclosure-strip-link&quot; title=&quot;Web Standards Programmer&#39;s Reference : HTML, CSS, JavaScript, Perl, Python, and PHP&quot;&gt;&lt;img src=&quot;http://a4.vox.com/6a00d414348ff43c7f00d4144245ac685e-120pi&quot; alt=&quot;Web Standards Programmer&#39;s Reference : HTML, CSS, JavaScript, Perl, Python, and PHP&quot; class=&quot;enclosure-strip-image&quot; style=&quot;margin: 5px; border: 0;&quot; /&gt;&lt;/a&gt;





        




&lt;a href=&quot;http://raisondetre.vox.com/library/book/6a00d414348ff43c7f00d09e7c96d4be2b.html&quot; class=&quot;enclosure-strip-link&quot; title=&quot;Professional CSS: Cascading Style Sheets for Web Design&quot;&gt;&lt;img src=&quot;http://a4.vox.com/6a00d414348ff43c7f00d09e7c96d4be2b-120pi&quot; alt=&quot;Professional CSS: Cascading Style Sheets for Web Design&quot; class=&quot;enclosure-strip-image&quot; style=&quot;margin: 5px; border: 0;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt; &lt;!-- end enclosure --&gt;
 
 
&lt;p&gt;&lt;/p&gt;&lt;p&gt;I hope.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/span&gt;: Turns out that the fix was simple. I have been using &amp;quot;absolute&amp;quot; instead of &amp;quot;fixed&amp;quot;. A fixed position made more sense because thats what I wanted in the first place. No idea why i used &amp;quot;absolute&amp;quot;. Anyway, something else I didnt know when using an absolute position (from &lt;a href=&quot;http://raisondetre.vox.com/library/book/6a00d414348ff43c7f00d41446682e6a47.html&quot;&gt;this book&lt;/a&gt;):&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;You should specify only a left or right offset and a top or bottom offset. If you specify both left and right or both top and bottom, one must be the absolute negative of the other (for example, top:3px; bottom:3px;). If you have top and bottom or left and right that do not have absolute negative values of each other, the right or bottom offset will be ignored.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/p&gt;    &lt;p style=&quot;clear:both;&quot;&gt; 
    &lt;a href=&quot;http://raisondetre.vox.com/library/post/auto-shrink-bug-in-ie.html?_c=feed-rss-full#comments&quot;&gt;Read and post comments&lt;/a&gt;   |   
    &lt;a href=&quot;http://www.vox.com/share/6a00d414348ff43c7f00d09e7c97b2be2b?_c=feed-rss-full&quot;&gt;Send to a friend&lt;/a&gt; 
&lt;/p&gt;
 
            </description> 
            <category domain="http://raisondetre.vox.com/tags/">css</category> 
            <category domain="http://raisondetre.vox.com/tags/">internet explorer</category>    
        </item> 
 
        <item>
            <title>Inline auto-completion in bash</title>
            <link>http://raisondetre.vox.com/library/post/inline-auto-completion-in-bash.html?_c=feed-rss-full</link>   
            <author>nobody@vox.com(Jesse P.)</author>
            <comments>http://raisondetre.vox.com/library/post/inline-auto-completion-in-bash.html?_c=feed-rss-full</comments>
            <guid isPermaLink="true">http://raisondetre.vox.com/library/post/inline-auto-completion-in-bash.html?_c=feed-rss-full</guid> 
            <pubDate>Thu, 28 Jun 2007 23:42:41 +0800</pubDate>         
            
            <description>    &lt;p&gt;Found a little neat setting for my .bashrc to do inline-autocompletion &lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=303248&quot;&gt;here&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;
# make bash autocomplete with up arrow&lt;br /&gt;
bind &amp;#39;&amp;quot;\e[A&amp;quot;:history-search-backward&amp;#39;&lt;br /&gt;
bind &amp;#39;&amp;quot;\e[B&amp;quot;:history-search-forward&amp;#39;&lt;/p&gt;&lt;p&gt;
# make tab cycle through commands instead of listing&lt;br /&gt;
bind &amp;#39;&amp;quot;\t&amp;quot;:menu-complete&amp;#39;&lt;/em&gt;
&lt;/p&gt;&lt;/blockquote&gt;I like the up arrow history search best. I use vim to edit a lot of stuff and my working directory is also not my home directory so I often have to type in a whole long sequence of /dir/dir/dir/dir/dir/ before I can actually start working. But lo and behold. All I need to do now is type: cd &amp;lt;up&amp;gt; and it will cycle through (inline -- no more long lists) the directories i have run cd before.&lt;/p&gt;&lt;p&gt;The only caveat is, i suppose, not being able to list commands as a list. Having files cycle through inline is good because you &amp;quot;know&amp;quot; which file you are refering to and you &amp;quot;want&amp;quot; &amp;lt;tab&amp;gt; to auto-complete. So inline auto-completion can easily cycle your way to the file name you want. But for commands, at least for me, I only press tab if Im not sure what the command is. So a list is better. I wonder if I can have the tab auto-completion behave differenty depending on whether its a command or a file/folder.&lt;br /&gt; &lt;/p&gt;    &lt;p style=&quot;clear:both;&quot;&gt; 
    &lt;a href=&quot;http://raisondetre.vox.com/library/post/inline-auto-completion-in-bash.html?_c=feed-rss-full#comments&quot;&gt;Read and post comments&lt;/a&gt;   |   
    &lt;a href=&quot;http://www.vox.com/share/6a00d414348ff43c7f00d41446622f6a47?_c=feed-rss-full&quot;&gt;Send to a friend&lt;/a&gt; 
&lt;/p&gt;
 
            </description> 
            <category domain="http://raisondetre.vox.com/tags/">linux</category>   
        </item> 
 
        <item>
            <title>Global variables and scoping</title>
            <link>http://raisondetre.vox.com/library/post/global-variables-and-scoping.html?_c=feed-rss-full</link>   
            <author>nobody@vox.com(Jesse P.)</author>
            <comments>http://raisondetre.vox.com/library/post/global-variables-and-scoping.html?_c=feed-rss-full</comments>
            <guid isPermaLink="true">http://raisondetre.vox.com/library/post/global-variables-and-scoping.html?_c=feed-rss-full</guid> 
            <pubDate>Wed, 27 Jun 2007 21:25:57 +0800</pubDate>         
            
            <description>    &lt;p&gt;Honestly, I think the next time I do anything in javascript, ill start by writing a class. Scoping is very important. Since goodness knows when, Ive always started writing programs in javascript as functions and them any variable is defined outside of it. And thats how it was for my mockup. So one year of that, and what I have is 4000 lines of hacking and global variables. Im actually quite surprised how I managed to make things still work. Lucky? Probably not. Maybe Im reallly careful in using my variables. Then again, I owe many things to the great debugging tools that i have (for Firefox).&lt;/p&gt;&lt;p&gt;Anyway, lesson of the day: to declare a local variable in a function in javascript, don&amp;#39;t forget to precede the variable name with: &lt;span style=&quot;color: #ff0000; font-size: 1.25em;&quot;&gt;&lt;strong&gt;var&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/span&gt;: Apparently, Internet Explorer not only bugs out, it actually throws a seemingly unrelated runtime error saying that the Object doesn&amp;#39;t support this property or method whenever I forget to include the &amp;#39;var&amp;#39; keyword, e.g.: &lt;span style=&quot;color: #ff0000&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;p&gt;tabs = document.getElementById(&amp;#39;tabs&amp;#39;).getElementsByTagName(&amp;quot;li&amp;quot;);&lt;span style=&quot;color: #ff0000&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;Obviously, I thought the error meant that my object (node) doesn&amp;#39;t support the getElementsByTagName method, which is ridiculous. I have no idea how I managed to think to see what happens if I added the &amp;#39;var&amp;#39; keyword. Maybe I&amp;#39;m missing something here... &lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;&lt;/p&gt;&lt;/span&gt;    &lt;p style=&quot;clear:both;&quot;&gt; 
    &lt;a href=&quot;http://raisondetre.vox.com/library/post/global-variables-and-scoping.html?_c=feed-rss-full#comments&quot;&gt;Read and post comments&lt;/a&gt;   |   
    &lt;a href=&quot;http://www.vox.com/share/6a00d414348ff43c7f00d414485c9f3c7f?_c=feed-rss-full&quot;&gt;Send to a friend&lt;/a&gt; 
&lt;/p&gt;
 
            </description> 
            <category domain="http://raisondetre.vox.com/tags/">javascript</category> 
            <category domain="http://raisondetre.vox.com/tags/">internet explorer</category>   
        </item> 
    </channel>
</rss>

