comments

Make comments of VSCode start at column position 0

若如初见. 提交于 2020-05-22 09:49:28
问题 In VSCode, when I press the key combination ctrl + / , VSCode will comment the selected lines, ensuring indentation is intact. So if a line of code starts at position 16, then the double slashes of comment (i.e., // ) will be at position 16, shifting the code to the right a little. I would like to set it, so that when I press ctrl + / , the comment double slashes // will always start at column position 0. Is this possible? Thanks. 回答1: It is a little tricky, but test this out. You need a

Add comment to beginning of document

自作多情 提交于 2020-04-30 10:27:44
问题 Using ElementTree, how do I place a comment just below the XML declaration and above the root element? I have tried root.append(comment) , but this places the comment as the last child of root . Can I append the comment to whatever is root 's parent? Thanks. 回答1: Here is how a comment can be added in the wanted position (after XML declaration, before root element) with lxml, using the addprevious() method. from lxml import etree root = etree.fromstring('<root><x>y</x></root>') comment = etree

How to add comment in apache httpd.conf not as a complete line?

给你一囗甜甜゛ 提交于 2020-04-08 19:01:59
问题 In an apache conf file, if a line is start with # , that line is counted as comment. For example, #This is a comment line #And then the following is some real settings: AllowOverride None However, this is not allowed. #And then the following is some real settings: AllowOverride None #A comment that starts in the middle of line Is it possible to starts a comment in the middle of the line? And if yes, how? 回答1: The documentation states that it is not possible: ... Lines that begin with the hash

How to add comment in apache httpd.conf not as a complete line?

喜欢而已 提交于 2020-04-08 18:58:31
问题 In an apache conf file, if a line is start with # , that line is counted as comment. For example, #This is a comment line #And then the following is some real settings: AllowOverride None However, this is not allowed. #And then the following is some real settings: AllowOverride None #A comment that starts in the middle of line Is it possible to starts a comment in the middle of the line? And if yes, how? 回答1: The documentation states that it is not possible: ... Lines that begin with the hash

How to add comment in apache httpd.conf not as a complete line?

跟風遠走 提交于 2020-04-08 18:57:44
问题 In an apache conf file, if a line is start with # , that line is counted as comment. For example, #This is a comment line #And then the following is some real settings: AllowOverride None However, this is not allowed. #And then the following is some real settings: AllowOverride None #A comment that starts in the middle of line Is it possible to starts a comment in the middle of the line? And if yes, how? 回答1: The documentation states that it is not possible: ... Lines that begin with the hash

How to ignore unassigned new in ReSharper?

生来就可爱ヽ(ⅴ<●) 提交于 2020-03-01 05:32:43
问题 (Using ReSharper Ultimate 2017.1.3.) In my code I have something like this: new someClass(null); It is not assigned to any variable and it should stay like this. (It may look weird but it is used in a specific test case.) ReSharper warning says: Possible unassigned object create by 'new' expression The menu doesn't suggest to auto-write the comment so I'm looking for the syntax. What is the ReSharper comment to ignore this? After some search I already tried: // ReSharper disable once //

How to ignore unassigned new in ReSharper?

孤街浪徒 提交于 2020-03-01 05:32:09
问题 (Using ReSharper Ultimate 2017.1.3.) In my code I have something like this: new someClass(null); It is not assigned to any variable and it should stay like this. (It may look weird but it is used in a specific test case.) ReSharper warning says: Possible unassigned object create by 'new' expression The menu doesn't suggest to auto-write the comment so I'm looking for the syntax. What is the ReSharper comment to ignore this? After some search I already tried: // ReSharper disable once //

How to ignore unassigned new in ReSharper?

夙愿已清 提交于 2020-03-01 05:32:07
问题 (Using ReSharper Ultimate 2017.1.3.) In my code I have something like this: new someClass(null); It is not assigned to any variable and it should stay like this. (It may look weird but it is used in a specific test case.) ReSharper warning says: Possible unassigned object create by 'new' expression The menu doesn't suggest to auto-write the comment so I'm looking for the syntax. What is the ReSharper comment to ignore this? After some search I already tried: // ReSharper disable once //

How to comment code in Rails views?

删除回忆录丶 提交于 2020-02-23 09:21:05
问题 As I'm playing with Rails and developing views I often want to comment out code. Simple enough with classes & models but views are a bit more tricky. What's best way to comment code in a view so it's not interpreted by, well, anything... HTML gives us <!-- commented Rails code here --> though code enclosed here seems to get interpreted anyway?!? Or is there a more Railsy way? 回答1: <% code code # comment %> USED to work but I think that was accidental. You were always supposed to put comments

how to set default name & company name on comments in Xcode?

﹥>﹥吖頭↗ 提交于 2020-02-01 05:41:05
问题 When we add a new file, In .h & .m file, there is always a comments/documentation section at top. example. // // SimpleGameAppDelegate.m // SimpleGame // // Created by hbmac2 on 01/10/09. // Copyright __MyCompanyName__ 2009. All rights reserved. // Here, there is by default hbmac2 - is user name & MyComapnyName is also default. Can't we set it like, Created by Sagar - HiddenBrains.com - by default? Can we set any other comments to be there by default? 回答1: See this question for copyright: