purpose of vertical bar in programming IDEs/Editors - ide

In this example. I'm using Phpstorm Code Editor and I wonder the purpose of this Vertical Bar

This is a visual limiter of the line length.
Usually the code convention in programming languages or in particular project requires to have the line of code to be limited by length.
For example Python's PEP 8 coding convention requires it to be limited to 79 characters.
So basically this limiter in your text editor or IDE is just made for convenience to help you to control the maximum line length in your code. Usually you can set-up the maximum code line length in the settings.

From: http://www.jetbrains.com/phpstorm/webhelp/editor-appearance.html
Show right margin (configured in Code Style options) Select this check box to have a thin vertical line at the right margin of the editor displayed. Refer to the description of the General page of the Code Style settings.
From: http://www.jetbrains.com/phpstorm/webhelp/editor-appearance.html
Right Margin (columns) In this text box, specify the number of columns to be used to display pages in the editor.
Wrap when typing reaches right margin Select this check box to ensure that edited text always fits in the specified right margin.
So you can probably disable it if you want...

Related

How to set tab indentation with GNAT GPS

I installed GNAT GPS 2017 and I would like it to indent my code with tabs using the same width as 4 space characters. I've gone into Edit->Preferences->Editor->Ada and tried all sorts of options (Use tabulations, default indentation 4, etc) but nothing seems to make it work:
Opening existing file with tabs causes GPS to display tabs with 8 spaces wide instead of 4.
Adding new code causes GPS to indent with 4 spaces but it inserts space characters instead of a single tab character.
Any ideas?
I think that GPS is working as-designed; unfortunately, that isn’t the way you want it to work.
The Preferences > Editor > Ada > Default indentation setting (and the four settings following it) say what screen appearance is required (assuming a monospace font, of course) if you hit the TAB key in a line.
The Preferences > Editor > Ada > Use tabulations setting says whether the editor should use 8-column-width tabs when possible to achieve the above.
#Jean-François Fabre suggested that "Their code parser doesn't support tabulations properly" - I think this may be that Jean-François compiles with -gnaty (style checks), and one of the default style checks is that the file isn’t indented with tabs.

Bullet list types in Migradoc

How can i give user defined ListType using Migradoc. I have found 6 types of Listtypes.
In those Bulletlist3 is the square but i need to give bigger size square so, how can i give that?
AFAIK you cannot use custom bullet list symbols with MigraDoc.
When we needed this, we just added an empty paragraph, used AddFormattedText to add the bullet symbol (we also needed big squares), added a tab, then came the normal text.
Set the paragraph style properly as discussed here:
https://stackoverflow.com/a/9635220/1015447

With WxWidgets, is the wxTextCtrl one-size-fits-all?

When working with guis of different kinds, I am used to the distinction of text field or text entry box versus text box. That is there is one type of object for the multi-line word processor style text box and another type of object for a single line, quite often non-scrollable text field / text entry box. Does wxTextCtrl serve both purposes? I know it does the text box but is it also the correct choice for the text field/text entry box?
EDIT
There are actually 2 types of text boxes for multi-line entry as pointed out in the answers. What really interests me are widgets specific for single line entry versus widgets specific for multi-line entry.
wxTextCtrl serves for both single and multiline entry. It is quite powerful but not exactly 'word processor style'. Closer to that would be wxRichTextCtrl.
wxComboBox uses wxTextEntry ( as does wxTextCtrl in single-line mode ). Although wxTextEntry is not offered as a control itself - it does not inherit from wxControl - if you like it so much you might be able to build something using it. But it seems like a lot of trouble for benefits that I do not see.
wxTextCtrl is a single line text control (what is called "entry" in other frameworks) by default. If you specify wxTE_MULTILINE style when creating it (this style can't be changed later), it becomes -- surprise -- a multi-line control, i.e. what is called "area" in other places.

Valid widths for the Settings Pane in Windows 8

I have a condition wherein the Header Text of the Settings Command in the PopUp is Larger and as per the Specification the width of 346px is a bit short for the complete text and the Width of 646px seems a bit much larger for the PopUp Header. I would like to know whether is it ok if we use custom widths for the Settings Popup which will solve my problem and if this is not an alternative i would be pleased if an alternative workaround is suggested.
Thanks for your Suggestions...
You should really stick to the recommended widths of 346px or 646px. If your header doesn't fit, why not change the font size, or add line breaks?

Formatting plain text output for printing?

I have a program that outputs a report into plain text. The report must be plain text for it to load into a third party program. The report also needs to be printable.
When dealing with plain text, what limits should I set on line size and number of lines on a page to get it to print reasonably?
It definitely depends on the font you use when printing, and unless you have control over that you can't guarantee it will print nicely. For example, in Word 2007, creating a blank document and setting the font to Courier New 10pt only fits 77 characters per line and 28 lines per page. Changing the margins and line spacing will modify that. However if you used that and they tried to print from Wordpad it wouldn't work because the default with Courier New 10pt only fits 72 characters per line. In either case, the standard 80 characters doesn't work. Those defaults aren't even global defaults.
The best you can probably do is pick a size and provide instructions on printing the report with several common editors so it will look acceptable. Specify the font, margin, line spacing, etc.
Have you considered other options, like creating two files? One could be plain text for import into the other program. The other could be a format better suited for printing.
its going to depend on your printing font, you want to aim for a fixed width font so that it is consistent, 80 columns is generally safe.... i think....
edit: here is a quick guide I googled - http://dsl.org/cookbook/cookbook_17.html
If you have control over the output format, consider a lightweight WYSIWYG markup language, Such as reStructuredText, AsciiDoc, markdown etc.
This way you can pipe the plane-text format into a converter that will result in postscript, PDF or HTML, that you can then print. This also mostly negates the need to consider the line width for the sake of your printer. The converter will do this for you.