text:
Picture of an old friend in ASCII art
I hope this picture looks familiar to you.

It's one of Pacman's ghosts in his "vulnerable" state, after Pacman has eaten a power pill.
The challenge
Picture our ghost in a little frame, using ASCII art. At normal scale (more about this later), each square in the above image should correspond to one character, and the frame should have a one-character separation up and down, and a two-character separation to the left and right of the ghost:
####################
#                  #
#       ####       #
#     ########     #
#    ##########    #
#   ############   #
#   ############   #
#   ###  ##  ###   #
#  ####  ##  ####  #
#  ##############  #
#  ##############  #
#  ##  ##  ##  ##  #
#  # ##  ##  ## #  #
#  ##############  #
#  ## ###  ### ##  #
#  #   ##  ##   #  #
#                  #
####################

But this doesn't look very pretty. # may not be the best choice for the active pixels. Besides, character cells are not square, which makes our friend look more ghostly than he already is.
So, to have more flexibility, the picture will change according to three input parameters:

Character to be used for active pixels;
Horizontal scale factor;
Vertical scale factor.

For example, with %, 4, 2 the ouput would be the better looking picture
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%                                                                        %%%%
%%%%                                                                        %%%%
%%%%                            %%%%%%%%%%%%%%%%                            %%%%
%%%%                            %%%%%%%%%%%%%%%%                            %%%%
%%%%                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                    %%%%
%%%%                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                    %%%%
%%%%                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                %%%%
%%%%                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                %%%%
%%%%            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%            %%%%
%%%%            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%            %%%%
%%%%            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%            %%%%
%%%%            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%            %%%%
%%%%            %%%%%%%%%%%%        %%%%%%%%        %%%%%%%%%%%%            %%%%
%%%%            %%%%%%%%%%%%        %%%%%%%%        %%%%%%%%%%%%            %%%%
%%%%        %%%%%%%%%%%%%%%%        %%%%%%%%        %%%%%%%%%%%%%%%%        %%%%
%%%%        %%%%%%%%%%%%%%%%        %%%%%%%%        %%%%%%%%%%%%%%%%        %%%%
%%%%        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%        %%%%
%%%%        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%        %%%%
%%%%        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%        %%%%
%%%%        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%        %%%%
%%%%        %%%%%%%%        %%%%%%%%        %%%%%%%%        %%%%%%%%        %%%%
%%%%        %%%%%%%%        %%%%%%%%        %%%%%%%%        %%%%%%%%        %%%%
%%%%        %%%%    %%%%%%%%        %%%%%%%%        %%%%%%%%    %%%%        %%%%
%%%%        %%%%    %%%%%%%%        %%%%%%%%        %%%%%%%%    %%%%        %%%%
%%%%        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%        %%%%
%%%%        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%        %%%%
%%%%        %%%%%%%%    %%%%%%%%%%%%        %%%%%%%%%%%%    %%%%%%%%        %%%%
%%%%        %%%%%%%%    %%%%%%%%%%%%        %%%%%%%%%%%%    %%%%%%%%        %%%%
%%%%        %%%%            %%%%%%%%        %%%%%%%%            %%%%        %%%%
%%%%        %%%%            %%%%%%%%        %%%%%%%%            %%%%        %%%%
%%%%                                                                        %%%%
%%%%                                                                        %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Rules
All builtins allowed.
Inputs are taken in any reasonable format and any order. The first input above (character for active pixels) is guaranteed to be a printable ASCII character (codes 32 to 126).
Trailing space after each line or trailing newlines after last line are acceptable.
Code golf, fewest bytes wins.

Look attentively to the picture for a few seconds. Then see what happens!...

Can't believe there are no Charcoal submissions so far.

CJam, 53 51 49 bytes
q~"ǟ #/?Y__Fy_Nf ǟ"f{'Ƞ^2b_W%+S@+f=}fe*e*N*

Note that three of the characters are unprintable. Try it online!
Background
The right half of the unscaled output is identical to the left one, so it suffices to encode one of them. If we replace spaces with zeroes and non-spaces with ones, we get
1111111111
1000000000
1000000011
1000001111
1000011111
1000111111
1000111111
1000111001
1001111001
1001111111
1001111111
1001100110
1001011001
1001111111
1001101110
1001000110
1000000000
1111111111

where each line can be interpreted as a binary number. This yields
1023 512 515 527 543 575 575 569 633 639 639 614 601 639 622 582 512 1023

The easiest way to encode this information is to replace each integer with the Unicode character at that code point, but they would all require two bytes to be encoded with UTF-8.
By XORing the integers with 544, we keep all but two integers below 128 and avoid null bytes.
The result is
479 32 35 47 63 31 31 25 89 95 95 70 121 95 78 102 32 479

as integers or
ǟ #/?\x1f\x1f\x19Y__Fy_Nf ǟ

as an escaped string.
How it works
q~                e# Read and evaluate all input. This pushes the vscale factor V,
                  e# the hscale factor H, and the character C.
"ǟ #/?Y__Fy_Nf ǟ" e# Push that string.
f{                e# For each character, push C and the character; then:
'Ƞ^               e#   XOR the character with '\u0220' (544), casting to integer.
 2b               e#   Convert from integer to base 2.
 _W%              e#   Push a reversed copy of the binary digits.
 +                e#   Concatenate.
 S@+              e#   Append C to " ".
 f=               e#   Replace each binary digit with ' ' or C.
}                 e#
fe*               e# Repeat each character in each string H times.
e*                e# Repeat each string V times.
N                 e# Join the strings, separating by linefeeds.

How quick, and short code! Impressive!

Perl, 113 105 104 100 97 96
Added +2 for -ap
Suggestions by dev-null save 9 bytes
Fixed wrong count as noticed by Dennis
Run using echo "2 4 %" | perl -ap pacman.pl
pacman.pl:
}for(map+(unpack(aXBXB8Xb8XBXa),$/)x"@F","\xff\x00\x03\x0f\x1f\x3f\x3f\x39\x79\x7f\x7f\x66\x59\x7f\x6e\x46\x00\xff"=~/./g){s%%($&?$F[2]:$")x$F[1]%ge

except that the string "\xff\x00\x03\x0f\x1f\x3f\x3f\x39\x79\x7f\x7f\x66\x59\x7f\x6e\x46\x00\xff" should be written in binary form with single quotes
Space as replacement character becomes the empty string and leads to short lines. But it will all look blank anyways

Dyalog APL, 64 bytes
{/∘⍉/⍺,⊂' '⍵[1+,∘⌽⍨1⍪⍨1⍪1,0⍪⍨0⍪0,0,⍉(7/2)⊤⎕AV⍳'Äâ\⊥⊥∘)⍞⍞┬#⍞`⍒']}

This takes the scale factor as its left argument and the character as its right
argument, i.e:
      2 1{/∘⍉/⍺,⊂' '⍵[1+,∘⌽⍨1⍪⍨1⍪1,0⍪⍨0⍪0,0,⍉(7/2)⊤⎕AV⍳'Äâ\⊥⊥∘)⍞⍞┬#⍞`⍒']}'%'
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%                                    %%
 %%              %%%%%%%%              %%
 %%          %%%%%%%%%%%%%%%%          %%
 %%        %%%%%%%%%%%%%%%%%%%%        %%
 %%      %%%%%%%%%%%%%%%%%%%%%%%%      %%
 %%      %%%%%%%%%%%%%%%%%%%%%%%%      %%
 %%      %%%%%%    %%%%    %%%%%%      %%
 %%    %%%%%%%%    %%%%    %%%%%%%%    %%
 %%    %%%%%%%%%%%%%%%%%%%%%%%%%%%%    %%
 %%    %%%%%%%%%%%%%%%%%%%%%%%%%%%%    %%
 %%    %%%%    %%%%    %%%%    %%%%    %%
 %%    %%  %%%%    %%%%    %%%%  %%    %%
 %%    %%%%%%%%%%%%%%%%%%%%%%%%%%%%    %%
 %%    %%%%  %%%%%%    %%%%%%  %%%%    %%
 %%    %%      %%%%    %%%%      %%    %%
 %%                                    %%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Explanation:

⍉(7/2)⊤⎕AV⍳'Äâ\⊥⊥∘)⍞⍞┬#⍞`⍒': The left half of the ghost, without the border. (It is symmetric.) Each character has its high bit set, to prevent selecting non-printing characters from ⎕AV, but only the first 7 bytes are used.
0,⍪⍨0⍪0,0,: add a border of blanks on the left, top, and bottom
1⍪⍨1⍪1,: add the frame on the left, top, and bottom
,∘⌽⍨: join it with its vertical mirror
1+: add 1, because arrays are 1-indexed by default
' '⍵[...]: use that matrix as an index into the string ' '⍵, so each 0 gets mapped to a blank and each 1 gets mapped to ⍵.
⍺,⊂: enclose the matrix and join it to the scale factors
/: right fold with the following function:
/∘⍉: transpose and scale horizontally

MATL, 71 bytes
32hO511-3-12-16-32O6-64-6O25 13-38 17 40 70-511Nq$hYs10H$Bt!P!hi1$lX*Q)

Try it online!
Explanation
The image is horizontally symmetric, so only the left half needs to be coded. Each 10-pixel row is binary coded as a number between 0 and 1023. Active pixels are coded as 0 rather than 1, so the first row is number 0 rather than 1023.
Since consecutive rows differ by a few pixels only, the numbers are further encoded differentially. So each row will be decoded as the cumulative sum of all numbers up to that row, followed by conversion to binary.
The needed numbers are then
0 511 -3 -12 -16 -32 0 6 -64 -6 0 25 13 -38 17 40 70 -511

0 is introduced in MATL using the O function, which avoids a separator with neighbouring numbers. Also, negative signs do not imply extra bytes as they serve as separators.
Once the array has been created, it is cumulatively summed, binary-decoded, and horizontally mirrored. The resulting 2D array is used to index a two-char string to produce the result. This string is of the form '% ', where '%' is an input char.
As noted by @Conor, the code also works with two chars as input. In this case the final string indexed into will be of the form '%_ ', where the input is a two-char string '%_'. The space will simply be ignored, because the indexing array only addresses the first two chars.
32                                             % space (ASCII)
h                                              % concat horizontally with 1st input: char
O511-3-12-16-32O6-64-6O25 13-38 17 40 70-511   % push these numbers
Nq$h                                           % concat all those numbers
Ys                                             % cumulative sum
10H$B                                          % convert to 10-digit binary numbers
                                               % gives 2D array, each number in one row
t                                              % duplicate
!P!                                            % flip horizontally
h                                              % concat horizontally
i                                              % take 2nd input: array [V H]
1$l                                            % matrix oh V×H ones
X*                                             % Kronecker product to increase vertical
                                               % and horizontal scales by V and H resp.
Q                                              % add 1. Converts array of 0,1 into 1,2
)                                              % uses those 1,2 as indices into string

Running it with more than one character of input is really fun!

As of version 16.0.0 of the language, replace commas by spaces

BBC BASIC, 239 236 232 214 bytes
0DEFPROCM(A,B,C)C=C-32:FORU=0TO18*A-1:FORV=0TO20*B-1:Y=U DIVA:X=V DIVB:V.32-C*FNC((X<10)*-X-(X>9)*(19-X),Y):N.:P.:N.:E.
1DEFFNC(X,Y)Z=Y*10+X:=((ASCMI."#Cb^2aC*[#1CF<;)C$;I9I$;EYLb&#",Z/6+1)-35)AND(2^(Z MOD6)))=0

Calling PROCM(1,1,35) produces the ghost made of # symbols. The arguments to PROCM are: horizontal scale, vertical scale, ASCII value of character.
This program will work both for Brandy Basic, and BASIC 2 on an original Model B.

C (gcc), 199 197 bytes
-2 bytes thanks to @JonathanFrech
n,j;f(c,h,v){for(char t[20],i=18;i--;){for(n=10;n--;)t[n]=t[19-n]=((("\xff\0""1;\x7fM3\x7f\x7fON~~|x`\0\xff"[i]<<3)|(i&&i^17?1:7))>>n)&1?c:32;for(j=v;j--;puts(""))for(n=20*h;n--;)putchar(t[n/h]);}}

Try it online!
188 bytes (unprintables)
Courtesy of @JonathanFrech.
n,j;f(c,h,v){for(char t[20],i=18;i--;){for(n=10;n--;)t[n]=t[19-n]=((("\xff\0001;M3ON~~|x`\0\xff"[i]<<3)|(i&&i^17?1:7))>>n)&1?c:32;for(j=v;j--;puts(""))for(n=20*h;n--;)putchar(t[n/h]);}}

Try it online!
Nothing spectacular going on. Like others noticed, the ghost is highly symmetrical. The image itself is 20 units wide, but except for the top and bottom rows, the three right-most columns are identical. This allows us to store half of the image as characters instead of having to use integers:
#######  127     \x7f
           0     \0
##        96     `
####     120     x
#####    124     |
######   126     ~
######   126     ~
#  ###    78     N
#  ####   79     O
#######  127     \x7f
#######  127     \x7f
 ##  ##   51     3
#  ## #   77     M
#######  127     \x7f
 ### ##   59     ;
 ##   #   49     1
           0     \0
#######  127     \x7f

The resulting string was reversed to eke out a few bytes on having a descending for loop (also solving an annoying issue with hexadecimal escapes). Other loops could be flipped without issue thanks to symmetry.
Each character is shifted left and given a border (with special care on first and last rows). Then it's just a matter of outputting the string correctly scaled.
All the for loops makes me feel there is a better way.
C (gcc), 175 bytes (non-ASCII)
Another version, this time courtesy of ceilingcat. Uses some funky non-ASCII characters.
n,j;f(c,h,v){for(char t[20],i=18;i--;){for(n=10;n--;)t[n]=t[19-n]=(L"ǿĀ1;ſM3ſſON~~|x`\0ǿ"[i]*8|(i&&i^17?1:7))>>n&1?c:32;for(j=v;j--;puts(""))for(n=20*h;n--;)putchar(t[n/h]);}}

Try it online!

197 bytes.

@JonathanFrech Ah, thanks!

188 bytes.

@JonathanFrech Neat one, but not too keen on the unprintables.

Do you have any idea why \xff cannot be replaced by ÿ (TIO)?

@JonathanFrech Hm, 0xff should be an invisible character; at least it was back in the old DOS days. (It was the way to make "spaces" in filenames.) Guess it's the magic of codepages.

Batch, 740 722 720 bytes
@echo off
setlocal enabledelayedexpansion
set h=%3
set w=
set s=
for /l %%a in (1,1,%2)do set w=%1!w!&set s= !s!
call:l ####################
call:l #                  #
call:l #       ####       #
call:l #     ########     #
call:l #    ##########    #
call:l #   ############   #
call:l #   ############   #
call:l #   ###  ##  ###   #
call:l #  ####  ##  ####  #
call:l #  ##############  #
call:l #  ##############  #
call:l #  ##  ##  ##  ##  #
call:l #  # ##  ##  ## #  #
call:l #  ##############  #
call:l #  ## ###  ### ##  #
call:l #  #   ##  ##   #  #
call:l #                  #
call:l ####################
exit/b
:l
set l=%*
set l=!l: =%s%!
for /l %%a in (1,1,%h%)do echo !l:#=%w%!

Edit: Saved 18 20 bytes by removing unnecessary spaces.

Seriously, 116 bytes
╩' "3ff 200 203 20f 21f 23f 23f 239 279 27f 27f 266 259 27f 26e 246 200 3ff"s`24╙(¿¡╜'1(Æ' '0(Æ"╛*"£M;R@+εj2└@n`M'
j

That newline is important. Hexdump:
00000000: ca27 2022 3366 6620 3230 3020 3230 3320  .' "3ff 200 203
00000010: 3230 6620 3231 6620 3233 6620 3233 6620  20f 21f 23f 23f
00000020: 3233 3920 3237 3920 3237 6620 3237 6620  239 279 27f 27f
00000030: 3236 3620 3235 3920 3237 6620 3236 6520  266 259 27f 26e
00000040: 3234 3620 3230 3020 3366 6622 7360 3234  246 200 3ff"s`24
00000050: d328 a8ad bd27 3128 9227 2027 3028 9222  .(...'1(.' '0(."
00000060: be2a 229c 4d3b 5240 2bee 6a32 c040 6e60  .*".M;R@+.j2.@n`
00000070: 4d27 0d0a 6a                             M'..j

Same strategy as Dennis's CJam answer, but the values are encoded in hex, rather than XORed with 544, and string manipulation is a lot harder in Seriously.
Try it online!

Stax, 45 bytes
àÄÅ╣>u°↨2ö|dτÅbn╦─▀:ΣFúÇz?⌂É\!n▄§V0Ncó╤½8|δò_

Run and debug it
Explanation:
"<long string>"!E' x+:BA/s|*mn|*:m Full program, implicit input.
"<long string>"!E                  Push 1531747987795407832964332490922049710271411270772589567
                 ' x+              Push a space plus the given character
                     :B            Interpret the number in binary, replacing 0 with ' ' and 1 with the given char
                       A/          Group into pieces of length 10.
                                   Gives the first half of each line.
                         s|*       Repeat each line <vertical scale factor> times
                            m      For each line:
                             n|*     Repeat each character <horizontal scale factor> times
                                :m   Mirror
                                     Implicit output with newline

The third one shows with some colours on my screen. Very nice :-)

Vyxal, 42 bytes
»∆nµOḢrċ:f=¢×⁽Ti∴%β‡zwøÞ»ð?+τ18/ƛƛ⁰*;ṅm¹(…

Try it Online!
»...»                  # Compressed integer representation
        τ              # Decompress using...
     ð?+               # Space and input char
         18/           # Divide into 18 pieces
            ƛ          # Foreach...
             ƛ  ;      # Foreach character
              ⁰*       # Repeat as necesarry
                 ṅ     # Join
                  m    # Palindromise
                   ¹(… # Print (input) times

JavaScript (ES6), 167 bytes
(s,w,h)=>[...`Ǌ56:*

\fLJJSlJ[s5Ǌ`].map(c=>`${t=(c.charCodeAt()^565).toString(2)}${[...t].reverse().join``}
`.replace(/./g,b=>` ${s}`[b].repeat(w)).repeat(h)).join``

Based on @Dennis's answer. I guess you could shave off another byte by using a literal FF instead of \f, but I doubt I can paste one in here. When trying this out you may also want to use \u01CA instead of the Ǌ character.
Sadly prepending a space to the character argument costs a whole 6 bytes.

Python 2, 838 828 618 bytes
Saved 210 bytes by using a string instead of an array, thanks to Dennis for that suggestion, I know I can make even better, but for now its a good improvement.
This is the best I can do, I'm not very good with graphics in command line.
I took the small ghost as base.
I'm using the ascii 219 by default, because with that char, the ghost looks pretty awesome!!!
Golfed
def g(c,s,w,h,l=""):
 x="c-20,c-1,s-18,c-1,c-1,s-7,c-4,s-7,c-1,c-1,s-5,c-8,s-5,c-1,c-1,s-4,c-10,s-4,c-1,c-1,s-3,c-12,s-3,c-1,c-1,s-3,c-12,s-3,c-1,c-1,s-3,c-3,s-2,c-2,s-2,c-3,s-3,c-1,c-1,s-2,c-4,s-2,c-2,s-2,c-4,s-2,c-1,c-1,s-2,c-14,s-2,c-1,c-1,s-2,c-14,s-2,c-1,c-1,s-2,c-2,s-2,c-2,s-2,c-2,s-2,c-2,s-2,c-1,c-1,s-2,c-1,s-1,c-2,s-2,c-2,s-2,c-2,s-1,c-1,s-2,c-1,c-1,s-2,c-14,s-2,c-1,c-1,s-2,c-2,s-1,c-3,s-2,c-3,s-1,c-2,s-2,c-1,c-1,s-2,c-1,s-3,c-2,s-2,c-2,s-3,c-1,s-2,c-1,c-1,s-18,c-1,c-20"
 for r in x.split(","):
  d=r.split("-");l+=d[0].replace("s",s).replace("c",c)*int(d[1])*w
  if len(l)==20*w:print(l+"\n")*h,;l=""

Try it on repl.it
Ungolfed
def pacmanGhost(char = "█", sep = " ", width = 1, height = 1):
    coords = [[[char, 20]], [[char, 1], [sep, 18], [char, 1]],[[char, 1], [sep, 7], [char, 4], [sep, 7], [char, 1]], [[char, 1], [sep, 5], [char, 8], [sep, 5],
         [char, 1]], [[char, 1], [sep, 4], [char, 10], [sep, 4], [char, 1]], [[char, 1], [sep, 3], [char, 12], [sep, 3], [char, 1]], [[char, 1], [sep, 3],
         [char, 12], [sep, 3], [char, 1]], [[char, 1], [sep, 3], [char, 3], [sep, 2], [char, 2], [sep, 2], [char, 3], [sep, 3], [char, 1]], [[char, 1],
         [sep, 2], [char, 4], [sep, 2], [char, 2], [sep, 2], [char, 4], [sep, 2], [char, 1]], [[char, 1], [sep, 2], [char, 14], [sep, 2], [char, 1]],
         [[char, 1], [sep, 2], [char, 14], [sep, 2], [char, 1]], [[char, 1], [sep, 2], [char, 2], [sep, 2], [char, 2], [sep, 2], [char, 2], [sep, 2],
         [char, 2], [sep, 2], [char, 1]], [[char, 1], [sep, 2], [char, 1], [sep, 1], [char, 2], [sep, 2], [char, 2], [sep, 2], [char, 2], [sep, 1], [char, 1],
         [sep, 2], [char, 1]], [[char, 1], [sep, 2], [char, 14], [sep, 2], [char, 1]], [[char, 1], [sep, 2], [char, 2], [sep, 1], [char, 3], [sep, 2],
         [char, 3], [sep, 1], [char, 2], [sep, 2], [char, 1]], [[char, 1], [sep, 2], [char, 1], [sep, 3], [char, 2], [sep, 2], [char, 2], [sep, 3],
         [char, 1], [sep, 2], [char, 1]], [[char, 1], [sep, 18], [char, 1]], [[char, 20]]]
    for coord in coords:
        line = ""
        for element in coord:
            line = "{}{}".format(line, element[0] * element[1] * width)
        for i in range(height):
            print(line)
    return

Test

You would achieve a much better score if you simply saved the uncompressed, unscaled image in a string. Also, you are wasting bytes on default arguments and the return statement.

There is no such thing as ASCII code 219.

Python 2, 244 bytes
p,w,h=raw_input().split()
for i in range(18): mystr=''.join([(p if i=='1'else' ')*int(w)for i in str(10+(i%17==0))+format(ord('\xff\x00\x03\x0f\x1f??9y\x7f\x7ffY\x7fnF\x00\xff'[i]),'08b')]);print'\n'.join([mystr+mystr[::-1]for j in[1]*int(h)])

Python 2, 169 bytes
def a(s,x,y):
    z=[]
    for c in u'\u01df #/?\x1f\x1f\x19Y__Fy_Nf \u01df':
        b="".join((s if d=="1"else" ")*x for d in bin(ord(c)^544)[2:]);z+=[b+b[::-1]]*y
    print"\n".join(z)

Try it online!
Explanation:
u'\u01df #/?\x1f\x1f\x19Y__Fy_Nf \u01df'

As in Dennis's answer, each character in this string represents the binary representation of one line of the left half of the "image", XOR 544.
for c in <unicode string>:

For each character in the string, do the following:
    bin(ord(c)^544)

Transform the character into its integer representation, then perform a binary XOR with 544. Then transform this integer into a character string of its binary representation, like '0xb1111111111'.
    for d in <string>[2:]

For each character in the sting, starting at position 2 (which skips the 0b at the beginning), do the following:
    (s if d=="1"else" ")*x

If the character == "1", replace it with the supplied character, otherwise replace it with a space. Then copy this character x times. (x=0 will result in an empty string.)
    b="".join(<previously generated list of strings>)

Concatenate all strings into one long string, separated by an empty string "".
    z+=[b+b[::-1]]*y

make a string of b + the reverse of b, then create an array containing y instances of this string (y=0 will produce an empty list []), then append this list to the list z.
print"\n".join(z)

Finally, print to screen each of the produced strings, separated by line breaks.

Added some text color using ASCII Escape Codes to match the original image.
C (msvc), 468 bytes
#include <stdio.h>
main(){char*i[]={"2B14B2B","2B5B4C5B2B","2B3B8C3B2B","2B2B10C2B2B","2B1B12C1B2B","2B1B12C1B2B","2B1B3C2W2C2W3C1B2B","2B4C2W2C2W4C2B","2B14C2B","2B14C2B","2B2C2W2C2W2C2W2C2B","2B1C1W2C2W2C2W2C1W1C2B","2B14C2B","2B2C1B3C2B3C1B2C2B","2B1C3B2C2B2C3B1C2B","2B14B2B"};for(int y=0;y<16;y++,puts("\x1b[0m")){for(char*p=i[y];*p;){int n=strtol(p,&p,10);char c=*p++;char*color=(c=='B')?"\x1b[40m":(c=='C')?"\x1b[44m":(c=='W')?"\x1b[47m":"\x1b[0m";printf("%s%*s",color,n*2,"");}}}

Try it online!
Output
Windows Command Prompt:

280 bytes


text:
Follow incomplete directions
A friend of yours has given you directions to the best restaurant in town. It's a series of left and right turns. Unfortunately, they forgot to mention for how long you need to go straight ahead between those turns. Luckily you have a street map with all the restaurants on it. Maybe you can figure out which restaurant they meant?
Input
The map is given as a rectangular grid of ASCII characters. . is a road, # is a building, A to Z are the various restaurants. You start in the top left corner, going east. Example:
.....A
.#.###
B....C
##.#.#
D....E
##F###

Your friend's instructions will be given as a (potentially empty) string or list of characters containing Ls and Rs.
Output
You can walk any path that corresponds to the left and right turns in the input string, provided that you take at least one step forward before each of them, as well as at the end. In particular this means if the string starts with R you cannot go south immediately in the left-most column. It also means you can't turn around 180° on the spot.
You cannot walk through buildings or restaurants except the one you reach at the end. You may assume that the top left corner is a ..
You should output all the restaurants that can be reached with your friend's instructions, as a string or list.
You may assume that the instructions will lead to at least one restaurant. E.g. a single L would be invalid for the above map.
Some examples for the above map:
<empty> A
R       F
RR      B,D
RL      C,E
RLRL    E
RLLR    C
RLLL    B
RLRR    D
RLRRRR  A,C
RLLLRLL B

Note in particular that R doesn't reach B.
You may write a program or function, taking input via STDIN (or closest alternative), command-line argument or function argument and outputting the result via STDOUT (or closest alternative), function return value or function (out) parameter.
Standard code-golf rules apply.
Additional Test Cases
Here is a larger map, courtesy of Conor O'Brien (which I modified a bit):
.......Y..........................######
.####.....#.##....##..######....#.###.##
B.........#.##.#..##....##...##.#.#P...#
.#.#####..#.##..#.##....##.#....#.####.#
.#.#...C..#.##...G##..#.##.#....#.#....#
.#.#.#.#..#.####.###.#..##.#....#.#.NO.#
.#.#A#.#..#.##...F###...##.#.##.#......#
.#.###....#.##....##....##.#....###....#
.#.....##...##....##...D##........###R.#
.#.##..##...##E...##..######....####...#
.....X....#.#.....................##S.T#
###########.###########M############...#
#................................###.#.#
#.#########.########.######.#.######.#.#
#......V#.....######.IJ...........##.#.#
#########.###......ZH############L##.#.#
#########.##########.###############.#.#
####K##...##########.#....#..........#.#
####....########U......##...#######Q.#.#
#####################################W.#

And here are a few selected lists of directions and their expected results:
<empty>                                 Y
RR                                      B
RLL                                     Y
RLRR                                    B,C,X
RLLLRRR                                 G
RLRLRLRL                                I,Z
RLLRRRLRRLRR                            C,D,F,G,Y
RLRRLLRLLLRL                            B,C,Y
RLLRRLRRRLLLL                           F,M,N,O,Y
RLRRLLLRRRRLLLL                         F,M,Y
RLRRLRRRRRRRRRR                         E,F,Y
RLRRRLLLRLLRRLL                         M,N,O
RLLRRLRRLRLRLRRLLR                      E,U
RLRLLRLRRLRRRRRLRL                      F,G,I,Z
RLLRRLLRLLRRRLRRLLRR                    W
RLLLRRRLRRLLLLLRLLLLLL                  D,G,X
RLRLLRLRRLRLRRRLRLLLRR                  B,C,E,J,X
RLRLRLLLLRLRRRRRRLRLRRLR                Y
RLRLRRRLRLLLLRLRRLLLLRLLRRL             E,M,X
RLRLLLRRRLLLRLLRLLRLRRLRLRR             B,E,F,K
RLRRRLLLLLLLLLLLLLLLRRRRLLL             A,B

Bonus question: is there an input that results in only I or only U? If so, what's the shortest such path?

Perl, 150 149 146 145 141 140 138 136 135 133 130 126 125 124
Added +7 for -F -Xn0i
An initial attempt.
Run with the map on STDIN and the directions after the -i option, e.g.
perl -F -Xn0iRL incomplete.pl
.....A
.#.###
B....C
##.#.#
D....E
##F###

Close STDIN with ^D or ^Z or whatever works on your operating system.
incomplete.pl:
%P=0;$^I=~s``{%;=!/
/;%P=map{$_|=$F[$^H=$_+=(1,@+,-1,"-@+")[$d&3]]=~/(\w)|#|^$/*~!\$;{$1}}(%P)x@F}$d-=B&$'^u`eg;print%

Replace the ^H by the literal control character to get the given score
Bonus question:

There is no input that results in only I
The shortest input that results in only U is RLLRRLLRLRLRRLRRLRLRLRRLLR
The longest input needed to result in a unique set is RLLRRRLRLRLLLRRLRLLLLLRRRLLRRRLLLLLLLRRLRRRR which gives B O R

The Ton Hospel? :)

There is only one alien with that name

@TonHospel It's a honor to have you here.

Python 2, 180 177 168 163 161 158 bytes
def a(v,o,c=0,A=0,d='.',O={0}):
 while'.'==d:w=v.find('\n');c+=[1,~w,-1,w+1][A%4];d=v[c];o>v<a(v+' '*w,o[1:],c,ord(o[0])-~A,d);d>v>o<O.add(d)
 return`O`[9::5]

Parameter v is the map as a string; o is the LR string.
Mitch Schwartz saved 2 3 10 lots of bytes. Thanks!
I saved two bytes by setting O={0} and returning `O`[9::5], which might not be very portable: it assumes that hash(0) == 0, I think, because that causes the order of elements in repr(O) to be
set([0, 'A', 'B', 'C'])

and creatively slicing that string gets me the answer.

I think this suffers from an exponential explosion if you run it on a big almost empty grid with longish turn strings

Oh, yes, it's an absolute performance disaster. It works for the example grids, though!

C++ 364
Thanks to @ceilingcat for finding a much better (and shorter) version
#import<bits/stdc++.h>
#define M m[y][x]
using namespace std;vector<string>m;char n[99],j;int r(int x,int y,char*d,int z){for(;z%2?y+=z-2:(x-=z-1),y>=0&y<m.size()&x>=0&&m[y][x]&&!*d|M==46&&(!*d?n[M]+=M>64&M<91,M==46:!r(x,y,d+1,z+(*d-82?*d==76:3)&3)););}main(int c,char**v){for(string l;getline(cin,l);)m.push_back(l);for(r(0,0,v[1],0);j<99;j++)n[j]&&cout<<j<<" ";}

Try it online!

A clarity improvement (no change) along with incorporating a C++ tip: 384

@ceilingcat  I have no idea why I wrote that since there is always an argument...

Haskell, 257 bytes
import Data.List
t=transpose
r=reverse
l=length
f(m,x,y)=[(m,n,y)|n<-[x+1..l(m!!0)-1],notElem '#'[m!!y!!z|z<-[x..n]]]
i!c=[last$(t.r$m,l m-y-1,x):[(r.t$m,y,l(m!!0)-x-1)|c/='L']|(m,x,y)<-i>>=f]
m#i=intersect['A'..'Z'][a!!y!!x|(a,x,y)<-foldl(!)[(m,0,0)]i>>=f]

Try it Online!
Calling m#i for a map m with a list of instructions i outputs the possible restaurants.

Python3, 333 bytes:
m,n={1:{0:3,1:4},2:{0:4,1:3},3:{0:2,1:1},4:{0:1,1:2}},{1:(0,1),2:(0,-1),3:(1,0),4:(-1,0)}
def f(b,p,x,y,d):
 try:
   if b[x][y]=='.':
    x+=n[d][0];y+=n[d][1]
    if 64<ord(r:=b[x][y])<91 and not p:yield r
    if x>=0and y>=0:yield from f(b,p,x,y,d);yield from f(b,p[1:],x,y,m[d][p[0]=='L'])
 except:1
q=lambda b,p:set(f(b,p,0,0,1))

Try it online!

source: Stack Exchange

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

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

sort: votes


text:
Resolve SAS macro variables
The SAS programming language is a clunky, archaic language dating back to 1966 that's still in use today. The original compiler was written in PL/I, and indeed much of the syntax derives from PL/I. SAS also has a preprocessor macro language which derives from that of PL/I as well. In this challenge, you'll be interpreting some simple elements of the SAS macro language.
In the SAS macro language, macro variables are defined using the %let keyword and printing to the log is done with %put. Statements end with semicolons. Here are some examples:
%let x = 5;
%let cool_beans =Cool beans;
%let what123=46.lel"{)-++;

Macro variable names are case insensitive and always match the regular expression /[a-z_][a-z0-9_]*/i. For the purposes of this challenge, we'll say the following:

Macro variables can only hold values consisting entirely of printable ASCII characters except ;, &, and %
There will be no leading or trailing spaces in the values
The values will never be more than 255 characters long
Values may be empty
Brackets and quotes in the values may be unmatched
There can be any amount of space before and after the = in the %let statement and this space should be ignored
There can be any amount of space before the terminal ; in the %let statement and this space should similarly be ignored

When a macro variable is called, we say it "resolves" to its value. Macro variables are resolved by prepending &. There is an optional trailing . that denotes the end of the identifier. For example,
%put The value of x is &X..;

writes The value of x is 5. to the log. Note that two periods are required because a single period will be consumed by &X. and resolve to 5. Also note that even though we defined x in lowercase, &X is the same as &x because macro variable names are case insensitive.
Here's where it gets tricky. Multiple &s can be strung together to resolve variables, and &s at the same level of nesting resolve at the same time. For example,
%let i = 1;
%let coolbeans1 = broseph;
%let broseph = 5;

%put &&coolbeans&i;  /* Prints broseph */
%put &&&coolbeans&i; /* Prints 5 */

The innermost &s resolve first, and resolution continues outward. Variable name matching is done greedily. In the second %put statement, the processor makes the following steps:

&i resolves to 1, and the innermost leading & is consumed, giving us &&coolbeans1
&coolbeans1 resolves to broseph, giving us &broseph
&broseph resolves to 5.

If there are trailing .s, only a single . is consumed in resolution, even if there are multiple &s.
Task
Given between 1 and 10 %let statements separated by newlines and a single %put statement, print or return the result of the %put statement. Input can be accepted in any standard way.
You can assume that the input will always be valid and that the %let statements will preceed the %put statement. Variables that are defined will not be redefined in later %let statements.
If actually run in SAS, there would be no issues with variables resolving to variables that don't exist and everything will be syntactically correct as described above.
Examples

Input:
%let dude=stuff;
%let stuff=bEaNs;
%put &&dude..;

Output:
bEaNs.

Input:
%let __6 = 6__;
%put __6&__6;

Output:
__66__

Input:
%let i=1;
%let hOt1Dog = BUNS;
%put &&HoT&i.Dog are FUNS&i!");

Output:
BUNS are FUNS1!")

Input:
%let x = {*':TT7d;
%put SAS is weird.;

Output:
SAS is weird.

Input:
%let var1   =  Hm?;
%let var11 = var1;
%let UNUSED = ;
%put &&var11.....;

Output:
Hm?....

Note that &&var11 matches var11 since name matching is greedy. If there had been a ., i.e. &&var1.1, then var1 would be matched and the extra 1 wouldn't be part of any name.

This is code golf, so the shortest solution in bytes wins!

How does the output from test case 1 have a period? Shouldn't &stuff. remove the period?

@GamrCorps I should specify: Only a single trailing period is consumed in resolution.

@GamrCorps Edited to specify and added it as a test case.

so &&&&&&&&&a...................... would still only remove one period?

@GamrCorps Yes.

Python 3, 354 341 336 bytes
import re
S=re.sub
def f(x):
	r=x.splitlines();C=r[-1].strip('%put ');D=0
	while D!=C:
		D=C
		for a in sorted([l.strip('%let ').replace(" ","").split(';')[0].split('=')for l in r[:-1]],key=lambda y:-len(y[0])):
			s=1
			while s:C,s=re.subn('&'+a[0]+'(\.?)',a[1]+'\\1',S('+\.([^\.])','\\1',C),0,re.I)
	return S('+\.?','',C)

Try it online!
edit: some easy shortening
edit: reverse sort by -len(...) instead of [::-1] (5 bytes), thanks to Jonathan Frech!
Ungolfed
import re
S=re.sub # new name for the function re.sub()
def f(x):
    r=x.splitlines() # input string to list of rows
    C=r[-1].strip('%put ') # get the string to put (from the last row)
    D=0
    while(D!=C): # iterate until the result does not change
        D=C
        for a in                                                                                : # iterate over the list of variables
                 sorted(                                                                          ,key=lambda y:len(y[0]),reverse=1) # sort list for greediness by decreasing var.name lengths
                        [l.strip('%let ') # cut the 'let' keyword
                                         .replace(" ","") # erase spaces
                                                         .split(';')[0] # cut parts after ';'
                                                                       .split('=') # create [variable_name,value] list
                                                                                for l in r[:-1]] # for each row but last
            s=1
            while(s): # iterate until the result does not change
                C,s=re.subn( # substitute
                            '&'+a[0]+'(\.?)', # &varname. or &varname
                                                 a[1]+'\\1', # to value. or value
                                                              S('+\.([^\.])','\\1',C), # in the string we can get from C erasing ('s)(.) sequences if the next char is not .
                                                                                0,re.I) # substituting is case insensitive
    return S('+\.?','',C) # erase smileys and one .

I would suggest taking a lot at the Python tips page. Trivial optimizations such as non-compound statement concatenation (;), parentheses reduction (if(...) -> if ...) and list operations (,reverse=1 -> [::-1]) can easily save some bytes.

Thanks! I have read it before, but it was a long time ago, and I forgot some tricks.

You are welcome. len(y[0]))[::-1] can be -len(y[0])).

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


text:
Implement my method of adding numbers mentally
Note: This challenge has been changed to eliminate the strict whitespace manipulation requirements that made this challenge low-quality. Some rules regarding whitespace have been changed.

I'm rather good at mental math, particularly adding positive integers in my head. Here is my method for adding the numbers together (n is a positive integer):

Arrange the numbers in a horizontal row
Reorder the numbers so the 2n-1th number in the sequence is the nth smallest number in the sequence and the 2nth number in the sequence is the nth largest number in the sequence.
Add the 2n-1th number to the 2nth number. Print the results of these additions on the next line.
Repeat the previous step until a final result is obtained.

Your challenge is to write a program or function that prints each of the above steps until the sum of all the inputted numbers is reached. The final result must be separated from the adding steps by an additional blank newline. You may assume that all numbers inputted are unique so as to avoid confusion with the second step (and that the input is not empty). Numbers can be inputted in any format. Numbers in rows should be separated from each other by one space.
Test cases
For each of these, the input and output start a newline after their labels.
Case 1
Input:
314 495 767 214 141

Output:
141 767 214 495 314   //Reordering the input
908 709 314           //Adding
1617 314

1931                  //Final result

Case 2
Input:
884

Output:
884   //Reordering the input

884   //Final result

Note that there is no adding step here because the reordering of the input produces the final result.
Case 3
Input:
5033 7825 2167 6374 5050 5389 3915 7231 3025 1954 7249 5143 7567 9857 462 3504 6165 6681 6361 6367

Output:
462 9857 1954 7825 2167 7567 3025 7249 3504 7231 3915 6681 5033 6374 5050 6367 5143 6361 5389 6165
10319 9779 9734 10274 10735 10596 11407 11417 11504 11554
20098 20008 21331 22824 23058
40106 44155 23058
84261 23058

107769

This is code golf. Standard rules apply. Answer with the fewest bytes wins.

Hopefully your code will get the final result for the final test case faster than I did mentally. Though given that this is the Code Golf website, I'm not so sure :P

You expect us to write fast code????  Have you not been a member for 6 months? :P

That comment will probably be deleted in a mo, the mods said comments like that can be flagged as not constructive.  Try chat instead.

Does the output after the initial row need to have the same spacing as shown, or is two spaces between numbers fine for every row?

@Mego How is this edit?

Well, it’s not very fair towards the Ruby answer I’d already spent a fair amount of time golfing. You should consider using the sandbox in the future. :(

I supp @Lynn and so won't add an answer as it's not targeting the same challenge anyway.

Ruby, 148 144 142 bytes
f=->a{a.sort!
(a.size/2).times{a[~-$.+=2,0]=a.pop}
a*="  "
puts$`+$&+$'while a.gsub!(/\d+\s+\d+/){"#{eval$&.split*?+}".ljust$&.size}
puts'',a}

So disappointingly long... To run:
f[ [314,495,767,214,141] ]

Prints:
141  767  214  495  314
908       709       314
1617                314

1931


text:
Visualize long addition with ASCII art
Totally not inspired by Visualize long division with ASCII art ;)
Your job is to show long hand addition with ASCII art. You solve longhand addition by adding up the columns right to left, placing the value of the ones place in the result, and carrying the tens place over to the top of the next column.
Input
Input can come basically in any format you want, just as long as you take from 2 to 9 numbers as input.
Output
The formatting here likely matches how you learned it in school:
carry row
 number1
 number2
     ...
+   numX
--------
  result

You can have just about any amount of trailing whitespace you want here ;)
Examples
50, 50

1
 50
+50
---
100

1651, 9879

1111
 1651
+9879
-----
11530

6489789, 9874, 287

   1122
 6489789
    9874
+    287
--------
 6499950

Visualize long subtraction with ASCII art: Coming straight to you in 6 months

Not quite, it's on my list ;)

Actually I was taught to put the carry row under the result.

How should we handle 9+9+9+9+9+9+9+9+9+9+9+9+9?

@Downgoat ...you take from 2 to 9 numbers as input...

@Pietu1998 Yeah, I didn't want to figure out how to carry one hundred :\

To generalize to larger number of input values, we could place spaces between each integer and adjust as appropriate, but this changes the challenge a bit. (Maybe more than just a bit) Or, I guess the extra bits would just need to be added to the appropriate columns, easy peasy, right? :)

@CatsAreFluffy a tricky part with subtraction might be the strikethrough for borrowing.

@MichaelT It could, but I have an idea for how it would work.

Stax, 48 bytes
¢≈3ä⌂♪s♂N#┼DuΦeÑα▼dσÿóYRC├[♂≡α%┴&UZ≤§╟Ω^j╪♪■∞xëa

Run and debug it
) is a lifesaver here, but it still feels too long.

Pyth, 59 58 bytes
L.[dJhl`eSQ`b:jk_.u/+NsYT.t_MjRTQ00\0djbyMPQXyeQ0\+*J\-ysQ

Try it online. Test suite.
Way too long. Should golf more.
Explanation
L                  helper function y = lambda b:
        eSQ          largest number in input
      l`             length as string
     h               increment
    J                save to J
 .[d       `b        pad argument with spaces to that length

                             carry row:
                jRTQ           each input to base 10
              _M               reverse each result
            .t      0          transpose, padding with zeroes
    .u               0         cumulative reduce from 0:
         sY                      sum digits of column
       +N                        add previous carry
      /    T                     floor-divide by 10
   _                           reverse
 jk                            join by ""
:                     \0d      replace 0 by space

          number rows:
    PQ      all input numbers but last one
  yM        pad to correct length
jb          print on separate lines

           last number row:
  eQ         last input number
 y           pad to correct length
X   0\+      change first char to +

        separator row:
 J        width of input (saved in helper)
* \-      that many dashes

       result row:
 sQ      sum of inputs
y        pad to correct length

Batch, 326 bytes
Byte count does not include explanation, of course.
@echo off
set t=%*                            Get the space separated parameters
set t=%t: =+%                       Change the spaces into + signs
set/at=%t%,l=p=1                    Add together, and initialise length and power
set c=                              Carry string
set d=-                             Dash string
:l                                  Loop though each power of 10
set/al+=1,p*=10,s=t/p               Divide the total by the power
for %%n in (%*)do set/as-=%%n/p     Subtract each parameter divided
set c=%s%%c%                        Anything left must have been carried
set d=-%d%                          Add a - to the line of dashes
if %p% leq %t% goto l               Keep going until we run out of powers
echo(%c:0= %                        Delete any zeros in the carry and output it
:i                                  Loop through each parameter
set n=%d:-= %%1                     Pad it with a whole bunch of spaces
call set n=%%n:~-%l%%%              Extract the rightmost characters
if "%2"=="" set n=+%n:~1%           Insert a + before the last parameter
echo %n%                            And output it
shift                               Move to the next parameter
if not "%1"=="" goto i              Until they are all consumed
echo %d%                            Output the line of dashes
echo  %t%                           Output the total (with an indent for the +)

JavaScript (ES6), 199 bytes
a=>[[...t=` `+a.reduce((t,n)=>t+n)].map((_,i)=>a.reduce((c,n)=>c-n[i],90+t[i])%10||` `),a=a.map(n=>(` `.repeat(l=t.length)+n).slice(-l))).join``,...a,`-`.repeat(l),t].join`\n`.replace(/ (?=.*\n-)/,`+`)

Where the first \n represents a literal newline character, while the second one is a two-character regexp escape sequence. Explanation:
a=>[                            Accept an array of numbers
 [...                           Split the total into digits
  t=` `+a.reduce((t,n)=>t+n)    Calculate the total and add a space
 ].map((_,i)=>a.reduce((c,n)=>  For each column
  c-n[i],90+t[i])               Subtract the column from the total
  %10||` `),                    Deduce the carry that was needed
  a=a.map(n=>                   For each input value
   (` `.repeat(l=t.length)+n)   Pad to the length of the total
    .slice(-l))                 Remove excess padding
 ).join``,                      Join the carries together
 ...a,                          Append the padded input values
 `-`.repeat(l),                 Append the dividing line
 t].join`\n`                    Append the total and join together
  .replace(/ (?=.*\n-)/,`+`)    Insert the + on the line above the -

The carry calculation works by taking the total digit, prefixing 90, subtracting all the input value digits in that column, and taking the result modulo 10. (The prefix is 90 rather than 9 so that the leading column generates a blank carry space.)


text:
Build a Calculus Interpreter I
A struggling manufacturer named Tennessee Instrumental is desperate to get into the calculator business.  Problem is, they don't have any software engineers on payroll, and the deadline is coming up fast.
It's your job to help TI configure a basic calculus-ready calculator that can simplify expressions input as strings, and as a bonus (since they're on such a tight schedule), they don't care what language you use to get there!  They do, however, care about how much space you take up.  Not very good with hardware, it seems.  Keep it brief, fewest bytes gets you hired.
Goal
Create a function which can simplify a basic calculus expression
Your calculator must be able to perform the following operations:

+ Addition
- Subtraction and Negation
* Multiplication
/ Division
^ Exponentiation
() Parenthetical Reduction
()' Derivation (first order)

Your calculator must also be able to use x as a placeholder variable.  Do not solve for x.  That will come in time.
Input
Input is a string containing the plaintext version of the expression you're looking to simplify.  The only valid input characters are 0-9, x, +, -, *, /, ^, (), ', and .  Some examples of valid inputs are listed below:
"1"
"5 + 8"
"(5x + 3)(4x + 2)"
"4x - 9x + 15"
"24x / 6"
"5x^2 + 14x - 3"  // Use ^ for exponentiation
"(20x^2)'"        // Use ()' for derivation

Output
Output is a string containing the plaintext version of the expression after simplification.
The only acceptable operators left over are +,  -, /, and ^.  Multiples of variables should be indicated as 2x, -5x, etc.  Fractions should be reduced as far as possible, and parentheses and derivations must be completely eliminated, with the exception of cases such as ln(x) which syntactically cannot be made to make sense without them.
The input examples from above should output as follows:
"1"                => "1"
"5 + 8"            => "13"
"(5x + 3)(4x + 2)" => "20x^2 + 22x + 6"
"4x - 9x + 15"     => "-5x + 15"
"24x / 6"          => "4x"
"5x^2 + 14x - 3"   => "5x^2 + 14x - 3"
"(20x^2)'"         => "40x"

Last but not least, if a derivation function exists in your language, you may not use it.  Derivations must be done as manually as possible.  Whitespace around the basic four operators and lack of whitespace around ^ and within () is preferred.

What about if my language has a built-in symbolic calculator? Also, 1x/2 or 1/2x or 0.5x or x/2?

When you say we're not allowed to use a built-in symbolic differentiator, are we allowed to use built-in functions for everything else?

@ASimmons I'd say the rest is probably acceptable - what did you have in mind?

@Lynn x/2 is the preferred answer, 1/2x is a different value altogether (1/(2x) reduced).

I usually work in Mathematica so converting the string to an expression would yield a reduced version.

@ASimmons Ah, I see what you mean. I'll allow it, it's definitely a big advantage but them's the breaks.

Very related

The spec states that "parentheses and derivations must be completely eliminated", but that isn't necessarily possible with the set of operators given. E.g. (2^x)' requires ln to eliminate the derivative.

@PeterTaylor Good catch! I will amend the question

For clarification: I voted to close as too broad, despite what the banner says.

Mathematica, 159 Bytes
ToString@Expand@ToExpression[StringReplace[#,"("~~a__~~")'"->"d["~~ a ~~"]"]<>"//.{d[a_ x^n->a n x^(n-1),d[x]->1,d[a__]/;a~FreeQ~x->0,d[a__+b__]->d[a]+d[b]}"]&

NOTE: While this works on all the examples it won't currently work on all sensible differentiable input because it doesn't balance brackets when looking for derivatives. I'll change this once I've had the time to think of a sufficiently concise way of doing it. I'm sure there's some other stuff that goes wrong too, so please let me know if you spot something! There are a few bytes that are easily golfed off too, I'll get to those..


text:
Manage Trash So
It's become somewhat of a tradition in PPCG that some users temporarily change their names by an anagram (a new name formed by reordering the letters of the old).
Sometimes it gets difficult to find out who is who. I could use a program or function to tell if two phrases are anagrams of each other.
The challenge
The program or function should take two strings and produce a truthy result if they are anagrams of each other, and falsy otherwise.
Rules

Input will only contain letters (ASCII 65 to 90 and 97 to 122), digits (ASCII 48 to 57) or space (ASCII 32).
The anagram relation is independendent of case. So "Arm" and "RAM" are anagrams.
Spaces don't count either. So "keyboard" and "Barked Yo" are anagrams
All builtins allowed
Input format is flexible (two strings, an array of two strings, a string containing both phrases with a suitable separator ...)

Code golf. Fewest bytes wins.
Test cases
Truthy:
Lynn, Nyl N
Digital Trauma, Tau Digital Arm
Sp3000, P S 3000
Manage Trash So, Those anagrams

Falsy
Calvins Hobbies, Helka Homba
Android, rains odd
In between days, bayed entwine
Code golf, cod elf got

Related but different (only letters, no case, no spaces)

This question's title is very perplexing to someone who's not had enough coffee. +1 :D

@DonMuesli I would argue that this is still a dupe. The slight changes are very trivial.

Manage Trash So, Those anagrams. Nice.

So, the anagrams...

Scour A Gnomic Put is essentially my only choice ._.

Wait no! Racing Scoot Um Up is so much better.

05AB1E, 9 8 bytes
Code:
lvyð-{}Q

Explanation:
l         # Lowercase the strings
 vy   }   # Map over the list, for each...
   ð-     #   remove spaces
     {    #   and sort
       Q  # Check equality

Try it online!

... but 2 bytes less! Well done!

It's lvyðK{}Q now.

-2 bytes lεá{}Ë. 5+ years later.. ;)

Retina, 25
i+`(\w)(.*,.*)\1
$2
^\W*$

Try it Online! Additionally, you can run a modified multi-line version.
Delete letters from before the comma along with their matches after the comma. If we have no letters left then it was an anagram.

For Retina, if a positive number could be considered a failure, and zero be considered success, this could be three bytes shorter by using \w as the last stage.

\W will not work for the case of: Calvins Hobbies, Calvin's Hobbies

@dev-null "Input will only contain letters (ASCII 65 to 90 and 97 to 122), digits (ASCII 48 to 57) or space (ASCII 32)"

Pyth, 11 10 bytes
Thanks to @FryAmTheEggman for teaching me the power of ;!
qFmSr-d;0Q

Try it here!
Takes a list of two strings as input.
Explanation

qFmSr-d;0Q    # Q = input

  m      Q    # map Q with d as lambda variable
     -d;      # filter spaces out of the string
    r   0     # convert to lowercase
   S          # sort all characters in string
qF            # Unfold resulting list and check for equality

Python 2, 63 61 bytes
lambda*l:len({`sorted(s.lower())`[2::5].strip()for s in l})<2

An anonymous function that, in fact, takes n arguments and determines if all n of them are mutual palindromes! f("Lynn", "Nyl N") returns True.
This set comprehension trick is by xnor. It saved two bytes, but the old approach looked very neat:
exec"a=`sorted(input().lower())`[2::5].strip();a"*2;print a==aa

\sorted(input().lower())`.strip(" [',")` is the same length :/

The exec thing is clever but seems too complex. You can do better with lambda*l:len({`sorted(s.lower())`[2::5].strip()for s in l})<2.

Thanks! I'm a bit disappointed – it looked very cool. Keeping it in the post anyway.

Jelly, 12 bytes
ḟ€⁶O&95Ṣ€QLḂ

Try it online!
How it works
ḟ€⁶O&95Ṣ€QLḂ  Main link. Input: A (list of strings)

  ⁶           Yield ' '.
ḟ€            Filter it from each string.
   O          Apply ordinal to all characters.
    &95       Take bitwise AND with 95 to make the ordinals case-insensitive.
       Ṣ€     Sort each list of ordinals.
         Q    Deduplicate the list.
          L   Get the length.
           Ḃ  Compute the length's parity (1 -> 1, 2 -> 0).

Alternate version (9 bytes)
Jelly's uppercase atom had a bug, and Jelly still had no built-in to test lists for equality...
ḟ⁶ŒuṢµ€⁼/

Try it online!
How it works
ḟ⁶ŒuṢµ€⁼/     Main link. Input: A (list of strings)

     µ€       Map the chain to the left over A.
 ⁶            Yield ' '.
ḟ             Filter it from the string.
  Œu          Cast to uppercase.
    Ṣ         Sort.
       ⁼/     Reduce by equality.

MATL, 11 bytes
2:"jkXvS]X=

EDIT (May 20, 2016) The code in the link uses Xz instead of Xv, owing to recent changes in the language.
Try it online!
2:"     ]       % do this twice
   j            % read input line as a string
    k           % convert to lowercase
     Xv         % remove spaces
       S        % sort
         X=     % are they equal?

Did you just change your name for that challenge?

@DenkerAffe I had been thinking about it for some time. I just made it coincide with the challenge :-)

Don Muesli lol. So you are the Lord of Muesli Luis!? Is this how you keep your healthy complexion?

@rayryeng Heyyy! Good to see you here, Ray! Get back to golfing!

I promise I will :) once this course ends... I see you are learning CJam now too. Very nice!

@rayryeng It's a nice language, and much easier than it seems :-)

Javascript, 69 61 60 59 bytes
1 byte off thanks @ӍѲꝆΛҐӍΛПҒЦꝆ. 1 byte off with currying (pointed out by @apsillers)
n=>m=>(G=s=>[]+s.toLowerCase().split(/ */).sort())(n)==G(m)

f=n=>m=>
    (G=s=>[]+s.toLowerCase()
        .split(/ */)
        .sort()
    )(n)==G(m)

F=(n,m)=>document.body.innerHTML+=`<pre>f('${n}')('${m}') -> ${f(n)(m)}</pre>`

F('Luis Mendo','Don Muesli')
F('Calvins Hobbies','Helka Homba')
F('Android','rains odd')
F('In between days','bayed entwine')
F('Code golf','cod elf got')
F('Lynn','Nyl N')
F('Digital Trauma','Tau Digital Arm')
F('Sp3000','P S 3000')
F('Manage Trash So','Those anagrams')

Very nice, filtering out spaces and converting to an array at the same time!

Very nice. You can save one byte using currying, which the community has decided is an acceptable form of arguments: n=>m=>...

Try n=>m=>(G=s=>[]+s.toLowerCase().split(/\S/).sort())(n)==G(m). Using split instead of match should save you a byte.

@ӍѲꝆΛҐӍΛПҒЦꝆ. No, because suppose s='db cz'... Now s.match(/\S/g).sort() results in ['b','c','d','z']... and s.split(/\s/).sort() results in ['cz','db']

@ӍѲꝆΛҐӍΛПҒЦꝆ. But... looking into your idea, I changed it a bit and saved one byte... thanks!

CJam, 11 12 14 bytes
3 2 bytes removed thanks to @FryAmTheEggman
{lelS-$}2*=

Try it online!
{      }2*       e# do this twice
 l               e# read line as a string
  el             e# make lowercase
    S-           e# remove spaces from string
      $          e# sort
          =      e# compare strings

@FryAmTheEggman Thank you!

@FryAmTheEggman Thanks again! I still have much to learn about CJam :-)

Your code is secretly laughing. lel.

Or is it a one? lel ==> 1e1 No one knows. It is a mystery.

Seriously, 11 9 bytes
2`,ùSô`n=

Try It Online!
Everyone seems to be using the same algorithm. Here it is yet again.
2`    `n          Do it twice
  ,               Read a string
   ù              Make it lowercase
    S             Sort
     ô            Strip spaces.
        =         Check equality.

Edit: realized sorting does work correctly on strings, and sorts spaces to the front so strip() will work.

C, 165 bytes
#define d(x) int x(char*a,char*b){
d(q)return*a&224-*b&224;}
#define n(x) for(qsort(x,strlen(x),1,(__compar_fn_t)q);*x<33;x++);
d(s)n(a)n(b)return strcasecmp(a,b);}

Readable and in working context,
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

// start of comparison
int q(char *a, char *b){
     return ((*a)&0xdf)-((*b)&0xdf); // case-insensitive
}
int s(char *a, char *b){
    for(qsort(a,strlen(a),1,(__compar_fn_t)q); *a<33; a++) /**/;
    for(qsort(b,strlen(b),1,(__compar_fn_t)q); *b<33; b++) /**/;
    return strcasecmp(a,b);
}
// end of comparison

int main(int i, char **v){
    printf("'%s' '%s'", v[1], v[2]);
    printf("=> %d\n", s(v[1], v[2])); // 0 if equalish
    return 0;
}

zsh, 85 bytes
[ $(for x in $@;{tr -d \ <<<$x|tr A-Z a-z|fold -1|sort|paste -sd x}|uniq|wc -l) = 1 ]

Input as command line arguments, output as return code.
The for syntax makes this Bash-incompatible.
[               # test...
$(for x in $@;  # map over arguments
{tr -d \ <<<$x  # remove spaces
|tr A-Z a-z     # lowercase
|fold -1        # put each character on its own line
|sort           # sort lines
|paste -sd x    # remove all newlines except last
}|uniq          # take only unique lines
|wc -l          # how many lines remain?
) = 1 ]         # if only 1 line left, it must have been an anagram

Japt, 12 bytes
N®v ¬n ¬xÃä¥

Test it online!
How it works
        // Implicit: N = array of input strings
N®    Ã // Take N, and map each item Z to:
v ¬n    //  Take Z.toLowerCase(), split into chars, and sort.
¬x      //  Join and trim off whitespace.
ä¥      // Reduce each pair of items (that's exactly one pair) X and Y to X == Y.

Bash + GNU utilities, 51
f()(fold -1<<<${@^^}|sort)
f $1|diff -qBw - <(f $2)

Define a function f() which:

${@^^} converts all parameters to upper case
fold -1 splits chars - one per line
sorts lines

call diff with -q to suppress full diff output and -Bw to ignore whitespace changes

GNU Sed, 33
Score includes +2 for -rn options to sed.
This is almost a direct port of @FryAmTheEggman's Retina answer:
:
s/(\w)(.*,.*)\1/\2/i
t
/\w/Q1

Ideone.

Perl, 34 33 + 1 = 34 bytes
s/(.)(.*,.*)\1/$2/i?redo:say!/\w/

Requires the -n flag and the free -M5.010|-E:
$ perl -M5.010 -ne's/(.)(.*,.*)\1/$2/i?redo:say!/\w/' <<< 'hello, lloeh'
1

How it works:
                                   # '-n' make a implicit while loop around the code
 s/(.)(.*,.*)\1/$2/i               # Remove a letter that occurs on both sides of the comma.
                    ?
                     redo:         # Redo is a glorified goto statement that goes to the top of the while loop
                          say!/\w/ # Check to see if any letter is left

Thanks to msh210 for suggesting using ternary operators to save one byte

Cyborg Hal, 9 8 bytes
{ṇ₁cḷo}ᵛ

Try it online!
Truthy/falsy output is achieved through predicate success/failure, this being Brachylog.
Previously saved a byte using cṇ₁cḷḍ instead of {ṇ₁cḷ}ᵐ under the assumption that the two input strings would be the same length minus whitespace, but I realized that it would succeed where it should fail on Ah Hass, haha.
{     }ᵛ    For both strings in the input,
 ṇ₁         split on spaces,
   c        concatenate,
    ḷ       lowercase,
     o      and sort.
       ᵛ    Are the results the same?

Zsh, 51 bytes
Try it Online!
g()<<<${(j::)${(os::)1:l}// }
<<<${$(g $1)/$(g $2)}

Similar to my other anagram solution, again using Zsh's gnarly parameter expansion. Added a few bits to lowercase everything and parse out spaces.

Arturo, 33 bytes
$=>[=do map&=>[tally--lower&` `]]

Try it!
Takes input as a list of two strings.
$=>[               ; a function where input is assigned to &
    map&=>[        ; map over input, assign current elt to &
        lower&     ; lowercase current elt
        -- _ ` `   ; remove spaces
        tally      ; create dictionary of occurrences
    ]              ; end map
    do             ; put the pair on the stack
    =              ; are they equal?
]                  ; end function

PHP, 109 94 bytes
function f($x){return str_split((trim($x));}function g($x,$y){return array_diff(f($x),f($y));}

Blech, the two function/returns are killing me here.
Returns the difference between two string inputs as an array of characters. PHP considers [] falsy, satisfying the return requirements.

function($x,$y){$S=str_split;return array_diff($S(trim($x)),$S(trim($y)));} --> 75 bytes. Creates an anonymous function that returns the result. I've removed that long function and replaced the calls to str_split with an assignmed variable, to shorten it up.

Nice.  I was tweaking it to reduce it to the one function, this is two steps ahead of that, well done.

Pyke (commit 30, noncompetitive), 9 bytes
Fl1dk:S)q

Explanation:
F      )  -  for _ in eval_or_not(input())
 l1       -     ^.lower()
   dk:    -    ^.replace(" ", "")
      S   -   sorted(^)
        q - ^==^

Mathematica, 77 76 bytes
StringMatchQ[##,IgnoreCase->1>0]&@@(""<>Sort[Characters@#/." "->""]&/@{##})&

The first part is actually one of my answers to another question!

Pike, 54 112 109 109 96 bytes
#define a(x) sort((array)replace(lower_case(x)," ",""))
int s(mixed i){return a(i[0])==a(i[1]);}

mixed happens to be shorter than array(string).
s returns 1 if its arguments are anagrams.

APL, 31 chars
{≡/{x[⍋x←('.'⎕R'\u0')⍵~' ']}¨⍵}

To be used so:
    {≡/{x[⍋x←('.'⎕R'\u0')⍵~' ']}¨⍵}'Sp3000' 'P S 3000'
1

In English:

{ ... }¨⍵: for each of the two elements of the argument
x←('.'⎕R'\u0')⍵~' ': transform to uppercase (using a regex...) the string without the spaces and assign the temporary result to x
x[⍋x]: sort x
≡/: compare the two results of the sorting: if they match, return 1.

Is it possible to try it online? I tried with this but I don't really know how to use it

Sure. Here: definition after which you can just type f 'first avatar' 'second avatar'

Thanks! Maybe add that to the answer? So that people can try

–9: ≡/{x[⍋x←0~⍨32|⎕UCS⍵]}¨

@Adám: that won't work because  ≡/{x[⍋x←0~⍨32|⎕UCS⍵]}¨'pp' '00' gives 1.

Ah, you're right, I forgot about digits. Sorry.

Too bad... it was brilliant!

Java, 218 Bytes
First time I've ever written Java...
Golfed:
import java.util.Arrays;boolean M(String a,String b){char[]A=a.toUpperCase().replace(" ","").toCharArray();char[]B=b.toUpperCase().replace(" ","").toCharArray();Arrays.sort(A);Arrays.sort(B);return Arrays.equals(A,B);}

Ungolfed:
import java.util.Arrays;
public class ManageTrashSo {
    public boolean M(String a, String b) {
    char[] A = a.toUpperCase().replace(" ", "").toCharArray();
    char[] B = b.toUpperCase().replace(" ", "").toCharArray();
    Arrays.sort(A);
    Arrays.sort(B);
    return Arrays.equals(A, B);
   }
}

Testing:
    ManageTrashSo manageTrashSo = new ManageTrashSo();

    //True
    System.out.println(manageTrashSo.M("Lynn", "Nyl N"));
    System.out.println(manageTrashSo.M("Digital Trauma", "Tau Digital Arm"));

    //False
    System.out.println(manageTrashSo.M("Android", "rains odd"));
    System.out.println(manageTrashSo.M("In between days", "bayed entwine"));

I know it's been almost a year, but you can golf it by 32 bytes like this: boolean f(String...a){java.util.Arrays x=null;String[]A=g(a[0]),B=g(a[1]);x.sort(A);x.sort(B);return x.equals(A,B);}String[]g(String a){return a.replace(" ","").toUpperCase().split("");} (186 bytes) Or if you convert it to a Java 8 lambda, it can be: a->b->{java.util.Arrays x=null;String[]A=g(a),B=g(b);x.sort(A);x.sort(B);return x.equals(A,B);};String[]g(String a){return a.replace(" ","").toUpperCase().split("");} (167 bytes). Here is a TIO with test code.

Japt, 10 bytes
v á øVrS v

Try it

lyxaV, 5 bytes
ɽȧvs≈

Try it Online!
Or try a testsuite to verify the test cases.
Takes inputs as a list of strings.
Explained
ɽȧvs≈
ɽ     # Convert each string to lowercase
 ȧ    # Remove whitespace from each string
  vs  # Sort each string
    ≈ # Are they equal?

Thunno 2, 5 bytes
Rw€Ṡạ

Try it online!
Input as a list of both strings.
Explanation
Rw€Ṡạ  # Implicit input
R      # Uppercase the input
 w     # Remove all whitespace
  €Ṡ   # Sort each string
    ạ  # All equal?
       # Implicit output

Ruby, 50 bytes
def f;gets.upcase.chars.sort.join.strip;end
p f==f

Writing f=->{...} and f[]==f[] is just as long. :(

PowerShell, 81 bytes
param([char[]]$a,[char[]]$b)-join($a-replace' '|sort)-eq-join($b-replace' '|sort)

A slight rewrite of my answer on the linked Anagram challenge.
Takes input as char-arrays, performs a -replace operation to remove spaces, sorts them (which sorts alphabetically, not by ASCII value), then -joins them back into a string. The -eq in PowerShell is by default case-insensitive, but here it must be performed on strings, as [char]'a' is not equal to [char]'A', hence the reason for -join.

Perl, 35 bytes
Include +1 for -p
Somewhat abusive since it depends on the program being given on the commandline.
perl -pe'<>=~s%\S%*_=s/$&//i?_:0%reg;$_=!//'

Then give the strings as 2 consecutive lines on STDIN
A very abusive solution is 30 bytes:
perl -ne'<>=~s%\w%1/!s/$&//i%reg;1/!//'

This crashes if the strings are not anagrams and therefore gives a false exit code from the point of view of the shell. It also gives garbage on STDERR for that case. If the strings are anagrams the program is silent and gives a "true" exit code

Factor, 68 bytes
[ [ 32 swap remove >lower natural-sort ] map duplicates length 1 = ]

An anyonymous function. Call it like { "array" "of" "strings" } ~quotation~ call.

Q, 25 Bytes
f:{~/{x@<x:x@&~^x:_x}'x}

NOTE.- counting include function name f: to facilitate tests (as lambda we can decrement 2 Bytes)
Readable version
match over {ascending not null lower x} each x
{.. x ..} is an anonymous function with arg x
_x        lowers string x
&~^x      where not null x (space is considered null)
x@..      selects elements of x according to indexes ..
<x        ascending indexes of x (not values). Ex <"cab" is 1 2 0
x@<x      ascending values of x (x at ascending indexes of x)
~         match (diad function). Ex "one"~"one" is true
f'..      applies function f for each argument ..
f/..      applies function f over elements of sequence (fold)

Test
f("Lynn";"Nyl N")
f("Digital Trauma";"Tau Digital Arm")
f("Sp3000";"P S 3000")
f("Manage Trash So";"Those anagrams")
f("Calvins Hobbies";"Helka Homba")
f("Android";"rains odd")
f("In between days";"bayed entwine")
f("Code golf";"cod elf got")

generates (1b = true, 0b = false)
1b
1b
1b
1b
0b
0b
0b
0b

About Q
General-purpose language (APL derivative, specialized in data processing) developed by kx.com. Free full functional evaluation version for Windows/Linux/MacOS.

What do you mean, other languages are not serious? :-P

If the f is required for the code to evaluate properly, then it must be counted. Otherwise, just leave it off of your submission code, and only use it in examples to show how to assign the function.

Of course, other languages are as serious as Q. I beg my poor english. But some languages sacrifices readability or are equiped with libraries ad-hoc for this type of contests. Q is a 'general purpose language', in spite of the fact that code is not very readable.

You only need to assign x once if you lower later, thus k)~/{x@<x:_x@&~^x}' for 17 bytes.. but I'd say it's 19 as you need the k) bracket as this is K code rather than Q...

PHP, 89 bytes
for(;$i++<2;)$r[]=count_chars(join(explode(" ",strtolower($argv[$i]))));echo$r[0]==$r[1];

Try it online!
PHP, 94 bytes
for(;$i++<2;sort($x),$r[]=trim(join($x)))$x=str_split(strtolower($argv[$i]));echo$r[0]==$r[1];

Try it online!

Excel VBA, 122 Bytes
Anonymous VBE immediate window Function that takes input from range [A1:B1] and outputs to the VBE immediate window
a=Replace([A1]," ",""):b=Replace([B1]," ",""):For i=1To Len(a):b=Replace(b,Mid(a,i,1),"|",,1,1):Next:?b=String(len(a),"|")

D, 99 107 103 102 99 131 116 117 bytes
Edit: forgot about Dre case insensitivity imports lambdas
I don't like this language :D
import std.string,std.algorithm;(string[]a)=>sort(split(strip(a[0].toLower),""))==sort(split(strip(a[1].toLower),""))

To use it, assign it:
import std.string,std.algorithm;

void main () {
    auto x = (string[]a) => sort(split(strip(a[0].toLower),"")) == sort(split(strip(a[1].toLower),""))
}

Did you forget a ) at the end of your lambda?

Can strip(a[0].toLower) be replaced by a[0].toLower.strip, likewise with a[1]?

@ZacharyT Probably, yes

C#, 378 bytes
I need a handicap!!
https://dotnetfiddle.net/FNDt0E
using System;
using System.Linq;
using System.Text;

public class Program
{

    public static void Main()
    {
        var l = "Hello World";

        var r = "Red Who Loll";

        var y = new Func<string,string>(s => new String(s.ToLower().Replace(" ","").OrderBy(v => v).ToArray()));
        var z = new Func<string,string,Func<string,string>,bool>((w,x,f) => f(w) == f(x));
        var o = z(l, r, y);

        Console.WriteLine("{0} & {1} are anagram: {2}",l, r, o);

                Console.WriteLine("C#, {0} bytes", Encoding.Unicode.GetByteCount(@"var y = new Func<string,string>(s => new String(s.ToLower().Replace("" "","""").OrderBy(v => v).ToArray()));
    var z = new Func<string,string,Func<string,string>,bool>((w,x,f) => f(w) == f(x));"));

    }

}

Welcome to Programming Puzzles & Code Golf! General rule is to put your language together with your byte count in the headline of your post. You can do that by adding a leading # to the first line. Also for code-golf questions it is required to golf your program. For the start you should remove unecessary whitespaces and use single-character variable names. Also you can always use a function instead of a full program (unless explicitly forbidden) to save some more bytes.

@DenkerAffe you ninja'd me :)

Why all the whitespace??


text:
It's the end, but the code-golf has been prepared for
Welcome to BBC Casting. We need a program that we can use to select a new actor to play The Doctor on Doctor Who. In the spirit of the show, your program will perform a regeneration from one actor's name to the next.
We will test your program by running through the 13 names of actors who have already played The Doctor and then run it another 13 times. We will pass the output from one call as the input to the next in a loop.
Detailed Requirements

Your program will take a string as its only input and output a single string. It must not store any state between calls or use any additional resources outside of the program.
If the input is your starting string, your program must return "William Hartnell", the first name on the list.

You should select and document any string you wish to use as the starting string, as long as it isn't the name of a listed actor. My example below uses an empty string.

If the input string is an actor's name (other than the last), your program must return the next name on the list following the name inputted.
For any other inputs, behavior of your program is undefined.
The list of actors below is incomplete. You must complete the list by selecting 13 more names of actors you feel would be good at playing The Doctor.

Each extra name must be of a professional actor with an IMDB page.
The extra names returned by your program must be the actors' names exactly as listed on IMDB, including case, accents and diacritics.
The completed list of 26 actors must be 26 distinct individuals with distinct names.

You may interpret input and output according to the constraints of your language's execution environment. (Parameters, quotes, end-of-lines, stdin/out, encoding etc.)
Shortest conforming program wins. Normal code-golf rules apply.
You may use someone else's list of actors. If you do, give appropriate credit and share the glory. (Finding a list of actors that would compress well might be part of the challenge.)

The first half of the list of names is as follows. These strings must be output exactly as shown, preserving case including the extra capital letter in "McCoy" and "McGann".
William Hartnell
Patrick Troughton
Jon Pertwee
Tom Baker
Peter Davison
Colin Baker
Sylvester McCoy
Paul McGann
John Hurt
Christopher Eccleston
David Tennant
Matt Smith
Peter Capaldi

For example:
YourProgram("") returns "William Hartnell".
YourProgram("William Hartnell") returns "Patrick Troughton".
YourProgram("Patrick Troughton") returns "Jon Pertwee".
/* 10 more. */
YourProgram("Peter Capaldi") returns "Pauley Perrette".
YourProgram("Pauley Perrette") returns "Nathan Fillion".
/* 12 more. */

So, for clarity, the challenge is finding the next value in an array by its preceding value?

@ncdesi - Exactly. Expressing that array in as few characters as possible would probably be the hard bit. (Also, you don't have to use an array.)

Too bad we can't just fill the second half of the list with 13 "David Tennant".

Yb, Ak, MC, Vv, Eu, Re, Ei, Ek, Gu, As, Yt, Os, and Ku are IMDb actors with at least one acting role not as themselves.

Post-mortem discussion of this question on the meta site: http://meta.codegolf.stackexchange.com/q/9813/20793

Python 2, 340 bytes
#coding:L1
import zlib;r=zlib.decompress("x5mÂ@¯Â 8]c]u×Xã-q1H5½ýRãþ#÷O³PÌsÆ=¹IºÁÑêx¼*~W=¿ñX,èÆ{v6ø¢§<â¦©Yô³é¦üäÇ¼Ý¥¦NAs+Ò5(´£96ÉÃë}»eJ9>3óz8²*©ãÜ¡+âÃG®¡;å^pY\nÁ|þ7Ü9¿\"®ICmYXqÁÊ½$f,g¶3yÞ!ZéûfÇñÑTU¶ Û\r[M8Ì¨põ)ËåÂxïÑ¬LÂÜlßÜ\nwI×+nX`£åep;·ûÃVÿ À]b").split('.');print r[r.index(input())+1]

The encoding is Latin-1 (aka ISO-8859-1). That first line is important because Python 2 doesn't like non-ASCII characters in files by default (and using Python 3 wouldn't help, because it expects UTF-8 by default, along with loads of other issues).
Takes quoted input (single and double both work), with the initial input as the empty string ('').
The strategy I used was constructing a list of period-separated names (starting with an empty string) and compressing it with zlib (which gave better results over both shoco and lzma). This program decompresses that list, splits it on periods, and outputs the element in the list that follows the input.
I didn't use any real strategy with choosing the next 13 actors, other than picking living British actors (sorry, Alan Rickman, you would've been great) that I liked who haven't played a Doctor yet. The rationale was, the character distribution in the first 13 names is fairly random (as far as names go), so it's unlikely (in my opinion) that 13 more names could be picked that would make a significant difference in compressed size.
For reference, the list I used (with an extra linebreak to separate the new actors):
William Hartnell
Patrick Troughton
Jon Pertwee
Tom Baker
Peter Davison
Colin Baker
Sylvester McCoy
Paul McGann
John Hurt
Christopher Eccleston
David Tennant
Matt Smith
Peter Capaldi

Emma Watson
Patrick Stewart
Ian McKellen
Benedict Cumberbatch
Tom Hiddleston
Sean Connery
Hugh Laurie
Daniel Radcliffe
Rupert Grint
Gary Oldman
Simon Pegg
Keira Knightley
Liam Neeson

You could use the thirteen living actors with the shortest names to save a few bytes?

That was my thinking too, @ASimmons.  Little did I know how perfect a 14th Doctor Ray Park would make.  It's a shame Jude Law will have to replace him in 2023.

@ASimmons I'm not interested in combing IMDB pages to find 13 British actors with short names. I'll stick with the list I chose. To be fair, the challenge doesn't state anywhere that the Doctor must be played by a British (well, British, Scottish, or Welsh) actor (though that is the case in reality).

Nice work. I'd be interested to see if 13 Peters with similar surnames to the first 13 could bring a significant improvement.

In any case, I can't be the only one who thinks that Li Li, Xu Xu, Qi Qi, and the other Qi Qi would all do a really good job as the Doctor?

Nicholas Cage, anyone? @ASimmons And yes. You are. Any serious Doctor Who fan would come up with actual actors they'd like to see play the Doctor. 13 more names of actors you feel would be good at playing The Doctor.


text:
Transpose a word cloud
Background
I wanted to make a pretty word cloud, like this:
these    are
    words

  floating

I computed the (x,y)-coordinates of the first letter of each word, plugged them into my word cloud generator, and let it do its job.
However, I accidentally used (y,x)-coordinates, so the result looks like this:
these

   floating

 words

are

Since I'm too lazy to re-compute the coordinates, I need you to transpose the word cloud for me.
Input
Your input is a rectangular grid of lowercase ASCII letters and spaces.
This means that every row is padded with spaces to have the same length.
The input can be taken as a multi-line string or an array of strings.
A word is a horizontal segment of letters, and its position is the (x,y)-coordinates of its leftmost letter, the upper left corner of the grid being (0,0).
There will always be at least one word, and there are no trailing rows or columns of spaces.
However, leading rows or columns of spaces may be present.
Output
Your output is another rectangular grid of characters, obtained by moving every word with position (x,y) to position (y,x).
Your output must not contain extra trailing rows or columns of spaces.
Leading rows and columns must be preserved, and the output must be rectangular.
You may assume that this transformation does not create overlapping words, and does not merge several words into one.
This means that running the program on the output should produce the original input.
Rules and scoring
You can write a full program or a function.
The lowest byte count wins, and standard loopholes are disallowed.
Test cases
For clarity (and since Stack Exchange dislikes space-only lines), every row ends in a pipe character |.
These are not part of the actual input or output, and you should remove them.
Note again that running the program on each output should also produce the corresponding input.
Input:
oneword|
Output:
oneword|

Input:
  spaces|
Output:
      |
      |
spaces|

Input:
   |
row|
Output:
 row|

Input:
these    are|
    words   |
            |
  floating  |
Output:
these      |
           |
   floating|
           |
 words     |
           |
           |
           |
are        |

Input:
   same|
 the   |
       |
same   |
Output:
   same|
 the   |
       |
same   |

Input:
  some |
words k|
       |
       |
       |
  still|
Output:
 words    |
          |
some still|
          |
          |
          |
 k        |

Input:
   hello   |
  world hey|
what   up  |
Output:
  what|
      |
 world|
hello |
      |
      |
      |
  up  |
 hey  |

Input:
  a b  a d cc|
 g h  huh nng|
  ye dunnn   |
    dud  yo  |
 wha   g     |
  huh heh hah|
Output:
        |
 g  wha |
a ye huh|
 h      |
b  dud  |
  dunnn |
 huh heh|
a   g   |
        |
d  yo   |
 nng hah|
cc      |

Perl, 58 bytes
Added +2 for -lp
Give input on STDIN, run as perl -lp wordcloud.pl
wordcloud.pl:
s/\w+/$l|=$a[pos]|=$"x~-$..$&/eg}for(@a){$_|=$l=~y// /cr

APL (Dyalog Unicode), 107 bytes
{x←' '⍴⍨×⍨2/⌈/⍴⍵⋄(⌈⌿↑⍸' '≠x)↑x⊣{x⊢←(⊃⍵)@((⊃⌽⍵)∘+¨↓0,⍪1-⍨⍳≢⊃⍵)⊢x}¨↓(⊃,/' '(≠⊆⊢)¨↓⍵),⍪⌽¨⍸2{1 0≡' '=⍺⍵}/' ',⍵}

Try it online!
Makes an over-big matrix of spaces, and adds in the required words using @. Then, crops back to the required size.