Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Perl Monks Discussion

( #1040=superdoc: print w/ replies, xml ) Need Help??

This section is only for discussing issues pertaining to the PerlMonks web site. You can ask about how things work, or offer ideas on how the site could be improved, for example.

Unless the topic pertains to the PerlMonks web site, it does not belong in this section. If you're unsure, check out Where should I post X? and The Perl Monks Guide to the Monastery, or ask in the chatterbox.

PerlMonks Discussions
Ignore monks in last hour of cb
2 direct replies — Read more / Contribute
by chacham
on Apr 29, 2015 at 15:04

    ignored users only works for the displayed CB. last hour of cb goes unfettered, but maybe the following Greasemonkey script can help with that.

    TMTOWTDI. The first /* commented out */ method uses <del> to strike the names and texts. The second deletes the rows entirely.

    The included script ignores paco and NodeReaper, two notorious monks that just say the oddest things. Kudos to Tanktalus for the history itself.

    Disclaimer: I mostly googled this one together.

    // ==UserScript== // @name cb history Ignore // @namespace // @description strikeout of remove ignored users from last hour of cb // @include // @grant none // ==/UserScript== var ignore = ['paco' , 'NodeReaper']; /* // encapsulate in <del> var author = document.getElementsByClassName('cb_author'); for (var i = 0; i < author.length; i++) for (var j in ignore) if (author[i].children[0].text == ignore[j]) { author[i].innerHTML = '<del>' + author[i].innerHTML + '</del>'; author[i].parentElement.parentElement.children[1].innerHTML = '<del +>' + author[i].parentElement.parentElement.children[1].innerHTML + '< +/del>'; } */ // remove rows var table = document.getElementsByClassName('cb_author')[0].parentElem +ent.parentElement.parentElement.parentElement; for (var i = (table.rows.length -1) ; i >= 0; i--) if(ignore.indexOf(table.rows[i].cells[0].children[1].children[0].text +) != -1) table.deleteRow(i);

    UPDATE: ambrus's comment below seems far superior.

Chatbox too small
1 direct reply — Read more / Contribute
by Lady_Aleena
on Apr 16, 2015 at 17:45

    Today I was trying to lengthen the chatbox on the FullPage Chat. I added the following to my css in my display settings, but the talk button didn't move so the chatbox was under the talk button.

    .chatbox { width: 125%; }

    Can we please get a longer chatbox? Currently only about 40 characters can be seen at a time. A longer chatbox would mean fewer typos, IMO. So pretty please with sugar cookies on top? ")

    No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
    Lady Aleena
The boy who cried...
7 direct replies — Read more / Contribute
by BrowserUk
on Mar 31, 2015 at 13:22

    At what point does the Troll-caller become the troll? Discuss.

Change default style sheet: add line numbers
7 direct replies — Read more / Contribute
by roboticus
on Mar 28, 2015 at 09:54

    Hello, all--

    I suggest that the default style sheet be changed to add line numbers to code listings. I've had that set up on my style sheet for quite some time now, and find it pretty convenient.

    We frequently have people give us chunks of code and associated error messages whose line numbers don't match the code. Sometimes the querants will annotate their code with a comment telling which line is which. I'm thinking that if they are able to see the line numbers, it may encourage some of the posters to tie the line numbers and error messages together better, possibly reducing one round of questions.


    When your only tool is a hammer, all problems look like your thumb.

'Bare' display style now supports css styling
1 direct reply — Read more / Contribute
by jdporter
on Mar 22, 2015 at 13:24

    Logged-in users can now apply a css stylesheet to nodes rendered using the 'bare' display style. To do so, go to your Display Settings, and look for the text field labeled "Link to External CSS stylesheet for 'bare' display style:", near the bottom. Only "external" css is supported in this way; the text field's value must be a URL for a page of css.

    For starters, here is some simple css which makes it easier to see the tree structure of replies and to distinguish one reply from another:

    li.reply { border: 1px solid black; margin:5px; counter-increment: re +ply-list; margin-top:20px; }

    You can actually use that "[download]" link, there, as the URL in the Display Settings field. :-)

    To see a page rendered in the 'bare' display style, either add ;style=bare to the URL of the page, or insert /bare/ in the path part of the URL. Examples:


    More ideas:
    form > div.reputation, div.comment-on { padding:8px; border:4px outset #0A8; } div.comment-on br { display:none } div.body { padding:12px } div.pmsig { border: 1px dotted black; margin:5px; } div.header, div.footer { padding:4px; border:3px outset #666; } ul.inline-list li { display:inline; } ul.inline-list li:before { content:"\2023"; margin-left:1em; margin-ri +ght:0.2em; } ul.replies { list-style: decimal; counter-reset: reply-list; } li.reply { border: 1px solid black; margin:5px; counter-increment: re +ply-list; margin-top:20px; }
    For pmdev:
    p.titlechooser { display:none; }
    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
PM Guide to editing nodes.
4 direct replies — Read more / Contribute
by cheako
on Mar 09, 2015 at 16:39

    Keywords: node editing edit modify posts

    I must admit that I assumed the Edit feature was a free for all, add-in. It's a nice feature that I alone consider to be a way to ensure that years from now every node contains concise and to the point useful information about "Perl". The Node's history will be of no consequence to anyone looking to solve the same problem later.

    IMHO if you want historical information on a node's past edits, there should be a feature for that like on Wikipedia. A separate tab were all the changes can be laid out in chronological order and even a comment on why the change was made. However I do understand that short term knowledge on how a node evolves is essential or at least I can make myself believe this is important and, more importantly, understand the it's important to others.

    I looked for such a guide as this thread should evolve to be and didn't find it after 30 seconds, hopefully this thread will be now be in the "I'm feeling lucky" range. As such I do not yet know how to properly format an edit, nothing listed in the obvious place that should list, reference(this node) or contain anything and everything related to formatting a node's content, but currently does not even contain the words edit or modify.

Monks statistik
4 direct replies — Read more / Contribute
by LanX
on Mar 09, 2015 at 11:13

    do we have any statistics about the number of monks who reached a certain level?

    I mean also below the ones listed in Saints in our Book

    Thanks :)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)

    PS: Je suis Charlie!

Oldest Nodes.
3 direct replies — Read more / Contribute
by cheako
on Mar 06, 2015 at 02:34

    I attempted to make good on my suggestion to read everything on PM. "Tough beans." qw/nodetype container document htmlcode htmlpage image node nodegroup/ and at some point, you get bored being told that you need boiling water.

    <p>I attempted to make good on my suggestion to read everything on PM.  "Tough beans." qw/[id://1] [id://2] [id://3] [id://4] [id://5] [id://6] [id://7] [id://8]/ and at some point, you get bored being told that you need boiling water.</p>
    Skipping around, 32 64 *128 92 100 PM 101. 107=>The Everything Tour root Looking for a place to spend that one last vote: 160=>try this on for size?
Approval attempt ignored?
3 direct replies — Read more / Contribute
by BrowserUk
on Mar 03, 2015 at 01:45

    Why can't I approve Why PerlMonks is an amazing place.? I tried several times.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
    In the absence of evidence, opinion is indistinguishable from prejudice.
PM Leveling Guide.
7 direct replies — Read more / Contribute
by cheako
on Mar 02, 2015 at 16:39

    I think I get how to level once I've reached level 2, you just use up all your votes day after day and eventually you will reach level 6.

    Most RPG have a few guides on how to level quickly, though I'm looking for a guide that indicates the right way to level your Monk.

    My aim here is for a quick two posts. It's not my intention to spam PM with content below par, though that does seem to be one way to get to level 2. Though it's been pointed out that simply adding nodes will not gain you any XP.

Categorization by level
7 direct replies — Read more / Contribute
by prat7434
on Feb 24, 2015 at 02:55
    Hi, This is a general question not about perl. Can we have a categorization of questions like beginners, intermediate or expert? I think it would be like following: Whenever someone asks a question he chooses a category. Because a person, who is asking, knows about himself that he is at beginner or intermediate or expert level. Thus we have a categorization. I think it would be helpful. And we can have a list of topics for each category automatically.
Date format in attributes of local XML API
1 direct reply — Read more / Contribute
by LanX
on Feb 14, 2015 at 12:51

    I'm trying to parse XML from various XML services of the monastery and got bitten by entities in attributes:

    <info site="" sitename="PerlMonks" ticker_id="507 +310" gentimeGMT="2015-02-14 17:40:04" xmlstyle="clean" xmlmaker="XML: +:Fling 1.001" fetch_num="109" delta_since="2015-02-14 17:29:58&amp;nb +sp;GMT" min_poll_seconds="600">Rendered by the Noderep XML Ticker</in +fo>

    while entities in attributes seem to be allowed this format of delta_since="2015-02-14 17:29:58&amp;nbsp;GMT" looks broken¹.

    (compare also gentimeGMT="2015-02-14 17:40:04")

    Could someone enlighten me if and why that's necessary?

    Otherwise should it better be changed to delta_since="2015-02-14 17:29:58 GMT"?

    Or are there date-time parsers requiring these entities?

    Cheers Rolf

    PS: Je suis Charlie!

    ¹) (or do I miss something in the XML specification?)

CB bug: cutting off text after TAB
1 direct reply — Read more / Contribute
by LanX
on Jan 29, 2015 at 06:34
    Since I'm using a mobile client, I'm regularly struggling with CB messages which only appear shortened in "normal" CB clients but normal in CB60.

    I looked into the HTML source ... could it be that "\t" is translated to an (unbalanced) "<\td>" in the cb sidebar and the rest is chopped?

    For reproduction, posting "test\ttest" produces:

    • <dd>test    test</dd> (i.e. the original input¹) in CB60
    • <span class='content'>test</td></tr> in CB sidebar
    • <span class="content">test</span> in "Chatterbox" nodelet
    • Possible workaround: pre-filtering input with s/\t/ /g
    • Reasoning: The way browsers handle TAB is too random and the CB isn't meant for horizontal formatting anyway
    • Alternative s/\t/ &nbsp; &nbsp;/g (updatet)

    Cheers Rolf

    PS: Je suis Charlie!

    ¹) discussion posts don't seem to preserve tab in inline <c>code</c>, the HTML here will show test &nbsp; &nbsp;test

How about a "reclaim your post" feature?
6 direct replies — Read more / Contribute
by Anonymous Monk
on Jan 25, 2015 at 17:47
    We all know that posts sometimes accidentally get sent from Anonymous Monk because the user's session got logged off. But presumably we still know what IP-address it came from, and that these are likely to be fairly-unique. How about a feature that lets you reclaim an anonymous post that came from your IP? One positive experience-point would be deducted, total not less than zero, so that you could not upvote a post (to find out what the XP count is), then adopt it to promote yourself to the papacy.
RAT: Recently Active Threads nnt-as-of not preserved when switching modes
1 direct reply — Read more / Contribute
by Anonymous Monk
on Jan 20, 2015 at 22:05

Discussion Item
Give us your input:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (15)
    As of 2015-06-30 18:07 GMT
    Find Nodes?
      Voting Booth?

      What kind of chocolate gives you the most pleasure?

      Results (797 votes), past polls