I have the following code block.      /// &lt;summary&gt;     /// AMethod produces this XML:     /// &lt;A&gt;&lt;B&gt;&lt;/B&gt;&lt;/A&gt;     /// &lt;/summary&gt;     public void AMethod()     {     }   When I do this IntelliSense does not print the XML, if I hover over AMethod. How do I get it to print the XML?
121940
I know this maybe a basic question but I just can't seem to find the answer anywhere.  I have a class like this  Table&lt;T&gt; {}   then I have some code that uses the above class that I would like to comment I would like to be able to do something like:  /// &lt;summary&gt; /// blah blah blah Table&lt;String&gt; /// &lt;/summary&gt;   But I can't use the angle bracket in the comment as it thinks it's a tag and when the help shows up it just has an error about no end tag for .  How do I show generic classes in comments in Visual Studio.
21860
I'm trying to debug a Python script by placing a print("foo=" + foo) statement in my code.  But where does the output appear?     It doesn't appear on the Python Console, and it doesn't appear on the area that appears when you drag the lower edge of the infobar downwards (what is the name for this area? My script errors show up in red here.)
118610
I remember seeing a while ago that there is some method in maybe the Reflection namespace that would recursively run ToString() on all of an object's properties and format it nicely for display.    Yes, I know everything I could want will be accessible through the debugger, but I'm wondering if anyone knows that command?
9161
I'm having difficulty searching for this. How would I define an element in an XML schema file for XML that looks like this:  &lt;option value="test"&gt;sometext&lt;/option&gt;   I can't figure out how to define an element that is of type xs:string and also has an attribute.   Here's what I've got so far:  &lt;xs:element name="option"&gt;     &lt;xs:complexType&gt;         &lt;xs:attribute name="value" type="xs:string" /&gt;     &lt;/xs:complexType&gt; &lt;/xs:element&gt;
69113
I am working on a project right now that involves receiving a message from another application, formatting the contents of that message, and sending it to a printer.  The technology of choice is C# windows service.  The output could be called a report, I suppose, but a reporting engine is not necessary.  A simple templating engine, like StringTemplate, or even XSLT outputting HTML would be fine.  The problem I'm having is finding a free way to print this kind of output from a service.  Since it seems that it will work, I'm working on a prototype using Microsoft's RDLC, populating a local report and then rendering it as an image to a memory stream, which I will then print.  Issues with that are:   Multi-page printing will be a big headache. Still have to use PrintDocument to print the memory stream, which is unsupported in a Windows Service (though it may work - haven't gotten that far with the prototype yet) If the data coming across changes, I have to change the dataset and the class that the data is being deserialized into.  bad bad bad.   Has anyone had to do anything remotely like this?  Any advice?  I already posted a question about printing HTML without user input, and after wasting about 3 days on that, I have come to the conclusion that it cannot be done, at least not with any freely available tool.  All help is appreciated.  EDIT: We are on version 2.0 of the .NET framework.
114132
I have an object that can build itself from an XML string, and write itself out to an XML string. I'd like to write a unit test to test round tripping through XML, but I'm having trouble comparing the two XML versions. Whitespace and attribute order seem to be the issues. Any suggestions for how to do this? This is in Python, and I'm using ElementTree (not that that really matters here since I'm just dealing with XML in strings at this level).
97833
I decided to use  as a logger for a new webservice project. Everything is working fine, but I get a lot of messages like the one below, for every log4net tag I am using in my web.config:     Could not find schema information for   the element 'log4net'...   Below are the relevant parts of my web.config:    &lt;configSections&gt;     &lt;section name="log4net"          type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /&gt;   &lt;/configSections&gt;   &lt;log4net&gt;     &lt;appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"&gt;       &lt;file value="C:\log.txt" /&gt;       &lt;appendToFile value="true" /&gt;       &lt;rollingStyle value="Size" /&gt;       &lt;maxSizeRollBackups value="10" /&gt;       &lt;maximumFileSize value="100KB" /&gt;       &lt;staticLogFileName value="true" /&gt;       &lt;layout type="log4net.Layout.PatternLayout"&gt;         &lt;conversionPattern value="%date [%thread] %-5level: %message%newline" /&gt;       &lt;/layout&gt;     &lt;/appender&gt;     &lt;logger name="TIMServerLog"&gt;       &lt;level value="DEBUG" /&gt;       &lt;appender-ref ref="RollingFileAppender" /&gt;     &lt;/logger&gt;   &lt;/log4net&gt;   Solved:   Copy every log4net specific tag to a separate xml-file. Make sure to use .xml as file extension. Add the following line to AssemblyInfo.cs:   [assembly: log4net.Config.XmlConfigurator(ConfigFile = "xmlFile.xml", Watch = true)]    added:     Just a word of warning to anyone   follow the advice of the answers in   this thread. There is a possible   security risk by having the log4net   configuration in an xml off the root   of the web service, as it will be   accessible to anyone by default. Just   be advised if your configuration   contains sensitive data, you may want   to put it else where.     @wcm: I tried using a separate file. I added the following line to AssemblyInfo.cs  [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]   and put everything dealing with log4net in that file, but I still get the same messages.
77370
I'm looking for a plugin or way to simply go from any namespace, type, method, property, etc in my .Net code to the MSDN page that covers it via a context menu item or hyperlink-like mechanism.  Does anyone know of anything that will do that?    The "Go to Definition" option when you right click almost covers this, but it doesn't quite work well enough - no support for namespaces and you often end up at an ugly metadata page.  I'm still on vs2005, so if vs2008 is better at this I'd like to know about it.
42238
This code won't compile:  \documentclass{article} \usepackage{listings} \lstset{     language=C,     basicstyle=\small }  \begin{document} lorem ipsum\footnote{% \begin{lstlisting} // some C code or whatever... printf("Blah blah\n"); \end{lstlisting}} \end{document}   It says Illegal parameter number in definition of \lst@insertargs. I know listings is really picky about where it goes, but there must be a way to cram a listing into a footnote, right?  (This is a MWE and my tex files are a bit more complex; my actual error is Paragraph ended before \lst@next was complete. but they are hopefully related; I couldn't get this error with the MWE.)
86715
I'm looking at some GXT code for GWT and I ran across this use of Generics that I can't find another example of in the Java tutorials. The class name is  if you want to look at all of the code.  Here are the important parts:  private RpcMap map;  public &lt;X&gt; X get(String property) {   if (allowNestedValues &amp;&amp; NestedModelUtil.isNestedProperty(property)) {     return (X)NestedModelUtil.getNestedValue(this, property);   }   return map == null ? null : (X) map.get(property); }   X is defined nowhere else in the class or anywhere in the hierarchy, and when I hit "go to declaration" in eclipse it just goes to the &lt;X&gt; in the public method signature.  I've tried to call this method with the following two examples to see what happens:  public Date getExpiredate() {     return  get("expiredate"); }  public String getSubject() {     return  get("subject"); }   They compile and show no errors or warnings.  I would think at the very least I would have to do a cast to get this to work.  Does this mean that Generics allow a magic return value that can be anything and will just blow up at runtime?  This seems counter to what generics are supposed to do.  Can anyone explain this to me and possibly give me a link to some documentation that explains this a little better?  I've went through Sun's 23 page pdf on generics and every example of a return value is defined either at the class level or is in one of the parameters passed in.
21604
I'm trying to write an automated test of an application that basically translates a custom message format into an XML message and sends it out the other end.  I've got a good set of input/output message pairs so all I need to do is send the input messages in and listen for the XML message to come out the other end.  When it comes time to compare the actual output to the expected output I'm running into some problems.  My first thought was just to do string comparisons on the expected and actual messages.  This doens't work very well because the example data we have isn't always formatted consistently and there are often times different aliases used for the XML namespace (and sometimes namespaces aren't used at all.)  I know I can parse both strings and then walk through each element and compare them myself and this wouldn't be too difficult to do, but I get the feeling there's a better way or a library I could leverage.   So, boiled down, the question is:  Given two Java Strings which both contain valid XML how would you go about determining if they are semantically equivalent?  Bonus points if you have a way to determine what the differences are.
12617
I'm trying to understand how namespaces work in XML. When I have an element like foo:bar, the attributes will often not have namespaces on them. But sometimes they will. Are the attribute in the namespace of the element, even when the default namespace has been declared? Looking over the xsd for xhtml it seems the attributes are part of the schema and should be in the namespace for xhtml, but they are never presented that way...
108195
How do you bind to an objects method in this scenario in WPF? public class RootObject {     public string Name { get; }      public ObservableCollection&lt;ChildObject&gt; GetChildren() {...} }  public class ChildObject {     public string Name { get; } }  XAML: &lt;TreeView ItemsSource=&quot;some list of RootObjects&quot;&gt;     &lt;TreeView.Resources&gt;         &lt;HierarchicalDataTemplate DataType=&quot;{x:Type data:RootObject}&quot;                                    ItemsSource=&quot;???&quot;&gt;             &lt;TextBlock Text=&quot;{Binding Path=Name}&quot; /&gt;         &lt;/HierarchicalDataTemplate&gt;         &lt;HierarchicalDataTemplate DataType=&quot;{x:Type data:ChildObject}&quot;&gt;             &lt;TextBlock Text=&quot;{Binding Path=Name}&quot; /&gt;         &lt;/HierarchicalDataTemplate&gt;     &lt;/TreeView.Resources&gt; &lt;/TreeView&gt;  Here I want to bind to the GetChildren method on each RootObject of the tree. EDIT Binding to an ObjectDataProvider doesn't seem to work because I'm binding to a list of items, and the ObjectDataProvider needs either a static method, or it creates it's own instance and uses that. For example, using Matt's answer I get:  System.Windows.Data Error: 33 : ObjectDataProvider cannot create object; Type='RootObject'; Error='Wrong parameters for constructor.' System.Windows.Data Error: 34 : ObjectDataProvider: Failure trying to invoke method on type; Method='GetChildren'; Type='RootObject'; Error='The specified member cannot be invoked on target.' TargetException:'System.Reflection.TargetException: Non-static method requires a target.
37434
This problem is really proving to be a tricky one (and quite annoying).  In SQL Server Management Studio 2008, up until a few days ago my IntelliSense was working great.  Then all of a sudden it stopped.  The icon as it as enabled on the toolbar menu, and under Tools -> Options -> Text Editor -> T-SQL -> IntelliSense it says it is enabled there.  I have tried refeshing the IntelliSense cache with Ctrl-Shft-R but that doesn't work either.  Any ideas what happened to my IntelliSense and what I need to do to get it back?
109435
What is the syntax and which namespace/class needs to be imported? Give me sample code if possible. It would be of great help.
103139
How does one post XML in Stack Overflow?  I've tried using &lt;pre&gt; and backticks to no avail. I suppose that I could go through and try indent every line by four spaces but that would get really tedious really fast.  Is there any way to easily post XML in a question?  Edit:  URL of question:   I tried putting the XML inside &lt;code&gt; tags and that sliced and diced the XML in a very odd fashion.
36880
Oftentimes, I want to include code samples in a list, for example:   Item One Item Two, for example: private bool ItemTwo() {     return this.IFeelLucky; } Item Three   The problem is that there isn't a good and intuitive way to do this using . It's doable, but you have to do some formatting black-magic to get it that way, which is just not "nice" to deal with.  Source that produces this:  1. Item One 2. Item Two, for example: &lt;br/>&lt;br/>&lt;pre>&lt;code>private bool ItemTwo()     {         return this.IFeelLucky;     }&lt;/code>&lt;/pre> 3. Item Three    I would love to just be able to do it this way:  1. Item One 2. Item Two, for example:      private bool Test()     {         return this.IFeelLucky;     }  3. Item Three  Which results in, well, this:   Item One Item Two, for example:  private bool Test() {     return this.IFeelLucky; } Item Three