Book navigation

Navigation

Little OT: How do you all get the nice listing in posts here?

Hi,

I just posted to the other forum. I added the code and /code tags (with < and >), but it doesn't appear as a code block. So, how do you get those nice listings in posts, e.g., with the line #s, etc.?

I tried all three "Input format" choices :)...

Jim

 #

Hi,

BTW, using the code and /code tags in the jNetPcap forums seem to work for me (puts the bracketed lines in a gray box with border), so is there something different about the jNetStream forums setup?

But, still can't get that "nice" format with the line numbers :)...

Jim

 
 #

jNetStream forum and modules need some more configuration tweaks. I'll work on them as time permits.

To get the code-formatter you have to use the "pre" tag like so:

<pre name=code class=java>
// Java code
</pre>

"code" tags are good for shorter samples and inline highlighting and they don't indent well.

 
 #

Mark,

Ok,

System.out.println("Thanks!");

Jim

 
 #

LOL!!!

 
 #

I should add that there are also 2 options that are available with code-formatter

<pre name=code class=java:nogutter>

// No line numbers

</pre>

<pre name=code class=java:nocontrols>

// No controls on top

</pre>

<pre name=code class=java:nocontrols:nogutter>

// No line numbers and no controls on top

</pre>

Sometime, I use those for 1 line examples.

And here is the link where to download it with full manual:
http://code.google.com/p/syntaxhighlighter/

 
 #

Mark,

Thanks. That is cool!

Jim

P.S. BTW, on this (jNetStream) forum, when I post, the page where I'm posting only has "Preview" button, and no "Save" or "Submit". The jNetPcap forum seems to behave differently (there, there are 2 buttons).

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Who's online

There are currently 0 users and 8 guests online.

Who's new

  • plaidshirly
  • Ph.Eitt
  • examiner
  • stleary
  • dannyward138