653

Notes:

  • Answers will occasionally be moved to the Sandbox archive when there are too many of them. When using them to report bugs, keep an eye on the post.

  • You may also want to take a look at the Stack Exchange's Sandbox chat room

  • This site, Meta Stack Exchange, is usually used as a "test bed" for pending changes happening to the way text is rendered on all network sites. Changes to text rendering that are going to be rolled out to the network are usually deployed here first to test them out and fix any potential glitches. Currently, there are no such changes pending, but if there were, keep in mind that text posted here may render differently from the other sites until the changes roll out to them as well.

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 only 100 reputation to edit instead of 2,000)
  • post answers to this question (This question might be protected, requiring earning 10 reputation on this site to answer)
  • post comments to this question or its answers
  • test suspected bugs with the editor or the rendering
  • post ponies (only when mods are asleep)

Beware that since the changes to syntax highlighting in December 2010, and the inline hints added in 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. As of January 8, 2019, you can use GitHub-flavor fenced code blocks in your posts, specifying the language after the opening fence:

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

    • Create code blocks in any way (using the fence notation above, the four-space indent form, or using HTML <pre><code> tags).

    • Save your post!

    • Use your browser's developer tools to edit the resulting HTML. To open developer tools, press F12, or ⌥⌘ I on Mac.

    • Find the <pre> element and add the attribute class="prettyprint", or change it into one of the valid syntax hints linked above, like class="lang-vb prettyprint".

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

Answers that are considered annoying or obnoxious, or that cause breakage for users, will be deleted. This is codified as a policy as of March 29, 2018.

20
  • <```>test Commented Oct 30, 2023 at 1:26
  • @TheEmptyStringPhotographer stop trolling!!! Commented Nov 10, 2023 at 14:54
  • @ShadowWizardIsSadAndAngry wait, how did you ping me? Commented Nov 10, 2023 at 15:09
  • @TheEmpty see here. (TL;DR: anyone who edited can be pinged) Commented Nov 10, 2023 at 16:44
  • <del>del</del> <strike>strike</strike> ---three sticks--- Commented Jul 17, 2024 at 13:13
  • 2
    ~~~maybe this~~~ hmm, does not work. Commented Jul 17, 2024 at 13:14
  • &gt is > and &lt is < Commented Jul 18, 2024 at 4:02
  • This comment contains a hover title Commented Aug 20, 2024 at 17:44
  • Maybe it's due to whitespace? 22 ALLOW 191.1.2.3 22 DENY Anywhere Commented Sep 28, 2024 at 10:21
  • dev on prod go brrrrrrr Commented Nov 6, 2024 at 18:42
  • This may be (vaguely) related to fractional coloring [(en.wikipedia.org/wiki/Fractional_coloring),(https://…? Commented Nov 16, 2024 at 21:23
  • @PetəíŕdtheWizard test ping Commented Nov 21, 2024 at 7:05
  • Here to use this page as a dedicated sandbox Commented Dec 21, 2024 at 20:51
  • Use the groupingBy method. Commented Feb 14 at 14:44
  • padding padding Commented Mar 4 at 1:21

322 Answers 322

1

SVG flowchart embedded in HTML in Snippet:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"

 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<!-- Generated by graphviz version 9.0.0 (20230911.1827)

 -->

<!-- Title: G Pages: 1 -->

<svg width="531pt" height="456pt" viewBox="0.00 0.00 530.50 455.57" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">

<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 451.57)">

<title>G</title>

<polygon fill="white" stroke="none" points="-4,4 -4,-451.57 526.5,-451.57 526.5,4 -4,4"/>

<!-- Enter -->

<g id="node1" class="node">

<title>Enter</title>

<ellipse fill="black" stroke="black" stroke-width="1.2" cx="435.25" cy="-433.43" rx="60.63" ry="14.14"/>

<text text-anchor="start" x="400.38" y="-430.93" font-family="Georgia" font-weight="bold" font-size="10.00" fill="white">Start Process</text>

</g>

<!-- Htsrb -->

<g id="node2" class="node">

<title>Htsrb</title>

<polygon fill="#fff68f" stroke="black" stroke-width="1.2" points="435.25,-396.28 348,-352.28 435.25,-308.28 522.5,-352.28 435.25,-396.28"/>

<text text-anchor="middle" x="435.25" y="-360.78" font-family="Georgia" font-size="10.00">Check</text>

<text text-anchor="middle" x="435.25" y="-348.78" font-family="Georgia" font-size="10.00">Previous Script</text>

<text text-anchor="middle" x="435.25" y="-336.78" font-family="Georgia" font-size="10.00">Execution</text>

</g>

<!-- Enter&#45;&gt;Htsrb -->

<g id="edge1" class="edge">

<title>Enter&#45;&gt;Htsrb</title>

<path fill="none" stroke="black" stroke-width="2" d="M435.25,-419C435.25,-416.16 435.25,-413 435.25,-409.64"/>

<polygon fill="black" stroke="black" stroke-width="2" points="438.75,-409.86 435.25,-399.86 431.75,-409.86 438.75,-409.86"/>

</g>

<!-- Strfep -->

<g id="node9" class="node">

<title>Strfep</title>

<polygon fill="#bbffff" stroke="black" stroke-width="1.2" stroke-dasharray="5,2" points="491.25,-105.28 379.25,-105.28 379.25,-85.28 491.25,-85.28 491.25,-105.28"/>

<text text-anchor="middle" x="435.25" y="-91.78" font-family="Georgia" font-size="10.00">Update Last Position</text>

</g>

<!-- Htsrb&#45;&gt;Strfep -->

<g id="edge12" class="edge">

<title>Htsrb&#45;&gt;Strfep</title>

<path fill="none" stroke="red" stroke-width="2" d="M435.25,-307.81C435.25,-282.1 435.25,-254.78 435.25,-254.78 435.25,-254.78 435.25,-163.13 435.25,-118.78"/>

<polygon fill="red" stroke="red" stroke-width="2" points="438.75,-118.78 435.25,-108.78 431.75,-118.78 438.75,-118.78"/>

<text text-anchor="start" x="438.62" y="-247.23" font-family="Arial" font-weight="bold" font-size="9.00">First</text>

<text text-anchor="start" x="435.25" y="-238.23" font-family="Arial" font-weight="bold" font-size="9.00">Script</text>

<text text-anchor="start" x="439.75" y="-229.23" font-family="Arial" font-weight="bold" font-size="9.00">Run</text>

</g>

<!-- Hfsd -->

<g id="node3" class="node">

<title>Hfsd</title>

<polygon fill="#fff68f" stroke="black" stroke-width="1.2" points="69.25,-285.28 0,-241.28 69.25,-197.28 138.5,-241.28 69.25,-285.28"/>

<text text-anchor="middle" x="69.25" y="-249.78" font-family="Georgia" font-size="10.00">Check</text>

<text text-anchor="middle" x="69.25" y="-237.78" font-family="Georgia" font-size="10.00">for File Size</text>

<text text-anchor="middle" x="69.25" y="-225.78" font-family="Georgia" font-size="10.00">Decrease</text>

</g>

<!-- Hfsi -->

<g id="node4" class="node">

<title>Hfsi</title>

<polygon fill="#fff68f" stroke="black" stroke-width="1.2" points="69.25,-139.28 0,-95.28 69.25,-51.28 138.5,-95.28 69.25,-139.28"/>

<text text-anchor="middle" x="69.25" y="-103.78" font-family="Georgia" font-size="10.00">Check</text>

<text text-anchor="middle" x="69.25" y="-91.78" font-family="Georgia" font-size="10.00">for File Size</text>

<text text-anchor="middle" x="69.25" y="-79.78" font-family="Georgia" font-size="10.00">Increase</text>

</g>

<!-- Hfsd&#45;&gt;Hfsi -->

<g id="edge11" class="edge">

<title>Hfsd&#45;&gt;Hfsi</title>

<path fill="none" stroke="green" stroke-width="2" d="M69.25,-197.08C69.25,-182.98 69.25,-167.12 69.25,-152.23"/>

<polygon fill="green" stroke="green" stroke-width="2" points="72.75,-152.49 69.25,-142.49 65.75,-152.49 72.75,-152.49"/>

<text text-anchor="start" x="89.88" y="-178.73" font-family="Arial" font-weight="bold" font-size="9.00">File</text>

<text text-anchor="start" x="88.75" y="-169.73" font-family="Arial" font-weight="bold" font-size="9.00">Has</text>

<text text-anchor="start" x="89.88" y="-160.73" font-family="Arial" font-weight="bold" font-size="9.00">Not</text>

<text text-anchor="start" x="69.25" y="-151.73" font-family="Arial" font-weight="bold" font-size="9.00"> &#160;&#160;&#160;Decreased</text>

</g>

<!-- MtS -->

<g id="node6" class="node">

<title>MtS</title>

<polygon fill="#bbffff" stroke="black" stroke-width="1.2" points="365.5,-251.28 279,-251.28 279,-231.28 365.5,-231.28 365.5,-251.28"/>

<text text-anchor="middle" x="322.25" y="-237.78" font-family="Georgia" font-size="10.00">Set to File Start</text>

</g>

<!-- Hfsd&#45;&gt;MtS -->

<g id="edge14" class="edge">

<title>Hfsd&#45;&gt;MtS</title>

<path fill="none" stroke="red" stroke-width="2" d="M139.39,-241.28C179.29,-241.28 228.59,-241.28 265.94,-241.28"/>

<polygon fill="red" stroke="red" stroke-width="2" points="265.59,-244.78 275.59,-241.28 265.59,-237.78 265.59,-244.78"/>

<text text-anchor="start" x="167.12" y="-247.98" font-family="Arial" font-weight="bold" font-size="9.00">File Size Decreased</text>

</g>

<!-- MtLP -->

<g id="node7" class="node">

<title>MtLP</title>

<polygon fill="#bbffff" stroke="black" stroke-width="1.2" points="265.25,-117.28 195.25,-117.28 195.25,-73.28 265.25,-73.28 265.25,-117.28"/>

<text text-anchor="middle" x="230.25" y="-103.78" font-family="Georgia" font-size="10.00">Go to</text>

<text text-anchor="middle" x="230.25" y="-91.78" font-family="Georgia" font-size="10.00">Last Known</text>

<text text-anchor="middle" x="230.25" y="-79.78" font-family="Georgia" font-size="10.00">Position</text>

</g>

<!-- Hfsi&#45;&gt;MtLP -->

<g id="edge10" class="edge">

<title>Hfsi&#45;&gt;MtLP</title>

<path fill="none" stroke="green" stroke-width="2" d="M139.4,-95.28C153.76,-95.28 168.57,-95.28 181.96,-95.28"/>

<polygon fill="green" stroke="green" stroke-width="2" points="181.78,-98.78 191.78,-95.28 181.78,-91.78 181.78,-98.78"/>

<text text-anchor="start" x="159.75" y="-117.73" font-family="Arial" font-weight="bold" font-size="9.00">File</text>

<text text-anchor="start" x="157.88" y="-108.73" font-family="Arial" font-weight="bold" font-size="9.00">Size</text>

<text text-anchor="start" x="145.5" y="-99.73" font-family="Arial" font-weight="bold" font-size="9.00">Increased</text>

</g>

<!-- Left -->

<g id="node11" class="node">

<title>Left</title>

</g>

<!-- Hfsi&#45;&gt;Left -->

<g id="edge6" class="edge">

<title>Hfsi&#45;&gt;Left</title>

<path fill="none" stroke="red" stroke-width="2" d="M69.25,-51.01C69.25,-32.53 69.25,-15.14 69.25,-15.14"/>

</g>

<!-- GrvLP -->

<g id="node5" class="node">

<title>GrvLP</title>

<polygon fill="#bbffff" stroke="black" stroke-width="1.2" points="128.25,-362.28 10.25,-362.28 10.25,-342.28 128.25,-342.28 128.25,-362.28"/>

<text text-anchor="middle" x="69.25" y="-348.78" font-family="Georgia" font-size="10.00">Retrieve Last Position</text>

</g>

<!-- GrvLP&#45;&gt;Htsrb -->

<g id="edge9" class="edge">

<title>GrvLP&#45;&gt;Htsrb</title>

<path fill="none" stroke="green" stroke-width="2" d="M141.41,-352.28C200.41,-352.28 284.09,-352.28 347.07,-352.28"/>

<polygon fill="green" stroke="green" stroke-width="2" points="141.49,-348.78 131.49,-352.28 141.49,-355.78 141.49,-348.78"/>

<text text-anchor="start" x="191.25" y="-358.98" font-family="Arial" font-weight="bold" font-size="9.00">Script Has Run Before</text>

</g>

<!-- GrvLP&#45;&gt;Hfsd -->

<g id="edge2" class="edge">

<title>GrvLP&#45;&gt;Hfsd</title>

<path fill="none" stroke="black" stroke-width="2" d="M69.25,-341.99C69.25,-332.06 69.25,-315.47 69.25,-298.64"/>

<polygon fill="black" stroke="black" stroke-width="2" points="72.75,-298.86 69.25,-288.86 65.75,-298.86 72.75,-298.86"/>

</g>

<!-- RtE -->

<g id="node8" class="node">

<title>RtE</title>

<polygon fill="#bbffff" stroke="black" stroke-width="1.2" stroke-dasharray="5,2" points="352,-117.28 292.5,-117.28 292.5,-73.28 352,-73.28 352,-117.28"/>

<text text-anchor="middle" x="322.25" y="-103.78" font-family="Georgia" font-size="10.00">Read</text>

<text text-anchor="middle" x="322.25" y="-91.78" font-family="Georgia" font-size="10.00">New Data</text>

<text text-anchor="middle" x="322.25" y="-79.78" font-family="Georgia" font-size="10.00">to End</text>

</g>

<!-- MtS&#45;&gt;RtE -->

<g id="edge4" class="edge">

<title>MtS&#45;&gt;RtE</title>

<path fill="none" stroke="black" stroke-width="2" d="M322.25,-230.84C322.25,-210.76 322.25,-163.02 322.25,-130.16"/>

<polygon fill="black" stroke="black" stroke-width="2" points="325.75,-130.57 322.25,-120.57 318.75,-130.57 325.75,-130.57"/>

</g>

<!-- MtLP&#45;&gt;RtE -->

<g id="edge3" class="edge">

<title>MtLP&#45;&gt;RtE</title>

<path fill="none" stroke="black" stroke-width="2" d="M265.47,-95.28C270.04,-95.28 274.62,-95.28 279.19,-95.28"/>

<polygon fill="black" stroke="black" stroke-width="2" points="279.06,-98.78 289.06,-95.28 279.06,-91.78 279.06,-98.78"/>

</g>

<!-- RtE&#45;&gt;Strfep -->

<g id="edge5" class="edge">

<title>RtE&#45;&gt;Strfep</title>

<path fill="none" stroke="black" stroke-width="2" d="M352.27,-95.28C356.83,-95.28 361.4,-95.28 365.97,-95.28"/>

<polygon fill="black" stroke="black" stroke-width="2" points="365.82,-98.78 375.82,-95.28 365.82,-91.78 365.82,-98.78"/>

</g>

<!-- Right -->

<g id="node12" class="node">

<title>Right</title>

</g>

<!-- Strfep&#45;&gt;Right -->

<g id="edge7" class="edge">

<title>Strfep&#45;&gt;Right</title>

<path fill="none" stroke="black" stroke-width="2" d="M435.25,-84.89C435.25,-63.93 435.25,-15.14 435.25,-15.14"/>

</g>

<!-- Exit -->

<g id="node10" class="node">

<title>Exit</title>

<ellipse fill="black" stroke="black" stroke-width="1.2" cx="269.25" cy="-14.14" rx="57.45" ry="14.14"/>

<text text-anchor="start" x="236.62" y="-11.64" font-family="Georgia" font-weight="bold" font-size="10.00" fill="white">End Process</text>

</g>

<!-- Exit&#45;&gt;Right -->

<g id="edge8" class="edge">

<title>Exit&#45;&gt;Right</title>

<path fill="none" stroke="black" stroke-width="2" d="M339.65,-14.14C371.52,-14.14 403.38,-14.14 435.25,-14.14"/>

<polygon fill="black" stroke="black" stroke-width="2" points="339.99,-10.64 329.99,-14.14 339.99,-17.64 339.99,-10.64"/>

</g>

<!-- Left&#45;&gt;Exit -->

<g id="edge13" class="edge">

<title>Left&#45;&gt;Exit</title>

<path fill="none" stroke="red" stroke-width="2" d="M69.25,-14.14C69.25,-14.14 141.06,-14.14 198.62,-14.14"/>

<polygon fill="red" stroke="red" stroke-width="2" points="198.37,-17.64 208.37,-14.14 198.37,-10.64 198.37,-17.64"/>

<text text-anchor="start" x="146.9" y="-36.59" font-family="Arial" font-weight="bold" font-size="9.00">File</text>

<text text-anchor="start" x="145.4" y="-27.59" font-family="Arial" font-weight="bold" font-size="9.00">size</text>

<text text-anchor="start" x="130.4" y="-18.59" font-family="Arial" font-weight="bold" font-size="9.00">unchanged</text>

</g>

</g>

</svg>

1
Column A Column B
Cell 1 Cell 2
Formatting Sandbox Cell 4

Formatting Sandbox

1
alert("ACE test")

ACE does not work on Stack Exchange, because if it did you would have seen a browser alert.

3
  • aa What is ACE? Commented Aug 17, 2023 at 14:02
  • @PetəíŕdTheLinuxWizard Arbitrary Code Execution Commented Aug 17, 2023 at 14:32
  • ok Commented Aug 17, 2023 at 14:35
1

<b>Test</b> t`e`st `test`

0
1

no support for mathjax?

$$mathjax$$

$inline mathjax$

2
1

Testing image sizes Why huge images?

enter image description here

1

trying to make a copy button for my markdown

function test() {
  console.log("This code will have a copy button to the right of it");
}
Employee ID# Employee Name Company Orientation Date
blank space blank space blank space Lifetime
blank space blank space blank space WFD
blank space blank space blank space 5 hours
Employee ID# Employee Name Company Orientation Date
752856 Smith, John Waste LLC 12/28/2023
685273 Jones, Tracy Paint & Co 11/07/2023
385418 Ramirez, Jen Waste LLC 12/23/2023
787233 Johnson, Ted Paint & Co 10/07/2023
988534 Smith, Jane Waste LLC 10/22/2023
438541 Williams, Ken PipeFab LLC 11/18/2023
1
<sub>
test _hello_ test - newline at start and end
</sub>
test _hello_ test - newline at start and end
<sub> test _hello_ test - oneline</sub>

test hello test - oneline


<sub>
test _hello_ test - newline at start</sub>
test _hello_ test - newline at start
<sub>test _hello_ test - newline at end
</sub>

test hello test - newline at end

1

Raw links are linkified differently in live preview and rendered result?

Code https://github.com/
Code:https://github.com/
Code: https://github.com/
Code - https://github.com/
Code!https://github.com/
Code.https://github.com/
Code https://github.com/
Codehttps://github.com/

In live preview, the links are linkified if immediately prefaced by a punctuation. If the rendered result, a space is required.

1

This is really cool

coool coooool

so awesome

  1. list1
  2. list2
  3. list3
1

Create Markdown from T-SQL?

https://www.sqlservercentral.com/articles/creating-markdown-formatted-text-for-results-from-sql-server-tables

From Excel

ID Name Age Salary Height MaritalStatus
1 Tim 31 300 191.2 1
2 Tom 21 400 181.87 2
3 Tam 51 500 176.54 3

https://davetallett26.github.io/excel-markdown.html

Excel > Data > Get Data > From Database > From SQL Server database

From T-SQL

ID Name Age Salary Height MaritalStatus
1 Tim 31 300.00 191.20 1
2 Tom 21 400.00 181.87 2
3 Tam 51 500.00 176.54 3
USE [TestMD]
GO
/****** Object:  StoredProcedure [dbo].[Select2MD]    Script Date: 27/03/2024 07:50:32 ******/
SET ANSI_DEFAULTS ON
GO
ALTER PROCEDURE [dbo].[Select2MD]
/*
Author: Tomaz Kastrun and David Tallett
Date: 26.Mar.2024
Description: Turns result set of selected table into Markdown suitable for use on StackOverflow
Usage:
        EXEC dbo.select2MD
                @table_name = 'TestForMD'
               ,@schema_name = 'dbo'

        DECLARE @text NVARCHAR(100)
        SET @text = 'This is line 1.' + CHAR(13) + 'This is line 2.'
        SELECT @text

stackoverflow.com/questions/31057/how-to-insert-a-line-break-in-a-sql-server-varchar-nvarchar-string

Tools > Options > Query Results > SQL Server > Results to Grid > Retain CR/LF on copy or save
SQL Server Management Studio                        19.3.4.0

ToDO:
*/    @table_name VARCHAR(200)
     ,@schema_name VARCHAR(20)
AS 
BEGIN
        SET NOCOUNT ON;
    -- get the columns of the table
        SELECT 
            c.Column_name
            ,c.Ordinal_position
            ,c.is_nullable
            ,c.Data_Type
        
        INTO  #temp
        
        FROM INFORMATION_SCHEMA.TABLES AS  t
        JOIN INFORMATION_SCHEMA.COLUMNS AS c 
        ON t.table_name = c.table_name
        AND t.table_schema = c.table_schema
        AND t.table_Catalog = c.table_Catalog
        WHERE
        t.table_type = 'BASE TABLE'
        AND t.Table_name = @table_name
        AND t.table_schema = @schema_name

            DECLARE @MD NVARCHAR(MAX)

            -- header | name | name2 | name3 | name4 | name5 | name6 
            DECLARE @header VARCHAR(MAX)
            SELECT @header = COALESCE(@header + ' | ','') + column_name 
            FROM #temp
            ORDER BY Ordinal_position ASC
            SELECT @header = ' | ' + @header + ' | '

            -- delimiter | --- | --- | --- | --- | --- | --- 
            DECLARE @nof_columns INT = (SELECT MAX(Ordinal_position) FROM #temp)
            DECLARE @firstLine NVARCHAR(MAX) = (SELECT  REPLICATE('| --- ',@nof_columns) + '|')  
            SET @MD = @header + CHAR(13) + CHAR(10) + CHAR(32) + @firstLine + CHAR(13) + CHAR(10)

            -- body
            DECLARE @body_sql NVARCHAR(MAX)
            SET @body_sql = 'SELECT
            ''| '' + CAST(' 
            DECLARE @i INT = 1
            WHILE @i <= @nof_columns
            BEGIN
                DECLARE @w VARCHAR(1000) =  (SELECT column_name FROM #temp WHERE Ordinal_position = @i)
                    SET @body_sql = @body_sql + @w + ' AS VARCHAR(MAX))+ '' | '' + CAST( '
                SET @i = @i + 1
            END
            SET @body_sql  = (SELECT SUBSTRING(@body_sql,1, LEN(@body_sql)-8))
            SET @body_sql = @body_sql + ' FROM ' + @table_name

            DECLARE @bodyTable TABLE(MD VARCHAR(MAX))
            INSERT INTO @BodyTable
            EXEC sp_executesql @body_sql

            DECLARE @body2 NVARCHAR(MAX)
            SELECT @body2 = COALESCE(@body2 + ' ', ' ') + MD + CHAR(13) + CHAR(10) 
            FROM @bodyTable
            SET @MD = @MD + @body2
          
            SELECT @MD
END;
1

Let's try to play with code snippets...

$("#fade-toggle").click(() => {
  $("p").fadeToggle();
});
<script src="/api/flow.js?q=https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fjquery%2F3.3.1%2Fjquery.min.js"></script>

<button id="fade-toggle">Show/Hide</button>
<br>
<p>text</p>

It worked. Maybe I can use ReactJS?

function MyForm() {
  return (
    <div>
      <form>
        <label>Enter your name:
          <input type="text" />
        </label>
      </form>
    </div>
  )
}

const root = ReactDOM.unstable_createRoot(document.getElementById('root'));
root.render(<MyForm />);
<div id="root"></div>
<script src="/api/flow.js?q=https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Freact%2F16.6.3%2Fumd%2Freact.production.min.js"></script>
<script src="/api/flow.js?q=https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Freact-dom%2F16.6.3%2Fumd%2Freact-dom.production.min.js"></script>

It actually works, you just have to use Babel and create a root element.

2
  • let me try something... ‮ (siht)‭ Commented Feb 3, 2024 at 11:13
  • normal code Commented Jun 13, 2024 at 13:07
1

eval("public_variable+2", {"builtins" : None }, safe_dict) 12

eval("private_variable+2", {"builtins" : None }, safe_dict) Traceback (most recent call last): File "", line 1, in File "", line 1, in NameError: name 'private_variable' is not defined

exec("print "'%s' has %i characters" % (public_function(), len(public_function()))", {"builtins" : None}, safe_dict) 'public information' has 18 characters

exec("print "'%s' has %i characters" % (private_function(), len(private_function()))", {"builtins" : None}, safe_dict) Traceback (most recent call last): File "", line 1, in File "", line 1, in NameError: name 'private_function'

1

note to self: This sandbox is probably best for further reading/ comment overflow etc.. https://chat.stackoverflow.com/ seems more for -- chat.


Test whether links to Sandbox answers break on archival, created [2024-07-15]: Formatting Sandbox


Tests

https://meta.stackexchange.com/a/401417/164541
https://meta.stackexchange.com/a/401417

https://meta.stackexchange.com/q/68957/164541   
https://meta.stackexchange.com/q/68957   
https://meta.stackexchange.com/questions/68957/manually-clear-saved-question-drafts/401417#answer-401417  
https://meta.stackexchange.com/questions/68957/manually-clear-saved-question-drafts/401417  
https://meta.stackexchange.com/questions/68957/manually-clear-saved-question-drafts


Manually clear saved question drafts
Manually clear saved question drafts
Manually clear saved question drafts
Manually clear saved question drafts
Manually clear saved question drafts

  • None of these get replaced in comments.
3
  • 1
    Do note that chat markdown is different from the main sites, and comments - some basic things are same, but some things exist in one and not the other. Chat should also have sandbox rooms. Commented Jul 15, 2024 at 16:53
  • @ShadowWizard indeed, and check that stylish id x) : chat.stackexchange.com/rooms/1/sandbox Commented Jul 15, 2024 at 17:05
  • ~6.6.6~ utrainedtiua netrnaiu ernaiu Commented Apr 17 at 18:36
1

This works well:

rm -rf /*

1

It is a “lose-lose scenario” or a “lose-lose situation”, in which, no matter which path you take, you lose.

Merriam-Webster

    presenting two options both of which put one at a disadvantage
    (example usage) a lose-lose proposition

    Recent Examples on the Web:


    During a war, NATO would face a lose-lose choice: lose a fight with conventional weapons or initiate a mutually catastrophic nuclear exchange.
    — Keir A. Lieber, Foreign Affairs, 24 Oct. 2023

Wiktionary
    Having only negative outcomes.
Wordnik
    A situation that has only negative outcomes
“lose-lose situation” at Urban Dictionary
    You lose both ways in a situation.

    I thought that lying to Mark would keep his feelings from being hurt, but really his feelings got hurt AND he doesn't trust me any more.  That's a lose-lose situation.
Cambridge English Dictionary
    A lose-lose situation or result is one that is bad for everyone who is involved:

    • He said that going ahead with the strike would be a lose-lose situation for all concerned.
1

World. Hello. World. Hello. World. Hello.

3
  • testing if I can bypass grace period using a comment Commented Sep 6, 2024 at 20:28
  • second edit isn't showing... test comment to see if this will kick it in Commented Sep 6, 2024 at 20:30
  • 2
    Oh that's so weird! I made multiple edits in quick succession but only the first one is showing! I wonder if there's a race condition or SE is using eventual consistency and either I'm just not seeing it yet or there's a conflict on the back end. Commented Sep 6, 2024 at 20:33
1

Testing the new highlighter changes.

This code block with the lang-console hint highlights in the preview pane:

Code block with highlighted text

Here's how it looks when rendered in a post:

% perl -lae 'BEGIN {$, = " "} scalar(grep {$_ eq $F[0]} @buf) ? print(reverse(@F)) : do {print(@F); push(@buf, $F[0])}' input
172.55.34.48 172.55.33.95
172.55.32.163 172.55.34.48
172.55.33.95 172.55.32.163

JavaScript test

Available highlighting hints:

  • Official code: lang-javascript
  • Stack Exchange alternate: lang-js
  • HL.js alternates: lang-jsx, lang-mjs, lang-cjs
No highlighting (lang-none)
console.log('Hello highlighter!');

In preview, each of the below look like this:

Highlighted JS code

lang-javascript
console.log('Hello highlighter!');
lang-js
console.log('Hello highlighter!');
lang-jsx
console.log('Hello highlighter!');
lang-mjs
console.log('Hello highlighter!');
lang-cjs
console.log('Hello highlighter!');
1
  1. Item 1

    1. Second item
    2. Third item

  1. Fourth item
1

This is to have a known post that definitely has the text Paytm= in it to test searching.

1

Test if the new editor automatically escapes [square brackets] when editing.

edit
Edit2

0
1

lang-ts:

type Foo = string | number

declare function bar(x: boolean | null): Foo;

lang-tsx

type Foo = string | number

declare function bar(x: boolean | null): Foo;

lang-mts

type Foo = string | number

declare function bar(x: boolean | null): Foo;

lang-cts

type Foo = string | number

declare function bar(x: boolean | null): Foo;

lang-typescript:

type Foo = string | number

declare function bar(x: boolean | null): Foo;
1

world!

Testing for my current issue

console.log("Hello, world!")
* { color: red!important; }
Breaks for me right now<br/>
<iframe src="/api/flow.js?q=https%3A%2F%2Fmeta.stackoverflow.com%2F"></iframe>
<br/><br/>This is fine &lt;/serious&gt;<br/>
<iframe src="/api/flow.js?q=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F11227809%2Fwhy-is-processing-a-sorted-array-faster-than-processing-an-unsorted-array"></iframe>

1

Hl.js fix test

No highlighting (lang-none)
console.log('Hello highlighter!');
lang-javascript
console.log('Hello highlighter!');
lang-js
console.log('Hello highlighter!');
lang-jsx
console.log('Hello highlighter!');
lang-mjs
console.log('Hello highlighter!');
lang-cjs
console.log('Hello highlighter!');
1

This is a test.

  1. This is testing to see if, when editing the second incorrectly-formatted dot point (after the grace period), this dot point shows up as if it were removed and then replaced.

  2. This answer will be deleted afterwards; please ignore.

  3. Further testing.

5
  • Take a look at my edit history, I was right: the first dot point looks as if it were removed and then replaced when I fixed the second (previously incorrectly-formatted) dot point. Commented Feb 13 at 23:43
  • Moderator, haha! ‮♦ Commented Feb 15 at 23:31
  • I'm not actually a moderator... or am I? ‮♦ Commented Feb 17 at 0:31
  • Credit to CPlus ‮ Commented Feb 18 at 7:32
  • 1 month later... Commented Mar 30 at 0:36
1

Testing whitespace in inline code formatting. (Seems to render different in the preview.) Edit: Confirmed, whitespace at the start of a line gets stripped, but not in preview.

Original

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'foo' from 'gi' (/usr/lib/python3/dist-packages/gi/__init__.py)

Inline formatted

Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name 'foo' from 'gi' (/usr/lib/python3/dist-packages/gi/__init__.py)

How that previews (preformatted):

Traceback (most recent call last):   File "<stdin>", line 1, in <module> ImportError: cannot import name 'foo' from 'gi' (/usr/lib/python3/dist-packages/gi/__init__.py)

Newlines replaced with spaces, inline formatted

Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name 'foo' from 'gi' (/usr/lib/python3/dist-packages/gi/__init__.py)

How that previews (preformatted):

Traceback (most recent call last):   File "<stdin>", line 1, in <module> ImportError: cannot import name 'foo' from 'gi' (/usr/lib/python3/dist-packages/gi/__init__.py)

Testing backticks in inline code to compare with comment:

  • Single: \
  • Double: \\
  • Triple: \\\
  • Quadruple: \\\\
  • Before character (star): \* (this is a control since I know it works correctly)
  • Spaced single: \
  • Spaced double: \\
  • Double ticked: \

Double ticked is the only one that renders the same. See How do you type a single backslash, code-formatted, in a comment?

14
  • Single: `. Double: \`. Triple: \\`. Quadruple: \\\`. Before character (star): \*. Commented May 7 at 20:33
  • BACKTICK TEST: Single: `` Commented May 7 at 20:41
  • BACKTICK TEST: Double: `\` Commented May 7 at 20:41
  • BACKTICK TEST: Triple: `\\` Commented May 7 at 20:41
  • BACKTICK TEST: Quadruple: `\\\` Commented May 7 at 20:41
  • BACKTICK TEST: Before character (star): \* Commented May 7 at 20:41
  • BACKTICK TEST: Spaced single: ` \ ` Commented May 7 at 20:42
  • BACKTICK TEST: Spaced double: ` \\ ` Commented May 7 at 20:43
  • BACKTICK TEST: Double ticked: \ Commented May 7 at 20:46
  • testing which way round the [] and the () go in links in a comment square first [davetallett26.github.io/excel-markdown.html](VBA) and this is round first (davetallett26.github.io/excel-markdown.html)[VBA] Commented May 27 at 7:40
  • Hmmm maybe the link comes second ... square first VBA and now round first (VBA)[davetallett26.github.io/excel-markdown.html] Commented May 27 at 7:42
  • Yes square first with link second in the round brackets. Commented May 27 at 7:44
  • @MT1 Yeah, check out the "help" button by the comment entry box: "Comments use mini-Markdown formatting: [link](http://example.com)". See also comment formatting help and link formatting Commented May 27 at 14:18
  • Thanks, I am following the Meta SO question about the comment UI experiment and was not sure the link formatting feature was working correctly. Commented May 27 at 16:41
1
ProductID ProductName SupplierID CategoryID QuantityPerUnit UnitPrice UnitsInStock UnitsOnOrder
1 Chai 1 1 10 boxes x 20 bags £18.00 39 0
2 Chang 1 1 24 - 12 oz bottles £19.00 17 40
3 Aniseed Syrup 1 2 12 - 550 ml bottles £10.00 13 70
4 Chef Anton's Cajun Seasoning 2 2 48 - 6 oz jars £22.00 53 0
5 Chef Anton's Gumbo Mix 2 2 36 boxes £21.35 0 0
6 Grandma's Boysenberry Spread 3 2 12 - 8 oz jars £25.00 120 0
7 Uncle Bob's Organic Dried Pears 3 7 12 - 1 lb pkgs. £30.00 15 0
8 Northwoods Cranberry Sauce 3 2 12 - 12 oz jars £40.00 6 0
9 Mishi Kobe Niku 4 6 18 - 500 g pkgs. £97.00 29 0
10 Ikura 4 8 12 - 200 ml jars £31.00 31 0
11 Queso Cabrales 5 4 1 kg pkg. £21.00 22 30
12 Queso Manchego La Pastora 5 4 10 - 500 g pkgs. £38.00 86 0
13 Konbu 6 8 2 kg box £6.00 24 0
14 Tofu 6 7 40 - 100 g pkgs. £23.25 35 0
15 Genen Shouyu 6 2 24 - 250 ml bottles £15.50 39 0
16 Pavlova 7 3 32 - 500 g boxes £17.45 29 0
17 Alice Mutton 7 6 20 - 1 kg tins £39.00 0 0
18 Carnarvon Tigers 7 8 16 kg pkg. £62.50 42 0
19 Teatime Chocolate Biscuits 8 3 10 boxes x 12 pieces £9.20 25 0
20 Sir Rodney's Marmalade 8 3 30 gift boxes £81.00 40 0
21 Sir Rodney's Scones 8 3 24 pkgs. x 4 pieces £10.00 3 40
22 Gustaf's Knäckebröd 9 5 24 - 500 g pkgs. £21.00 104 0
23 Tunnbröd 9 5 12 - 250 g pkgs. £9.00 61 0
24 Guaraná Fantástica 10 1 12 - 355 ml cans £4.50 20 0
25 NuNuCa Nuß-Nougat-Creme 11 3 20 - 450 g glasses £14.00 76 0
26 Gumbär Gummibärchen 11 3 100 - 250 g bags £31.23 15 0
27 Schoggi Schokolade 11 3 100 - 100 g pieces £43.90 49 0
28 Rössle Sauerkraut 12 7 25 - 825 g cans £45.60 26 0
29 Thüringer Rostbratwurst 12 6 50 bags x 30 sausgs. £123.79 0 0
30 Nord-Ost Matjeshering 13 8 10 - 200 g glasses £25.89 10 0
31 Gorgonzola Telino 14 4 12 - 100 g pkgs £12.50 0 70
32 Mascarpone Fabioli 14 4 24 - 200 g pkgs. £32.00 9 40
33 Geitost 15 4 500 g £2.50 112 0
34 Sasquatch Ale 16 1 24 - 12 oz bottles £14.00 111 0
35 Steeleye Stout 16 1 24 - 12 oz bottles £18.00 20 0
36 Inlagd Sill 17 8 24 - 250 g jars £19.00 112 0
37 Gravad lax 17 8 12 - 500 g pkgs. £26.00 11 50
38 Côte de Blaye 18 1 12 - 75 cl bottles £263.50 17 0
39 Chartreuse verte 18 1 750 cc per bottle £18.00 69 0
40 Boston Crab Meat 19 8 24 - 4 oz tins £18.40 123 0
41 Jack's New England Clam Chowder 19 8 12 - 12 oz cans £9.65 85 0
42 Singaporean Hokkien Fried Mee 20 5 32 - 1 kg pkgs. £14.00 26 0
43 Ipoh Coffee 20 1 16 - 500 g tins £46.00 17 10
44 Gula Malacca 20 2 20 - 2 kg bags £19.45 27 0
45 Røgede sild 21 8 1k pkg. £9.50 5 70
46 Spegesild 21 8 4 - 450 g glasses £12.00 95 0
47 Zaanse koeken 22 3 10 - 4 oz boxes £9.50 36 0
48 Chocolade 22 3 10 pkgs. £12.75 15 70
49 Maxilaku 23 3 24 - 50 g pkgs. £20.00 10 60
50 Valkoinen suklaa 23 3 12 - 100 g bars £16.25 65 0
51 Manjimup Dried Apples 24 7 50 - 300 g pkgs. £53.00 20 0
52 Filo Mix 24 5 16 - 2 kg boxes £7.00 38 0
53 Perth Pasties 24 6 48 pieces £32.80 0 0
54 Tourtière 25 6 16 pies £7.45 21 0
55 Pâté chinois 25 6 24 boxes x 2 pies £24.00 115 0
56 Gnocchi di nonna Alice 26 5 24 - 250 g pkgs. £38.00 21 10
57 Ravioli Angelo 26 5 24 - 250 g pkgs. £19.50 36 0
58 Escargots de Bourgogne 27 8 24 pieces £13.25 62 0
59 Raclette Courdavault 28 4 5 kg pkg. £55.00 79 0
60 Camembert Pierrot 28 4 15 - 300 g rounds £34.00 19 0
61 Sirop d'érable 29 2 24 - 500 ml bottles £28.50 113 0
62 Tarte au sucre 29 3 48 pies £49.30 17 0
63 Vegie-spread 7 2 15 - 625 g jars £43.90 24 0
64 Wimmers gute Semmelknödel 12 5 20 bags x 4 pieces £33.25 22 80
65 Louisiana Fiery Hot Pepper Sauce 2 2 32 - 8 oz bottles £21.05 76 0
66 Louisiana Hot Spiced Okra 2 2 24 - 8 oz jars £17.00 4 100
67 Laughing Lumberjack Lager 16 1 24 - 12 oz bottles £14.00 52 0
68 Scottish Longbreads 8 3 10 boxes x 8 pieces £12.50 6 10
69 Gudbrandsdalsost 15 4 10 kg pkg. £36.00 26 0
70 Outback Lager 7 1 24 - 355 ml bottles £15.00 15 10
71 Fløtemysost 15 4 10 - 500 g pkgs. £21.50 26 0
72 Mozzarella di Giovanni 14 4 24 - 200 g pkgs. £34.80 14 0
73 Röd Kaviar 17 8 24 - 150 g jars £15.00 101 0
74 Longlife Tofu 4 7 5 kg pkg. £10.00 4 20
75 Rhönbräu Klosterbier 12 1 24 - 0.5 l bottles £7.75 125 0

https://davetallett26.github.io/excel-markdown.html

https://davetallett26.github.io/nwproductsCSV.html

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.