comments

Comments in Markdown

纵然是瞬间 提交于 2019-12-17 01:20:28
问题 What is the syntax for storing a comment in a markdown file, e.g. a CVS $Id$ comment at the top of the file? I found nothing on the markdown project. 回答1: I believe that all the previously proposed solutions (apart from those that require specific implementations) result in the comments being included in the output HTML, even if they are not displayed. If you want a comment that is strictly for yourself (readers of the converted document should not be able to see it, even with "view source")

Modification history in a file

拥有回忆 提交于 2019-12-14 03:56:23
问题 I have worked a few places which haven’t used source control. They seemed to get into the habit of putting comments around code they changed explaining the change so that things could be reverted. I have found that this makes the code very difficult to read, and have been fairly adamant that such comments are not needed after introducing source control as the revision history will let you match up tickets with changes. However now, I am not so sure, I think it may be good to document major

Detecting typos in JavaScript code

£可爱£侵袭症+ 提交于 2019-12-14 03:43:38
问题 In Python world, one of the most widely-used static code analysis tools, pylint has a special check, that detects typos in comments and docstrings. Is there a way to detect typos in JavaScript code using static code analysis? To make the question more specific, here is an example code I want to cause a warning: // enter credntials and log in scope.loginPage.logIn(browser.params.regularUser.login, browser.params.regularUser.password); Here credntials is misspelled. 回答1: There is a eslint

Python does not allow additional comment with env python

徘徊边缘 提交于 2019-12-14 03:26:05
问题 I have a commenting line problem in python. I created a ages.py with vim and here is my script #!/usr/bin/env python ages={"dad":42, "mom":35, "lisa":7} for item in ages: print item When I add a comment above the !/usr/bin , like # this is a python script #!/usr/bin/env python ages={"dad":42, "mom":35, "lisa":7} for item in ages: print item and after I go back to directory, which includes the same script, and run the script with writing to terminal ages.py but I get this error $ ./ages.py .

Can Java comments be seen by decompiling?

守給你的承諾、 提交于 2019-12-13 14:57:18
问题 I was wondering if I put comments in my code and when someone tried to decompile it, if they could read the comments that I put? 回答1: No, comments are never included as part of the compilation process. They are typically removed in some sort of pre-processing, or first-pass stage. 回答2: Nope, comments are discarded by the compiler. 回答3: No. And you can verify this by using DJ Java Decompiler, for example. If you also refer to the Java Class File Format, you'll see there's no construct for

How to get comments of Facebook Notes Items using several Graph API in android app?

橙三吉。 提交于 2019-12-13 14:44:22
问题 I want to show Facebook Page's Notes items with those comments and likes using Graph API. To do that, I'm using the asyncFacebookRunner in Facebook SDK. Steps are like this: call asyncFacebookRunner.request to get Note Item with PageId mAsyncRunner.request(sAPIString, new NotesRequestListener(), null); Response has come. ( I can't highlight function call. Sorry for inconvenient to find it.) public class NotesRequestListener implements com.facebook.android.AsyncFacebookRunner.RequestListener {

Using XPath to access comments a flat hierachy

霸气de小男生 提交于 2019-12-13 14:43:33
问题 I have a given XML document (structure can not be changed) and want to get the comments that are written above the nodes. The document looks like this: <!--Some comment here--> <attribute name="Title">Book A</attribute> <attribute name="Author"> <value>Joe Doe</value> <value>John Miller</value> </attribute> <!--Some comment here--> <attribute name="Code">1</attribute> So comments are optional, but if there is one, I want to get the comment above each attribute. Using /*/comment()[n] would

Commenting (out) code in Angular2 TypeScript

我的梦境 提交于 2019-12-13 12:06:16
问题 I have the following Angular2 TypeScript code with a section commented out as per Javascript convention: @Component({ selector: 'my-app', template: `<h1>{{title}}</h1> <h2>{{lene.name}}</h2> <div><label>id: </label>{{lene.id}}</div> /*<div> <label>name: </label> <input [(ngModel)]="lene.name" placeholder="name"> </div>*/` <div><label>description: </label>{{lene.description}}</div> }) However, once the TypeScript compiles to Javascript I get the following output to my web browser: I've

Javascript comments on same line as code: yes or no? [closed]

荒凉一梦 提交于 2019-12-13 10:12:28
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . So here's some code I've written in Javascript: var panRate = 120; //Max speed of the camera var panAccelerate = 0.01; //Amount speed increases each frame var panDecelerate = 1.05; //Amount speed is divided by

C Program to count comment lines (// and /* */)

半腔热情 提交于 2019-12-13 09:22:17
问题 I need a program to count the lines of a .txt or .c file and return me the following things: File: Simple Comment: N lines Multiline Comment: N lines Total Lines: N lines I have this: if (pFile != NULL) { do { c = fgetc(pFile); if (c == '\n') n++; } while (c != EOF); And I don't know how to implement the rest of it. I tried with the strstr() function as well, didn't get it neither. 回答1: You can write a state machine that should handle most cases. As you scan the file, you'll be in one of the