<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4633589250149438856</id><updated>2011-10-14T09:09:17.491+03:00</updated><category term='logging'/><category term='util online IDE VisualStudio'/><category term='fusion fuselogvw'/><category term='LINQ'/><category term='yield'/><category term='Visual Studio'/><category term='PATH'/><category term='Delegate'/><category term='Microsoft'/><category term='UltraGrid'/><category term='net'/><category term='XOR'/><category term='Email'/><category term='Designer'/><category term='TopMost'/><category term='LogParser'/><category term='WC3'/><category term='Tutorial'/><category term='IIS'/><category term='Strings'/><category term='Infragistics'/><category term='C#'/><category term='stackoverflow'/><category term='Regex'/><category term='BubbleSort'/><category term='mutex'/><category term='WinForm'/><category term='Lambda'/><category term='short-circuit'/><category term='CMD'/><category term='Win32'/><category term='log4net'/><category term='Tools'/><category term='Events'/><category term='T-SQL'/><category term='static constructor'/><category term='Split'/><title type='text'>Code Resource</title><subtitle type='html'>Code samples, examples, tutorials, howto's regarding Windows, .Net development and T-SQL</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-2534950801336016252</id><published>2011-03-21T15:32:00.001+02:00</published><updated>2011-03-21T15:34:50.210+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Regex'/><title type='text'>Simple Regex example</title><summary type='text'>So I had to do a quick search and replace on an xml file. The goal was to replace a pattern with another.

Example: Replace /2/215.html with &amp;id2=2&amp;id3=215

So here is a function to look for this pattern and replace with this other pattern:

static string ReplacePattern(Match m)
{
    var x = m.ToString();
    Console.WriteLine("Match is : " + x);

    var c = x.Count(f =&gt; f == '/'); // Or </summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/2534950801336016252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2011/03/simple-regex-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/2534950801336016252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/2534950801336016252'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2011/03/simple-regex-example.html' title='Simple Regex example'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-3667482749527579395</id><published>2011-03-17T15:23:00.001+02:00</published><updated>2011-03-17T15:23:32.986+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XOR'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>Refactor routine to use LINQ</title><summary type='text'>Here is a function that does a bitwise XOR on a string

public string doIt(string input)
{
     var aChars = input.ToCharArray();
     var aCharsRes = new char[aChars.Length];

     for (int i = 0; i &lt; aChars.Length; i++)
     {
          aCharsRes[i] = (char)(aChars[i] ^ 1);
     }
     return new string(aCharsRes);
}

Here is the re-factored one liner:

public string doItOneLiner(string input)
</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/3667482749527579395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2011/03/refactor-routine-to-use-linq.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/3667482749527579395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/3667482749527579395'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2011/03/refactor-routine-to-use-linq.html' title='Refactor routine to use LINQ'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-6730229186770082898</id><published>2010-07-09T12:43:00.002+03:00</published><updated>2010-07-09T12:51:14.320+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><category scheme='http://www.blogger.com/atom/ns#' term='log4net'/><title type='text'>Log4net</title><summary type='text'>This logging infrastructure can sometimes be frustrating to setup, especially with the RollingFileAppender who wouldn't create and write to that damn log file specified in the app.config

So, one thing that helps, in the app.config of the app, put the log4net in debug like this: 
&lt;log4net debug="true"&gt;
This way, errors in log4net will be sent to the Output (Ctrl+W, O) -&gt; Show output from: Debug.</summary><link rel='related' href='http://logging.apache.org/log4net/' title='Log4net'/><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/6730229186770082898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2010/07/log4net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/6730229186770082898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/6730229186770082898'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2010/07/log4net.html' title='Log4net'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-4190180034973444352</id><published>2010-05-31T14:00:00.000+03:00</published><updated>2010-05-31T14:00:20.831+03:00</updated><title type='text'>The Following Module was built either with optimizations enabled or without debug information</title><summary type='text'>So I am trying to debug this Win service (built with VS2008) that references a module (DLL containing Managed C++ that was built with VS2010) and I keep getting a message box (see title) when attaching to the service process with VS2010. 

Plowing through the web, found this solution that oddly enough worked: 

I unchecked the "Enable just my code(managed only)" in (VS2010) Debug -&gt; Options -&gt; </summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/4190180034973444352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2010/05/following-module-was-built-either-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/4190180034973444352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/4190180034973444352'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2010/05/following-module-was-built-either-with.html' title='The Following Module was built either with optimizations enabled or without debug information'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-7449868440904382171</id><published>2010-05-08T13:24:00.001+03:00</published><updated>2010-05-08T13:25:46.032+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='static constructor'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Static constructor of a derived class is called before the static constructor of the base class</title><summary type='text'>However, for non-static constructors, the order is the other way around. See examples below:

Example 1. Static constructors
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
public class Test
    {
        static Test()
        {
            Console.WriteLine("test constructor");
        }
    }

    public class TestExtended : Test
    {
        static TestExtended()
        {
</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/7449868440904382171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2010/05/static-constructor-of-derived-class-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/7449868440904382171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/7449868440904382171'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2010/05/static-constructor-of-derived-class-is.html' title='Static constructor of a derived class is called before the static constructor of the base class'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-8974441056737772394</id><published>2010-01-22T11:36:00.001+02:00</published><updated>2010-01-22T11:36:31.077+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CMD'/><category scheme='http://www.blogger.com/atom/ns#' term='PATH'/><title type='text'>PATH environment variable</title><summary type='text'>Command prompt:

set PATH=%PATH%;c:\newdir

Appends a new path to the PATH variable. However this is scoped to the running CMD window. To make it a permanent change there is a utility called setx.exe (details here)</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/8974441056737772394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2010/01/path-environment-variable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/8974441056737772394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/8974441056737772394'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2010/01/path-environment-variable.html' title='PATH environment variable'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-8284683152665120549</id><published>2010-01-20T15:40:00.001+02:00</published><updated>2010-01-20T15:42:02.597+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='CMD'/><category scheme='http://www.blogger.com/atom/ns#' term='LogParser'/><category scheme='http://www.blogger.com/atom/ns#' term='IIS'/><category scheme='http://www.blogger.com/atom/ns#' term='WC3'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>Microsoft Log Parser</title><summary type='text'>This is a tool that provides query access to text-based data such as log files, XML/CVS files, as well as Event Log, the Registry, the file system and Active Directory. 
Download here.
Here is a sample query that returns the top bandwidth by URL

SELECT top 50 DISTINCT 
SUBSTR(TO_LOWERCASE(cs-uri-stem), 0, 55) AS Url, 
Count(*) AS Hits, 
AVG(sc-bytes) AS AvgBytes, 
SUM(sc-bytes) as ServedBytes 
</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/8284683152665120549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2010/01/microsoft-log-parser.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/8284683152665120549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/8284683152665120549'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2010/01/microsoft-log-parser.html' title='Microsoft Log Parser'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-4229486836238839932</id><published>2010-01-20T13:28:00.001+02:00</published><updated>2010-01-20T14:23:57.814+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CMD'/><category scheme='http://www.blogger.com/atom/ns#' term='net'/><title type='text'>Net command in CMD</title><summary type='text'>Useful when you want to find out where the SHARES are located on a computer:

C:\net share

Returns a list of Share Names &lt;--&gt; Resource (local paths)

Notice that shares ending with $ are admin shares</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/4229486836238839932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2010/01/net-command-in-cmd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/4229486836238839932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/4229486836238839932'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2010/01/net-command-in-cmd.html' title='Net command in CMD'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-767268974484505077</id><published>2010-01-18T15:50:00.001+02:00</published><updated>2010-01-20T14:03:20.081+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Email'/><category scheme='http://www.blogger.com/atom/ns#' term='T-SQL'/><title type='text'>SQL Server Email</title><summary type='text'>EXEC msdb.dbo.sp_send_dbmail 
@recipients= @Recipients,
@body= @temp,
@subject = 'Test', 
@profile_name = 'DBMailProfile'

See this Example</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/767268974484505077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2010/01/sql-server-email.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/767268974484505077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/767268974484505077'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2010/01/sql-server-email.html' title='SQL Server Email'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-6124564182279170640</id><published>2010-01-15T10:52:00.000+02:00</published><updated>2010-01-15T11:02:53.091+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stackoverflow'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='BubbleSort'/><title type='text'>C# BubbleSort routine</title><summary type='text'>So I wrote the first version (not optimized) in 5 minutes. For the optimization it took another 5 minutes. This algorithm is O(n2) and as Knuth puts it, "...bubble sort seems to have nothing to recommend it, except a catchy name"./// &lt;summary&gt;/// Optimized version of BubbleSort that parses one less item each iteration/// &lt;/summary&gt;public static class BubbleSort{    public static int[] Sort(int[] </summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/6124564182279170640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2010/01/optimized-version-of-bubblesort-public.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/6124564182279170640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/6124564182279170640'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2010/01/optimized-version-of-bubblesort-public.html' title='C# BubbleSort routine'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-5992951669444240563</id><published>2010-01-13T11:11:00.000+02:00</published><updated>2010-01-13T11:18:05.338+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fusion fuselogvw'/><title type='text'>Assembly Binding Log Viewer FUSLOGVW.exe</title><summary type='text'>The Assembly Binding Log Viewer displays details for failed assembly binds.This is useful when for instance your ASP.NET app craps out on you because it can't find an assembly or it finds one with a different verision.The viewer is available with the Windows SDK.MSDN infoASSEMBLY PROBING, FUSION AND FUSLOGVW IN 5 MINUTES</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/5992951669444240563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2010/01/assembly-binding-log-viewer-fuslogvwexe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/5992951669444240563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/5992951669444240563'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2010/01/assembly-binding-log-viewer-fuslogvwexe.html' title='Assembly Binding Log Viewer FUSLOGVW.exe'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-5978766105593680217</id><published>2009-12-20T06:42:00.000+02:00</published><updated>2009-12-20T06:44:32.815+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='util online IDE VisualStudio'/><title type='text'>Online IDE from coderun.com</title><summary type='text'>They have other tools too (worth checking them out)Here is the online ide.</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/5978766105593680217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/12/online-ide-from-coderuncom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/5978766105593680217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/5978766105593680217'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/12/online-ide-from-coderuncom.html' title='Online IDE from coderun.com'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-4090995142507513825</id><published>2009-07-10T06:44:00.000+03:00</published><updated>2009-07-10T06:47:02.114+03:00</updated><title type='text'>Linkuri utile Normal Form</title><summary type='text'>SQL Server 2005 Virtual LabsSimple QueryTraining SpotSQL BookDatabase Normalization</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/4090995142507513825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/07/linkuri-utile-normal-form.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/4090995142507513825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/4090995142507513825'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/07/linkuri-utile-normal-form.html' title='Linkuri utile Normal Form'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-8369108315933407473</id><published>2009-07-09T06:22:00.000+03:00</published><updated>2009-07-09T06:24:58.316+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Split'/><category scheme='http://www.blogger.com/atom/ns#' term='T-SQL'/><title type='text'>T-SQL Split function of comma delimited input param</title><summary type='text'>Check this Split function found on Kris' BlogBasically, pass in the stored proc a comma delimited list and it will return a temp table holding the id's</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/8369108315933407473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/07/t-sql-split-function-of-comma-delimited.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/8369108315933407473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/8369108315933407473'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/07/t-sql-split-function-of-comma-delimited.html' title='T-SQL Split function of comma delimited input param'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-2569329032576745980</id><published>2009-07-08T11:56:00.000+03:00</published><updated>2009-07-08T12:05:37.992+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='T-SQL'/><title type='text'>T-SQL Full Outer Join Example</title><summary type='text'>DECLARE @Table1 TABLE ( id INT, name NVARCHAR(20) )DECLARE @Table2 TABLE ( id INT, name NVARCHAR(20) )INSERT INTO @Table1 VALUES (1, 'A')INSERT INTO @Table1 VALUES (2, 'B')INSERT INTO @Table1 VALUES (3, 'C')INSERT INTO @Table2 VALUES (2, 'B')INSERT INTO @Table2 VALUES (3, 'C')INSERT INTO @Table2 VALUES (4, 'D')SELECT a.id, a.name FROM @Table1 a LEFT OUTER JOIN @Table2 b ON a.name = b.nameWHERE </summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/2569329032576745980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/07/t-sql-full-outer-join-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/2569329032576745980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/2569329032576745980'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/07/t-sql-full-outer-join-example.html' title='T-SQL Full Outer Join Example'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-8739374485988293018</id><published>2009-06-25T16:42:00.000+03:00</published><updated>2009-06-25T17:07:37.837+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Lambda'/><category scheme='http://www.blogger.com/atom/ns#' term='Delegate'/><title type='text'>Lambda Example 1</title><summary type='text'>public class TestLambda{    delegate int AddOneDgt(int x);    /// &lt;summary&gt;    /// Details at: http://blogs.msdn.com/ericwhite/pages/Lambda-Expressions.aspx    /// &lt;/summary&gt;    public static void DoWork()    {        int a = 3;        // Pointer to a static function        AddOneDgt addOneFctPtr = new AddOneDgt(A.AddOne);        // Pointer to an instance function        AddOneDgt addOneFctPtr1 =</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/8739374485988293018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/06/lambda-example-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/8739374485988293018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/8739374485988293018'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/06/lambda-example-1.html' title='Lambda Example 1'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-1742788071646947219</id><published>2009-06-19T16:10:00.000+03:00</published><updated>2009-06-19T16:12:22.711+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mutex'/><title type='text'>How to avoid multiple instances of your .Net application</title><summary type='text'>A very good method is using a mutex:Global mutex</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/1742788071646947219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/06/how-to-avoid-multiple-instances-of-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/1742788071646947219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/1742788071646947219'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/06/how-to-avoid-multiple-instances-of-your.html' title='How to avoid multiple instances of your .Net application'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-2499319011817187205</id><published>2009-06-19T07:08:00.000+03:00</published><updated>2009-06-19T07:15:45.048+03:00</updated><title type='text'>Auto-implemented properties in C# 3.0</title><summary type='text'>They are NOT the equivalent of a public field. (WHY?)private string Name { get; set }You can have a private setter so the prop becomes immutable (ie unchangable after the object is instantiated)private string Name { get; private set; }</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/2499319011817187205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/06/auto-implemented-properties-in-c-30.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/2499319011817187205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/2499319011817187205'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/06/auto-implemented-properties-in-c-30.html' title='Auto-implemented properties in C# 3.0'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-7390402268021253750</id><published>2009-06-13T11:32:00.000+03:00</published><updated>2009-06-13T11:37:28.069+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='yield'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# yield example</title><summary type='text'>private void Form1_Load(object sender, EventArgs e){    int i = 0;    string[] arr = new string[] { "bob1", "can", "bob2", "boB3", "everyday", "Bob4" };    foreach (string str in FindBobs(arr))    {        Console.WriteLine(++i + ". "  + str);    }}static IEnumerable&lt;string&gt; FindBobs(string[] arr){    foreach (string str in arr)    {        if (str.Equals("bob3", </summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/7390402268021253750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/06/c-yield-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/7390402268021253750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/7390402268021253750'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/06/c-yield-example.html' title='C# yield example'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-7672775653775326645</id><published>2009-06-13T10:19:00.000+03:00</published><updated>2009-06-13T10:31:43.548+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='short-circuit'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# short-circuit logical operators</title><summary type='text'>"&amp;&amp;" and "||" operators use short-circuit. Thus,if (false &amp;&amp; expr1){   // Won't evaluate expr1}Orif (true || expr2){  // Won't evaluate expr2}If you want both sides to be evaluated use the "&amp;" and "|" operators</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/7672775653775326645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/06/c-short-circuit-logical-operators.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/7672775653775326645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/7672775653775326645'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/06/c-short-circuit-logical-operators.html' title='C# short-circuit logical operators'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-3519629970558260971</id><published>2009-06-12T07:20:00.000+03:00</published><updated>2009-06-12T07:21:46.069+03:00</updated><title type='text'>Links</title><summary type='text'>Hidden Features of C#Yield Explained</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/3519629970558260971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/06/links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/3519629970558260971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/3519629970558260971'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/06/links.html' title='Links'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-4961814523511503328</id><published>2009-06-12T06:53:00.000+03:00</published><updated>2009-06-12T07:11:11.260+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Strings'/><title type='text'>Howto avoid having to use ToUpper() in string comparisons</title><summary type='text'>Instead of using: if (myString.ToUpper() == theirString.ToUpper) { ... }Use this: if( myString.Equals( theirString, StringComparison.OrdinalIgnoreCase ) { ... }Thanks to: Ralph</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/4961814523511503328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/06/howto-avoid-having-to-use-toupper-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/4961814523511503328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/4961814523511503328'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/06/howto-avoid-having-to-use-toupper-in.html' title='Howto avoid having to use ToUpper() in string comparisons'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-8287198674008280291</id><published>2009-06-11T16:03:00.000+03:00</published><updated>2009-06-12T07:02:42.198+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Win32'/><category scheme='http://www.blogger.com/atom/ns#' term='WinForm'/><category scheme='http://www.blogger.com/atom/ns#' term='TopMost'/><title type='text'>Howto get the TopMost Form in a WinForm App using Win32 API</title><summary type='text'>public class Win32{    public const int GW_HWNDNEXT = 2; // The next window is below the specified window    public const int GW_HWNDPREV = 3; // The previous window is above    public const int GW_HWNDFIRST = 0; // TopMost Windows    private const int SW_HIDE = 0;    [DllImport("user32", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)]    public static extern IntPtr GetWindow(</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/8287198674008280291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/06/howto-get-topmost-form-in-winform-app.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/8287198674008280291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/8287198674008280291'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/06/howto-get-topmost-form-in-winform-app.html' title='Howto get the TopMost Form in a WinForm App using Win32 API'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-1455561989358346690</id><published>2009-06-10T17:00:00.001+03:00</published><updated>2009-06-16T12:02:57.764+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Designer'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>How to avoid situations where Visual Studio Designer crashes because of code running in Design Mode</title><summary type='text'>The VS Designer will try to create your UI and will call the control constructor. If you have code that connects to a DB for instance in the constructor, the Designer will crash. To avoid that, a simple check [ if (!DesignMode) { ...get DB connection...} ] using the following property will do the trick: &lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;/// &lt;summary&gt;/// Verificam daca </summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/1455561989358346690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/06/how-to-avoid-situations-where-visual.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/1455561989358346690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/1455561989358346690'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/06/how-to-avoid-situations-where-visual.html' title='How to avoid situations where Visual Studio Designer crashes because of code running in Design Mode'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-2980809804203790007</id><published>2009-06-06T17:41:00.000+03:00</published><updated>2009-06-06T17:58:59.787+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='Events'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# Events Tutorial</title><summary type='text'>In the class that throws the events:First declare a delegate: private delegate void AudioIsPlayingHandler(MediaElement elem);Then declare an event:private event AudioIsPlaingHandler OnAudioIsPlaying;Somewhere, the class throws the event:if (OnAudioIsPlaying != null)    OnAudioIsPlaying(elem);   // Raise the event and pass some dataNow, in a class that has an instance of the previous class:First, </summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/2980809804203790007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/06/c-events-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/2980809804203790007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/2980809804203790007'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/06/c-events-tutorial.html' title='C# Events Tutorial'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4633589250149438856.post-8156054909067474680</id><published>2009-06-05T16:40:00.000+03:00</published><updated>2009-06-06T09:34:05.027+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Infragistics'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='UltraGrid'/><title type='text'>Draw Rectangle Over UltraGrid</title><summary type='text'>This is some basic stuff about how to draw lines in C#:Drawing lines in C#This tries to help with the flickering problem. Didn't get it to work over an UltraGrid:Don't Flicker! Double Buffer!This works on a Windows Form but couldn't get it to work over a control containing an UltraGrid, and it uses Win32 API to draw:C# Rubber RectangleThis works fine in a Windows Form but gives artifacts over the</summary><link rel='replies' type='application/atom+xml' href='http://resursadecod.blogspot.com/feeds/8156054909067474680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://resursadecod.blogspot.com/2009/06/draw-rectangle-over-ultragrid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/8156054909067474680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4633589250149438856/posts/default/8156054909067474680'/><link rel='alternate' type='text/html' href='http://resursadecod.blogspot.com/2009/06/draw-rectangle-over-ultragrid.html' title='Draw Rectangle Over UltraGrid'/><author><name>Vlad</name><uri>http://www.blogger.com/profile/15114265420483034079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://www3.sympatico.ca/vlad.indries/vladHeadshot.jpg'/></author><thr:total>0</thr:total></entry></feed>
