LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LQ Suggestions & Feedback (https://www.linuxquestions.org/questions/lq-suggestions-and-feedback-7/)
-   -   What are code tags? (https://www.linuxquestions.org/questions/lq-suggestions-and-feedback-7/what-are-code-tags-615171/)

southsibling 01-20-2008 11:22 PM

What are code tags?
 
Quote:

Originally Posted by blackhole54 (Post 3029392)
/etc/dhcpd.conf doesn't explicitly reference interfaces (eth0, etc), just subnets. (I am assuming you already have your interfaces configured properly.)

Here is a dhcpd.conf I use with two subnets, each on its own card. (I've obfuscated the exact addresses with Xs.)

[code]
I hope this helps.

I have a question for you {that has nothing to do with this post); but, as I was wandering thru and reading threads, your signature caught my interest. What are 'code tags'?

Thanks, LT

blackhole54 01-21-2008 04:05 AM

Quote:

Originally Posted by southsibling (Post 3029786)
What are 'code tags'?

Glad to see somebody is reading my signature! :)

Code:

This text is in a code box (at least that is my term -- seems logical).

Such text will be presented in a mono spaced font and strings of consecutive, multiple spaces
won't be suppressed.          I.e., I can put a very large space in a line (like I just did) and
it will be preserved.  If one or more lines are "too long," rather than  wrapping the text, a horizontal scroll bar will be created.  (This parenthetical comment is just to guarantee this line is *really* long.)
This causes computer output, source code, scripts, etc. to look like they do on your
computer screen rather than be altered to "look nice." ( I'll show you the difference below.)

Also, when using a code box, you don't have perfectly innocent text suddenly getting
transformed into a "smiley" or something.

And I believe the spell checker won't flag anything in a code box.

The auto-wrapping, proportional spaced fonts, availability of smileys, etc. is nice for normal text like this. But it can really screw up computer output, making it very difficult to read. I added that comment to my signature after maybe the 10th or so time I had given somebody this tip when they had posted horribly screwed computer output.

You can wrap text in code tags two ways. One is to highlight the text and then click the hash (#) icon at the top of the edit box. (This isn't available on the "Quick Reply" box.) The other way is to type them in manually. If you don't know how to do that, hit the quote button on the bottom of this post, and look at what is between square brackets before and after the text in the code box above. (Assuming you don't want to actually respond to this post, I think you can just hit the back button on your browser after you have finished taking a look. If that screws up, just close the tab!)

As an example of a screwed up posting, this is what a routing table looks like w/o the code tags:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
209.244.XX.XX 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
255.255.255.255 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.2.0 192.168.1.XX 255.255.255.0 UG 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 209.244.XX.XXX 0.0.0.0 UG 0 0 0 ppp0

And this is with code tags:

Code:

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
209.244.XX.XX  0.0.0.0        255.255.255.255 UH    0      0        0 ppp0
255.255.255.255 0.0.0.0        255.255.255.255 UH    0      0        0 eth0
192.168.2.0    192.168.1.XX    255.255.255.0  UG    0      0        0 eth0
192.168.1.0    0.0.0.0        255.255.255.0  U    0      0        0 eth0
127.0.0.0      0.0.0.0        255.0.0.0      U    0      0        0 lo
0.0.0.0        209.244.XX.XXX  0.0.0.0        UG    0      0        0 ppp0

Also be aware that when you paste computer output into your edit box, the alignment might appear all screwed up. Don't try to manually "straighten it out." If you wrap it in code tags, it will appear OK when you preview and post.

archtoad6 04-23-2008 10:30 AM

Good info., nice post, thanks.

One addition: there seems to be a persistent bug* in the interaction between Konqueror (though ver. 3.5.8)
& LQ that causes the horizontal scroll bars inside posts to be useless
-- they scroll only about 10 or 50 pixels & almost always trigger horizontal scroll bars in the main browser window.
Once any single post in a thread is "too wide" then all posts in the thread are too wide to read comfortably.
The only cure is to switch to Opera, lynx, or even Firefox.
Or not bother w/ the thread.

The only cure while composing a post is
to insert "hard" new lines in the post in otherwise unnatural places.
Like this.

I implore all posters who use "Code:" blocks & anything else that triggers horizontal scrolling,
to limit their lines to roughly the same 72 characters that were available on punch cards.


* I suspect the bug is in the CSS that LQ inherits from vBulletin,
as I have the same problem on other vBulletin powered fora.

blackhole54 04-24-2008 12:32 AM

Quote:

Originally Posted by archtoad6 (Post 3130361)
I implore all posters who use "Code:" blocks & anything else that triggers horizontal scrolling,
to limit their lines to roughly the same 72 characters that were available on punch cards.


* I suspect the bug is in the CSS that LQ inherits from vBulletin,
as I have the same problem on other vBulletin powered fora.

I understand your aversion to horizontal scrolling. But I would think the preferred route would be to fix the underlying bug(s). I am far too html illiterate to be able to participate meaningfully in such a discussion. Perhaps you should raise the issue on the "comment and problems" (or what ever it is called) thread and see if it can at least be determined whether the fault is with LQ or with Konqueror? I know in the past somebody has done technical fixes on this site. And if the problem is determined to be with Konqueror, perhaps a bug report should be filed.

archtoad6 04-24-2008 06:18 AM

Of course it is, & I believe the correct procedure would be to file a bug report
-- only the last time I tried @ LQ, the bug reporter either wouldn't work for me.
I think it would be equally appropriate to file w/ KDE & vBulletin.

blackhole54 04-24-2008 06:45 AM

Quote:

Originally Posted by archtoad6 (Post 3131309)
-- only the last time I tried @ LQ, the bug reporter either wouldn't work for me.

I'd forgotten that LQ had a bug reporter. (I think that was created when they updated the whole system some months back.) Clicking on the link Post New Bug brought up an edit box. I didn't try to proceed further since it is not my bug. If you absolutely can't get it to work (did you try a different browser? is it another bug that needs reporting?) and you wish me to, I'll try to report it (to LQ), referencing the post where you described it.

XavierP 04-24-2008 08:25 AM

I've moved this to LQ WS&F as it's something Jeremy may need to be aware of. He is very keen on LQ being as accessible to as many people as possible and especially for it work (as far as possible) on various browsers.

blackhole54 04-27-2008 02:46 AM

Quote:

Originally Posted by XavierP (Post 3131431)
I've moved this to LQ WS&F as it's something Jeremy may need to be aware of. He is very keen on LQ being as accessible to as many people as possible and especially for it work (as far as possible) on various browsers.

Do you think it is getting the required attention? While the title of the thread is appropriate for the original two posts (which were themselves split off from another thread), I am not sure it is an eye grabber for somebody looking for things that need fixing.

XavierP 04-27-2008 04:12 AM

Jeremy checks this forum regularly and will see anything that is new since he last checked. He is far less likely to see it in another forum or tacked onto the end of a different thread. So, yes.

jeremy 04-27-2008 06:52 PM

I do indeed read every single thread in this forum. We're planning an upgrade in the near future. If that doesn't fix the bug we'll fix it ourselves and push it back upstream. Thanks.

--jeremy

frenchn00b 05-18-2008 03:42 AM

Code:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
209.244.XX.XX 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
255.255.255.255 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.2.0 192.168.1.XX 255.255.255.0 UG 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 209.244.XX.XXX 0.0.0.0 UG 0 0 0 ppp0

edit # in posting not working... :(

blackhole54 05-19-2008 01:40 AM

Quote:

Originally Posted by frenchn00b (Post 3156813)
edit # in posting not working... :(

Did you copy that from my example of a screwed up post? The # icon did, in fact, wrap your input in code tags. (I.e. it displayed in a code box.) But code tags won't restore formatting that has already been lost such as my "scewed up" example. But if you copy & paste your own output from route -n and wrap it in code tags, then when you preview or post it, it should appear the same as originally on your computer screen.

blackhole54 11-24-2008 10:04 AM

Now that LQ had just done a code upgrade, I thought this might be a good time to check if the problem with horiontal scrollbars with Konquorer had ever been solved. (See post #3 on this thread)

Also, when I went to post this, there was no "quick reply" box on this page. Is that a bug in the new software? I haven't noticed the problem on other pages.

EDIT: That's really strange ... After posting this, the "quick reply" box appeared. Sounds like one of those "fun" subtle bugs.

jeremy 11-24-2008 10:10 AM

Scrolling: http://www.linuxquestions.org/questi...32#post3345132

As for the QRB, it's disabled for threads that have not gotten a reply in a certain amount of time.

--jeremy

archtoad6 11-25-2008 09:08 AM

FWIW, scrolling is still broken.

At least in KDE/Konq. 3.5.3 -- not sure about 3.5.8 ...

(KDE 3.5.3 is what comes in SimplyMEPIS 6.0, which is based on Ubuntu Dapper 6.06 LTS repos,
& so it has another 7 months to "live". I'm waiting for 8.0 to be stable before I upgrade.)


All times are GMT -5. The time now is 02:53 AM.