<?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>Tech Blog &#187; Coding</title>
	<atom:link href="http://informationideas.com/news/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://informationideas.com/news</link>
	<description>Using technology to help your business</description>
	<lastBuildDate>Sat, 17 Mar 2012 02:14:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Codeigniter header already sent error using json header</title>
		<link>http://informationideas.com/news/2011/12/05/codeigniter-header-already-sent-error-using-json-header/</link>
		<comments>http://informationideas.com/news/2011/12/05/codeigniter-header-already-sent-error-using-json-header/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 06:39:43 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=209</guid>
		<description><![CDATA[Getting this error when moving from development server to staging server and getting this error. Severity: Warning --&#62; Cannot modify header information - headers already sent The error shows up if you are doing all of the following. 1. Change header using $this-&#62;output-&#62;set_content_type('application/json'); 2. Outputting using echo (which is not recommended by Codeigniter). 3. In [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>Getting this error when moving from development server to staging server and getting this error.</p>
<p>Severity: Warning --&gt; Cannot modify header information - headers already sent</p>
<p>The error shows up if you are doing all of the following.</p>
<p>1. Change header using</p>
<blockquote><p>$this-&gt;output-&gt;set_content_type('application/json');</p></blockquote>
<p>2. Outputting using echo (which is not recommended by Codeigniter).</p>
<p>3. In php.ini, have output_buffering set very small, like 0.</p>
<p><strong>Solution</strong></p>
<p>There are two solutions to this issue.</p>
<p>1. Increase the output_buffering enough so to buffer your echo. (this is a hack)</p>
<p>2. Recommended solution is to replace echo with CIs built in $this-&gt;output-&gt;set_output('content') method.</p>
<div class="shr-publisher-209"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2011/12/05/codeigniter-header-already-sent-error-using-json-header/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android making https requests with SSL from GoDaddy &#8211; No peer certificate error</title>
		<link>http://informationideas.com/news/2011/11/29/android-making-https-requests-with-ssl-from-godaddy-no-peer-certificate-error/</link>
		<comments>http://informationideas.com/news/2011/11/29/android-making-https-requests-with-ssl-from-godaddy-no-peer-certificate-error/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 00:00:08 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=201</guid>
		<description><![CDATA[Another hair pulling session that all ended well. Task: Make a secure call to a server using a httprequest and get the httpresponse for further processing. Android http request and response: HttpClient client = new DefaultHttpClient(); HttpGet req = new HttpGet("https://www.example.com"); HttpResponse res = client.execute(req); Error: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate Problem: The issue is that [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>Another hair pulling session that all ended well.</p>
<p><strong>Task:</strong></p>
<p>Make a secure call to a server using a httprequest and get the httpresponse for further processing.</p>
<p><strong>Android http request and response:</strong></p>
<blockquote>
<pre>HttpClient client = new DefaultHttpClient();
HttpGet req = new HttpGet("https://www.example.com");
HttpResponse res = client.execute(req);</pre>
</blockquote>
<p><strong>Error:</strong></p>
<p>javax.net.ssl.SSLPeerUnverifiedException: No peer certificate</p>
<p><strong>Problem:</strong></p>
<p>The issue is that cert from GoDaddy was installed but not installed completely. An Intermediate cert is required for the server/domain in order to have a fully installed cert.</p>
<p><strong>Reference:</strong></p>
<p><strong><a href="http://community.godaddy.com/help/5238">http://community.godaddy.com/help/5238</a><br />
</strong></p>
<div class="shr-publisher-201"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2011/11/29/android-making-https-requests-with-ssl-from-godaddy-no-peer-certificate-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Codeigniter running into some major growth issues</title>
		<link>http://informationideas.com/news/2011/11/01/codeigniter-running-into-some-major-growth-issues/</link>
		<comments>http://informationideas.com/news/2011/11/01/codeigniter-running-into-some-major-growth-issues/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 00:04:23 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[our development]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=191</guid>
		<description><![CDATA[I have been using Codeigniter for a while on many projects and it had been very useful as it is non-intrusive. Its very small footprint also allows for the extremely good performance on page loads. However, these projects were simply using just the CI core and not implementing any plugins. Some base classes have been [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>I have been using <a title="Codeigniter" href="http://codeigniter.com">Codeigniter</a> for a while on many projects and it had been very useful as it is non-intrusive. Its very small footprint also allows for the extremely good performance on page loads. However, these projects were simply using just the CI core and not implementing any plugins. Some base classes have been extended, but purely specifically for the individual project so not causing any conflict with other code.</p>
<p>Recently, I started building a startup project using CI and would like to employ more plugins do speed up development. Pleasantly surprised, I found that CI had implemented <a title="Sparks" href="http://getsparks.org">Sparks</a> for searching and installing plugins to CI. Great right! So I implemented an ORM called DataMapper and it was brilliant.</p>
<p>Here comes the reality check. After upgrading from CI 2.0.2 to 2.0.3, everything broke. Why? Because CI changed a lot of methods within its core classes from public to protected. That of course is not actually a bad thing as it was in fact incorrectly implemented before allowing a developer to mess with core functionality too much. However, through researching into these issues, I came to a huge realization that I missed about CI before. CI only allows plugins and developers to modify core classes by extending them into MY_core_class.php. If multiple plugins need to extended the same class, even if they need to overload different methods, it requires some code merging by the developer. If the plugins need to overload the same method in the same core class, that becomes a huge undertaking for the developer to understand what each plugin is trying to do and write merged code that works for both in the same overloaded method.</p>
<p>After that realization, I have determined that CI is fine for applications that are going to use mainly the core classes. If you intend to implement plugins, be very careful understanding what core classes each one will extend. Choose wisely. If those requirements cannot be met, look for another framework.</p>
<div class="shr-publisher-191"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2011/11/01/codeigniter-running-into-some-major-growth-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code debt accumulating interest</title>
		<link>http://informationideas.com/news/2011/10/28/code-debt-accumulating-interest/</link>
		<comments>http://informationideas.com/news/2011/10/28/code-debt-accumulating-interest/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 03:53:56 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=188</guid>
		<description><![CDATA[I get into this trap a little too often. I know there is some code that is not written correctly but for the sake of moving along, I ignore it temporarily with the intention of going back to refactor later on. Of course it is not something that is broken, but just poor convention and [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>I get into this trap a little too often. I know there is some code that is not written correctly but for the sake of moving along, I ignore it temporarily with the intention of going back to refactor later on. Of course it is not something that is broken, but just poor convention and naming type of stuff. As I build more on top of that, whatever mess that was there before begins to infiltrate into new code through the use of those classes. If I extend upon them, it opens even a greater can of worms.</p>
<p>A friend had talked about code debt before and it speaks so true to these situations. Code debt will incur interest over time if not paid up. The longer you wait, the more expensive the payoff becomes. So just how I like to be financially debt-free, I should strive for code debt-free also.</p>
<div class="shr-publisher-188"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2011/10/28/code-debt-accumulating-interest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running stored procedures on MSSQL via any language on Linux</title>
		<link>http://informationideas.com/news/2011/03/11/running-stored-procedures-on-mssql-via-any-language-on-linux/</link>
		<comments>http://informationideas.com/news/2011/03/11/running-stored-procedures-on-mssql-via-any-language-on-linux/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 23:48:14 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[MSSql]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=170</guid>
		<description><![CDATA[If you need to run store procedures on Microsoft SQL Server on perl, php, ruby, etc., you need to configure /etc/freetds/freetds.conf with the server connection information. Specifically, specify the tds version to be 8.0. Something like the following. /etc/freetds/freetds.conf [Server80] host = domain.com port = 1433 tds version = 8.0 Connection to the server via [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>If you need to run store procedures on Microsoft SQL Server on perl, php, ruby, etc., you need to configure /etc/freetds/freetds.conf with the server connection information. Specifically, specify the tds version to be 8.0. Something like the following.</p>
<p>/etc/freetds/freetds.conf<br />
<code><br />
[Server80]<br />
        host = domain.com<br />
        port = 1433<br />
        tds version = 8.0<br />
</code></p>
<p>Connection to the server via php would look like this.<br />
<code><br />
$link = mssql_connect("Server80", "user", "pass");<br />
</code></p>
<div class="shr-publisher-170"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2011/03/11/running-stored-procedures-on-mssql-via-any-language-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sphinx Search default limit is 20</title>
		<link>http://informationideas.com/news/2009/10/02/sphinx-search-default-limit-is-20/</link>
		<comments>http://informationideas.com/news/2009/10/02/sphinx-search-default-limit-is-20/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 04:30:09 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Sphinx]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=112</guid>
		<description><![CDATA[When using the sphinx api, you must use SetLimts if you want more than 20 records.  Currently, it is not documented on the sphinx api doc.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>When using the sphinx api, you must use SetLimts if you want more than 20 records.  Currently, it is not documented on the <a href="http://www.sphinxsearch.com/wiki/doku.php?id=php_api_docs">sphinx api doc</a>.</p>
<div class="shr-publisher-112"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2009/10/02/sphinx-search-default-limit-is-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google maps info window size problem with images</title>
		<link>http://informationideas.com/news/2009/06/08/google-maps-info-window-size-problem-with-images/</link>
		<comments>http://informationideas.com/news/2009/06/08/google-maps-info-window-size-problem-with-images/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 03:02:12 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[google maps]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=101</guid>
		<description><![CDATA[One strange thing when using Google Maps API with pictures in the info window is that sometimes the window is not tall enough to enclose all the content. It overflows the white info window background. The problems is because Google maps API tries to calculate the height of all the content while the photos are [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>One strange thing when using Google Maps API with pictures in the info window is that sometimes the window is not tall enough to enclose all the content.  It overflows the white info window background.  The problems is because Google maps API tries to calculate the height of all the content while the photos are being pulled by other http requests.  They are asynchronous and the photos might take longer to load than it takes for Google Maps API to determine what the height of the info window should be.  It has been said that setting the height of the element would give Gmaps a hint as to how tall the photos might be and adjust accordingly.  So doing something like the following would help.</p>
<blockquote><p>&lt;img src="pic.jpg" height="80" /&gt;</p></blockquote>
<p>Also, if you are using any sort of table or div containers for the image, it would also help to specify the height of the container element to make sure Gmaps knows to account for it.</p>
<blockquote><p>&lt;table&gt;<br />
&lt;tr height="80"&gt;<br />
&lt;td&gt;<br />
&lt;img src="pic.jpg" height="80" /&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;</p></blockquote>
<p>Hope that helps you solve this little problem.</p>
<div class="shr-publisher-101"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2009/06/08/google-maps-info-window-size-problem-with-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>asp.net formview problem updating data</title>
		<link>http://informationideas.com/news/2009/01/22/aspnet-formview-problem-updating-data/</link>
		<comments>http://informationideas.com/news/2009/01/22/aspnet-formview-problem-updating-data/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 06:47:09 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[formview]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=73</guid>
		<description><![CDATA[Very strange behavior with formviews on asp.net.Â  For some reason, if I declare the SqlDataSource on the page source but then do the binding of the SqlDataSource to the formview in code behind, no error are shown but the data does NOT get updated on edit. So instead of doing this in code behind summary.DataSourceID [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>Very strange behavior with formviews on asp.net.Â  For some reason, if I declare the SqlDataSource on the page source but then do the binding of the SqlDataSource to the formview in code behind, no error are shown but the data does NOT get updated on edit.</p>
<p>So instead of doing this in code behind<br />
<code><br />
summary.DataSourceID = "summaryDS";<br />
summary.DataBind();<br />
</code></p>
<p>I need to do this on the page<br />
<code><br />
&lt;asp :FormView ID="summary"<br />
runat="server"<br />
DataSourceID="summaryDS"&gt;<br />
</code></p>
<p><a href="http://informationideas.com/news/2008/07/29/net-formview-edit-mode-problem/">A previous problem I encountered with formview</a></p>
<div class="shr-publisher-73"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2009/01/22/aspnet-formview-problem-updating-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Develop and Debug &#8211; Android On A G1</title>
		<link>http://informationideas.com/news/2009/01/14/develop-and-debug-android-on-a-g1/</link>
		<comments>http://informationideas.com/news/2009/01/14/develop-and-debug-android-on-a-g1/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 05:47:17 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=71</guid>
		<description><![CDATA[Develop and Debug - Android. This is a great way to debug your Android app on a G1 or any Android driven device via USB.Â  It is a much better way to go than the emulator if you have the resources.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p><a href="http://code.google.com/android/intro/develop-and-debug.html#developingondevicehardware">Develop and Debug - Android</a>.</p>
<p>This is a great way to debug your Android app on a G1 or any Android driven device via USB.Â  It is a much better way to go than the emulator if you have the resources.</p>
<div class="shr-publisher-71"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2009/01/14/develop-and-debug-android-on-a-g1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update Delayed on Mysql and PHP</title>
		<link>http://informationideas.com/news/2008/12/11/update-delayed-on-mysql-and-php/</link>
		<comments>http://informationideas.com/news/2008/12/11/update-delayed-on-mysql-and-php/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 23:10:12 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[update delayed]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=68</guid>
		<description><![CDATA[Wouldn't it be nice if we could use UPDATE DELAYED in mysql just like we do use INSERT DELAYED? Unfortunately, the work around mysql created for this is to insert a record into the events table in order to separate UPDATE statement into another thread. There is a large overhead to inserting to then execute [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>Wouldn't it be nice if we could use UPDATE DELAYED in mysql just like we do use INSERT DELAYED?  Unfortunately, the work around mysql created for this is to insert a record into the events table in order to separate UPDATE statement into another thread.  There is a large overhead to inserting to then execute an update.</p>
<p>If you are using PHP with mysql, there is another work around.Â  PHP has a function called, register_shutdown_function, which will execute a function during the shutdown of processing a script file.  So if we add an UPDATE LOW_PRIORITY sql statement wrapped in a function that is passed to register_shutdown_function, we can allow the user to receive the page without delay while the UPDATE statement waits until all locks on the table has been release before proceeding.<br />
<code><br />
function update_delayed()<br />
{<br />
    $sql = "UPDATE LOW_PRIORITY table_name SET col1 = 'something'";<br />
    mysql_query($sql, $conn);<br />
}</p>
<p>register_shutdown_function('update_delayed');<br />
</code></p>
<p>I wonder if there are even better ways to handle this problem.</p>
<div class="shr-publisher-68"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2008/12/11/update-delayed-on-mysql-and-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.415 seconds -->

