What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

As per Jeff's suggestion in this comment:

You can use this question as a formatting sandbox. You can

  • edit this question itself (Community Wiki questions such as this one require 100 reputation to edit)
  • post answers to this question (Since this question is protected this requires 10 reputation)
  • post comments to this question or its answers

Beware that since the changes to syntax highlighting in December 2010, and the inline hints added March 2011, no syntax highlighting is applied unless the question's tags or an inline hint enable it. So, to test highlighting here in the sandbox:

  1. Set some language tags to this question:

    • See the explanation and the list of languages.

    • Adding clashing tags, such as both and , enforces a fallback to default, which is different from "no highlighting". (These tags are currently set on this question.)

  2. Or: on the start of a line, specify a language inline using <!-- language: lang --> hints, and indent the code 4 spaces as usual. There is a full list of hints (scroll down a little).

    <!-- language: lang-html -->
        While not hinted otherwise: <html></html> source <b>goes</b> "here".
    <!-- language: lang-js -->
        var a = 3;
        while (not (a > 0)) {
            alert("JavaScript code <b>goes</b> here.");
  3. Or:

    • Save your post.

    • Use something like Firebug (Firefox), Web Inspector (Safari, Chrome) or Developer Tools (Internet Explorer 8) to edit the resulting HTML. To open Chrome Dev Tools, press F12

    • Find the <pre> element and add the attribute class="prettyprint", or change it into something more specific, like class="lang-vb prettyprint".

    • Run the following in the location bar: javascript:prettyPrint();

share|improve this question
What have you tried?‮What have you tried? –  nicael Jul 4 at 16:18
@nicael You're at it again... –  DatEpicCoderGuyWhoPrograms Jul 14 at 0:01
show 2 more comments

293 Answers 293

Testing nested quote levels and blank space:

The grey box of epicness!

Does it work with <pre>'s?

Apparently so!

Yay crappy formatting.

share|improve this answer
add comment

beep beep i'm a jeep

beep beep i'm a jeep

beep beep i'm a jeep beep beep i'm a jeep beep beep i'm a jeep beep beep i'm a jeep beep beep i'm a jeep
share|improve this answer
You just had to test the HTML didn't you? :P –  Second Rikudo Sep 27 '13 at 13:01
show 1 more comment
  • Test [su]

Lorem ipsum blah blah blah

share|improve this answer
show 1 more comment


share|improve this answer
And an excessively long flag. ;P –  animuson Aug 22 '13 at 4:24
add comment

I'm using jQuery with the cookies library that automatically JSON-stringifies structures when setting cookies and rebuilds them again when getting the cookie.

I'm using cookies to provide an undo-redo functionality for a web form that can include a lot of text, so every time an input element changes I collect all the data in the form and put it all in a cookie called newsletterDoX (where X is an integer) and I also set another cookie to store the current integer and another to store how many redos are available. Cookies are set to expire after one day.

The functionality is working, but when there is more than 4 newsletterDo cookies then a page refresh will give me a 400 error. In Chome it says

Bad Request

Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit.



When I delete the cookies back down to 4 or less then the error goes away. I think I got to 5 or 6 without the error with Firefox.

What's going on? I don't think it's the size of the cookies, or the content. The cookies beyond 4 can have the same size and content as those below 4 and it still gives the error.

The total number of cookies in the domain is as low as 12 when the error occurs, and deleting some other cookies rather than the newsletterDo cookies doesn't seem to change things, so the number of cookies probably isn't a problem either.

What could it be? I'm stumped!

here's the code that sets the cookies:

// cookies expire 1 day from now.
// I'm sure there's a more succinct way to set the expiry date,
// but this is working for me
var oneDay = new Date();
oneDay.setDate(oneDay.getDate() + 1);
jQuery.cookies.setOptions({expiresAt: oneDay});

// this function saves the form data so the user can come back to it
var setNewsletterCookie = function() {
    var saveData = collectNewsletterData();
    // save it in the database using the php code that acts as a db interface
    jQuery.post('db_interface_newsletters.php', {
        task: "save",
        title: $('#newsletterTitle').val(),
        issue: $('#issuenum').val(),
        content: saveData},
        function(data) {
            if (data.indexOf('Fail') >= 0) {alert (data);}
            else {
                // data should be a date string in UTC
                // convert it to local time and display
                var lastSaveDate = new Date(data);
    // save it also in a cookie for use of undo and redo
    try {
        var currentNewsletterDo = parseInt(jQuery.cookies.get('current_newsletter_do'), 10);
        if (isNaN(currentNewsletterDo)) currentNewsletterDo = 0;
    } catch(e) {
        var currentNewsletterDo = 0;
    jQuery.cookies.set('newsletterDo' + currentNewsletterDo, saveData);
    jQuery.cookies.set('current_newsletter_do', currentNewsletterDo);
    jQuery.cookies.set('newsletter_available_redo', 0);
share|improve this answer
show 1 more comment

Code formatting

Block code

Somewhat code

share|improve this answer
This is a comment‮dilav sa deggalf neeb sah tnemmoc sihT ‭ –  minitech Oct 17 '13 at 16:57
This is another comment‮emoswa sa deggalf neeb sah tnemmoc sihT ‭ –  Andrew's a Unitato Oct 17 '13 at 17:27
add comment

I am asking how to use jQuery to add numbers i tried $("2+2") but it didnt work

how to do in jquery

share|improve this answer
Hope you're happy, Qantas! –  Shadow Wizard Nov 7 '13 at 13:20
show 1 more comment

Adding another answer.

Needs some chars

share|improve this answer
add comment
Declare @result VARCHAR(8000)

SELECT @result = ''

SELECT @result += temp.temp
  SELECT DISTINCT ('Posted Date' + CAST(POSTED_DATE as char) + ',') as temp
  where JOURNAL_ID = @ID and JOURNAL_DATE = @Date
) AS temp 
share|improve this answer
add comment

Declare @result VARCHAR(8000)

SELECT @result = ''

SELECT @result += temp.temp FROM ( SELECT DISTINCT ('Posted Date' + CAST(POSTED_DATE as char) + ',') as temp FROM [LACDC].[dbo].[PS_CDC_JRNL_LSR_VW] where JOURNAL_ID = @ID and JOURNAL_DATE = @Date ) AS temp

share|improve this answer
add comment

Checking to see if this will POST over https when I'm on the https version of MSO.


It did!

We have a way to work around Rejection of text containing SQL statements.

share|improve this answer
add comment

HTML PrettyPrinted:


JavaScript PrettyPrinted:

int Javascript = 1;

CSS PrettyPrinted:

background-color: orange;
share|improve this answer
You need one line break between the <!-- language... --> and the code see my edit. –  Shadow Wizard Dec 4 '13 at 15:36
show 1 more comment

Experimenting with comment links to the new [help] center that I wish would just read me mind already.

share|improve this answer
show 4 more comments
        this.lblPackCurrUnits.Text = "◊A";
share|improve this answer
add comment

x x

\relative c' {
   << { c4 c c c8 c   c4 bes8 aes4. aes8 aes } \\
      { g8( aes f g4) aes f8   aes8( g f s8 \once\hideNotes aes2) } >> 
   << { bes8 bes2 \stemDown aes8( g f   <f ees>4.) } \\
      { f8( g ees f4)  s s8 } >>
   g8( des' f \clef treble as bes)
share|improve this answer
add comment

This is a test. This is only a test.

Editing a deleted question.

  1. foo

  2. bar

  1. baz
share|improve this answer
show 7 more comments

Posts w/out required chars 

share|improve this answer
add comment

IF you change the content after clicking away from the capatcha it will let you post without it...

Does this happen?

TEst TO See if capatcha can be bypassed.... TEsting only

Testing, testing...

  1. Test
  2. Test
  3. Test
share|improve this answer
show 4 more comments

Some Unicode:

ℷ   ζ   ⇔   ♀   ♂   ♣   ♮   ♯   ∑   ∞   ∮   ∭   §   ε   ψ   ‡   ℛ   ⋄   Υ

share|improve this answer
add comment

This is a test answer for this question:

Edit message is lost after a small follow-up edit

I will come back after 5 minutes (grace period) and edit the answer twice with different edit summary. Enjoy!

This is test edit #1

This is test edit #2 during grace period of edit #1

share|improve this answer
show 1 more comment

posting this for demonstration purposes

first second third fourth fifth

the above words and then this statement were all added in one revision window, individually and one by one, from mobile view

share|improve this answer
add comment

This here be a test post. And it must be longer!

share|improve this answer
add comment
#include <CapitalLetter>
#include <capitalLetter>
int main() {}
share|improve this answer
add comment

This here is a post that I'll be using to test stuff on the API!

share|improve this answer
add comment

This movie sucks

Also you hope for the Rock to show up but he doesn't. He has 5ish minutes of screen time and the rest of the time my fists are clenched as I try to literally summon the power of Goku and go super saiyan doing a kamehameha that could destroy the world itself because it would be worth it to end this movie.

— horsebungle

share|improve this answer
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .