|
How can I automatically replace all C style comments (/* comment */) by C++ style comments (// comment)? This has to be done automatically in several files. Any solution is ok, as long as it works.
Started by compie on
, 10 posts
by 10 people.
Answer Snippets (Read the full thread at stackoverflow):
Emacs has a comment details from the comments from the OP
The fundamental reason of preferring C++-style comment is that you can comment out....
Do the trick quicker in practice, unless there's a whole load of comments.
|
|
I need to convert single line comments (//...) to block comments (/*...*/) . I have nearly accomplished this in the following code; however, I need the function to skip any single line comment is already in a block comment. Currently it matches any single...
Started by roydukkey on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Convert Single Line Comment to Block Comments function sinlgeLineComments( &$output ) { $output = preg]*?\*/) # group 2: matches multi-line comment blocks | (//[^\r\n]*+) # group 3: matches single line comments @x, " //....
|
|
I have a Drupal site that currently displays comments in threaded, reverse chronological order. I am trying to change it to work like Reddit/Hacker News, where the threads and comments within each thread are instead ordered by their current score, based...
Started by bflora on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Would be to get the comments as threaded, somewhere I'm sure they will be converter to an array I change the end of the query so it orders the comments by score while still keeping them within, c.status, COALESCE (r.energy,0) as energy ....
|
Ask your Facebook Friends
|
Hello,
I want to parse a file and I want to use php and regex to strip:
blank or empty lines single line comments multi line comments basically I want to remove any line containing
/* text */
or multi line comments
/*** some text /
If possible, another...
Started by Ahmad Fouad on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
For example, it would turn this:
print "/* a comment.
Something that matches these conditions.
|
|
In our company we write excessive Xml comments. A typical method is has to be documented like this:
/// <summary> /// Determines whether this <see cref="IScheduler"/> contains a specific <see cref="ISchedule"/>. /// </summary> ...
Started by TomTom on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Some languages....
There is a particular reason for these sorts of comments to turn comments on and off.
It bloats the code (though comments can be collapsed), but if you actually ship documentation to others, it's pretty darned helpful.
|
|
I've noticed, using visual studio 2003, that I can "comment out" my comments to make them no longer be comments. This one needs an example:
If I have:
/* int commented_out = 0; */
I can comment out the /* and */ with // and code within the /* and */ is...
Started by Jeffrey Martinez on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I often use what....
The C++ standard says that a /* is the start of a comment block only if it itself is not commented out.
Yep, this is perfectly normal behavior.
= 0; #endif
Then I don't have to worry about comment markers at all.
|
|
{% load comments %}
where defined 'comments' ,a viewer? or a template??
thanks
Started by zjm1126 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Other comments-app specific tags like:
{% get_comment_count for entry as comment_count %}
You can obtain more info here: http://docs.djangoproject.com/en/dev/ref/contrib/comments/#comment-template-tags) #@register.tag....
|
|
What are your best practices for comments? When should they be used, and what they should contain? Or are comments even needed?
Started by Brian G on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
TODO's and FIXME's sometimes go in comments, but ideally they should go in your source codeComments....
I think comments for a comment.
I think that's silly.
Was to comment everything, so much so that comments outweigh code.
|
|
I have an ASP.NET app that permits Word 2007 document uploads. Once they are uploaded I'd like to parse out the document text and also any comments made by reviewers. I'd like to be able to get the comments and the commenter initials/name.
Are there free...
Started by Caveatrob on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you require that your users upload Word 2007 DOCX files (as opposed to Word 2003 .doc files), you can use the System.IO.Packaging API in WindowsBase.dll to read the XML within the Word 2007 file (See here )
DocX (check codeplex) might do what you ... .
|
|
Hey,
I've been thinking about this one for quite some time now, I need a way to add replies to comments in the database but I'm not sure how to proceed.
This is my currently comment table (doesn't say much but its a start):
CREATE TABLE IF NOT EXISTS ...
Started by Dennis on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Make ON c.user_id = u.id LEFT JOIN comments r ON c.id = r.parent_comment_id WHERE c.topic_id = 9
Note however FROM (comment c) ....
Articles/hierarchical-data.html
Add a parent_comment_id column to your comments table.
|