|
Quick Quiz?
What language has comments with side effects? In essence, comments which are not comments...
Started by theschmitzer on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
I can think of several places where comments applicable to D4GL; I4GL would see that....
But it has the side-effect a comment can fail, but if it does, you are covered.
Shell programming
The REM (Remark) allows you to put in a comment.
|
|
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.
|
|
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):
// int * var = NULL;
If you write an application/script to process the C source files, here... .
Int * */ var = NULL;
What do you want to replace // this is not the beginning of a comment.
* /* foo /* this is not the beginning of a comment.
|
Ask your Facebook Friends
|
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.
|
|
Hi!
I want to comment out lines in some code I have. I have different kinds of codes, and they use different comment leaders. E.g. in latex: '%', in Fortran 90: '!' and in python: '#'. I want to do a substitute command that looks something like this:
...
Started by Karl Yngve Lervåg on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Check out Enhanced Commentify : I think this does what you want: it determines the comment leader.
|
|
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):
OUTER JOIN {radioactivity} r ON (c.cid = r.id AND r.class = 'comment') WHERE c.nid = %d ORDER AND (radioactivity_comment_1_f.class = 'comment' AND radioactivity_comment_1_f.decay_profile = 1) ORDER.
|
|
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 comment thread....
Try adding comment_id as a field to your/articles/hierarchical-data.html
Add a parent_comment_id column to your comments table.
A comment reply is a comment with a parent comment_id.
|
|
I'm going through a Django book and I seem to be stuck. The code base used in the book is .96 and I'm using 1.0 for my Django install. The portion I'm stuck at is related to Django comments (django.contrib.comments). When I submit my comments I get "Comment...
Started by kfordham281 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
It includes a few other fields but since I didn't define my own form .
Included with Django itself and that got me past the "Comment post not allowed (400)" message and posted my comment successfully.
|
|
Hello,
I want to simply render a built-in comment form in a template, using Django's builtin commenting module, but this returns a TemplateSyntaxError Exception.
I need help debugging this error, please, because after googling and using the Django API...
Started by Kenny M. on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Its not ....
Without being able django.contrib.comments.views.comments.post_comment
but no args () or kwargs{} were passed.
For:
django.contrib.comments.views.comments.post_comment
So basically something isn't configured right in your urls.
|
|
Anyone know if it's possible in vi to replace only uncommented/non-blank lines with comments?
If I want to replace a commented line with something I know I can use :%s/^#/##foo##/g -- but I am looking for the opposite of this.
Example file:
# Some user...
Started by sitnam on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at serverfault):
Sed -i -e 's/^\([^#]\)/#\1/g' /etc/cronfile
Maybe something like:
%s/^\([^#]\)\|....
S/^\([^#]\)/##DISABLE##\1/
:map q /^[^#]<Enter>0i##DISABLE##<Esc>q 1Gq
This works in vim, but not in stock vi, which won't do tail recursion on mappings .
|