comments

Is there a way to comment out markup in an .ASPX page?

寵の児 提交于 2019-12-18 09:56:38
问题 Is there a way to comment out markup in an .ASPX page so that it isn't delivered to the client? I have tried the standard comments <!-- --> but this just gets delivered as a comment and doesn't prevent the control from rendering. 回答1: <%-- Commented out HTML/CODE/Markup. Anything with this block will not be parsed/handled by ASP.NET. <asp:Calendar runat="server"></asp:Calendar> <%# Eval(“SomeProperty”) %> --%> Source 回答2: Bonus answer: The keyboard shortcut in Visual Studio for commenting out

RegEx to remove /** */ and // ** **// php comments

我与影子孤独终老i 提交于 2019-12-18 08:49:20
问题 ReGex newbie here. I need to remove two different style comments from PHP files using RegEx. I've found this expression to run in the BBEdit text editor: \/\*[\s\S]*?\*\/ and it removes comments in the first style, like below: /** This comment gets removed with my regex */ But it doesn't remove these style comments: // ** This comment has the double leadng-trailng slashes ** // I don't know why there is a mix of the two different types of comments, and there are only a few of the // comments,

Is it possible to add inline comments in Cobol

不羁岁月 提交于 2019-12-18 06:55:06
问题 Most modern programming languages give a way to add inline comments, generally those that use a newline character to indicate the end of a comment, and an arbitrary delimiter or sequence of tokens to indicate the beginning of a comment, while letting the beginning of the line being an interpreted instruction. In COBOL, while commenting a whole line is well documented (it can be done by putting an asterisk symbol ( * ) in column 7), finding documentation on whether or not you can comment the

Adding images into source code

时间秒杀一切 提交于 2019-12-18 05:50:38
问题 Is there a way (or an editor) that allows me to link an image/files/http links from within a source file (*.java for instance), sort of like a rich text document? This way, while reading the code I can quickly look at the appended image (augmenting the comments), instead of opening the browser etc. 回答1: Javadocs are HTML, so you can just embed images there: /** * This class does some funky stuff (see diagram). * <img src="relative/path/to/your/image.png" /> * */ public class FunkyClass{ }

Avoid crawling part of a page with “googleoff” and “googleon”

我们两清 提交于 2019-12-18 05:43:42
问题 I am trying to tell Google and other search engines not to crawl some parts of my web page. What I do is: <!--googleoff: all--> <select name="ddlCountry" id="ddlCountry"> <option value="All">All</option> <option value="bahrain">Bahrain</option> <option value="china">China</option> </select> <!--googleon: all--> After I uploaded the page, I noticed that search engines are stilling rendering elements within the googleoff markup. Am I doing something wrong? 回答1: "googleon" and "googleoff" are

Why do I need to comment the <script> tag in HTML?

你离开我真会死。 提交于 2019-12-18 05:38:26
问题 Most examples I've seen have scripts in a html page being enclosed by <!-- ... --> I've tried writing it without the comment tags and there doesn't seem to be any difference. Why is the comment tag used and what function does it serve? 回答1: It's not really necessary any more. This has only ever served as a backwards-compatibility hack of sorts - when scripts first started being inserted into static HTML pages, most browsers couldn't support them. Without the comments, they would ignore the

Why do I need to comment the <script> tag in HTML?

别说谁变了你拦得住时间么 提交于 2019-12-18 05:38:07
问题 Most examples I've seen have scripts in a html page being enclosed by <!-- ... --> I've tried writing it without the comment tags and there doesn't seem to be any difference. Why is the comment tag used and what function does it serve? 回答1: It's not really necessary any more. This has only ever served as a backwards-compatibility hack of sorts - when scripts first started being inserted into static HTML pages, most browsers couldn't support them. Without the comments, they would ignore the

How to make comment reply query in MYSQL?

对着背影说爱祢 提交于 2019-12-18 04:13:27
问题 I am having comment reply (only till one level) functionality. All comments can have as many as replies but no replies can have their further replies. So my database table structure is like below Id ParentId Comment 1 0 this is come sample comment text 2 0 this is come sample comment text 3 0 this is come sample comment text 4 1 this is come sample comment text 5 0 this is come sample comment text 6 3 this is come sample comment text 7 1 this is come sample comment text In the above

visual studio C++ toggle comment ? comment while not whole line is selected?

不打扰是莪最后的温柔 提交于 2019-12-18 03:54:19
问题 2 questions actually : 1) shortcut to toggle comment on selected lines ? Available on all iDEs I used starting with notepad++ 2)the ctrl-k, ctrl-c exhibits this behavior (quoted from someplace nicely worded): C#: Each line where some text is selected is commented at the line-start with double-slash. If nothing is selected, the line where the cursor is is commented. C++: If nothing is selected or complete lines are selected, it behaves as above. However, if parts of a line are selected, and no

Why do /**/ comments work in stylesheets but // comments don't?

南笙酒味 提交于 2019-12-18 03:51:26
问题 Is there a good reason for this? Lame question, but I just wondered if there was a reason why. 回答1: The syntax for comments in CSS is: /* comment here */ The // is not a valid syntax. I guess this allows CSS to work correctly when stripped from whitespace and new line characters during minification. 回答2: Because the specification allows for /**/ but not // :) Seriously, though, CSS treats newlines like all other whitespace, and would not be able to determine the end of the comment without a