<?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</title>
	<atom:link href="http://www.mlai.org/weblog/feed/rss/" 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; MLai - Reflecting my Life 2010 </copyright>
		<managingEditor>miltonlai@mlai.org (MLai - Reflecting my Life)</managingEditor>
		<webMaster>miltonlai@mlai.org (MLai - Reflecting my Life)</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>MLai - Reflecting my Life</itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name>MLai - Reflecting my Life</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>Finally Graduated!</title>
		<link>http://www.mlai.org/weblog/2010/05/19/finally-graduated/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=finally-graduated</link>
		<comments>http://www.mlai.org/weblog/2010/05/19/finally-graduated/#comments</comments>
		<pubDate>Tue, 18 May 2010 23:17:21 +0000</pubDate>
		<dc:creator>miltonlai</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.mlai.org/weblog/?p=355</guid>
		<description><![CDATA[I&#8217;m finally free of all studies! Graduation was a couple weeks ago now, but the photos took its time to get to me, not that I&#8217;m pointing my finger at anyone in particular. I&#8217;ve now graduated with a Bachelor of Science in Information Technology with a Diploma in Information Technology Professional Practice. 2 years too [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m finally free of all studies! Graduation was a couple weeks ago now, but the photos took its time to get to me, not that I&#8217;m pointing my finger at anyone in particular. I&#8217;ve now graduated with a Bachelor of Science in Information Technology with a Diploma in Information Technology Professional Practice. 2 years too long since I took on the final couple years as a part time student.</p>
<p>I spent a whole day at Sydney Uni a week later with a couple mates who were also graduating. One is on his way to France for a year and the other has suffered a fracture to his spine and currently in hospital.</p>
<p>I don&#8217;t think I mentioned this at any earlier point, but I purchased an apartment a month ago now at an auction and currently awaiting settlement (which will be in a couple weeks time). There is just so much to arrange in terms of renovations and having to deal with the strata managers just take an awful amount of time. I&#8217;ll hope that soon enough photos of my place will start appearing with my small renovations &#8211; floorboards/painting/opening up a doorway and anything else I can afford at the moment.</p>

<div class="ngg-galleryoverview" id="ngg-gallery-27-355">


	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://www.mlai.org/weblog/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=27&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-266" class="ngg-gallery-thumbnail-box" style="width:100%;" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mlai.org/weblog/wp-content/gallery/graduation/psmlgrad01.jpg" title=" " class="shutterset_set_27" >
								<img title="psmlgrad01" alt="psmlgrad01" src="http://www.mlai.org/weblog/wp-content/gallery/graduation/thumbs/thumbs_psmlgrad01.jpg" width="690" height="489" />
							</a>
		</div>
	</div>
	
				<br style="clear: both" />
	
 		
	<div id="ngg-image-271" class="ngg-gallery-thumbnail-box" style="width:100%;" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mlai.org/weblog/wp-content/gallery/graduation/psmlgrad02.jpg" title=" " class="shutterset_set_27" >
								<img title="psmlgrad02" alt="psmlgrad02" src="http://www.mlai.org/weblog/wp-content/gallery/graduation/thumbs/thumbs_psmlgrad02.jpg" width="690" height="1076" />
							</a>
		</div>
	</div>
	
				<br style="clear: both" />
	
 		
	<div id="ngg-image-268" class="ngg-gallery-thumbnail-box" style="width:100%;" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mlai.org/weblog/wp-content/gallery/graduation/psmlgrad03.jpg" title=" " class="shutterset_set_27" >
								<img title="psmlgrad03" alt="psmlgrad03" src="http://www.mlai.org/weblog/wp-content/gallery/graduation/thumbs/thumbs_psmlgrad03.jpg" width="690" height="492" />
							</a>
		</div>
	</div>
	
				<br style="clear: both" />
	
 		
	<div id="ngg-image-269" class="ngg-gallery-thumbnail-box" style="width:100%;" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mlai.org/weblog/wp-content/gallery/graduation/psmlgrad04.jpg" title=" " class="shutterset_set_27" >
								<img title="psmlgrad04" alt="psmlgrad04" src="http://www.mlai.org/weblog/wp-content/gallery/graduation/thumbs/thumbs_psmlgrad04.jpg" width="690" height="1076" />
							</a>
		</div>
	</div>
	
				<br style="clear: both" />
	
 	 	
	<!-- Pagination -->
 	<div class="ngg-clear"></div> 	
</div>


<p>Written by Milton Lai</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mlai.org/weblog/2010/05/19/finally-graduated/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>Birthday &#8211; Parkour</title>
		<link>http://www.mlai.org/weblog/2010/05/02/birthday-parkour/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=birthday-parkour</link>
		<comments>http://www.mlai.org/weblog/2010/05/02/birthday-parkour/#comments</comments>
		<pubDate>Sun, 02 May 2010 07:19:20 +0000</pubDate>
		<dc:creator>miltonlai</dc:creator>
				<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.mlai.org/weblog/?p=351</guid>
		<description><![CDATA[A few quick photos from the weekend. Photos by Milton Lai]]></description>
			<content:encoded><![CDATA[<p>A few quick photos from the weekend.<br />

<div class="ngg-galleryoverview" id="ngg-gallery-26-351">


	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://www.mlai.org/weblog/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=26&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-258" class="ngg-gallery-thumbnail-box" style="width:100%;" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mlai.org/weblog/wp-content/gallery/sammysbirthday2010/pssammy101.jpg" title=" " class="shutterset_set_26" >
								<img title="pssammy101" alt="pssammy101" src="http://www.mlai.org/weblog/wp-content/gallery/sammysbirthday2010/thumbs/thumbs_pssammy101.jpg" width="690" height="492" />
							</a>
		</div>
	</div>
	
				<br style="clear: both" />
	
 		
	<div id="ngg-image-259" class="ngg-gallery-thumbnail-box" style="width:100%;" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mlai.org/weblog/wp-content/gallery/sammysbirthday2010/pssammy102.jpg" title=" " class="shutterset_set_26" >
								<img title="pssammy102" alt="pssammy102" src="http://www.mlai.org/weblog/wp-content/gallery/sammysbirthday2010/thumbs/thumbs_pssammy102.jpg" width="690" height="492" />
							</a>
		</div>
	</div>
	
				<br style="clear: both" />
	
 		
	<div id="ngg-image-260" class="ngg-gallery-thumbnail-box" style="width:100%;" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.mlai.org/weblog/wp-content/gallery/sammysbirthday2010/pssammy103.jpg" title=" " class="shutterset_set_26" >
								<img title="pssammy103" alt="pssammy103" src="http://www.mlai.org/weblog/wp-content/gallery/sammysbirthday2010/thumbs/thumbs_pssammy103.jpg" width="690" height="492" />
							</a>
		</div>
	</div>
	
				<br style="clear: both" />
	
 	 	
	<!-- Pagination -->
 	<div class="ngg-clear"></div> 	
</div>

<br />
Photos by Milton Lai</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mlai.org/weblog/2010/05/02/birthday-parkour/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>
	</channel>
</rss>
