comments

Disable auto-indent of comments with Visual Studio 2015

时间秒杀一切 提交于 2019-12-06 18:48:36
问题 I have looked and searched for ways to disable indentation of comments when I save C# files in Visual Studio 2015 with Resharper 9.0.0.0 installed. I'd like to pseudocode before I start writing actual code. However I have been tweaking with both Visual studio's and Resharper's settings to no avail. So for example I want the comments to look like: private string ToggleString(string input) { // If input.length is between 1-100 // All the uppercase letters converted to lowercase. // All the

Why are multi-line comments in flex/bison so evasive?

╄→гoц情女王★ 提交于 2019-12-06 18:08:13
问题 I'm trying to parse C-style multi-line comments in my flex (.l) file: %s ML_COMMENT %% ... <INITIAL>"/*" BEGIN(ML_COMMENT); <ML_COMMENT>"*/" BEGIN(INITIAL); <ML_COMMENT>[.\n]+ { } I'm not returning any token and my grammar (.y) doesn't address comments in any way. When I run my executable, I get a parse error: $ ./a.out /* abc def Parse error: parse error $ echo "/* foo */" | ./a.out Parse error: parse error (My yyerror function does a printf("Parse error: %s\n"), which is where the first

Can XML comments go anywhere?

ぃ、小莉子 提交于 2019-12-06 17:55:23
问题 I wrote a simple tool to generate a DBUnit XML dataset using queries that the user enters. I want to include each query entered in the XML as a comment, but the DBUnit API to generate the XML file doesn't support inserting the comment where I would like it (above the data it generates), so I am resorting to putting the comment with ALL queries either at the top or bottom. So my question: is it valid XML to place it at either location? For example, above the XML Declaration: <!-- Queries used:

HTML Tidy, Don't move those comments!

大兔子大兔子 提交于 2019-12-06 15:20:20
I was working with html-tidy and a couple of my comments were moved from the head to the root of the document. Is there anyway to avoid this behavior? (I'm trying to turn some really really bad markup into xhtml complaint code) Oh and additionally it uses an in-house developed semi-server-side scripting language that uses comments to place data within the html, very, very non-standard... I'd love to completely change it over...but you know how employers are... Here is the problem: Before Tidy: <head> ... <!-- BODY_ON_LOAD_SECTION --> <script type="text/javascript" language="Javascript">

Parsing XML Comments in Oracle [duplicate]

这一生的挚爱 提交于 2019-12-06 15:06:07
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: XML parsing in oracle pl/sql In the below XML I need to get the Comment " ADOR Acknowledgement 2 " Can you please help me to get this <?xml version="1.0" encoding="utf-8"?> <!--ADOR Acknowledgement 2--> <AckTransmission xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.irs.gov/efile"> <TransmissionHeader recordCount="1"> <Jurisdiction>ALABAMA</Jurisdiction> <TransmissionId>1946157056<

trying to access Github issue comments using PyGithub library

南笙酒味 提交于 2019-12-06 14:54:25
I am trying to access issue comments using PyGithub library. this is the function which I implemented, def get_issue_comments_dict(self, repository): """ get issue comments outputs reponame: issue title, issue url, comments Return type: dict """ repo = self.user_obj.get_repo(repository) issues = repo.get_issues() issues_dict = {} i = 1 for issue in issues: issue_dict = {} issue_dict['url'] = issue.url issue_dict['title'] = issue.title issue_dict['comments'] = [comment for comment in issue.get_issue_comments()] issues_dict[i] = issue_dict i += 1 return issues_dict and this is the error which I

sed to replace // with /* */ comments EXCEPT when // comments appear within /* */

北城以北 提交于 2019-12-06 14:41:42
The problem I am facing is with an ANSI compiler that requires C style comments. So I am trying to convert my existing comments to comply with the C standard ISO C89. I am looking for a SED expression to replace // comments with /* comments EXCEPT when // comments appear within /* */ comments (which would break the comment). I have tried this (a range expression) to no avail: sed -e '/\/*/,/*\//! s_//\(.*\)_/*\1 */_' > filename Will something work to ignore the 1 line comments inside a comment like this but change everything else? /********************************** * Some comment * an example

What this Delphi's define {$WARN GARBAGE ON} means?

前提是你 提交于 2019-12-06 13:49:10
I am keen on finding new conditional defines and keywords in the Delphi language which are undocumented. Stuff like {$WARN GARBAGE ON} http://qc.embarcadero.com/wc/qcmain.aspx?d=77686 I report such stuff in Quality Central but the issue got closed and "Promoted to Internal Database". What does this mean? Should I expect an answer to this already year and half old question? These two warnings are now documented . GARBAGE : Turns on or off warnings produced when the presence of non-whitespace text is detected past the end of the final 'end.' in the program, unit, library or package UNIT

Embedding comments in MySQL statements

佐手、 提交于 2019-12-06 12:29:18
问题 Does anyone know of a way to embed comments in MySQL statements? When I search for mysql and comments I get only ways to put comments in tables, etc The idea, if I implement this the way my boss wants it, is to prepend the user id to the statement apparently so that when MySQL is analyzed later (via the binary log) we know who did what. Example: SELECT id FROM customer WHERE handle='JBH' Would now show up as: -- user:jwilkie SELECT id FROM customer WHERE handle='JBH' (or similar) EDIT FOR

C# Roslyn change type of comment

流过昼夜 提交于 2019-12-06 11:28:50
问题 I'm trying to make an extension for Visual Studio that changes some syntax in the code. Actually, I've done the first step which was to change the name of a variable if this name was not okey with the rules we use in the firm. For example: int newVariable; double test; will be changed into: int iNewVariable; double dblTest; Now I have to change this type of comment: (SingleLineComment) //this is a single line Comment Into a MultiLineComment /*Here it's a MultiLine one*/ I use the Roslyn