<?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>GandaBlog</title>
	<atom:link href="http://gandamanurung.com/feed" rel="self" type="application/rss+xml" />
	<link>http://gandamanurung.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Mon, 16 Jan 2012 04:19:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Metro UI Made Simple</title>
		<link>http://gandamanurung.com/2012/01/metro-ui-made-simple.html</link>
		<comments>http://gandamanurung.com/2012/01/metro-ui-made-simple.html#comments</comments>
		<pubDate>Mon, 16 Jan 2012 04:19:17 +0000</pubDate>
		<dc:creator>ganda</dc:creator>
				<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[mango]]></category>

		<guid isPermaLink="false">http://gandamanurung.com/?p=19</guid>
		<description><![CDATA[For the first time I looked at Nokia Lumia 800 with Windows Phone 7.5 Mango, I am amazed to looked at a very gorgeous outstanding user interface. Its called Metro. Want to learn more? Check out this link and this link. Looks like it very tempting to develop an Windows Phone Mango app. The next...]]></description>
			<content:encoded><![CDATA[<p>For the first time I looked at Nokia Lumia 800 with Windows Phone 7.5 Mango, I am amazed to looked at a very gorgeous outstanding user interface. Its called Metro.</p>
<p>Want to learn more? Check out this <a href="http://uxdesign.smashingmagazine.com/2011/12/20/introduction-designing-windows-phone-7-metro/">link</a>  and this <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/02/16/from-transportation-to-pixels.aspx">link</a>. </p>
<p>Looks like it very tempting to develop an Windows Phone Mango app. The next time I&#8217;ll show you one.</p>
]]></content:encoded>
			<wfw:commentRss>http://gandamanurung.com/2012/01/metro-ui-made-simple.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Vulnerability That May Halt Millions of Running PHP Websites</title>
		<link>http://gandamanurung.com/2012/01/php-vulnerability-that-may-halt-millions-of-running-php-websites.html</link>
		<comments>http://gandamanurung.com/2012/01/php-vulnerability-that-may-halt-millions-of-running-php-websites.html#comments</comments>
		<pubDate>Fri, 13 Jan 2012 10:59:10 +0000</pubDate>
		<dc:creator>ganda</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[hash collisions]]></category>
		<category><![CDATA[hash table]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://gandamanurung.com/?p=17</guid>
		<description><![CDATA[Today, I check out my email and got a newsletter for PHPClass.Org, and I found this article worth to read for all PHP programmers in this world. The vulnerability is just a mere of Hash table collisions problems, but it may lead to one huge problem to your site if you don&#8217;t really care or...]]></description>
			<content:encoded><![CDATA[<p>Today, I check out my email and got a newsletter for PHPClass.Org, and I found this article worth to read for all PHP programmers in this world. </p>
<p>The vulnerability is just a mere of Hash table collisions problems, but it may lead to one huge problem to your site if you don&#8217;t really care or aware about it. Before read the following article, I suggest you to understand what is a Hash table in the first place. An <a href="http://en.wikipedia.org/wiki/Hash_table">article about Hash table that published at Wikipedia</a> is good enough to give some explanation.</p>
<p>Check out the <a href="http://www.phpclasses.org/blog/post/171-PHP-Vulnerability-May-Halt-Millions-of-Servers.html">Hash Collision vulnerability article from PHPClass.org</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gandamanurung.com/2012/01/php-vulnerability-that-may-halt-millions-of-running-php-websites.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello EmguCV/OpenCV</title>
		<link>http://gandamanurung.com/2012/01/hello-emgucv-opencv.html</link>
		<comments>http://gandamanurung.com/2012/01/hello-emgucv-opencv.html#comments</comments>
		<pubDate>Fri, 13 Jan 2012 07:03:42 +0000</pubDate>
		<dc:creator>ganda</dc:creator>
				<category><![CDATA[Computer Vision]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[computer vision]]></category>
		<category><![CDATA[emgucv]]></category>
		<category><![CDATA[opencv]]></category>

		<guid isPermaLink="false">http://gandamanurung.com/?p=15</guid>
		<description><![CDATA[A few days ago, I started to play around with Computer Vision and I found OpenCV Library would help me much in building a computer vision application. Then I found that OpenCV using C languange, which the current me already forgot C much. Then I search for OpenCV wrapper for C#, since I would work...]]></description>
			<content:encoded><![CDATA[<p>A few days ago, I started to play around with Computer Vision and I found OpenCV Library would help me much in building a computer vision application. Then I found that OpenCV using C languange, which the current me already forgot C much. Then I search for OpenCV wrapper for C#, since I would work extensively in C#, finally I found EmguCV.</p>
<blockquote><p>Emgu CV is a cross platform .Net wrapper to the Intel OpenCV image processing library. Allowing OpenCV functions to be called from .NET compatible languages such as C#, VB, VC++, IronPython etc. The wrapper can be compiled in Mono and run on Linux / Mac OS X.</p></blockquote>
<p>Now, directly to the code.</p>
<pre><code>using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;
using Emgu.CV.UI;
using System.Drawing;

class HelloWorld
{
	static void Main()
	{
		string win1 = "Test Window";

		CvInvoke.cvNamedWindow(win1);

		using (Image<Bgr, byte> img = new Image<Bgr, byte>(400, 200, new Bgr(125, 125, 125)))
		{
		   MCvFont f = new MCvFont(FONT.CV_FONT_HERSHEY_SIMPLEX, 2.0, 2.0);
		   img.Draw("Hello, world", ref f, new Point(10, 80), new Bgr(30, 30, 30));

		   CvInvoke.cvShowImage(win1, img.Ptr);

		   CvInvoke.cvWaitKey(0);

		   CvInvoke.cvDestroyWindow(win1);
		}
	}

}</code></pre>
<p>Result:</p>
<p><a href="http://gandamanurung.com/wp-content/uploads/2012/01/Untitled.png"><img src="http://gandamanurung.com/wp-content/uploads/2012/01/Untitled-300x169.png" alt="" title="Untitled" width="300" height="169" class="alignright size-medium wp-image-16" /></a></p>
<p>I would love to write more about OpenCV/EmguCV and Computer Vision related stuff to my post. <img src='http://gandamanurung.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://gandamanurung.com/2012/01/hello-emgucv-opencv.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Simple C# List Made Simple</title>
		<link>http://gandamanurung.com/2012/01/a-simple-c-list-made-simple.html</link>
		<comments>http://gandamanurung.com/2012/01/a-simple-c-list-made-simple.html#comments</comments>
		<pubDate>Fri, 13 Jan 2012 04:37:16 +0000</pubDate>
		<dc:creator>ganda</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://gandamanurung.com/?p=13</guid>
		<description><![CDATA[Yesterday, I&#8217;ve wrote in C#. I taken the code from the book. List.cs using System; public class List { const int defaultCapacity = 4; T[] items; int count; public List(int capacity = defaultCapacity) { items = new T[capacity]; } public int Count { get{return count;} } public int Capacity { get{return items.Length;} set { if(value...]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I&#8217;ve wrote in C#. I taken the code from the book.<br />
<strong>List.cs</strong></p>
<pre><code>using System;
public class List<T>
{
	const int defaultCapacity = 4;

	T[] items;
	int count;

	public List(int capacity = defaultCapacity)
	{
		items = new T[capacity];
	}

	public int Count
	{
		get{return count;}
	}

	public int Capacity
	{
		get{return items.Length;}
		set
		{
			if(value < count) value = count;
			if(value != items.Length)
			{
				T[] newItems = new T[value];
				Array.Copy(items, 0, newItems, 0, count);
				items = newItems;
			}
		}
	}

	public T this[int index]
	{
		get
		{
			return items[index];
		}
		set
		{
			items[index] = value;
			OnChanged();
		}
	}

	public void Add(T item)
	{
		if(count == Capacity) Capacity = count * 2;
		items[count] = item;
		count++;
		OnChanged();
	}

	protected virtual void OnChanged()
	{
		if(Changed != null) Changed(this, EventArgs.Empty);
	}

	public override int GetHashCode()
	{
		return this.GetHashCode();
	}

	public override bool Equals(object other)
	{
		return Equals(this, other as List<T>);
	}

	static bool Equals(List<T> a, List<T> b)
	{
		for(int i = 0; i<a.count; i++)
		{
			if(!object.Equals(a.items[i], b.items[i]))
			{
				return false;
			}
		}
		return true;
	}

	public event EventHandler Changed;

	public static bool operator ==(List<T> a, List<T> b)
	{
		return Equals(a, b);
	}

	public static bool operator !=(List<T> a, List<T> b)
	{
		return !Equals(a, b);
	}
}</code></pre>
<p>And here is the main entry code to test the code above.<br />
<b>Tests.cs</b></p>
<pre><code>using System;

class Test
{
	static void Main()
	{
		List<int> list1 = new List<int>(5);
		List<int> list2 = new List<int>(10);

		Console.WriteLine(list1 == list2);
	}
}</code></pre>
<p>In this code, I found two bugs that leads the program to run-time error or result error. Can you find it? <img src='http://gandamanurung.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://gandamanurung.com/2012/01/a-simple-c-list-made-simple.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Regex Made Simple</title>
		<link>http://gandamanurung.com/2012/01/regex-made-simple.html</link>
		<comments>http://gandamanurung.com/2012/01/regex-made-simple.html#comments</comments>
		<pubDate>Thu, 12 Jan 2012 07:42:35 +0000</pubDate>
		<dc:creator>ganda</dc:creator>
				<category><![CDATA[Regex]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://gandamanurung.com/?p=12</guid>
		<description><![CDATA[Today, I was reading Id-PHP mailing list, and I found a question for it&#8217;s member. He is asking about to insert a space before a capital letters in a string. Then, I come up with this solution. $text = "ThisIsAnExampleOfPHPString"; echo preg_replace('/(\B[A-Z][^A-Z]*)/', ' \1', $text); And the resut is &#8220;This Is An Example Of P...]]></description>
			<content:encoded><![CDATA[<p>Today, I was reading Id-PHP mailing list, and I found a question for it&#8217;s member. He is asking about to insert a space before a capital letters in a string.</p>
<p>Then, I come up with this solution.</p>
<pre><code>$text = "ThisIsAnExampleOfPHPString";
echo preg_replace('/(\B[A-Z][^A-Z]*)/', ' \1', $text);</code></pre>
<p>And the resut is &#8220;This Is An Example Of P H P String&#8221; &mdash; of course without the double quotes. Simple and neat.</p>
]]></content:encoded>
			<wfw:commentRss>http://gandamanurung.com/2012/01/regex-made-simple.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>C# Partial Method</title>
		<link>http://gandamanurung.com/2012/01/csharp-partial-method.html</link>
		<comments>http://gandamanurung.com/2012/01/csharp-partial-method.html#comments</comments>
		<pubDate>Tue, 10 Jan 2012 05:19:37 +0000</pubDate>
		<dc:creator>ganda</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://gandamanurung.com/?p=11</guid>
		<description><![CDATA[A partial class or struct may contain a partial method. One part of the class contains the signature of the method. An optional implementation may be defined in the same part or another part. If the implementation is not supplied, then the method and all calls to the method are removed at compile time. Partial...]]></description>
			<content:encoded><![CDATA[<p>A partial class or struct may contain a partial method. One part of the class contains the signature of the method. An optional implementation may be defined in the same part or another part. If the implementation is not supplied, then the method and all calls to the method are removed at compile time.</p>
<p>Partial methods enable the implementer of one part of a class to define a method, similar to an event. The implementer of the other part of the class can decide whether to implement the method or not. If the method is not implemented, then the compiler removes the method signature and all calls to the method. The calls to the method, including any results that would occur from evaluation of arguments in the calls, have no effect at run time. Therefore, any code in the partial class can freely use a partial method, even if the implementation is not supplied. No compile-time or run-time errors will result if the method is called but not implemented.</p>
<p>Partial methods are especially useful as a way to customize generated code. They allow for a method name and signature to be reserved, so that generated code can call the method but the developer can decide whether to implement the method. Much like partial classes, partial methods enable code created by a code generator and code created by a human developer to work together without run-time costs.</p>
<p>A partial method declaration consists of two parts: the definition, and the implementation. These may be in separate parts of a partial class, or in the same part. If there is no implementation declaration, then the compiler optimizes away both the defining declaration and all calls to the method.</p>
<p>Example:<br />
<b>CoOrds1.cs</b></p>
<pre><code>public partial class CoOrds
{
    private int x;
    private int y;

    public CoOrds(int x, int y)
    {
        this.x = x;
        this.y = y;
    }

    partial void PrintCoOrds();
}</code></pre>
<p><b>CoOrds2.cs</b></p>
<pre><code>public partial class CoOrds
{
    partial void PrintCoOrds()
    {
        System.Console.WriteLine("CoOrds {0},{1}", x, y);
    }

    public void PrintTheCoOrds()
    {
    	PrintCoOrds();
    }

}</code></pre>
<p><b>CoOrds2.cs</b></p>
<pre><code>class TestCoOrds
{
    static void Main()
    {
        CoOrds myCoOrds = new CoOrds(100, 150);
        myCoOrds.PrintTheCoOrds();
    }
}</code></pre>
<p>Refence : <a href="http://msdn.microsoft.com/en-us/library/wa80x488.aspx">Partial Classes and Methods (C# Programming Guide) at MSDN</a></p>
<h4>Further readings</h4>
<ul>
<li><a href="http://www.codeproject.com/KB/dotnet/PartialMethod.aspx">Introduction to Partial Methods: CodeProject.com</a></li>
<li><a href="http://www.4guysfromrolla.com/articles/071509-1.aspx">An Overview of Partial Classes and Partial Methods : 4GuysFromOlla.com</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://gandamanurung.com/2012/01/csharp-partial-method.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>C# vs Java (1)</title>
		<link>http://gandamanurung.com/2012/01/csharp-vs-java-1.html</link>
		<comments>http://gandamanurung.com/2012/01/csharp-vs-java-1.html#comments</comments>
		<pubDate>Mon, 09 Jan 2012 07:16:36 +0000</pubDate>
		<dc:creator>ganda</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://gandamanurung.com/?p=8</guid>
		<description><![CDATA[Partial Class C#.NET From Partial Class Definitions at MSDN, it is possible to split the definition of a class or a struct, or an interface over two or more source files. Each source file contains a section of the class definition, and all parts are combined when the application is compiled. There are several situations...]]></description>
			<content:encoded><![CDATA[<h3>Partial Class</h3>
<h4>C#.NET</h4>
<p>From <a href="http://msdn.microsoft.com/en-us/library/wa80x488(v=vs.80).aspx">Partial Class Definitions at MSDN</a>, it is possible to split the definition of a class or a struct, or an interface over two or more source files. Each source file contains a section of the class definition, and all parts are combined when the application is compiled. There are several situations when splitting a class definition is desirable:</p>
<ul>
<li>
When working on large projects, spreading a class over separate files allows multiple programmers to work on it simultaneously.
</li>
<li>
When working with automatically generated source, code can be added to the class without having to recreate the source file. Visual Studio uses this approach when creating Windows Forms, Web Service wrapper code, and so on. You can create code that uses these classes without having to edit the file created by Visual Studio.
</li>
<li>
To split a class definition, use the partial keyword modifier</li>
</ul>
<p>Here I wanna point out the third point. There is sometimes we will work on a large class file which contains a large numbers of LoC(Line of Code). If you have such class, I bet it is harder to maintain one large class file instead of some distributed and linked source code file that can be compiled into one compiled code.</p>
<p>Here is some demo. Create file CoOrds1.cs in any folder you prefer. Then write this code.</p>
<pre><code>public partial class CoOrds
{
    private int x;
    private int y;

    public CoOrds(int x, int y)
    {
        this.x = x;
        this.y = y;
    }
}</code></pre>
<p>Create file CoOrds2.cs in the folder you already put CoOrds1.cs</p>
<pre><code>public partial class CoOrds
{
    public void PrintCoOrds()
    {
        System.Console.WriteLine("CoOrds: {0},{1}", x, y);
    }

}</code></pre>
<p>Finally, create a class to execute our CoOrds class in TestCoOrds.cs in the folder that you&#8217;ve put both the two files before.</p>
<pre><code>class TestCoOrds
{
    static void Main()
    {
        CoOrds myCoOrds = new CoOrds(10, 15);
        myCoOrds.PrintCoOrds();
    }
}</code></pre>
<p>Open Command Line Interpreter and write this command on the CLI.</p>
<pre><code>csc CoOrds1.cs CoOrds2.cs TestCoOrds.cs</code></pre>
<p>On the CLI, type TestCoOrds.exe and the result would be printed out to the console screen.</p>
<h4>Java</h4>
<p>No. Java source codes can not be split across multiple files. Not until know.</p>
]]></content:encoded>
			<wfw:commentRss>http://gandamanurung.com/2012/01/csharp-vs-java-1.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Horror of PHP?</title>
		<link>http://gandamanurung.com/2011/12/horror-of-php.html</link>
		<comments>http://gandamanurung.com/2011/12/horror-of-php.html#comments</comments>
		<pubDate>Fri, 30 Dec 2011 08:29:07 +0000</pubDate>
		<dc:creator>ganda</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://gandamanurung.com/?p=6</guid>
		<description><![CDATA[Is PHP kind of horrors to you? Well, some of programmers think it is. You can read a bunch of list reason here. Well, I disagreed on some of the &#8220;horrors&#8221; and some others agreed, especially for Object Oriented features. I would like to hear your arguments]]></description>
			<content:encoded><![CDATA[<p>Is PHP kind of horrors to you? Well, some of programmers think it is. You can read a bunch of list reason <a href="http://www.quora.com/What-are-the-horrors-of-PHP">here</a>. Well, I disagreed on some of the &#8220;horrors&#8221; and some others agreed, especially for Object Oriented features.</p>
<p>I would like to hear your arguments <img src='http://gandamanurung.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://gandamanurung.com/2011/12/horror-of-php.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>My Old Archive Page</title>
		<link>http://gandamanurung.com/2011/12/my-old-archive-page.html</link>
		<comments>http://gandamanurung.com/2011/12/my-old-archive-page.html#comments</comments>
		<pubDate>Wed, 28 Dec 2011 04:57:10 +0000</pubDate>
		<dc:creator>ganda</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gandamanurung.com/?p=5</guid>
		<description><![CDATA[I had backup all my old posts archive before this blog went died since months ago until one week ago. Now, I&#8217;ve put it all to my archives page. Now you can read all my old posts that might be contains any resourceful writing do you seek.]]></description>
			<content:encoded><![CDATA[<p>I had backup all my old posts archive before this blog went died since months ago until one week ago. Now, I&#8217;ve put it all to my <a href="http://gandamanurung.com/archives/">archives</a> page.</p>
<p>Now you can read all my old posts that might be contains any resourceful writing do you seek. <img src='http://gandamanurung.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://gandamanurung.com/2011/12/my-old-archive-page.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Re-compile, Re-publish and Re-run</title>
		<link>http://gandamanurung.com/2011/12/hello-world.html</link>
		<comments>http://gandamanurung.com/2011/12/hello-world.html#comments</comments>
		<pubDate>Thu, 22 Dec 2011 05:17:36 +0000</pubDate>
		<dc:creator>ganda</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gandamanurung.com/?p=1</guid>
		<description><![CDATA[I&#8217;ve been used WordPress for a long time. This is not my first post. And i don&#8217;t want to delete it. The journey of the blogging starts again.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been used WordPress for a long time. This is not my first post. And i don&#8217;t want to delete it.</p>
<p>The journey of the blogging starts again. <img src='http://gandamanurung.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://gandamanurung.com/2011/12/hello-world.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
