documentation

How do I properly write macro documentation if the macro is defined in a module?

◇◆丶佛笑我妖孽 提交于 2019-12-20 01:14:26
问题 I defined a macro in a module, and it works fine. Now, I'm trying to document said macro with an example. Apparently, I need to manually specify the crate line to ask for macros: /// ``` /// # #[macro_use] extern crate foo; /// // Some code /// ``` However, I now get an error saying: error: an `extern crate` loading macros must be at the crate root Apparently the example code is loaded in the macro's module, and does not seem compatible with macro_use ... I can't believe everyone writes

Embed Google docs editor into webpage? [closed]

大憨熊 提交于 2019-12-19 18:23:37
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . Is it possible to embed the Google Docs editor so that it reads a file, which is then uploaded to a server (not google docs server) and you can edit it and save back to same file? 回答1: I don't think this is currently possible with Google Docs. 回答2: Yes it is: < iframe height="300"

Unable to exclude directories from PHPDocumentor

纵饮孤独 提交于 2019-12-19 07:49:19
问题 I'm trying to run PHPDocumentor on my WAMPServer setup. It runs fine, but I'd like to exclude certain directories, such as \sqlbuddy\ which don't contain my own code. Ironically, PHPDocumentor appears to be ignoring my --ignore switch. I've tried several ways of expressing the same thing, but with the same result. Below is the command I'm running it with: php.exe "C:\Users\username\Documents\PhpDocumentor\phpdoc" -t "C:\Program Files\wamp\www\docs" -o HTML:default:default -d "C:\Program Files

How can I make Python/Sphinx document object attributes only declared in __init__?

孤人 提交于 2019-12-19 05:58:13
问题 I have Python classes with object attributes which are only declared as part of running the constructor, like so: class Foo(object): def __init__(self, base): self.basepath = base temp = [] for run in os.listdir(self.basepath): if self.foo(run): temp.append(run) self.availableruns = tuple(sorted(temp)) If I now use either help(Foo) or attempt to document Foo in Sphinx, the self.basepath and self.availableruns attributes are not shown. That's a problem for users of our API. I've tried

Omit (or format) the value of a variable when documenting with Sphinx

谁说我不能喝 提交于 2019-12-18 19:39:37
问题 I'm currently documenting a whole module with autodoc. However, I define several variables on the module level that contain long lists or dicts. They are included in the documentation together with the values, and the values are unformatted, so it looks like a 10-lines mess. What I want is for the docstring of those variables to be included, but for the values to be omitted or at least nicely formatted. I've tried to exclude the variable from automodule directive and add it like that: ..

What's the difference on docstrings with triple SINGLE quotes and triple DOUBLE quotes?

亡梦爱人 提交于 2019-12-18 19:05:27
问题 I was just wondering what is the difference between two ways of writing Python Docstrings ( __doc__ ): three single quotes: ''' Comment goes here ''' three double quotes: """ Comment goes here """ Is there any subtle difference in the way doc string could be formatted later while generating docs? 回答1: No. They are the same. The only difference is that the first one can contain a sequence of three unescaped double quotes, while the second can contain a sequence of three unescaped single quotes

Should I use @return self, this or the current class? [closed]

我怕爱的太早我们不能终老 提交于 2019-12-18 13:54:07
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . I have a method that return the current object, how do I document this? /** * set something * * @return this */ public function setSomething(){ // ... return $this; } Or should I do @return self or @return Current_Class_Name ? Reason why this question is not "primarily opinion

Should I document my private methods? [closed]

瘦欲@ 提交于 2019-12-18 13:52:43
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . Private methods documentation can only be seen by who has access to the source code. Is it worth the effort spent on it? 回答1: Personally, I feel that it is. Documentation is often the most useful to future developers maintaining your software - especially member documentation

Documentation Resource for Office VBA developers [closed]

不羁的心 提交于 2019-12-18 12:58:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Where do I find helpful documentation for VBA programming? something like SitePoint for HTML development. MSDN simply lists down and describes the operation and properties/methods of classes instead of explaining what they are used for, or when to use them. Books are also welcome. 回答1: I have been working with

Does F# documentation have a way to search for functions by their types?

夙愿已清 提交于 2019-12-18 12:52:28
问题 Say I want to know if F# has a library function of type ('T -> bool) -> 'T list -> int ie, something that counts how many items of a list that a function returns true for. (or returns the index of the first item that returns true) I used to use the big list at the MSR site for F# before the documentation on MSDN was ready. I could just search the page for the above text because the types were listed. But now the MSDN documentation only lists types on the individual pages--the module page is a