<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>MLai - Reflecting my Life &#187; Tech Talk</title>
	<atom:link href="http://www.mlai.org/weblog/category/computer-related/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mlai.org/weblog</link>
	<description>This is a place where I can write a little rant and keep it as my notepad.</description>
	<lastBuildDate>Thu, 17 Jun 2010 04:54:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.4" -->
		<copyright>Copyright &#xA9; 2010 MLai - Reflecting my Life </copyright>
		<managingEditor>miltonlai@mlai.org ()</managingEditor>
		<webMaster>miltonlai@mlai.org ()</webMaster>
		<category>posts</category>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>This is a place where I can write a little rant and keep it as my notepad.</itunes:summary>
		<itunes:author></itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name></itunes:name>
			<itunes:email>miltonlai@mlai.org</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://www.mlai.org/weblog/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://www.mlai.org/weblog/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>MLai - Reflecting my Life</title>
			<link>http://www.mlai.org/weblog</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>PHP truncating Sybase varchar results to 255 character limit</title>
		<link>http://www.mlai.org/weblog/2010/06/17/php-truncating-sybase-varchar-results-to-255-character-limit/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=php-truncating-sybase-varchar-results-to-255-character-limit</link>
		<comments>http://www.mlai.org/weblog/2010/06/17/php-truncating-sybase-varchar-results-to-255-character-limit/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 04:54:03 +0000</pubDate>
		<dc:creator>miltonlai</dc:creator>
				<category><![CDATA[Tech Talk]]></category>

		<guid isPermaLink="false">http://www.mlai.org/weblog/?p=358</guid>
		<description><![CDATA[Just re-encountered this issue. If you have a table where there is an attribute of type varchar(2000) for instance (really just anything greater than 255), when you pull it out using sybase_connect, it will only return 255 characters. This is outlined as a bug on php.net. To get around this issue, use a convert to [...]]]></description>
			<content:encoded><![CDATA[<p>Just re-encountered this issue. If you have a table where there is an attribute of type varchar(2000) for instance (really just anything greater than 255), when you pull it out using sybase_connect, it will only return 255 characters. This is outlined as a <a href="http://bugs.php.net/bug.php?id=33221&#038;edit=1">bug</a> on php.net. To get around this issue, use a convert to text or update the attribute to be of type text if you can.</p>
<pre class="brush:sql">
select convert(text, reallybigvarcharattribute) from table
</pre>
<p>Written by Milton Lai</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mlai.org/weblog/2010/06/17/php-truncating-sybase-varchar-results-to-255-character-limit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling PHP with Sybase on Solaris</title>
		<link>http://www.mlai.org/weblog/2010/05/12/compiling-php-with-sybase-on-solaris/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=compiling-php-with-sybase-on-solaris</link>
		<comments>http://www.mlai.org/weblog/2010/05/12/compiling-php-with-sybase-on-solaris/#comments</comments>
		<pubDate>Wed, 12 May 2010 00:08:29 +0000</pubDate>
		<dc:creator>miltonlai</dc:creator>
				<category><![CDATA[Tech Talk]]></category>

		<guid isPermaLink="false">http://www.mlai.org/weblog/?p=353</guid>
		<description><![CDATA[I&#8217;m currently setting up a new server to play with and apart from the usual nightmare of compiling everything and finding all their dependencies and what not, I did hit an issue which I couldn&#8217;t find a clear answer online for. I used the following to configure PHP 5.3.2: ./configure &#8211;with-apxs2=/usr/local/apache2/bin/apxs &#8211;with-gettext &#8211;with-zlib &#8211;with-jpeg-dir &#8211;with-png-dir [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently setting up a new server to play with and apart from the usual nightmare of compiling everything and finding all their dependencies and what not, I did hit an issue which I couldn&#8217;t find a clear answer online for. I used the following to configure PHP 5.3.2:</p>
<p>./configure &#8211;with-apxs2=/usr/local/apache2/bin/apxs &#8211;with-gettext &#8211;with-zlib &#8211;with-jpeg-dir &#8211;with-png-dir &#8211;with-ldap &#8211;with-openssl=/usr/local/ssl &#8211;with-curl &#8211;enable-exif &#8211;enable-ftp &#8211;with-gd &#8211;with-xsl &#8211;with-libxml-dir &#8211;with-libxml-dir &#8211;with-gd &#8211;with-sybase-ct=/home/sybase/sybase64/OCS-15_0</p>
<p>This worked a treat, but it was when I called &#8220;make&#8221; that the following appeared.</p>
<pre>	ld: fatal: library -lcomn: not found
	ld: fatal: library -lct: not found
	ld: fatal: library -lcs: not found
</pre>
<p>The first approach I had was to edit the Makefile that configure creates to change lcomn to lsybcomn, lct to lsybct and lcs to lsybcs. You should be able to notice that within your sybase/OCS-15_0/lib folder, there are files which reflect the later name changes &#8211; libsybcomn.so .<br />
This worked. I then was told (since it was scribbled on a piece of paper somewhere) about sybase/OCS-15_0/scripts/lnsyblibs which creates softlinks with the expected library file names. So now there are a bunch of files looking like libcomn.so -> libsybcomn.so . </p>
<p>Written by Milton Lai</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mlai.org/weblog/2010/05/12/compiling-php-with-sybase-on-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Insufficient heap memory for &#8220;for xml&#8221; queries from Sybase</title>
		<link>http://www.mlai.org/weblog/2010/04/28/insufficient-heap-memory-for-for-xml-queries-from-sybase/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=insufficient-heap-memory-for-for-xml-queries-from-sybase</link>
		<comments>http://www.mlai.org/weblog/2010/04/28/insufficient-heap-memory-for-for-xml-queries-from-sybase/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 02:10:30 +0000</pubDate>
		<dc:creator>miltonlai</dc:creator>
				<category><![CDATA[Tech Talk]]></category>

		<guid isPermaLink="false">http://www.mlai.org/weblog/?p=335</guid>
		<description><![CDATA[We just recently hit the following error from Sybase: &#8220;There is insufficient heap memory to allocate -1562977772 bytes. Please increase configuration parameter &#8216;heap memory per user&#8217; or try again when there is less activity on the system&#8221; when trying to get the results out of Sybase as xml using the &#8220;for xml all&#8221; function. It [...]]]></description>
			<content:encoded><![CDATA[<p>We just recently hit the following error from Sybase:</p>
<p>&#8220;There is insufficient heap memory to allocate -1562977772 bytes. Please increase configuration parameter &#8216;heap memory per user&#8217; or try again when there is less activity on the system&#8221;</p>
<p>when trying to get the results out of Sybase as xml using the &#8220;for xml all&#8221; function. It works fine normally, until your result sets hit over 500 rows or so. This is due to the heap memory space which most people would be reluctant to change &#8211; the query returns your data, by default, as one big row and normally of type TEXT. To get around this, &#8220;for xml option &#8220;incremental=yes root=yes&#8221;" will set each row of results as a separate row coming back. This means that instead of a huge chunk of TEXT coming back, it&#8217;ll appear like a normal record set, but instead of the normal data, it&#8217;ll appear as xml data. </p>
<p>For more information on XML for Sybase head to <a href="http://manuals.sybase.com/onlinebooks/group-as/asg1251e/xmlb/@Generic__BookTextView/4521">http://manuals.sybase.com/onlinebooks/group-as/asg1251e/xmlb/@Generic__BookTextView/4521</a>. The following section is taken from that page and helps explain the &#8220;incremental&#8221; option.</p>
<p>The result set that a for_xml_select statement returns depends on the incremental option:</p>
<p style="text-indent: 2em;">incremental = no returns a result set containing a single row and a single column. The column datatype is text. The value of that text column is the SQLX-XML representation of the result of the basic select statement. This is the <strong>default</strong> option.</p>
<p style="text-indent: 2em;">incremental = yes returns a result set containing a row for each row of the basic select statement. If the root option specifies yes (the default option), an initial row specifies the opening XML root element, and a final row specifies the closing XML root element.</p>
<p>      For example, these select statements return <strong>two, one, two, and four rows</strong>, respectively:</p>
<pre class="brush:sql">
select 11, 12 union select 21, 22
select 11, 12 union select 21, 22 for xml
select 11, 12 union select 21, 22 for xml option "incremental=yes root=no"
select 11, 12 union select 21, 22 for xml option "incremental=yes root=yes"
</pre>
<p>Written by Milton Lai.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mlai.org/weblog/2010/04/28/insufficient-heap-memory-for-for-xml-queries-from-sybase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Refactoring</title>
		<link>http://www.mlai.org/weblog/2009/11/30/refactoring/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=refactoring</link>
		<comments>http://www.mlai.org/weblog/2009/11/30/refactoring/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 20:56:32 +0000</pubDate>
		<dc:creator>miltonlai</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Tech Talk]]></category>

		<guid isPermaLink="false">http://www.mlai.org/weblog/?p=265</guid>
		<description><![CDATA[The past few weeks have been a bit intense with work and personal projects, I&#8217;ve been at the keyboard quite a far bit to get my first real app out. I&#8217;ll have another post later on, closer to the date when I can actually release it. Of course, it won&#8217;t be the cleanest release, but [...]]]></description>
			<content:encoded><![CDATA[<p>The past few weeks have been a bit intense with work and personal projects, I&#8217;ve been at the keyboard quite a far bit to get my first real app out. I&#8217;ll have another post later on, closer to the date when I can actually release it. Of course, it won&#8217;t be the cleanest release, but there will be regular updates (in fact that means I need an updating mechanism which will make life easier for the people who do end up using the software). I&#8217;ve spent a bit of time refactoring my current project before I started the new tasks. I felt that there was a bit of code smell and well as performance issues. One simple example would be to create a local instance for any values which are calculated within loops. </p>
<pre class="brush:rb">
dim a(100) as string
for i = 0 to Ubound(a)
	//do something
next
</pre>
<p>Instead of doing that, it would make the loop just a tad bit faster by creating j to be the value of Ubound(a) UNLESS of course, you are changing the length of the array within the loop itself (which I then recommend at least changing the for loop from going &#8220;to&#8221; to &#8220;downto&#8221;. This step also allows for you to run through the debugger and find out what j is at that particular time.</p>
<pre class="brush:rb">
dim a(100) as string
dim i as integer = 0
dim j as integer = Ubound(a)
for i = 0 to j
	//do something
next
</pre>
<p>OR if you are changing the number of elements to the array</p>
<pre class="brush:rb">
dim a(100) as string
dim i as integer = 0
dim j as integer = Ubound(a)
for i = j  downto 0
	if a(i) <> nil then
		if a(i) <> "aaa" then
			a(i).remove
		end
	end
next
</pre>
<p>I&#8217;ve got an app which demonstrates small changes to your code which will improve your performance (if you haven&#8217;t adopted these practices already). I used it as a demonstration at work and it is similar to what was presented at the REALBasic Summit. I&#8217;ll upload that in time. </p>
<p>I&#8217;ve just put down a deposit to get a new mountain bike (Kona Caldera 2009 model) from the Bike Barn out at Paramatta. They were having a sale on Kona 09 models and so I picked it up for $1000. I&#8217;ll get it at the end of the work and give it a work out then. </p>
<p>Written by Milton Lai</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mlai.org/weblog/2009/11/30/refactoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REALBasic Summit &#8211; Boulder, Colorado</title>
		<link>http://www.mlai.org/weblog/2009/09/29/realbasic-summit-boulder-colorado/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=realbasic-summit-boulder-colorado</link>
		<comments>http://www.mlai.org/weblog/2009/09/29/realbasic-summit-boulder-colorado/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 01:24:15 +0000</pubDate>
		<dc:creator>miltonlai</dc:creator>
				<category><![CDATA[Tech Talk]]></category>

		<guid isPermaLink="false">http://www.mlai.org/weblog/?p=256</guid>
		<description><![CDATA[This summit ran between the 24th and 26th of September. Hosted by InspiringApps in conjunction with ARBP and held in Boulder, Colorado. This town is a great place to visit, especially when you&#8217;re into anything outdoors (except for surfing &#8211; although there was a surfing diner somewhere in Boulder). The sessions that ran were all [...]]]></description>
			<content:encoded><![CDATA[<p>This summit ran between the 24th and 26th of September. Hosted by <a href="http://www.inspiringapps.com/">InspiringApps</a> in conjunction with ARBP and held in Boulder, Colorado. This town is a great place to visit, especially when you&#8217;re into anything outdoors (except for surfing &#8211; although there was a surfing diner somewhere in Boulder).<br />
The sessions that ran were all quite relevant to almost everything that I do, and of course, some more than others. </p>
<p>
<a href="http://www.mlai.org/weblog/wp-content/gallery/rbsummit/psrb01.jpg" title="" class="shutterset_singlepic181" >
	<img class="ngg-singlepic" src="http://www.mlai.org/weblog/wp-content/gallery/cache/181__690x_psrb01.jpg" alt="psrb01" title="psrb01" />
</a>
<br />
The view from <a href="http://www.stjulien.com/">St. Julien Hotel &#038; Spa</a>.</p>
<p>
<a href="http://www.mlai.org/weblog/wp-content/gallery/rbsummit/psrb12.jpg" title="" class="shutterset_singlepic194" >
	<img class="ngg-singlepic" src="http://www.mlai.org/weblog/wp-content/gallery/cache/194__690x_psrb12.jpg" alt="psrb12" title="psrb12" />
</a>
<br />
InspiringApps</p>
<p>
<a href="http://www.mlai.org/weblog/wp-content/gallery/rbsummit/psrb02.jpg" title="" class="shutterset_singlepic182" >
	<img class="ngg-singlepic" src="http://www.mlai.org/weblog/wp-content/gallery/cache/182__690x_psrb02.jpg" alt="psrb02" title="psrb02" />
</a>
<br />
Reporting Tools, Options, and Techniques &#8211; Bob Keeney</p>
<p>
<a href="http://www.mlai.org/weblog/wp-content/gallery/rbsummit/psrb03.jpg" title="" class="shutterset_singlepic183" >
	<img class="ngg-singlepic" src="http://www.mlai.org/weblog/wp-content/gallery/cache/183__690x_psrb03.jpg" alt="psrb03" title="psrb03" />
</a>
<br />
Cocoa and Reporting Features in REALbasic &#8211; Geoff Perlman</p>
<p>
<a href="http://www.mlai.org/weblog/wp-content/gallery/rbsummit/psrb04.jpg" title="" class="shutterset_singlepic184" >
	<img class="ngg-singlepic" src="http://www.mlai.org/weblog/wp-content/gallery/cache/184__690x_psrb04.jpg" alt="psrb04" title="psrb04" />
</a>
<br />
SQLite Power Tools &#8211; Ryan Vail</p>
<p>
<a href="http://www.mlai.org/weblog/wp-content/gallery/rbsummit/psrb05.jpg" title="" class="shutterset_singlepic185" >
	<img class="ngg-singlepic" src="http://www.mlai.org/weblog/wp-content/gallery/cache/185__690x_psrb05.jpg" alt="psrb05" title="psrb05" />
</a>
<br />
OO Database Framework and Introspection &#8211; Seth Verrinder</p>
<p>
<a href="http://www.mlai.org/weblog/wp-content/gallery/rbsummit/psrb06.jpg" title="" class="shutterset_singlepic186" >
	<img class="ngg-singlepic" src="http://www.mlai.org/weblog/wp-content/gallery/cache/186__690x_psrb06.jpg" alt="psrb06" title="psrb06" />
</a>
<br />
Profiling and Performance Tweaking &#8211; Joe Strout</p>
<p>
<a href="http://www.mlai.org/weblog/wp-content/gallery/rbsummit/psrb07.jpg" title="" class="shutterset_singlepic187" >
	<img class="ngg-singlepic" src="http://www.mlai.org/weblog/wp-content/gallery/cache/187__690x_psrb07.jpg" alt="psrb07" title="psrb07" />
</a>
<br />
Version Control, And Why it Rocks &#8211; Aaron Gerber and Mathias Gran</p>
<p>
<a href="http://www.mlai.org/weblog/wp-content/gallery/rbsummit/psrb09.jpg" title="" class="shutterset_singlepic189" >
	<img class="ngg-singlepic" src="http://www.mlai.org/weblog/wp-content/gallery/cache/189__690x_psrb09.jpg" alt="psrb09" title="psrb09" />
</a>
<br />
Building REALbasic Plugins &#8211; Christian Schmitz</p>
<p>
<a href="http://www.mlai.org/weblog/wp-content/gallery/rbsummit/psrb10.jpg" title="" class="shutterset_singlepic190" >
	<img class="ngg-singlepic" src="http://www.mlai.org/weblog/wp-content/gallery/cache/190__690x_psrb10.jpg" alt="psrb10" title="psrb10" />
</a>
<br />
Usability &#038; Design Techniques &#8211; Jay Crain</p>
<p>
<a href="http://www.mlai.org/weblog/wp-content/gallery/rbsummit/psrb11.jpg" title="" class="shutterset_singlepic191" >
	<img class="ngg-singlepic" src="http://www.mlai.org/weblog/wp-content/gallery/cache/191__690x_psrb11.jpg" alt="psrb11" title="psrb11" />
</a>
<br />
Facilitated RB/RS/Summit Feedback Session &#8211; Brad Weber</p>
<p>
<a href="http://www.mlai.org/weblog/wp-content/gallery/rbsummit/psrb13.jpg" title="" class="shutterset_singlepic195" >
	<img class="ngg-singlepic" src="http://www.mlai.org/weblog/wp-content/gallery/cache/195__690x_psrb13.jpg" alt="psrb13" title="psrb13" />
</a>
<br />
The few remaining members on the final day up in Estes Park.<br />
Milton Lai, Seth Verrinder, <a href="http://www.fwroller.com/">Frederick W. Roller</a>, Rick, <a href="http://www.macsos.com.au/">Gerard Hammond</a>, <a href="http://www.bkeeney.com/">Bob Keeney</a>, Norman Palardy</p>
<p>Written by Milton Lai</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mlai.org/weblog/2009/09/29/realbasic-summit-boulder-colorado/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
