<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Snippet Directory</title>
	
	<link>http://www.snippetdirectory.com</link>
	<description>Free code snippet source for developers</description>
	<lastBuildDate>Sun, 18 Mar 2012 07:17:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SnippetDirectory" /><feedburner:info uri="snippetdirectory" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>SnippetDirectory</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Listing Groups of a Local or Domain User</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/Wme6BCnbbaM/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/listing-groups-of-a-local-or-domain-user-2/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 07:17:42 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1263</guid>
		<description><![CDATA[Public Function ListUsersGroups(userName As String) As List(Of Principal) &#039;Add System.DirectoryServices.AccountManagement as reference Dim insPrincipalContext As New PrincipalContext(ContextType.Machine) &#039;Connecting to local computer. &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user Dim insUserPrincipal As New UserPrincipal(insPrincipalContext) insUserPrincipal.Name = userName Dim insPrincipalSearcher As New PrincipalSearcher() insUserPrincipal = TryCast(insPrincipalSearcher.FindOne(), UserPrincipal) Return insUserPrincipal.GetGroups().ToList() End Function]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/listing-groups-of-a-local-or-domain-user-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/listing-groups-of-a-local-or-domain-user-2/</feedburner:origLink></item>
		<item>
		<title>Sending Fax</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/YjBiGzmxP0E/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/sending-fax-2/#comments</comments>
		<pubDate>Sat, 17 Mar 2012 07:47:53 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1220</guid>
		<description><![CDATA[Imports FAXCOMLib Namespace Fax Public Partial Class FaxHelper Public Sub New() End Sub Public Sub SendFax(parFileName As String, parFaxNumber As String, parSenderName As String, parDisplayName As String, parRecipientName As String) Dim insFaxServerClass As New FaxServerClass() Dim insFaxDocClass As FaxDoc = Nothing Try insFaxServerClass.Connect(Environment.MachineName) Catch ex As Exception MessageBox.Show(&#34;Error while connecting to fax server&#34;) Return End Try Try insFaxDocClass = DirectCast(insFaxServerClass.CreateDocument(parFileName), FaxDoc) Catch ex As Exception MessageBox.Show(&#34;Error while generating fax&#34;) Return End Try insFaxDocClass.FaxNumber = parFaxNumber insFaxDocClass.SenderName = parSenderName insFaxDocClass.DisplayName = parDisplayName insFaxDocClass.RecipientName = parRecipientName Try insFaxDocClass.Send() Catch generatedExceptionName As Exception MessageBox.Show(&#34;Error while sending fax&#34;) Return End Try insFaxServerClass.Disconnect() End Sub End Class End Namespace]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/sending-fax-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/sending-fax-2/</feedburner:origLink></item>
		<item>
		<title>Compressing Files Using GZip</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/DLYoLkb0XXo/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/compressing-files-using-gzip-2/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 08:46:51 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1233</guid>
		<description><![CDATA[Public Shared Sub Zip(sourceFilePath As String, destinationFilePath As String) Dim insOutputFileStream As FileStream = Nothing Dim insGZipStream As GZipStream = Nothing Dim insInputFileStream As FileStream = Nothing Try insOutputFileStream = New FileStream(destinationFilePath, FileMode.Create) insGZipStream = New GZipStream(insOutputFileStream, CompressionMode.Compress, True) insInputFileStream = New FileStream(sourceFilePath, FileMode.Open) Dim buffer As Byte() = New Byte(insInputFileStream.Length - 1) {} Dim count As Integer = insInputFileStream.Read(buffer, 0, buffer.Length) insGZipStream.Write(buffer, 0, buffer.Length) Catch generatedExceptionName As Exception Throw Finally insInputFileStream.Close() insGZipStream.Close() insOutputFileStream.Close() End Try End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/compressing-files-using-gzip-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/compressing-files-using-gzip-2/</feedburner:origLink></item>
		<item>
		<title>Getting Current User Information in Windows Applications</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/4G8o3pYE1pg/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/getting-current-user-information-in-windows-applications-2/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 09:39:00 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1432</guid>
		<description><![CDATA[Dim user as String= System.Environment.UserDomainName &#38; &#34;\&#34; &#38; System.Environment.UserName]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/getting-current-user-information-in-windows-applications-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/getting-current-user-information-in-windows-applications-2/</feedburner:origLink></item>
		<item>
		<title>Decompressing Files Using GZip</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/_GEVVAVd1iY/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/decompressing-files-using-gzip-2/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 06:45:55 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1234</guid>
		<description><![CDATA[Public Shared Sub Unzip(sourceFilePath As String, destinationFilePath As String) Dim insOutputFileStream As FileStream = Nothing Dim insGZipStream As GZipStream = Nothing Dim insInputFileStream As FileStream = Nothing Try insInputFileStream = New FileStream(sourceFilePath, FileMode.Open, FileAccess.Read, FileShare.Read) insGZipStream = New GZipStream(insInputFileStream, CompressionMode.Decompress) insOutputFileStream = New FileStream(destinationFilePath, FileMode.CreateNew) Dim offset As Integer = 0 Dim totalBytes As Integer = 0 Dim smallBuffer As Byte() = New Byte(99) {} While True Dim bytesRead As Integer = insGZipStream.Read(smallBuffer, 0, 100) If bytesRead = 0 Then Exit While End If offset += bytesRead totalBytes += bytesRead insOutputFileStream.Write(smallBuffer, 0, smallBuffer.Length) End While Catch generatedExceptionName As Exception Throw Finally insInputFileStream.Close() insGZipStream.Close() insOutputFileStream.Close() End Try End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/decompressing-files-using-gzip-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/decompressing-files-using-gzip-2/</feedburner:origLink></item>
		<item>
		<title>Getting Current User Information in Windows Applications</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/duo4YT8dUfI/</link>
		<comments>http://www.snippetdirectory.com/csharp/getting-current-user-information-in-windows-applications/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 09:34:47 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1399</guid>
		<description><![CDATA[string user = System.Environment.UserDomainName + @&#34;\&#34; + System.Environment.UserName;]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/getting-current-user-information-in-windows-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/getting-current-user-information-in-windows-applications/</feedburner:origLink></item>
		<item>
		<title>Enumeration Types As Bit Flags – Assigning and Comparing Multiple Enum Values</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/sSuPHhgiMa4/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/enumeration-types-as-bit-flags-assigning-and-comparing-multiple-enum-values-2/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 09:15:06 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1384</guid>
		<description><![CDATA[Public Enum Days Monday Tuesday Wednesday Thursday Friday Saturday Sunday End Enum Sub Main() Dim d As Days = Days.Monday Or Days.Tuesday Or Days.Wednesday If (d And Days.Monday) = Days.Monday Then Console.WriteLine(&#34;Monday Selected&#34;) End If If (d And Days.Tuesday) = Days.Tuesday Then Console.WriteLine(&#34;Tuesday Selected&#34;) End If If (d And Days.Friday) = Days.Friday Then Console.WriteLine(&#34;Friday Selected&#34;) End If Console.Read() End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/enumeration-types-as-bit-flags-assigning-and-comparing-multiple-enum-values-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/enumeration-types-as-bit-flags-assigning-and-comparing-multiple-enum-values-2/</feedburner:origLink></item>
		<item>
		<title>Listing Local Or Domain Groups</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/n3tGj_GJIhg/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/listing-local-or-domain-groups-2/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 07:44:30 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1255</guid>
		<description><![CDATA[Public Function ListGroups(groupName As String) As List(Of Principal) &#039;Add System.DirectoryServices.AccountManagement as reference Dim insPrincipalContext As New PrincipalContext(ContextType.Machine) &#039;Connecting to local computer. &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user Dim insGroupPrincipal As New GroupPrincipal(insPrincipalContext) If String.IsNullOrEmpty(groupName) Then insGroupPrincipal.Name = &#34;*&#34; Else insGroupPrincipal.Name = &#34;*&#34; &#38; groupName &#38; &#34;*&#34; End If Dim insPrincipalSearcher As New PrincipalSearcher() insPrincipalSearcher.QueryFilter = insGroupPrincipal Dim results As PrincipalSearchResult(Of Principal) = insPrincipalSearcher.FindAll() Return results.ToList() End Function]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/listing-local-or-domain-groups-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/listing-local-or-domain-groups-2/</feedburner:origLink></item>
		<item>
		<title>Checking if the Operating System is 64bit or 32bit</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/K48JwxE_oto/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/checking-if-the-operating-system-is-64bit-or-32bit-2/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 09:33:43 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1427</guid>
		<description><![CDATA[Dim is64Bit as Boolean= System.Environment.Is64BitOperatingSystem]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/checking-if-the-operating-system-is-64bit-or-32bit-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/checking-if-the-operating-system-is-64bit-or-32bit-2/</feedburner:origLink></item>
		<item>
		<title>Creating Local or Domain Group</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/PcgXJE1m3NQ/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/creating-local-or-domain-group-2/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 06:22:51 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1258</guid>
		<description><![CDATA[Public Sub CreateGroup(name As String) &#039;Add System.DirectoryServices.AccountManagement as reference Dim insPrincipalContext As New PrincipalContext(ContextType.Machine) &#039;Connecting to local computer. &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user Dim insGroupPrincipal As New GroupPrincipal(insPrincipalContext, name) insGroupPrincipal.Save() insGroupPrincipal.Dispose() End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/creating-local-or-domain-group-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/creating-local-or-domain-group-2/</feedburner:origLink></item>
		<item>
		<title>Getting Operating System Version in Windows Applications</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/LAg-BDP0Bv0/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/getting-operating-system-version-in-windows-applications-2/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 09:11:50 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1410</guid>
		<description><![CDATA[Dim version as string= System.Environment.Version.ToString() or Dim version as string = System.Environment.OSVersion.ToString() &#38;nbsp;]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/getting-operating-system-version-in-windows-applications-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/getting-operating-system-version-in-windows-applications-2/</feedburner:origLink></item>
		<item>
		<title>Creating Local or Domain User</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/v4TH8OUHIs8/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/creating-local-or-domain-user-2/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 06:24:43 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1257</guid>
		<description><![CDATA[Public Sub CreateUser(name As String, password As String) &#039;Add System.DirectoryServices.AccountManagement as reference Dim insPrincipalContext As New PrincipalContext(ContextType.Machine) &#039;Connecting to local computer. &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user Dim insUserPrincipal As New UserPrincipal(insPrincipalContext, name, password, True) insUserPrincipal.Save() insUserPrincipal.Dispose() End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/creating-local-or-domain-user-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/creating-local-or-domain-user-2/</feedburner:origLink></item>
		<item>
		<title>Checking if the Operating System is 64bit or 32bit</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/8fv24WswthI/</link>
		<comments>http://www.snippetdirectory.com/csharp/checking-if-the-operating-system-is-64bit-or-32bit/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 09:31:10 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1401</guid>
		<description><![CDATA[bool is64Bit = System.Environment.Is64BitOperatingSystem;]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/checking-if-the-operating-system-is-64bit-or-32bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/checking-if-the-operating-system-is-64bit-or-32bit/</feedburner:origLink></item>
		<item>
		<title>Rounding Decimal Numbers with Javascript</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/YCcUXsyFwlw/</link>
		<comments>http://www.snippetdirectory.com/javascript/rounding-decimal-numbers-with-javascript/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 09:27:19 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1392</guid>
		<description><![CDATA[function round_decimals(original_number, decimals) { var result1 = original_number * Math.pow(10, decimals) var result2 = Math.round(result1) var result3 = result2 / Math.pow(10, decimals) return pad_with_zeros(result3, decimals) } function pad_with_zeros(rounded_value, decimal_places) { // Convert the number to a string var value_string = rounded_value.toString() // Locate the decimal point var decimal_location = value_string.indexOf(&#34;.&#34;) // Is there a decimal point? if (decimal_location == -1) { // If no, then all decimal places will be padded with 0s decimal_part_length = 0 // If decimal_places is greater than zero, tack on a decimal point value_string += decimal_places &#62; 0 ? &#34;.&#34; : &#34;&#34; } else { // If yes, then only the extra decimal places will be padded with 0s decimal_part_length = value_string.length - decimal_location - 1 } // Calculate the number of decimal places that need to be padded with 0s var pad_total = decimal_places - decimal_part_length if (pad_total &#62; 0) { // Pad the string with 0s for (var counter = 1; counter &#60;= pad_total; counter++) value_string += &#34;0&#34; } return value_string }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/javascript/rounding-decimal-numbers-with-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/javascript/rounding-decimal-numbers-with-javascript/</feedburner:origLink></item>
		<item>
		<title>Adding User to a Local or Domain Group</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/mD42YLvGq1E/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/adding-user-to-a-local-or-domain-group-2/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 08:13:21 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1264</guid>
		<description><![CDATA[Public Sub AddUserToGroup(groupName As String, userName As String) &#039;Add System.DirectoryServices.AccountManagement as reference Dim insPrincipalContext As New PrincipalContext(ContextType.Machine) &#039;Connecting to local computer. &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user Dim insGroupPrincipal As New GroupPrincipal(insPrincipalContext) insGroupPrincipal.Name = groupName Dim insPrincipalSearcher As New PrincipalSearcher() insGroupPrincipal = TryCast(insPrincipalSearcher.FindOne(), GroupPrincipal) Dim insUserPrincipal As New UserPrincipal(insPrincipalContext) insUserPrincipal.Name = userName insUserPrincipal = TryCast(insPrincipalSearcher.FindOne(), UserPrincipal) If Not insGroupPrincipal.Members.Contains(insUserPrincipal) Then insGroupPrincipal.Members.Add(insUserPrincipal) insGroupPrincipal.Save() insGroupPrincipal.Dispose() End If End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/adding-user-to-a-local-or-domain-group-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/adding-user-to-a-local-or-domain-group-2/</feedburner:origLink></item>
		<item>
		<title>Listing Drives and Reading Drive Info</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/lRPmHPW7gEM/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/listing-drives-and-reading-drive-info-2/#comments</comments>
		<pubDate>Sat, 03 Mar 2012 10:48:55 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1218</guid>
		<description><![CDATA[Private Shared Sub PrintDriveInfo() For Each insDriveInfo As DriveInfo In DriveInfo.GetDrives() Console.WriteLine(&#34;Drive : &#34; + insDriveInfo.Name) Console.WriteLine(&#34;Is Ready : &#34; &#38; insDriveInfo.IsReady.ToString()) If insDriveInfo.IsReady Then Console.WriteLine(&#34;Label : &#34; + insDriveInfo.VolumeLabel) Console.WriteLine(&#34;Format : &#34; + insDriveInfo.DriveFormat) Console.WriteLine(&#34;Type : &#34; &#38; insDriveInfo.DriveType.ToString()) Console.WriteLine(&#34;Root : &#34; &#38; insDriveInfo.RootDirectory.ToString()) Console.WriteLine(&#34;Total Size : &#34; &#38; ConvertToGb(insDriveInfo.TotalSize).ToString() &#38; &#34; GB&#34;) Console.WriteLine(&#34;Available Free Space : &#34; &#38; ConvertToGb(insDriveInfo.AvailableFreeSpace).ToString() &#38; &#34; GB&#34;) Console.WriteLine(&#34;Total Free Space : &#34; &#38; ConvertToGb(insDriveInfo.TotalFreeSpace).ToString() &#38; &#34; GB&#34;) Console.WriteLine() End If Next Console.ReadLine() End Sub Private Shared Function ConvertToGb(l As Long) As Decimal Return Math.Round(Convert.ToDecimal(l) / 1024 \ 1024 \ 1024, 2) End Function]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/listing-drives-and-reading-drive-info-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/listing-drives-and-reading-drive-info-2/</feedburner:origLink></item>
		<item>
		<title>Deleting Local or Domain User</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/qLazCzc4pG4/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/deleting-local-or-domain-user-2/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 06:21:53 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1259</guid>
		<description><![CDATA[Public Sub DeleteUser(name As String) &#039;Add System.DirectoryServices.AccountManagement as reference Dim insPrincipalContext As New PrincipalContext(ContextType.Machine) &#039;Connecting to local computer. &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user Dim insUserPrincipal As New UserPrincipal(insPrincipalContext) insUserPrincipal.Name = name Dim insPrincipalSearcher As New PrincipalSearcher() insUserPrincipal = TryCast(insPrincipalSearcher.FindOne(), UserPrincipal) insUserPrincipal.Delete() insUserPrincipal.Dispose() End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/deleting-local-or-domain-user-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/deleting-local-or-domain-user-2/</feedburner:origLink></item>
		<item>
		<title>Listing Local Or Domain Users</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/UCP5Kjv5kQo/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/listing-local-or-domain-users-2/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 06:43:08 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1256</guid>
		<description><![CDATA[Public Function ListUsers(userName As String) As List(Of Principal) &#039;Add System.DirectoryServices.AccountManagement as reference Dim insPrincipalContext As New PrincipalContext(ContextType.Machine) &#039;Connecting to local computer. &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user Dim insUserPrincipal As New UserPrincipal(insPrincipalContext) If String.IsNullOrEmpty(userName) Then insUserPrincipal.Name = &#34;*&#34; Else insUserPrincipal.Name = &#34;*&#34; &#38; userName &#38; &#34;*&#34; End If Dim insPrincipalSearcher As New PrincipalSearcher() insPrincipalSearcher.QueryFilter = insUserPrincipal Dim results As PrincipalSearchResult(Of Principal) = insPrincipalSearcher.FindAll() Return results.ToList() End Function]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/listing-local-or-domain-users-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/listing-local-or-domain-users-2/</feedburner:origLink></item>
		<item>
		<title>String Is a Valid Date in DMY Format</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/8IVL0s-xxmE/</link>
		<comments>http://www.snippetdirectory.com/javascript/string-is-a-valid-date-in-dmy-format/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 09:28:31 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1394</guid>
		<description><![CDATA[function funcIsDate(val) { var d=0; var m=0; var y=0; var elems = val.split(&#039;/&#039;) d=elems[0]; m=elems[1]; y=elems[2]; if ((m==1 &#124;&#124; m==3 &#124;&#124; m==5 &#124;&#124; m==7 &#124;&#124; m==8 &#124;&#124; m==10 &#124;&#124; m==12) &#38;&#38; (d&#60;=31)) { return true; } else { if ((m==4 &#124;&#124; m==6 &#124;&#124; m==9 &#124;&#124; m==11) &#38;&#38; (d&#60;=30)) { return true; } else { if ((m==2) &#38;&#38; (d&#60;=28)) { return true; } else { if ((m==2) &#38;&#38; (y % 4 ==0) &#38;&#38; (d&#60;=29)) { return true; } else { return false; } } } } }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/javascript/string-is-a-valid-date-in-dmy-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/javascript/string-is-a-valid-date-in-dmy-format/</feedburner:origLink></item>
		<item>
		<title>Deleting Local or Domain Group</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/HQ5VSAaiveY/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/deleting-local-or-domain-group-2/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 07:20:06 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1260</guid>
		<description><![CDATA[Public Sub DeleteGroup(name As String) &#039;Add System.DirectoryServices.AccountManagement as reference Dim insPrincipalContext As New PrincipalContext(ContextType.Machine) &#039;Connecting to local computer. &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user Dim insGroupPrincipal As New GroupPrincipal(insPrincipalContext) insGroupPrincipal.Name = name Dim insPrincipalSearcher As New PrincipalSearcher() insGroupPrincipal = TryCast(insPrincipalSearcher.FindOne(), GroupPrincipal) insGroupPrincipal.Delete() insGroupPrincipal.Dispose() End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/deleting-local-or-domain-group-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/deleting-local-or-domain-group-2/</feedburner:origLink></item>
		<item>
		<title>Listing Users of a Local or Domain Group</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/f-d4ZUfhX14/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/listing-users-of-a-local-or-domain-group-2/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 06:18:43 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1261</guid>
		<description><![CDATA[Public Function ListGroupsUsers(groupName As String) As List(Of Principal) &#039;Add System.DirectoryServices.AccountManagement as reference Dim insPrincipalContext As New PrincipalContext(ContextType.Machine) &#039;Connecting to local computer. &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user Dim insGroupPrincipal As New GroupPrincipal(insPrincipalContext) insGroupPrincipal.Name = groupName Dim insPrincipalSearcher As New PrincipalSearcher() insGroupPrincipal = TryCast(insPrincipalSearcher.FindOne(), GroupPrincipal) Return insGroupPrincipal.Members.ToList() End Function]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/listing-users-of-a-local-or-domain-group-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/listing-users-of-a-local-or-domain-group-2/</feedburner:origLink></item>
		<item>
		<title>Removing User from a Local or Domain Group</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/EQlDmdKVeXM/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/removing-user-from-a-local-or-domain-group-2/#comments</comments>
		<pubDate>Sun, 26 Feb 2012 06:16:19 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1265</guid>
		<description><![CDATA[Public Sub RemoveUserFromGroup(groupName As String, userName As String) &#039;Add System.DirectoryServices.AccountManagement as reference Dim insPrincipalContext As New PrincipalContext(ContextType.Machine) &#039;Connecting to local computer. &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user Dim insGroupPrincipal As New GroupPrincipal(insPrincipalContext) insGroupPrincipal.Name = groupName Dim insPrincipalSearcher As New PrincipalSearcher() insGroupPrincipal = TryCast(insPrincipalSearcher.FindOne(), GroupPrincipal) Dim insUserPrincipal As New UserPrincipal(insPrincipalContext) insUserPrincipal.Name = userName insUserPrincipal = TryCast(insPrincipalSearcher.FindOne(), UserPrincipal) If insGroupPrincipal.Members.Contains(insUserPrincipal) Then insGroupPrincipal.Members.Remove(insUserPrincipal) insGroupPrincipal.Save() insGroupPrincipal.Dispose() End If End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/removing-user-from-a-local-or-domain-group-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/removing-user-from-a-local-or-domain-group-2/</feedburner:origLink></item>
		<item>
		<title>Changing Password Of a Local or Domain User</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/C96lST9fSWQ/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/changing-password-of-a-local-or-domain-user-2/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 08:11:54 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1266</guid>
		<description><![CDATA[Public Sub ChangePassword(userName As String, newPassword As String) &#039;Add System.DirectoryServices.AccountManagement as reference Dim insPrincipalContext As New PrincipalContext(ContextType.Machine) &#039;Connecting to local computer. &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user Dim insUserPrincipal As New UserPrincipal(insPrincipalContext) insUserPrincipal.Name = userName Dim insPrincipalSearcher As New PrincipalSearcher() insUserPrincipal = TryCast(insPrincipalSearcher.FindOne(), UserPrincipal) insUserPrincipal.SetPassword(newPassword) insUserPrincipal.Save() insUserPrincipal.Dispose() End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/changing-password-of-a-local-or-domain-user-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/changing-password-of-a-local-or-domain-user-2/</feedburner:origLink></item>
		<item>
		<title>Validating Local or Domain User Credentials</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/Xm7RDx1Bj44/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/validating-local-or-domain-user-credentials-2/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 07:10:34 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1267</guid>
		<description><![CDATA[Public Function ValidateUser(userName As String, password As String) As Boolean &#039;Add System.DirectoryServices.AccountManagement as reference Dim insPrincipalContext As New PrincipalContext(ContextType.Machine) &#039;Connecting to local computer. &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory &#039;PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user Return insPrincipalContext.ValidateCredentials(userName, password) End Function]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/validating-local-or-domain-user-credentials-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/validating-local-or-domain-user-credentials-2/</feedburner:origLink></item>
		<item>
		<title>Listing Drives and Reading Drive Info</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/nBX-NL0MfUE/</link>
		<comments>http://www.snippetdirectory.com/csharp/listing-drives-and-reading-drive-info/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 15:08:40 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1215</guid>
		<description><![CDATA[static void PrintDriveInfo() { foreach (DriveInfo insDriveInfo in DriveInfo.GetDrives()) { Console.WriteLine(&#34;Drive : &#34; + insDriveInfo.Name); Console.WriteLine(&#34;Is Ready : &#34; + insDriveInfo.IsReady.ToString()); if (insDriveInfo.IsReady) { Console.WriteLine(&#34;Label : &#34; + insDriveInfo.VolumeLabel); Console.WriteLine(&#34;Format : &#34; + insDriveInfo.DriveFormat); Console.WriteLine(&#34;Type : &#34; + insDriveInfo.DriveType.ToString()); Console.WriteLine(&#34;Root : &#34; + insDriveInfo.RootDirectory.ToString()); Console.WriteLine(&#34;Total Size : &#34; + ConvertToGb(insDriveInfo.TotalSize).ToString() + &#34; GB&#34;); Console.WriteLine(&#34;Available Free Space : &#34; + ConvertToGb(insDriveInfo.AvailableFreeSpace).ToString() + &#34; GB&#34;); Console.WriteLine(&#34;Total Free Space : &#34; + ConvertToGb(insDriveInfo.TotalFreeSpace).ToString() + &#34; GB&#34;); Console.WriteLine(); } } Console.ReadLine(); } static decimal ConvertToGb(long l) { return Math.Round(Convert.ToDecimal(l) / 1024 / 1024 / 1024, 2); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/listing-drives-and-reading-drive-info/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/listing-drives-and-reading-drive-info/</feedburner:origLink></item>
		<item>
		<title>Convert String To Date</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/u1Tla2vQ114/</link>
		<comments>http://www.snippetdirectory.com/javascript/convert-string-to-date/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 09:29:50 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1393</guid>
		<description><![CDATA[function ConvertStringToDate(val) { var d=0; var m=0; var y=0; var elems = val.split(&#039;/&#039;) if (elems.length==1) { elems = val.split(&#039;.&#039;) } d=elems[0]; m=elems[1]; y=elems[2]; return d + &#039;/&#039; + m + &#039;/&#039; + y; }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/javascript/convert-string-to-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/javascript/convert-string-to-date/</feedburner:origLink></item>
		<item>
		<title>IsNumeric Function in Javascript</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/7MBZ9bVnvkk/</link>
		<comments>http://www.snippetdirectory.com/javascript/isnumeric-function-in-javascript/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 09:25:49 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1395</guid>
		<description><![CDATA[function IsNumeric(sText) { var ValidChars = &#34;0123456789,&#34;; var IsNumber=true; var Char; for (i = 0; i &#60; sText.length &#38;&#38; IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/javascript/isnumeric-function-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/javascript/isnumeric-function-in-javascript/</feedburner:origLink></item>
		<item>
		<title>Sending Fax</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/hUJRZKDvBBM/</link>
		<comments>http://www.snippetdirectory.com/csharp/sending-fax/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 07:07:18 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1219</guid>
		<description><![CDATA[using FAXCOMLib; namespace Fax { public partial class FaxHelper { public FaxHelper() { } public void SendFax(string parFileName, string parFaxNumber, string parSenderName, string parDisplayName, string parRecipientName) { FaxServerClass insFaxServerClass = new FaxServerClass(); FaxDoc insFaxDocClass = null; try { insFaxServerClass.Connect(Environment.MachineName); } catch (Exception ex) { MessageBox.Show(&#34;Error while connecting to fax server&#34;); return; } try { insFaxDocClass = (FaxDoc)insFaxServerClass.CreateDocument(parFileName); } catch (Exception ex) { MessageBox.Show(&#34;Error while generating fax&#34;); return; } insFaxDocClass.FaxNumber = parFaxNumber; insFaxDocClass.SenderName = parSenderName; insFaxDocClass.DisplayName = parDisplayName; insFaxDocClass.RecipientName = parRecipientName; try { insFaxDocClass.Send(); } catch (Exception) { MessageBox.Show(&#34;Error while sending fax&#34;); return; } insFaxServerClass.Disconnect(); } } }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/sending-fax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/sending-fax/</feedburner:origLink></item>
		<item>
		<title>IsDecimal Function in Javascript</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/-GI7Lm5MrTk/</link>
		<comments>http://www.snippetdirectory.com/javascript/isdecimal-function-in-javascript/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 09:24:45 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1396</guid>
		<description><![CDATA[function IsDecimal(sText) { var ValidChars = &#34;0123456789.,&#34;; var IsNumber=true; var Char; for (i = 0; i &#60; sText.length &#38;&#38; IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/javascript/isdecimal-function-in-javascript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/javascript/isdecimal-function-in-javascript/</feedburner:origLink></item>
		<item>
		<title>IsEmail Function – Validating Email Format in Javascript</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/Bp4eP75DP5A/</link>
		<comments>http://www.snippetdirectory.com/javascript/isemail-function-validating-email-format-in-javascript/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 09:23:15 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1397</guid>
		<description><![CDATA[function IsEMail(str) { var at=&#34;@&#34; var dot=&#34;.&#34; var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1){ return false } if (str.indexOf(at)==-1 &#124;&#124; str.indexOf(at)==0 &#124;&#124; str.indexOf(at)==lstr){ return false } if (str.indexOf(dot)==-1 &#124;&#124; str.indexOf(dot)==0 &#124;&#124; str.indexOf(dot)==lstr){ return false } if (str.indexOf(at,(lat+1))!=-1){ return false } if (str.substring(lat-1,lat)==dot &#124;&#124; str.substring(lat+1,lat+2)==dot){ return false } if (str.indexOf(dot,(lat+2))==-1){ return false } if (str.indexOf(&#34; &#34;)!=-1){ return false } if(str.substr(ldot+1).length&#60;2) { return false; } return true }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/javascript/isemail-function-validating-email-format-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/javascript/isemail-function-validating-email-format-in-javascript/</feedburner:origLink></item>
		<item>
		<title>Convert Image to Grayscale</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/pB1mypNOLOk/</link>
		<comments>http://www.snippetdirectory.com/csharp/convert-image-to-grayscale/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 07:06:17 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1235</guid>
		<description><![CDATA[public static Image ConvertToGrayScale(Image orginalImage) { Bitmap newImage = new Bitmap(orginalImage); BitmapData orginalData = (orginalImage as Bitmap).LockBits(new Rectangle(0, 0, orginalImage.Width, orginalImage.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); BitmapData newData = (newImage as Bitmap).LockBits(new Rectangle(0, 0, orginalImage.Width, orginalImage.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); int orginalstride = orginalData.Stride; System.IntPtr orginalScan0 = orginalData.Scan0; int newstride = newData.Stride; System.IntPtr newScan0 = newData.Scan0; unsafe { byte* pOrginal = (byte*)(void*)orginalScan0; byte* pNew = (byte*)(void*)newScan0; int nOffset = orginalstride - orginalImage.Width * 3; byte red, green, blue; for (int y = 0; y &#60; orginalImage.Height; ++y) { for (int x = 0; x &#60; orginalImage.Width; ++x) { blue = pOrginal[0]; green = pOrginal[1]; red = pOrginal[2]; byte newPixel = Convert.ToByte((blue + red + green) / 3); pNew[0] = newPixel; pNew[1] = newPixel; pNew[2] = newPixel; pOrginal += 3; pNew += 3; } pOrginal += nOffset; pNew += nOffset; } } (orginalImage as Bitmap).UnlockBits(orginalData); (newImage as Bitmap).UnlockBits(newData); return newImage; }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/convert-image-to-grayscale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/convert-image-to-grayscale/</feedburner:origLink></item>
		<item>
		<title>Convert Image to Negative</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/MTK-4kU8zPY/</link>
		<comments>http://www.snippetdirectory.com/csharp/convert-image-to-negative/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 06:03:40 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1236</guid>
		<description><![CDATA[public static Image ConvertToNegative(Image orginalImage) { Bitmap newImage = new Bitmap(orginalImage); BitmapData orginalData = (orginalImage as Bitmap).LockBits(new Rectangle(0, 0, orginalImage.Width, orginalImage.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); BitmapData newData = (newImage as Bitmap).LockBits(new Rectangle(0, 0, orginalImage.Width, orginalImage.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); int orginalstride = orginalData.Stride; System.IntPtr orginalScan0 = orginalData.Scan0; int newstride = newData.Stride; System.IntPtr newScan0 = newData.Scan0; unsafe { byte* pOrginal = (byte*)(void*)orginalScan0; byte* pNew = (byte*)(void*)newScan0; int nOffset = orginalstride - orginalImage.Width * 3; byte red, green, blue; for (int y = 0; y &#60; orginalImage.Height; ++y) { for (int x = 0; x &#60; orginalImage.Width; ++x) { blue = pOrginal[0]; green = pOrginal[1]; red = pOrginal[2]; byte newPixel = Convert.ToByte((blue + red + green) / 3); pNew[0] = Convert.ToByte(255 - newPixel); pNew[1] = Convert.ToByte(255 - newPixel); pNew[2] = Convert.ToByte(255 - newPixel); pOrginal += 3; pNew += 3; } pOrginal += nOffset; pNew += nOffset; } } (orginalImage as Bitmap).UnlockBits(orginalData); (newImage as Bitmap).UnlockBits(newData); return newImage; }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/convert-image-to-negative/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/convert-image-to-negative/</feedburner:origLink></item>
		<item>
		<title>Trim Frunction in Javascript</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/2k4Hyec6-qw/</link>
		<comments>http://www.snippetdirectory.com/javascript/trim-frunction-in-javascript/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 12:20:50 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1398</guid>
		<description><![CDATA[function trim(stringToTrim) { return stringToTrim.replace(/^\s+&#124;\s+$/g,&#34;&#34;); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/javascript/trim-frunction-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/javascript/trim-frunction-in-javascript/</feedburner:origLink></item>
		<item>
		<title>Conditional Operator in C# ?:</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/Xep9aoNFL7g/</link>
		<comments>http://www.snippetdirectory.com/csharp/conditional-operator-in-c/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 09:18:46 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1382</guid>
		<description><![CDATA[Syntax: (Condition?true statement:false statement); Example int i=5; string sign=(i&#62;0?&#34;+&#34;:&#34;-&#34;);]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/conditional-operator-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/conditional-operator-in-c/</feedburner:origLink></item>
		<item>
		<title>Apply Color Filter to Image</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/Axk3Ksvz4MQ/</link>
		<comments>http://www.snippetdirectory.com/csharp/apply-color-filter-to-image/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 07:40:39 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1237</guid>
		<description><![CDATA[public static Image ColorFilter(Image orginalImage, bool redFilter, bool greenFilter, bool blueFilter) { Bitmap newImage = new Bitmap(orginalImage); BitmapData orginalData = (orginalImage as Bitmap).LockBits(new Rectangle(0, 0, orginalImage.Width, orginalImage.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); BitmapData newData = (newImage as Bitmap).LockBits(new Rectangle(0, 0, orginalImage.Width, orginalImage.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); int orginalstride = orginalData.Stride; System.IntPtr orginalScan0 = orginalData.Scan0; int newstride = newData.Stride; System.IntPtr newScan0 = newData.Scan0; unsafe { byte* pOrginal = (byte*)(void*)orginalScan0; byte* pNew = (byte*)(void*)newScan0; int nOffset = orginalstride - orginalImage.Width * 3; byte red, green, blue; for (int y = 0; y &#60; orginalImage.Height; ++y) { for (int x = 0; x &#60; orginalImage.Width; ++x) { blue = pOrginal[0]; green = pOrginal[1]; red = pOrginal[2]; if (blueFilter) { pNew[0] = blue; } else { pNew[0] = 0; } if (greenFilter) { pNew[1] = green; } else { pNew[1] = 0; } if (redFilter) { pNew[2] = red; } else { pNew[2] = 0; } pOrginal += 3; pNew += 3; } pOrginal += nOffset; pNew += nOffset; } } (orginalImage as Bitmap).UnlockBits(orginalData); (newImage as Bitmap).UnlockBits(newData); return newImage; }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/apply-color-filter-to-image/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/apply-color-filter-to-image/</feedburner:origLink></item>
		<item>
		<title>Convert Image to Sepia</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/KmMyH9Cpc1Q/</link>
		<comments>http://www.snippetdirectory.com/csharp/convert-image-to-sepia/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 07:00:54 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1238</guid>
		<description><![CDATA[public static Image ConvertToSepia(Image orginalImage) { Bitmap newImage = new Bitmap(orginalImage); BitmapData orginalData = (orginalImage as Bitmap).LockBits(new Rectangle(0, 0, orginalImage.Width, orginalImage.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); BitmapData newData = (newImage as Bitmap).LockBits(new Rectangle(0, 0, orginalImage.Width, orginalImage.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); int orginalstride = orginalData.Stride; System.IntPtr orginalScan0 = orginalData.Scan0; int newstride = newData.Stride; System.IntPtr newScan0 = newData.Scan0; unsafe { byte* pOrginal = (byte*)(void*)orginalScan0; byte* pNew = (byte*)(void*)newScan0; int nOffset = orginalstride - orginalImage.Width * 3; byte red, green, blue; for (int y = 0; y &#60; orginalImage.Height; ++y) { for (int x = 0; x &#60; orginalImage.Width; ++x) { blue = pOrginal[0]; green = pOrginal[1]; red = pOrginal[2]; int newRed = red * 393 / 1000 + green * 769 / 1000 + blue * 189 / 1000; int newGreen = red * 349 / 1000 + green * 686 / 1000 + blue * 168 / 1000; int newBlue = red * 272 / 1000 + green * 534 / 1000 + blue * 131 / 1000; newRed = Math.Min(newRed, 255); newGreen = Math.Min(newGreen, 255); newBlue = Math.Min(newBlue, 255); pNew[0] = Convert.ToByte(newBlue); pNew[1] = Convert.ToByte(newGreen); pNew[2] = Convert.ToByte(newRed); pOrginal += 3; pNew += 3; } pOrginal += nOffset; pNew += nOffset; } } (orginalImage as [...]]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/convert-image-to-sepia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/convert-image-to-sepia/</feedburner:origLink></item>
		<item>
		<title>Recording Sound</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/B9C9nLHrs-o/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/recording-sound-2/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 14:17:43 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1341</guid>
		<description><![CDATA[Public NotInheritable Class SoundRecorder Private Sub New() End Sub Private Declare Ansi Function mciSendString Lib &#34;winmm.dll&#34; Alias &#34;mciSendStringA&#34; (lpstrCommand As String, lpstrReturnString As String, uReturnLength As Integer, hwndCallback As Integer) As Integer Private Shared [alias] As String = &#34;rec&#34; Public Shared Sub StartRecording() mciSendString(&#34;open new Type waveaudio Alias &#34; &#38; [alias], &#34;&#34;, 0, 0) mciSendString(&#34;record &#34; &#38; [alias], &#34;&#34;, 0, 0) End Sub Public Shared Sub SaveRecording(savePath As String) mciSendString(&#34;save &#34; &#38; [alias] &#38; &#34; &#34; &#38; savePath, &#34;&#34;, 0, 0) StopRecording() End Sub Public Shared Sub StopRecording() mciSendString(&#34;close &#34; &#38; [alias], &#34;&#34;, 0, 0) End Sub End Class]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/recording-sound-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/recording-sound-2/</feedburner:origLink></item>
		<item>
		<title>Shadow using Canvas</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/5ajYnSGyCqw/</link>
		<comments>http://www.snippetdirectory.com/html5/shadow-using-canvas/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 13:41:16 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[Html5]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1809</guid>
		<description><![CDATA[For a live sample please click here or see below the snippet &#60;!DOCTYPE html&#62; &#60;html&#62; &#60;head&#62; &#60;script language=&#34;javascript&#34;&#62; function DrawShadow() { var drawingCanvas = document.getElementById(&#039;sampleCanvas&#039;); if(drawingCanvas.getContext) { var context = drawingCanvas.getContext(&#039;2d&#039;); context.fillStyle=&#34;#0000FF&#34;; context.clearRect(0,0,600,600); context.rect(100,100,300,200) context.shadowColor=&#34;black&#34;; context.shadowOffsetX=&#34;20&#34;; context.shadowOffsetY=&#34;20&#34;; context.shadowBlur=10; context.fill(); } } &#60;/script&#62; &#60;/head&#62; &#60;body&#62; &#60;canvas id=&#34;sampleCanvas&#34; width=&#34;600&#34; height=&#34;600&#34; style=&#34;border:1px solid #000000&#34;&#62; &#60;p&#62;Your browser doesn&#039;t support canvas.&#60;/p&#62; &#60;/canvas&#62; &#60;script&#62; DrawShadow(); &#60;/script&#62; &#60;/body&#62; &#60;/html&#62;]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/html5/shadow-using-canvas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/html5/shadow-using-canvas/</feedburner:origLink></item>
		<item>
		<title>Drawing and Filling Arc and Circle using Canvas</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/vfcQ0vv-smA/</link>
		<comments>http://www.snippetdirectory.com/html5/drawing-and-filling-arc-and-circle-using-canvas/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 11:30:00 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[Html5]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1800</guid>
		<description><![CDATA[For a live sample please click here or see below the snippet &#60;!DOCTYPE html&#62; &#60;html&#62; &#60;head&#62; &#60;script language=&#34;javascript&#34;&#62; function DrawArc() { var drawingCanvas = document.getElementById(&#039;sampleCanvas&#039;); if(drawingCanvas.getContext) { var context = drawingCanvas.getContext(&#039;2d&#039;); context.clearRect(0,0,600,600); context.lineWidth=1; context.strokeStyle=&#039;#ff0000&#039;; context.fillStyle=&#039;#ff0000&#039;; var r=100;//radius var sa=0/360 * Math.PI;//set 0 for circle var ea=270/360 * 2 * Math.PI;//set 2 * Math.PI for circle var t=200; var l=200; var direction=true;//set false for anticlockwise context.beginPath(); context.arc(l,t,r,sa,ea,false); //context.closePath(); // to close arc path context.stroke(); //context.fill();//to fill inside arc } } &#60;/script&#62; &#60;/head&#62; &#60;body&#62; &#60;canvas id=&#34;sampleCanvas&#34; width=&#34;600&#34; height=&#34;600&#34; style=&#34;border:1px solid #000000&#34;&#62; &#60;p&#62;Your browser doesn&#039;t support canvas.&#60;/p&#62; &#60;/canvas&#62; &#60;script&#62; DrawArc(); &#60;/script&#62; &#60;/body&#62; &#60;/html&#62;]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/html5/drawing-and-filling-arc-and-circle-using-canvas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/html5/drawing-and-filling-arc-and-circle-using-canvas/</feedburner:origLink></item>
		<item>
		<title>Recording Sound</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/ZhcHbq-dzBA/</link>
		<comments>http://www.snippetdirectory.com/csharp/recording-sound/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 09:36:16 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1339</guid>
		<description><![CDATA[public static class SoundRecorder { [DllImport(&#34;winmm.dll&#34;, EntryPoint = &#34;mciSendStringA&#34;, CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)] private static extern int mciSendString(string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback); private static string alias = &#34;rec&#34;; public static void StartRecording() { mciSendString(&#34;open new Type waveaudio Alias &#34; + alias, &#34;&#34;, 0, 0); mciSendString(&#34;record &#34; + alias, &#34;&#34;, 0, 0); } public static void SaveRecording(string savePath) { mciSendString(&#34;save &#34; + alias + &#34; &#34; + savePath, &#34;&#34;, 0, 0); StopRecording(); } public static void StopRecording() { mciSendString(&#34;close &#34; + alias, &#34;&#34;, 0, 0); } }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/recording-sound/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/recording-sound/</feedburner:origLink></item>
		<item>
		<title>Listing Local Or Domain Groups</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/C_l_9cQ2dYQ/</link>
		<comments>http://www.snippetdirectory.com/csharp/listing-local-or-domain-groups/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 08:57:14 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1243</guid>
		<description><![CDATA[public List&#60;Principal&#62; ListGroups(string groupName) { //Add System.DirectoryServices.AccountManagement as reference PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine);//Connecting to local computer. //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user GroupPrincipal insGroupPrincipal = new GroupPrincipal(insPrincipalContext); if (string.IsNullOrEmpty(groupName)) { insGroupPrincipal.Name = &#34;*&#34;; } else { insGroupPrincipal.Name = &#34;*&#34; + groupName + &#34;*&#34;; } PrincipalSearcher insPrincipalSearcher = new PrincipalSearcher(); insPrincipalSearcher.QueryFilter = insGroupPrincipal; PrincipalSearchResult&#60;Principal&#62; results = insPrincipalSearcher.FindAll(); return results.ToList(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/listing-local-or-domain-groups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/listing-local-or-domain-groups/</feedburner:origLink></item>
		<item>
		<title>Listing Local Or Domain Users</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/8YqR8YJ8zpY/</link>
		<comments>http://www.snippetdirectory.com/csharp/listing-local-or-domain-users/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 07:56:03 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1244</guid>
		<description><![CDATA[public List&#60;Principal&#62; ListUsers(string userName) { //Add System.DirectoryServices.AccountManagement as reference PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine);//Connecting to local computer. //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user UserPrincipal insUserPrincipal = new UserPrincipal(insPrincipalContext); if (string.IsNullOrEmpty(userName)) { insUserPrincipal.Name = &#34;*&#34;; } else { insUserPrincipal.Name = &#34;*&#34; + userName + &#34;*&#34;; } PrincipalSearcher insPrincipalSearcher = new PrincipalSearcher(); insPrincipalSearcher.QueryFilter = insUserPrincipal; PrincipalSearchResult&#60;Principal&#62; results = insPrincipalSearcher.FindAll(); return results.ToList(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/listing-local-or-domain-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/listing-local-or-domain-users/</feedburner:origLink></item>
		<item>
		<title>Drawing Arc Between Two Points using Canvas</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/prVaCsUBdjc/</link>
		<comments>http://www.snippetdirectory.com/html5/drawing-arc-between-two-points-using-canvas/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 07:04:09 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[Html5]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1806</guid>
		<description><![CDATA[For a live sample please click here or see below the snippet &#60;!DOCTYPE html&#62; &#60;html&#62; &#60;head&#62; &#60;title&#62;HTML5 Drawing Arc Between Two Points using Canvas&#60;/title&#62; &#60;script language=&#34;javascript&#34;&#62; function DrawArc() { var drawingCanvas = document.getElementById(&#039;sampleCanvas&#039;); if(drawingCanvas.getContext) { var context = drawingCanvas.getContext(&#039;2d&#039;); context.clearRect(0,0,600,600); context.beginPath(); context.moveTo(30,30); context.lineTo(200,30); context.arcTo(400,30,400,800,100);//left 1,top 1,left 2,top 2,radius context.lineTo(400,400); context.stroke(); //context.fill(); } } &#60;/script&#62; &#60;/head&#62; &#60;body&#62; &#60;canvas id=&#34;sampleCanvas&#34; width=&#34;600&#34; height=&#34;600&#34; style=&#34;border:1px solid #000000&#34;&#62; &#60;p&#62;Your browser doesn&#039;t support canvas.&#60;/p&#62; &#60;/canvas&#62; &#60;script&#62; DrawArc(); &#60;/script&#62; &#60;/body&#62; &#60;/html&#62;]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/html5/drawing-arc-between-two-points-using-canvas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/html5/drawing-arc-between-two-points-using-canvas/</feedburner:origLink></item>
		<item>
		<title>Drawing and Filling Rectangles using Canvas</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/kWrrlYtGVvY/</link>
		<comments>http://www.snippetdirectory.com/html5/drawing-and-filling-rectangles-using-canvas/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 14:09:46 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[Html5]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1797</guid>
		<description><![CDATA[For a live sample please click here or see below the snippet &#60;!DOCTYPE html&#62; &#60;html&#62; &#60;head&#62; &#60;title&#62;HTML5 Draw Rectangle And Fill Rectangele using Canvas&#60;/title&#62; &#60;script language=&#34;javascript&#34;&#62; function DrawRectangle() { var drawingCanvas = document.getElementById(&#039;sampleCanvas&#039;); if(drawingCanvas.getContext) { var context = drawingCanvas.getContext(&#039;2d&#039;); context.clearRect(0,0,600,600); context.lineWidth=3; context.lineJoin=&#34;round&#34;;//bevel round meter //context.strokeStyle=&#34;#FF0000&#34;; context.fillStyle=&#34;#FF0000&#34;; var w=400; var h=300; var t=100; var l=100; //context.strokeRect(l,t,w,h); context.fillRect(l,t,w,h); } } &#60;/script&#62; &#60;/head&#62; &#60;body&#62; &#60;canvas id=&#34;sampleCanvas&#34; width=&#34;600&#34; height=&#34;600&#34; style=&#34;border:1px solid #000000&#34;&#62; &#60;p&#62;Your browser doesn&#039;t support canvas.&#60;/p&#62; &#60;/canvas&#62; &#60;script&#62; DrawRectangle(); &#60;/script&#62; &#60;/body&#62; &#60;/html&#62;]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/html5/drawing-and-filling-rectangles-using-canvas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/html5/drawing-and-filling-rectangles-using-canvas/</feedburner:origLink></item>
		<item>
		<title>Enumeration Types As Bit Flags – Assigning and Comparing Multiple Enum Values</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/CgQtMFAYagM/</link>
		<comments>http://www.snippetdirectory.com/csharp/enumeration-types-as-bit-flags-assigning-and-comparing-multiple-enum-values/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 10:18:43 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1383</guid>
		<description><![CDATA[public enum Days { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, } static void Main(string[] args) { Days d = Days.Monday &#124; Days.Tuesday &#124; Days.Wednesday; if ((d &#38; Days.Monday) == Days.Monday) { Console.WriteLine(&#34;Monday Selected&#34;); } if ((d &#38; Days.Tuesday) == Days.Tuesday) { Console.WriteLine(&#34;Tuesday Selected&#34;); } if ((d &#38; Days.Friday) == Days.Friday) { Console.WriteLine(&#34;Friday Selected&#34;); } Console.Read(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/enumeration-types-as-bit-flags-assigning-and-comparing-multiple-enum-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/enumeration-types-as-bit-flags-assigning-and-comparing-multiple-enum-values/</feedburner:origLink></item>
		<item>
		<title>Getting Operating System Version in Windows Applications</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/yICHc51CgbI/</link>
		<comments>http://www.snippetdirectory.com/csharp/getting-operating-system-version-in-windows-applications/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 09:33:01 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1400</guid>
		<description><![CDATA[string version = System.Environment.Version.ToString(); or string version= System.Environment.OSVersion.ToString();]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/getting-operating-system-version-in-windows-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/getting-operating-system-version-in-windows-applications/</feedburner:origLink></item>
		<item>
		<title>Creating Local or Domain User</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/Zv3xUF0u4OU/</link>
		<comments>http://www.snippetdirectory.com/csharp/creating-local-or-domain-user/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 08:54:48 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1245</guid>
		<description><![CDATA[public void CreateUser(string name, string password) { //Add System.DirectoryServices.AccountManagement as reference PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine);//Connecting to local computer. //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user UserPrincipal insUserPrincipal = new UserPrincipal(insPrincipalContext, name, password, true); insUserPrincipal.Save(); insUserPrincipal.Dispose(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/creating-local-or-domain-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/creating-local-or-domain-user/</feedburner:origLink></item>
		<item>
		<title>Creating Local or Domain Group</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/dcTHUQD2GqE/</link>
		<comments>http://www.snippetdirectory.com/csharp/creating-local-or-domain-group/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 07:53:40 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1246</guid>
		<description><![CDATA[public void CreateGroup(string name) { //Add System.DirectoryServices.AccountManagement as reference PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine);//Connecting to local computer. //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user GroupPrincipal insGroupPrincipal = new GroupPrincipal(insPrincipalContext, name); insGroupPrincipal.Save(); insGroupPrincipal.Dispose(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/creating-local-or-domain-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/creating-local-or-domain-group/</feedburner:origLink></item>
		<item>
		<title>Deleting Local or Domain User</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/kvt7BBfHD0E/</link>
		<comments>http://www.snippetdirectory.com/csharp/deleting-local-or-domain-user/#comments</comments>
		<pubDate>Sun, 19 Feb 2012 10:52:41 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1247</guid>
		<description><![CDATA[public void DeleteUser(string name) { //Add System.DirectoryServices.AccountManagement as reference PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine);//Connecting to local computer. //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user UserPrincipal insUserPrincipal = new UserPrincipal(insPrincipalContext); insUserPrincipal.Name = name; PrincipalSearcher insPrincipalSearcher = new PrincipalSearcher(); insUserPrincipal = insPrincipalSearcher.FindOne() as UserPrincipal; insUserPrincipal.Delete(); insUserPrincipal.Dispose(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/deleting-local-or-domain-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/deleting-local-or-domain-user/</feedburner:origLink></item>
		<item>
		<title>Deleting Local or Domain Group</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/U30mL9X16i0/</link>
		<comments>http://www.snippetdirectory.com/csharp/deleting-local-or-domain-group/#comments</comments>
		<pubDate>Sun, 19 Feb 2012 09:51:30 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1248</guid>
		<description><![CDATA[public void DeleteGroup(string name) { //Add System.DirectoryServices.AccountManagement as reference PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine);//Connecting to local computer. //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user GroupPrincipal insGroupPrincipal = new GroupPrincipal(insPrincipalContext); insGroupPrincipal.Name = name; PrincipalSearcher insPrincipalSearcher = new PrincipalSearcher(); insGroupPrincipal = insPrincipalSearcher.FindOne() as GroupPrincipal; insGroupPrincipal.Delete(); insGroupPrincipal.Dispose(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/deleting-local-or-domain-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/deleting-local-or-domain-group/</feedburner:origLink></item>
		<item>
		<title>Listing Users of a Local or Domain Group</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/upmRg72e2SU/</link>
		<comments>http://www.snippetdirectory.com/csharp/listing-users-of-a-local-or-domain-group/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 11:50:42 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1249</guid>
		<description><![CDATA[public List&#60;Principal&#62; ListGroupsUsers(string groupName) { //Add System.DirectoryServices.AccountManagement as reference PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine);//Connecting to local computer. //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user GroupPrincipal insGroupPrincipal = new GroupPrincipal(insPrincipalContext); insGroupPrincipal.Name = groupName; PrincipalSearcher insPrincipalSearcher = new PrincipalSearcher(); insGroupPrincipal = insPrincipalSearcher.FindOne() as GroupPrincipal; return insGroupPrincipal.Members.ToList(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/listing-users-of-a-local-or-domain-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/listing-users-of-a-local-or-domain-group/</feedburner:origLink></item>
		<item>
		<title>Listing Groups of a Local or Domain User</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/uzUDjQz1RQw/</link>
		<comments>http://www.snippetdirectory.com/csharp/listing-groups-of-a-local-or-domain-user/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 09:49:32 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1250</guid>
		<description><![CDATA[public List&#60;Principal&#62; ListUsersGroups(string userName) { //Add System.DirectoryServices.AccountManagement as reference PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine);//Connecting to local computer. //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user UserPrincipal insUserPrincipal = new UserPrincipal(insPrincipalContext); insUserPrincipal.Name = userName; PrincipalSearcher insPrincipalSearcher = new PrincipalSearcher(); insUserPrincipal = insPrincipalSearcher.FindOne() as UserPrincipal; return insUserPrincipal.GetGroups().ToList(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/listing-groups-of-a-local-or-domain-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/listing-groups-of-a-local-or-domain-user/</feedburner:origLink></item>
		<item>
		<title>HTML5 Video</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/Fp4xGniGED4/</link>
		<comments>http://www.snippetdirectory.com/html5/html5-video/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 08:59:45 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[Html5]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1385</guid>
		<description><![CDATA[&#60;html&#62; &#60;body&#62; &#60;video width=&#34;400&#34; height=&#34;300&#34; src=&#34;video.avi&#34; poster= &#34;poster.png&#34; autoplay controls loop&#62; Browser does not support video tag. &#60;/video&#62; &#60;/body&#62; &#60;/html&#62;]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/html5/html5-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/html5/html5-video/</feedburner:origLink></item>
		<item>
		<title>Blog</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/nM_VOhiQwLU/</link>
		<comments>http://www.snippetdirectory.com/blog/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 08:32:49 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
		
		<guid isPermaLink="false">http://www.snippetdirectory.com/?page_id=1749</guid>
		<description />
		<wfw:commentRss>http://www.snippetdirectory.com/blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/blog/</feedburner:origLink></item>
		<item>
		<title>HTML5 Audio</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/mXK_JTB5a0s/</link>
		<comments>http://www.snippetdirectory.com/html5/html5-audio/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 08:02:12 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[Html5]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1386</guid>
		<description><![CDATA[&#60;!DOCTYPE html&#62; &#60;html&#62; &#60;body&#62; &#60;audio src=&#34;music.mp3&#34; autoplay controls loop&#62; Browser does not support audio tag. &#60;/audio&#62; &#60;/body&#62; &#60;/html&#62;]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/html5/html5-audio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/html5/html5-audio/</feedburner:origLink></item>
		<item>
		<title>We Listen Our Followers, HTML 5 Snippets are on Way Fast</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/72jxdbdeic8/</link>
		<comments>http://www.snippetdirectory.com/blog/we-listen-our-followers-html-5-snippets-are-on-way-fast/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 07:25:09 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
		
		<guid isPermaLink="false">http://www.snippetdirectory.com/?post_type=blog&amp;p=1763</guid>
		<description><![CDATA[Hi, Last week we asked our followers and friends on facebook &#8220;In which category would you prefer us to publish new snippets?&#8221;. The most answered option was C# which is our top snippet category by count of snippets. And the second most answered option was HTML5, so we decided to share much more HTML5 code snippets. We started to share HTML5 code snippets on valentine&#8217;s day with this sample . And yesterday we shared a code snippet about how to draw lines using canvas element which can be found here . We listen our followers, so we decided to add at least 3 html5 code snippet in a week. Follow us to get informed when these snippets are published. Follow us on Facebook Follow us on Twitter]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/blog/we-listen-our-followers-html-5-snippets-are-on-way-fast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/blog/we-listen-our-followers-html-5-snippets-are-on-way-fast/</feedburner:origLink></item>
		<item>
		<title>Getting list of sites on IIS</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/EwxJaxb_P1w/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/getting-list-of-sites-on-iis-2/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 22:17:56 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1348</guid>
		<description><![CDATA[Dim insServerManager As New ServerManager() For Each insSite As Site In insServerManager.Sites Console.WriteLine(&#34;--------------------&#34;) Console.WriteLine(&#34;Site Name: &#34; + insSite.Name) Console.WriteLine(&#34;State:&#34; + insSite.State) Console.WriteLine(&#34;Application Pool:&#34; + insSite.ApplicationDefaults.ApplicationPoolName) Next]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/getting-list-of-sites-on-iis-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/getting-list-of-sites-on-iis-2/</feedburner:origLink></item>
		<item>
		<title>Getting list of sites on IIS</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/go_q6uBZCOA/</link>
		<comments>http://www.snippetdirectory.com/csharp/getting-list-of-sites-on-iis/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 22:14:22 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1347</guid>
		<description><![CDATA[ServerManager insServerManager = new ServerManager(); foreach (Site insSite in insServerManager.Sites) { Console.WriteLine(&#34;--------------------&#34;); Console.WriteLine(&#34;Site Name: &#34; + insSite.Name); Console.WriteLine(&#34;State:&#34; + insSite.State); Console.WriteLine(&#34;Application Pool:&#34; + insSite.ApplicationDefaults.ApplicationPoolName); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/getting-list-of-sites-on-iis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/getting-list-of-sites-on-iis/</feedburner:origLink></item>
		<item>
		<title>Drawing Lines Using Canvas</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/ZEVJWghBhNY/</link>
		<comments>http://www.snippetdirectory.com/html5/drawing-lines-using-canvas/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 11:36:52 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[Html5]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1753</guid>
		<description><![CDATA[For a live sample please click here or see below the snippet &#60;!DOCTYPE html&#62; &#60;html&#62; &#60;head&#62; &#60;title&#62;HTML5 Draw Lines Using Canvas&#60;/title&#62; &#60;script language=&#34;javascript&#34;&#62; function DrawLines() { var drawingCanvas = document.getElementById(&#039;sampleCanvas&#039;); if(drawingCanvas.getContext) { var context = drawingCanvas.getContext(&#039;2d&#039;); context.clearRect(0,0,600,600); context.lineWidth=10; context.lineJoin=&#34;round&#34;;//bevel round meter context.lineCap=&#34;round&#34;;//butt round square context.moveTo(50,50); context.lineTo(200,200); context.lineTo(500,100); context.lineTo(100,500); context.strokeStyle=&#34;#FF0000&#34; context.stroke(); } } &#60;/script&#62; &#60;body&#62; &#60;canvas id=&#34;sampleCanvas&#34; width=&#34;600&#34; height=&#34;600&#34; style=&#34;border:1px solid #000000&#34;&#62; &#60;p&#62;Your browser doesn&#039;t support canvas.&#60;/p&#62; &#60;/canvas&#62; &#60;script&#62; DrawLines(); &#60;/script&#62; &#60;/body&#62; &#60;/html&#62; Sample]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/html5/drawing-lines-using-canvas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/html5/drawing-lines-using-canvas/</feedburner:origLink></item>
		<item>
		<title>Removing User from a Local or Domain Group</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/eZhzUJ4Necg/</link>
		<comments>http://www.snippetdirectory.com/csharp/removing-user-from-a-local-or-domain-group/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 08:47:07 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1252</guid>
		<description><![CDATA[public void RemoveUserFromGroup(string groupName, string userName) { //Add System.DirectoryServices.AccountManagement as reference PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine);//Connecting to local computer. //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user GroupPrincipal insGroupPrincipal = new GroupPrincipal(insPrincipalContext); insGroupPrincipal.Name = groupName; PrincipalSearcher insPrincipalSearcher = new PrincipalSearcher(); insGroupPrincipal = insPrincipalSearcher.FindOne() as GroupPrincipal; UserPrincipal insUserPrincipal = new UserPrincipal(insPrincipalContext); insUserPrincipal.Name = userName; insUserPrincipal = insPrincipalSearcher.FindOne() as UserPrincipal; if (insGroupPrincipal.Members.Contains(insUserPrincipal)) { insGroupPrincipal.Members.Remove(insUserPrincipal); insGroupPrincipal.Save(); insGroupPrincipal.Dispose(); } }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/removing-user-from-a-local-or-domain-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/removing-user-from-a-local-or-domain-group/</feedburner:origLink></item>
		<item>
		<title>Adding User to a Local or Domain Group</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/qWziDKtwG54/</link>
		<comments>http://www.snippetdirectory.com/csharp/adding-user-to-a-local-or-domain-group/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 07:48:42 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1251</guid>
		<description><![CDATA[public void AddUserToGroup(string groupName, string userName) { //Add System.DirectoryServices.AccountManagement as reference PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine);//Connecting to local computer. //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user GroupPrincipal insGroupPrincipal = new GroupPrincipal(insPrincipalContext); insGroupPrincipal.Name = groupName; PrincipalSearcher insPrincipalSearcher = new PrincipalSearcher(); insGroupPrincipal = insPrincipalSearcher.FindOne() as GroupPrincipal; UserPrincipal insUserPrincipal = new UserPrincipal(insPrincipalContext); insUserPrincipal.Name = userName; insUserPrincipal = insPrincipalSearcher.FindOne() as UserPrincipal; if (!insGroupPrincipal.Members.Contains(insUserPrincipal)) { insGroupPrincipal.Members.Add(insUserPrincipal); insGroupPrincipal.Save(); insGroupPrincipal.Dispose(); } }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/adding-user-to-a-local-or-domain-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/adding-user-to-a-local-or-domain-group/</feedburner:origLink></item>
		<item>
		<title>Adding an application to a site on IIS 7</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/aLQ2zCDpusY/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/adding-an-application-to-a-site-on-iis-7/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 23:57:39 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1371</guid>
		<description><![CDATA[Private Sub addApplication() Dim insServerManager As New ServerManager() insServerManager.Sites(&#34;TestSite&#34;).Applications.Add(&#34;/TestApp&#34;, &#34;C:\TestApplication&#34;) insServerManager.CommitChanges() End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/adding-an-application-to-a-site-on-iis-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/adding-an-application-to-a-site-on-iis-7/</feedburner:origLink></item>
		<item>
		<title>Creating site on IIS 7</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/bfYFGKSftdg/</link>
		<comments>http://www.snippetdirectory.com/csharp/creating-site-on-iis-7-2/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 21:43:16 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1342</guid>
		<description><![CDATA[void createSite() { ServerManager insServerManager = new ServerManager(); insServerManager.Sites.Add(&#34;TestSite&#34;, @&#34;C:\TestSite&#34;, 81); insServerManager.CommitChanges(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/creating-site-on-iis-7-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/creating-site-on-iis-7-2/</feedburner:origLink></item>
		<item>
		<title>Creating site on IIS 7</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/47ee-qIruuE/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/creating-site-on-iis-7/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 21:41:52 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1343</guid>
		<description><![CDATA[Private Sub createSite() Dim insServerManager As New ServerManager() insServerManager.Sites.Add(&#34;TestSite&#34;, &#34;C:\TestSite&#34;, 81) insServerManager.CommitChanges() End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/creating-site-on-iis-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/creating-site-on-iis-7/</feedburner:origLink></item>
		<item>
		<title>Adding an application to a site on IIS 7</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/9cFQAAXYdk0/</link>
		<comments>http://www.snippetdirectory.com/csharp/adding-an-application-to-a-site-on-iis-7-2/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 14:58:59 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1370</guid>
		<description><![CDATA[void addApplication() { ServerManager insServerManager = new ServerManager(); insServerManager.Sites[&#34;TestSite&#34;].Applications.Add(&#34;/TestApp&#34;, @&#34;C:\TestApplication&#34;); insServerManager.CommitChanges(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/adding-an-application-to-a-site-on-iis-7-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/adding-an-application-to-a-site-on-iis-7-2/</feedburner:origLink></item>
		<item>
		<title>Changing Password Of a Local or Domain User</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/2lANZ8neQts/</link>
		<comments>http://www.snippetdirectory.com/csharp/changing-password-of-a-local-or-domain-user/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 10:45:07 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1253</guid>
		<description><![CDATA[public void ChangePassword(string userName, string newPassword) { //Add System.DirectoryServices.AccountManagement as reference PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine);//Connecting to local computer. //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user UserPrincipal insUserPrincipal = new UserPrincipal(insPrincipalContext); insUserPrincipal.Name = userName; PrincipalSearcher insPrincipalSearcher = new PrincipalSearcher(); insUserPrincipal = insPrincipalSearcher.FindOne() as UserPrincipal; insUserPrincipal.SetPassword(newPassword); insUserPrincipal.Save(); insUserPrincipal.Dispose(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/changing-password-of-a-local-or-domain-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/changing-password-of-a-local-or-domain-user/</feedburner:origLink></item>
		<item>
		<title>Validating Local or Domain User Credentials</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/7IE0NQBsIKg/</link>
		<comments>http://www.snippetdirectory.com/csharp/validating-local-or-domain-user-credentials/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 08:43:33 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1254</guid>
		<description><![CDATA[public bool ValidateUser(string userName, string password) { //Add System.DirectoryServices.AccountManagement as reference PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine);//Connecting to local computer. //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, &#34;MyDomain&#34;,&#34;DC=MyDomain,DC=com&#34;);//Connecting to Active Directory //PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Machine, &#34;TAMERO&#34;,&#34;administrator&#34;, &#34;password&#34;);//Connecting to local computer with credentials of an user return insPrincipalContext.ValidateCredentials(userName, password); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/validating-local-or-domain-user-credentials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/validating-local-or-domain-user-credentials/</feedburner:origLink></item>
		<item>
		<title>Drawing and Measuring Text using Canvas</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/7govo3dYeP4/</link>
		<comments>http://www.snippetdirectory.com/html5/drawing-and-measuring-text-using-canvas/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 08:27:31 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[Html5]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1817</guid>
		<description><![CDATA[For a live sample please click here or see below the snippet &#60;!DOCTYPE html&#62; &#60;html&#62; &#60;head&#62; &#60;title&#62;HTML5 Drawing Text using Canvas&#60;/title&#62; &#60;script language=&#34;javascript&#34;&#62; function DrawText() { var drawingCanvas = document.getElementById(&#039;sampleCanvas&#039;); if(drawingCanvas.getContext) { var context = drawingCanvas.getContext(&#039;2d&#039;); context.clearRect(0,0,600,300); context.font=&#34;20px verdana&#34;; //context.strokeStyle=&#34;red;//to stroke context.fillStyle=&#34;red&#34;; context.textAlign=&#34;start&#34;;//how to place the text to the given point, options are start, end, left, right, center context.textBaseline=&#34;alphabetic&#34;;//orientation of text, options are alphabetic, bottom, hanging, ideographic, middle, top var txt=&#34;Snippet Directory&#34;; //context.strokeText(txt,200,150); //to stroke context.fillText(txt,200,150); document.getElementById(&#039;width&#039;).innerHTML=&#039;Measured width is : &#039; + context.measureText(txt).width + &#039;px&#039;; } } &#60;/script&#62; &#60;/head&#62; &#60;body&#62; &#60;canvas id=&#34;sampleCanvas&#34; width=&#34;600&#34; height=&#34;300&#34; style=&#34;border:1px solid #000000&#34;&#62; &#60;p&#62;Your browser doesn&#039;t support canvas.&#60;/p&#62; &#60;/canvas&#62;&#60;br&#62; &#60;div id=&#34;width&#34;&#62;&#60;/div&#62; &#60;script&#62; DrawText(); &#60;/script&#62; &#60;/body&#62; &#60;/html&#62;]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/html5/drawing-and-measuring-text-using-canvas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/html5/drawing-and-measuring-text-using-canvas/</feedburner:origLink></item>
		<item>
		<title>Compressing Files Using GZip</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/Irezp0ReDho/</link>
		<comments>http://www.snippetdirectory.com/csharp/compressing-files-using-gzip/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 06:00:04 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1231</guid>
		<description><![CDATA[public static void Zip(string sourceFilePath, string destinationFilePath) { FileStream insOutputFileStream = null; GZipStream insGZipStream = null; FileStream insInputFileStream = null; try { insOutputFileStream = new FileStream(destinationFilePath, FileMode.Create); insGZipStream = new GZipStream(insOutputFileStream, CompressionMode.Compress, true); insInputFileStream = new FileStream(sourceFilePath, FileMode.Open); byte[] buffer = new byte[insInputFileStream.Length]; int count = insInputFileStream.Read(buffer, 0, buffer.Length); insGZipStream.Write(buffer, 0, buffer.Length); } catch (Exception) { throw; } finally { insInputFileStream.Close(); insGZipStream.Close(); insOutputFileStream.Close(); } }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/compressing-files-using-gzip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/compressing-files-using-gzip/</feedburner:origLink></item>
		<item>
		<title>Adding a virtual directory to an application on IIS 7</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/QMwc8ynayLk/</link>
		<comments>http://www.snippetdirectory.com/csharp/adding-a-virtual-directory-to-an-application-on-iis-7-2/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 21:45:58 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1372</guid>
		<description><![CDATA[void addVirtualDirectory() { ServerManager insServerManager = new ServerManager(); insServerManager.Sites[&#34;TestSite&#34;].Applications[&#34;/TestApp&#34;].VirtualDirectories.Add(&#34;/TestVirtualDir&#34;, @&#34;C:\TestVirtualDirectory&#34;); insServerManager.CommitChanges(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/adding-a-virtual-directory-to-an-application-on-iis-7-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/adding-a-virtual-directory-to-an-application-on-iis-7-2/</feedburner:origLink></item>
		<item>
		<title>Adding a virtual directory to an application on IIS 7</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/P9MMUZIWw8s/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/adding-a-virtual-directory-to-an-application-on-iis-7/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 21:45:11 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1373</guid>
		<description><![CDATA[Private Sub addVirtualDirectory() Dim insServerManager As New ServerManager() insServerManager.Sites(&#34;TestSite&#34;).Applications(&#34;/TestApp&#34;).VirtualDirectories.Add(&#34;/TestVirtualDir&#34;, &#34;C:\TestVirtualDirectory&#34;) insServerManager.CommitChanges() End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/adding-a-virtual-directory-to-an-application-on-iis-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/adding-a-virtual-directory-to-an-application-on-iis-7/</feedburner:origLink></item>
		<item>
		<title>Getting the file name and line number of code during execution</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/yYZ9nvuO7t8/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/getting-the-file-name-and-line-number-of-code-during-execution-2/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 13:45:09 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1325</guid>
		<description><![CDATA[&#60;Conditional(&#34;DEBUG&#34;)&#62; _ Public Shared Function GetCodeLineAndFileName() As String Dim insStackTrace As New StackTrace(True) Dim insStackFrame As StackFrame = insStackTrace.GetFrame(1) Return [String].Format(&#34;File: {0}, Line: {1}&#34;, insStackFrame.GetFileName(), insStackFrame.GetFileLineNumber()) End Function]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/getting-the-file-name-and-line-number-of-code-during-execution-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/getting-the-file-name-and-line-number-of-code-during-execution-2/</feedburner:origLink></item>
		<item>
		<title>Getting the file name and line number of code during execution</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/8tpG2TWZ73I/</link>
		<comments>http://www.snippetdirectory.com/csharp/getting-the-file-name-and-line-number-of-code-during-execution/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 13:36:36 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1222</guid>
		<description><![CDATA[[Conditional(&#34;DEBUG&#34;)] public static string GetCodeLineAndFileName() { StackTrace insStackTrace = new StackTrace(true); StackFrame insStackFrame = insStackTrace.GetFrame(1); return String.Format(&#34;File: {0}, Line: {1}&#34;, insStackFrame.GetFileName(), insStackFrame.GetFileLineNumber()); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/getting-the-file-name-and-line-number-of-code-during-execution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/getting-the-file-name-and-line-number-of-code-during-execution/</feedburner:origLink></item>
		<item>
		<title>Decompressing Files Using GZip</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/NXvM0AbyqM0/</link>
		<comments>http://www.snippetdirectory.com/csharp/decompressing-files-using-gzip/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 07:58:31 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1232</guid>
		<description><![CDATA[public static void Unzip(string sourceFilePath, string destinationFilePath) { FileStream insOutputFileStream = null; GZipStream insGZipStream = null; FileStream insInputFileStream = null; try { insInputFileStream = new FileStream(sourceFilePath, FileMode.Open, FileAccess.Read, FileShare.Read); insGZipStream = new GZipStream(insInputFileStream, CompressionMode.Decompress); insOutputFileStream = new FileStream(destinationFilePath, FileMode.CreateNew); int offset = 0; int totalBytes = 0; byte[] smallBuffer = new byte[100]; while (true) { int bytesRead = insGZipStream.Read(smallBuffer, 0, 100); if (bytesRead == 0) { break; } offset += bytesRead; totalBytes += bytesRead; insOutputFileStream.Write(smallBuffer, 0, smallBuffer.Length); } } catch (Exception) { throw; } finally { insInputFileStream.Close(); insGZipStream.Close(); insOutputFileStream.Close(); } }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/decompressing-files-using-gzip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/decompressing-files-using-gzip/</feedburner:origLink></item>
		<item>
		<title>Request Snippet</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/tMiEFvSa65g/</link>
		<comments>http://www.snippetdirectory.com/request-snippet-facebook/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 06:13:53 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
		
		<guid isPermaLink="false">http://www.snippetdirectory.com/?page_id=1730</guid>
		<description><![CDATA[You can request a snippet by filling this form. Your request will be published under requested snippets page after editor review. Please do not forget mentioning programming language that you want the snippet.]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/request-snippet-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/request-snippet-facebook/</feedburner:origLink></item>
		<item>
		<title>Recycling an application pool on IIS 7</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/7crUiYO_KXE/</link>
		<comments>http://www.snippetdirectory.com/csharp/recycling-an-application-pool-on-iis-7-2/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 19:12:45 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1374</guid>
		<description><![CDATA[void recycleApplicationPool() { ServerManager insServerManager = new ServerManager(); insServerManager.ApplicationPools[&#34;DefaultAppPool&#34;].Recycle(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/recycling-an-application-pool-on-iis-7-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/recycling-an-application-pool-on-iis-7-2/</feedburner:origLink></item>
		<item>
		<title>Recycling an application pool on IIS 7</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/WOs_gixdJBA/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/recycling-an-application-pool-on-iis-7/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 19:10:22 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1375</guid>
		<description><![CDATA[Private Sub recycleApplicationPool() Dim insServerManager As New ServerManager() insServerManager.ApplicationPools(&#34;DefaultAppPool&#34;).Recycle() End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/recycling-an-application-pool-on-iis-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/recycling-an-application-pool-on-iis-7/</feedburner:origLink></item>
		<item>
		<title>Happy Valentine’s Day with HTML5!</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/jG9yLx_nleM/</link>
		<comments>http://www.snippetdirectory.com/html5/happy-valentines-day-with-html5/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 08:10:29 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[Html5]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1560</guid>
		<description><![CDATA[For a live sample please click here or see below the snippet. &#60;!DOCTYPE html&#62; &#60;html&#62; &#60;head&#62; &#60;title&#62;HTML5 Heart Beat Sample&#60;/title&#62; &#60;script language=&#34;javascript&#34;&#62; var beat=false; function DrawHeart() { var drawingCanvas = document.getElementById(&#039;heartDrawing&#039;); if(drawingCanvas.getContext) { var context = drawingCanvas.getContext(&#039;2d&#039;); context.clearRect(0,0,600,600); context.strokeStyle = &#34;#000000&#34;; context.fillStyle = &#34;#FF0000&#34;; context.save(); context.beginPath(); if(beat) { context.moveTo(300,160); context.bezierCurveTo(300,148,280,100,200,100); context.bezierCurveTo(80,100,80,250,80,250); context.bezierCurveTo(80,320,160,408,300,480); context.bezierCurveTo(440,408,520,320,520,250); context.bezierCurveTo(520,250,520,100,400,100); context.bezierCurveTo(340,100,300,148,300,160); beat=false; } else { context.moveTo(225,120); context.bezierCurveTo(225,111,210,75,150,75); context.bezierCurveTo(60,75,60,187.5,60,187.5); context.bezierCurveTo(60,240,120,306,225,360); context.bezierCurveTo(330,306,390,240,390,187.5); context.bezierCurveTo(390,187.5,390,75,300,75); context.bezierCurveTo(255,75,225,111,225,120); beat=true; } context.fill(); } } &#60;/script&#62; &#60;/head&#62; &#60;body&#62; &#60;canvas id=&#34;heartDrawing&#34; width=&#34;600&#34; height=&#34;600&#34;&#62; &#60;p&#62;Your browser doesn&#039;t support canvas.&#60;/p&#62; &#60;/canvas&#62; &#60;script language=&#34;javascript&#34;&#62; setInterval(DrawHeart,500) &#60;/script&#62; &#60;/body&#62; &#60;/html&#62; Sample]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/html5/happy-valentines-day-with-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/html5/happy-valentines-day-with-html5/</feedburner:origLink></item>
		<item>
		<title>Measuring how long a process takes while code execution</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/-v6-SOorfgE/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/measuring-how-long-a-process-takes-while-code-execution-2/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 04:15:20 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1327</guid>
		<description><![CDATA[Dim sw As New Stopwatch() sw.Start() &#039;code runs here sw.[Stop]() MessageBox.Show(sw.Elapsed.ToString())]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/measuring-how-long-a-process-takes-while-code-execution-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/measuring-how-long-a-process-takes-while-code-execution-2/</feedburner:origLink></item>
		<item>
		<title>Measuring how long a process takes while code execution</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/t675OLvU3ag/</link>
		<comments>http://www.snippetdirectory.com/csharp/measuring-how-long-a-process-takes-while-code-execution/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 04:10:09 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1214</guid>
		<description><![CDATA[Stopwatch sw = new Stopwatch(); sw.Start(); //code runs here sw.Stop(); MessageBox.Show(sw.Elapsed.ToString());]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/measuring-how-long-a-process-takes-while-code-execution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/measuring-how-long-a-process-takes-while-code-execution/</feedburner:origLink></item>
		<item>
		<title>Reverse string</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/Mn8eJ86f4EM/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/reverse-string-2/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 14:23:38 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1329</guid>
		<description><![CDATA[Dim s As String = &#34;hello&#34; Dim t As New String(s.Reverse().ToArray())]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/reverse-string-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/reverse-string-2/</feedburner:origLink></item>
		<item>
		<title>Reverse string</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/Yeimq_n1WtQ/</link>
		<comments>http://www.snippetdirectory.com/csharp/reverse-string/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 14:20:32 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1211</guid>
		<description><![CDATA[string s = &#34;hello&#34;; string t = new string(s.Reverse().ToArray());]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/reverse-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/reverse-string/</feedburner:origLink></item>
		<item>
		<title>Is Network Connected</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/BZqaTRKbrpY/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/is-network-connected-2/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 14:06:19 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1719</guid>
		<description><![CDATA[MessageBox.Show(SystemInformation.Network.ToString())]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/is-network-connected-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/is-network-connected-2/</feedburner:origLink></item>
		<item>
		<title>Stopping a site on IIS 7</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/vJ04fvhHTG8/</link>
		<comments>http://www.snippetdirectory.com/csharp/stopping-a-site-on-iis-7-2/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 12:37:24 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1366</guid>
		<description><![CDATA[void stopSite() { ServerManager insServerManager = new ServerManager(); insServerManager.Sites[&#34;TestSite&#34;].Stop(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/stopping-a-site-on-iis-7-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/stopping-a-site-on-iis-7-2/</feedburner:origLink></item>
		<item>
		<title>Stopping a site on IIS 7</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/94HpuCTEHYQ/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/stopping-a-site-on-iis-7/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 12:36:12 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1367</guid>
		<description><![CDATA[Private Sub stopSite() Dim insServerManager As New ServerManager() insServerManager.Sites(&#34;TestSite&#34;).[Stop]() End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/stopping-a-site-on-iis-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/stopping-a-site-on-iis-7/</feedburner:origLink></item>
		<item>
		<title>Detecting system drive in Windows</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/mVqRhmtfxAQ/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/detecting-system-drive-in-windows-2/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 12:52:36 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1331</guid>
		<description><![CDATA[Dim insManagementObjectSearcher As New ManagementObjectSearcher(&#34;root\CIMV2&#34;, &#34;SELECT * FROM Win32_OperatingSystem&#34;) For Each insManagementObject As ManagementObject In ManagementObjectSearcher.Get() Console.WriteLine(&#34;System Drive:&#34; &#38; insManagementObject(&#34;SystemDrive&#34;).ToString()) Next]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/detecting-system-drive-in-windows-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/detecting-system-drive-in-windows-2/</feedburner:origLink></item>
		<item>
		<title>Detecting system drive in Windows</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/HsHZ1npkPhI/</link>
		<comments>http://www.snippetdirectory.com/csharp/detecting-system-drive-in-windows/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 12:48:41 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1228</guid>
		<description><![CDATA[ManagementObjectSearcher insManagementObjectSearcher = new ManagementObjectSearcher(&#34;root\\CIMV2&#34;, &#34;SELECT * FROM Win32_OperatingSystem&#34;); foreach (ManagementObject insManagementObject in ManagementObjectSearcher.Get()) { Console.WriteLine(&#34;System Drive:&#34; + insManagementObject[&#34;SystemDrive&#34;].ToString()); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/detecting-system-drive-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/detecting-system-drive-in-windows/</feedburner:origLink></item>
		<item>
		<title>LINQ ForEach</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/9TRM7j0XOQI/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/linq-foreach-2/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 12:00:43 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1333</guid>
		<description><![CDATA[Class Program Private Shared Sub Main(args As String()) Dim lst As New List(Of Integer)() lst.Add(1) lst.Add(11) lst.Add(12) lst.Add(13) lst.Add(5) (From l In lst Where l &#62; 3l).ToList().ForEach(Function(i) Console.WriteLine(i * 2)) Console.Read() End Sub End Class]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/linq-foreach-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/linq-foreach-2/</feedburner:origLink></item>
		<item>
		<title>LINQ ForEach</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/ZEMVTshaSfM/</link>
		<comments>http://www.snippetdirectory.com/csharp/linq-foreach/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 10:56:36 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1208</guid>
		<description><![CDATA[class Program { static void Main(string[] args) { List&#60;int&#62; lst = new List&#60;int&#62;(); lst.Add(1); lst.Add(11); lst.Add(12); lst.Add(13); lst.Add(5); (from l in lst where l &#62; 3 select l).ToList().ForEach(i =&#62; Console.WriteLine(i * 2)); Console.Read(); } }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/linq-foreach/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/linq-foreach/</feedburner:origLink></item>
		<item>
		<title>Joining string arrays</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/DepReMnsv4Q/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/joining-string-arrays-2/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 18:07:43 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1335</guid>
		<description><![CDATA[Dim arr As String() = New String(2) {} arr(0) = &#34;a&#34; arr(1) = &#34;b&#34; arr(2) = &#34;c&#34; Dim joined As String = [String].Join(&#34;&#124;&#34;, arr) MessageBox.Show(joined)]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/joining-string-arrays-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/joining-string-arrays-2/</feedburner:origLink></item>
		<item>
		<title>Joining string arrays</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/YJ8cwIlecUY/</link>
		<comments>http://www.snippetdirectory.com/csharp/joining-string-arrays/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 18:05:47 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1205</guid>
		<description><![CDATA[string[] arr = new string[3]; arr[0] = &#34;a&#34;; arr[1] = &#34;b&#34;; arr[2] = &#34;c&#34;; string joined = String.Join(&#34;&#124;&#34;, arr); MessageBox.Show(joined);]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/joining-string-arrays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/joining-string-arrays/</feedburner:origLink></item>
		<item>
		<title>Is Application Running on Terminal Server</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/s4fBptfaP34/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/is-application-running-on-terminal-server-2/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 14:04:51 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1723</guid>
		<description><![CDATA[If SystemInformation.TerminalServerSession Then &#039;application is running on terminal server Application.[Exit]() End If]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/is-application-running-on-terminal-server-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/is-application-running-on-terminal-server-2/</feedburner:origLink></item>
		<item>
		<title>Getting Mac Address Of a Client</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/5g4_1rVGWrU/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/getting-mac-address-of-a-client-2/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 14:34:53 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1136</guid>
		<description><![CDATA[&#60;DllImport(&#34;iphlpapi.dll&#34;, ExactSpelling:=True)&#62; _ Public Shared Function SendARP(ByVal DestIP As Integer, ByVal SrcIP As Integer, &#60;Out()&#62; _ ByVal pMacAddr As Byte(), ByRef PhyAddrLen As Integer) As Integer End Function Public Function GetMacAddress(ByVal hostName As String) As String Dim adrr As System.Net.IPAddress() = Dns.GetHostEntry(hostName).AddressList Dim by As Byte() = New Byte(5) {} Dim len As Integer = by.Length Dim r As Integer = SendARP(CInt(adrr(0).Address), 0, by, len) Return BitConverter.ToString(by, 0, 6) End Function]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/getting-mac-address-of-a-client-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/getting-mac-address-of-a-client-2/</feedburner:origLink></item>
		<item>
		<title>Two ways for making a code block to run in only debug mode</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/2nMWgX0HieE/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/two-ways-for-making-a-code-block-to-run-in-only-debug-mode-2/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 08:15:47 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1338</guid>
		<description><![CDATA[Private Sub Form1_Load(sender As Object, e As EventArgs) #If DEBUG Then MessageBox.Show(&#34;debug&#34;) #Else MessageBox.Show(&#34;not debug&#34;) #End If RunInDebugMode() End Sub &#60;Conditional(&#34;DEBUG&#34;)&#62; _ Private Shared Sub RunInDebugMode() MessageBox.Show(&#34;Debug mode&#34;) End Sub]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/two-ways-for-making-a-code-block-to-run-in-only-debug-mode-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/two-ways-for-making-a-code-block-to-run-in-only-debug-mode-2/</feedburner:origLink></item>
		<item>
		<title>Two ways for making a code block to run in only debug mode</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/Ey5gjz7cy5o/</link>
		<comments>http://www.snippetdirectory.com/csharp/two-ways-for-making-a-code-block-to-run-in-only-debug-mode/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 08:11:36 +0000</pubDate>
		<dc:creator>isilo</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1225</guid>
		<description><![CDATA[private void Form1_Load(object sender, EventArgs e) { #if DEBUG MessageBox.Show(&#34;debug&#34;); #else MessageBox.Show(&#34;not debug&#34;); #endif RunInDebugMode(); } [Conditional(&#34;DEBUG&#34;)] static void RunInDebugMode() { MessageBox.Show(&#34;Debug mode&#34;); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/two-ways-for-making-a-code-block-to-run-in-only-debug-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/two-ways-for-making-a-code-block-to-run-in-only-debug-mode/</feedburner:origLink></item>
		<item>
		<title>Is Computer Connected to Internet</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/UNBUmplTP_Q/</link>
		<comments>http://www.snippetdirectory.com/visualbasicnet/is-computer-connected-to-internet-2/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 14:05:39 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[VisualBasic.Net]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1722</guid>
		<description><![CDATA[&#60;DllImport(&#34;wininet.dll&#34;)&#62; _ Private Shared Function InternetGetConnectedState(ByRef Description As Integer, ReservedValue As Integer) As Boolean End Function Public Shared Function IsInternetConnectionAvailable() As Boolean Dim d As Integer Return InternetGetConnectedState(d, 0) End Function]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/visualbasicnet/is-computer-connected-to-internet-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/visualbasicnet/is-computer-connected-to-internet-2/</feedburner:origLink></item>
		<item>
		<title>Authenticating User From ActiveDirectory</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/qIWOmrh82IQ/</link>
		<comments>http://www.snippetdirectory.com/csharp/authenticating-user-from-activedirectory-2/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 14:31:06 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1158</guid>
		<description><![CDATA[public bool Logon(string domainName, string username, string password) { try { using (DirectoryEntry objADEntry = new DirectoryEntry(&#34;LDAP://&#34; + domainName, username, password)) { return !objADEntry.NativeObject.Equals(null); } } catch (System.Runtime.InteropServices.COMException) { return false; } catch (Exception) { throw; } }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/authenticating-user-from-activedirectory-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/authenticating-user-from-activedirectory-2/</feedburner:origLink></item>
		<item>
		<title>Listing Shared Folders</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/8VoZonvX6z4/</link>
		<comments>http://www.snippetdirectory.com/csharp/listing-shared-folders/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 10:25:45 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1200</guid>
		<description><![CDATA[ManagementObjectSearcher searcher = new ManagementObjectSearcher(&#34;select * from win32_share&#34;); foreach (ManagementObject share in searcher.Get()) { MessageBox.Show(&#34;Process = &#34; + share[&#34;Name&#34;]); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/listing-shared-folders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/listing-shared-folders/</feedburner:origLink></item>
		<item>
		<title>Is Application Running on Terminal Server</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/JsPs8UXBssM/</link>
		<comments>http://www.snippetdirectory.com/csharp/is-application-running-on-terminal-server/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 18:22:32 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1198</guid>
		<description><![CDATA[if (SystemInformation.TerminalServerSession)//application is running on terminal server { Application.Exit(); }]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/is-application-running-on-terminal-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/is-application-running-on-terminal-server/</feedburner:origLink></item>
		<item>
		<title>Is Network Connected</title>
		<link>http://feedproxy.google.com/~r/SnippetDirectory/~3/YK3Axl94gZY/</link>
		<comments>http://www.snippetdirectory.com/csharp/is-network-connected/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 08:24:32 +0000</pubDate>
		<dc:creator>oztamer</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.snippetdirectory.com/?p=1199</guid>
		<description><![CDATA[MessageBox.Show(SystemInformation.Network.ToString());]]></description>
		<wfw:commentRss>http://www.snippetdirectory.com/csharp/is-network-connected/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snippetdirectory.com/csharp/is-network-connected/</feedburner:origLink></item>
	</channel>
</rss>
