<?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>HieuUK &#187; Code Vault</title>
	<atom:link href="http://www.hieu.co.uk/blog/index.php/category/code-vault/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hieu.co.uk/blog</link>
	<description>Creative Programing</description>
	<lastBuildDate>Tue, 09 Feb 2010 01:35:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Access Windows special directories (My document, Desktop, Program Files)</title>
		<link>http://www.hieu.co.uk/blog/index.php/2009/10/12/access-windows-special-directories-my-document-desktop-program-files/</link>
		<comments>http://www.hieu.co.uk/blog/index.php/2009/10/12/access-windows-special-directories-my-document-desktop-program-files/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 22:25:22 +0000</pubDate>
		<dc:creator>HieuUK</dc:creator>
				<category><![CDATA[C#.NET Code]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.hieu.co.uk/blog/?p=817</guid>
		<description><![CDATA[You can easily access to special directories of windows in C# by using:

Environment.SpecialFolder.MyDocuments;

The same go with other directories

Environment.SpecialFolder.Desktop;
Environment.SpecialFolder.History;
...

]]></description>
		<wfw:commentRss>http://www.hieu.co.uk/blog/index.php/2009/10/12/access-windows-special-directories-my-document-desktop-program-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A shorter way for If statement in C#</title>
		<link>http://www.hieu.co.uk/blog/index.php/2009/07/17/a-shorter-way-for-if-statement-in-c/</link>
		<comments>http://www.hieu.co.uk/blog/index.php/2009/07/17/a-shorter-way-for-if-statement-in-c/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 08:33:29 +0000</pubDate>
		<dc:creator>HieuUK</dc:creator>
				<category><![CDATA[C#.NET Code]]></category>

		<guid isPermaLink="false">http://www.hieu.co.uk/blog/?p=807</guid>
		<description><![CDATA[Instead of writing:

        if (idx == 1)
        {
            result = "Yes";
        }
        else
    [...]


Related posts:<ol><li><a href='http://www.hieu.co.uk/blog/index.php/2010/01/27/did-you-know-about-db4o-a-brilliant-object-oriented-database/' rel='bookmark' title='Permanent Link: Did you know about db4o &#8211; a brilliant object oriented database'>Did you know about db4o &#8211; a brilliant object oriented database</a> <small> Db4o. It's an object oriented database. It's so simple,...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://www.hieu.co.uk/blog/index.php/2009/07/17/a-shorter-way-for-if-statement-in-c/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Delete query using Subsonic</title>
		<link>http://www.hieu.co.uk/blog/index.php/2009/05/14/delete-query-using-subsonic/</link>
		<comments>http://www.hieu.co.uk/blog/index.php/2009/05/14/delete-query-using-subsonic/#comments</comments>
		<pubDate>Thu, 14 May 2009 14:30:18 +0000</pubDate>
		<dc:creator>HieuUK</dc:creator>
				<category><![CDATA[C#.NET Code]]></category>

		<guid isPermaLink="false">http://www.hieu.co.uk/blog/?p=773</guid>
		<description><![CDATA[Here&#8217;s a quick little bit of code that shows how to delete records in your database using SubSonic&#8217;s Query Tool. I know you can write this is fewer lines of code, but I think this shows a little more clearly what&#8217;s going on. 

Query qryDelete = new Query(DeliverableCategoriesSelected.Schema);
// You can also do the following line [...]


Related posts:<ol><li><a href='http://www.hieu.co.uk/blog/index.php/2010/01/27/did-you-know-about-db4o-a-brilliant-object-oriented-database/' rel='bookmark' title='Permanent Link: Did you know about db4o &#8211; a brilliant object oriented database'>Did you know about db4o &#8211; a brilliant object oriented database</a> <small> Db4o. It's an object oriented database. It's so simple,...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://www.hieu.co.uk/blog/index.php/2009/05/14/delete-query-using-subsonic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recent posts from specific category</title>
		<link>http://www.hieu.co.uk/blog/index.php/2009/04/24/recent-posts-from-specific-category/</link>
		<comments>http://www.hieu.co.uk/blog/index.php/2009/04/24/recent-posts-from-specific-category/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 12:58:21 +0000</pubDate>
		<dc:creator>HieuUK</dc:creator>
				<category><![CDATA[Wordpress Code]]></category>

		<guid isPermaLink="false">http://www.hieu.co.uk/blog/index.php/2009/04/24/recent-posts-from-specific-category/</guid>
		<description><![CDATA[Show a recent posts from a specific category in wordpress.

&#60;ul&#62;
&#60;?php $recent = new WP_Query("cat=48&#038;showposts=8"); while($recent-&#62;have_posts()) : $recent-&#62;the_post();?&#62;
	&#60;li&#62;
		&#60;a href="&#60;?php the_permalink() ?&#62;" rel="bookmark"&#62;&#60;?php the_title(); ?&#62;&#60;/a&#62;
	&#60;/li&#62;
&#60;?php endwhile; ?&#62;
&#60;/ul&#62;



Related posts:Did you know about db4o &#8211; a brilliant object oriented database  Db4o. It's an object oriented database. It's so simple,...



Related posts:<ol><li><a href='http://www.hieu.co.uk/blog/index.php/2010/01/27/did-you-know-about-db4o-a-brilliant-object-oriented-database/' rel='bookmark' title='Permanent Link: Did you know about db4o &#8211; a brilliant object oriented database'>Did you know about db4o &#8211; a brilliant object oriented database</a> <small> Db4o. It's an object oriented database. It's so simple,...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://www.hieu.co.uk/blog/index.php/2009/04/24/recent-posts-from-specific-category/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get directory size</title>
		<link>http://www.hieu.co.uk/blog/index.php/2009/04/22/get-directory-size/</link>
		<comments>http://www.hieu.co.uk/blog/index.php/2009/04/22/get-directory-size/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 14:13:13 +0000</pubDate>
		<dc:creator>HieuUK</dc:creator>
				<category><![CDATA[C#.NET Code]]></category>

		<guid isPermaLink="false">http://www.hieu.co.uk/blog/index.php/2009/04/22/get-directory-size/</guid>
		<description><![CDATA[Using trace back to get the size of a specific directory.

public long getDirSize(System.IO.DirectoryInfo dir)
{
	long size = 0;
	System.IO.DirectoryInfo[] dirs = dir.GetDirectories();
	System.IO.FileInfo[] files = dir.GetFiles();

	foreach (System.IO.FileInfo fi in files)
		size += fi.Length;

	foreach (System.IO.DirectoryInfo di in dirs)
		size += getDirSize(di);
	return size;
}



Related posts:I&#8217;m on holiday  I'm currently on a long vacation. Unfortunately, I can’t...
Application to fix case sensitive problem when [...]


Related posts:<ol><li><a href='http://www.hieu.co.uk/blog/index.php/2009/08/12/im-on-holiday/' rel='bookmark' title='Permanent Link: I&#8217;m on holiday'>I&#8217;m on holiday</a> <small> I'm currently on a long vacation. Unfortunately, I can’t...</small></li>
<li><a href='http://www.hieu.co.uk/blog/index.php/2010/01/20/application-to-fix-case-sensitive-problem-when-move-your-website-website-to-linux-server/' rel='bookmark' title='Permanent Link: Application to fix case sensitive problem when move your website website to linux server'>Application to fix case sensitive problem when move your website website to linux server</a> <small> I have a trouble with case sensitive when moving...</small></li>
<li><a href='http://www.hieu.co.uk/blog/index.php/2010/02/09/css-tidy-up-tidy-up-all-your-css-online-or-offline/' rel='bookmark' title='Permanent Link: CSS Tidy Up &#8211; Tidy up all your css online or offline'>CSS Tidy Up &#8211; Tidy up all your css online or offline</a> <small> Finally posted one of my favourite web dev tool...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://www.hieu.co.uk/blog/index.php/2009/04/22/get-directory-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FTP Upload file</title>
		<link>http://www.hieu.co.uk/blog/index.php/2009/04/21/ftp-upload-file/</link>
		<comments>http://www.hieu.co.uk/blog/index.php/2009/04/21/ftp-upload-file/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 15:48:03 +0000</pubDate>
		<dc:creator>HieuUK</dc:creator>
				<category><![CDATA[C#.NET Code]]></category>

		<guid isPermaLink="false">http://www.hieu.co.uk/blog/index.php/2009/04/21/ftp-upload-file/</guid>
		<description><![CDATA[A code snippet upload file using FTP. With some tweak, we could also get the percentage out of this.

        void FTPUpload(string filename, string username, string password, string UploadTo)
        {

            FileInfo [...]


Related posts:<ol><li><a href='http://www.hieu.co.uk/blog/index.php/2010/01/27/did-you-know-about-db4o-a-brilliant-object-oriented-database/' rel='bookmark' title='Permanent Link: Did you know about db4o &#8211; a brilliant object oriented database'>Did you know about db4o &#8211; a brilliant object oriented database</a> <small> Db4o. It's an object oriented database. It's so simple,...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://www.hieu.co.uk/blog/index.php/2009/04/21/ftp-upload-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Application paths in C#.net</title>
		<link>http://www.hieu.co.uk/blog/index.php/2009/04/16/application-paths-in-cnet/</link>
		<comments>http://www.hieu.co.uk/blog/index.php/2009/04/16/application-paths-in-cnet/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 11:01:20 +0000</pubDate>
		<dc:creator>HieuUK</dc:creator>
				<category><![CDATA[C#.NET Code]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.hieu.co.uk/blog/?p=516</guid>
		<description><![CDATA[Application paths in C#.net
Application.ExecutablePath
return C:\projects\test\bin\debug\run.exe
Application.StartupPath
return C:\projects\test\bin\debug


Related posts:Application to fix case sensitive problem when move your website website to linux server  I have a trouble with case sensitive when moving...
Did you know about db4o &#8211; a brilliant object oriented database  Db4o. It's an object oriented database. It's so simple,...



Related posts:<ol><li><a href='http://www.hieu.co.uk/blog/index.php/2010/01/20/application-to-fix-case-sensitive-problem-when-move-your-website-website-to-linux-server/' rel='bookmark' title='Permanent Link: Application to fix case sensitive problem when move your website website to linux server'>Application to fix case sensitive problem when move your website website to linux server</a> <small> I have a trouble with case sensitive when moving...</small></li>
<li><a href='http://www.hieu.co.uk/blog/index.php/2010/01/27/did-you-know-about-db4o-a-brilliant-object-oriented-database/' rel='bookmark' title='Permanent Link: Did you know about db4o &#8211; a brilliant object oriented database'>Did you know about db4o &#8211; a brilliant object oriented database</a> <small> Db4o. It's an object oriented database. It's so simple,...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://www.hieu.co.uk/blog/index.php/2009/04/16/application-paths-in-cnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selector internal/external links</title>
		<link>http://www.hieu.co.uk/blog/index.php/2009/04/15/selector-internalexternal-links/</link>
		<comments>http://www.hieu.co.uk/blog/index.php/2009/04/15/selector-internalexternal-links/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 10:40:38 +0000</pubDate>
		<dc:creator>HieuUK</dc:creator>
				<category><![CDATA[jQuery Code]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.hieu.co.uk/blog/?p=483</guid>
		<description><![CDATA[Common selectors to choose all internal or external links
Selector to find all external links

$("a[href*='http://']:not([href*='"+location.hostname+"'])")
Selector to find all internal links
$("a[href^='/'],a[href*='"+location.hostname+"']")
]]></description>
		<wfw:commentRss>http://www.hieu.co.uk/blog/index.php/2009/04/15/selector-internalexternal-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find all the SP using specific tables or views</title>
		<link>http://www.hieu.co.uk/blog/index.php/2009/04/14/find-all-the-sp-using-specific-tables-or-views/</link>
		<comments>http://www.hieu.co.uk/blog/index.php/2009/04/14/find-all-the-sp-using-specific-tables-or-views/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 15:56:11 +0000</pubDate>
		<dc:creator>HieuUK</dc:creator>
				<category><![CDATA[SQL Code]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MSSQL]]></category>

		<guid isPermaLink="false">http://www.hieu.co.uk/blog/?p=468</guid>
		<description><![CDATA[Find in the database all the store procedures using specific tables or views.
Or list all the tables or view, which the specific Views or StoreProcudres use.

EXEC sp_depends @objname='tablename'

Sometime you want to check to see if any StoreProcedures or Views is using specific Views or StoreProcedures

SELECT DISTINCT o.name, o.xtype
FROM syscomments c
INNER JOIN sysobjects o ON c.id=o.id
WHERE [...]


Related posts:<ol><li><a href='http://www.hieu.co.uk/blog/index.php/2010/01/27/did-you-know-about-db4o-a-brilliant-object-oriented-database/' rel='bookmark' title='Permanent Link: Did you know about db4o &#8211; a brilliant object oriented database'>Did you know about db4o &#8211; a brilliant object oriented database</a> <small> Db4o. It's an object oriented database. It's so simple,...</small></li>
</ol>]]></description>
		<wfw:commentRss>http://www.hieu.co.uk/blog/index.php/2009/04/14/find-all-the-sp-using-specific-tables-or-views/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validate Email format</title>
		<link>http://www.hieu.co.uk/blog/index.php/2009/04/14/validate-email-format/</link>
		<comments>http://www.hieu.co.uk/blog/index.php/2009/04/14/validate-email-format/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 14:47:17 +0000</pubDate>
		<dc:creator>HieuUK</dc:creator>
				<category><![CDATA[C#.NET Code]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://www.hieu.co.uk/blog/?p=465</guid>
		<description><![CDATA[Check the input string if it's in correct email format or not.]]></description>
		<wfw:commentRss>http://www.hieu.co.uk/blog/index.php/2009/04/14/validate-email-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
