<?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>In Search of a Good Title &#187; Software Development</title>
	<atom:link href="http://curtis.humphreyonline.us/category/code/feed" rel="self" type="application/rss+xml" />
	<link>http://curtis.humphreyonline.us</link>
	<description>Curtis M. Humphrey's Website</description>
	<lastBuildDate>Wed, 02 Jun 2010 17:04:44 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>html tags that cannot accept css in Actionscript 3</title>
		<link>http://curtis.humphreyonline.us/code/actionscript/html-tags-that-cannot-accept-css-in-actionscript-3</link>
		<comments>http://curtis.humphreyonline.us/code/actionscript/html-tags-that-cannot-accept-css-in-actionscript-3#comments</comments>
		<pubDate>Wed, 02 Jun 2010 17:04:44 +0000</pubDate>
		<dc:creator>Curtis M. Humphrey</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Actionscipt/Flash]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://curtis.humphreyonline.us/?p=266</guid>
		<description><![CDATA[Painful! Painful! It amazes me how little effort is sometimes put into documentation and today I found another example in Actionscript 3.0. (This is another reason I love codeigniter: great user-friendly manual! but that is another story). The actionscript goal was as follows: to change text characteristics by applying css to a textField. I was [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Painful! Painful! It amazes me how little effort is sometimes put into documentation and today I found another example in Actionscript 3.0. (This is another reason I love codeigniter: great user-friendly <a href="http://codeigniter.com/user_guide/">manual</a>! but that is another story). The actionscript goal was as follows: to change text characteristics by applying css to a textField. I was thinking I would use the &#8220;b&#8221; and &#8220;i&#8221; tags (old school bold and italics) as my target tags. The only problem was that when applied nothing happened. Nothing, the &#8220;b&#8221; and &#8220;i&#8221; tags retained their original styling and my css was as if it was not applied. I spent time checking to make sure I applied it, time checking to make sure the tags where really there, and time looking through the manual to discover anything&#8230;</p>
<p>The tests proved that the tags where there and that the css was applied but I was still having the issue. So I just tried other tags and to my slight surprise the other tags worked. It appears that actionscript will not style &#8220;b&#8221; and &#8220;i&#8221; tags but will style &#8220;em&#8221; and &#8220;strong&#8221; tags. It will still interpet the &#8220;b&#8221; and &#8220;i&#8221; tags and apply their default styling it just will not let you overwrite those defaults with css. Sounds like either a bug or an undocumented exclusion&#8230; Either way very annoing and the manual is very unfriendly and slow. In fact online help through their livdocs was faster than through the program&#8230; Great manuals designed to be usable make or break software in the long run and this cannot be a good sign for Adobe. I&#8217;ve been playing/using flash since 2000 and their CS5 manual/help is much worse in terms of usability than their help was in 2000.</p>
<p>If you want to see a demo showing this issue try out the code below:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">...
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> newStyle:StyleSheet = <span style="color: #000000; font-weight: bold;">new</span> StyleSheet<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> styleObj:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
styleObj.<span style="color: #006600;">fontStyle</span> = <span style="color: #ff0000;">'normal'</span>;
styleObj.<span style="color: #0066CC;">color</span> = <span style="color: #ff0000;">'#660066'</span>;
styleObj.<span style="color: #006600;">display</span> = <span style="color: #ff0000;">'inline'</span>;
&nbsp;
newStyle.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;b&quot;</span>, styleObj<span style="color: #66cc66;">&#41;</span>;
newStyle.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;i&quot;</span>, styleObj<span style="color: #66cc66;">&#41;</span>;
newStyle.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;strong&quot;</span>, styleObj<span style="color: #66cc66;">&#41;</span>;
newStyle.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;em&quot;</span>, styleObj<span style="color: #66cc66;">&#41;</span>;
&nbsp;
text_field.<span style="color: #006600;">styleSheet</span> = newStyle;
text_field.<span style="color: #0066CC;">htmlText</span> = <span style="color: #ff0000;">'&lt;b&gt;Hi&lt;/b&gt; &lt;i&gt;World!&lt;/i&gt; &lt;strong&gt;Hi&lt;/strong&gt; &lt;em&gt;World!&lt;/em&gt;'</span>;
&nbsp;
...</pre></div></div>

<p>The output should look something like this:<br />
<b>Hi</b> <i>World!</i> <strong style="color:#660066">Hi</strong> <em style="color:#660066"; font-style:normal">World!</em></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://curtis.humphreyonline.us/code/actionscript/html-tags-that-cannot-accept-css-in-actionscript-3/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wordpress, PHP Memory, and 1and1.com part 2</title>
		<link>http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1-com-part-2</link>
		<comments>http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1-com-part-2#comments</comments>
		<pubDate>Mon, 26 Oct 2009 21:51:38 +0000</pubDate>
		<dc:creator>Curtis M. Humphrey</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://curtis.humphreyonline.us/?p=258</guid>
		<description><![CDATA[It has been some time since the first post on this subject on Mar 4, 2009. I had concluded that the issue was a silent failure (i.e., there is no direct feedback) of not enough PHP memory to run Wordpress with several plugins on 1and1. I like running plugins and therefore this situation was unacceptable. [...]


Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1com' rel='bookmark' title='Permanent Link: Wordpress, PHP Memory, and 1and1.com'>Wordpress, PHP Memory, and 1and1.com</a></li>
<li><a href='http://curtis.humphreyonline.us/code/wordpress/upgrading-to-wordpress-2-7-1' rel='bookmark' title='Permanent Link: Upgrading Wordpress to 2.7.1'>Upgrading Wordpress to 2.7.1</a></li>
<li><a href='http://curtis.humphreyonline.us/wordpress-plugins-in-use' rel='bookmark' title='Permanent Link: Wordpress Plugins in Use'>Wordpress Plugins in Use</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-260" title="MediaTemple logo" src="http://curtis.humphreyonline.us/wp-content/uploads/MediaTemple-logo.jpg" alt="MediaTemple logo" width="120" height="60" />It has been some time since the first post on this <a title="subject" href="http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1com">subject</a> on <span id="timestamp">Mar 4, 2009. I had concluded that the issue was a silent failure (i.e., there is no direct feedback) of not enough PHP memory to run Wordpress with several plugins on 1and1. I like <a title="running plugins" href="http://curtis.humphreyonline.us/wordpress-plugins-in-use">running plugins</a> and therefore this situation was unacceptable. I look around for a new host for around the same price $15 a month (I had the developer package at 1and1). I decided on <a title="MediaTemple" href="http://en.wikipedia.org/wiki/Media_Temple">MediaTemple</a> and there (GS) or grid-service package. I found a coupon and am only paying $16 a month. I am <span style="text-decoration: underline;">much</span> happier with them as they are a first class hoster. If you are in the same situation I would suggest doing the same. This site is currently on MediaTemple and I have lots of plugins running and the site is still snappy. If you do purchase from them please use my referral link: <a href="http://www.mediatemple.net/go/order/?refdom=humphreyonline.us" target="_blank">thanks!</a>.<br />
</span></p>
<p><strong> </strong></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">Wordpress, PHP Memory, and 1and1.comWordpress, PHP Memory, and 1and1.com</div>


<p>Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1com' rel='bookmark' title='Permanent Link: Wordpress, PHP Memory, and 1and1.com'>Wordpress, PHP Memory, and 1and1.com</a></li>
<li><a href='http://curtis.humphreyonline.us/code/wordpress/upgrading-to-wordpress-2-7-1' rel='bookmark' title='Permanent Link: Upgrading Wordpress to 2.7.1'>Upgrading Wordpress to 2.7.1</a></li>
<li><a href='http://curtis.humphreyonline.us/wordpress-plugins-in-use' rel='bookmark' title='Permanent Link: Wordpress Plugins in Use'>Wordpress Plugins in Use</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1-com-part-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Komodo Edit 5</title>
		<link>http://curtis.humphreyonline.us/code/setting-up-komodo-edit-5</link>
		<comments>http://curtis.humphreyonline.us/code/setting-up-komodo-edit-5#comments</comments>
		<pubDate>Sat, 06 Jun 2009 22:02:55 +0000</pubDate>
		<dc:creator>Curtis M. Humphrey</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Coding Setup]]></category>
		<category><![CDATA[FYI]]></category>
		<category><![CDATA[Komodo Edit]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://curtis.humphreyonline.us/?p=200</guid>
		<description><![CDATA[I starting using Komodo IDE as my PHP editor over Dreamweaver in 2006? I was tired of Dreamweaver not having features like &#8220;looking function definition&#8221; which jumps to where the php function is defined in some other file. I tried a few other editors and they just didn&#8217;t feel as intutive. Since Komodo has created [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<div id="attachment_203" class="wp-caption alignright" style="width: 138px"><a href="http://www.activestate.com/komodo_edit/" target="_blank"><img class="size-full wp-image-203 " title="Komodo Edit Logo" src="http://curtis.humphreyonline.us/wp-content/uploads/komodo-logo.gif" alt="Komodo Edit Logo" width="128" height="128" /></a><p class="wp-caption-text">Komodo Edit Logo</p></div>
<p>I starting using Komodo IDE as my PHP editor over Dreamweaver in 2006? I was tired of Dreamweaver not having features like &#8220;looking function definition&#8221; which jumps to where the php function is defined in some other file. I tried a few other editors and they just didn&#8217;t feel as intutive. Since Komodo has created an open source (read free) version call <a title="Komodo Edit" href="http://www.activestate.com/komodo_edit/">Komodo Edit</a> and have been using that and having missed the edit features. There are a number of things I do to make the Edit program feel more like home. First I install a few extensions&#8230;</p>
<h3 style="clear:both">Best Extensions:</h3>
<ul>
<li><a title="Komodo Edit Source Tree extension" href="http://community.activestate.com/xpi/source-tree" target="_blank">Source Tree</a> must have for quickly jumping around and viewing code</li>
<li><a title="Komodo Edit HTML Toolkit extension" href="http://community.activestate.com/xpi/html-toolkit" target="_blank">HTML Toolkit</a> great for auto-completing HTML/XML tags and previewing css images</li>
<li><a title="Komodo Edit Remote Drive Tree extension" href="http://community.activestate.com/xpi/remote-drive-tree" target="_blank">Remote Drive Tree</a> great for editing files you usally do not have local copies of (e.g., php.ini)</li>
<li><a title="Komodo Edit TODO Helper extension" href="http://community.activestate.com/xpi/todo-helper" target="_blank">TODO Helper</a> finds all your TODO statements so you don&#8217;t forget them</li>
</ul>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://curtis.humphreyonline.us/code/setting-up-komodo-edit-5/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Grabbing all QGraphicItems current viewable in a QGraphicView</title>
		<link>http://curtis.humphreyonline.us/code/qt-code/grabbing-all-qgraphicitems-current-viewable-in-a-qgraphicview</link>
		<comments>http://curtis.humphreyonline.us/code/qt-code/grabbing-all-qgraphicitems-current-viewable-in-a-qgraphicview#comments</comments>
		<pubDate>Tue, 07 Apr 2009 18:14:09 +0000</pubDate>
		<dc:creator>Curtis M. Humphrey</dc:creator>
				<category><![CDATA[Qt Code]]></category>
		<category><![CDATA[QGraphicsItem]]></category>
		<category><![CDATA[QGraphicsView]]></category>
		<category><![CDATA[Qt 4.4]]></category>
		<category><![CDATA[Qt FYI]]></category>

		<guid isPermaLink="false">http://curtis.humphreyonline.us/?p=94</guid>
		<description><![CDATA[The best way to get a list of all items current displayed inside the QGraphicsView is done through the combination of three steps:

get viewing rectangle
get items intersecting or inside rectangle
check for visibility



1
2
3
4
5
6
7
QList&#60;QGraphicsItem* &#62; viewItems = m_pView-&#62;items&#40;m_pView-&#62;rect&#40;&#41;&#41;;
&#160;
for&#40;int i=0; i &#60; viewItems.size&#40;&#41;; ++i&#41; &#123;
	if&#40;viewItems.at&#40;i&#41;-&#62;isVisible&#40;&#41;&#41; &#123;
		//payload
	&#125;
&#125;

Do not use other rectangle functions like sceneRect(), childrenRect(), contentsRect(), etc&#8230; as they [...]


Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/qt-code/making-a-qpixmap-transparent-wrong-way-right-way' rel='bookmark' title='Permanent Link: Making a QPixmap transparent the Right Way'>Making a QPixmap transparent the Right Way</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The best way to get a list of all items current displayed inside the QGraphicsView is done through the combination of three steps:</p>
<ol>
<li>get viewing rectangle</li>
<li>get items intersecting or inside rectangle</li>
<li>check for visibility</li>
</ol>
<ol></ol>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #22aadd;">QList</span><span style="color: #006E28;">&lt;</span><span style="color: #22aadd;">QGraphicsItem</span><span style="color: #006E28;">*</span> <span style="color: #006E28;">&gt;</span> viewItems <span style="color: #006E28;">=</span> m_pView<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">items</span><span style="color: #006E28;">&#40;</span>m_pView<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">rect</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
&nbsp;
<span style="color: #000000; font-weight:bold;">for</span><span style="color: #006E28;">&#40;</span><span style="color: #0057AE;">int</span> i<span style="color: #006E28;">=</span><span style="color: #B08000;">0</span><span style="color: #006E28;">;</span> i <span style="color: #006E28;">&lt;</span> viewItems.<span style="color: #2B74C7;">size</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span> <span style="color: #006E28;">++</span>i<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
	<span style="color: #000000; font-weight:bold;">if</span><span style="color: #006E28;">&#40;</span>viewItems.<span style="color: #2B74C7;">at</span><span style="color: #006E28;">&#40;</span>i<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">isVisible</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
		<span style="color: #888888;">//payload</span>
	<span style="color: #006E28;">&#125;</span>
<span style="color: #006E28;">&#125;</span></pre></td></tr></table></div>

<p>Do not use other rectangle functions like sceneRect(), childrenRect(), contentsRect(), etc&#8230; as they will not give you the correct bounding region. Also this operation returns all items, so one must check for visibility manually and cast points to any derived class as appropriate.</p>
<p>With casting</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #22aadd;">QList</span><span style="color: #006E28;">&lt;</span><span style="color: #22aadd;">QGraphicsItem</span><span style="color: #006E28;">*</span> <span style="color: #006E28;">&gt;</span> viewItems <span style="color: #006E28;">=</span> m_pView<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">items</span><span style="color: #006E28;">&#40;</span>m_pView<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">rect</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
NewType <span style="color: #006E28;">*</span>newType<span style="color: #006E28;">;</span>
&nbsp;
<span style="color: #000000; font-weight:bold;">for</span><span style="color: #006E28;">&#40;</span><span style="color: #0057AE;">int</span> i<span style="color: #006E28;">=</span><span style="color: #B08000;">0</span><span style="color: #006E28;">;</span> i <span style="color: #006E28;">&lt;</span> viewItems.<span style="color: #2B74C7;">size</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span> <span style="color: #006E28;">++</span>i<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
	<span style="color: #000000; font-weight:bold;">if</span><span style="color: #006E28;">&#40;</span>viewItems.<span style="color: #2B74C7;">at</span><span style="color: #006E28;">&#40;</span>i<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">isVisible</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
		newType <span style="color: #006E28;">=</span> <span style="color: #0057AE;">dynamic_cast</span><span style="color: #006E28;">&lt;</span>NewType <span style="color: #006E28;">*&gt;</span> <span style="color: #006E28;">&#40;</span>viewItems<span style="color: #006E28;">&#91;</span>i<span style="color: #006E28;">&#93;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
		<span style="color: #000000; font-weight:bold;">if</span><span style="color: #006E28;">&#40;</span>newType <span style="color: #006E28;">!=</span> <span style="color: #0057AE;">NULL</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
			<span style="color: #888888;">//payload</span>
		<span style="color: #006E28;">&#125;</span>
	<span style="color: #006E28;">&#125;</span>
<span style="color: #006E28;">&#125;</span></pre></td></tr></table></div>



<p>Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/qt-code/making-a-qpixmap-transparent-wrong-way-right-way' rel='bookmark' title='Permanent Link: Making a QPixmap transparent the Right Way'>Making a QPixmap transparent the Right Way</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://curtis.humphreyonline.us/code/qt-code/grabbing-all-qgraphicitems-current-viewable-in-a-qgraphicview/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress, PHP Memory, and 1and1.com</title>
		<link>http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1com</link>
		<comments>http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1com#comments</comments>
		<pubDate>Wed, 04 Mar 2009 17:37:08 +0000</pubDate>
		<dc:creator>Curtis M. Humphrey</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[1and1]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP memory]]></category>
		<category><![CDATA[Wordpress 2.7.1]]></category>

		<guid isPermaLink="false">http://curtis.humphreyonline.us/?p=65</guid>
		<description><![CDATA[After upgrading from Wordpress 2.7 to 2.7.1, I starting having odd issues. At first I thought it was that some of the plugins I was using need to be updated as I posted about here. However, it I think the problem is closer to the one described at: php-memory-and-wordpress. That is PHP is running out [...]


Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1-com-part-2' rel='bookmark' title='Permanent Link: Wordpress, PHP Memory, and 1and1.com part 2'>Wordpress, PHP Memory, and 1and1.com part 2</a></li>
<li><a href='http://curtis.humphreyonline.us/code/wordpress/upgrading-to-wordpress-2-7-1' rel='bookmark' title='Permanent Link: Upgrading Wordpress to 2.7.1'>Upgrading Wordpress to 2.7.1</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>After upgrading from Wordpress 2.7 to 2.7.1, I starting having odd issues. At first I thought it was that some of the plugins I was using need to be updated as I posted about <a title="here" href="http://curtis.humphreyonline.us/wordpress/upgrading-to-wordpress-2-7-1">here</a>. However, it I think the problem is closer to the one described at: <a href="http://www.narfstuff.co.uk/2008/03/14/php-memory-and-wordpress/">php-memory-and-wordpress</a>. That is PHP is running out of memory. I am currently hosting the site at 1and1 on a developer package and according to there <a href="http://faq.1and1.com/scripting_languages_supported/php/16.html">FAQ</a>:</p>
<blockquote><p>Due to resource limits on our Shared Hosting machines, it is not possible to allocate more than 20M of memory to PHP, although <a title="phpinfo()" href="http://www.php.net/phpinfo">phpinfo()</a> may report a higher number.  You will be unable to increase the memory usage limit with a php.ini file.</p></blockquote>
<p>O.k., first off why would they allow your to specify a higher number in PHP if they are going to ignore it? According to PHP if a script runs out of memory it will report with a message like this: &#8220;Fatal error: Out of memory error.&#8221; However, because of 1and1 allow PHP to think it has more memory and then killing it when it exceeds 20M, no error message is reported. I run across this situation on a different project in the past when processing images.</p>
<p>So I decided to test to see if this could be the case. The best page to test I found was the Tools-&gt;Import page. That page seem to be the one most likely to stop loading and blank out. It would load all of the admin menus but would not load the import list when some plugins were activated. So I added a few <a title="memory_get_usage()" href="http://www.php.net/memory_get_usage">memory_get_usage()</a> function calls and sure enough it appears that whenever the memory when above about 15,300,000 bytes of memory it would die. This is lower than 20MB but memory_get_usage does not necessarily report all memory used as seen by the OS.</p>
<p><strong>Therefore</strong>, I must conclude that it is a PHP memory issue and that 1and1.com poor decision to allow PHP to report and indeed set a higher memory limit than 20MB but ignoring that number anyways suppresses the error message resulting in very odd behaviors. Since, Wordpress is a good well used piece of software this is a grave shortfall for 1and1 hosting especially at the developer level. I therefore am in search of a new host as I am not going to continue to pay money to a host with such a poor limit and support of PHP.  Hopefully this post might shed some light on odd problems you might be having with Wordpress on 1and1.</p>


<p>Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1-com-part-2' rel='bookmark' title='Permanent Link: Wordpress, PHP Memory, and 1and1.com part 2'>Wordpress, PHP Memory, and 1and1.com part 2</a></li>
<li><a href='http://curtis.humphreyonline.us/code/wordpress/upgrading-to-wordpress-2-7-1' rel='bookmark' title='Permanent Link: Upgrading Wordpress to 2.7.1'>Upgrading Wordpress to 2.7.1</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1com/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Qt mousePressEvent and mouseReleaseEvent fun!</title>
		<link>http://curtis.humphreyonline.us/code/qt-code/qt-mousepressevent-and-mousereleaseevent-fun</link>
		<comments>http://curtis.humphreyonline.us/code/qt-code/qt-mousepressevent-and-mousereleaseevent-fun#comments</comments>
		<pubDate>Mon, 02 Mar 2009 18:03:34 +0000</pubDate>
		<dc:creator>Curtis M. Humphrey</dc:creator>
				<category><![CDATA[Qt Code]]></category>
		<category><![CDATA[mousePressEvent]]></category>
		<category><![CDATA[mouseReleaseEvent]]></category>
		<category><![CDATA[QGraphicsItem]]></category>
		<category><![CDATA[Qt FYI]]></category>

		<guid isPermaLink="false">http://curtis.humphreyonline.us/?p=61</guid>
		<description><![CDATA[This would have been good to know beforehand regarding mouse events&#8230;
Apparently in Qt, QGraphicsItem&#8217;s mouse events are a little different from the model I had in my head from Actionscript. In actionscript when a user uses the mouse to move over and then click on an MovieClip object these events occur (ignoring mouse movement events):

onRollOver
onPress
onRelease
onRollOut

In [...]


Related posts:<ol><li><a href='http://curtis.humphreyonline.us/articles/word-2007-spell-checking-inside-tables' rel='bookmark' title='Permanent Link: word 2007 spell checking inside tables'>word 2007 spell checking inside tables</a></li>
<li><a href='http://curtis.humphreyonline.us/code/qt-code/grabbing-all-qgraphicitems-current-viewable-in-a-qgraphicview' rel='bookmark' title='Permanent Link: Grabbing all QGraphicItems current viewable in a QGraphicView'>Grabbing all QGraphicItems current viewable in a QGraphicView</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This would have been good to know beforehand regarding mouse events&#8230;</p>
<p>Apparently in <a title="Qt" href="http://doc.trolltech.com/">Qt</a>, <a title="QGraphicsItem" href="http://doc.trolltech.com/4.4/qgraphicsitem.html">QGraphicsItem</a>&#8217;s mouse events are a little different from the model I had in my head from <a title="Actionscript" href="http://en.wikipedia.org/wiki/Actionscript">Actionscript</a>. In actionscript when a user uses the mouse to move over and then click on an MovieClip object these events occur (ignoring mouse movement events):</p>
<ol>
<li>onRollOver</li>
<li>onPress</li>
<li>onRelease</li>
<li>onRollOut</li>
</ol>
<p>In Qt it is not quite the same. If the QGraphicsItem accepts mouse clicks but is not <a title="GraphicsItemFlag" href="http://doc.trolltech.com/4.4/qgraphicsitem.html#GraphicsItemFlag-enum" target="_blank">movable or selectable</a> then these are its events (again ignoring mouse movement events):</p>
<ol>
<li>hoverEnterEvent</li>
<li>mousePressEvent</li>
<li>hoverLeaveEvent</li>
</ol>
<p>Notice in Qt there is not a mouse release event called. Qt does have a <a href="http://doc.trolltech.com/4.4/qgraphicsitem.html#mouseReleaseEvent">mouseReleaseEvent</a><strong> </strong>but it is only called if the item is movable or selectable (both not set by default).</p>
<p>This fact would have been good to know. I had been allowing QGraphicsItems to move during debuging and had been using mouseReleaseEvent as my click event. When I removed the debuging code suddenly I could not click my items, which was most distressing as it was only minutes away from my live demo. Luckly, I discovered this Qt fact, changed the event to  <a href="http://doc.trolltech.com/4.4/qgraphicsitem.html#mousePressEvent">mousePressEvent</a> and got it all working.</p>
<p>How demos work as told on <a href="http://www.phdcomics.com/comics/archive.php?comicid=821">PHD comics</a>.</p>


<p>Related posts:<ol><li><a href='http://curtis.humphreyonline.us/articles/word-2007-spell-checking-inside-tables' rel='bookmark' title='Permanent Link: word 2007 spell checking inside tables'>word 2007 spell checking inside tables</a></li>
<li><a href='http://curtis.humphreyonline.us/code/qt-code/grabbing-all-qgraphicitems-current-viewable-in-a-qgraphicview' rel='bookmark' title='Permanent Link: Grabbing all QGraphicItems current viewable in a QGraphicView'>Grabbing all QGraphicItems current viewable in a QGraphicView</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://curtis.humphreyonline.us/code/qt-code/qt-mousepressevent-and-mousereleaseevent-fun/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a QPixmap transparent the Right Way</title>
		<link>http://curtis.humphreyonline.us/code/qt-code/making-a-qpixmap-transparent-wrong-way-right-way</link>
		<comments>http://curtis.humphreyonline.us/code/qt-code/making-a-qpixmap-transparent-wrong-way-right-way#comments</comments>
		<pubDate>Sat, 21 Feb 2009 22:55:42 +0000</pubDate>
		<dc:creator>Curtis M. Humphrey</dc:creator>
				<category><![CDATA[Qt Code]]></category>
		<category><![CDATA[QPainter]]></category>
		<category><![CDATA[QPixmap]]></category>
		<category><![CDATA[Qt 4.4]]></category>
		<category><![CDATA[Understanding Qt]]></category>

		<guid isPermaLink="false">http://curtis.humphreyonline.us/?p=45</guid>
		<description><![CDATA[The Problem
The classic situation that this problem can occur is when one wants to create a QPixmap with a transparent background and then draws on only some of the available pixels. This process is akin to creating a transparent GIF. Well there is a wrong way and a right way. I discovered this because I [...]


Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/qt-code/grabbing-all-qgraphicitems-current-viewable-in-a-qgraphicview' rel='bookmark' title='Permanent Link: Grabbing all QGraphicItems current viewable in a QGraphicView'>Grabbing all QGraphicItems current viewable in a QGraphicView</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h2>The Problem</h2>
<p>The classic situation that this problem can occur is when one wants to create a QPixmap with a transparent background and then draws on only some of the available pixels. This process is akin to creating a transparent GIF. Well there is a wrong way and a right way. I discovered this because I was using the wrong way and was getting away with it as long as I was writing to every pixel. Then there was a case when I was not writing to all pixels and the QPixmap unwritten to pixels (i.e., the background) was not transparent as I expected. Here is the wrong way.</p>
<h3>The Wrong Way</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #22aadd;">QPixmap</span> <span style="color: #006E28;">*</span>pix <span style="color: #006E28;">=</span> <span style="color: #000000; font-weight:bold;">new</span> <span style="color: #22aadd;">QPixmap</span><span style="color: #006E28;">&#40;</span>Size<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
&nbsp;
<span style="color: #22aadd;">QPainter</span> painter<span style="color: #006E28;">;</span>
painter.<span style="color: #2B74C7;">begin</span><span style="color: #006E28;">&#40;</span>pix<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
painter.<span style="color: #2B74C7;">fillRect</span><span style="color: #006E28;">&#40;</span><span style="color: #B08000;">0</span><span style="color: #006E28;">,</span><span style="color: #B08000;">0</span><span style="color: #006E28;">,</span>pix<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">width</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span>pix<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">height</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span><span style="color: #22aadd;">QBrush</span><span style="color: #006E28;">&#40;</span><span style="color: #22aadd;">QColor</span><span style="color: #006E28;">&#40;</span><span style="color: #B08000;">0</span><span style="color: #006E28;">,</span><span style="color: #B08000;">0</span><span style="color: #006E28;">,</span><span style="color: #B08000;">0</span><span style="color: #006E28;">,</span><span style="color: #B08000;">0</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
painter.<span style="color: #2B74C7;">drawPixmap</span><span style="color: #006E28;">&#40;</span>pix<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">rect</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,*</span>m_image<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
painter.<span style="color: #2B74C7;">end</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span></pre></td></tr></table></div>

<p>The problem is that line 4 does not fill the QPixmap with anything as the alpha is set to 0. Think of fill with alpha as a merge operation and not a replace. I was thinking of it as a replace and therefore I was replacing every pixel with a fully transparent black. However, because fillRect is really a merge I was merging a transparent pixel with the background effectively doing nothing.</p>
<p>The correct way is as follows:</p>
<h3>The Right Way</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #22aadd;">QPixmap</span> <span style="color: #006E28;">*</span>pix <span style="color: #006E28;">=</span> <span style="color: #000000; font-weight:bold;">new</span> <span style="color: #22aadd;">QPixmap</span><span style="color: #006E28;">&#40;</span>Size<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
pix<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">fill</span><span style="color: #006E28;">&#40;</span>Qt<span style="color: #006E28;">::</span><span style="color: #2B74C7;">transparent</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
&nbsp;
<span style="color: #22aadd;">QPainter</span> painter<span style="color: #006E28;">;</span>
painter.<span style="color: #2B74C7;">begin</span><span style="color: #006E28;">&#40;</span>pix<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
painter.<span style="color: #2B74C7;">drawPixmap</span><span style="color: #006E28;">&#40;</span>pix<span style="color: #006E28;">-&gt;;</span>rect<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,*</span>m_baseSymbol<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
painter.<span style="color: #2B74C7;">end</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span></pre></td></tr></table></div>

<p>Notice that line 2 is new and this fill command is a replace fill.</p>
<h2>Summary</h2>
<p>In summary QPixmap fill(&#8230;) command is a replace fill; whereas, QPainter fillRect(&#8230;) is a merge fill. I hope this help clarity the nature of these two operations.</p>


<p>Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/qt-code/grabbing-all-qgraphicitems-current-viewable-in-a-qgraphicview' rel='bookmark' title='Permanent Link: Grabbing all QGraphicItems current viewable in a QGraphicView'>Grabbing all QGraphicItems current viewable in a QGraphicView</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://curtis.humphreyonline.us/code/qt-code/making-a-qpixmap-transparent-wrong-way-right-way/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading Wordpress to 2.7.1</title>
		<link>http://curtis.humphreyonline.us/code/wordpress/upgrading-to-wordpress-2-7-1</link>
		<comments>http://curtis.humphreyonline.us/code/wordpress/upgrading-to-wordpress-2-7-1#comments</comments>
		<pubDate>Mon, 16 Feb 2009 18:09:58 +0000</pubDate>
		<dc:creator>Curtis M. Humphrey</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[FYI]]></category>
		<category><![CDATA[Wordpress 2.7.1]]></category>

		<guid isPermaLink="false">http://curtis.humphreyonline.us/?p=35</guid>
		<description><![CDATA[It appears that the real problem is php memory. This post seems to echo my problem: php-memory-and-wordpress.
Previous thought but probably wrong&#8230;
It appears that in WP-SpamFree 1.9.8.3 breaks Wordpress 2.7.1. It also appears that Broken Link Checker 0.4.10 breaks Wordpress 2.7.1 in the same manner.
I upgraded from 2.7 to 2.7.1 and these plugins seems to cause [...]


Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1com' rel='bookmark' title='Permanent Link: Wordpress, PHP Memory, and 1and1.com'>Wordpress, PHP Memory, and 1and1.com</a></li>
<li><a href='http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1-com-part-2' rel='bookmark' title='Permanent Link: Wordpress, PHP Memory, and 1and1.com part 2'>Wordpress, PHP Memory, and 1and1.com part 2</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>It appears that the real problem is php memory. This post seems to echo my problem: <a href="http://www.narfstuff.co.uk/2008/03/14/php-memory-and-wordpress/">php-memory-and-wordpress</a>.</p>
<h3>Previous thought but probably wrong&#8230;</h3>
<p>It appears that in <a title="Visit plugin homepage" href="http://www.hybrid6.com/webgeek/plugins/wp-spamfree">WP-SpamFree</a> 1.9.8.3 breaks <a title="Wordpress" href="http://wordpress.org/">Wordpress</a> 2.7.1. It also appears that <a title="Visit plugin homepage" href="http://w-shadow.com/blog/2007/08/05/broken-link-checker-for-wordpress/">Broken Link Checker</a> 0.4.10 breaks Wordpress 2.7.1 in the same manner.</p>
<p>I upgraded from 2.7 to 2.7.1 and these plugins seems to cause some admin pages to stall i.e. end displaying html before the ending &lt;/body&gt; tag. Case in point, the Tools-&gt;Import page does not completely load when the plugin was activated but does when deactivated.</p>
<p>Just thought I pass this info along.</p>


<p>Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1com' rel='bookmark' title='Permanent Link: Wordpress, PHP Memory, and 1and1.com'>Wordpress, PHP Memory, and 1and1.com</a></li>
<li><a href='http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1-com-part-2' rel='bookmark' title='Permanent Link: Wordpress, PHP Memory, and 1and1.com part 2'>Wordpress, PHP Memory, and 1and1.com part 2</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://curtis.humphreyonline.us/code/wordpress/upgrading-to-wordpress-2-7-1/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Comparing File Download Managers</title>
		<link>http://curtis.humphreyonline.us/code/wordpress/comparing-file-download-managers</link>
		<comments>http://curtis.humphreyonline.us/code/wordpress/comparing-file-download-managers#comments</comments>
		<pubDate>Wed, 21 Jan 2009 15:55:06 +0000</pubDate>
		<dc:creator>Curtis M. Humphrey</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress Download Monitor]]></category>
		<category><![CDATA[Wordpress plugins]]></category>

		<guid isPermaLink="false">http://curtis.humphreyonline.us/?p=34</guid>
		<description><![CDATA[The Objectives:
My objective is to find a WordPress plugin that will allow me to at least do:

display in a post a download (link, picture) to an arbitrary file type
to have the link to the download be neat and nice e.g. /download/filename.type
provide a nice upload tool

Furthermore, it would be nice if added the download code to [...]


Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/wordpress/upgrading-to-wordpress-2-7-1' rel='bookmark' title='Permanent Link: Upgrading Wordpress to 2.7.1'>Upgrading Wordpress to 2.7.1</a></li>
<li><a href='http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1com' rel='bookmark' title='Permanent Link: Wordpress, PHP Memory, and 1and1.com'>Wordpress, PHP Memory, and 1and1.com</a></li>
<li><a href='http://curtis.humphreyonline.us/code/jquery/serialize-function-problem-and-answer' rel='bookmark' title='Permanent Link: A problem with jQuery&#8217;s .serialize() and the answer'>A problem with jQuery&#8217;s .serialize() and the answer</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h2><strong>The Objectives:</strong></h2>
<p>My objective is to find a WordPress plugin that will allow me to at least do:</p>
<ul>
<li>display in a post a download (link, picture) to an arbitrary file type</li>
<li>to have the link to the download be neat and nice e.g. /download/filename.type</li>
<li>provide a nice upload tool</li>
</ul>
<p>Furthermore, it would be nice if added the download code to a post provided nice options like a picture or number of hits&#8230;</p>
<h2><strong>The Search:</strong></h2>
<p>So the hunt begins. I went searching through the plugins and I found the following ones a possible candidates.</p>
<ul>
<li>Wordpress Download Monitor 2.2.3</li>
<li>Attachment Manager 2.0.1</li>
<li>WP-DownloadManager 1.40</li>
</ul>
<h3>Wordpress Download Monitor</h3>
<p>Pros: The plugin has a nice admin download page. It does support nice URLs. It also has a very nice integration with the edit post page.</p>
<p>Cons: It seems to require one to list the acceptable file types. It also puts the download admin page under tools, I would have preferred it under Media.</p>
<h3>Attachment Manager</h3>
<p>Pros: Nice icons to go with the download files.</p>
<p>Cons: Opps, it appears that this one should not have been a candidate for comparison. This one is focused on icons and not really file upload and download.</p>
<h3>WP-DownloadManager</h3>
<p>Pros: It places the admin pages under a new Download section. Not bad but I would still have preferred under Media. It has many nice options under the admin pages and a nice focus on download listing and stats. I however will probably have little download listing pages.</p>
<p>Cons: The download URLis tied to a number and not a title. Who wants a download url to be /download/1231 and not /download/filename.type?</p>
<h2><strong>The Find:</strong></h2>
<p>In conclusion I have found that <a href="http://wordpress.org/extend/plugins/download-monitor/" target="_blank">Wordpress Download Monitor</a> to be the plugin to best match my objectives. If your objectives are the same as mine, then I would recommend using this plugin for your file management needs.</p>


<p>Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/wordpress/upgrading-to-wordpress-2-7-1' rel='bookmark' title='Permanent Link: Upgrading Wordpress to 2.7.1'>Upgrading Wordpress to 2.7.1</a></li>
<li><a href='http://curtis.humphreyonline.us/code/wordpress/wordpress-php-memory-and-1and1com' rel='bookmark' title='Permanent Link: Wordpress, PHP Memory, and 1and1.com'>Wordpress, PHP Memory, and 1and1.com</a></li>
<li><a href='http://curtis.humphreyonline.us/code/jquery/serialize-function-problem-and-answer' rel='bookmark' title='Permanent Link: A problem with jQuery&#8217;s .serialize() and the answer'>A problem with jQuery&#8217;s .serialize() and the answer</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://curtis.humphreyonline.us/code/wordpress/comparing-file-download-managers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A problem with jQuery&#8217;s .serialize() and the answer</title>
		<link>http://curtis.humphreyonline.us/code/jquery/serialize-function-problem-and-answer</link>
		<comments>http://curtis.humphreyonline.us/code/jquery/serialize-function-problem-and-answer#comments</comments>
		<pubDate>Sun, 18 Jan 2009 01:33:16 +0000</pubDate>
		<dc:creator>Curtis M. Humphrey</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://curtis.humphreyonline.us/?p=27</guid>
		<description><![CDATA[I was having a problem with the jQuery .serialize() function and the good news is that I found the answer to this problem.
The Problem
The jQuery .serialize() function was returning &#8220;&#8221; or nothing. Not what I wanted to say the least. Here was the setup. I was using .serialize() like this:

...
$&#40;this&#41;.parents&#40;'.ARow'&#41;.serialize&#40;&#41;
...

and the xhtml was:

&#60;form class=&#34;ARow&#34;&#62;
&#60;input class=&#34;food_state&#34; [...]


Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/jquery/grabbing-a-subsection-of-input-field-values' rel='bookmark' title='Permanent Link: Grabbing a subsection of input field values'>Grabbing a subsection of input field values</a></li>
<li><a href='http://curtis.humphreyonline.us/code/wordpress/comparing-file-download-managers' rel='bookmark' title='Permanent Link: Comparing File Download Managers'>Comparing File Download Managers</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I was having a problem with the <a href="http://jquery.com/" target="_blank">jQuery</a> <a href="http://docs.jquery.com/Ajax/serialize" target="_blank">.serialize()</a> function and the good news is that I found the answer to this problem.</p>
<p><strong>The Problem</strong><br />
The jQuery .serialize() function was returning &#8220;&#8221; or nothing. Not what I wanted to say the least. Here was the setup. I was using .serialize() like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript-jquery" style="font-family:monospace;">...
$<span style="color: #000000;">&#40;</span><span style="color: #009900; font-weight: bold;">this</span><span style="color: #000000;">&#41;</span><span style="color: #000099;">.<span style="color: #000099;">parents</span></span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">'.ARow'</span><span style="color: #000000;">&#41;</span><span style="color: #000099;">.<span style="color: #000099;">serialize</span></span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
...</pre></div></div>

<p>and the xhtml was:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ARow&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;food_state&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;NewFoodState&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;button&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Add New Food State&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span></pre></div></div>

<p><strong>The Answer</strong><br />
The problem was that .serialize() outputted &#8220;&#8221;. The answer was that if an input does not have a &#8220;name&#8221; field then .serialize() skips it. Of course that makes sense but sometime simple reasons can be overlooked. Therefore when the xhtml is updated to:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ARow&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;food_state&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;food_state&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;NewFoodState&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;button&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Add New Food State&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span></pre></div></div>

<p>The output of .serialize() becomes, as desired, &#8220;food_state: raw&#8221;. I hope this helps someone else.</p>
<p>This page is using: [download id="1"]</p>


<p>Related posts:<ol><li><a href='http://curtis.humphreyonline.us/code/jquery/grabbing-a-subsection-of-input-field-values' rel='bookmark' title='Permanent Link: Grabbing a subsection of input field values'>Grabbing a subsection of input field values</a></li>
<li><a href='http://curtis.humphreyonline.us/code/wordpress/comparing-file-download-managers' rel='bookmark' title='Permanent Link: Comparing File Download Managers'>Comparing File Download Managers</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://curtis.humphreyonline.us/code/jquery/serialize-function-problem-and-answer/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
