text:
Is this string a palindrome (in Morse Code)?
Challenge
Inspired by this video.
As you may know, a palindrome is a word that is spelled the same forward as it is backward. The word "PULP" is not a palindrome, but when translated into Morse Code (with the spacing between letters removed), "PULP" becomes ".--...-.-...--." which is a palindrome. Your task is to write a program or function which takes a string and returns whether that word is a palindrome in International Morse Code.
A: .-
B: -...
C: -.-.
D: -..
E: .
F: ..-.
G: --.
H: ....
I: ..
J: .---
K: -.-
L: .-..
M: --
N: -.
O: ---
P: .--.
Q: --.-
R: .-.
S: ...
T: -
U: ..-
V: ...-
W: .--
X: -..-
Y: -.--
Z: --..

Rules
Input
Input can be taken in any reasonable format. The input string will contain only letters in any case you prefer. The string will not contain spaces, numbers, or punctuation.
Output
Your program should output 1 of 2 constant distinct results based on whether the input is a palindrome, e.g. True/False, 1/0, HOTDOG/NOTHOTDOG
Scoring
This is code-golf so shortest answer in bytes wins. Standard loopholes are forbidden.
Test Cases

Input
Output

"PULP"
True

"RESEARCHER"
True

"HOTDOGS"
True

""
True

"A"
False

"RACECAR"
False

"PROGRAMMING"
False

"PUZZLES"
False

related

Only my vote is a hammer, I'd VTC this as a dupe of the challenge Luis linked; the bulk of most solutions is going to be converting the input to Morse code.

It looks like all the solutions are just a Morse code mappings with a "same as reverse" check tacked on, so I'm closing as a duplicate.

It's a shame this is closed as a duplicate, since the duplicate-target has specified (a) that input is from the standard input (disallowing functions) and (b) one must leave non [A-Z]|[A-z]|[0-9] as they are in the input. Together these make some answers here less than trivial to port.

Oh man - it looks like I hammer open too! I thought I just made a single vote. I've hammered it closed again, but feel maybe it shouldn't be.

(c) the digits have a pattern to exploit.

I went ahead and ported my answer here to the target (here). It was not all that trivial, but porting back would be I guess.

Jelly, 28 bytes
ØAŻŻ“¡9o|çṫ¡X1ỴỌġQ’œ?iⱮḃ2FŒḂ

Try it online!
ØA                             The uppercase alphabet.
  ŻŻ                           Prepend two zeroes.
    “¡9o|çṫ¡X1ỴỌġQ’œ?          Get the 73540211105102870315464559332nd permutation.
                                  (= “ETIANMSURWDKGOHVF0L0PJBXCYZQ”)
                     iⱮ        Find indices of input letters in this list.
                       ḃ2      Bijective base 2: map [1,2,3,4,5…] to
                                 [1], [2], [1,1], [1,2], [2,1], …
                         F     Flatten.
                          ŒḂ   Is palindrome?

I wrote this answer looking at one of these (read the rows from right-to-left, and you get my magic string!):

73,540,211,105,102,870,315,464,559,332nd... what?! How did you find that number? Also how does that not take forever to run?

@MagicOctopusUrn Basically, it's an encoding of the order of the letters in that string relative to the order 00ABCDEFGHIJKLMNOPQRSTUVWXYZ. Jelly has built-ins to convert a permutation into such a number, and such a number back into the permutation. See factorial number base on Wikipedia.

That is the coolest thing I've seen in a long time! So basically with factorials you can "know" where the permutation will lie, because the permutations are done in a specific order. Is that a constant time access? Linear? Log? Something else entirely?

@MagicOctopusUrn Linear time: Python program to compute the 73540211105102870315464559332nd permutation of 00ABCDEFGHIJKLMNOPQRSTUVWXYZ

Jelly,  35 32 27  25 bytes
-2 thanks to Dennis (shift the permutation to avoid %32)
Oị“¡\ḣḶɼz3ç³ƝMƒ§’Œ?¤ḃ2FŒḂ

Takes input in upper-case; output is 1 for true, 0 for false.
Try it online! Or see the test-suite.
How?
Oị“...’Œ?¤ḃ2FŒḂ - Link: list of characters (in [A-Za-z]), S   e.g. 'FoOl'
O               - to ordinals                                      [70,111,79,108]
 %32            - modulo by 32 (A->1, a->1, ...)                   [6,15,15,12]
         ¤      - nilad followed by link(s) as a nilad:
  “...’         -   base 250 literal = 41482574787853596522350494865
       Œ?       -   first permutation of [1,N] which resides at that
                -   index when all permutations of [1,N] are sorted
                -   = [8,16,10,24,26,27,18,20,4,23,25,11,1,17,13,15,3,22,12,19,6,5,14,21,28,9,7,2]
                - index into (modular-indexing & vectorises)       [17,14,14,19]
          ḃ2    - to bijective base 2 (vectorises)                 [[1,1,2,1],[2,2,2],[2,2,2],[1,2,1,1]]
            F   - flatten                                          [1,1,0,1,0,0,0,0,0,0,1,0,1,1]
             ŒḂ - is palindromic?                                  1

Previous 35 byte solution (also takes input in upper-case)...
ØẠḣ29“...’œ?iⱮ⁸d⁴BnⱮ/€FŒḂ - Link: list of characters (in [A-Z] only), S
ØẠ                        - alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
  ḣ29                     - head to index 29 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabc'
     “...’                - base 250 literal = 1222276956185766767980461920692
          œ?              - permutation at index = 'EAIWRUSJPaLbFVHcTNMDKGOBXCYZQ'
              ⁸           - chain's left argument = S       e.g. 'FOOL'
             Ɱ            - map with:
            i             -   first index of (char in 'EAI...')  [13,23,23,11]
                ⁴         - literal 16                           16
               d          - divmod                               [[0,13],[1,7],[1,7],[0,11]]
                 B        - to binary (vectorises)               [[[0],[1,1,0,1]],[[1],[1,1,1]],[[1],[1,1,1]],[[0],[1,0,1,1]]]
                     €    - for each:
                    /     -   reduce by:
                   Ɱ      -     map with:
                  n       -       not equal                      [[1,1,0,1],[0,0,0],[0,0,0],[1,0,1,1]]
                      F   - flatten                              [1,1,0,1,0,0,0,0,0,0,1,0,1,1]
                       ŒḂ - is palindromic?                      1

Python 3, 172 148 104 bytes
First code golf ever.  Please be kind and offer any help :)
This is based off the C# answer: https://codegolf.stackexchange.com/a/175126/83877.  I took the same ideas and applied it to Python 3.  I tried my best to golf-ify the code, but I am sure there is a lot more I can do.
EDIT 1: Thanks @Stephen and @Cowabunghole for helping me remove some whitespace and unnecessary code.
EDIT 2: Thanks @JoKing for the suggestion to do it in binary. This is a really neat trick where '-' and '.' are not even necessary.  This led to a huge byte decrease.
Solution
def b(w):x=''.join(map(lambda c:bin('  ETIANMSURWDKGOHVF L PJBXCYZQ'.index(c))[3:],w));return x==x[::-1]

Try it online!

Welcome to PPCG! Here's 152 bytes with whitespace golfed off: Try it online!

A couple of tips to save a few characters: Remove whitespace everywhere you can. For example, you can change while i > 0: to while i>0: to save 2 bytes. Also, I could be wrong but I think you can do away with the > 0 altogether and just use while i:. Second, the statement in the while loop can go on the same line as the while, saving the newline and indentation. Last, this is terrible advice everywhere except when code golfing, but if you use Python 2 instead of Python 3, you can save 1 byte from using / instead of // for division.

Oh, also, you can use ~-i instead of i-1. This is the same number of bytes, but you can then omit the parentheses which saves 2 bytes.

Thank you @Cowabunghole. Two very useful suggestions.

Wow @JoKing, that is awesome! You should post that one instead. It so much more clever, that I don't want to take credit for it.

Dyalog APL, 24 bytes
⎕CY'dfns'
⎕←(⌽≡⊢)∊morse⍞

Try it online!
dfns never ceases to amaze

MBASIC, 325 bytes
First attempt, before the big guns get here :-)
1 DATA .-,-...,-.-.,-..,.,..-.,--.,....,..,.---,-.-,.-..,--,-.,---,.--.,--.-,.-.,...,-,..-,...-,.--,-..-,-.--,--..
2 DIM C$(26):FOR I=1 TO 26:READ C$(I):NEXT:INPUT T$:FOR I=1 TO LEN(T$):N=ASC(MID$(T$,I,1))-64:S$=S$+C$(N):NEXT:L=LEN(S$):FOR I=1 TO L:IF MID$(S$,I,1)<>MID$(S$,(L+1)-I,1) THEN 4
3 NEXT:PRINT"True":END
4 PRINT"False

Output
? PULP
True

? RESEARCHER
True

? HOTDOGS
True

?
True

? A
False

? RACECAR
False

? PROGRAMMING
False

? PUZZLES
False

JavaScript (Node.js), 111 bytes
x=>(u=[...x.replace(/./g,_=>"**ETIANMSURWDKGOHVF*L*PJBXCYZQ".indexOf(_).toString(2).slice(1))])+''==u.reverse()

Try it online!

Perl 6, 87 bytes
{$_ eq.flip}o*.trans(/./=>{S/.//}o{'  ETIANMSURWDKGOHVF L PJBXCYZQ'.index($/).base(2)})

Try it online!
Converts the word to a series of 1s and 0s and checks if it is palindromic.
Explanation:
             *.trans(/./=>  # Translate each letter of the input to
                                   '...'.index($/)   # The index of the letter in the lookup string
                                                  .base(2)  # Converted to binary
                          {S/.//}o{                       } # With the first digit removed
{$_ eq.flip}o   # Return if the string is equal to its reverse

Wolfram Language (Mathematica), 107 bytes
PalindromeQ[##2&@@@(IntegerDigits[Tr@StringPosition[" ETIANMSURWDKGOHVF L PJBXCYZQ",#],2]&/@Characters@#)]&

Try it online!
Similar to this Jelly answer: we think of Morse code as binary, and write down a string " ETIANMSURWDKGOHVF L PJBXCYZQ" where the position of a character, in binary, gives us its Morse code. But with an extra 1 prepended because we want to distinguish S = 000 and H = 0000, for instance. Then ##2&@@@ simultaneously gets rid of this leading 1 and flattens.

Huh, I would've expected Wolfram Language to have a Morse code built-in.  Or does it have one, but it's too verbose?

I couldn't find one. (And the documentation includes example code for some audio commands which hard-codes Morse code, which I wouldn't expect if a built-in existed.)

Pyth, 35 33 bytes
The code contains unprintable characters, so here's a hexdump.
00000000: 5f49 7358 7a47 632e 2207 0901 3f08 82ee  _IsXzGc."...?...
00000010: bd3f c256 9d54 c381 7dac 6590 37d3 c8f5  .?.V.T..}.e.7...
00000020: 52                                       R

Try it online. Test suite.
Explanation
Starting from ." the end of the code generates the Morse alphabet, with dots as \x08 and dashes as \x07, and separated by tabs.
c splits the string by the tabs.
XzG translates (X) the input (z) from the alphabet (G) to this "Morse alphabet".
s sums (joins) the Morse symbols together. For empty inputs, returns 0, but this is not a problem.
_I checks if the result does not change (I) when reversed (_). For empty input, checks if 0 does not change when negated.

PowerShell, 204 187 bytes
param($a);$a|% t*y|%{$b+=[convert]::ToString("  ETIANMSURWDKGOHVF L PJBXCYZQ".IndexOf($_),2).substring(1)};$c=($b=($b|% *ce 0 .|% *ce 1 -)).ToCharArray();[array]::Reverse($c);$b-eq-join$c

Try it online!
Errors on null string... Can anyone help with this?
Test code (After wrapping the code in a Script Block and assigned to variable $Z...):
$tests = @(
    "PULP", "True"
    "RESEARCHER", "True"
    "HOTDOGS", "True"
    "A", "False"
    "RACECAR", "False"
    "PROGRAMMING", "False"
    "PUZZLES", "False"
)
$outputs = @()
for($i = 0; $i -lt $tests.length/2; $i++){
    $output = New-Object "PSObject"
    $output  | Add-Member -MemberType NoteProperty -Name Name -Value "`"$($tests[2*$i])`""
    $output | Add-Member -MemberType NoteProperty -Name Expected -Value $tests[2*$i + 1]
    $output | Add-Member -MemberType NoteProperty -Name Result -Value $(&$Z -a $tests[2*$i])
    $outputs += $output
}
$outputs | Format-Table

Output:
Name          Expected Result
----          -------- ------
"PULP"        True       True
"RESEARCHER"  True       True
"HOTDOGS"     True       True
"A"           False     False
"RACECAR"     False     False
"PROGRAMMING" False     False
"PUZZLES"     False     False

Welcome to PPCG. It will be useful for you to look Tips for golfing in PowerShell

Retina 0.8.2, 87 bytes
[B-ILNPRSZ]
$&.
[AJKMOQT-Y]
$&-
}T`L`\EDKN_UMS\EWNRTTMWGAI_ISADKG
+`^(.)(.*)\1$
$2
^.?$

Try it online! Link includes test cases. Explanation:
[B-ILNPRSZ]
$&.

All the Morse codes for the letters in this set end with ..
[AJKMOQT-Y]
$&-

All the Morse codes for the letters in this set end with -.
T`L`\EDKN_UMS\EWNRTTMWGAI_ISADKG

Replace each letter with the letter whose Morse code is the prefix of that letter (here E and T are simply deleted via the unescaped _, but normally they would be turned into spaces). For instance, P is the Morse code for W with an extra . on the end; we added the . above so now all that remains is to decode the W.
}

Repeat the above stages until there are no letters left.
^(.)(.*)\1$
$2

If the first and last characters are the same, delete them both.
+`

Repeat for as many characters that match.
^.?$

If this was a palindrome, then there is at most one character left.

05AB1E, 37 bytes
v•1êÿµµÈ∞Ƶipδ8?a¡š%=тîδ/•3B0¡Aykè}JÂQ

Try it online!

Encodes the alphabet in base 3, converted to base 255:
12021110212102110101121022101111011012220212012110220210222012210221201210111020112011120122021120212202211

Base 255:
•1êÿµµÈ∞Ƶipδ8?a¡š%=тîδ/•

Then basically, I break it apart on the 0's, construct the string by position and check for palindrome.

C# (.NET Core), 191 bytes
a=>{var s="";int r=1,x=0,i;foreach(var t in a){var c="";for(i=" ETIANMSURWDKGOHVF L PJBXCYZQ".IndexOf(t);i>0;i/=2)c="-."[i--%2]+c;s+=c;}i=s.Length;for(;x<i;x++)r=s[x]==s[i-x-1]?r:0;return r;}

Try it online!
Part of this answer was adapted from Nick Larsen's morse code golf. Based on the comments on the answer, this could potentially be golfed further.
Ungolfed:
a => {
    var s = "";                 // initialize s
    int r = 1, x = 0, i;        // initialize r, x, and i

    /*
        This portion was adapted from Nick Larsen. He described it as follows:
            -- The string of characters is a heap in which the left child is a dot and the right child is a dash.
            -- To build the letter, you traverse back up and reverse the order.
        I have edited it to remove number support, which saves 34 bytes.
    */
    foreach(var t in a)
    {
        var c = "";
        for(i = " ETIANMSURWDKGOHVF L PJBXCYZQ".IndexOf(t); i > 0; i /= 2)
            c = "-."[i-- % 2] + c;
        s += c;
    }

    i = s.Length;               // reuse i and set to the length of the morse code string
    for(; x < i; x++)           // increment x until x reaches i
        r = s[x] == s[i - x - 1] ?      // if the xth character on the left side of s is equal to the xth character on the right side of s
                                    r :     // true: do not change r
                                        0;  // false: set r to zero (set to false)

    return r;
}

Scala 3, 121 bytes.
Golfed version. Try it online!
_.map(c=>Integer.toBinaryString("  ETIANMSURWDKGOHVF L PJBXCYZQ".indexOf(c)).substring(1)).mkString.pipe(x=>x==x.reverse)

Ungolfed version. Try it online!
object Main {
  def b(w: String): Boolean = {
    val x = w.map(c => Integer.toBinaryString("  ETIANMSURWDKGOHVF L PJBXCYZQ".indexOf(c)).substring(1)).mkString
    x == x.reverse
  }

  def main(args: Array[String]): Unit = {
    println(b("PULP"))
    println(b("RESEARCHER"))
    println(b("HOTDOGS"))
    println(b(""))
    println(b("A"))
    println(b("RACECAR"))
    println(b("PROGRAMMING"))
    println(b("PUZZLES"))
  }
}

GNU sed -E, 139 bytes
:r
s/[AFHIJLPRSUVW]/E&/g
s/[BCDGKMNOXYZ]/T&/g
y/ABCDFGHIJKLMNOPQRSUVWXYZ/TSRIRNSEOADTEMGKNIAUMUWD/
tr
:p
s/^(.)(.*)\1$/\2/
tp
/../c0
/0/!c1

This program transforms each line of input (must be upper-case) to either 1 (for a Morse palindrome) or 0 (otherwise).
The first loop (r=reduce) converts to Morse, represented using T for dash and E for dot (so we don't need to convert those two letters).
The second loop (p=palindrome) removes matching start and end characters.
If there are two or more symbols remaining, it's not a palindrome, so output 0.
If we didn't produce 0, then the result should be 1.

I did attempt to convert to an easier alphabet to work with (so we could use character ranges in the s command), but none saved enough to outweigh the conversion cost.


text:
Add All Permutations of a Number
You have to make something that takes in one input from a default I/O method (as an integer), and prints out the sum of all the permutations of that number (not necessarily unique)
For example:
10 would return 11 because 10 can have 2 permutations (10 and 01), and the sum of those two numbers would be 11
202 would have 6 permutations (202, 220, 022, 022, 202, 220), so the sum would be 888.
The input is positive, and the input can be taken as any type, but your program's output must be a number.
Standard loopholes are not allowed, and as usual, since this is code golf, the shortest answer in bytes wins!

Note: Peter Taylor pointed out a simplification of the challenge here. If you are reading this, you may want to think about it first to see if you can get the same (or shorter) solution.

Japt -x, 1 byte
Takes input as a string.
á

Try it

Explanation
á     :Get permutations
      :Implicitly reduce by addition and output

Doesn't the -x count as an extra byte?

@Zacharý No, here's the meta.

CJam, 10 6 bytes
{m!1b}

Try it online!
Explanation
{    }  Anonymous block taking input as string on stack
 m!     Find all permutations
   1b   Implicitly convert each to integer and sum

Can you add an explanation so I can decide whether to upvote or not?

@MilkyWay90 Added.

Okay! This seems like a trivial answer, so I will refrain from upvoting. However, still a great answer! Also, are CJam builtins always 2 bytes or is it just a few?

@MilkyWay90 Most builtins in CJam are one byte, but there are two groups of two-byte builtins (starting with e and m) for "extra" operations and "math" operations respectively. 1b is actually two different operations: 1 pushes the number 1, and b performs base conversion. 1b means "convert from base 1" but it has the effect of summing an array because b doesn't check that the array elements are actually valid digits. Normally one would take the sum with :+ (reduce with addition), but 1b has the advantage that it works on empty arrays and implicitly converts to integer.

Ah, I see. That does seem to be worth an upvote

Python 2, 66 bytes
n=s=0
P=1
for c in input():s+=int(c);n+=1;P*=n
print 10**n/9*s*P/n

Try it online!
Takes input as a string.

Python 2, 70 bytes
f=lambda k,P=1,n=0,s=0:f(k/10,P*-~n,n+1,s+k%10)if k else 10**n/9*s*P/n

Try it online!
An arithmetic method. The base case is hard to deal with because the /n causes division by zero for the inital value n=0.

05AB1E, 2 bytes
œO

Try it online!

What is the O? I know œ means permutations, but what does O mean? If you answer this, and the program follows the rules, I will accept this answer, because it has the smallest number of bytes.

@MilkyWay90 If œ is permutations, O ought to be sum. It's customary to wait at least a week before accepting an answer.

Perl 6, 30 bytes
*.comb.permutations>>.join.sum

Try it online!
It would be nice if this was just *.permutations.sum but Perl 6 doesn't treat strings as lists of characters.
Explanation
*.comb.permutations>>.join.sum
*.comb                           # Convert to list of digits
      .permutations              # Get all permutations of the list
                   >>.join       # Join all lists of digits
                          .sum   # Get the sum of all numbers

Nice job! I look forward to receiving more responses to this question! Since I am not familiar with Perl, the explanation was very useful!

@MilkyWay90 The name of the language is “Perl 6”. It is a sister language to “Perl 5”. Normally when people say “Perl” they mean “Perl 5”.

Python 2, 63 62 bytes
f=lambda n,k=1,s=0:n>9and k*f(n/10,k+1,s+n%10)or 10**k/9*(s+n)

Try it online!

R, 59 57 bytes
sum(gamma(n<-nchar(x<-scan()))*x%/%10^(0:n)%%10)*10^n%/%9

Try it online!
Mathematical approach suggested by Peter Taylor and decribed by Arnauld.
-2 bytes by J. Doe.

Trivial inline golf for 57

J-uby, 35 bytes
:digits|:permutation|:sum+(:join|Z)

Try it online!
-3 from Jordan.

You can replace :to_i with Z for -4 bytes.

J, 18 bytes
1#.(A.~i.@!@#)&.":

Try it online!
Explanation:
                ":  - convert to string
              &.    - do the verbs in () then convert back to number
       i.           - make a list from 0 to
         @!         - factorial
           @#       - of the number of digits in the input
    A.~             - find all permutations, using the list above as permutation index
1#.                 - find the sum by base-1 convertion

Alternative:
Using the formula suggested by Peter Taylor:
J, 30 bytes
1#.("."0*9%~!@<:@#*_1+10^#)@":

Try it online!

Haskell, 62 bytes
import Data.List
f::Int->Int
f=sum.map read.permutations.show

Unfortunately, f must be annotated with a type to avoid ambiguity.

Welcome to PPCG and Haskell golfing in particular! Your code works fine on TIO without the type annotations: Try it online!. Also anonymous functions are allowed, so you can drop the f=.

MY, 12 bytes
⍞℘⌊Σ88ǵ'ƒ⇥(↵

Try it online!
Some of MY's stupid builtin decisions are coming in handy.
⍞℘⌊Σ88ǵ'ƒ⇥(↵
⍞             Input
  ℘                's permutations
   ⌊                                as integers.
    Σ                                           Sum of that
     88ǵ'ƒ⇥(                                               to standard base 10 form
             ↵                                                                      output.

JavaScript (ES6), 53 bytes
Recursive version, inspired by @tsh.
f=(n,s=i=0,p='')=>n?(i++||1)*f(n/10|0,s+n%10,p+1):s*p

Try it online!

JavaScript (ES6), 61 60 bytes
Saved 1 byte thanks to @l4m2
n=>![...n+(x=s=p='')].map((d,i)=>(p+=1,x=x*i||1,s-=d))-s*p*x

Try it online!
How?
This is based on the formula suggested by Peter Taylor in the sandbox:
$$\left(\sum_{i=1}^n{a_i}\right)\frac{10^n-1}{9}(n-1)!$$
where \$a_i\$ is the \$i\$th digit of the input number and \$n\$ is the total number of digits.
The result of the expression \$(10^n-1)/9\$ is a number consisting of the digit \$1\$ repeated \$n\$ times, which is what is computed in \$p\$. The factorial is stored in \$x\$ and the opposite of the sum is stored in \$s\$.

n=>![...n+(x=s=p='')].map((d,i)=>(p+=1,x=x*i||1,s-=d))-s*p*x

f=(n,s=i=!n,p='')=>n?++i*f(n/10|0,s+n%10,p+1):s*p/i; if input > 0 then change !n to 0.

Python 2, 76 bytes
lambda x:sum(map(int,x))*int('1'*len(x))*reduce(int.__mul__,range(1,len(x)))

Try it online!
xnor's answer is shorter, but I thought I'd have a go at a one-liner

Scala (74 bytes)
def%(i:Int)=s"$i".indices.permutations.map(_.map(i+"").mkString.toInt).sum

Try it online
Since permutation on digits will drop the repeated digits, we have to permute on indices.

Jelly, 5 bytes
DŒ!ḌS

Try it online!

Charcoal, 12 bytes
Ｉ↨χＥθΠＥθ∨μΣθ

Try it online! Link is to verbose version of code. Explanation: Based on Peter Taylor's formula. ΠＥθμ doesn't quite calculate \$ (n - 1)! \$ as Charcoal's indices range from \$ 0 \$ to \$ n - 1 \$ so ∨ is used to replace the \$ 0 \$ with the sum of digits of the input, thus implicitly multiplying the two. The outer mapping then creates an array of the length of the original input with that product as elements which is then passed to base 10 conversion which effectively multiplies the product by the appropriate repunit.
    θ           Input
   Ｅ            Map over characters
       θ        Input
      Ｅ         Map over characters
         μ      Current index
        ∨       Logical Or
           θ    Input
          Σ     Digital sum
     Π          Product
  χ             Predefined variable 10
 ↨              Base conversion
Ｉ               Cast to string
                Implicitly print

Pyth, 5 4 bytes
sv.p

Try it online! Takes input as a string.
Explanation:
sv.pQ - Full program. Implicit Q added.

    Q - Input
  .p  - All permutations of it
 v    - Evaluate each (list of strings into integers)
s     - Sum the list

APL(NARS), 25 chars, 50 bytes
{+/10⊥⍉⍎¨w[110 1‼↑⍴w←⍕⍵]}

test:
  f←{+/10⊥⍉⍎¨w[110 1‼↑⍴w←⍕⍵]}
  f¨202 1024 505
888 46662 2220

110 1‼k would return as built in all the permutations of 1..k .

Pyt, 4 bytes
ǰᒆƖƩ

Try it online!
Explanation:
      Implicit input
ǰ     Join (becomes string)
 ᒆ    All permutations of it
  Ɩ   List of strings to int
   Ʃ  Sum the array

Python 2, 76 bytes
s=map(int,`input()`);n=len(s);t=sum(s)*int('1'*n)
while~-n:n-=1;t*=n
print t

Try it online!

C (gcc), 89 71 bytes
g(x,s,p,f,i){for(s=x%10,p=f=i=1;x/=10;s+=x%10)p=p*10+1,f*=i++;x=s*p*f;}

Try it online!
-18 bytes thanks to @nwellnhof

68 bytes

Ruby -nl, 41 bytes
p$_.chars.permutation.sum{|x|x.join.to_i}

Try it online!
Full program taking input from stdin.
Ruby, 45 bytes
->n{n.digits.permutation.sum{|x|x.join.to_i}}

Try it online!
Function taking input as integer. digits can be shortened to chars if input is acceptable as string, and chars can be completely removed if input is an array of characters.

Vyxal Ṡs, 3 bytes
ṖvI

Try it Online!

Brachylog, 3 bytes
pᶠ+

Try it online!
Explanation
 ᶠ     Find all:
p          permutations
  +    Sum

Husk, 4 bytes
ṁdPd

Try it online!
Explanation
ṁdPd
   d  digits of input
  P   get all permutations
ṁ     (flat/concat/sum)-map
 d    interpret as digits

Wolfram Language(Mathematica), 111 bytes
Try it online!
Total[FromDigits/@(Permutations[#]/.Thread[#->IntegerDigits@#2])]&[Unique[]&/@Range@Length@IntegerDigits@#, #]&

Appendix:
Don't allow duplicate(i.e. Multinomial Permutation) \$\quad \$ (50 bytes). Try it online!
Total[FromDigits/@Permutations[IntegerDigits[#]]]&

Racket -- 93 bytes
#!racket
(for/sum([l(permutations(string->list(~a(read))))])(string->number(apply string l)))

Try it online!

Explanation
User input is a number. We split the number into its individual digits and then we permutate the list of digits. We loop through all the permutations and rejoin them to form a number. Once we have iterated through the entire list, we return the sum of resulting numbers of the permutations.
#lang racket

(for/sum ([lst (permutations (string->list (~a (read))))])
  (string->number (apply string lst)))

Let's do an example with input 50.

Split input into separate digits: '(5 0)
Obtain all permutations of digits: '((5 0) (0 5))
Convert all permutations back into numbers: '(50 05) or '(50 5)
Once all permutations are numbers, add the numbers together: (+ 50 5)
Return the sum: 55

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Given a string, calculate the number of the column it corresponds to
In Excel, the columns range from A-Z, AA,AB,AZ,BA,..,BZ and so on. They actually each stand for numbers, but rather are encoded as alphabet strings.
In this challenge, you will be given a string of alphabets, and you must calculate the column it corresponds to.
Some tests:

'A' returns 1 (meaning that it is the first column)
'B' returns 2
'Z' returns 26
'AA' returns 27
'AB' returns 28
'AZ' returns 52
'ZZ' returns 702
'AAA' returns 703

You can assume that capital letters will be given only.
Shortest bytes win.
Good luck!

So... base 26 with the alphabet?

It isn't quite base 26 because there's no zero.

@J.Doe Ah, I guess you're right. I didn't notice since my solution automatically treated Z as 10 anyway

Reverse challenge.

@JoKing Bijective base.

I wonder if someone will come up with a solution in Excel.

Can we take input as an array/list of characters?

@Titus I don't have Excel or know it... but isn't there a COLUMN function that would do this?

Perl 6, 17 bytes
{:26[.ords X-64]}

Try it online!
Anonymous code block that subtracts 64 from each byte value and converts from base 26 with Z overflowing to the next column.

Google Sheets, 21 bytes
(formula evaluates to the result, takes input from cell A1)
=column(indirect(A1&2

Just about to post a slightly less golfed version of this.

I also have a solution in Google Sheets that doesn't rely on builtin COLUMN, check it out. (besides, I feel bad that the solution I put more effort on gets less attention... it's a typical problem with voting anyway, especially when the challenge is on HNQ.)

R, 48 43 bytes
-5 bytes thanks to @Giuseppe, using the same logic, but as a program that eliminates the nchar call.
for(i in utf8ToInt(scan(,"")))F=F*26+i-64;F

Try it online!

Java (JDK), 39 bytes
s->s.chars().reduce(0,(a,b)->a*26+b%32)

Try it online!

Which java platform supports this ?

@SyedHamzaHassan Java 8 or more.

05AB1E, 6 bytes
Çžx-₂β

Try it online!

Out of curiosity, why use žx instead of just 64?

I don't know, it looked nicer I guess?

Haskell, 38 34 31 bytes
foldl(\o->(o*26-64+).fromEnum)0

Try it online!

Python 2, 52 45 bytes
t=0
for c in input():t=26*t+ord(c)%64
print t

Try it online!

PHP, 41 38 bytes
-3 thanks to Jo King.
for($c=A;$c!=$argn;$i++)$c++;echo$i+1;

run as pipe with -nr
unary output, 34 bytes:
1<?for($c=A;$c!=$argn;$c++)echo 1;

requires PHP 7.1. save to file, run as pipe with -nF.

@Rogem check https://codegolf.meta.stackexchange.com/questions/2424/running-php-with-r-instead-of-code-tags

@Titus Alright then

Jelly, 7 bytes
ØAiⱮḅ26

Try it online!

APL(NARS), 11 chars, 22 bytes
{+/26⊥⎕A⍳⍵}

test
  f←{+/26⊥⎕A⍳⍵}
  f¨'A' 'AA' 'AAA'
1 27 703
  f¨'AB' 'ZZ' 'Z'
28 702 26

J, 11 bytes
26#.64|3&u:

Try it online!
How it works
26#.64|3&u:  Monadic verb. Input: a string.
       3&u:  Convert each character to Unicode codepoint
    64|      Modulo 64; maps A -> 1, ... Z -> 26
26#.         Interpret as base-26 digits and convert to single integer

APL (Dyalog Classic), 11 bytes
⎕A∘⍳⊥⍨26⍴⍨≢

Try it online!

Google Sheets, 100 bytes
(formula evaluates to the result, takes input from cell A1)
=sum(arrayformula(
  (
    code(
      mid(A1,row(indirect("1:"&len(A1))),1)
    )-64
  )*26^row(indirect("1:"&len(A1)))/26

All spaces are added for clarity only.
Note.

I don't know if it's possible to remove the duplication of row(indirect("1:"&len(A1)).
Although Google Sheets has a decimal function, the transliteration would takes a lot of bytes.

APL+WIN, 12 bytes
Index origin 1.
26⊥¯65+⎕av⍳⎕

Try it online! Courtesy of Dyalog Classic
Explanation:
⎕av⍳⎕ Prompts for input and gets Ascii integer value for each character

¯65+ subtracts 65 to give integers 1-26 for A-Z

26⊥ converts resulting vector from base 26 to single integer

Charcoal, 10 bytes
Ｉ↨²⁶ＥＳ⊕⌕αι

Try it online! Link is to verbose version of code. Explanation:
     Ｓ      Input string
    Ｅ       Map over characters
         ι  Current character
        α   Uppercase alphabet
       ⌕    Find index
      ⊕     Increment
  ²⁶        Literal 26
 ↨          Base conversion
Ｉ           Cast to string
            Implicitly print

C (gcc), 46, 43 bytes
a;f(int*s){for(a=0;*s;)a=*s++%64+a*26;s=a;}

Try it online!
Degolf
a; f(int*s)
{  for(a=0;*s;) // Loop through s, which is a null-terminated string.
       a=*s++%64 + a*26; // Multiply accumulated value by 26, and add current char modulo 64 to it.
   s=a;} // Return the accumulated value.

Japt -h, 10 bytes
åÈ*26+InYc

Try it
Or without a flag. The first byte can be removed if we can take input as a character array.
¬®c aIÃì26

Try it

Explanation
åÈ             :Cumulatively reduce by passing each character at Y through a function, with an initial total of 0
  *26          :  Multiply current total by 26
     -I        :  Subtract 64
       n       :   Subtracted from
        Yc     :    The codepoint of Y
               :Implicitly output the last element of the resulting array

MATL, 11 bytes
0w"26*@+64-

Try it online!

Kotlin, 36 bytes
{it.fold(0){o,n->o*26+n.toInt()-64}}

Try it online!

Ruby, 18 bytes
->s{[*?A..s].size}

Try it online!

x86 machine code, 19 bytes
00000000: 31c0 8b19 83e3 3f41 b21a f7e2 01d8 3831  1.....?A......81
00000010: 75f0 c3                                  u..

Assembly:
section .text
	global func
func:				;this function uses fastcall conventions
	xor eax, eax		;reset eax to 0
	loop:
		;ebx=*ecx%64
		mov ebx, [ecx]	;ecx is 1st arg to this func (in fastcall conventions)
		and ebx, 63	;because 64 is a pwr of 2,n%64=n&(64-1)

		;ecx++		get next char in str by incrementing ptr
		inc ecx

		;eax=eax*26
		mov dl, 26	;using an 8bit reg is less bytes
		mul edx

		;eax+=ebx //(eax=(*ecx%64)+(eax*26))
		add eax, ebx

		;if(*ecx!='\0')goto loop
		cmp byte [ecx], dh ;dh==0
		jne loop
	ret			;return value is in eax

Try it online!

JavaScript (Node.js), 48 bytes
f=([h,...t],p=0)=>h?f(t,p*26+parseInt(h,36)-9):p

Try it online!

.map() is 1 byte shorter. Using Buffer() saves another byte.

38 bytes, expanding on @Arnauld's suggestions.

Java (JDK), 92 bytes
static int m(String v){int x=0;for(int i=0;i<v.length();i++)x=x*26+v.charAt(i)-64;return x;}

Try it online!
Output

A=1
B=2
Z=26
AA=27
AB=28
AZ=52
ZZ=702
AAA=703

I'm not an expert at golfing Java, but you can golf this down considerably by returning instead of printing, simplifying the for loops, removing whitespace and getting rid of the p and n variables. 92 bytes!.

Wonderful.......

You can remove static to gain 7 bytes. You could also make this function a lambda to spare more bytes. I also think that the recursive version might save bytes. In any case, here's my 39 bytes solution.

That's Wonderful.

J, 20 bytes
[:(#.~26$~#)32|a.i.]

Try it online!
Explanation:
 [:(#.~26$~#)32|a.i.]
                  i.    - indices
                    ]   - of the characters of the input
                a.      - in the alphabet
             32|        - mod 32
 [:(        )           - apply the following code to the above
         $~             - create a list of (left and right arguments exchanged)
       26               - the number 26
           #            - repeated the length of the input times
    #.~                 - to base (26)

Kotlin, 29 bytes
{it.fold(0){a,v->v-'@'+a*26}}

Try it online!
Explained
val column: (String) -> Int = {  // String in, Int out
    it.fold(0) { a, v ->  // acc, value
        v - '@'  // distance of char from @ (A=1 etc.)
                + a * 26
    }
}

Ahead, 22 bytes
>jvi'@-\26l
^~>O@ ~+*<

Try it online!

MBASIC, 84 bytes
1 INPUT S$:L=LEN(S$):FOR I=1 TO L:V=ASC(MID$(S$,I,1))-64:T=T+26^(L-I)*V:NEXT:PRINT T

Output:
? AZ
 52

? ZZ
 702

? AAA
 703

Ruby -nl, 39 bytes
p$_.chars.reduce(0){|x,y|26*x+y.ord-64}

Try it online!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Maximize Sudoku King's tour
Background
Sudoku is a number puzzle where, given an \$ n \times n \$ grid divided into boxes of size \$ n \$, each number of \$ 1 \$ to \$ n \$ should appear exactly once in each row, column and box.
In the game of Chess, the King can move to any of (at most) 8 adjacent cells in a turn. "Adjacent" here means horizontally, vertically or diagonally adjacent.
The King's tour is an analogy of the Knight's tour; it is a (possibly open) path that visits every cell exactly once on the given board with Chess King's movements.
Task
Consider a 6-by-6 Sudoku grid:
654 | 321
123 | 654
----+----
462 | 135
315 | 246
----+----
536 | 412
241 | 563

and a King's tour (from 01 to 36):
01 02 03 | 34 35 36
31 32 33 | 04 05 06
---------+---------
30 23 28 | 27 26 07
22 29 24 | 25 09 08
---------+---------
21 19 16 | 10 14 13
20 17 18 | 15 11 12

The tour forms the 36-digit number 654654564463215641325365231214123321.
Taking a different King's tour gives larger numbers; for example, I can find a path that starts with 65<6>56446556... which is definitely greater than the above. You can change the Sudoku board to get even higher numbers:
... | ...
.6. | ...
----+----
..6 | ...
.5. | 6..
----+----
.45 | .6.
6.. | 5..

This incomplete board gives the starting sequence of 666655546... which is the optimal sequence of 9 starting digits.
Your task is to find the largest such number for standard 9-by-9 Sudoku with 3-by-3 boxes, i.e.
... | ... | ...
... | ... | ...
... | ... | ...
----+-----+----
... | ... | ...
... | ... | ...
... | ... | ...
----+-----+----
... | ... | ...
... | ... | ...
... | ... | ...

Note that this challenge is not code-golf; the focus is to actually find the solutions rather than to write a small program that theoretically works.
Scoring & winning criterion
The score of a submission is the 81-digit number found by your program. The submission with the highest score wins. Your program should also output the Sudoku grid and the King's tour in human-readable form; please include them in your submission.
Your program may output multiple results; your score is the maximum of them.
There's no time limit for your program. If your program continues to run and finds a higher number afterwards, you can update the submission's score by editing the post. Tiebreaker is the earliest time to achieve the score, i.e. either the time of post (if it's not edited yet) or the time of edit when the score was updated (otherwise).

On your self-nomination of this challenge for Best of PPCG, you mention that "This is probably the first [code-challenge] to ask directly for the optimized solution, rather than some score combined with code length or such." I just wanted to let you know that that's not true - there's Shortest Universal Maze Exit String which was posted in 2015.

Python + Z3, 999899898789789787876789658767666545355432471632124566352413452143214125313214321, optimal
Runs in about half an hour, producing
1 3 4 8 9 7 6 2 5
2 9 7 1 5 6 8 3 4
5 6 8 4 2 3 7 9 1
4 7 6 2 1 5 9 8 3
8 5 1 6 3 9 2 4 7
9 2 3 7 8 4 1 5 6
3 8 5 9 6 1 4 7 2
6 4 9 5 7 2 3 1 8
7 1 2 3 4 8 5 6 9
81 79 78 14 15 16 54 57 56
80 12 13 77 52 53 17 55 58
34 33 11 51 76 75 18  1 59
35 10 32 50 74 72  2 19 60
 9 36 49 31 73  3 71 61 20
 8 48 37 30  4 69 70 62 21
47  7 38  5 29 68 65 22 63
46 43  6 39 28 67 66 64 23
44 45 42 41 40 27 26 25 24
999899898789789787876789658767666545355432471632124566352413452143214125313214321

Code
import z3

def adj(a):
    x, y = a
    for x1 in range(max(0, x - 1), min(9, x + 2)):
        for y1 in range(max(0, y - 1), min(9, y + 2)):
            if (x1, y1) != a:
                yield x1, y1

solver = z3.SolverFor("QF_FD")

squares = list((x, y) for x in range(9) for y in range(9))
num = {(x, y): z3.Int(f"num{x}_{y}") for x, y in squares}
for a in squares:
    solver += 1 <= num[a], num[a] <= 9
for cells in (
    [[(x, y) for y in range(9)] for x in range(9)]
    + [[(x, y) for x in range(9)] for y in range(9)]
    + [
        [(x, y) for x in range(i, i + 3) for y in range(j, j + 3)]
        for i in range(0, 9, 3)
        for j in range(0, 9, 3)
    ]
):
    solver += z3.Distinct([num[x, y] for x, y in cells])
    for k in range(1, 10):
        solver += z3.Or([num[x, y] == k for x, y in cells])

move = {
    ((x0, y0), (x1, y1)): z3.Bool(f"move{x0}_{y0}_{x1}_{y1}")
    for x0, y0 in squares
    for x1, y1 in adj((x0, y0))
}
tour = {(x, y): z3.Int(f"tour{x}_{y}") for x, y in squares}
for a in squares:
    solver += 0 <= tour[a], tour[a] < 81
for a in squares:
    solver += z3.PbEq([(move[a, b], 1) for b in adj(a)] + [(tour[a] == 80, 1)], 1)
for b in squares:
    solver += z3.PbEq([(move[a, b], 1) for a in adj(b)] + [(tour[b] == 0, 1)], 1)
solver += z3.Distinct([tour[a] for a in squares])
for t in range(81):
    solver += z3.Or([tour[a] == t for a in squares])
for a in squares:
    for b in adj(a):
        solver += move[a, b] == (tour[a] + 1 == tour[b])

value = [z3.Int(f"value{t}") for t in range(81)]
for t in range(81):
    solver += 1 <= value[t], value[t] <= 9
for a in squares:
    for t in range(81):
        solver += z3.Implies(tour[a] == t, num[a] == value[t])

assert solver.check() != z3.unsat
opt = 0
while opt < 81:
    model = solver.model()
    for y in range(9):
        print(*(model[num[x, y]] for x in range(9)))
    for y in range(9):
        print(*(f"{model[tour[x, y]].as_long() + 1:2}" for x in range(9)))
    best = [model[value[t]].as_long() for t in range(81)]
    print(*best, sep="")
    print()
    while opt < 81:
        improve = z3.Bool(f"improve{opt}_{best[opt]}")
        solver += improve == (value[opt] > best[opt])
        if solver.check(improve) != z3.unsat:
            break
        solver += value[opt] == best[opt]
        opt += 1

Surely I overestimated the problem way too much. And I completely forgot the dark magic of Z3...

@Bubbler being certain an optimal solution is out of reach is difficult. I've made the same mistake myself - and mine lasted even less time before someone posted an optimal solution... https://codegolf.stackexchange.com/a/51974/20283

Mine's not salvageable, but I wonder if this challenge could work as a variation with a bigger board and a different chess piece (perhaps a follow on challenge linking back to this one)


text:
Count arrays that make unique sets
This question has a similar set up to Find an array that fits a set of sums although is quite different in its goals.
Consider an array A of length n. The array contains only positive integers.  For example A = (1,1,2,2).  Let us define f(A) as the set of sums of all the non-empty contiguous subarrays of A. In this case f(A) = {1,2,3,4,5,6}.  The steps to produce f(A)  are as follows:
The subarrays of A are (1), (1), (2), (2), (1,1), (1,2), (2,2), (1,1,2), (1,2,2), (1,1,2,2). Their respective sums are 1,1,2,2,2,3,4,4,5,6. The set you get from this list is therefore {1,2,3,4,5,6}.
We call an array A unique if there is no other array B of the same length such that f(A) = f(B), except for the array A reversed. As an example, f((1,2,3)) = f((3,2,1)) = {1,2,3,5,6} but there is no other array of length 3 that produces the same set of sums.
We will only consider arrays where the elements are either a given integer s or s+1. E.g. if s=1 the arrays would only contain 1 and 2.
Task
The task, for a given n and s is to count the number of unique arrays of that length.  You can assume that s is between 1 and 9.
You should not count the reverse of an array as well as the array itself.
Examples
s = 1, the answer is always n+1.
s = 2, the answers counting from n = 1 up are:
2,3,6,10,20,32,52,86

s = 8, the answers counting from n = 1 up are:
2,3,6,10,20,36,68,130

Score
For a given n, your code should output the answer for all values of s from 1 to 9. Your score is the highest value of n for which this completes in one minute.
Testing
I will need to run your code on my ubuntu machine so please include as detailed instructions as possible for how to compile and run your code.
Leaderboard

n = 24 by Anders Kaseorg in Rust (34 seconds)
n = 16 by Ourous in Clean (36 seconds)
n = 14 by JRowan in Common Lisp (49 seconds)

So if s=8 then its an array of all possible combinations of 8 and 9, nothing else?

@JRowan No. You don't count any of those arrays that have the same set of sums as some other array.

This part i am a little confused about We will only consider arrays where the elements are either a given integer s or s+1. E.g. if s=1 the arrays would only contain 1 and 2.  So if n is 2 and s is 3 what would the arrays to test be?

what about [3,3] and im currently removing the reverse of the lists eg. [3,4]->[4,3]

@JRowan (Corrected) If n = 2 and s = 3 the possible arrays are [3,3], [3,4], [4,3] and [4,4]. You can then remove the reverses as you say.

s and n: what is s ... I not understand good...

Why for the example Input: n=4, S = (1, 3, 4, 5, 6, 8, 9, 10, 13), output is X = (3, 5, 1, 4) ???? {3,5,4} it is one subset of X and 3+5+4= 12 is not in S

that S and its result X are your example in the other code-golf tournament of the same problem

@RosLuP Firstly, you meant to post that on the other question, and secondly, [3, 5, 4] is a subset but not a subarray of [3, 5, 1, 4].

Rust, n ≈ 24
Requires nightly Rust for the convenient reverse_bits feature.  Compile with rustc -O unique.rs and run with (e.g.) ./unique 24.
#![feature(reverse_bits)]
use std::{collections::HashMap, env, mem, process};

type T = u32;
const BITS: u32 = mem::size_of::<T>() as u32 * 8;

fn main() {
    let args = env::args().collect::<Vec<_>>();
    assert!(args.len() == 2);
    let n: u32 = args[1].parse().unwrap();
    assert!(n > 0);
    assert!(n <= BITS);
    let mut unique = (2..=9).map(|_| HashMap::new()).collect::<Vec<_>>();
    let mut sums = vec![0 as T; n as usize];
    for a in 0 as T..=!0 >> (BITS - n) {
        if a <= a.reverse_bits() >> (BITS - n) {
            for v in &mut sums {
                *v = 0;
            }
            for i in 0..n {
                let mut bit = 1;
                for j in i..n {
                    bit <<= a >> j & 1;
                    sums[(j - i) as usize] |= bit;
                }
            }
            for s in 2..=9 {
                let mut sums_s =
                    vec![0 as T; ((n + (n - 1) * s) / BITS + 1) as usize].into_boxed_slice();
                let mut pos = 0;
                let mut shift = 0;
                let mut lo = 0;
                let mut hi = 0;
                for &v in &sums {
                    lo |= v << shift;
                    if BITS - shift < n {
                        hi |= v >> (BITS - shift);
                    }
                    shift += s;
                    if shift >= BITS {
                        shift -= BITS;
                        sums_s[pos] = lo;
                        pos += 1;
                        lo = hi;
                        hi = 0;
                    }
                }
                if lo != 0 || hi != 0 {
                    sums_s[pos] = lo;
                    pos += 1;
                    if hi != 0 {
                        sums_s[pos] = hi;
                    }
                }
                unique[s as usize - 2]
                    .entry(sums_s)
                    .and_modify(|u| *u = false)
                    .or_insert(true);
            }
        }
    }
    let mut counts = vec![n + 1];
    counts.extend(
        unique
            .iter()
            .map(|m| m.values().map(|&u| u as T).sum::<T>())
            .collect::<Vec<_>>(),
    );
    println!("{:?}", counts);
    process::exit(0); // Avoid running destructors.
}

This is great, thank you. It completes for n = 25 in about 90 seconds. But the main problem is that it uses 70% of my 8GB of RAM.

I have suddenly got worried about something. Are you checking that the arrays are unique with respect to all other possible arrays, or just arrays with values s and s+1 in them?

@Anush Yes, I traded some memory usage for speed. I’m counting arrays that are unique w.r.t. other arrays with values s and s + 1 (since you said those are the only arrays we will consider), although it’s not immediately obvious whether that would make a difference.

I think I will need to work  this out tomorrow. The arrays 1,1,2,2 and 1,1,1,3 both give the set of sums 1,2,3,4,5,6.  However the former is not unique amongst arrays with only 1 and 2 so I am a little confused if it makes a difference now.

@Anush It does make a difference: the sums of [1, 2, 2, 2] are unique among arrays with 1 and 2 of length 4, but equal to the sums of [1, 1, 2, 3].

OK so I will leave this question as is and ask another one where the arrays have to be unique over all possible arrays soon. However first I need to work out how to solve it myself !

Common Lisp SBCL, N = 14
call function (goahead n s)
    (defun sub-lists(l m &optional(x 0)(y 0))
  (cond; ((and(= y (length l))(= x (length l)))nil)
        ((= y (length l))m)
        ((= x (length l))(sub-lists l m 0(1+ y)))
    (t (sub-lists l (cons(loop for a from x to (+ x y)

             when (and(nth (+ x y)l)(nth a l)(< (+ x y)(length l)))
                ;   while (nth a l)
             ;while(and(< (+ x y)(length l))(nth a l))
                    collect (nth a l))m) (1+ x)y))
    ))
(defun permutations(size elements)
  (if (zerop size)'(())
 (mapcan (lambda (p)
                    (map 'list (lambda (e)
                           (cons e p))
                         elements))
     (permutations (1- size) elements))))
(defun remove-reverse(l m)
  (cond ((endp l)m)
    ((member (reverse (first l))(rest l) :test #'equal)(remove-reverse (rest l)m))
    (t (remove-reverse (rest l)(cons (first l)m)))))
(defun main(n s)
  (let((l (remove-reverse (permutations n `(,s ,(1+ s)))nil)))

  (loop for x in l
     for j = (remove 'nil (sub-lists x nil))
       collect(sort (make-set(loop for y in j
        collect (apply '+ y))nil)#'<)
     )
  ))
(defun remove-dups(l m n)
  (cond ((endp l)n)
        ((member (first l) (rest l) :test #'equal)(remove-dups(rest l)(cons (first l) m) n))
    ((member (first l) m :test #'equal)(remove-dups(rest l)m n))
    (t(remove-dups (rest l) m (cons (first l) n))))

  )
(defun goahead(n s)
  (loop for a from 1 to s
  collect(length (remove-dups(main n a)nil nil))))
(defun make-set (L m)
  "Returns a set from a list. Duplicate elements are removed."
  (cond ((endp L) m)
    ((member (first L) (rest L)) (make-set (rest L)m))
    ( t (make-set (rest L)(cons (first l)m)))))

here is the run times
CL-USER> (time (goahead 14 9))
Evaluation took:
  34.342 seconds of real time
  34.295000 seconds of total run time (34.103012 user, 0.191988 system)
  [ Run times consist of 0.263 seconds GC time, and 34.032 seconds non-GC time. ]
  99.86% CPU
  103,024,254,028 processor cycles
  1,473,099,744 bytes consed

(15 1047 4893 6864 7270 7324 7328 7328 7328)
CL-USER> (time (goahead 15 9))
Evaluation took:
  138.639 seconds of real time
  138.511089 seconds of total run time (137.923824 user, 0.587265 system)
  [ Run times consist of 0.630 seconds GC time, and 137.882 seconds non-GC time. ]
  99.91% CPU
  415,915,271,830 processor cycles
  3,453,394,576 bytes consed

(16 1502 8848 13336 14418 14578 14594 14594 14594)

How do I run this? Do I copy your code into a file and call it from sbcl somehow?

I use emacs and slime but you could put it in a file say test.lisp and in sbcl promp at your directory call (load "test.lisp") and then call the function how i have it at the bottom

Clean
Certainly not the most efficient approach, but I'm interested in seeing how well a naive by-value filter does.
That said, there's still a bit of improvement to be made using this method.
module main
import StdEnv, Data.List, System.CommandLine

f l = sort (nub [sum t \\ i <- inits l, t <- tails i])

Start w
	# ([_:args], w) = getCommandLine w
	= case map toInt args of
		[n] = map (flip countUniques n) [1..9]
		_ = abort "Wrong number of arguments!"

countUniques 1 n = inc n
countUniques s n = length uniques
where
	lists = [[s + ((i >> p) bitand 1) \\ p <- [0..dec n]] \\ i <- [0..2^n-1]]
	pairs = sortBy (\(a,_) (b,_) = a < b) (zip (map f lists, lists))
	groups = map (snd o unzip) (groupBy (\(a,_) (b,_) = a == b) pairs)
	uniques = filter (\section = case section of [a, b] = a == reverse b; [_] = True; _ = False) groups

Place in a file named main.icl, or change the top line to module <your_file_name_here>.
Compile with clm -h 1500m -s 50m -fusion -t -IL Dynamics -IL StdEnv -IL Platform main.
You can get the version TIO (and myself) use from the link in the heading, or a more recent one from here.

I don't think this code gives the right output. I tried it with s=8 and it gives [9,86,126,130,130,130,130,130,130]

@Anush hmm I know I tested it. I'll see if I changed anything between that and the posted one, give me a few hours and I can do it on my break.

@Anush Why are you providing s? In the question you state "For a given n, your code should output the answer for all values of s from 1 to 9."

I think that is what you call a brain freeze on my part  :)  I will time your code now.


text:
Decode a 7-segment display
You probably all know the 7-segment display which can display among other things all digits from \$0\dots 9\$:

Challenge
We only consider the segments \$\texttt{A}\dots\texttt{G}\$, your task is to decode a single digit given which segments are turned on.
This can be encoded as an 8-bit integer, here's a table of each digit with their binary representation and the corresponding little-endian and big-endian values:
$$
\begin{array}{c|c|rr|rr}
\text{Digit} & \texttt{.ABCDEFG} & \text{Little-endian} && \text{Big-endian} & \\ \hline
0 & \texttt{01111110} & 126 & \texttt{0x7E} & 126 & \texttt{0x7E} \\
1 & \texttt{00110000} &  48 & \texttt{0x30} &  12 & \texttt{0x0C} \\
2 & \texttt{01101101} & 109 & \texttt{0x6D} & 182 & \texttt{0xB6} \\
3 & \texttt{01111001} & 121 & \texttt{0x79} & 158 & \texttt{0x9E} \\
4 & \texttt{00110011} &  51 & \texttt{0x33} & 204 & \texttt{0xCC} \\
5 & \texttt{01011011} &  91 & \texttt{0x5B} & 218 & \texttt{0xDA} \\
6 & \texttt{01011111} &  95 & \texttt{0x5F} & 250 & \texttt{0xFA} \\
7 & \texttt{01110000} & 112 & \texttt{0x70} &  14 & \texttt{0x0E} \\
8 & \texttt{01111111} & 127 & \texttt{0x7F} & 254 & \texttt{0xFE} \\
9 & \texttt{01111011} & 123 & \texttt{0x7B} & 222 & \texttt{0xDE}
\end{array}
$$
Rules & I/O

Input will be one of

single integer (like in the table above one of the two given orders)
a list/array/.. of bits
a string consisting of characters ABCDEFG (you may assume it's sorted, as an example ABC encodes \$7\$), their case is your choice (not mixed-case)

Output will be the digit it encodes
You may assume no invalid inputs (invalid means that there is no corresponding digit)

Tests
Since this challenge allows multiple representations, please refer to the table.

Related.

Can we accept an integer (or array) in any specified bit-order or just the two shown?

@JonathanAllan: I'll clarify, only the ones already shown.

Ohhh crap, you don't have to handle all input types? Only one? Whoops...

@MagicOctopusUrn: Yes indeed :)

JavaScript (ES6), 26 bytes
Takes input in little Endian.
n=>'0958634172'[n*3%77%10]

Try it online!

Misha Lavrov's method makes for 25.

Python 3, 18 bytes
b'~0my3[_p{'.find

Try it online!
Uses little-endian inputs. Contains a raw \x7F byte.
Python 2, 27 bytes
map(ord,'~0my3[_p{').index

Try it online!

Wolfram Language (Mathematica), 41 bytes
9[,6,0,8,2,3,1,7,5,4][[#~Mod~41~Mod~11]]&

Try it online!
Uses the little-endian column of integers as input. Ignore the syntax warning.
For an input X, we first take X mod 41 and then take the result mod 11. The results are distinct mod 11, so we can extract them from a table. For example, 126 mod 41 mod 11 is 3, so if we make position 3 equal to 0, then we get the correct answer for an input of 126.
The table is 9[,6,0,8,2,3,1,7,5,4]. Part 0 is the head, which is 9. Part 1 is missing, so it's Null, to save a byte: we never need to take part 1. Then part 2 is 6, part 3 is 0, and so on, as usual.

Jonathan Allan's answer gives us  1[4,9,8,6,2,0,5,3,7][[384~Mod~#~Mod~13]]&. This isn't any shorter, but it does avoid the syntax warning!

Wolfram Language (Mathematica), 27 25 bytes
Mod[Hash[")dD}"#]+2,11]&

(There's some character here that doesn't quite show up, sorry. Click on the link below and you'll see it.)
Try it online!
This is all about brute-forcing some string to go inside Hash so that the hashes end up having the right values mod 11. More brute forcing can probably get us to an even shorter solution.

Could you please explain this answer a little bit, for someone who doesn't know Mathematica?

I thought it would be readable for anyone, but okay, I'll edit in an explanation.

Congrats; the 41 byte solution broke my Mathematica compressor.

Jelly, 12 bytes
“0my3[_p¶{‘i

Accepts a little-endian integer.
Try it online!
This is the naive implementation, there might be a way to get a terser code.

Java (JDK), 32 bytes
n->"99608231754".charAt(n%41%11)

Try it online!
Credits

Port of Arnauld's JavaScript answer, much shorter than previous attempt in the post history.
-1 byte thanks to Jonathan Allan, using Misha Lavrov's Wolfram Language (Mathematica) answer.

Misha Lavrov's method makes for 32.

Thanks, @JonathanAllan! Much appreciated!

Python 2, 31 bytes
lambda n:'99608231754'[n%41%11]

Try it online! takes input as little-endian.

JavaScript (Node.js), 25 bytes
n=>'1498620537'[384%n%13]

Accepts a little-endian integer.
Try it online!

Ports for 31 bytes in Python with lambda n:'1498620537'[384%n%13]

Whitespace, 152 bytes
Obligatory "the S's, T's, and L's aren't really there, they're just visible representations of the commands".
S S S T	S S L
S S S T	S T	L
S S S T	T	T	L
S S S T	L
S S S T	T	L
S S S T	S L
S S S T	S S S L
S S S L
S S S T	T	S L
S S S L
S S S T	S S T	L
S S S L
S L
S T	L
T	T	T	T	T	S S S T	S T	S S T	L
T	S T	T	S S S T	S T	T	L
T	S T	T	L
S S L
S L
S L
T	S S L
S T	L
S T	L
S S S T	L
T	S S T	L
S L
L
L
S S S L
S L
L
T	L
S T

Try it online!
Ends in an error.
Equivalent assembly-like syntax:
	push 4
	push 5
	push 7
	push 1
	push 3
	push 2
	push 8
	push 0
	push 6
	push 0
	push 9
	push 0
	dup
	readi
	retrieve
	push 41
	mod
	push 11
	mod
slideLoop:
	dup
	jz .slideLoop
	slide 1
	push 1
	sub
	jmp slideLoop
.slideLoop:
	drop
	printi

You can remove the three trailing newlines to save 3 bytes. It gives an error in STDERR, but the program still works, and it's allowed by the meta-rules.

brainfuck, 474 176 154 151 149 137 bytes
Takes an input string of eight 0 and 1 including the first 0 for decimal point.
(like in the second column of the table in the post)
Outputs digit from 0 to 9.
,>,>,>,,,>,>,>+[[->]<++<<<<<<]>[>[>[>[->[>++++++<-<]>[--<]<]>>.>>]<[>
>[>->++<<-]>-[+>++++<]>+.>]]>[>>>+<<<-]>[>>+++.>]]>[>>>[>+++<-]>-.>]

Try it online!
Algorithm
By observing state of a particular segment we can split a set of possible digits into smaller subsets. Below is the static binary search tree used in my code.
Left subtree corresponds to segment ON state, right corresponds to segment OFF state.
                                         0,1,2,3,4,5,6,7,8,9
                                                  |
                                         /-------[A]-------------------------\
                                 0,2,3,5,6,7,8,9                             1,4
                                        |                                     |
                         /-------------[B]----------------\             /----[G]----\
                   0,2,3,7,8,9                            5,6          4             1
                        |                                  |
              /--------[E]--------\                  /----[E]----\
            0,2,8                3,7,9              6             5
              |                    |
        /----[F]----\        /----[F]----\
      0,8            2      9            3,7
       |                                  |
 /----[G]----\                      /----[G]----\
8             0                    3             7

Some observations useful for golfing

Bits C and D are redundant and can be ignored.
Leading zero (bit for decimal point) can be (ab)used as value 48, important both for parsing input and preparing output.
When leaf is reached and digit is printed, we just need to skip all further conditions. It can be done by moving data pointer far enough to the area of zeros so that it cannot come back.
For the compatibility it is better to use zeros on the right, because some BF implementations doesn't support negative data pointers.
Hence it is better to store output value in the rightmost cell, so we can easily reach area of zeros to the right.
Hence it is better to check bits from left to right: A,B,E,F,G so we can reach output cell easier.
Different digits may share output code. For example, 5 and 6 are in the same subtree. We may do +++++ for both values and then + for six only.
We may decrease number of + commands if we add 2 to output value in advance. In that case we need to decrease it for 0 and 1 only and get advantage for other digits.

Retina, 96 bytes
^(A)?(B)?C?(D|())(E|())(F)?(G)?
$.($.5*$.8*$(6*$7$2$2)$#6*$.3*$($.2*$(___$7)5*$7)$#4*$(6*$1_3*$8

Try it online! May not be the best way, but it's an interesting way of programming in Retina. Explanation:
^(A)?(B)?C?(D|())(E|())(F)?(G)?

Tries to capture the interesting cases. The positive captures simply capture the letter if it's present. The length of the capture is therefore 1 if it's present and 0 if it's absent. The special cases are captures 4 and 6 which exist only if D or E are absent respectively. These can only be expressed in decimal as $#4 and $#6 but that's all we need here. The captures are then built up into a string whose length is the desired number. For instance, if we write 6*$1 then this string has length 6 if A is present and 0 if it is absent. In order to choose between different expressions we use either $. (for the positive captures) or $# (for the negative captures) which evaluate to either 0 or 1 and this can then be multiplied by the string so far.
$.5*$.8*$(6*$7$2$2)

F is repeated 6 times and B twice (by concatenation as it's golfier). However, the result is ignored unless both E and G are present. This handles the cases of 2, 6 and 8.
$#6*$.3*$($.2*$(___$7)5*$7)

F is repeated 5 times, and if B is present, it is added a sixth time plus an extra 3 (represented by a constant string of length 3). However, the result is ignored unless D is present and E is absent. This handles the cases of 3, 5 and 9.
$#4*$(6*$1_3*$8

A is repeated 6 times, and G is repeated 3 times, and an extra 1 added (represented by a constant character between the two because it's golfier). However the result is ignored unless D is absent. This handles the cases of 1, 4 and 7.
$.(

The above strings are then concatenated and the length taken. if none of the above apply, no string is generated, and its length is therefore 0.
The resulting strings (before the length is taken) are as follows:
1   _
2   BB
3   ___
4   _GGG
5   FFFFF
6   FFFFFF
7   AAAAAA_
8   FFFFFFBB
9   ___FFFFFF

MATL, 14 bytes
'/lx2Z^o~z'Q&m

Input is a number representing the segments in little-endian format.
Try it online!
Explanation
'/lx2Z^o~z'  % Push this string
Q            % Add 1 to the codepoint of each char. This gives the array
             % [48 109 ... 123], corresponding to numbers 1 2 ... 9. Note that
             % 0 is missing
&m           % Implicit input. Call ismember function with second output. This
             % gives the 1-based index in the array for the input, or 0 if the
             % input is not present in the array.
             % Implicit display

Perl 5 -pl, 24 bytes
$_=index'~0my3[_p{',chr

Try it online!
Takes little-endian integers.

Ruby, 29 bytes
->n{"0083416243795"[n%23-10]}

Try it online!

05AB1E, 17 16 15 12 bytes
•NŽyf¯•I41%è

-1 byte thanks to @ErikTheOutgolfer.
-1 byte by creating a port of @MishaLavrov's Mathematica answer.
-3 bytes thanks to @Grimy.
Try it online or verify all test cases.
Explanation:
•NŽyf¯•       # Push compressed integer 99608231754
       I41%   # Push the input modulo-41
           è  # Index this into the integer (with automatic wraparound)
              # (and output the result implicitly)

See this 05AB1E tip of mine (section How to compress large integers?) to understand why •NŽyf¯• is 99608231754.

16 bytes.

@EriktheOutgolfer Ah, of course.. Coincidentally it's 128в. Forgot there is a builtin for 128 being halve 256. Thanks!

I tried some freaky stuff too couldn't get under 15. Freakiest attempt: ¦C•26¤æÈÛµÀš•2ô₂+sk (19).

@Grimy Thanks! Now that I see it it's obvious, since the compressed integer is size 11 and wraparound kicks in.

Japt, 15 bytes
Takes the big-endian value as input.
"~¶ÌÚúþÞ"bUd

Try it

Explanation
The string contains the characters at each of the codepoints of the big-endian values; Ud gets the character at the input's codepoint and b finds the index of that in the string.

Neim, 15 bytes
&bᚫJOℤ£ᛖ)

Explanation:
&bᚫJOℤ£ᛖ)      create list [126 48 109 121 51 91 95 112 127 123]
                      index of

Try it online!

Stax, 12 bytes
å╬JÄk☺é[£¿⌐→

Run and debug it
Input is little endian integer.
It uses the same string constant as Luis' MATL solution.

TI-BASIC (TI-83+/84+ series), 15 bytes
int(10fPart(194909642ln(Ans

Uses little-endian input. Hashes are fairly common in TI-BASIC, so I wrote a hash function brute-forcer for cases like this.
We get a bit lucky here, as the multiplier is 9 digits long rather than the expected 10.
      fPart(194909642ln(Ans   hash function mapping onto [0,1)
int(10                        take first digit after decimal point

Charcoal, 17 bytes
Ｉ⌕”y~¶ÌÚúþÞ”℅Ｎ

Try it!
Port of the Japt answer.


text:
Let's play tennis 2: east-west game
There is a challenge Let's play tennis by Daniel. He proposes to place a court in the North-South direction. My proposal is to create a court to play tennis in the East-West direction too.
You have to print a tennis court, but you have to do it in the fewest bytes possible because of confidential reasons.
Tennis court
------x------
|  |  x  |  |
|  |--x--|  |
|  |  x  |  |
------x------

Original rules are:

No extra spaces.
No tabs as they would be unfair.
One optional trailing newline is allowed.

This is code-golf, so shortest code in bytes wins!

Canvas, 13 12 bytes
«ω↕9:gＷ：ｔＣ‟┼

quad-palindromizes a compressed corner of the field.
Try it here!
11 bytes with uppercase Xes, using the fact that / compresses better than x and palindromizing would result in overlapping / and its mirror \, which results in X

See, my thinking when I first saw this question was "do I have enough time to go learn Canvas right now and then post a solution?" Evidently not :P

Python 2, 59 bytes
s="------x------\n|  |  x  |  |\n|  |--x"
print s+s[-2::-1]

Try it online!
Prints the first half of the string followed by its reverse. It's boring but efficient. I tried extracting repeating parts of out s, especially the -, but didn't find anything shorter.

Python 2, 59 bytes
for n in 6,0,2,0,6:x='-'*n+'  |  |'[n:];print x[::-1]+'x'+x

Try it online!
Using Jo King's construction.

Python 2, 62 bytes
b='|  '*2
for r in'-'*6,b,'|  |--',b,'-'*6:print r+'x'+r[::-1]

Try it online!
Prints the first half of each line, followed by 'x', followed by the first half reversed.

Charcoal, 15 bytes
↑²←⁶↓xx→x²↑²‖Ｏ¬

Try it online! Link is to verbose version of code. By way of explanation I will show the result after each of the drawing commands up to the final reflection:
↑²        |
          |

     ------
←⁶        |
          |

    x------
↓xx x     |
          |

    x------
→x² x     |
    x--   |

    x------
↑²  x  |  |
    x--|  |

Python 3, 65 62 bytes
for n in 7,0,3,0,7:x="-"*n+"|  "*5;print(x[6:0:-1]+'x'+x[1:7])

Try it online!

Now this is the kind of string-slicing wizardry that I thought a Python answer to this challenge ought to have. Well played!

Dyalog APL, 36 bytes
(⌽,'x',⊢)(⊢⍪'--|  |'⍪⊖)'-'⍪1 6⍴'  |'

Try it online!
With a little help from Adám

Python 3, 75 bytes
s='-'*6;p='|  |';w=s+'x'+s;a=p+'  x  '+p;print(w,a,p+w[4:9]+p,a,w,sep='\n')

Probably golfable - I've never really tried kolmogorov-complexity challenges before.
Try it online!
In Python 2 I could get it to 76 bytes
s='-'*6;p='|  |';w=s+'x'+s;a=p+'  x  '+p
for i in w,a,p+w[4:9]+p,a,w:print i

Perl 5, 55 bytes
say$_,x,~~reverse for('-'x6,'|  'x2,'|  |--')[0..2,1,0]

Try it online!

APL (Dyalog Classic), 35 bytes
' |-x'[(⍉⊖⍪1∘↓)⍣2⍉3⍪2,⍨676 28⊤⍨6⍴3]

Try it online!

I just saw this now holy what

Pip -l, 42 39 34 bytes
RV@<P"|  |".[s'-]X2PE'-X6M_.'x.RV_

Try it online!

Alternate solution, also 34 bytes:
RV@<P"-0|  0|  |--"^0M_@<16RA6,t'x

Try it online!

Python 2, 69 68 66 bytes
-2 thanks to Jo King
for l in"-","|  ","|  |--","|  ","-":l*=6;print l[:6]+"x"+l[5::-1]

Try it online!
We cycle the following three patterns infinitely (6 times is sufficiently infinite for our purposes) and slice off the first 6 characters of each: -, |  , and |  |--. Then, to get the tennis court, we concatenate an x and the reverse of each line.

05AB1E, 25 24 bytes
"
 -x|"•L®y[Â-Γ•5вèJ.º.∊

Try it online.
25 24 bytes alternative:
… -|•B°”Ñ•3вèJ3ä'x«».º.∊

Try it online.
Explanation:
"\n -x|"       # Push string "\n -x|"
•L®y[Â-Γ•      # Push compressed number 5960566858660563
         5в    # Converted to Base-5 as list:
               #  [2,2,2,2,2,2,3,0,4,1,1,4,1,1,3,0,4,1,1,4,2,2,3]
è              # Index each digit into the string
 J             # And join the list together
               #  "\n -x|" and [2,2,2,2,2,2,3,0,4,1,1,4,1,1,3,0,4,1,1,4,2,2,3]
               #   → "------x\n|  |  x\n|  |--x"
.º             # Intersect mirror everything horizontally
  .∊           # Intersect mirror everything vertically (and output implicitly)

… -|           # Push string " -|"
•B°”Ñ•         # Push compressed integer 193812448
      3в       # Converted to Base-3 as list: [1,1,1,1,1,1,2,0,0,2,0,0,2,0,0,2,1,1]
è              # Index each digit into the string
 J             # And join the list together
               #  " -|" and [1,1,1,1,1,1,2,0,0,2,0,0,2,0,0,2,1,1]
               #   → "------|  |  |  |--"
3ä             # Split the string into three parts: ["------","|  |  ","|  |--"]
  'x«         '# Append an "x" to each: ["------x","|  |  x","|  |--x"]
     »         # Join by newlines: "------x\n|  |  x\n|  |--x"
.º             # Intersect mirror everything horizontally
  .∊           # Intersect mirror everything vertically (and output implicitly)

See this 05AB1E tip of mine (section How to compress large integers?) to understand why •L®y[Â-Γ• is 5960566858660563 and •B°”Ñ• is 193812448.
Thanks to @MagicOctopusUrn's ASCII-art generator for •L®y[Â-Γ•5BžLR"\n -x|"‡ and •B°”Ñ•3BžLR" -|"‡, after which the transliterate has been golfed further by swapping the number and string on the stack, use в instead of B, and index into the string with è.

J, 53 bytes
echo|:'x'(<6)}'-'(<2;~4+i.5)}13$3 5$'-|||',11$'--   '

Try it online!

MBASIC, 82 bytes
1 WIDTH 13:PRINT"------x------|  |  x  |  ||  |--x--|  ||  |  x  |  |------x------

Abusing the WIDTH directive saved me around 20 bytes.

Stax, 19 bytes
⌡x♠=Γτ^┼¢Δ¶─êiö$≥⌐▓

Run and debug it

K (ngn/k), 34 bytes
+"x-| "@4\509 425 477 0@4\17218113

Try it online!
Port of K4 answer. 2 bytes saved with the 4\, 1 byte lost due to the +

Bubblegum, 28 bytes
00000000: d3d5 0581 0a30 a9cb 55a3 a000 4415 60b2  .....0..U...D.`.
00000010: 06cc 03cb c179 0839 5d14 7d00            .....y.9].}.

Try it online!

Jelly, 22 bytes
“Þḅ“ H“ \’ṃ“-|x ”ŒBŒḄY

Try it online!

V, 25 bytes
13é-Äï5I  |<esc>ÄÙ4l5r-Îd^ãrx

Try it online!
Hexdump:
00000000: 3133 e92d c4ef 3549 2020 7c1b c4d9 346c  13.-..5I  |...4l
00000010: 3572 2dce 645e e372 78                   5r-.d^.rx

Here was my process:
13é-Äï5I  |<esc>3<<ÄÙ4l5r-Gã<C-v>ërx
13é-Äï5I  |<esc>3<<ÄÙ4l5r-Î7|rx
13é-Äï5I  |<esc>3<<ÄÙ4l5r-Îãrx
13é-Äï5I  |<esc>ÄÙ4l5r-Îd^ãrx

Alternate version:
5I  |<esc>5ÄM4l5r-HÒ-G.Îxxãrx

Hexdump:
00000000: 3549 2020 7c1b 35c4 4d34 6c35 722d 48d2  5I  |.5.M4l5r-H.
00000010: 2d47 2ece 7878 e372 780a                 -G..xx.rx.

JavaScript (Node.js), 76 bytes
(a='----',A='|  |',b='--x--',B='  x  ')=>[p=a+b+a,q=A+B+A,A+b+A,q,p].join`
`

Try it online!

68 bytes if array of strings allowed.

JavaScript (Node.js), 75 bytes
_=>[p='x---',q='x|  ','x| -',q,p].map(c=>[...'1221330331221'].map(d=>c[d]))

Try it online!

This one output 2d char array. I don't know if it can be golfed further more.

Red,98 80 bytes
foreach r[1 2 3 2 1][print pick["------x------""|  |  x  |  |""|  |--x--|  |"]r]

Try it online!

Powershell, 60 59 bytes
-1 bytes thanks @AdmBorkBork
('------x------','|  |  x  |  |','|  |--x--|  |')[0,1+2..0]

59 bytes to do [0,1+2..0]

Pyth, 32 bytes
t_ps@L"x-
| "jC"??ôkË7"5

Try it online here. The above code contains some odd characters, so copying/pasting probably won't work.
Prints the first half of the pattern, followed by its reverse without the central x.
t_ps@L"x-\n| "jC"..."5   Note newline replaced with \n, encoded string replaced with ...

               C"..."    Convert encoded string to base 256 number 727558509253668163499780
              j      5   Convert to base 5, yields [1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 3, 4, 4, 3, 4, 4, 0, 4, 4, 3, 4, 4, 3, 2, 3, 4, 4, 3, 1, 1, 0]
    @L                   Map each of the above to...
      "x-\n| "           ... [x, -, newline, |, space]
   s                     Concatenate into string
  p                      Print without newline
 _                       Reverse
t                        All but first character, implicit print

C# (.NET Core), 88 bytes
string a="------x------\n",b="|  |  x  |  |\n";Console.Write(a+b+"|  |--x--|  |\n"+b+a);

Try it online!
Ungolfed:
string a = "------x------\n",
       b = "|  |  x  |  |\n";
Console.Write(a + b + "|  |--x--|  |\n" + b + a);

Here's an alternate way to do it with an anonymous function based on adrianmp's answer from the first Let's Play Tennis thread:
C# (.NET Core), 88 bytes
()=>{string a="------x------\n",b="|  |  x  |  |\n";return(a+b+"|  |--x--|  |\n"+b+a);};

Try it online!
Ungolfed:
() =>
{
    string a = "------x------\n",
           b = "|  |  x  |  |\n";
    return(a + b + "|  |--x--|  |\n" + b + a);
};

K4, 36 35 bytes
Solution:
"x-| "@4\:509 425 477 0@4\:17218113

Example:
q)k)"x-| "@4\:509 425 477 0@4\:17218113
"------x------"
"|  |  x  |  |"
"|  |--x--|  |"
"|  |  x  |  |"
"------x------"

Explanation:
We want to generate a list of indexes into the array "x-| ", e.g.
1 1 1 1 1 1 0 1 1 1 1 1 1
2 3 3 2 3 3 0 3 3 2 3 3 2
2 3 3 2 1 1 0 1 1 2 3 3 2
2 3 3 2 3 3 0 3 3 2 3 3 2
1 1 1 1 1 1 0 1 1 1 1 1 1

In order to generate this we can take the base-4 representation of the flip of these numbers. This gives us:
425 509 509 425 477 477 0 477 477 425 509 509 425

We can take the distinct values and index in at the indices we require:
q)509 425 477 0@1 0 0 1 2 2 3 2 2 1 0 0 1
425 509 509 425 477 477 0 477 477 425 509 509 425

This array 1 0 0 1 2 2 3 2 2 1 0 0 1 converted to base-4 is
q)k)4/:1 0 0 1 2 2 3 2 2 1 0 0 1
17218113

So for the solution, we are just doing these steps in reverse.
"x-| "@4\:509 425 477 0@4\:17218113 / the solution
                        4\:17218113 / convert 17218113 into base-4
          509 425 477 0@            / index (@) into 509 425 477 0
       4\:                          / convert to base-4
"x-| "@                             / index (@) into "x-| "

///, 46 bytes
/#/
!  x  !
//"/------//!/|  |/"x"#!--x--!#"x"

Try it online!

Vyxal j, 22 bytes
»°₈q8»`|- `τ3/\x+ømvøm

Try it Online!
Alternative 22 bytes
»ƛ\¶≤NV»`x-| `τ3/ømvøm

Try it Online!