<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" media="screen" href="/App_Themes/default/rss.xslt"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Entries for Matthew van Eerde</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/niners/matthew van eerde/rss/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Entries for Matthew van Eerde</title><link>http://channel9.msdn.com/Niners/matthew%20van%20eerde/</link></image><description>Entries, comments and threads posted by Matthew van Eerde</description><link>http://channel9.msdn.com/Niners/matthew%20van%20eerde/</link><language>en-us</language><pubDate>Fri, 25 Jul 2008 23:35:38 GMT</pubDate><lastBuildDate>Fri, 25 Jul 2008 23:35:38 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3608.3122, Culture=neutral, PublicKeyToken=null)</generator><item><title>No "Microsoft employee" chiclet? [No "Microsoft employee" chiclet?]</title><description>There doesn't seem to be any (non-spoofable) indication that Microsoft employees are Microsoft employees.&amp;nbsp; Are there plans to bring this back?&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Feedback/417712-No-Microsoft-employee-chiclet/'&gt;No "Microsoft employee" chiclet?&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/417712/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Feedback/417712-No-Microsoft-employee-chiclet/</comments><link>http://channel9.msdn.com/forums/Feedback/417712-No-Microsoft-employee-chiclet/</link><pubDate>Fri, 25 Jul 2008 23:35:38 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Feedback/417712-No-Microsoft-employee-chiclet/</guid><evnet:views>458</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/417712/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>There doesn't seem to be any (non-spoofable) indication that Microsoft employees are Microsoft employees.&amp;nbsp; Are there plans to bring this back?in reply to No "Microsoft employee" chiclet?</evnet:previewtext><dc:creator>Matthew van Eerde</dc:creator><slash:comments>7</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Feedback/417712-No-Microsoft-employee-chiclet/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/417712/Trackback.aspx</trackback:ping></item><item><title>Page navigation broken in FF 3 [Page navigation broken in FF 3]</title><description>The "pencil" view on the editor is broken too, but the "&amp;lt;&amp;gt;" works for me (I'm comfortable typing in HTML)&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/409513-Page-navigation-broken-in-FF-3/'&gt;Page navigation broken in FF 3&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/409513/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/409513-Page-navigation-broken-in-FF-3/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/409513-Page-navigation-broken-in-FF-3/</link><pubDate>Fri, 13 Jun 2008 17:52:52 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/409513-Page-navigation-broken-in-FF-3/</guid><evnet:views>447</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/409513/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>The "pencil" view on the editor is broken too, but the "&amp;lt;&amp;gt;" works for me (I'm comfortable typing in HTML)in reply to Page navigation broken in FF 3</evnet:previewtext><dc:creator>Matthew van Eerde</dc:creator><slash:comments>15</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/409513-Page-navigation-broken-in-FF-3/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/409513/Trackback.aspx</trackback:ping></item><item><title>Niner "recent blog posts" [Niner "recent blog posts"]</title><description>Just noticed the "Recent Blog Posts" section on the Niner profile page.  Very cool.&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/409257-Niner-recent-blog-posts/'&gt;Niner "recent blog posts"&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/409257/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/409257-Niner-recent-blog-posts/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/409257-Niner-recent-blog-posts/</link><pubDate>Thu, 12 Jun 2008 15:26:04 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/409257-Niner-recent-blog-posts/</guid><evnet:views>435</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/409257/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Just noticed the "Recent Blog Posts" section on the Niner profile page.  Very cool.in reply to Niner "recent blog posts"</evnet:previewtext><dc:creator>Matthew van Eerde</dc:creator><slash:comments>6</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/409257-Niner-recent-blog-posts/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/409257/Trackback.aspx</trackback:ping></item><item><title>minesweeper - place your bets [minesweeper - place your bets]</title><description>&lt;IMG height=367 src="http://www.geocities.com/mvaneerde/minesweeper.gif" width=510&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/402505-minesweeper-place-your-bets/'&gt;minesweeper - place your bets&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/402505/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/402505-minesweeper-place-your-bets/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/402505-minesweeper-place-your-bets/</link><pubDate>Sat, 10 May 2008 15:49:46 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/402505-minesweeper-place-your-bets/</guid><evnet:views>2559</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/402505/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>&lt;IMG height=367 src="http://www.geocities.com/mvaneerde/minesweeper.gif" width=510&gt;</evnet:previewtext><dc:creator>Matthew van Eerde</dc:creator><slash:comments>45</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/402505-minesweeper-place-your-bets/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/402505/Trackback.aspx</trackback:ping></item><item><title>DomainKeys Identified Mail is RFC 4871 [DomainKeys Identified Mail is RFC 4871]</title><description>Note the May news on &lt;a href="http://www.dkim.org/"&gt;dkim.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href="http://www.ietf.org/rfc/rfc4871.txt"&gt;RFC 4871&lt;/a&gt;&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/255005-DomainKeys-Identified-Mail-is-RFC-4871/'&gt;DomainKeys Identified Mail is RFC 4871&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/255005/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/255005-DomainKeys-Identified-Mail-is-RFC-4871/</comments><link>http://channel9.msdn.com/forums/TechOff/255005-DomainKeys-Identified-Mail-is-RFC-4871/</link><pubDate>Fri, 25 May 2007 19:14:18 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/255005-DomainKeys-Identified-Mail-is-RFC-4871/</guid><evnet:views>3146</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/255005/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Note the May news on &lt;a href="http://www.dkim.org/"&gt;dkim.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href="http://www.ietf.org/rfc/rfc4871.txt"&gt;RFC 4871&lt;/a&gt;&lt;br&gt;</evnet:previewtext><dc:creator>Matthew van Eerde</dc:creator><slash:comments>3</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/255005-DomainKeys-Identified-Mail-is-RFC-4871/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/255005/Trackback.aspx</trackback:ping></item><item><title>Graph theory - Secret Santa problem [Graph theory - Secret Santa problem]</title><description>There's a blog post on Steve Rowe's blog that I've been following, applying graph theory to the Secret Santa tradition:&lt;br&gt;&lt;br&gt;&lt;a href="http://blogs.msdn.com/steverowe/archive/2006/12/19/secret-santa-is-np-complete.aspx"&gt;Secret Santa is NP-complete&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href="http://blogs.msdn.com/steverowe/archive/2006/12/19/secret-santa-is-np-complete.aspx#1489021"&gt;Eugen Buehler&lt;/a&gt; proposed a constraint that got me thinking.&amp;nbsp; I couldn't come up with an answer immediately, and the post is interesting as a whole, so I thought I'd extend the audience to C9/Techoff.&lt;br&gt;&lt;br&gt;The general problem (in English and Mathematician-ese:)&lt;br&gt;&lt;br&gt;Given a bunch of people&lt;br&gt;(Given a set of vertices V)&lt;br&gt;&lt;br&gt;... and a set of rules as to who-can-give-to-whom...&lt;br&gt;(And a set of allowable edges E... thus creating a graph (G, V, E))&lt;br&gt;&lt;br&gt;... is there a fast algorithm to print out a list of who should give to whom...&lt;br&gt;(Find a subgraph S in polynomial time)&lt;br&gt;&lt;br&gt;... so that...&lt;br&gt;(where)&lt;br&gt;&lt;br&gt;THE HAMILTONIAN PROBLEM&lt;br&gt;
a) ... the chain forms a single circle?&lt;br&gt;
(S is a single cycle of degree |V|)&lt;br&gt;
&lt;br&gt;THE PASS-THE-HAT PROBLEM&lt;br&gt;
b) ... everyone gives to someone else?&lt;br&gt;(every vertex in V has degree 2 in S)&lt;br&gt;
&lt;br&gt;EUGEN'S PROBLEM&lt;br&gt;c) ... everyone gives to someone else, and no-one gives to the person who gave to them?&lt;br&gt;(every vertex in V has degree 2 in S, &lt;b&gt;and there are no two-cycles in S&lt;/b&gt;)&lt;br&gt;&lt;br&gt;THE ANSWERS&lt;br&gt;&lt;br&gt;a) seems to be "no", unless you can add additional constraints... for example, if every vertex has degree at least |V|/2, then you're fine.&amp;nbsp; If you &lt;i&gt;do&lt;/i&gt; find a polynomial algorithm for this, you're on the short list for a Fields medal!&lt;br&gt;&lt;br&gt;b) seems to be "yes", by the pass-the-hat algorithm&lt;br&gt;&lt;br&gt;c) is the interesting bit.&amp;nbsp; Any takers?&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/251546-Graph-theory-Secret-Santa-problem/'&gt;Graph theory - Secret Santa problem&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/251546/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/251546-Graph-theory-Secret-Santa-problem/</comments><link>http://channel9.msdn.com/forums/TechOff/251546-Graph-theory-Secret-Santa-problem/</link><pubDate>Fri, 19 Jan 2007 20:03:02 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/251546-Graph-theory-Secret-Santa-problem/</guid><evnet:views>5366</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/251546/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>There's a blog post on Steve Rowe's blog that I've been following, applying graph theory to the Secret Santa tradition:&lt;br&gt;&lt;br&gt;&lt;a href="http://blogs.msdn.com/steverowe/archive/2006/12/19/secret-santa-is-np-complete.aspx"&gt;Secret Santa is NP-complete&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href="http://blogs.msdn.com/steverowe/archive/2006/12/19/secret-santa-is-np-complete.aspx#1489021"&gt;Eugen Buehler&lt;/a&gt; proposed a constraint that got me thinking.&amp;nbsp; I couldn't come up with an answer immediately, and the post is interesting as a whole, so I thought I'd extend the audience to C9/Techoff.&lt;br&gt;&lt;br&gt;The general problem (in English and Mathematician-ese:)&lt;br&gt;&lt;br&gt;</evnet:previewtext><dc:creator>Matthew van Eerde</dc:creator><slash:comments>4</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/251546-Graph-theory-Secret-Santa-problem/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/251546/Trackback.aspx</trackback:ping></item><item><title>Bill Gates for President [Bill Gates for President]</title><description>Mmmm.... animated favicons...&lt;br&gt;&lt;br&gt;&lt;a href="http://www.billgatesforpresident.net/"&gt;http://www.billgatesforpresident.net/&lt;/a&gt;&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/250995-Bill-Gates-for-President/'&gt;Bill Gates for President&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/250995/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/250995-Bill-Gates-for-President/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/250995-Bill-Gates-for-President/</link><pubDate>Fri, 22 Dec 2006 17:35:38 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/250995-Bill-Gates-for-President/</guid><evnet:views>12487</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/250995/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Mmmm.... animated favicons...&lt;br&gt;&lt;br&gt;&lt;a href="http://www.billgatesforpresident.net/"&gt;http://www.billgatesforpresident.net/&lt;/a&gt;&lt;br&gt;</evnet:previewtext><dc:creator>Matthew van Eerde</dc:creator><slash:comments>13</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/250995-Bill-Gates-for-President/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/250995/Trackback.aspx</trackback:ping></item><item><title>Math question - how much of the watermelon is water? [Math question - how much of the watermelon is water?]</title><description>My son got the following math problem on a homework assignment.&amp;nbsp; We had a bit of fun discussing it, drawing diagrams, coming up with sanity checks, etc.&lt;br&gt;&lt;br&gt;But then his teacher marked it wrong -- she pointed out that the teacher's guide had a different answer.&amp;nbsp; I asked her which answer she thought was right, and she sided with the teacher's guide.&lt;br&gt;&lt;br&gt;I'm trying to convince myself that my understanding of the problem is wrong -- or that the problem is ambiguous -- but I don't see it.&lt;br&gt;&lt;br&gt;What do you think?&amp;nbsp; Here's the problem statement:&lt;br&gt;&lt;br&gt;

&lt;p class="MsoPlainText"&gt;18. A farmer raised a watermelon that weighed 20 lb. From
his experience with raising watermelons, he estimated that 95% of the
watermelon's weight is water.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;



&lt;p class="MsoPlainText"&gt;a. How much of the watermelon is water?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;



&lt;p class="MsoPlainText"&gt;b. How much of the watermelon is &lt;i&gt;not&lt;/i&gt; water?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;



&lt;p class="MsoPlainText"&gt;c. The watermelon was shipped off to market. There it
sat, until it had dehydrated (lost water). If the watermelon is still 90%
water, what percent of it is not water?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;



&lt;p class="MsoPlainText"&gt;d. The solid part of the watermelon still weighs the
same. What was the weight of the watermelon at this point?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

To avoid poisoning the well, I will hold off on revealing my son's answer and the teacher's guide answer for now.&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/250738-Math-question-how-much-of-the-watermelon-is-water/'&gt;Math question - how much of the watermelon is water?&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/250738/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/250738-Math-question-how-much-of-the-watermelon-is-water/</comments><link>http://channel9.msdn.com/forums/TechOff/250738-Math-question-how-much-of-the-watermelon-is-water/</link><pubDate>Tue, 12 Dec 2006 18:56:42 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/250738-Math-question-how-much-of-the-watermelon-is-water/</guid><evnet:views>22471</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/250738/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>My son got the following math problem on a homework assignment.&amp;nbsp; We had a bit of fun discussing it, drawing diagrams, coming up with sanity checks, etc.&lt;br&gt;&lt;br&gt;But then his teacher marked it wrong -- she pointed out that the teacher's guide had a different answer.&amp;nbsp; I asked her which answer she thought was right, and she sided with the teacher's guide.&lt;br&gt;&lt;br&gt;I'm trying to convince myself that my understanding of the problem is wrong -- or that the problem is ambiguous -- but I don't see it.&lt;br&gt;&lt;br&gt;What do you think?&amp;nbsp; Here's the problem statement:&lt;br&gt;&lt;br&gt;</evnet:previewtext><dc:creator>Matthew van Eerde</dc:creator><slash:comments>22</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/250738-Math-question-how-much-of-the-watermelon-is-water/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/250738/Trackback.aspx</trackback:ping></item><item><title>Challenge: shortest patterns that match everything, nothing [Challenge: shortest patterns that match everything, nothing]</title><description>I'm working on a project where I get to use XPath, .NET regular expressions, and SQL LIKE patterns.&amp;nbsp; Lots of fun :)&lt;br&gt;&lt;br&gt;I'm wondering what the shortest possible patterns are in each of these pattern-matching languages that either a) match every expression or b) fail to match every expression.&lt;br&gt;&lt;br&gt;I've got the "match everything" expressions down for two of them, I think:&lt;br&gt;&lt;br&gt;// (regex, match everything)&lt;br&gt;If the null pattern is disallowed (suppose this is javascript) then I'm not sure... /.*/ works, and perhaps /^/ is worth considering.&lt;br&gt;&lt;br&gt;&lt;br&gt;'%' (LIKE, match everything)&lt;br&gt;&lt;br&gt;The "match nothing" cases are harder.&amp;nbsp; I've come up with some to beat:&lt;br&gt;&lt;br&gt;/a\bc/ (regex, match nothing)&lt;br&gt;&lt;br&gt;'[]' (LIKE, match nothing)&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/232072-Challenge-shortest-patterns-that-match-everything-nothing/'&gt;Challenge: shortest patterns that match everything, nothing&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/232072/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/232072-Challenge-shortest-patterns-that-match-everything-nothing/</comments><link>http://channel9.msdn.com/forums/TechOff/232072-Challenge-shortest-patterns-that-match-everything-nothing/</link><pubDate>Sun, 24 Sep 2006 01:01:50 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/232072-Challenge-shortest-patterns-that-match-everything-nothing/</guid><evnet:views>7679</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/232072/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I'm working on a project where I get to use XPath, .NET regular expressions, and SQL LIKE patterns.&amp;nbsp; Lots of fun &lt;img src='/emoticons/C9/emotion-1.gif' alt='Smiley' /&gt;&lt;br&gt;&lt;br&gt;I'm wondering what the shortest possible patterns are in each of these pattern-matching languages that either a) match every expression or b) fail to match every expression.&lt;br&gt;&lt;br&gt;I've got the "match everything" expressions down for two of them, I think:&lt;br&gt;&lt;br&gt;// (regex, match everything)&lt;br&gt;If the null pattern is disallowed (suppose this is javascript) then I'm not sure... /.*/ works, and perhaps /^/ is worth considering.&lt;br&gt;&lt;br&gt;&lt;br&gt;'%' (LIKE, match everything)&lt;br&gt;&lt;br&gt;</evnet:previewtext><dc:creator>Matthew van Eerde</dc:creator><slash:comments>4</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/232072-Challenge-shortest-patterns-that-match-everything-nothing/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/232072/Trackback.aspx</trackback:ping></item><item><title>Template inheritance question [Template inheritance question]</title><description>So I'm writing an XML document&amp;nbsp;tree-walker that goes node-by-node, starting at the root, depth-first.&lt;BR&gt;I'm writing it in C++/COM.&lt;BR&gt;&lt;BR&gt;I have the algorithm all figured out, including a function&lt;BR&gt;HRESULT HandleTree(CComPtr&amp;lt;IXMLDOMNode&amp;gt; &amp;amp;pNode)&lt;BR&gt;which handles that node, its children, and siblings.&lt;BR&gt;&lt;BR&gt;I also have the document itself in a CComPtr&amp;lt;IXMLDOMDocument&amp;gt; pointer.&lt;BR&gt;&lt;BR&gt;but... I'm&amp;nbsp;running&amp;nbsp;into trouble trying to&amp;nbsp;do this:&lt;BR&gt;&lt;BR&gt;HRESULT HandleDocument() {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;CComPtr&amp;lt;IXMLDOMDocument&amp;gt; pDoc;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// set pDoc...&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;hr = HandleTree(pDoc); // PROBLEM LINE&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// deal with hr...&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return hr;&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;That HandleTree call doesn't work because...&lt;BR&gt;although IXMLDOMDocument inherits from IXMLDOMNode...&lt;BR&gt;CComPtr&amp;lt;IXMLDOMDocument&amp;gt; does not inherit from CComPtr&amp;lt;IXMLDOMNode&amp;gt; (of course.)&lt;BR&gt;&lt;BR&gt;So far the best idea I've come up with is this:&lt;BR&gt;Given the root, call .firstChild to get the first node; then call .parentNode on that to get the root back again.&lt;BR&gt;&lt;BR&gt;I'm not particularly impressed with this idea, and I have this nagging feeling I'm missing something obvious.&lt;BR&gt;&lt;BR&gt;If there was a .rootNode property of XMLDOMDocument objects, that would solve my problem.&lt;BR&gt;&lt;BR&gt;Any ideas?&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/206218-Template-inheritance-question/'&gt;Template inheritance question&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/206218/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/206218-Template-inheritance-question/</comments><link>http://channel9.msdn.com/forums/TechOff/206218-Template-inheritance-question/</link><pubDate>Mon, 03 Jul 2006 02:13:47 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/206218-Template-inheritance-question/</guid><evnet:views>7242</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/206218/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>So I'm writing an XML document&amp;nbsp;tree-walker that goes node-by-node, starting at the root, depth-first.&lt;BR&gt;I'm writing it in C++/COM.&lt;BR&gt;&lt;BR&gt;I have the algorithm all figured out, including a function&lt;BR&gt;HRESULT HandleTree(CComPtr&amp;lt;IXMLDOMNode&amp;gt; &amp;amp;pNode)&lt;BR&gt;which handles that node, its children, and siblings.&lt;BR&gt;&lt;BR&gt;I also have the document itself in a CComPtr&amp;lt;IXMLDOMDocument&amp;gt; pointer.&lt;BR&gt;&lt;BR&gt;but... I'm&amp;nbsp;running&amp;nbsp;into trouble trying to&amp;nbsp;do this:&lt;BR&gt;&lt;BR&gt;HRESULT HandleDocument() {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;CComPtr&amp;lt;IXMLDOMDocument&amp;gt; pDoc;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// set pDoc...&lt;BR&gt;</evnet:previewtext><dc:creator>Matthew van Eerde</dc:creator><slash:comments>4</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/206218-Template-inheritance-question/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/206218/Trackback.aspx</trackback:ping></item></channel></rss>