comments

XML multiline comments in C# - what am I doing wrong?

According to this article, it's possible to get multiline XML comments -- instead of using ///, use /** */. This is my interpretation of what multiline comments are, and what I want to have happen: /** * <summary> * this comment is on line 1 in the tooltip * this comment is on line 2 in the tooltip * </summary> */ However, when ...

VS2010 method comment block pretty format.

I have just installed the lastest RC of VS2010, which for me represents a shift from VS2008. A new comment formatting feature that I was looking forward to appears to be missing. About 6 months ago I read a Scott Gu blog post that mentioned a new VS2010 feature that would format /// style method comment blocks into more readable formatt...

Remove all comments from VB.NET source code file

Is there a macro in the Visual Studio editor to remove all comments from a VB.NET source file? ...

How to comment out IE conditional comments?

Hi! I'm just wondering if it's possible to comment out IE conditional comments themselves (for testing purposes)? The following does not work: <!-- <!--[if IE 7]> some code <![endif]--> --> Thanks in advance! flexx ...

How do you add < or > to a summary tag in Visual studio?

How do you add < (less than) or > (greater than) to a summary comment in visual studio? I am in Visual Studio 2008. I have a generic method: public bool IsMemberProtected<T>(Expression<Func<T, object>> expression) Would love to have a summary tag of something like this /// <summary> /// Determines whether a member is prote...

Regex for multi-line HTML comments (preg_match_all)

I have an html document with multiple commented-out PHP arrays, e.g.: <!-- Array ( [key] => 0 ) --> Using PHP, I need to somehow parse the HTML for only these comments (there are other comments that will need to be ignored) and extract the contents. I've been trying to use preg_match_all but my regex skills aren't up to much. Could an...

Wordpress/MovableType: How does Lifehacker implement their comment system?

I really like how Lifehacker.com (and Gawker.com) implements their comment system. I believe, but am not certain, they use Movable Type as the platform for their blog. What I like about their comment system is that it's a simple open text field and once you click "Share" it then asks you to register. Question: Anyone know how to accom...

Hooking into comment_text() to add surrounding tag

Trying to hook into the function comment_text() supplied by Wordpress API to wrap the output of every comment into a <div>...</div> container I am running into the following problem: Without my added filter the output of comment_text() looks like this: <p>Hello User!</p> <p>Thank you for your comment.</p> <p>Stefan</p> Thats fine but...

Remove source file comments using IntelliJ?

Is there a plugin or tool in IntelliJ that will strip all comments out of your source .java files? I've read about an ANT task that can do this.. was looking to do the same from within the IDE. Alternatively a TextPad plugin would work as well.. ...

Do you have any tips for comments to keep them in step with the code?

Possible Duplicate: How do you like your comments? G'day, I've read both of Steve McConnell's excellent Code Complete books "Code Complete" and "Code Complete 2" and was wondering if people have any other suggestions for commenting code. My commenting mantra could be summed up by the basic idea of expressing "what the code b...

IE Conditional Comments: lt IE 7 = lte IE 6?

Hi! Are there any differences using <!--[if lt IE 7]>...<![endif]--> or <!--[if lte IE 6]>...<![endif]--> ? ...

Commented Out Functionality? To Remove or Not To Remove?

As I work on a code base there always comes a time when an old rule or some bit of functionality needs to be removed. I often simply comment out the code that needs to be removed. However I wonder whether I should simply delete the lines of code that need to be removed or leave them in? Any recommendations? Thanks! ...

How should one comment an if-else structure?

Lets say you have: if(condition) { i = 1; } else { i = 2; } and you need to put comments explaining if and else blocks. What's the most readable way of doing it so someone can easily pick them up at first glance? I usually do it like this: //check for condition if(condition) { i = 1; } else { //condition isn't met ...

Java NetBeans Comments Class Diagram Helper

i am starting to learn Java using Netbeans 6.8 IDE. i am wondering if there is a utility in NetBeans similar to VS2008 that facilitates commenting code and later display these comments in class diagrams? thanks. EDIT: i found the Javadoc feature. it is some help but not that great. ...

Is it considered rude to use commits as comments in VCS's.

For example in git you could do git commit --allow-empty -m"I like what this guy did" I was considering using commits as a commenting system, and I just wanted to see how that would go over. ...

Using XPath to access comments a flat hierachy

I have a given XML document (structure can not be changed) and want to get the comments that are written above the nodes. The document looks like this: <!--Some comment here--> <attribute name="Title">Book A</attribute> <attribute name="Author"> <value>Joe Doe</value> <value>John Miller</value> </attribute>...

How to manually patch Blogger template to use Disqus

I'm trying to add disqus to my blog and I tried following this guide to do so: http://disqus.com/docs/patch-blogger/ However their instructions are completely off with what I have on my custom template. Here is the template: <b:skin><![CDATA[/*----------------------------------------------- Blogger Template St...

Showing HTML comment strings (<!-- -->) in HTML files

Hello all. I'm building a source code search engine, and I'm returning the results on a HTML page (aspx to be exact, but the view logic is in HTML). When someone searches a string, I also return the whole line of code where this string can be found in a file. However, some lines of code come from HTML/aspx files and these lines contain...

Bash script to pull out x number of starting comment lines into another file

I am looking for a one liner to pull out the first comment block in any file. The comment blocks look like this: /* * This is a * comment block */ I've been trying to play with sed, but just can't get it to work right. Help? ...

When should I add comments to my code?

When I'm writing it? After I got a part done (Single class/function/if-elses)? After I got the whole thing working? ...