indentation

Jasper Report HTML bullet hanging indent

前提是你 提交于 2019-12-20 03:21:54
问题 I have a Jasper report which uses HTML markup tag to display the li tag list. However, it seems that even with the latest version of the Jasper report, it still cannot do the hanging indent correctly. This is what I want: TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test This is what I get:

Python: prevent mixed tabs/spaces on module import

荒凉一梦 提交于 2019-12-20 02:52:53
问题 I know you can ensure pure tabbed/spaced code by calling Python with -tt . However, when I have no control over the top-level call, can I still enforce this behaviour on the modules that are loaded by my script? 回答1: If you have control about the initial script, then you can just add a check for it yourself. For example, instead of just importing your student’s script, you could have a function that first checks the module for indentation errors, and then imports it: # instead of import foo

Checkstyle equivalent for JSPs?

限于喜欢 提交于 2019-12-20 01:33:39
问题 Is there any tool to do for JSP files what checkstyle does for Java files? The ideal would be to include JSP checking on checkstyle, but as far as I can see, this isn't possible. I would like for example to check JSP files for : Indentation style Right placements of certain constructs Tab / space check Check for use of scriplets Thanks Emerson 回答1: Yes, there is something similar (but not for exactly those checks): You can use IntelliJ IDEA's "Inspection" functionality to inspect JSPs for

Enforce “spaces” or “tabs” only in python files?

ε祈祈猫儿з 提交于 2019-12-19 09:15:13
问题 In Python, is there a mean to enforce the use of spaces or tabs indentation with a per file basis ? Well, perhaps "enforce" is too strong, more like a "recommendation". I keep receiving patch files with mixed indentation and this is annoying... (to say the least) Python itself can tell when there is a problem, but I am searching something to do that at the editor level, like it exists for the charset. Edit : Ok, my question wasn't clear, I am asking this because I keep receiving corrections

Formatting of dynamically generated HTML - does no one care?

泄露秘密 提交于 2019-12-19 05:23:50
问题 I have very little experience in web development, so this may be a very basic question. It's just, from the limited experience I do have (a little PHP, and a little Ruby on Rails), it seems that the way dynamically generated HTML is formatted just "doesn't matter"; it ends up ugly, with weird indentation, and nobody cares because that isn't what the users sees. Unless, of course, the user is a developer, or even just someone who's curious to look at a little HTML to try and learn something.

Make Emacs less aggressive about indentation

╄→尐↘猪︶ㄣ 提交于 2019-12-18 17:14:27
问题 Emacs reindents the current line whenever I type certain things, like ";" or "//". This is pretty annoying, since there are a whole lot of places where it isn't smart enough to indent correctly. How do I disable this feature? I still want to be able to indent the line with TAB, but I don't want any source code I type to cause it to reindent. (I'm using Dylan Moonfire's C# mode, but this probably applies to any cc-mode.) 回答1: Try running c-toggle-electric-state to turn off the electric action

How to get smart tabs (“indent with tabs, align with spaces”) behavior in Xcode?

放肆的年华 提交于 2019-12-18 13:53:09
问题 I used to use tabs for indentation and spaces for alignment. Like so (arrows show tabs and dots show spaces). In QtCreator you can set such coding style in standard preferences. I can't find the way to achieve the same goal in Xcode. Could you please tell me if it is possible? May be there is a plugin for that? UPDATE: Here is how it can be achieved in QtCreator: P.S. Please, don't try to persuade me that using spaces only/tabs only is better, otherwise this question will turn into another

ggplot2 multiline title, different indentations

那年仲夏 提交于 2019-12-18 13:35:27
问题 I am generating graphs for a publication and I'd like to be able to label the panels of a figure in ggplot itself (as opposed to exporting to publisher, etc) so that they just fit neatly together in the final document. I was going to try to do this by adding a letter ("A") into the title, but I'd like my titles centered and I'd like the letter in the upper lefthand corner. # base graph: ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, color = Species, shape = Species))+ geom_jitter(size =

How would you parse indentation (python style)?

谁说我不能喝 提交于 2019-12-18 11:58:02
问题 How would you define your parser and lexer rules to parse a language that uses indentation for defining scope. I have already googled and found a clever approach for parsing it by generating INDENT and DEDENT tokens in the lexer. I will go deeper on this problem and post an answer if I come to something interesting, but I would like to see other approaches to the problem. EDIT: As Charlie pointed out, there is already another thread very similar if not the same. Should my post be deleted? 回答1

How would you parse indentation (python style)?

孤者浪人 提交于 2019-12-18 11:57:13
问题 How would you define your parser and lexer rules to parse a language that uses indentation for defining scope. I have already googled and found a clever approach for parsing it by generating INDENT and DEDENT tokens in the lexer. I will go deeper on this problem and post an answer if I come to something interesting, but I would like to see other approaches to the problem. EDIT: As Charlie pointed out, there is already another thread very similar if not the same. Should my post be deleted? 回答1