continuation

Sphinx: Resume list numbering after a note section

╄→гoц情女王★ 提交于 2019-11-29 09:35:44
Consider the following list in ReStructuredText : Broken list example ------------------- #. First do spam #. Then do ``eggs`` .. note:: Nobody expects the Spanish Inquisistion #. The list restarts after the note When the list is compiled in Sphinx , the number after the note are reset to 1 : Any idea how to continue the numbered list after a note section? ddbeck The discontinuity of the list is caused by the note being a standalone element, not a child of the second numbered list element. To prevent the discontinuity of the list, start the note directive at the same indentation (in this case,

Continuation monad for a yield/await function in Haskell

两盒软妹~` 提交于 2019-11-28 08:27:41
问题 I want to create an automata type with a type like this: newtype Auto i o = Auto {runAuto :: i -> (o, Auto i o)} I know this is the type of the Automata arrow, but I'm not looking for an arrow. I want to make this a monad, so presumably its going to have a type like newtype Auto i o a = ???? What goes here? with a function like this: yield :: o -> Auto i o i So when I call "yield" from within the Auto monad the "runAuto" function returns a pair consisting of the argument to "yield" and the

syntaxerror: “unexpected character after line continuation character in python” math

杀马特。学长 韩版系。学妹 提交于 2019-11-28 04:16:31
问题 I am having problems with this Python program I am creating to do maths, working out and so solutions but I'm getting the syntaxerror: "unexpected character after line continuation character in python" this is my code print("Length between sides: "+str((length*length)*2.6)+" \ 1.5 = "+str(((length*length)*2.6)\1.5)+" Units") My problem is with \1.5 I have tried \1.5 but it doesn't work Using python 2.7.2 回答1: The division operator is / , not \ 回答2: The backslash \ is the line continuation

Sphinx: Resume list numbering after a note section

廉价感情. 提交于 2019-11-28 02:58:37
问题 Consider the following list in ReStructuredText: Broken list example ------------------- #. First do spam #. Then do ``eggs`` .. note:: Nobody expects the Spanish Inquisistion #. The list restarts after the note When the list is compiled in Sphinx, the number after the note are reset to 1 : Any idea how to continue the numbered list after a note section? 回答1: The discontinuity of the list is caused by the note being a standalone element, not a child of the second numbered list element. To

Bash continuation lines

痞子三分冷 提交于 2019-11-27 06:13:17
How do you use bash continuation lines? I realize that you can do this: echo "continuation \ lines" >continuation lines However, if you have indented code, it doesn't work out so well: echo "continuation \ lines" >continuation lines This is what you may want $ echo "continuation"\ > "lines" continuation lines If this creates two arguments to echo and you only want one, then let's look at string concatenation. In bash, placing two strings next to each other concatenate: $ echo "continuation""lines" continuationlines So a continuation line without an indent is one way to break up a string: $