<?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>ContentFull &#187; Programming</title>
	<atom:link href="http://www.contentfull.com/category/andre-2003-2007/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://www.contentfull.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 28 Dec 2009 16:57:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Graphviz(dot) font problem on mac</title>
		<link>http://www.contentfull.com/andre-2007-2009/hints-tips/graphvizdot-font-problem-on-mac</link>
		<comments>http://www.contentfull.com/andre-2007-2009/hints-tips/graphvizdot-font-problem-on-mac#comments</comments>
		<pubDate>Sun, 11 May 2008 22:37:42 +0000</pubDate>
		<dc:creator>André</dc:creator>
				<category><![CDATA[Hints & Tips]]></category>
		<category><![CDATA[Terminal]]></category>

		<guid isPermaLink="false">http://www.contentfull.com/?p=369</guid>
		<description><![CDATA[If you happened to have installed graphviz without first installing fontconfig (one is never told to do so, but supposedly one should) then you are probably seeing messages such as
Error: Could not find/open font : Times-Roman
To solve this annoying error you need to add the following extra parameter when calling any graphviz program
-Gfontpath=/System/Library/Fonts
]]></description>
			<content:encoded><![CDATA[<p>If you happened to have installed graphviz without first installing fontconfig (one is never told to do so, but supposedly one should) then you are probably seeing messages such as</p>
<p><code>Error: Could not find/open font : Times-Roman</code></p>
<p>To solve this annoying error you need to add the following extra parameter when calling any graphviz program</p>
<p><code>-Gfontpath=/System/Library/Fonts</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.contentfull.com/andre-2007-2009/hints-tips/graphvizdot-font-problem-on-mac/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unexpected hummor in error message</title>
		<link>http://www.contentfull.com/andre-2007-2009/hummor/unexpected-hummor-in-error-message</link>
		<comments>http://www.contentfull.com/andre-2007-2009/hummor/unexpected-hummor-in-error-message#comments</comments>
		<pubDate>Fri, 04 Jan 2008 04:07:22 +0000</pubDate>
		<dc:creator>André</dc:creator>
				<category><![CDATA[Hummor]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.andrecohen.com/current/programming-current/unexpected-hummor-in-error-message/</guid>
		<description><![CDATA[While working with PHP4 thinking it was PHP5 I received the following error message
Parse error: parse error, unexpected t_paamayim_nekudotayim
Exactly, what on Earth does t_paamayim_nekudotayim mean?!
Answer: Hebrew for two (paamayim) colons (nekudotayim). More compilers and interpreters should incorporate humor into their products for it makes errors and hair-pulling situations much more relaxing.
]]></description>
			<content:encoded><![CDATA[<p>While working with PHP4 thinking it was PHP5 I received the following error message</p>
<p><code>Parse error: parse error, unexpected t_paamayim_nekudotayim</code></p>
<p>Exactly, what on Earth does <em>t_paamayim_nekudotayim</em> mean?!<br />
Answer: Hebrew for two (paamayim) colons (nekudotayim). More compilers and interpreters should incorporate humor into their products for it makes errors and hair-pulling situations much more relaxing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.contentfull.com/andre-2007-2009/hummor/unexpected-hummor-in-error-message/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ajax and form submission</title>
		<link>http://www.contentfull.com/andre-2003-2007/programming/ajax-and-form-submission</link>
		<comments>http://www.contentfull.com/andre-2003-2007/programming/ajax-and-form-submission#comments</comments>
		<pubDate>Wed, 18 Jul 2007 00:22:12 +0000</pubDate>
		<dc:creator>André</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.andrecohen.com/blog/?p=351</guid>
		<description><![CDATA[Situation: You have a form which you would like to validate before submitting. you also want to show error messages without having to reload the page. Example:


Username

Password




Suppose you want to call a function called validate() when either the user presses enter or clicks the button. The trick I discovered with Prototype is as follows:

function checkForSubmission(element,func){
Event.observe(element, [...]]]></description>
			<content:encoded><![CDATA[<p>Situation: You have a form which you would like to validate before submitting. you also want to show error messages without having to reload the page. Example:</p>
<pre lang="html4strict">
<form name="login">
<label for="user">Username</lable>
<input type="text" name="user">
<label for="password">Password</label>
<input type="password" name="password">
<input type="button" value="Login">
</form>
</pre>
<p>Suppose you want to call a function called validate() when either the user presses enter or clicks the button. The trick I discovered with Prototype is as follows:</p>
<pre lang="javascript">
function checkForSubmission(element,func){
Event.observe(element, &#8216;keypress&#8217;, function(event){
if(event.keyCode==13)
func();
});
}
</pre>
<p>Now for the example above, when the page loads you simply call</p>
<pre language="javascript">
checkForSubmission(&#8220;login&#8221;,validate);
</pre>
<p>If the user presses enter in any of the two text boxes or clicks the button the form will now validate itself. Simple solution to a tricky situation.</p>
<p><strong>Update:</strong> It seems that in Safari events happen in a different order: onSubmit event takes place before the onKeyPress event. To get around this you need to return false when onSubmit occurs. Easiest solution is to add the following to the form tag.</p>
<pre language="html4strict">
onSubmit=&#8220;return false;&#8221;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.contentfull.com/andre-2003-2007/programming/ajax-and-form-submission/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
