<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>kevin Mocha</title>
  <link rel="alternate" type="text/html" href="http://blog.ilovedoudou.com/" />
  <link rel="self" href="http://blog.ilovedoudou.com/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2010-08-11T17:52:15.9871893-04:00</updated>
  <author>
    <name>Kevin Mocha</name>
  </author>
  <subtitle>Bookmarks collected from web.</subtitle>
  <id>http://blog.ilovedoudou.com/</id>
  <generator uri="http://www.dasblog.net" version="1.9.6264.0">DasBlog</generator>
  <entry>
    <title>I/O Completion Ports</title>
    <link rel="alternate" type="text/html" href="http://blog.ilovedoudou.com/PermaLink,guid,ee0ba8f9-e368-40f2-9f36-244c724474e6.aspx" />
    <id>http://blog.ilovedoudou.com/PermaLink,guid,ee0ba8f9-e368-40f2-9f36-244c724474e6.aspx</id>
    <published>2010-08-11T17:52:15.9871893-04:00</published>
    <updated>2010-08-11T17:52:15.9871893-04:00</updated>
    <category term="DotNet / CSharp" label="DotNet / CSharp" scheme="http://blog.ilovedoudou.com/CategoryView,category,DotNet%2B%2c%2BCSharp.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://msdn.microsoft.com/en-us/library/aa365198%28VS.85%29.aspx" href="http://msdn.microsoft.com/en-us/library/aa365198%28VS.85%29.aspx">http://msdn.microsoft.com/en-us/library/aa365198%28VS.85%29.aspx</a>
          <br />
          <a title="http://www.codeproject.com/KB/cs/managediocp.aspx" href="http://www.codeproject.com/KB/cs/managediocp.aspx">http://www.codeproject.com/KB/cs/managediocp.aspx</a>
          <br />
          <a title="http://www.codeproject.com/KB/cs/socketasynceventargs.aspx" href="http://www.codeproject.com/KB/cs/socketasynceventargs.aspx">http://www.codeproject.com/KB/cs/socketasynceventargs.aspx</a>
          <br />
          <a title="http://msdn.microsoft.com/en-us/library/system.net.sockets.socketasynceventargs.aspx" href="http://msdn.microsoft.com/en-us/library/system.net.sockets.socketasynceventargs.aspx">http://msdn.microsoft.com/en-us/library/system.net.sockets.socketasynceventargs.aspx</a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=ee0ba8f9-e368-40f2-9f36-244c724474e6" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Rich Newman: Introduction to the CAB/SCSF</title>
    <link rel="alternate" type="text/html" href="http://blog.ilovedoudou.com/PermaLink,guid,0b32cdea-eca1-43ac-a0f0-7667e6769b30.aspx" />
    <id>http://blog.ilovedoudou.com/PermaLink,guid,0b32cdea-eca1-43ac-a0f0-7667e6769b30.aspx</id>
    <published>2010-08-02T10:15:18.4068172-04:00</published>
    <updated>2010-08-02T15:24:38.7288814-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://richnewman.wordpress.com/intro-to-cab-toc/" href="http://richnewman.wordpress.com/intro-to-cab-toc/">http://richnewman.wordpress.com/intro-to-cab-toc/</a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=0b32cdea-eca1-43ac-a0f0-7667e6769b30" />
      </div>
    </content>
  </entry>
  <entry>
    <title>PMP Resource</title>
    <link rel="alternate" type="text/html" href="http://blog.ilovedoudou.com/PermaLink,guid,9dd16a1e-f68e-4878-a2e0-ebcfd18f971a.aspx" />
    <id>http://blog.ilovedoudou.com/PermaLink,guid,9dd16a1e-f68e-4878-a2e0-ebcfd18f971a.aspx</id>
    <published>2010-07-30T10:37:29.8967202-04:00</published>
    <updated>2010-07-30T10:37:29.8967202-04:00</updated>
    <category term="Life / Career" label="Life / Career" scheme="http://blog.ilovedoudou.com/CategoryView,category,Life%2B%2c%2BCareer.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://www.project-management-podcast.com/" href="http://www.project-management-podcast.com/">http://www.project-management-podcast.com/</a>
        </p>
        <p>
          <a title="http://www.project-management-prepcast.com/" href="http://www.project-management-prepcast.com/">http://www.project-management-prepcast.com/</a>
        </p>
        <p>
          <a title="http://www.pmi.org/PDF/pdc_pmphandbook.pdf" href="http://www.pmi.org/PDF/pdc_pmphandbook.pdf">http://www.pmi.org/PDF/pdc_pmphandbook.pdf</a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=9dd16a1e-f68e-4878-a2e0-ebcfd18f971a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>.NET 4.0 and System.Threading.Tasks</title>
    <link rel="alternate" type="text/html" href="http://blog.ilovedoudou.com/PermaLink,guid,8163cafc-2f1d-4f04-ba99-2de260a3b25a.aspx" />
    <id>http://blog.ilovedoudou.com/PermaLink,guid,8163cafc-2f1d-4f04-ba99-2de260a3b25a.aspx</id>
    <published>2010-07-19T18:10:55.2540227-04:00</published>
    <updated>2010-07-19T18:10:55.2540227-04:00</updated>
    <category term="DotNet" label="DotNet" scheme="http://blog.ilovedoudou.com/CategoryView,category,DotNet.aspx" />
    <category term="DotNet / CSharp" label="DotNet / CSharp" scheme="http://blog.ilovedoudou.com/CategoryView,category,DotNet%2B%2c%2BCSharp.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://www.codethinked.com/post/2010/01/25/NET-40-and-SystemThreadingTasks.aspx" href="http://www.codethinked.com/post/2010/01/25/NET-40-and-SystemThreadingTasks.aspx">http://www.codethinked.com/post/2010/01/25/NET-40-and-SystemThreadingTasks.aspx</a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=8163cafc-2f1d-4f04-ba99-2de260a3b25a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Overview of WordprocessingML</title>
    <link rel="alternate" type="text/html" href="http://blog.ilovedoudou.com/PermaLink,guid,358743d2-cd44-40b1-ac63-7444707042e7.aspx" />
    <id>http://blog.ilovedoudou.com/PermaLink,guid,358743d2-cd44-40b1-ac63-7444707042e7.aspx</id>
    <published>2010-07-02T14:41:15.9718847-04:00</published>
    <updated>2010-07-02T14:52:10.4593183-04:00</updated>
    <category term="DotNet / CSharp" label="DotNet / CSharp" scheme="http://blog.ilovedoudou.com/CategoryView,category,DotNet%2B%2c%2BCSharp.aspx" />
    <category term="DotNet / VSTO" label="DotNet / VSTO" scheme="http://blog.ilovedoudou.com/CategoryView,category,DotNet%2B%2c%2BVSTO.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://rep.oio.dk/Microsoft.com/officeschemas/wordprocessingml_article.htm" href="http://rep.oio.dk/Microsoft.com/officeschemas/wordprocessingml_article.htm">http://rep.oio.dk/Microsoft.com/officeschemas/wordprocessingml_article.htm</a>
        </p>
        <p>
          <a title="http://msdn.microsoft.com/en-us/library/ms406049.aspx" href="http://msdn.microsoft.com/en-us/library/ms406049.aspx">http://msdn.microsoft.com/en-us/library/ms406049.aspx</a>
        </p>
        <p>
FAQ(1) <a title="http://social.msdn.microsoft.com/Forums/en-US/oxmlsdk/thread/19032efe-80af-4a16-b954-1f5a6d2f2236" href="http://social.msdn.microsoft.com/Forums/en-US/oxmlsdk/thread/19032efe-80af-4a16-b954-1f5a6d2f2236">http://social.msdn.microsoft.com/Forums/en-US/oxmlsdk/thread/19032efe-80af-4a16-b954-1f5a6d2f2236</a></p>
        <p>
FAQ(2) <a title="http://social.msdn.microsoft.com/Forums/en-US/oxmlsdk/thread/e53ae401-a698-4827-b6c4-6b4e5e50c3a1" href="http://social.msdn.microsoft.com/Forums/en-US/oxmlsdk/thread/e53ae401-a698-4827-b6c4-6b4e5e50c3a1">http://social.msdn.microsoft.com/Forums/en-US/oxmlsdk/thread/e53ae401-a698-4827-b6c4-6b4e5e50c3a1</a></p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=358743d2-cd44-40b1-ac63-7444707042e7" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Windows Forms Combobox DropDownStyle</title>
    <link rel="alternate" type="text/html" href="http://blog.ilovedoudou.com/PermaLink,guid,aab5eadc-2adf-420f-8451-57e3fb984cad.aspx" />
    <id>http://blog.ilovedoudou.com/PermaLink,guid,aab5eadc-2adf-420f-8451-57e3fb984cad.aspx</id>
    <published>2010-06-28T14:09:25.102909-04:00</published>
    <updated>2010-06-28T14:09:25.102909-04:00</updated>
    <category term="DotNet" label="DotNet" scheme="http://blog.ilovedoudou.com/CategoryView,category,DotNet.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
dropdownstyle: dropdownlist<br />
autocompletemode: append<br />
autocompletesource: listtiems
</p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=aab5eadc-2adf-420f-8451-57e3fb984cad" />
      </div>
    </content>
  </entry>
  <entry>
    <title>OutOfMemoryException Fix</title>
    <link rel="alternate" type="text/html" href="http://blog.ilovedoudou.com/PermaLink,guid,bd6622e5-ec4e-43e2-9437-f8b6d2d4bad3.aspx" />
    <id>http://blog.ilovedoudou.com/PermaLink,guid,bd6622e5-ec4e-43e2-9437-f8b6d2d4bad3.aspx</id>
    <published>2010-06-28T10:40:20.5156447-04:00</published>
    <updated>2010-06-28T10:40:20.5156447-04:00</updated>
    <category term="DotNet" label="DotNet" scheme="http://blog.ilovedoudou.com/CategoryView,category,DotNet.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://stevenharman.net/blog/archive/2008/04/29/hacking-visual-studio-to-use-more-than-2gigabytes-of-memory.aspx" href="http://stevenharman.net/blog/archive/2008/04/29/hacking-visual-studio-to-use-more-than-2gigabytes-of-memory.aspx">http://stevenharman.net/blog/archive/2008/04/29/hacking-visual-studio-to-use-more-than-2gigabytes-of-memory.aspx</a>
        </p>
        <p>
          <a title="http://confluence.jetbrains.net/display/ReSharper/OutOfMemoryException+Fix" href="http://confluence.jetbrains.net/display/ReSharper/OutOfMemoryException+Fix">http://confluence.jetbrains.net/display/ReSharper/OutOfMemoryException+Fix</a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=bd6622e5-ec4e-43e2-9437-f8b6d2d4bad3" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Windows forms DataGridView</title>
    <link rel="alternate" type="text/html" href="http://blog.ilovedoudou.com/PermaLink,guid,a1d41172-bfc4-49d2-8c61-b9c12dbaa009.aspx" />
    <id>http://blog.ilovedoudou.com/PermaLink,guid,a1d41172-bfc4-49d2-8c61-b9c12dbaa009.aspx</id>
    <published>2010-06-22T11:49:55.2552874-04:00</published>
    <updated>2010-06-22T11:49:55.2552874-04:00</updated>
    <category term="DotNet / CSharp" label="DotNet / CSharp" scheme="http://blog.ilovedoudou.com/CategoryView,category,DotNet%2B%2c%2BCSharp.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
INotifyPropertyChanged 
</p>
        <p>
          <a title="http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/0dfadd3a-0418-4b1a-90ef-cc4197c799c0/" href="http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/0dfadd3a-0418-4b1a-90ef-cc4197c799c0/">http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/0dfadd3a-0418-4b1a-90ef-cc4197c799c0/</a>
        </p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=a1d41172-bfc4-49d2-8c61-b9c12dbaa009" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Winforms OK / Cancel processing</title>
    <link rel="alternate" type="text/html" href="http://blog.ilovedoudou.com/PermaLink,guid,b803353f-a0fd-4e22-b652-e96cacac2cc3.aspx" />
    <id>http://blog.ilovedoudou.com/PermaLink,guid,b803353f-a0fd-4e22-b652-e96cacac2cc3.aspx</id>
    <published>2010-06-18T16:09:52.9530801-04:00</published>
    <updated>2010-06-18T16:09:52.9530801-04:00</updated>
    <category term="DotNet / CSharp" label="DotNet / CSharp" scheme="http://blog.ilovedoudou.com/CategoryView,category,DotNet%2B%2c%2BCSharp.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://www.vbinfozine.com/t_wfdlg.shtml" href="http://www.vbinfozine.com/t_wfdlg.shtml">http://www.vbinfozine.com/t_wfdlg.shtml</a>
        </p>
        <p>
But what if I want to do some validation <b>WITHIN</b> the button's <code>Click</code> event
handler and if the validation fails, <b>I DON'T WANT</b> to close the dialog? 
</p>
        <p>
  
</p>
        <p>
First solution: Set <code>OKCmd.DialogResult = DialogResult.None</code> (string "None"
in the designer) and close the form manually: 
</p>
        <p>
  
</p>
        <p>
Second solution: Leave the <code>OKCmd.DialogResult = DialogResult.OK</code>, but
prevent the form to automatically close when the user enters invalid logon information.
Here is how: <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=b803353f-a0fd-4e22-b652-e96cacac2cc3" /></p>
      </div>
    </content>
  </entry>
  <entry>
    <title>Advantages to Using Private Static Methods</title>
    <link rel="alternate" type="text/html" href="http://blog.ilovedoudou.com/PermaLink,guid,a72dda97-e55b-4f7f-836b-408c3f074c13.aspx" />
    <id>http://blog.ilovedoudou.com/PermaLink,guid,a72dda97-e55b-4f7f-836b-408c3f074c13.aspx</id>
    <published>2010-06-14T16:12:46.9354936-04:00</published>
    <updated>2010-06-14T16:12:46.9354936-04:00</updated>
    <category term="DotNet / CSharp" label="DotNet / CSharp" scheme="http://blog.ilovedoudou.com/CategoryView,category,DotNet%2B%2c%2BCSharp.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://stackoverflow.com/questions/135020/advantages-to-using-private-static-methods" href="http://stackoverflow.com/questions/135020/advantages-to-using-private-static-methods">http://stackoverflow.com/questions/135020/advantages-to-using-private-static-methods</a>
        </p>
        <p>
After you mark the methods as static, the compiler will emit non-virtual call sites
to these members. Emitting non-virtual call sites will prevent a check at runtime
for each call that ensures that the current object pointer is non-null. This can result
in a measurable performance gain for performance-sensitive code. In some cases, the
failure to access the current object instance represents a correctness issue.
</p>
        <p>
Static methods are useful, because just by looking at its signature, you know that
the calling it doesn't use or modify the current instance's state.
</p>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=a72dda97-e55b-4f7f-836b-408c3f074c13" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Dynamically Composing Expression Predicates</title>
    <link rel="alternate" type="text/html" href="http://blog.ilovedoudou.com/PermaLink,guid,02d2ce87-5b8e-41a3-830a-473c6007bc3c.aspx" />
    <id>http://blog.ilovedoudou.com/PermaLink,guid,02d2ce87-5b8e-41a3-830a-473c6007bc3c.aspx</id>
    <published>2010-06-04T17:38:48.8990189-04:00</published>
    <updated>2010-06-07T15:14:43.3782695-04:00</updated>
    <category term="DotNet / CSharp" label="DotNet / CSharp" scheme="http://blog.ilovedoudou.com/CategoryView,category,DotNet%2B%2c%2BCSharp.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a title="http://www.albahari.com/nutshell/predicatebuilder.aspx" href="http://www.albahari.com/nutshell/predicatebuilder.aspx">http://www.albahari.com/nutshell/predicatebuilder.aspx</a>
        </p>
        <p>
          <a title="http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx" href="http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx">http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx</a>
        </p>
        <p>
Visitor class<br /></p>
        <pre class="csharpcode">
          <span class="rem">/// &lt;summary&gt;</span>
          <span class="rem">///
A visitor that filters visited items</span>
          <span class="rem">/// &lt;/summary&gt;</span>
          <span class="rem">///
&lt;typeparam name="T"&gt;The type of item to be visited&lt;/typeparam&gt;</span>
          <span class="kwrd">public</span>
          <span class="kwrd">class</span> FilterVisitor&lt;T&gt;
: IVisitor&lt;T&gt; { <span class="preproc">#region</span> Private Members <span class="rem">///
&lt;summary&gt;</span><span class="rem">/// The function to use for filtering items</span><span class="rem">///
&lt;/summary&gt;</span><span class="kwrd">private</span><span class="kwrd">readonly</span> Func&lt;T, <span class="kwrd">bool</span>&gt;
_filterFunction; <span class="rem">/// &lt;summary&gt;</span><span class="rem">///
The filtered items</span><span class="rem">/// &lt;/summary&gt;</span><span class="kwrd">private</span><span class="kwrd">readonly</span> List&lt;T&gt;
_result; <span class="preproc">#endregion</span><span class="preproc">#region</span> Constructor <span class="rem">///
&lt;summary&gt;</span><span class="rem">/// Constructor</span><span class="rem">///
&lt;/summary&gt;</span><span class="rem">/// &lt;param name="filterFunction"&gt;The
function to use for filtering items&lt;/param&gt;</span><span class="kwrd">public</span> FilterVisitor(Func&lt;T, <span class="kwrd">bool</span>&gt;
filterFunction) { _filterFunction = filterFunction; _result = <span class="kwrd">new</span> List&lt;T&gt;();
} <span class="rem">/// &lt;summary&gt;</span><span class="rem">/// Constructor</span><span class="rem">///
&lt;/summary&gt;</span><span class="rem">/// &lt;param name="expression"&gt;The lambda
expression to use for filtering items&lt;/param&gt;</span><span class="kwrd">public</span> FilterVisitor(Expression&lt;Func&lt;T, <span class="kwrd">bool</span>&gt;&gt;
expression) { <font color="#ff0000">_filterFunction = expression.Compile();</font> _result
= <span class="kwrd">new</span> List&lt;T&gt;(); } <span class="preproc">#endregion</span><span class="preproc">#region</span> Public
Properties <span class="rem">/// &lt;summary&gt;</span><span class="rem">/// The
filtered items</span><span class="rem">/// &lt;/summary&gt;</span><span class="kwrd">public</span> List&lt;T&gt;
Result { get { <span class="kwrd">return</span> _result; } } <span class="preproc">#endregion</span><span class="preproc">#region</span> IVisitor&lt;T&gt;
Members <span class="rem">/// &lt;summary&gt;</span><span class="rem">/// Visits
the specified item, and adds the item to the result if the filter function is true</span><span class="rem">///
&lt;/summary&gt;</span><span class="rem">/// &lt;param name="item"&gt;The item to
be evaluated&lt;/param&gt;</span><span class="kwrd">public</span><span class="kwrd">void</span> Visit(T
item) { <span class="kwrd">if</span> (_filterFunction(item)) { _result.Add(item);
} } <span class="preproc">#endregion</span> } } </pre>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <img width="0" height="0" src="http://blog.ilovedoudou.com/aggbug.ashx?id=02d2ce87-5b8e-41a3-830a-473c6007bc3c" />
      </div>
    </content>
  </entry>
</feed>