<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>WYSIWYG.. &#187; Koding</title>
	<atom:link href="http://unluckyluke.wordpress.com/category/koding/feed/" rel="self" type="application/rss+xml" />
	<link>http://unluckyluke.wordpress.com</link>
	<description>What You See Is[not always] What You Get</description>
	<lastBuildDate>Tue, 24 Nov 2009 14:39:36 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='unluckyluke.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/f025501d2245b78c1c28d1dc526016c0?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>WYSIWYG.. &#187; Koding</title>
		<link>http://unluckyluke.wordpress.com</link>
	</image>
			<item>
		<title>Case: Upload, Validate, dan max_execution_time</title>
		<link>http://unluckyluke.wordpress.com/2009/02/19/case-upload-validate-dan-max_execution_time/</link>
		<comments>http://unluckyluke.wordpress.com/2009/02/19/case-upload-validate-dan-max_execution_time/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 10:55:09 +0000</pubDate>
		<dc:creator>Furqon</dc:creator>
				<category><![CDATA[Belajar]]></category>
		<category><![CDATA[Koding]]></category>

		<guid isPermaLink="false">http://unluckyluke.wordpress.com/?p=117</guid>
		<description><![CDATA[Tulisan kali ini tidak secara khusus menjelaskan tiga proses yang telah disebutkan dalam judul. Kali ini gw coba berbagi satu kasus berkaitan dengan ketiganya. Kurang lebih kasus yang dihadapi adalah seperti ini:

upload batch file berkestensi .txt,
membaca per-baris file yang diupload, memvalidasi, dan insert ke dalam table
batasan max_execution_time.

Bisakah pirsawan bayangkan gimana kalau data yang diupload itu misalnya [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=117&subd=unluckyluke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Tulisan kali ini tidak secara khusus menjelaskan tiga proses yang telah disebutkan dalam judul. Kali ini gw coba berbagi satu kasus berkaitan dengan ketiganya. Kurang lebih kasus yang dihadapi adalah seperti ini:</p>
<ol>
<li>upload batch file berkestensi .txt,</li>
<li>membaca per-baris file yang diupload, memvalidasi, dan insert ke dalam table</li>
<li>batasan <a title="max_execution_time" href="http://www.google.com" target="_blank">max_execution_time</a>.</li>
</ol>
<p>Bisakah pirsawan bayangkan gimana kalau data yang diupload itu misalnya terdiri lebih dari 100.000 baris kemudian akan kita entri ke dalam database, dengan kriteria macam-macam yang mengakibatkan setiap baris yang akan di entri ke dalam database harus divalidasi, kemudian dicatatkan log berhasil tidaknya dst.. Sangat besar kemungkinan sebelum program kita mencapai baris ke 100.000, program kita akan berhenti karena kehabisan nafas. timeout, halt, modyar.</p>
<p>Nah kali ini, saya mau berbagi kali aja ada yang mau nangkep. Ide besarnya adalah membagi 100.000 baris data tadi kedalam segmen-segmen kecil sehingga tiap segmen behasil dieksekusi tanpa mengakibatkan program validasi kita kehabisan nafas.</p>
<p>Berikut pseudocode-nya.</p>
<ol>
<li>form upload: user upload file .txt,</li>
<li>submit: file diupload ke dalam satu folder tertentu.,</li>
<li>segera setelah data berhasil diupload, jalankan script untuk membaca file,
<ul>
<li>baca panjang baris data (  while( fgets() ) $i++   )</li>
<li>tentukan jumlah baris paling aman, sehingga proses validasi tidak <em>halt </em>(sebut satu segmen, misal 1000 baris)</li>
<li>mulai baca  perbaris data sampai batas atas segmen</li>
<li>ketika mencapai ujung  segmen, stop pembacaan</li>
<li>kembalikan ke view (buat pesan sesuai selera) panggil fungsi untuk membaca segmen ke 2.</li>
<li>lakukan hingga program membaca baris paling akhir</li>
</ul>
</li>
<li>ketika pembacaan berakhir beri user kabar gembira, entri telah berhasil</li>
</ol>
<p>Cara di atas menggunakan ajax sehingga proses eksekusi antar segmen bisa berlangsung. Ketika satu segmen telah selesai dibaca, lakukan eksekusi fungsi melalui ajax dengan parameter (segment, namafile dst).</p>
<p>Sok atuh kalo ada yang mau tanya.. dari gaya tulisnya sih.. musti banyak yang dipertanyakan.. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="attachment_128" class="wp-caption aligncenter" style="width: 510px"><img class="size-full wp-image-128" title="upload" src="http://unluckyluke.files.wordpress.com/2009/02/upload.png?w=500&#038;h=220" alt="UI upload,validate" width="500" height="220" /><p class="wp-caption-text">UI upload,validate</p></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unluckyluke.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unluckyluke.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unluckyluke.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unluckyluke.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unluckyluke.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unluckyluke.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unluckyluke.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unluckyluke.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unluckyluke.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unluckyluke.wordpress.com/117/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=117&subd=unluckyluke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unluckyluke.wordpress.com/2009/02/19/case-upload-validate-dan-max_execution_time/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320218dd3b45931d5c770e94580bca8c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">furqon</media:title>
		</media:content>

		<media:content url="http://unluckyluke.files.wordpress.com/2009/02/upload.png" medium="image">
			<media:title type="html">upload</media:title>
		</media:content>
	</item>
		<item>
		<title>Proyek Kolaboratif</title>
		<link>http://unluckyluke.wordpress.com/2009/02/13/proyek-kolaboratif/</link>
		<comments>http://unluckyluke.wordpress.com/2009/02/13/proyek-kolaboratif/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 20:08:34 +0000</pubDate>
		<dc:creator>Furqon</dc:creator>
				<category><![CDATA[Belajar]]></category>
		<category><![CDATA[Koding]]></category>

		<guid isPermaLink="false">http://unluckyluke.wordpress.com/?p=103</guid>
		<description><![CDATA[ 
Alhamdulillah (atau astaghfirullah) awal tahun ini dapet amanah baru, dapet kesempatan baru untuk me-lead developer untuk membuat sebuat aplikasi managemen routing untuk satu perusahaan telco. Ada beberapa hal yang harus dipersiapkan kurasa untuk menunjang keberhasilan proyek ini. Dikarenakan tatap muka yang tidak begitu intens maka kemungkinan gagalnya proyek ini cukup besar. Seluruh aktivitas dilakukan secara [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=103&subd=unluckyluke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div id="attachment_105" class="wp-caption alignleft" style="width: 122px"><img class="size-thumbnail wp-image-105" title="traversa" src="http://unluckyluke.files.wordpress.com/2009/02/t.png?w=112&#038;h=96" alt="Traversa" width="112" height="96" /></p>
<p><p class="wp-caption-text">Traversa</p></div>
<p> </p>
<p>Alhamdulillah (atau astaghfirullah) awal tahun ini dapet amanah baru, dapet kesempatan baru untuk me-lead developer untuk membuat sebuat aplikasi managemen routing untuk satu perusahaan telco. Ada beberapa hal yang harus dipersiapkan kurasa untuk menunjang keberhasilan proyek ini. Dikarenakan tatap muka yang tidak begitu intens maka kemungkinan gagalnya proyek ini cukup besar. Seluruh aktivitas dilakukan secara online.</p>
<p> </p>
<ol>
<li><a title="SVN" href="http://subversion.tigris.org/" target="_blank">subversion</a><br />
sebuah system untuk mengontrol source code yang dikembangkan. system ini sangat penting karena pengguna (pengembang) source code terdiri lebih dari satu orang, sehingga ada kemungkinan satu file diedit lebih dari satu orang. system ini memungkinkan adanya proses merging dari dua orang programmer yang mengedit satu file bersamaan. system ini juga memungkinkan adanya rollback kepada versi sebelumnya jika sesuatu terjadi pada versi terbaru, dst.</li>
<li><a title="mantis bugtracker" href="www.mantisbt.org" target="_blank">bugtracker</a><br />
ini adalah web based tools yang digunakan untuk mencatat seluruh aktivitas development. ia digunakan untuk mencatat request-request terhadap aplikasi, mencatat bug-bug sampai assignment siapa yang harus bertanggung jawab terhadap bug tersebut dengan priority yang bisa kita set. </li>
<li>unit testing<br />
aplikasi yang baik adalah aplikasi yang bug-free. bagaimana kita bisa meminimalisasi bug-bug yang kemungkinan muncul dalam aplikasi kita? diperlukan seseorang yang mampu melakukan QC satu persatu terhadap fungsi-fungsi hingga module-module, sehingga aplikasi kita bug proofed. cara lain lagi adalah dengan membuat unit testing yang akan bekerja secara otomatis tanpa bantuan tangan manusia.</li>
<li>timeline<br />
karena proyek ini memiliki tenggat waktu, maka setiap orang yang terlibat memiliki tanggung jawab masing-masing yang harus diselesaikan pada satu waktu tertentu. untuk ini kita bisa menggunakan <a title="googleCal" href="http://www.google.com/calendar/render" target="_blank">schedule/calendar</a> yang dimiliki google, yang bisa kita share dengan sesama anggota developer dan akan memberikan alert via mail/ponsel jika ada event tertentu.</li>
</ol>
<p>Ah.. kiranya cukup itulah dulu.. kalau ada yang mau berkomentar. Monggo silaken, saran dan kritik sangat diharapkan. Semoga proyeknya kelar tepat waktu.. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unluckyluke.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unluckyluke.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unluckyluke.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unluckyluke.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unluckyluke.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unluckyluke.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unluckyluke.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unluckyluke.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unluckyluke.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unluckyluke.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=103&subd=unluckyluke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unluckyluke.wordpress.com/2009/02/13/proyek-kolaboratif/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320218dd3b45931d5c770e94580bca8c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">furqon</media:title>
		</media:content>

		<media:content url="http://unluckyluke.files.wordpress.com/2009/02/t.png?w=112" medium="image">
			<media:title type="html">traversa</media:title>
		</media:content>
	</item>
		<item>
		<title>Ada Juga symfony</title>
		<link>http://unluckyluke.wordpress.com/2009/01/30/ada-juga-symfony/</link>
		<comments>http://unluckyluke.wordpress.com/2009/01/30/ada-juga-symfony/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 11:26:12 +0000</pubDate>
		<dc:creator>Furqon</dc:creator>
				<category><![CDATA[Koding]]></category>

		<guid isPermaLink="false">http://unluckyluke.wordpress.com/?p=93</guid>
		<description><![CDATA[gak sengaja buka republika.co.id, ternyata ada juga penggemar symfony diantara selipan codeigniter di jajaran web-web berita indonesia..  
 
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=93&subd=unluckyluke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>gak sengaja buka republika.co.id, ternyata ada juga penggemar symfony diantara selipan codeigniter di jajaran web-web berita indonesia.. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p> </p>
<div id="attachment_92" class="wp-caption aligncenter" style="width: 510px"><img class="size-full wp-image-92" title="rol-symfony" src="http://unluckyluke.files.wordpress.com/2009/01/rol-symfony.png?w=500&#038;h=322" alt=")" width="500" height="322" /><p class="wp-caption-text">Republika pakai symfony <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unluckyluke.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unluckyluke.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unluckyluke.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unluckyluke.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unluckyluke.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unluckyluke.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unluckyluke.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unluckyluke.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unluckyluke.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unluckyluke.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=93&subd=unluckyluke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unluckyluke.wordpress.com/2009/01/30/ada-juga-symfony/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320218dd3b45931d5c770e94580bca8c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">furqon</media:title>
		</media:content>

		<media:content url="http://unluckyluke.files.wordpress.com/2009/01/rol-symfony.png" medium="image">
			<media:title type="html">rol-symfony</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting CodeIgniter + AdoDB</title>
		<link>http://unluckyluke.wordpress.com/2008/11/27/setting-codeigniter-adodb/</link>
		<comments>http://unluckyluke.wordpress.com/2008/11/27/setting-codeigniter-adodb/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 23:38:22 +0000</pubDate>
		<dc:creator>Furqon</dc:creator>
				<category><![CDATA[Koding]]></category>

		<guid isPermaLink="false">http://unluckyluke.wordpress.com/?p=78</guid>
		<description><![CDATA[Dikarenakan adanya request dari seorang pengunjung untuk mensettingkan codeigniter-nya dengan adoDB. Dengan senang hati saya akan sampaikan langkah-langkahnya.
Langkahs:

mungkin liat-liat dulu kenapa musti gunakan adodb ketimbang fasilitas yang sudah diprovide oleh CI. kali aja abis baca itu gak jadi nerusin, kan ga jadi buang waktu  
klo langkah satu sudah ok, donlod adodb
extract file ke dalam CI/system/application/libraries/adodb/
kita [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=78&subd=unluckyluke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Dikarenakan adanya request dari seorang <a title="Request" href="http://unluckyluke.wordpress.com/2008/05/01/codeigniter-adodb-jquery-makhnyuss/#comment-15" target="_self">pengunjung</a> untuk mensettingkan codeigniter-nya dengan adoDB. Dengan senang hati saya akan sampaikan langkah-langkahnya.</p>
<p>Langkahs:</p>
<ol>
<li>mungkin liat-liat dulu kenapa musti gunakan adodb ketimbang fasilitas yang sudah diprovide oleh CI. kali aja abis baca itu gak jadi nerusin, kan ga jadi buang waktu <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </li>
<li>klo langkah satu sudah ok, donlod <a title="donlod adoDB" href="http://adodb.sourceforge.net/" target="_blank">adodb</a></li>
<li>extract file ke dalam CI/system/application/libraries/adodb/</li>
<li>kita buat CI untuk me-load adodb yang baru kita masukkan<br />
buka file CI/system/application/config/autoload.php, tambahkan load libraries:<br />
$autoload['libraries'] = array(&#8216;database&#8217;, &#8216;adodbloader&#8217;); </li>
<li>lalu kita coba liat libraries adodbloader ini (baca: dibuat ato donlod)</li>
</ol>
<p><span id="more-78"></span></p>
<p>CI/system/application/libraries/Adodbloader.php</p>
<blockquote><p>&lt;?php if (!defined(&#8216;BASEPATH&#8217;)) exit(&#8216;No direct script access allowed&#8217;);</p>
<p>Class Adodbloader{<br />
    function Adodbloader(){<br />
        if ( !class_exists(&#8216;ADONewConnection&#8217;) )<br />
            require_once(APPPATH.&#8217;libraries/adodb/adodb.inc&#8217;.EXT);<br />
        <br />
        $obj =&amp; get_instance();<br />
        $this-&gt;_init_adodb_library($obj); <br />
    } </p>
<p>    function _init_adodb_library(&amp;$ci) {<br />
        $db_var = false; <br />
        $debug = false; </p>
<p>        if (!isset($dsn)) {<br />
            // fallback to using the CI database file <br />
            include(APPPATH.&#8217;config/database&#8217;.EXT); <br />
            $group = &#8216;default&#8217;; <br />
            $dsn = $db[$group]['dbdriver'].&#8217;://&#8217;.$db[$group]['username'] <br />
                   .&#8217;:&#8217;.$db[$group]['password'].&#8217;@&#8217;.$db[$group]['hostname']<br />
                   .&#8217;/&#8217;.$db[$group]['database']; <br />
        } </p>
<p>        // $ci is by reference, refers back to global instance<br />
        $ci-&gt;adodb =&amp; ADONewConnection($dsn);</p>
<p>        if ($db_var) {<br />
            // also set the normal CI db variable<br />
            $ci-&gt;db =&amp; $ci-&gt;adodb; <br />
        } </p>
<p>        if ($debug) {<br />
            $ci-&gt;adodb-&gt;debug = true;<br />
        }<br />
    }<br />
}</p></blockquote>
<p>Ini dulu saya download dari manaaa gitu, terus ada satu conditional blok yang saya hapus untuk menskip pembacaan file adodb.php (dsn file), sehingga dia langsung otomatis baca CI/system/application/config/database.php. Jadi Setting database.php kamu sesuai konfigurasi database yang ada.</p>
<p>Selanjutnya tinggal kita coba apakah settingan kita sudah berjalan atau belum. Edit file CI/system/application/controllers/welcome.php.</p>
<blockquote><p>function index(){</p>
<p>    $this-&gt;adodb-&gt;debug=1; <br />
    echo $this-&gt;adodb-&gt;GetOne(&#8220;SELECT now()&#8221;);<br />
    //$this-&gt;load-&gt;view(&#8216;welcome_message&#8217;);<br />
} </p></blockquote>
<p>O, sekarang coba buka http://localhost/CI. Jikalau yang keluar cacing, maka kemungkinan besar loader gagal. Jika yang keluar jin botol anda mungkin seberuntung Ali Baba <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Gunakan selalu $this-&gt;adodb-&gt;AdoDBMethod();</p>
<p>gud lak brader&#8230;</p>
<p><span style="font-size:xx-small;">tested on CI 1.7</span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unluckyluke.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unluckyluke.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unluckyluke.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unluckyluke.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unluckyluke.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unluckyluke.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unluckyluke.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unluckyluke.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unluckyluke.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unluckyluke.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=78&subd=unluckyluke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unluckyluke.wordpress.com/2008/11/27/setting-codeigniter-adodb/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320218dd3b45931d5c770e94580bca8c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">furqon</media:title>
		</media:content>
	</item>
		<item>
		<title>Query Menghitung Hari Kerja</title>
		<link>http://unluckyluke.wordpress.com/2008/07/09/query-menghitung-hari-kerja/</link>
		<comments>http://unluckyluke.wordpress.com/2008/07/09/query-menghitung-hari-kerja/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 19:59:23 +0000</pubDate>
		<dc:creator>Furqon</dc:creator>
				<category><![CDATA[Koding]]></category>

		<guid isPermaLink="false">http://unluckyluke.wordpress.com/?p=11</guid>
		<description><![CDATA[Sekedar sharing sahaja, how to count work day in mySQL and SQL Server:
mySQL:

CREATE FUNCTION cwd (awal DATETIME, akhir DATETIME)
RETURNS INT
DETERMINISTIC
BEGIN
DECLARE done INT DEFAULT 0;
DECLARE y INT DEFAULT 1;
SET done = TIMESTAMPDIFF(DAY, awal, akhir);
SET @x = 0;
WHILE y &#60;= done DO
IF (WEEKDAY(awal) = 5 OR WEEKDAY(awal) = 6) THEN
SET @x = @x + 0;
ELSE
SET @x = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=11&subd=unluckyluke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Sekedar sharing sahaja, how to count work day in mySQL and SQL Server:</p>
<p><strong>mySQL</strong>:<br />
<code><br />
CREATE FUNCTION cwd (awal DATETIME, akhir DATETIME)<br />
RETURNS INT</code></p>
<p>DETERMINISTIC<br />
BEGIN<br />
DECLARE done INT DEFAULT 0;<br />
DECLARE y INT DEFAULT 1;</p>
<p>SET done = TIMESTAMPDIFF(DAY, awal, akhir);<br />
SET @x = 0;</p>
<p>WHILE y &lt;= done DO<br />
IF (WEEKDAY(awal) = 5 OR WEEKDAY(awal) = 6) THEN<br />
SET @x = @x + 0;<br />
ELSE<br />
SET @x = @x + 1;<br />
END IF;</p>
<p>SET awal = DATE_ADD(awal, INTERVAL 1 DAY);<br />
SET y = y + 1;<br />
END WHILE;</p>
<p>RETURN @x;<br />
END;<br />
</code></p>
<p>"SELECT cwd('2008-07-07', '2008-07-17');"<br />
<span id="more-11"></span><br />
<strong>SQL Server</strong>:<br />
<code><br />
CREATE FUNCTION [dbo].[cwd](@date1 DATETIME, @date2 DATETIME)<br />
RETURNS VARCHAR(7)<br />
AS<br />
BEGIN<br />
IF (@date1 = @date2)<br />
RETURN ('0')</code></p>
<p>DECLARE @DayDiff INT<br />
DECLARE @i INT<br />
DECLARE @x INT</p>
<p>SET @DayDiff        = DATEDIFF(dd,@date1,@date2)<br />
SET @i				= 1<br />
SET @x				= 0</p>
<p>WHILE (@i &lt;= @DayDiff)<br />
BEGIN<br />
IF((SELECT DATENAME(dw, @date1)) = 'Saturday' OR (SELECT DATENAME(dw, @date1)) = 'Sunday')<br />
BEGIN<br />
SELECT @x = @x + 0<br />
END<br />
ELSE<br />
BEGIN<br />
SELECT @x = @x + 1<br />
END<br />
SELECT @date1 = DATEADD(dd, 1, @date1)<br />
SELECT @i = @i + 1<br />
END</p>
<p>RETURN @x<br />
END<br />
</code><br />
Tinggal panggil<br />
"SELECT dbo.cwd('2008-07-07', '2008-07-17')"</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unluckyluke.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unluckyluke.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unluckyluke.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unluckyluke.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unluckyluke.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unluckyluke.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unluckyluke.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unluckyluke.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unluckyluke.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unluckyluke.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unluckyluke.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unluckyluke.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=11&subd=unluckyluke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unluckyluke.wordpress.com/2008/07/09/query-menghitung-hari-kerja/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320218dd3b45931d5c770e94580bca8c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">furqon</media:title>
		</media:content>
	</item>
		<item>
		<title>CodeIgniter + AdoDB + jQuery = Makhnyuss</title>
		<link>http://unluckyluke.wordpress.com/2008/05/01/codeigniter-adodb-jquery-makhnyuss/</link>
		<comments>http://unluckyluke.wordpress.com/2008/05/01/codeigniter-adodb-jquery-makhnyuss/#comments</comments>
		<pubDate>Thu, 01 May 2008 10:45:05 +0000</pubDate>
		<dc:creator>Furqon</dc:creator>
				<category><![CDATA[Koding]]></category>

		<guid isPermaLink="false">http://unluckyluke.wordpress.com/?p=6</guid>
		<description><![CDATA[Buat kamu web developer (terutama php) mungkin tulisan ini bisa memberi ide.
Mengapa gado-gado itu harus dengan komponen CI, Ado dan jQuery?

Menggunakan framework itu jelas bisa mengurangi waktu riset membangun prototipe aplikasi yg handal (yg jelas, dont repeat your self)
Banyak orang menggunakan, berarti banyak orang meng-QA, berarti banyak improvement dilakukan
Menggunakan db abstraction layer memberikan fleksibilitas applikasi [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=6&subd=unluckyluke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Buat kamu web developer (terutama php) mungkin tulisan ini bisa memberi ide.</p>
<p>Mengapa gado-gado itu harus dengan komponen CI, Ado dan jQuery?</p>
<ol>
<li>Menggunakan framework itu jelas bisa mengurangi waktu riset membangun prototipe aplikasi yg handal (yg jelas, <a title="DRY Method" href="http://en.wikipedia.org/wiki/Don't_repeat_yourself" target="_blank">dont repeat your self</a>)</li>
<li>Banyak orang menggunakan, berarti banyak orang meng-QA, berarti banyak improvement dilakukan</li>
<li>Menggunakan db abstraction layer memberikan fleksibilitas applikasi untuk beradaptasi dengan lingkungan klien (meski CI sudah provide db layer ini)</li>
<li>jQuery bisa membuat aplikasi anda menjadi lebih hidup (lebih web 2.0 atau 2.5 lah)</li>
</ol>
<p>Yang jelas mengapa menggunakan framework dan segala macemnya silakan cari di tempat lain yang bahas lebih detail</p>
<p><a title="CodeIgniter" href="http://codeigniter.com/" target="_blank">CodeIgniter</a>, framework php ini menawarkan sesuatu yang light tapi komplit, dengan learning curve yang lumayan cepat buat seorang novice programmer. Framework ini juga sudah mengadaptasi segregasi <a title="MVC" href="http://en.wikipedia.org/wiki/Model-view-controller" target="_blank">MVC</a>, dan untuk ini gado-gado menggunakan <a title="AdoDb" href="http://phplens.com/adodb/" target="_blank">AdoDb</a> sebagai pendukung di sisi &#8220;Model&#8221;, dan <a title="jQuery" href="http://www.jquery.com/" target="_blank">jQuery</a> dari sisi behaviour mendukung &#8220;View&#8221; yang lebih atraktif, serta tentu saja kreativitas anda mendukung sisi &#8220;Controller&#8221; <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Untuk aplikasi yang lebih kompleks, bisa juga ditambahkan <a title="Matchbox modularity" href="http://code.google.com/p/matchbox/" target="_blank">matchbox</a> untuk memudahkan manajemen aplikasi, sehingga lebih modular.</p>
<p><span style="font-size:xx-small;">duuh.. ngomong apa sih ni orang</span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unluckyluke.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unluckyluke.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unluckyluke.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unluckyluke.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unluckyluke.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unluckyluke.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unluckyluke.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unluckyluke.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unluckyluke.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unluckyluke.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unluckyluke.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unluckyluke.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=6&subd=unluckyluke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unluckyluke.wordpress.com/2008/05/01/codeigniter-adodb-jquery-makhnyuss/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320218dd3b45931d5c770e94580bca8c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">furqon</media:title>
		</media:content>
	</item>
		<item>
		<title>Stuck With Coldfusion</title>
		<link>http://unluckyluke.wordpress.com/2007/12/29/stuck-with-coldfusion/</link>
		<comments>http://unluckyluke.wordpress.com/2007/12/29/stuck-with-coldfusion/#comments</comments>
		<pubDate>Sat, 29 Dec 2007 09:44:32 +0000</pubDate>
		<dc:creator>Furqon</dc:creator>
				<category><![CDATA[Koding]]></category>

		<guid isPermaLink="false">http://unluckyluke.wordpress.com/2007/12/29/stuck-with-coldfusion/</guid>
		<description><![CDATA[Man..
I&#8217;am wasting my time using coldfusion.  One month in Balikpapan from the plan of two weeks.  There are a lot of something that is easy to be programmed with PHP but not so in CF. There are a lot of bunch to be added to the script to make a good layouting from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=5&subd=unluckyluke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Man..</p>
<p>I&#8217;am wasting my time using coldfusion.  One month in Balikpapan from the plan of two weeks.  There are a lot of something that is easy to be programmed with PHP but not so in CF. There are a lot of bunch to be added to the script to make a good layouting from database retrieving.</p>
<p>The most problem I faced, when I query with &#8220;<strong>IN</strong>&#8221; condition, such:</p>
<blockquote><p><code>SELECT bla FROM tbl WHERE bli IN ( &lt;cfoutput&gt;#blu#&lt;/cfoutput&gt; )</code></p></blockquote>
<p>With variable blu as a list separated with coma &#8220;,&#8221;. Coldfusion add single apostrophe automatically, and so forth the query wont give a result. DAMN! The solution is by split the query, and then loop it manually with single apostroph added (this looping action must be located inside cfquery tag). Man.. what a waste of time.</p>
<p>There are still tons of problem I faced, later Ill add it.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unluckyluke.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unluckyluke.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unluckyluke.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unluckyluke.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unluckyluke.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unluckyluke.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unluckyluke.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unluckyluke.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unluckyluke.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unluckyluke.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unluckyluke.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unluckyluke.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=5&subd=unluckyluke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unluckyluke.wordpress.com/2007/12/29/stuck-with-coldfusion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320218dd3b45931d5c770e94580bca8c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">furqon</media:title>
		</media:content>
	</item>
		<item>
		<title>When Programmer Stuck</title>
		<link>http://unluckyluke.wordpress.com/2007/06/14/when-programmer-stuck/</link>
		<comments>http://unluckyluke.wordpress.com/2007/06/14/when-programmer-stuck/#comments</comments>
		<pubDate>Thu, 14 Jun 2007 16:04:14 +0000</pubDate>
		<dc:creator>Furqon</dc:creator>
				<category><![CDATA[Koding]]></category>

		<guid isPermaLink="false">http://unluckyluke.wordpress.com/?p=23</guid>
		<description><![CDATA[
“Sometimes hard code is the only way out”  
This is our secret.. don’t tell anyone!
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=23&subd=unluckyluke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img src="http://imgs.xkcd.com/comics/random_number.png" align="center"></p>
<p>“<em>Sometimes hard code is the only way out</em>” <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> <br />
This is our secret.. don’t tell anyone!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/unluckyluke.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/unluckyluke.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unluckyluke.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unluckyluke.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unluckyluke.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unluckyluke.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unluckyluke.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unluckyluke.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unluckyluke.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unluckyluke.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unluckyluke.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unluckyluke.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=unluckyluke.wordpress.com&blog=710451&post=23&subd=unluckyluke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://unluckyluke.wordpress.com/2007/06/14/when-programmer-stuck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320218dd3b45931d5c770e94580bca8c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">furqon</media:title>
		</media:content>

		<media:content url="http://imgs.xkcd.com/comics/random_number.png" medium="image" />
	</item>
	</channel>
</rss>