I just want to select the target element which has "name" attribute value = 'syslog'. Anyway, I always get an NullReferenceException. Can anyone help me to figure out what is the problem?   ---------------- My code -------------------------------------------  XmlNode root = _configFile.DocumentElement; // root is not none, and is correct. XmlNode syslogNode = root.SelectSingleNode("descendant::targets/target[@name='syslog']"); // the syslogNode is null   -----------------My XML file --------------------------------------  &lt;nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;    &lt;extensions&gt;     &lt;add assembly="NLog.Targets.Syslog" /&gt;   &lt;/extensions&gt;    &lt;targets&gt;     &lt;target name="syslog" xsi:type="Syslog" syslogserver="127.0.0.1" port="514" facility="Local7" /&gt;     &lt;target name="file" xsi:type="File" layout="${level} | ${longdate} | ${callsite:className=true:fileName=false:includeSourcePath=false:methodName=true} | ${message} ${exception:format=tostring}"             fileName="${specialfolder:folder=LocalApplicationData}/Televic Conference/CoCon/Log/server_log_${shortdate}.txt"             archiveFileName="${specialfolder:folder=LocalApplicationData}/Televic Conference/CoCon/Log/Archives/server_log.{#}.txt"             archiveEvery="Day" archiveNumbering="Rolling" maxArchiveFiles="20" concurrentWrites="true" keepFileOpen="false"/&gt;     &lt;target name="console" xsi:type="ColoredConsole" layout="${longdate}: ${message}"/&gt;     &lt;target name="debug" xsi:type="OutputDebugString" layout="${longdate}: ${message}"/&gt;   &lt;/targets&gt;    &lt;rules&gt;     &lt;logger name="*" minLevel="Trace" appendTo="syslog"/&gt;     &lt;logger name="*" minlevel="Trace" writeTo="file" /&gt;   &lt;/rules&gt; &lt;/nlog&gt;
Its a .vbproj and looks like this  &lt;Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;     &lt;PropertyGroup&gt;         &lt;ProjectGuid&gt;15a7ee82-9020-4fda-a7fb-85a61664692d&lt;/ProjectGuid&gt;   all i want to get is the ProjectGuid but it does not work when a namespace is there...   Dim xmlDoc As New XmlDocument()  Dim filePath As String = Path.Combine(mDirectory, name + "\" + name + ".vbproj")  xmlDoc.Load(filePath)  Dim value As Object = xmlDoc.SelectNodes("/Project/PropertyGroup/ProjectGuid")   what can i do to fix this?
Why isn't temperature frame dependent? In (non-relativistic) classical physics, if the temperature of an object is proportional to the average kinetic energy ${1 \over 2} m\overline {v^{2}}$of its particles (or molecules), then shouldn't that temperature depend on the frame of reference - since $\overline {v^{2}}$ will be different in different frames?  (I.e. In the lab frame  $K_l = {1 \over 2} m\overline {v^{2}} $, but in a frame moving with velocity $u$ relative to the lab frame, $K_u =  {1 \over 2} m \overline {(v+u)^{2}}$). During my calculations I ended up with the following product: $$P=\prod_{n=1}^\infty e\left(\frac{n}{n+1}\right)^{n}\sqrt{\frac{n}{n+1}}$$ I tried to express it in terms of series by taking the logarithm  $$S=\ln P=\sum_{n=1}^\infty \ln\left(e\left(\frac{n}{n+1}\right)^{n}\sqrt{\frac{n}{n+1}}\right)$$ but I also got stuck. Numerical calculation suggests that it is equal to $$P\stackrel{?}=\frac{\sqrt{2\pi}}{e}$$ but I am not able to prove the conjecture. Any idea about how to evaluate the product? Any help would be appreciated. Thanks in advance. Is a comma necessary in "What’s funny, is …"? In the sentence     What’s funny is Cat’s dry humour.   Wouldn’t it be better to put a comma after “funny”:     What’s funny, is Cat’s dry humour.   This question entails a (at the time of writing) heated discussion in the . How to download Ubuntu Server backups automatically? I'm thinking of an investment in a new root server running ubuntu. Due to the fact, that the provider won't have extra backup-space, I need an other solution.  Is it possible to download the server backups automatically when my desktop machine is connected to the internet and in idle state? Is there any way to fix the wavy lines that appear when photographing a striped dress?   It's not just in viewing online: when it was printed at wallet size, the wavy lines showed up. Do we ever get more information about the Entwives? During my recent re-reading of The Two Towers I was struck again by a question that has bothered me since I was a youngling: What on earth is up with the Entwives?  Treebeard says they went away in the distant past and just... got lost?  Did Tolkien ever make mention of them again, or is this one of those unsolved mysteries of Middle Earth? Where can I find 32-bit version of Ubuntu? How to delete an element from an array in C# Lets say I have this array,  int[] numbers = {1, 3, 4, 9, 2};   How can I delete an element by "name"? , lets say number 4?  Even ArrayList didn't help to delete?  string strNumbers = " 1, 3, 4, 9, 2"; ArrayList numbers = new ArrayList(strNumbers.Split(new char[] { ',' })); numbers.RemoveAt(numbers.IndexOf(4)); foreach (var n in numbers) {     Response.Write(n); } I have a 17 inch LCD, with a maximum resolution of 1280x720. It works fine, but there are some apps that require 1024x768. I know that the maximum resolution is called like that for a reason, but is there no way of increasing the resolution, other than getting a bigger monitor? The set of integers $n$ expressible as $n=x^2+xy+y^2$ Let $S$ be the set of integers $n$, such there exist integers $x,y$ with $$n=x^2+xy+y^2$$   Is the implication $$a,b\in S\implies ab\in S$$ true? If yes, how can I prove it?  I worked out $$n\in S\iff 4n\in S$$ and $$n\in S\iff 3n\in S$$ I tried two approaches. The first is to express $$(a^2+ab+b^2)(c^2+cd+d^2)$$ in the form $$f^2+fg+g^2$$ with polynomials $f,g$ with integer coefficients. I however could not find suitable $f$ and $g$. The second approach is based on $$x^2+xy+y^2=\frac{(2x+y)^2+3y^2}{4}$$ If we have $n=x^2+xy+y^2$ , we have $u^2+3v^2=4n$ for some integers $u,v$ with equal parity. The main problem of this approach is to consider the equal parity. Any ideas ? "two bypass/decoupling capacitors" rule? Incorrect icons on hot network questions $$\int_{-\infty}^{\infty} \frac{\cos(αx)}{(x^2+1)(x^2+4)} \mathrm dx. $$  I am not sure how to solve this question. Can anyone help me to approach this problem. Thanks. Why does every server I try say it can't connect? I just re-purchased Minecraft (because my old profile stopped working so I bought it) after not playing it for a couple of months. I've added a bunch of servers, but almost every one says "can not connect."  I know its not because the server is not 1.7.2, because I checked that they'd update. It will say "server can't connect" after a long time. I don't know if its me or the servers.  My server screen looks like this (notice the one at the bottom – it's still loading!): When do we use "at" and "in" with "arrive" talking about place, not time? "Open in terminal" not working on nautilus as root When using natilus as root, open in terminal used to work as using with any user. However, when I press open in terminal when using nautilus as root now, it does nothing.  How to solve it?  The error:  GLib-GObject-CRITICAL **: g_object_set_data: assertion 'G_IS_OBJECT (object)' failed Why energy curves spacetime? This  explains how energy curves spacetime. But I would like to know why energy curves spacetime, is there something like particle interaction that produce this result? Mutual Independence Definition Clarification Books for starting with analysis I am interested in self-studying real analysis, and I was wondering which textbook I should pick up. I know all high school mathematics, I have read  (I did most of the exercises).  I have completed a computational calculus course which covered everything up to and including integration by parts (including the substitution method and Riemann sums) I am currently considering:    From what I have heard this is not very well suited for self-study and that while the exercises are extremely difficult, if you take the time they are worth the effort.    I have heard that while Spivak explains proofs in much more detail than Principles, it doesn't cover all of the material in the latter.    I don't know much about this. I have only seen some comments saying that it is an excellent introduction to analysis.    Extra clarification edit: I would prefer a book not to ''dumb down'' the material, something that would not hold my hand through every step, something that would force me to fill in the gaps myself instead of explaining every single step. That is why I am currently leaning towards Rudin, but before I decide I would still like some information on the book by Apostol. We now that Fermat's last theorem is true so there are not positive integer solutions to $$x^n+y^n=z^n$$ for $n\in\mathbb{N}$ and $n&gt;2$.  But what about if $n\in\mathbb{R}$ or $n\in\mathbb{R}^+$?