pretty-print Questions

6

Solved

I have two functions, one which produces messages like Starting initialization... and another which checks return codes and outputs "Ok", "Warning" or "Error". However...
Willywillynilly asked 27/11, 2009 at 15:38

7

Solved

I'm planning to put some Java code in an appendix to my report. The report is a PDF document, and I use Eclipse for Java. How can I present it best and do this easily? Any recommendations?
Pinebrook asked 28/8, 2011 at 17:34

1

Solved

I'm having issues getting the Google Code Prettify to work properly. This example is working, using the provided remote files: <html> <head> <title>Google Code Prettify testing&l...
Countertype asked 13/1, 2015 at 2:49

2

Solved

A while ago, a solution to print out std::tuple was posted here. For the most part I get what's happening. I'm having trouble understanding whats happening in the print_tuple function though. temp...
Stinkwood asked 2/12, 2014 at 15:16

5

Solved

In Python, PHP, and many other languages, it is possible to convert a html document and "prettify" it. In Go, this is very easily done for JSON and XML (from a struct/interface) using the MarshInde...
Rawson asked 14/1, 2014 at 15:21

1

Solved

I'm trying to add pretty printing for STL in my GDB on Ubuntu 14.04. Some details on the tools: OS: Ubuntu 14.04 gdb version: 7.7 python version: 2.7.6 python3 version: 3.4.0 But after I setup...
Actor asked 5/10, 2014 at 17:58

1

Solved

I have an XML document which after sending it through my XSLT no longer has line breaks before the XML attributes. So for example <myoutertag one="a" two="b" three="c"> <myinnertag fou...
Marcellus asked 22/8, 2014 at 12:25

2

My program basically read an input file, makes an lxml.etree from that file, than for example I add a node to the etree and then I want to print it back on a file. So to write it back on a file I u...
Aeroplane asked 18/7, 2013 at 7:52

1

Solved

I know that it is possible to truncate git commit messages in pretty-print with something like this: git log --oneline --format="%h %<(70,trunc)%s %cn" But this seems to pad the commit messag...
Oistrakh asked 7/7, 2014 at 6:15

5

Solved

I was looking for a quick way to autoformat/pretty-print JSON in Vim the other day and found this great little command on Stack Overflow: :%!python -m json.tool That sent me on a search for a...
Starnes asked 11/8, 2011 at 0:56

2

Solved

What is the best option? I found: https://github.com/jasonl/eden http://www.arachnoid.com/ruby/rubyBeautifier.html but they both seem slightly outdated. Special support for Rails (Knowing...
Coachandfour asked 10/6, 2013 at 20:58

1

I'm using Android NDK with Eclipse + CDT, running on OSX. I would like to be able to debug the content of the STD library. I've seen several tutorials about using Python scripts to enable this "pr...
Babushka asked 23/6, 2014 at 11:5

2

Solved

I am using google-code-prettify for syntax highlighting in my blog which is hosted on blogger. My problem is I do not see the scrollbars appear around my pre-formatted code blocks even when the cod...
Keenan asked 19/12, 2012 at 5:40

1

Solved

I am switching from H to L import qualified Text.PrettyPrint.HughesPJ as H import qualified Text.PrettyPrint.Leijen as L and I have problems translating H.fsep ("paragraph fill"). This is what...
Isotone asked 8/2, 2014 at 19:43

7

I am trying to pretty print a hash to a file. I tried unix redirects [added different flags to it incrementally] : `echo #{pp mymap} | tee summary.out 2>&1` and File IO my_file = File...
Loosen asked 10/2, 2012 at 21:15

1

Solved

Say I have my own data structure, as a silly example, type 'a mylist = Empty | Cons of 'a * ('a mylist). I would like the toplevel to print this list in the form {a,b,...}. Here a, b of type 'a ar...
Leis asked 9/3, 2014 at 11:45

1

Solved

I am using Ubuntu 13.10, Eclipse Kepler Service Release 1, GDB 7.6.1-ubuntu and latest CDT available through the Eclipse "install new software". I followed the instructions posted on several sites ...
Thorndike asked 6/1, 2014 at 15:23

6

Solved

At the end of my computations, I print results: System.out.println("\nTree\t\tOdds of being by the sought author"); for (ParseTree pt : testTrees) { conditionalProbs = reg.classify(pt.features()...
Liberal asked 9/12, 2009 at 18:41

1

Solved

I use the grammar Java.g from the ANTLR wiki produces a lexer and parser for Java source files.Then use the following code to generate an abstract syntax tree (AST). ANTLRInputStream input = new ...

2

Solved

How can one send, using the Play! framework, a JSON response that is formatted to be human-readable? For example, I'm looking for something like: def handleGET(path:String) = Action{ implicit req...
Seicento asked 24/11, 2013 at 14:31

1

Solved

I'm trying to write a piece of code that will take an ANTLR4 parser and use it to generate ASTs for inputs similar to the ones given by the -tree option on grun (misc.TestRig). However, I'd additio...
Litotes asked 13/10, 2013 at 21:52

1

Solved

I have data in a Map object and I want to print it in a json format. I tried using DefaultPrettyPrinter mapper.writerWithDefaultPrettyPrinter().writeValue(filePath, mapObject); but the format i...
Ison asked 7/8, 2013 at 8:35

3

I have a dictionary such as this created using Python. d = {'a': ['Adam', 'Book', 4], 'b': ['Bill', 'TV', 6, 'Jill', 'Sports', 1, 'Bill', 'Computer', 5], 'c': ['Bill', 'Sports', 3], 'd': ['Quin', ...
Fuchs asked 4/9, 2012 at 1:40

4

Using the following simple code: package test; import java.io.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; public class TestOutputKeys { public static void main(String[...
Kirkham asked 12/8, 2009 at 8:4

4

I have a controller action that returns JSON data for api purposes, and plenty of it. I want to be able to inspect it in the browser, and have it nicely indented for the viewer. For example, if my ...
Ghetto asked 20/5, 2010 at 14:6

© 2022 - 2024 — McMap. All rights reserved.