How do I write comments in a SpecFlow Feature? - specflow

I'd like to include some comments in a SpecFlow feature.
I get the the following error:
Custom tool error: Parsing error near '/*'
I've tried the following:
// comment
/* comment */
-- comment
' comment
How do I do this?

As stated by sarfest above - its simply #-sign for comments.
There are no multiline comments but that's easily solved if you can do a vertical selection (hold down ALT-key and select in Visual Studio).
Vertical select and the enter a #-sign.
Additional information: the line has to start with a #, and optionally any whitespace. This means you cannot combine comments with actual code on the same line.

also, if you want to perform multiline comments in an easy way (on visual studio),
you can select the lines to be commented, and hit CTRL+K+C to comment, CTRL+K+U to Uncomment.

thank you for the wonderful idea. I just need to press ALT and select the entire lines (just the little space which holds only one character space in each line) and then enter # which result
from
xyz
abc
to
'# xyz'
'# abc'

You can add comment lines to the feature files at any place starting the line with the # sign. Be careful however, as comments in the specification are often signs of wrongly specified acceptance criteria.
The comment lines are ignored by SpecFlow.

Related

remove thesis title from the abstract section

this xelatex template's abstract section automatically add thesis title at top,
here's the template live demo in overleaf: https://www.overleaf.com/read/jkrpnmrnmqwz
i've looked around for hours and still cannot solve it, it seems it's not a common situation in english template.
the abstract page is not even used, so i guess some other packages include it?
i've also checked the abstract package documentation pdf, no help.
I suggest to try what follows. Go to your project and select the class file oucthesis.cls.
Scroll down to line 252:
Now comment line 252 with a % character at the beginning of the line:
% \fontsize{16\bp#}{26.67\bp#}\sffamily\#title
By the way, you can comment all the three lines from 251 to 253.
This should make it, otherwise please comment below my answer!

Notepad++: block comment not working

I am running Notepad++ 5.8.5 on Windows 7, editing Perl programs.
I would like to comment out a block of text lines (and later, perhaps, uncomment it).
None of the following works:
CTRL+K, CTRL+Q, CTRL+shift+K, CTRL+shift+Q,
selecting the block of lines and going to the menu: edit-> Comment/Uncomment -> Block Comment
none of the above has any effect.
What to do?
Is NP++ interpreting your file as Perl or plain text?
If NP++ is treating your file as plain text, then language specific things like that won't work.
You may want to double-check that as described here.
Why not try updating to a newer version? That's horribly out of date (a year old).
Define your own language to match to the file extension, in your case it is: txt
and then define any comment style you want. Then close and open NP++ again. Enjoy!
Path: Language--->Define your Language --> Comments & Number tab
Hank Wei

How do I get rid of the "Release 1" in the Page Header of the Sphinx Latex Output?

I'm using the "manual" document class of Sphinx and I'm quite happy with how the Latex Output looks like, except for the page header. It contains the title of my paper, as well as a "Release 1".
Since I'm writing a paper and not a documentation, I clearly don't need the release information. Unfortunately, it is very hard to find information on how to customize Sphinx latex output.
Does somebody know how to do it?
To suppress the release info at the top of your Latex output, you need to set the release and latex_elements['releasename'] to empty strings in your conf.py. So you might add or modify something like this in conf.py:
release = ''
latex_elements = { 'releasename': '' }
Then the release info will be hidden.
As of Sphinx 1.5 something, the workaround of setting an empty string stopped working - at least in my case (I had used it to suppress printing "Release " on the title page) . However, setting release to a blank space does work for me. There's more discussion of it here in the Sphinx-Users group: https://groups.google.com/forum/#!topic/sphinx-users/L5PUfwVu8f0
and there was a related bug report filed: https://github.com/sphinx-doc/sphinx/pull/4411
The bellow lines eliminate also the comma in the header. Add them in your conf.py file:
latex_custom = r'''
\makeatletter
\fancypagestyle{normal}{
\fancyhf{}
\fancyfoot[LE,RO]{{\py#HeaderFamily\thepage}}
\fancyfoot[LO]{{\py#HeaderFamily\nouppercase{\rightmark}}}
\fancyfoot[RE]{{\py#HeaderFamily\nouppercase{\leftmark}}}
\fancyhead[LE,RO]{{\py#HeaderFamily \#title}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\makeatother
'''
latex_elements = {'preamble': latex_custom}
Such a solution affects only the header.
If you want to remove the release sign also from the front page use the solution provided by ddbeck.
You can use stopwords - Stopwords are the words that will not be indexed.
http://sphinxsearch.com/docs/current.html#conf-stopwords

Pretty Print for (Informix-)4gl code

i'm searching for a pretty print program (script, code, whatever) for Informix-4GL sources.
Do you know any ? Than you, Peter.
Have you looked at the IIUG (International Informix User Group) software archive? There are two pretty printers there (of indeterminate quality).
The other place to look would be the Aubit4GL site - an open source variant of I4GL. Again, I'm not sure that they have a pretty-printer, but it might be something they have (though a casual check doesn't show one).
I don't know if anyone is reading this post anymore, but the easiest way to get some kind of nice "pretty print" of 4gl code is to view it in the Openedge Developer Studio, then use ctrl-I to set indention. You can adjust indention in the editor settings by saying the length of "tabs". (default is 4, I use 3)
Then do a ctrl-shift-f to make all command words uppercase.
Next, you can condense the code a few lines by moving all the "DO:" statements up a line next to the "THEN" statement with this regular expression search and replace.
ctrl-f:
search "\s*\n\s*DO[:]"
replace " DO:"
make sure you click the checkbox marked regular expressions.
At this point the code is nice and tidy.
Do a ctrl-a and ctrl-c to copy it to the clipboard.
paste it in Outlook as an email without sending. Print it in color.

Delphi Short Cut to add Date and Name Comment

Does anyone know of a short cut to place my name and the date where the cursor is i.e.
//021208 DarkAxi0m
so i don't keep check what the date is when i'm adding comments.
Im using Delphi7, with CnPack And GExperts Installed.
I think it should be able to be done with one of those experts.
I use GExperts to do this, like so:
in the
GExperts\Configuration
Select the Editor Experts tab.
In the list of experts, select
Insert Date\Time
Click on the configuration, insert the desired text:
'//' ddmmyy 'DarkAxi0m: '
//021208 DarkAxi0m:
After, to insert your new Date name comment all you need to do is:
ctrl+alt+a
I setup most programmers at the job like that.
It is also simple to do with GExperts' Expand Macro Template (found in Editor Experts).
I use this expansion to insert yyyy-mm-dd at the current position:
%YEAR%-%MONTH%-%DAY%|
For a solution that will work in most applications under Windows, not only in Delphi, you can use Authotkey (free, autohotkey.com). One of its many features is the ability to expand strings that you type - typically used for autocorrecting typos.
I start all my shortcut strings with a semicolon, since it practically never leads strings I type in real life, so in your example, to insert a comment-date-username sequence, I would want to type semicolon, slash, slash:
;//
The Authotkey script (which you can put in an .ahk text file and add the file to Autostart) would look like this:
::;//:: ; this means: when I type ";//", do what follows
FormatTime, curDate,, yyyy-MM-dd ; the double comma is intended
SendInput // %curDate% %A_UserName% ; variable expansion
return
This produces the following output:
// 2008-12-05 moodforaday
AHK syntax is a little dense, but there is an extensive help file.
On edit: this script could be expanded to apply the correct comment syntax depending on the IDE you are working in at the moment. You would detect active window title, find a signature substring ("Delphi") and choose the proper comment character(s). This way you could type the same hotstring to insert your comment regardless of the current IDE or language. You can also use SendInput to position the caret the way Delphi templates do.
Never mind found one in CnPack/Soure Templates
Added the template
//%Date% DarkAxi0m
Note: i should look in the menus more closely
You might also look at the Live Templates feature, which can be scripted to do just what you want:
http://cc.codegear.com/Item/24990
Don't be put off by the name, it includes a template script to include the date, time, including the ability to format it as you want.
Here is a variation with GExperts (www.gexperts.org) that makes it easy to search for changes based on developer or date.
Example of output and comment:
//07.25.2009 (SLB20090725) - Added 3rd optional parameter.
Besides an easily readable date I can easy search for comments programmer, by year, year+month etc.)
For example I can search for (SLB200905 for any comments I logged in May of 2009.
To do:
Under the GExperts menu open Configuration... (at the bottom of the list) then select the Editor Experts tab.
Locate 'Insert Date/Time' and double click on it.
//mm.dd.yyyy '(ABC'yyyymmdd') -'
Where ABC is the programmers name, initials, id, or whatever.
Then use Ctrl-Alt-A when in Delphi's IDE to insert
This should work in any verison of Delphi supported by GExperts.

Resources