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

<channel>
	<title>redllama.net &#187; Programming</title>
	<atom:link href="http://www.redllama.net/category/computer-related/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.redllama.net</link>
	<description>Inside thoughts... aloud.</description>
	<lastBuildDate>Wed, 05 Oct 2011 04:25:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fajax</title>
		<link>http://www.redllama.net/2009/02/05/fajax/</link>
		<comments>http://www.redllama.net/2009/02/05/fajax/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 20:39:39 +0000</pubDate>
		<dc:creator>Boofer</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Sites]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.redllama.net/?p=1404</guid>
		<description><![CDATA[Or, fake Ajax. I'm all 2 years late to this party. So, why not tell everyone how slow I am.]]></description>
			<content:encoded><![CDATA[<p>I was searching the Googles for a fix that randomly started happening to a web site I was working on. Well, it might not had been random but I don&#8217;t feel like reverting back to versions just to find the culprit. IT might be the table. Might be something else.</p>
<p>&#8220;ie page flicker&#8221; took me to &#8220;Stop IE Flickering Between Pages&#8221;. OK, nice, I&#8217;m clicking, I&#8217;m reading. Turns out that IE sucks. No, really.</p>
<p>I really didn&#8217;t care to read into exactly what this snippet of code does. It just fixed my problem. My problem being, when submitting a page in IE the browser goes blank (all white) for a split second while it tries to load the new page. This is not an issue in Firefox.</p>
<p>Calling it Fajax for the mere fact it looks like an Ajax load? I guess. Anyways, here&#8217;s the HTML for your cutting and pasting pleasures.</p>
<blockquote><p>&lt;meta http-equiv=&#8221;Page-Enter&#8221; content=&#8221;blendTrans(Duration=0)&#8221;><br />
&lt;meta http-equiv=&#8221;Page-Exit&#8221; content=&#8221;blendTrans(Duration=0)&#8221;></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.redllama.net/2009/02/05/fajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digitally Assisted Billiards</title>
		<link>http://www.redllama.net/2008/12/12/digitally-assisted-billards/</link>
		<comments>http://www.redllama.net/2008/12/12/digitally-assisted-billards/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 07:52:52 +0000</pubDate>
		<dc:creator>Boofer</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Hardware & Software]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sports]]></category>
		<category><![CDATA[billiards]]></category>

		<guid isPermaLink="false">http://www.redllama.net/2008/12/12/digitally-assisted-billards/</guid>
		<description><![CDATA[Holy crap, I had this idea five year ago. Oh well, they did an OK job with what they had. And I&#8217;m too lazy to make my own. Although mine had a laser light show to draw the lines. They were a tad smarter and used a projector. Cool, regardless. Here&#8217;s the website.

]]></description>
			<content:encoded><![CDATA[<p>Holy crap, I had this idea five year ago. Oh well, they did an OK job with what they had. And I&#8217;m too lazy to make my own. Although mine had a laser light show to draw the lines. They were a tad smarter and used a projector. Cool, regardless. Here&#8217;s the <a href="http://www.prism.gatech.edu/~gtg279x/Digitally_Assisted_Billards/Welcome.html" target="_blank">website</a>.<a href="http://www.prism.gatech.edu/~gtg279x/Digitally_Assisted_Billards/Welcome.html" target="_blank"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.redllama.net/2008/12/12/digitally-assisted-billards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JQuery: FancyBox</title>
		<link>http://www.redllama.net/2008/05/19/jquery-fancybox/</link>
		<comments>http://www.redllama.net/2008/05/19/jquery-fancybox/#comments</comments>
		<pubDate>Mon, 19 May 2008 20:48:58 +0000</pubDate>
		<dc:creator>Boofer</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wp.redllama.net/?p=1007</guid>
		<description><![CDATA[FancyBox? No! It&#8217;s not the script on my mom&#8217;s new Tupac style &#8220;Thug Life&#8221; tattoo with an additional arrow pointing downwards.
[align=center][img]http://imagecache2.allposters.com/images/pic/SCR/1081A~Tupac-Posters.jpg[/img]
[/align]
It&#8217;s another lightbox clone but I think it might be a fancyzoom clone. I dunno, who cares, I didn&#8217;t have to write it, and it&#8217;s pretty. I just pointed Mav to fancyzoom the other day [...]]]></description>
			<content:encoded><![CDATA[<p>FancyBox? No! It&#8217;s not the script on my mom&#8217;s new Tupac style &#8220;Thug Life&#8221; tattoo with an additional arrow pointing downwards.</p>
<p>[align=center][img]http://imagecache2.allposters.com/images/pic/SCR/1081A~Tupac-Posters.jpg[/img]<br />
[/align]</p>
<p>It&#8217;s another lightbox clone but I think it might be a fancyzoom clone. I dunno, who cares, I didn&#8217;t have to write it, and it&#8217;s pretty. I just pointed Mav to fancyzoom the other day for an image gallery he was slapping together. IT&#8217;s easy to get working and so is this one. I think this should replace any implementations of fancyzoom. It looks the same as fancyzoom but has better options: nicer title support, color overlays, animated &#038; non-animated popups, IE pngfix already incorporated, image set support (aka previous/next) and some iframe support if you want. Check out few demos on the web site.</p>
<p>Link: [url=http://fancy.klade.lv/fancy/index/110]FancyBox &#8211; fancy image zooming tool.[/url]</p>
<p>P.S. That&#8217;s got to be the gayest picture of Tupac ever.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redllama.net/2008/05/19/jquery-fancybox/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>I&#039;m going to catch HELL for this &#8230;</title>
		<link>http://www.redllama.net/2007/12/12/i039m-going-to-catch-hell-for-this-/</link>
		<comments>http://www.redllama.net/2007/12/12/i039m-going-to-catch-hell-for-this-/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 23:09:47 +0000</pubDate>
		<dc:creator>Upasaka Yin Cai</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wp.redllama.net/?p=588</guid>
		<description><![CDATA[&#8230; but I don&#8217;t care. When the HELL will Perl 6 be released?
]]></description>
			<content:encoded><![CDATA[<p>&#8230; but I don&#8217;t care. When the HELL will Perl 6 be released?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redllama.net/2007/12/12/i039m-going-to-catch-hell-for-this-/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Basics of Templatizing</title>
		<link>http://www.redllama.net/2007/04/09/basics-of-templatizing/</link>
		<comments>http://www.redllama.net/2007/04/09/basics-of-templatizing/#comments</comments>
		<pubDate>Tue, 10 Apr 2007 01:25:02 +0000</pubDate>
		<dc:creator>Boofer</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wp.redllama.net/?p=406</guid>
		<description><![CDATA[There&#8217;s a standard way of creating templates. We all know it. We all don&#8217;t know how we learned it. My question is; is it documented?
The programming language used in the base implementation for a templating system shouldn&#8217;t dictate how it&#8217;s structured. Templating is generic, very generic. I&#8217;m also under the impression that templates used in [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a standard way of creating templates. We all know it. We all don&#8217;t know how we learned it. My question is; is it documented?</p>
<p>The programming language used in the base implementation for a templating system shouldn&#8217;t dictate how it&#8217;s structured. Templating is generic, very generic. I&#8217;m also under the impression that templates used in any server-side scripting language should also be broken down in the same manner as any server-side template is done.</p>
<p>I raised the issue that the templates created at my job were (a joke|retarded|in need of a rewrite). They have a main template for a basic HTML page and a template for pop-up windows. So far so good. Within the basic template there is hard-coded crap for printer friendly type pages and some crap for pages that would be hosted on a secure site. Not so good but, whatever. The main issue is that they created a template and then cut that file in to section, and not modularly. The cut it like you&#8217;d saw a woman in half. Meaning &lt;html&gt; is in the first file and &lt;/html&gt; is in the last file. Why am I making a fuss? They really have 5 websites with about 10 different formations of pages. All which should be there own templates regardless of what domain they reside.</p>
<p>There&#8217;s the red-tape and hoops I&#8217;d have to go through to even think about fixing this crap. I guess, &#8220;barely working in a manner that&#8217;s confusing to everyone and involves hacking different files every week&#8221; is whats good for everyone. You&#8217;d thing they would know the difference between increased productivity and being productive. Besdies, where&#8217;s the documentation that says that what originally was created was the perfect approach?</p>
<p>Since this subject is culinary equivalent of boiling water, there is no &#8220;Templatetizing for Dummies&#8221; book. And if there was, it would be a pamphlet that read, &#8220;Turn off the computer. Go watch TV.&#8221; So, if anyone has seen a quick write up let me know because I&#8217;m not wasting my time and searching for this crap just to beg them to let me fix their screwed up shit. Since this would be a, let me guess, &#8220;When we have time in the future&#8221; project. Filed under the &#8220;If it ain&#8217;t broke, don&#8217;t fix it&#8221; list.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redllama.net/2007/04/09/basics-of-templatizing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A JavaScript Compressor/Obfuscator</title>
		<link>http://www.redllama.net/2007/02/07/a-javascript-compressorobfuscator/</link>
		<comments>http://www.redllama.net/2007/02/07/a-javascript-compressorobfuscator/#comments</comments>
		<pubDate>Thu, 08 Feb 2007 02:24:01 +0000</pubDate>
		<dc:creator>Boofer</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wp.redllama.net/?p=385</guid>
		<description><![CDATA[[url=http://dean.edwards.name/packer/]http://dean.edwards.name/packer/[/url]
None, numeric, normal and high ASCII encoding with or without special characters. Compresses up to 50-60% smaller.
]]></description>
			<content:encoded><![CDATA[<p>[url=http://dean.edwards.name/packer/]http://dean.edwards.name/packer/[/url]</p>
<p>None, numeric, normal and high ASCII encoding with or without special characters. Compresses up to 50-60% smaller.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redllama.net/2007/02/07/a-javascript-compressorobfuscator/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Cross Domain AJAX</title>
		<link>http://www.redllama.net/2007/01/26/cross-domain-ajax/</link>
		<comments>http://www.redllama.net/2007/01/26/cross-domain-ajax/#comments</comments>
		<pubDate>Fri, 26 Jan 2007 21:27:31 +0000</pubDate>
		<dc:creator>Boofer</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wp.redllama.net/?p=378</guid>
		<description><![CDATA[I thought that you might be able to do this but, I also knew it was still JavaScript. So, this is the best [url=http://snook.ca/archives/javascript/cross_domain_aj/]write up[/url] I found, that answered my confused question and a little more. We all know of the proxy method. The JSON method I think uses meta tags and isn&#8217;t the cleanest [...]]]></description>
			<content:encoded><![CDATA[<p>I thought that you might be able to do this but, I also knew it was still JavaScript. So, this is the best [url=http://snook.ca/archives/javascript/cross_domain_aj/]write up[/url] I found, that answered my confused question and a little more. We all know of the proxy method. The JSON method I think uses meta tags and isn&#8217;t the cleanest of solutions. The Flash method just made me say, &#8220;Duh, I should had though of that.&#8221; but then your relying on flash to work. Then I saw I cross domain example using Dojo and iFrames that seemed to work but I saw two things with it: it was slow, from what I read, and I hate iFrames. Enjoy.</p>
<p>[quote="[url=http://snook.ca/]snook.ca[/url]&#8220;]Cross Domain Ajax: a Quick Summary<br />
~ in JavaScript ~<br />
2006 | Aug 18</p>
<p>Here are a few of the most popular ways to do cross domain calls via JavaScript: proxies, JSON, and Flash.</p>
<p>Cross domain proxy</p>
<p>This is one of the most common approaches. Your script calls your server, your server makes the call to the remote server and then returns the result back to the client. There are some definite advantages to this approach: you have more control over the entire lifecycle. You can parse the data from the remote server, do with it what you will before sending it back to the client. If anything fails along the way, you can handle it in your own way. And lastly, you can log all remote calls. WIth that you can track success, failure and popularity.</p>
<p>Cross domain JSON</p>
<p>For this to work, the remote server needs to be set up to handle this. It needs to accept an additional parameter: a callback function. Then, to make the remote request, you insert a new script tag into your page with which will allow you to specify a remote URL. The reponse back will load a JSON object as a parameter of the callback function you specified in the request. Yahoo, for example, has implemented this feature in their web services API&#8217;s. This is great because you can implement web service calls without ever needing a scripting language on your server. Check out Jason Levitt&#8217;s article, JSON and the Dynamic Script Tag, on XML.com for more information.</p>
<p>Cross domain using Flash</p>
<p>Flash, by default, is much like Ajax in that you cannot request data from a remote server. However, you can enable this capability by placing a special XML file on the remote server to accept requests from other domains. With JavaScript&#8217;s capability to interact with Flash, we can use Flash as a bridge for sending cross-domain requests. (XML.com has a nice write-up of this technique.) There are still some limitations to this technique, most of which seems to be limited to older versions of Flash. There&#8217;s also the issue with users having Flash installed and enabled.</p>
<p>Sub-domains are still cross domains</p>
<p>One point to note and it&#8217;s fairly subtle. Plenty of us have our sites running at www.example.com and at example.com. They both point to the very same place. To us, we see them as the same thing. But to an Ajax call, it&#8217;s considered cross domain. Therefore, if you have to make an Ajax call to the same server, don&#8217;t code the domain as part of the request; just use the path.</p>
<p>The Future</p>
<p>Some have already begun looking into establishing standards that could be implemented into future browsers, such as JSONRequest and ContextAgnosticXMLHttpRequest. JSONRequest seems the most promising but that could be because I prefer JSON over XML and see it as really gaining traction over the next couple years.[/quote]</p>
<p>If you missed the link the first time, [url=http://snook.ca/archives/javascript/cross_domain_aj/]http://snook.ca/archives/javascript/cross_domain_aj/[/url]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redllama.net/2007/01/26/cross-domain-ajax/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sweet Titles</title>
		<link>http://www.redllama.net/2005/11/03/sweet-titles/</link>
		<comments>http://www.redllama.net/2005/11/03/sweet-titles/#comments</comments>
		<pubDate>Thu, 03 Nov 2005 06:38:07 +0000</pubDate>
		<dc:creator>Boofer</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wp.redllama.net/?p=216</guid>
		<description><![CDATA[Here&#8217;s a clean way to create CSS&#8217;ed tooltips. Very nicely done. The even fade. I&#8217;m using them at work. This was a great idea but I would had thought of it sooner or later if I hadn&#8217;t found this today.
Basically, all you need to do is set the title attribute of an href. This script [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a clean way to create CSS&#8217;ed tooltips. Very nicely done. The even fade. I&#8217;m using them at work. This was a great idea but I would had thought of it sooner or later if I hadn&#8217;t found this today.</p>
<p>Basically, all you need to do is set the title attribute of an href. This script crawls across the page onload and assigns show/hide div dunctions to the onmouseover/onmouseout attributes of an href then removes the title attribue so the default browse tooltip doesn&#8217;t pop up when this CSS&#8217;ed version is up. It works on &#8216;a&#8217;s,&#8217;abbr&#8217;s and &#8216;acronym&#8217;s. Don&#8217;t worry, this doesn&#8217;t hijck your onload, it finds your onload and concats it&#8217;s startup function to it.</p>
<p>I was looking to hack/addon some scripts that read the dynamic Struts validation functions to initalize validation of a fields onblur. Same concept as to how Sweet Titles works.</p>
<p>I had to hack Sweet Titles little to not show a tooltip if title was null or empty. Plus I set the em&#8217;s display style to none, to not show the link in the tooltip.</p>
<p>Check this out, it might be useful. If not, it&#8217;s an easy way to add an extra feature to any project.</p>
<p>[url=http://www.dustindiaz.com/sweet-titles]click here for the website[/url]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redllama.net/2005/11/03/sweet-titles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML: Fun With TR&#039;s</title>
		<link>http://www.redllama.net/2005/06/06/html-fun-with-tr039s/</link>
		<comments>http://www.redllama.net/2005/06/06/html-fun-with-tr039s/#comments</comments>
		<pubDate>Mon, 06 Jun 2005 20:35:30 +0000</pubDate>
		<dc:creator>Boofer</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://wp.redllama.net/?p=205</guid>
		<description><![CDATA[I needed to create a list with columns and below each item to have a details list using the same columns. As much as I rather use DIV&#8217;s more often. I decided to use a single table. I fgued to just give every TR an Id and hide the child rows based on that.
First my [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to create a list with columns and below each item to have a details list using the same columns. As much as I rather use DIV&#8217;s more often. I decided to use a single table. I fgued to just give every TR an Id and hide the child rows based on that.</p>
<p>First my parent rows and named &#8220;detail_1&#8243;. The child rows are named &#8220;detail_1_1, detail_1_2, detail_1_3, ect&#8230;&#8221;. I just did a simple loop to get threw and touch them all. I past in a row count to avoid any confusion of with to stop.</p>
<p>This was all easy till I got to referencing an elemets style and the value for  the display property. I knew that if the element doesn&#8217;t have a style property that you just refer to the property directly. The main problem was what to set the display property to. In Mozilla &#8220;block&#8221; displays as a cell. In IE &#8220;table-row&#8221; is not supported. Which all confused me because this is the first JavaScript function that I&#8217;ve written and it didn&#8217;t work in IE but did in Mozilla. It all threw me off and I spent two days trying to figure it out. So, if you need to hide and TR, this is how you do it.</p>
<p>[code]1  function getreference(_id) {<br />
2  	if( document.layers ) return document.layers[_id];<br />
3  	if( document.getElementById ) return document.getElementById(_id);<br />
4  	if( document.all ) return document.all[_id];<br />
5  	if( document[_id] ) return document[_id];<br />
6  	return false;<br />
7  }<br />
8<br />
9  function toggledetail(_row_id, _row_count) {<br />
10 	element = getreference(_row_id + "_1");<br />
11 	element_display = (element.style) ? element.style.display : element.display;<br />
12 	display_value = (document.all) ? "block" : "table-row";<br />
13 	showhide = (element_display == display_value || element_display == "") ? "none" : display_value;<br />
14 	plusminus = (element_display == display_value || element_display == "") ? "plus" : "minus";<br />
15 	for (i = 1; i &lt;= _row_count; i++) {<br />
16 		element = getreference(_row_id + "_" + i);<br />
17 		if(element.style) element.style.display = showhide;<br />
18 		else if(element.display) element.display = showhide;<br />
19 	}<br />
20 	document.images["toggle_" + _row_id].src = "images/icon_details_" + plusminus + ".gif";<br />
21 }[/code]</p>
<p>My code explained.<br />
Line 10 gets the element from what ever broswer is being use.<br />
Line 11 gets the element display.<br />
Line 12 determines to use &#8220;block&#8221; (IE) or &#8220;table-row&#8221; (Moz).<br />
Line 13 determines if the element is hiding or shown.<br />
Line 14 is the toogling for the tooge image.<br />
Line 15 is the loop to hide all the rows within the row count.<br />
Line 20 switched the toogle images src.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redllama.net/2005/06/06/html-fun-with-tr039s/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

