text:
Is it a good 2048 board?
This is my first question here, so any suggestions in the comments would be appreciated! Thanks ;)
Introduction
One very common strategy for the 2048 game is never ever swiping down. This positions all the big numbers at the top, and the lower ones in the bottom. So, if you apply this strategy correctly, your board will always match the following pattern:
The pattern to check for / Your task
Your submission should be either a full program or a function which returns a truthy value if the board can be described like this:
Going down each column of the board, the first number should be the highest of the column, the second number should be less than or equal to the first number, etc. A good 2048-board is defined as a board where the highest numbers are all on the top.
This is code-golf, so the shortest Code per language (in bytes) wins.
I/O
The input can be taken in any appropriate way, for example an array of 4 arrays, each containing 4 numbers, or an array of 16 numbers. In total, it will be always 16 numbers, representing the 4x4 board
The output should be a truthy value of the input is a "good 2048-board", and a falsy value otherwise.
Examples
Truthy:
|-------------------|
| 16 |    | 64 |  8 |
|-------------------|
|  8 |    | 32 |  8 |
|-------------------|
|  4 |    | 32 |  2 |
|-------------------|
|  2 |    |    |    |
|-------------------|

|-------------------|
| 16 | 128| 64 | 32 |
|-------------------|
|  8 | 128| 32 |  8 |
|-------------------|
|  4 | 16 |  8 |  2 |
|-------------------|
|  4 |    |    |    |
|-------------------|

Falsy:
|-------------------|
| 16 |    | 64 |  8 |
|-------------------|
|  8 |    | 32 | 16 |
|-------------------|
| 32 |    | 128|  2 |
|-------------------|
|  2 |    |    |    |
|-------------------|

|-------------------|
| 16 | 128| 64 | 32 |
|-------------------|
|  8 |  32|    |  8 |
|-------------------|
|  4 | 16 |  8 |  2 |
|-------------------|
|  4 |    |    |    |
|-------------------|

Note
Look at the 2nd falsy test case: When there is an empty value (or a 0) somewhere and even when it's followed by a value which is higher than the last non-zero number, this should be falsy, because the next value after the zero would be higher than the 0 itself, which makes it invalid.
Good luck!

Comments are not for extended discussion; this conversation has been moved to chat.

Haskell, 21 bytes
all$scanr1 max>>=(==)

Try it online!
Takes a list of columns, with empty spaces as 0.

Gives the wrong output for [[16,8,4,0],[16,0,4,4],[16,4,4,4],[16,4,4,4]].

@JonathanAllan It returns false as it should, your 2nd column is [16,0,4,4] which is not monotonic.
Or am I missing something?

0 is your placeholder for an empty cell, not a value of 0.

@Iwanttomakegames that comment was meant for you (replace "your" with "the").

@JonathanAllan I am sorry for all the confusion, but 0 should indeed, while representing an empty cell, count as the value 0. Empty cells should be treated like the value '0'.

05AB1E, 4 bytes
€{íQ

Try it online!
Same as my other two answers. I promise this is my last one until others have answered :)

APL (Dyalog), 7 4 bytes
Takes 4-by-4 matrix, using 0 for blanks, as argument.
⊢≡⌊⍀

Try it online!
⌊⍀ is the vertical cumulative minimum
≡ identical to
⊢ the unmodified argument?

Amazing golf! (I expected that from someone who works for Dyalog and has programmed APL for a long time). And, yes, MY does have a lot of APL symbols, though they're not APL symbols. Alpha, Iota, Omega are all greek, not APL technically. They came to mind first when thinking of one-character commands. Hence MY's increment and decrement are Jelly's, because that came to mind first. (Just to notify you, I'm suspended from chat, hence the response here.)

Jelly, 4 bytes
Ṣ€U⁼

Try it online!
Input as an array of columns. Works with arbitrary-sized grids.

What is the representation of an empty cell? (e.g. 3rd col of 2nd falsey test case) - "in total it will be always 16 numbers". It would work with zeros if you filter them out first.

@JonathanAllan According to the specs, I think this is valid too

Yet that will now fail my suggested test case returning 0 rather than 1.

@JonathanAllan How do you filter in Jelly ._. I'd expect this to work but ḟ0 doesn't work

You'd need to filter each.

@JonathanAllan oh right ._. thanks

Save two like this.

@JonathanAllan Sorry, stupid trackpad being weird. Thanks for the golf!

Turns out OP is ruling that if you use 0 for "empty cell" it counts as a zero (shrug).

@JonathanAllan Lol. So am I allowed to use (nospace) as empty cells? XD (i'll read spec once more)

Oh well turns out I need to rollback all of my edits /shrug

Yeah, with the clarification in place, you shouldn't filter out the 0's.

@Zacharý Yay \o/ much un-ungolfing done :D

@Hyper-Neutrino, JonathanAllan, Zacharý I'm sorry guys, I should have thought about this before. My first question, I'll try to improve ;)

@DirtyDev That's alright, we're here to enjoy the challenges and help new users get used to this place :) I hope you're enjoying the community

@DirtyDev Yeah, no problem! It's a nice little challenge.

R (+pryr), 23 bytes
pryr::f(all(diff(x))<1)

Which evaluates to the function
function (x)
all(diff(x)) < 1

Which takes a matrix as input:
     [,1] [,2] [,3] [,4]
[1,]   16    0   64    8
[2,]    8    0   32    8
[3,]    4    0   32    2
[4,]    2    0    0    0

When given a matrix, diff automatically calculates the differences within rows (surprisingly. I didn't know of this feature until I tried it for this challenge).
     [,1] [,2] [,3] [,4]
[1,]   -8    0  -32    0
[2,]   -4    0    0   -6
[3,]   -2    0  -32   -2

None of these values can be 1 or higher in a good board, so we test for <1 and see if all values of the matrix comply.
     [,1] [,2] [,3] [,4]
[1,] TRUE TRUE TRUE TRUE
[2,] TRUE TRUE TRUE TRUE
[3,] TRUE TRUE TRUE TRUE

[1] TRUE

Python 3, 42 bytes
lambda l:all(x==sorted(x)[::-1]for x in l)

Try it online!
Same algorithm as my Jelly answer

-8 bytes in Python 3 or -14 bytes in Python 2.

JavaScript, 37 bytes
x=>''+x==x.map(v=>v.sort((x,y)=>y-x))

Call it like this:
|-------------------|
| 16 |    | 64 |  8 |
|-------------------|
|  8 |    | 32 |  8 |
|-------------------|
|  4 |    | 32 |  2 |
|-------------------|
|  2 |    |    |    |
|-------------------|

f([[8,8,2,0],[64,32,32,0],[0,0,0,0],[16,8,4,2]])

Tested on Firefox, Chrome, JavaScript Shell, and, Node.js.

Why do you turn the result into a string? (''+)

@Zacharý sort is mutable method, which will mutate the array. first convert to string will save a copy of the array. converting to string also make the equal operation works by (string) value instead of reference.

JavaScript, 34, 32 bytes
v=>!v.some((x,i)=>i%4&&x>v[i-1])

Call by passing in a single array containing the first column, followed by the 2nd, 3rd, and 4th.
Compares each number to the previous number except for the first number of each column and returns true if all are true.
Test
f=v=>!v.some((x,i)=>i%4&&x>v[i-1])

f([16,8,4,2,0,0,0,0,64,32,32,0,8,8,2,0])
f([16,8,4,4,128,128,16,0,64,32,8,0,32,8,2,0])
f([16,8,32,2,0,0,0,0,64,32,128,0,8,16,2,0])
f([16,8,4,4,128,32,16,0,64,0,8,0,32,8,2,0])

Edit: saved 2 bytes thanks to tsh

after some boolean transform: v=>!v.some((x,i)=>i%4&&x>v[i-1])

C# (.NET Core), 71 bytes
i=>{for(int n=3;++n<i.Length;)if(i[n]>i[n-4])return false;return true;}

Try it online!
The BORING way. Expects input flattened into a linear array.
Alternatively the explicitly forbidden way:
i=>{for(int n=3;i[++n]<=i[n-4];);}

Try it online!
Throws an IndexOutOfBoundsException to indicate true, ends normally to indicate false. I tried a version that included conversion from exception/no exception to true/false, but it ended up just as long as the regular version.

Haskell, 28 bytes
all$and.(zipWith(>=)=<<tail)

There's also
all$(==)=<<sort

with 15 bytes but it requires import Data.List when working with the Prelude only. Alternatively,
all$(==)=<<Data.List.sort

with 25 bytes works in GHCI.

Gaia, 3 6 bytes
+3 bytes because apparently I didn't know how my language worked
ọ¦_ẏ⁇!

This is a function accepting a list of columns and leaving the result on the stack.
A few other 6 byte solutions exist including 0+¦o¦ẏ and ọ¦_ẏ¦ỵ.
Try it online!
Explanation
ọ¦      Deltas of each column
  _     Flatten
   ẏ⁇   Keep only positive numbers
     !  Negate (is it empty?)

Can't downvote, but using an operator added to the language after the challenge was posted doesn't seem fair to me.Also it seems to be forbidden by default according to this.

@Cinaski We've kind of moved away from that rule, as seen here. Either way, my alternative solutions only use operators that definitely existed before the challenge.

I'll just change it to one of the others I guess

Never mind, I was not aware of that new rule.

TI-BASIC, 25 bytes
Takes input as a 4x4 matrix in Ans.
For(R,1,3
*row+(-1,Ans,R+1,R
End
Ans=abs(Ans

Explanation
For(R,1,3             Loop from row 1 to 3.

*row+(-1,Ans,R+1,R    Multiply row R+1 by -1 and add it to row R in-place.
                      Effectively, this subtracts row R+1 from row R.

End                   Now the first 3 rows contain the row differences,
                      and the 4th row is non-negative assuming valid input.

Ans=abs(Ans           Check whether every element in the matrix is equal to its
                      absolute value, or in other words, contains no negative values.

Clojure, 30 bytes
(partial every? #(apply >= %))

try it online

Welcome to PPCG, and nice first post!

Haskell, 41 bytes
f[x]=1>0
f(a:b:c)|a<b=1<0|1>0=f$b:c
all f

Try it online!
Defines the point-free function all f, where f determines if a list is sorted.

Darn, this beats Python by 1 byte ;P

@HyperNeutrino Well the xnor's beats python by 21. :P

You can also define f as f(a:b:c)=a>=b&&f(b:c)

JavaScript (ES6), 42 bytes
Takes an array of columns; returns a (truthy) number or false.
a=>a.every(c=>c.reduce((r,n)=>r&&n<=r&&n))

JavaScript (ES6), 54 47 bytes
First attempt. Takes an array of columns; returns true or false.
a=>a.every(c=>c.slice(1).every((n,i)=>n<=c[i]))

Which value are you expecting for empty cells?

Swift 4, 84  77 bytes
func f(l:[[Int]]){print(l.filter{$0.reversed()==$0.sorted()}.count==l.count)}

Try it online!

MATL, 4 bytes
SGX=

Try it online!
Input as an array of rows, upside down.
S       % sort columns
GX=     % compare with input
        % true if arrays are numerically equal
        % (implicit) convert to string and display

Does not work for cases that should return truthy which have zeros between column elements like this for example.

You're right, I'm working on a solution. BTW I'm not the only one having problems with empty cells ;)

Yeah, I can see that. I suggested a test case for it too. Ping when fixed and you'll get an upvote from me :)

@JonathanAllan wait, who said that it should return truthy when there are zeros between column elements? Look at my second falsy test case, an empty cell / a 0 followed by a higher value when going down is invalid.

@DirtyDev FYI with the wording originally given, and its sensible interpretation, your second falsey case would still be falsey; it's just my suggested test case would be truthy.

Don't change this, due to the clarification to the rules, this is valid.

Japt, 7 5 bytes
Takes input as a 2D array of columns. Empty cells are 0 or can be omitted if there are no other numbers in the column.
eUËnw

Try it
eUËnw     :Implicit input of 2D array U
e         :Test for equality with
 UË       :  Map U
   n      :    Sort each by
    w     :    Maximum

Nice arrangement to skip the second U. You could do nn at the end as well ;)

I was surprised to find that omitting the second U worked in this case, @ETHproductions; I thought it would only work if the variable was the only thing to the left of the ==. I'll have to remember it for future use.

Dyalog APL, 21 19 15 bytes
∧/{⍵≡⍵[⍒⍵]}¨↓⍉⎕

Try it online! (modified so it will run in tryapl)
Takes input as a 2D array.
How?

⎕ input
⍉ transpose
↓ 2D array => 1D vector of 1D vectors
{ ... }¨ apply this to each member (argument ⍵):

⍵[⍒⍵] ⍵ sorted descending
⍵≡ equality with ⍵

∧/ whether every element is 1.

Outgolfed by 73%!

MY, 66 62 20 bytes (noncompeting)
ω⍉ω⍉A6ǵ'ƒ⇹(E8ǵ'ƒ⇹(Π←

Try it online!
The reason this is non competing is that I recently implemented 8E (≡), which is equivalent to APL ≡.
How?

ω⍉ The first command line argument transposed
ω⍉ The first command line argument transposed
A6ǵ' push chr(0x6A) (⍖ in the codepage, which sorts descending)
ƒ as a function, rather than a string
⇹ push a function that maps a popped function over each argument
( apply
E8ǵ'ƒ⇹(  the same thing, except with chr(0x8E), which is the match command (≡).
Π product
← output with no newline

Yes, a lot of MY's symbols are exactly the same or similar to APL's. The explanation is that they came to mind when I wanted a 1-character command. (I don't know why I didn't use T for transpose)

Java 8, 69 bytes
b->{for(int[]c:b)for(int i=0,f=1;i<3;)if(c[i]<c[++i])f=0;return f>0;}

Well, as of this writing this beats the Swift solution, so there's that! Utterly straightforward. Input is an array of integer arrays, the inner arrays being columns of the board (upper squares first). Cast to Function<int[][], Boolean>.

Mathematica, 27 bytes
t=Thread;-t[Sort/@-t@#]==#&
Explanation:

Thread is a weird general transpose-like operation that happens to
take the transpose when given a matrix.
t=Thread; lets me use t twice instead of Thread twice to
save bytes.
Sort sorts a list (in increasing order).
Sort\@ maps the Sort function to each element of a list individually; when applied to a matrix, it sorts the rows.
t@# applies the transpose function to the input # of the main function.
- takes the negative of all of the entries so that sorting the rows of the transposed matrix (the columns of the original) sorts them in the desired way.
The outer -t[...] undoes the negative and the transpose, so all we really did was sort the columns largest-to-smallest.
==# tests to see if this new column-sorted matrix is equal to the original input.
& ends the anonymous function with input # we defined.

You can try it online in the Wolfram Cloud sandbox by pasting code like the following and clicking Gear->"Evaluate cell" or hitting Shift+Enter or the numpad Enter:
t=Thread;-t[Sort/@-t@#]==#&@{{16,128,64,32},{8,32,0,8},{4,16,8,2},{4,0,0,0}}

Or for all test cases:
t=Thread;-t[Sort/@-t@#]==#&//Map[#,{{{16,0,64,8},{8,0,32,8},{4,0,32,2},{2,0,0,0}},{{16,128,64,32},{8,128,32,8},{4,16,8,2},{4,0,0,0}},{{16,0,64,8},{8,0,32,16},{32,0,128,2},{2,0,0,0}},{{16,128,64,32},{8,32,0,8},{4,16,8,2},{4,0,0,0}}}]&

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


text:
Happy Birthday, let's have some cake!
It's my friend's birthday soon and since he is a programmer and ASCII art lover, I thought I'd make him some ASCII cake!
Sadly, I keep forgetting his current age, so I would like to have a program for my ASCII oven, that bakes a cake with a specified number of candles, so I don't have to do it myself again if I am wrong with his age.
ASCII ovens only have limited memory and storage capacity, so it should use the fewest bytes possible.

Your Task:
Write a program that outputs a birthday cake to the console, with as many candles as the input specifies.
Cake requirements are:

It has to have a border, built up of horizontal - and vertical | lines, and vertices +.
Atleast 5 characters wide (including cake border |)
Atleast 5 characters high (including cake border -)
There has to be a whitespace character  between the cake border and the first candle-base (not the flame), on each side, except if there is a flame in that space. A flame or candle-base should not be able to overlap the cake borders.
The maximum width of the cake is 9 characters, so there is a maximum of 5 candles per row.
Since we don't want our cake to be 2-dimensional, it has to be an extra 2 rows high, to give it some volume. Add another border at the bottom and connect the vertices with the ones above them, again using the ASCII characters from above (-, | and +).

Candle requirements are:

Consists of the base | and the flame *, with the flame stacked on top of the base.
Candles may not be directly adjacent to eachother, except diagonally.
Candles are placed left-to-right, then top-to-bottom, with 5 in one line at maximum.
(Note: If there were 5 candles in the previous row, the next row can't possibly have 5 aswell, since then they would be adjacent.)

Additional notes:

The cake width depends on the number of candles in the first row, but it has to be a minimum of 5 characters and a maximum of 9 characters wide.
The candles are filled starting in the top-most row, going left to right. Once one row if full the next one should start in the row below the first one.

Input:
You may accept a number in (reasonable) format you like.
For this challenge you may assume that the number is between 0 and 231 (not including 0), even though I don't acknowledge someone who is this old.
Output:
You can either return a string or directly write the resulting cake into the output console.
Rules:

Standard loopholes are forbidden.
This is code-golf, so shortest code in bytes, in any language, wins.

Examples:
Input: 8
+-----------+
| * * * * * |
| |*|*|*| | |
|  | | |    |
|           |
+-----------+
|           |
+-----------+

Input: 2
+-----+
| * * |
| | | |
|     |
+-----+
|     |
+-----+

Input: 12
+-----------+
| * * * * * |
| |*|*|*|*| |
| *|*|*| |  |
| | | |     |
|           |
+-----------+
|           |
+-----------+

Good luck!

Can there be multiple valid solutions for an input?

@officialaimm Since there are specifications for candle-ordering and cake-sizing it should not be possible.

Useless fact: If you celebrate your birthday every second instead of every year, then 2^31 ~= 68 year-old. But that makes a lot of cakes every day and might become tedious after some time.

@Arnauld Unless you're a sharer you better own a lot of land to store all those cakes.

@Arnauld But then 99% of the time it's not your birthday :( ... except if you are celebrating the general fact that you were born.

@IanH. Let's say that you're celebrating your inception timestamp, then. :-)

@TheLethalCoder We can totally store these cakes into an array, no problem.

Charcoal, 76 71 70 66 46 bytes
ＮθＦ=+Ｂ⁺³⌊⟦χ⁺θθ⟧÷⁺℅ι⁺θθ⁹↘↘Ｆθ«↑|*¶¶¿‹⁶﹪⁺ιι⁹«Ｍ⁹←↓

Try it online! Link is to verbose version of code. Edit: Saved 1 byte thanks to @ASCII_Only. Saved a massive 20 bytes by discovering a neat way of drawing the candles. Explanation:
ＮθＦ=+Ｂ⁺³⌊⟦χ⁺θθ⟧÷⁺℅ι⁺θθ⁹

Calculate the size both of the whole cake including extra volume and just the top of the cake so that they can be drawn. ((= = ASCII 61) = (+ = ASCII 43) + 9 * 2 for the extra volume.)
↘↘Ｆθ«

Move the cursor to the first row of 5 candles. Loop through each candle.
↑|*¶¶

Print a candle and move right two characters for the next candle.
¿‹⁶﹪⁺ιι⁹«

However after the (zero-indexed) 4th, 8th, 13th, 17th, 22nd etc. candles (that are at the end of a row),
Ｍ⁹←↓

move the cursor to the first candle on the next row. This works on both odd and even rows!

Your solution puts an (unwanted) extra row for input number smaller than 6. :)

@IanH. Sorry, I thought that was the minimum height for some reason. Fixing that actually saved me 4 bytes!

Still displays wrong on TIO :/

@IanH. Try it online! gives me identical output to your example...

Alright, now it does :) great job on the solution!

@Neil remember you don't need the Ａ at the start :P (btw thanks for finding another golfer (not-so-)edge case)

⁺θθ can be ×²θ...;)

@ASCII-only I can't believe I forgot that...

@EriktheOutgolfer :/ same bytecount

@ASCII-only I just said that since Neil might've attempted to avoid the trailing ² on ×θ²...

@EriktheOutgolfer Actually I've got a tip on the Tips page about that...

@Neil I've already read that one.

Jelly, 67 bytes
s9s€5Ẏa;⁶;⁶z⁶Z
ç”|ṙ-ż"ç”*$U⁸RḤ’¤¦Ẏ€j@€“| “|”Zj@€⁾--Z”+®¦€0,1©¦;ṫ¥-Y

A monadic link taking a number and returning a list of characters or a full program printing the output.
Try it online!
How?
s9s€5Ẏa;⁶;⁶z⁶Z - Link 1, make some candle parts & topping: number, age; character, part
s9             - split (implicit range(age)) into chunks of 9 (or remainder)
  s€5          - split each chunk of 9 into chunks of 5 (a 5 and a 4 or remainder)
     Ẏ         - tighten (to a list of lists of length 5, 4, 5, 4, ..., remainder)
      a        - logical and with the part character (either | or * here)
       ;⁶      - concatenate a space (we all still want topping when no candles)
         ;⁶    - ...and another (we also want some extra topping below the last row)
           z⁶  - transpose with filler space (fill the top with topping!)
             Z - transpose (put it back around the right way again chef)

ç”|ṙ-ż"ç”*$U⁸RḤ’¤¦Ẏ€j@€“| “|”Zj@€⁾--Z”+®¦€0,1©¦;ṫ¥-Y - Main link: number, age
ç”|                                                  - call last link (1) as a dyad with '|'
   ṙ-                                                - rotate left by -1
          $                                          - last two links as a monad:
       ç”*                                           -   call (1) as a dyad with '*'
      "                                              - zip with the dyadic operation:
     ż                                               -   zip (interleave each)
                 ¦                                   - sparse application:
           U                                         - ...of: upend (reverse each)
                ¤                                    - ...to indexes: nilad+links as a nilad:
            ⁸                                        -   chain's left argument, age
             R                                       -   range
              Ḥ                                      -   double (vectorises)
               ’                                     -   increment
                  Ẏ€                                 - tighten €ach (from '|*' or '*|' pairs)
                       “| “|”                        - literal ["| ", "|"]
                    j@€                              - join (swap arguments) for €ach (add a little extra topping to the left, and add piping to the sides)
                             Z                       - transpose
                                 ⁾--                 - literal "--"
                              j@€                    - join (swap arguments) for €ach (add piping to the top and bottom edges)
                                    Z                - transpose (time to invest in a potters wheel!)
                                              ¦      - sparse application:
                                          0,1        - ...to indexes: [0,1] (both ends)
                                             ©       -   (copy that to the register)
                                         €           - ...of: for each:
                                        ¦            -   sparse application:
                                     ”+              -   ...of: '+' character
                                       ®             -   ...to indexes: recall from register (both ends)
                                                  -  - literal -1
                                                 ¥   - last two links as a dyad
                                                ṫ    -   tail from index (gets last two rows)
                                               ;     -   concatenate (repeats them underneath)
                                                   Y - join with newlines
                                                     - as a full program: implicit print

Holy what +1 for beating Charcoal

@ASCII-only Sorry, I found a 4-byte saving...

@Neil well that's good too, Charcoal is supposed to be good at ASCII art (better than jelly) after all :P

Japt, 94 bytes
/4½ c ÆYu ç +Um5-Yu)ÇV°<U?Q:SÃ¸+(1+Yu)ç
"| {Ug ç}|"
Vd"|+ -"
[W¡"| {X}|"ÃVVWVW]c ·y rQ+S"*|" y

Try it online!

source: Stack Exchange

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

sort: votes


text:
Fake divisor sum polyglots
The task
In this challenge, your task is to write a program in a programming language L that takes a positive integer n, and outputs the sum of the proper divisors of n (sequence A001065 on OEIS).
It should return the correct output for any 1 ≤ n ≤ 10 000.
Here are the first 10 outputs:
0, 1, 1, 3, 1, 6, 1, 7, 4, 8

Furthermore, your program must be a fake polyglot, which means the following.
It is a valid program in another programming language L', and for each input 1 ≤ n ≤ 10 (the test cases above), it returns the sum of proper divisors of n, but there exists some 11 ≤ n ≤ 10 000 for which it doesn't return the correct result.
It may return something incorrect, loop forever, crash etc.
It can give a wrong result for all n ≥ 11, for some of them or just one.
Rules and scoring
You can write a full program or a function, and you can have different means of input and output in the two languages.
The lowest byte count wins.
Standard code-golf rules apply.
In this challenge, different major versions or implementations of a language are considered distinct.
Note that if you use programming languages with non-ASCII encodings (as many do on this site), the same sequence of bytes must be used for both languages.
This means that you must either convert between potentially different code pages or suffer penalties for multi-byte Unicode characters.
Additional test cases
20 -> 22
36 -> 55
180 -> 366
997 -> 1
2875 -> 869
10000 -> 14211

JavaScript (ES6), V8 / SpiderMonkey vs Chakra, 66 63 bytes
n=>[...Array(n)].map((_,d)=>s+=n%d?0:d,[0,n>10].sort(x=>s=x))|s

Demo

let f =

n=>[...Array(n)].map((_,d)=>s+=n%d?0:d,[0,n>10].sort(x=>s=x))|s

console.log(JSON.stringify(
  [...Array(20)].map((_, n) => n + 1).map(f)
))

Output
Output of the above snippet on Chrome and Firefox (all correct):
[0,1,1,3,1,6,1,7,4,8,1,16,1,10,9,15,1,21,1,22]

Output on Edge (off by 1, starting at n = 11):
[0,1,1,3,1,6,1,7,4,8,2,17,2,11,10,16,2,22,2,23]

Why?
No algorithm is imposed by the specification for the .sort() method. It's not even required to be stable. Therefore, each JavaScript engine uses its very own implementation.
However, [0,1].sort(x=>x) gives [0,1] with all engines.
So what's the difference?
What's happening here is that Chakra is passing 1 as the first parameter of the first (and only) iteration to the callback function (asking for a comparison of 1 with 0), while V8 and SpiderMonkey are passing 0 (asking for a comparison of 0 with 1).
You can use the following snippet to check what your browser is doing.

[0, 1].sort((x, y) => console.log("Let's compare " + x + " with " + y + "!"))

This is an acceptable solution. I'll clarify it in the main post.

Python 2 and Python 3, 58 bytes
TIO for Python 2
TIO for Python 3
lambda n:sum(i*(n<11or''==b'')for i in range(1,n)if n%i<1)

It works in python 2, but for every n > 10 it would output 0 in python 3.
All because of different approaches in comparing strings with bytes:

in Python 2 '' == b''
in Python 3 '' != b''

05AB1E / Jelly,  9  8 bytes
The byte-code (hexadecimal):
d1 a8 4f 71 0d ad 53 fa

Using Jelly's code-page returns incorrect results for any excessive number (e.g. an input of 12 returns 12 rather than 16):
ẎƭOqÆḌS«

Try it online!
Using 05AB1E's code-page returns correct results:
Ñ¨OqмλSú

Try it online!
How?
05AB1E parses up to and including the 71 (q) which instructs to quit and then stops parsing:
Ñ¨Oq - Takes input from stdin
Ñ    - get divisors
 ¨   - remove right-most (the input value itself - yielding proper divisors)
  O  - sum
   q - quit (causing an implicit print of the top of the stack)
...мλSú is never parsed

Jelly parses the whole program up-front as three links due to the effect of the bytes without an assigned meaning, ƭ and q acting as delimiters. The entry point of a program is it's final link:
Ẏ - Link 1 (never used), tighten list
...ƭ delimits links 1 & 2)

O - Link 2 (never used), cast from characters to their ordinals
...q delimits link 2 and the main link

ÆḌS« - Main link: number, n
ÆḌ   - proper divisors
  S  - sum
   « - minimum of that and n
     - as a full-program: implicit print

That's 05AB1E / Jelly?

Yeah, fixed, thanks; I was just writing up the explanation.

ÆḌSD saves a byte.

@Dennis Or better ÆḌSṚ.

@Dennis - thanks, thought of a different way while eating :)

JavaScript (Node.js) and PHP, 73 70 bytes
function($n){for($d=$i=0;++$i<$n;)$d+=$i*!($n%$i);return"$n">10?0:$d;}

In both languages, this is an anonymous function. JavaScript gives the correct result, but PHP gives 0 for all n >= 11.
Try it JS!
Try it PHP!
How it works
Both languages do the same thing at first: iterate from 1 up to n-1, keeping a running sum of all numbers i for which n % i = 0.
What causes the difference in behaviour is the final part:
return"$n">10?0:$d;

In JavaScript, "$n" is just a string literal. The comparison > with 10 casts it to a number implicitly, but since it doesn't look like a number, it becomes NaN. NaN gives false when compared with a number in any way. As a result, $d is always returned.
However, in PHP, "$n" is a string containing the value of $n. When PHP casts this to a number, it simply becomes the value of $n. If it's greater than 10, then 0 is returned instead of $d.

Python 3 / Python 2, 47 bytes
lambda n:sum(d*(n%d<1)for d in range(10/n>0,n))

An unnamed function, fake in Python 2.
Try it online for Python 3 or Python 2
In Python 2 / is integer division with integer arguments, whereas in Python 3 it is division.
When n exceeds 10 10/n evaluates to 0 in Python 2, but to a small positive number in Python 3 (this is certainly true up to the maximum required of 10,000 at least).
As such 10/n>0 evaluates to True for Python 3 and range(10/n>0,n) is equivalent to range(1,n) while in Python 2 10/n>0 evaluates to False when n exceeds 10 whereupon range(10/n>0,n) becomes equivalent to range(0,n) causing n%d to attempt to perform modulo zero arithmetic, raising a ZeroDivisionError.

Python 3 / Python 2, 64 60 58 bytes
Thanks to @officialaimm for 2 bytes off
lambda n:sum(d*(round((n>10)*.5)==n%d)for d in range(1,n))

In Python 3 this gives the correct results. In Python 2 the ouput is wrong for inputs exceeding 10. The code exploits banker's rounding, which is done by Python 3 but not by Python 2.
Try it online! Python 3 (correct), Python 2 (wrong for n > 10).

You won't need [ ].

Jelly / 05AB1E, 12 bytes
What Jelly sees:
11⁻iẎƭO}qÆḌS

Try it online!
Explanation:
q is unsupported in Jelly, so Jelly only "sees" what's after the q.
ÆḌS
ÆḌ  Proper divisors
  S Sum

What 05AB1E sees:
11‹iÑ¨O}qмλS

Try it online!
Explanation:
11‹iÑ¨O}qмλS Implicit input multiple times
11           Push 11
  ‹          Less than 11?
   i   }     If equals 1, then
    Ñ         Divisors
     ¨        Remove last
      O       Sum
       q     Implicit print and quit
        м    Negative filter
         λ   Undefined, ignored error
          S  Split into chars

Of course everything after "quit" doesn't actually happen.

I wish ÆḌS would have been valid on its own... Extraordinary answer!

@Mr.Xcoder I'm not sure how мλS would work in 05AB1E.

Emphasize on I wish :P


text:
Pi Hunting - find an index of Pi whose value matches its index
Given π to an arbitrary number of places, your challenge is to locate indices of π where the index (1,2,3,4...) and the string of numbers from that index carry the same value for the length of the index.
That sounds complex, so let's look at an example!
Indices will count from +1 upwards through natural whole integers, skipping 0 as the first index:
1, 2, 3, 4,.... up to an arbitrary whole positive number.
If the number being used (instead of π) was:
123456789101112
then for each index value 1... the sequence of numbers at that index position would match with the value of the index.
At position 1 the string '1' can be found
123456789101112
^

At position 2 the string '2' can be found
123456789101112
 ^

If this sequence continue to 10, you'd find that at position 10 the sequence '10' is found.
123456789101112
         ^

However, when you reach position 11, you find '01', not '11'.
123456789101112
          ^

Given an input value of π of the format:
3.14159...
and taking off 3. to give 14159... using indices start at 1, so the first string found at index 1 is "1", the first string found at index 2 is "4", etc.
Find the shortest code to locate the first 4 indices where the set of characters at that index position have the same numerical sequence as the numbers that make up the index.
Shortest wins!
Built-ins are allowed
Examples of finding the nth digit of pi:
Find the nth decimal of pi
The major step here is to make the comparison of the nth digit and 'n' to determine if there's a match.
** First Match **
3.14159265
1 : finds '1'
A simple psuedo-code approach might be similar to the following, except this one doesn't account for "3." or the index being off by 1:
assume input=pi to any arbitrary length supported with '3.' removed
for(var index=0, maximumInputLength=input.length; index < maxmimumInputLength; index++) {
 var indexString = '' + i;
 var indexLength = indexString.length;
 if(indexString.substr(index, indexLength) == indexString) {
    // index found at index'th position
 } else {
    // index not found at index'th position
 }
}

This style of solution will return '6' found in the 6th index position and '27' found in the 27th index position.
Given 141 592 6 (6 is in the 7th position starting at 0).
To verify if an answer is correct, you can use the above code to find the nth digit of pi and compare to the value of 'n' in your language of choice!
Thank you for the great feedback in helping me write a better first question.
Clarifications:

Is π given as an input - YES

Comments are not for extended discussion; this conversation has been moved to chat.

Python 2, 64 bytes
i=1
while i<len(P):
	if int(P[i:i+len(str(i))])==i:print i
	i+=1

As you said, pi's digits are given, so I chose the variable P to contain the entire digit string.
The full code first downloads one billion digits of pi to a file using cURL and then reads in that file to process it.
"Setting up pi's digits."; exec'import os\nN,f=200000000,"pi.txt"\nif not os.path.exists(f):os.system("curl https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt>"+f)\nP=open(f,"r").read()[1:N+2][:-1]'
"Search through pi.";      exec'i=1\nwhile i<len(P):\n\tif int(P[i:i+len(str(i))])==i:print i\n\ti+=1'

Though, when one knows the answer, a simple plaintext output is actually shorter (29 bytes).
print"1,16470,44899,79873884"

This series of numbers is also known to the OEIS (http://oeis.org/A057680).

Isn't your second solution one of the forbidden standard loopholes?

does i++ work in python? to save a character?

@DirtyDev Well, the question says Given π and assume input=pi to any arbitrary length supported with '3.' removed, so I let P equal pi in my program.
However, with P not declared, the code snippet does not work and thus I provided a fully functional program that downloads a file containing pi and assigns it to P. After that my provided code snippet is executed.

@MyStream No, it does not. Python has the Negation (Arithmetic) and Positive operators defined as - and +. Thus the expressions --3 == 3 and +++68 == 68 are true. i=0;i++ even raises an error, as there is no ++ operator. More about Python operators in the docs.

@JonathanFrech no that part is totally fine, I meant the print"..." thing

@DirtyDev Yes, indeed the loopholes forbid a plaintext output (https://codegolf.meta.stackexchange.com/a/1063/73111), yet this loophole's comments also suggest that a plaintext output should not be possible. I just wanted to mention the possibility of a plaintext output which unfortunately requires less bytes.


text:
Zippered Paragraph
(Inspired by this challenge)
Given two input strings, one of which is exactly one character longer than the other, arrange the strings into ASCII art as if they are two halves of a zipper that is only halfway zippered. The longer word forms the bottom of the zipper, and is the first and last character of the combined zippered portion. Since that paragraph is hard to understand, take a look at some examples:
zippered
paragraph

 z
   i
     p
       p
        gerraepdh
      a
    r
  a
p

Note how paragraph (the longer word) forms the bottom zipper, and the g r a p h portion encapsulates the e r e d portion of zippered, and the z i p p and p a r a portions are offset from each other.
Input

Two ASCII strings in any convenient format, with one guaranteed to be even in length and the other exactly one character longer.
Neither string will contain whitespace, but may contain any other printable ASCII value.
You can take the input in either order. Please state in your submission the input order.

Output
The resulting ASCII art representation of the zippered words, as described above, again in any convenient format.
Rules

Leading or trailing newlines or whitespace are all optional, so long as the characters themselves line up correctly.
Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
If possible, please include a link to an online testing environment so other people can try out your code!
Standard loopholes are forbidden.
This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.

Examples
ppcg
tests

 p
   p
    sctgs
  e
t

string
strings

 s
   t
     r
      iinnggs
    r
  t
s

May we assume the input does not contain whitespace?

@DJMcMayhem Yeah, that's a fair assumption.

@Titus one guaranteed to be even in length and the other exactly one character longer.  The shorter string is always even

Japt, 31 28 bytes
N®¬£ç iXYm½*Ul
uUo mw
y c ·y

Test it online! Takes the shorter string first.
Explanation
N®¬£ç iXYm½*Ul    First line: Set U to the result.
N®                Map each item (there's exactly 2 of them) in the input to
  ¬                 the item split into chars,
   £                with each item X and index Y mapped to
    ç                 the first input filled with spaces,
      iX              with X inserted at index
        Ym½*Ul          min(Y, 0.5 * U.length).
                  At the end each input is an array like
                  ["p    ", " p   ", "  c  ", "  g  "]
                  ["t    ", " e   ", "  s  ", "  t  ", "  s  "]

uUo mw    Second line: Set V to the result (though that's not important).
 Uo       Pop the last item (the array representing the second string) from U.
    m     Map each item by
     w      reversing.
u         Push the result to the beginning of U.
          At the end we have e.g.
          ["    t", "   e ", "  s  ", "  t  ", "  s  "]
          ["p    ", " p   ", "  c  ", "  g  "]

y c ·y    Last line: Output the result of this line.
y         Transpose: map [[A,B,C,...],[a,b,c,...]] to [[A,a],[B,b],[C,c],...].
  c       Flatten into one array. [A,a,B,b,C,c,...]
    ·     Join on newlines. Now we have the output transposed.
     y    Transpose rows with columns.

Charcoal, 33 31 bytes
→Ｆ²«ＦＬθ«§θκ→¿‹κ÷Ｌθ²¿ι↑↓»Ｊ⁰ＬθＡηθ

Try it online! Link is to verbose version of code. Takes the shorter string first. Edit: Saved 2 bytes by tweaking the midpoint detection. Explanation:
→Ｆ²«

Loop over each string in turn.
ＦＬθ«

Loop over each character of the string in turn.
§θκ→

Print the character and move an extra square to the right.
¿‹κ÷Ｌθ²¿ι↑↓»

For the first half of the string, also move the cursor down or up as appropriate.
Ｊ⁰ＬθＡηθ

After printing the first string, jump to the second string's starting point, and replace the first string with the second, so that it gets printed for the second loop. (The code runs on both loops, but the second time it's a no-op.)

Jelly,  27  26 bytes
-1 byte thanks to Erik the Outgolfer (use repeat, ¡, to replace if, ?, and a passed else clause ¹)
JCḂ¡€ṚH
żµL⁶ẋ;Ð€Fṙ"ÇZṙÇṀ$Y

A full program that prints the result with leading white-space, as allowed in the question (or a dyadic link returning a list of characters).
Try it online!
How?
JCḂ¡€ṚH - Link 1, get rotations: list p        e.g.: ["a1","b2","c3","d4","e5","f6","g"]
J       - range of length of p                       [ 1, 2, 3, 4, 5, 6, 7]
    €   - for €ach:
   ¡    -   repeat link:
  Ḃ     - ...# of times: modulo 2                      1  0  1  0  1  0  1
 C      - ...link: complement (1-x)                    0  2 -2  4 -4  6 -6
     Ṛ  - reverse                                    [-6, 6,-4, 4,-2, 2, 0]
      H - halve                                      [-3, 3,-2, 2,-1, 1, 0]

żµL⁶ẋ;Ð€Fṙ"ÇZṙÇṀ$Y - Main link: longer (odd length); shorter (even length)
                   -                           e.g.: "abcdefg", "123456"
ż                  - zip them together               ["a1","b2","c3","d4","e5","f6","g"]
 µ                 - monadic chain separation, call that p
  L                - length of p                     7
   ⁶               - literal space character         ' '
    ẋ              - repeat                          "       "
        F          - flatten p                       "a1b2c3d4e5f"
      Ð€           - map with:
     ;             -   concatenation                 ["       a","       1","       b","       2","       c","       3","       d","       4","       e","       5","       f","       6","       g"]
           Ç       - call last link (1) as a monad with argument p
          "        - zip with (no action on left by trailing values of right):
         ṙ         -   rotate left by                ["  a     ","    1   "," b      ","     2  ","c       ","      3 ","       d","       4","       e","       5","       f","       6","       g"]
            Z      - transpose                       ["    c        ","  b          ","a            ","             "," 1           ","   2         ","     3       ","      d4e5f6g"]
                $  - last two links as a monad:
              Ç    -   call last link (1) as a monad with argument p
               Ṁ   -   maximum                       3
             ṙ     - rotate left by                  ["             "," 1           ","   2         ","     3       ","      d4e5f6g","    c        ","  b          ","a            "]
                 Y - join with newlines            '''             \n
                                                       1           \n
                                                         2         \n
                                                           3       \n
                                                            d4e5f6g\n
                                                          c        \n
                                                        b          \n
                                                      a            '''
                   - as full program: implicit print

C¹Ḃ? -> CḂ¡

Pyth, 35 bytes
AQj.t.e+*d+lG*<klH*^_1k/h-lGk2b.iHG

Try it online!

That was speedy fast!

@AdmBorkBork You can expect that to happen multiple times, especially from this answerer.

V, 47 38 30 27 26 25 bytes
Finally beat the current Jelly answer \o/
Takes input with the longer word on top
Explanation coming, don't think there's much more to golf.
òGxplòxãòd|>HÏpd|>GGÏphl

Try it online!
Explanation
ò     ò      ' <M-r>ecursively
             |abc
             def
 Gx          ' (G)oto the last line and (x) the first character
             abc
             |ef
            ' <C-O> Go back to the previous location
             |abc
             ef
    p        ' (p)aste the character cut
             a|dbc
             ef
     l       ' move one character right
             ad|bc
             ef

x                  ' (x) the last extraneous character from the previous loop
 ã                 ' <M-c>enter the cursor
  ò                ' <M-r>ecursively
   d|              ' (d)elete to the first co(|)umn
     >H            ' (>) Indent every line from here to (H)ome (first line)
                   ' this leaves the cursor on the first line
       Ïp          ' <M-O>n a newline above this (the first) (p)aste the deleted section
                   ' this leaves the cursor on the last character
         d|        ' (d)elete to the first co(|)umn
           >G      ' (>) Indent every line from here to the end (G)
                   ' unfortunately the cursor stays on the first line
             G     ' (G)oto the last line
              Ïp   ' <M-O>n a newline above this (the last) (p)aste the deleted section
                hl ' move left and then right (break the loop at the end)

Python 2, 128 119 bytes
f=lambda a,b,n=0:n/2<len(a)and' '*-~n+a[0]+'\n'+f(a[1:],b[1:],n+2)+'\n'+' '*n+b[0]or' '*n+''.join(sum(zip(b,a+' '),()))

Try it online!

V, 79 bytes
ãl}dÍ./ &
XòYf D"0Pr -Y;D"0pr +òGï"1pÓ./&ò
}dGÓ/&ò
{jpògJòÓó
|DÇ./d
MÙ"-pBr

Try it online!
The following should be read with plenty of sarcasm and air-quotes.

Here's an answer in my golfing-language that's good at short answers to string-based and ASCII-art challenges.

Why do I keep doing this to myself?
Hexdump:
00000000: e36c 167d 64cd 2e2f 2026 0a58 f259 6620  .l.}d../ &.X.Yf
00000010: 4422 3050 7220 2d59 3b44 2230 7072 202b  D"0Pr -Y;D"0pr +
00000020: f247 ef22 3170 d32e 2f26 f20a 0f16 7d64  .G."1p../&....}d
00000030: 47d3 2f26 f20a 7b6a 70f2 674a f2d3 f30a  G./&..{jp.gJ....
00000040: 7c44 c72e 2f64 0a4d d922 2d70 4272 20    |D../d.M."-pBr

Does V have a "transpose rows with columns" command? 'Cause if not, you might wanna invest in that...

Jelly, 28 bytes
HĊ©«Rµ®Ḥ_,Ṗ
ZLÇṬ€a"¥"o⁶ZẎz⁶Y

Try it online!
Woo Jelly is actually competing in a string and ascii-art challenge! \o/

Mainly because every other language is having trouble as well. Speaking of which, someone might wanna go talk to V...

Nice, I managed 27 - but maybe you can abuse leading/trailing white-space allowance too?

@JonathanAllan Sadly I think that's impossible. Removing the Ṗ will not add a trailing space but a trailing 1. And omitting anything that has to do with spaces removes the line-up of the letters. Generally, this algorithm uses indexing so that the letters get to a particular index in a column and then the rest is filled with spaces, so I think this can't be golfed any further. At least I'm glad that Jelly isn't outgolfed by CJam. ;)

:| Jelly is golfier than Charcoal

05AB1E, 26 23 bytes
øS2ä`JIθ«¸«vyNúr})2äR˜»

Try it online!
Explanation
With example input = ppcg, tests
ø                           # zip the input strings
                            # STACK: ['tp', 'ep', 'sc', 'tg']
 S                          # split to a list of characters
                            # STACK: ['t', 'p', 'e', 'p', 's', 'c', 't', 'g'
  2ä                        # divide the list into 2 parts
    `                       # push them as separate to stack
                            # STACK: ['t', 'p', 'e', 'p'], ['s', 'c', 't', 'g']
     J                      # join the second part to a single string
      Iθ«                   # append the tail of the second input
         ¸«                 # concatenate the 2 lists
                            # STACK: ['t', 'p', 'e', 'p', 'sctgs']
           v                # for each y,N (element, index) in the list
            yNú             # prepend N spaces to y
               r            # reverse the stack
                })          # end loop and wrap the stack in a list
                            # STACK: ['    sctgs', '  e', 't', ' p', '   p']
                  2ä        # split the list into 2 parts
                    R       # reverse the list
                            # STACK: [[' p', '   p'], ['    sctgs', '  e', 't']]
                     ˜»     # flatten the list and join on newlines

I tried really hard on this question like a week ago and you had to just go and... beat me.  +1 for making me try a little more!

@nmjcman101: I hope you can get yours down a bit more. Some friendly competition is always fun :)

C# (.NET Core), 163 bytes
(l,s)=>{var o="";int i=0,k=s.Length;for(;i<k;)o+=i<k/2?s[i++]+"\n"+"".PadLeft(i):l[i]+""+s[i++];o+=l[i]+"\n";for(i=k/2;i>0;)o+="".PadLeft(--i)+l[i]+"\n";return o;}

Try it online!
Probably a lot of golfing to do here, but here's an initial non-LINQ attempt. Lambda function that takes the longer word first, and returns a string  with the ouput.

Use currying to save a byte (l=>s=>) i.e. Func<input1, Func<input2, output>>.

Java 8, 216 bytes
A curried lambda: takes String and returns a lambda from String to String. The parameter to the outer lambda is the shorter string.
Not being able to index into Strings with array syntax is...unfortunate.
s->t->{int l=s.length(),i=l/2;String o="",p=o,n="\n";for(;i<l;p+="  ")o=o+t.charAt(i)+s.charAt(i++);o=p+o+t.charAt(i)+n;for(;i-->0;)o=p.substring(l-i--)+s.charAt(i/2)+n+o+p.substring(l-i)+t.charAt(i/2)+n;return o;}

Ungolfed lambda
s ->
    t -> {
        int
            l = s.length(),
            i = l / 2
        ;
        String
            o = "",
            p = o,
            n = "\n"
        ;
        for (; i < l; p += "  ")
            o = o + t.charAt(i) + s.charAt(i++);
        o = p + o + t.charAt(i) + n;
        for (; i-- > 0; )
            o =
                p.substring(l-i--)
                + s.charAt(i / 2)
                + n
                + o
                + p.substring(l-i)
                + t.charAt(i / 2)
                + n
            ;
        return o;
    }

Explanation
l is the length of the shorter input and i is a multipurpose index, initialized to refer to the first character of the second half of the shorter input. o accumulates the result, p ultimately stores spaces for padding, and n is an alias for "\n".
The first loop interleaves the second halves of the two strings (excluding the last character of the longer input) and builds p to the proper amount of padding for the middle line.
The next line completes the middle line of output.
I would like to apologize to James Gosling for the second loop. It adds the lines above and below the middle line from the inside out. Entering the loop, i is l - 1, so one character of padding is prepended along with the last character of the first half of the shorter string. i is decremented so that the next padding (appended to the result) is a character shorter. By integer division, the same position character of the longer string is appended. This repeats, and the completed result is returned.
Cool stuff
Line 13 used to be
o+=t.charAt(i)+""+s.charAt(i++);

because without the empty string, + added the character values together and appended a numeric string. By expanding the compound assignment, the concatenation of o and t.charAt(i) is evaluated first, which yields the desired result without need for the empty string, saving 2 bytes. This is the first time I've seen a compound assignment behave differently from its expansion.

PHP, 149 129 bytes
for($r=" ";$x+1<$w=2*$e=strlen($argv[2]);++$x&1||$r[++$i*$w-1]="
")$r[$w*($x&1?$y-1:$e-$y+=$y<$e/2)+$x]=$argv[2-$x%2][$i];echo$r;

Run with -nr or try it online.

Javascript (ES6), 140 137 133 bytes
A=(a,b,c=0)=>a[c/2]?` `[d=`repeat`](c+1)+a[0]+`
`+A(a.slice(1),b.slice(1),c+2)+`
`+` `[d](c)+b[0]:` `[d](c)+[...a].map((e,f)=>e+b[f])

Quite sure this can be golfed further

E.g. can't \`+`  `be merged into` ``? (I don't know JS).

@Kaz: no, because we execute the repeat method on just the space, and not the newline+space.

Mathematica, 174 bytes
(a=(c=Characters)@#;b=c@#2;T=Table;Column[Join[T[T["  ",i]<>a[[i]],{i,g=Length@a/2}],{T["  ",g+1]<>Riffle[b[[-g-1;;]],a[[-g;;]]]},Reverse@T[T["  ",i]<>b[[i+1]],{i,0,g-1}]]])&

Input

["zippered", "paragraph"]

TXR Lisp, 126 bytes
(defun f(a b :(n 0))(if(<(/ n 2)(length a))` @{""n}@[a 0]\n@(f(cdr a)(cdr b)(+ n 2))\n@{""n}@[b 0]``@{""n}@{(zip b`@a `)""}`))

Perl 5, 163 bytes
@a=map{$s=.5*length;[/./g]}<>;say(($"x(2*$_)).$a[0][$_])for 0..$s-1;print$"x(2*$s);print$a[0][$_].$a[1][$_]for$s..@{$a[1]};print$/.($"x(1+2*$s)).$a[1][$s]while$s--

Try it online!
Takes the longer string first.


text:
What's my name?
Given a PPCG User ID, output that user's current username.
Examples
Input -> Output
61563 -> MD XF
2     -> Geoff Dalgas
12012 -> Dennis
foo   ->
-3    ->

Rules

Input/output can be taken via any allowed means.
The output must be the full username with proper capitalization and spacing, nothing more and nothing less.
If the input is not a valid UserID, or the user does not exist, your program should output nothing or error output.
Your program must work for any valid user, even one created after this challenge.
Your program does not have to work for the Community user.
Your program does not have to work for deleted users.
URL shorteners are disallowed.

Scoring
Shortest code in each language wins.

Very closely related, but since my vote is a hammer, I'm not close-voting yet.

@AdmBorkBork Yeah, those are pretty closely related, but this is significantly easier.

Oh, that one will be soooo easy in C++

I'm curious about also doing the reverse of is. Does anyone know if display names are unique?

@geokavel They are not.

English, 3 bytes: Okx. Yes, that's my name.

@Old In real life?

@NoOneIsHere who is Old?

@MDXF I meant Okx, typoed on mobile :(

Everybody can save 4 bytes (in “normal” languages): xxx.stackexchange.com/u/123 redirects to xxx.stackexchange.com/users/123

05AB1E, 35 34 bytes
Doesn't work online because of internet restrictions.
Code
’ƒËŠˆ.Â‚‹º.ŒŒ/†š/ÿ’.w'>¡4è5F¦}60F¨

Explanation
The compressed string:
’ƒËŠˆ.Â‚‹º.ŒŒ/†š/ÿ’

pushes the following string:
codegolf.stackexchange.com/users/<input>

Whereas <input> is the user input. After this, we read all data using .w and do some string manipulation tricks on the data:
'>¡4è5F¦}60F¨

'>¡             # Split on '>' (Usernames aren't allowed to have '>' so we're safe)
   4è           # Take the 5th element (which is in the header of the HTML page)
     5F¦}       # Remove the first 5 characters, which is "User "
         60F¨   # Remove the last 60 characters, which is:
                  " - Programming Puzzles & Code Golf Stack Exchange</title"
                # Implicitly output the username

When run locally, I get the following output:

I think that an explanation will be needed for this brand of black magic

I'm looking at my screen at an angle, am I supposed to se an outline of totallyhuman's flair and "apparently" next to your username?

@TaylorScott Done.

@NoOneIsHere Yeah, cmder is a tiny bit transparent. That is actually this answer what you are seeing.

Umm, part of your explanation is „ -¡¬.

@EriktheOutgolfer fixed.

-1 by using u instead of †š.

Bash, 120 112 106 102 80 76 74 bytes
-8 bytes because wget is smart enough to redirect HTTP to HTTPS when necessary
-6 bytes thanks to another sed suggestion from Cows quack
-26 bytes thanks to Digital Trauma
-4 bytes thanks to Gilles - codegolf.stackexchange.com/u/123 redirects
-2 bytes thanks to Digital Trauma's answer's wget flags
wget -qO- codegolf.stackexchange.com/u/$1|sed -nr 's/.*>User (.*) -.*/\1/p'

No TIO link since the TIO arenas can't access the internet.
Thanks to the answers here and the people in chat for helping me with this. I used an approach similar to HyperNeutrino's.

wget -qO- codegolf.stackexchange.com/users/$1 downloads the user's profile page and prints the file to STDOUT. -q does it quietly (no speed information).
sed -nr 's/.*User (.*) -.*/\1/p' searches for the first string User<space>, then prints up until it reaches the end of the name, found using sed magic.

Previous answer that I wrote more independently (102 bytes):
wget codegolf.stackexchange.com/users/$1 2>y
sed '6!d' <$1|cut -c 13-|cut -d '&' -f1|sed 's/.\{23\}$//'

wget codegolf.stackexchange.com/users/$1 2>y saves the user profile HTML to a file titled with their UserID and dumps STDERR to y.
cat $1 pipes the file into the parts that cut away the useless HTML.
sed '6!d' (in the place of head -6 | tail -1) gets the sixth line by itself.
cut -c 13- strips away the first 13 characters, getting the username to start at the first character of the string.
cut -d '&' -f1 cuts everything after the &. This relies on the fact that an ampersand is not allowed to be in a username, nor an HTML title.
Now the string is <username> - Programming Puzzles
sed 's/.\{23\}$//' was a suggestion from cows quack to remove the last 15 bytes of a file. This gets the username by itself.

Here's a full bash script.

...TIO arenas can't access the internet They can, that's how you're able to access it. :P User-submitted code is not permitted access to the internet .  </nitpick>

@totallyhuman You can access TIO arenas via the internet. But the arenas themselves cannot access the internet. Even Dennis' code running on an arena cannot access the internet.

@totallyhuman afaik no they can't. You give the main server your code, the main server connects to an arena and runs the code. That might be outdated info though

For userID 11259, the output is Digital Trauma - Progr

@DigitalTrauma Whoops, forgot to fix the second sed bytecount.

You have a useless use of cat.  Also some more minor optimisations of line 2: sed 6\!d $1|cut -c 13-|cut -d\& -f1|sed 's/.\{23\}$//'

Also, your line 2 can be cut down to just one sed: sed -nr 's/.*r (.*) -.*/\1/p' $1

@DigitalTrauma Doesn't work for user 65535 for some reason. (second comment)

@MDXF You'd have to use sed -nr 's/.*User (.*) -.*/\1/p' $1 then.

@DigitalTrauma Thanks. Will that work if the username contains User?

@MDXF I guess not.  You could do sed -nr 's/.*>User (.*) -.*/\1/p' $1 instead and I think you'd be safe.

@DigitalTrauma Ok, thanks. Does your answer work if the username contains User? I see it uses a similar approach.

@MDXF yep, I just added in a " take care of that.

Instead of wget -qO-, you can also use curl -Ls, this should save 1 byte, provided I looked at all edge cases

Bash + GNU utilities, 66

3 bytes saved thanks to @Arnauld.
4 bytes saved thanks to @Gilles.

wget -qO- codegolf.stackexchange.com/u/$1|grep -Po '"User \K[^"]+'

Uses -PCRE regex flavour to do a \K match start reset for much shorter output filtering.

If your system already has curl installed, we can use @Gilles' suggestion:
Bash + curl + GNU utilities, 64
curl -L codegolf.stackexchange.com/u/$1|grep -Po '"User \K[^"]+'

What is the purpose of O-?

@Cowsquack -O- sends the downloaded output to STDOUT instead of a file, so it can be simply piped to grep

You can do grep -Po '"User \K[^"]+' to save 3 bytes.

curl -L is shorter than wget -qO-. You can use /u instead of /users.

@Gilles Yes - I went with wget instead of curl as its a "cleaner" answer (no dependency on 3rd-party installations).  But a 2 byte saving is a 2 bytes saving so I've noted it :).  Thanks for the s/users/u/ tip!

You need to -s flag for curl to suppress the process bar, as the question doesn't say you are allowed to output things to the error stream (or I misread the rules somewhere, they are really scattered around)

@Ferrybig I'm assuming its ok to ignore STDERR by default

wget and curl are both third-party to bash anyway. In default Linux installations I think curl is a bit more common than wget. So wget isn't “cleaner” than curl. Cleaner would be doing it in pure bash (<>/dev/tcp/codegolf.stackexchange.com/80 — good luck with the HTTPS redirect!).

@Gilles yep, pure bash is definitely "cleanest".  In my experience (which is likely less than yours) I've never had to install wget, but I do remember installing curl on a couple of occasions (I think Ubuntu is this way).  My claim is that sticking to purely GNU tools is cleaner, but this is not a strongly held conviction :).  The answer now contains both anyway - Thanks!

Python 2 + requests, 108 bytes
from requests import*
t=get('http://codegolf.stackexchange.com/u/'+input()).text
print t[49:t.index('&')-23]

note
once SE goes fully https, the http needs to be changed to https, which will make this 113 bytes.
The beginning of a user profile looks like this:
<!DOCTYPE html>
<html>

<head>

<title>User MD XF - Programming Puzzles & Code Golf Stack Exchange</title>

The username starts at index 49 and the ampersand occurs 23 characters to the right of where it ends ( - Programming Puzzles)
-3 bytes thanks to StepHen/Mego by removing the unused re import
-1 byte thanks to Uriel
-4 bytes thanks to Makonede

You never use re so you can drop 3 bytes

You can also use http for the time being, but that will be phased out eventually when SE goes full HTTPS.

@Mego I'll add that in as a side note - thanks

also, from requests import* and drop r. for 113 bytes

@Uriel But it can't :)

@Hyper-Neutrino thankfully a site full of questions about validation has a proper validation

Why are you using t.index('&')-23?! Cannot you just use t.index('-')-1]?

@Mr.Xcoder Names can contain - but not &.

Ah, I see... :)

You can drop the sers from users to save 4 bytes.

JavaScript (ES6), 111 75 bytes
Only works when run through the PPCG domain. Returns a Promise object containing the username.
i=>fetch("/users/"+i).then(r=>r.text()).then(t=>t.slice(44,t.search`&`-23))

Thanks to Downgoat for confirming that the alternative method I was toying with was valid, thus allowing me to save 36 bytes.

77 bytes: i=>fetch(\/users/${i}`).then(r=>r.text()).then(s=>/"User ([^"]+)/.exec(s)[1])`

66 bytes: i=>$.get(\/users/${i}`).done(s=>alert(/"User ([^"]+)/.exec(s)[1]))`

you can remove the parenthesis from fetch to save 2 bytes

Thanks, @Downgoat; I'd already toyed with the idea of fetching the user's page that way but thought it might be pushing my luck. But seeing as you've suggested it too, I'll edit it in. Do any browser's currently support .done()? I tested it quickly in Chrome & FF but it didn't work there.

@Gilz, I could only have done that if there wasn't a variable involved.

@Shaggy the latter version with done() does not use fetch APIs

-4 by using u instead of users.

Cubically + Bash, 1654 1336 1231 bytes
-423 bytes thanks to TehPers
This needs three Cubically scripts (named 1, 2 and 3) and 1 bash script.
The Cubically scripts are really long because I haven't thought of a good way to implement loops yet.
Bash (84 bytes):
ln -s rubiks-lang /bin/r
r 1 <<<$1 2>y|xargs wget 2>y
cat $1|r 2 2>y|rev|r 3 2>y|rev

This pipes the first Cubically script into wget, then the saved file into the second Cubically script, then reverses that output, pipes it into the third Cubically script, then reverses it.
1 (385 bytes):
+5/1+551@6:5+3/1+552@66:4/1+552@6:5+2/1+552@6:4/1+51@6:2/1+5@66:5+51@6:3/1+552@6:1/1+551@6:2/1+551@6:4/1+551@6:3/1+552@6:5+52@6:3/1+551@6:1/1+5@6:5+2/1+552@6:5+3/1+552@6:5+2/1+55@6:5+51@6:5+3/1+551@6:2/1+551@6:3/1+553@6:5+51@6:5/1+551@6:5+2/1+55@6:2/1+552@6:4/1+551@6:2/1+551@6:1/1+5@6:5+51@6:3/1+552@6:1/1+552@6:2/1+5@6:5+53@6:5+2/1+552@6:2/1+551@6:5+1/1+552@6:5+2/1+552@6:2/1+5@6$7%7

This prints https://codegolf.stackexchange.com/users/, then the first integer of input.
2 (680 505 bytes):
~7777777777777777777777777777777777777777777777777
F1R1
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6
~7@7:5=7&6

This reads the unnecessary data from the saved file as input, then prints up until the ampersand in Programming Puzzles & Code Golf.
~7@7 reads a character and prints it. F1R1 and :5=7 check if the input is the ampersand. &6 exits if it is.
~7@7:5=7&6 is repeated 45 times because there are 15 bytes of unnecessary data and a 30-byte max StackExchange username.
3 (505 446 342 bytes):
U3D1R3L1F3B1U1D3
~777777777777777777777777
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7
~7-1=7&6@7

Very similar to the last script, this reads the first few unnecessary bytes, then cats until EOF. This also works due to the max SE username.

For file 3, why not use :0-1/1 instead of :4+4/1-1? Also, the first instance of it can just be -1/1 because notepad starts at 0.

Might want to warn that /bin/r is overwritten.

For file 2, you can do F1R1 at the beginning, then use +5 throughout the program in place of +2/1+4

Swift 3, 233 bytes
import Foundation;func f(i:String){let s=try!String(contentsOf:URL(string:"http://codegolf.stackexchange.com/users/"+i)!,encoding:.utf8);print(s[s.index(s.startIndex,offsetBy:44)...s.index(s.characters.index(of:"&")!,offsetBy:-24)])}

Sample runs:
f(i:"8478") // Martin Ender
f(i:"12012") // Dennis
f(i:"59487") // Mr. Xcoder

Yes! Swift! An oasis from a desert of golfing languages

@bearacuda13 Lol true :)

You could be able to use a closure and save a lot of bytes

@Downgoat Thanks for the tip, I'll update when I have time.

Python 2, 116 bytes
Just thought it's nice to have a standard library answer (that's actually quite decent in length).
from urllib import*
f=urlopen('http://codegolf.stackexchange.com/users/'+input()).read()
print f[49:f.index('&')-23]

When SE goes fully https, we need to add 1 more byte, switching urlopen('http://... with urlopen('https://....

Stack Exchange Data Explorer, 47 bytes
SELECT DISPLAYNAME FROM USERS WHERE ID=##N##--N

Try it online!

Powershell, 165 142 137 127 bytes
23 28 38 bytes saved thanks to AdmBorkBork!
Creates a file named 0 as a side effect.
((iwr"codegolf.stackexchange.com/u/$args").AllElements|?{$_.class-like"user-c*"})[1].innerhtml-match"(.+?) ?<|.+">0
$matches[1]

Works by going to the proper webpage, and selecting the "user-card-name" element, then extracting the proper text out of the innerhtml.
Testing
PS C:\Users\Conor O'Brien\Documents\powershell> .\whats-my-name-137085.ps1 61563
MD XF
PS C:\Users\Conor O'Brien\Documents\powershell> .\whats-my-name-137085.ps1 2
Geoff Dalgas
PS C:\Users\Conor O'Brien\Documents\powershell> .\whats-my-name-137085.ps1 12012
Dennis
PS C:\Users\Conor O'Brien\Documents\powershell> .\whats-my-name-137085.ps1 foo
Invoke-WebRequest : current community chat Programming Puzzles & Code Golf
Programming Puzzles & Code Golf Meta your communities Sign up or log in to customize your list. more stack
exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour
Start here for a quick overview of the site Help Center
Detailed answers to any questions you might have Meta
Discuss the workings and policies of this site About Us
Learn more about Stack Overflow the company Business
Learn more about hiring developers or posting ads with us
Programming Puzzles & Code Golf Questions Tags Users Badges Unanswered Ask Question
 Page Not FoundWe're sorry, we couldn't find the page you requested.
Try searching for similar questions
Browse our recent questions
Browse our popular tags
If you feel something is missing that should be here, contact us.
about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback
Technology Life / Arts Culture / Recreation Science Other
Stack Overflow
Server Fault
Super User
Web Applications
Ask Ubuntu
Webmasters
Game Development
TeX - LaTeX
Software Engineering
Unix & Linux
Ask Different (Apple)
WordPress Development
Geographic Information Systems
Electrical Engineering
Android Enthusiasts
Information Security
Database Administrators
Drupal Answers
SharePoint
User Experience
Mathematica
Salesforce
ExpressionEngine® Answers
Blender
Network Engineering
Cryptography
Code Review
Magento
Software Recommendations
Signal Processing
Emacs
Raspberry Pi
Programming Puzzles & Code Golf
Ethereum
Data Science
Arduino
more (26)
Photography
Science Fiction & Fantasy
Graphic Design
Movies & TV
Music: Practice & Theory
Worldbuilding
Seasoned Advice (cooking)
Home Improvement
Personal Finance & Money
Academia
Law
more (17)
English Language & Usage
Skeptics
Mi Yodeya (Judaism)
Travel
Christianity
English Language Learners
Japanese Language
Arqade (gaming)
Bicycles
Role-playing Games
Anime & Manga
Puzzling
Motor Vehicle Maintenance & Repair
more (32)
MathOverflow
Mathematics
Cross Validated (stats)
Theoretical Computer Science
Physics
Chemistry
Biology
Computer Science
Philosophy
more (10)
Meta Stack Exchange
Stack Apps
Area 51
Stack Overflow Talent
site design / logo © 2017 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution
required rev 2017.8.1.26652
At C:\Users\Conor O'Brien\Documents\powershell\whats-my-name-137085.ps1:1 char:3
+ ((Invoke-WebRequest -URI("codegolf.stackexchange.com/users/"+$args[0])).AllEleme ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], We
   bException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Cannot index into a null array.
At C:\Users\Conor O'Brien\Documents\powershell\whats-my-name-137085.ps1:2 char:1
+ $matches[1]
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

PS C:\Users\Conor O'Brien\Documents\powershell> .\whats-my-name-137085.ps1 -3
Invoke-WebRequest : current community chat Programming Puzzles & Code Golf
Programming Puzzles & Code Golf Meta your communities Sign up or log in to customize your list. more stack
exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour
Start here for a quick overview of the site Help Center
Detailed answers to any questions you might have Meta
Discuss the workings and policies of this site About Us
Learn more about Stack Overflow the company Business
Learn more about hiring developers or posting ads with us
Programming Puzzles & Code Golf Questions Tags Users Badges Unanswered Ask Question
 Page Not FoundWe're sorry, we couldn't find the page you requested.
Try searching for similar questions
Browse our recent questions
Browse our popular tags
If you feel something is missing that should be here, contact us.
about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback
Technology Life / Arts Culture / Recreation Science Other
Stack Overflow
Server Fault
Super User
Web Applications
Ask Ubuntu
Webmasters
Game Development
TeX - LaTeX
Software Engineering
Unix & Linux
Ask Different (Apple)
WordPress Development
Geographic Information Systems
Electrical Engineering
Android Enthusiasts
Information Security
Database Administrators
Drupal Answers
SharePoint
User Experience
Mathematica
Salesforce
ExpressionEngine® Answers
Blender
Network Engineering
Cryptography
Code Review
Magento
Software Recommendations
Signal Processing
Emacs
Raspberry Pi
Programming Puzzles & Code Golf
Ethereum
Data Science
Arduino
more (26)
Photography
Science Fiction & Fantasy
Graphic Design
Movies & TV
Music: Practice & Theory
Worldbuilding
Seasoned Advice (cooking)
Home Improvement
Personal Finance & Money
Academia
Law
more (17)
English Language & Usage
Skeptics
Mi Yodeya (Judaism)
Travel
Christianity
English Language Learners
Japanese Language
Arqade (gaming)
Bicycles
Role-playing Games
Anime & Manga
Puzzling
Motor Vehicle Maintenance & Repair
more (32)
MathOverflow
Mathematics
Cross Validated (stats)
Theoretical Computer Science
Physics
Chemistry
Biology
Computer Science
Philosophy
more (10)
Meta Stack Exchange
Stack Apps
Area 51
Stack Overflow Talent
site design / logo © 2017 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution
required rev 2017.8.1.26652
At C:\Users\Conor O'Brien\Documents\powershell\whats-my-name-137085.ps1:1 char:3
+ ((Invoke-WebRequest -URI("codegolf.stackexchange.com/users/"+$args[0])).AllEleme ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], We
   bException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Cannot index into a null array.
At C:\Users\Conor O'Brien\Documents\powershell\whats-my-name-137085.ps1:2 char:1
+ $matches[1]
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

PS C:\Users\Conor O'Brien\Documents\powershell>

PHP, 163 bytes

<?php $a=new DOMDocument;@$a->loadHTML(implode(0,file("http://codegolf.stackexchange.com/users/$argv[1]")));echo$a->getElementsByTagName('h2')->item(0)->nodeValue;

Python + requests, 126 bytes
lambda n:get('http://api.stackexchange.com/users/%d?site=codegolf'%n).json()['items'][0]['display_name']
from requests import*

Accessing the API is longer than reading the actual page apparently...

That moment when standard library + page reading is shorter than requests :p

Jelly, 37 bytes
A port of HyperNeutrino's Python 2 answer - go give credit!
“3¬ẋṙẉṀḷo°ɓẏ8YyŒÇḣðk¦»;ŒGṾṫ51ṣ”&Ḣḣ-23

A monadic link taking a number and returning a list of characters; as a full program prints the result.
Note: not sure quite why the result of ŒG needs to be forced to become a string (done here with Ṿ) :/
How?
“3¬ẋṙẉṀḷo°ɓẏ8YyŒÇḣðk¦» = compression of:
                         "code"+"golf"+"."+"stack"+"exchange"+".com/"+"user"+"s/"

codegolf.stackexchange.com/users/
“...»;ŒGṾṫ51ṣ”&Ḣḣ-23 - Main link: number, n
“...»                - "codegolf.stackexchange.com/users/"
     ;               - concatenate with n
      ŒG             - GET request (should be to string & looks like it on output)
        Ṿ            - uneval (force to a string - shrug)
         ṫ51         - tail from index 51 (seems the ŒG result is quoted too, so 51 not 50)
            ṣ”&      - split on '&'
               Ḣ     - head (get the first chunk)
                ḣ-23 - head to index -23 (discard the last 23 characters)

Mathematica, 126 bytes
StringTake[#&@@StringCases[Import["https://codegolf.stackexchange.com/users/"<>ToString@#,"Text"],"r "~~ __ ~~" - P"],{3,-4}]&

input

[67961]

output

Jenny_mathy

Stratos, 22 bytes
f"¹⁸s/%²"r"⁷s"@0s"³_⁴"

Try it!
Explanation:
f"¹⁸s/%?"               Read the data from the URL:
                        http://api.stackexchange.com/users/%?site=codegolf
                        where % is replaced with the input
         r              Get the JSON array named
          "⁷s"          items
              @0        Get the 0th element
                 s"³_⁴" Get the string "display_name"

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


text:
Floor Planning!

Disclaimer: The story told within this question is entirely fictional, and invented solely for the purpose of providing an intro.

I have a friend who is an architect, and, after explaining the concept of code-golf and this site to him, he said that I should code something actually useful for a change.  I asked him what he would consider useful, and, being an architect, he replied that he would enjoy having a floor planner that gave him all possible arrangements for rooms of certain sizes within a house of a certain size.  I thought I would prove that code-golf wasn't useless after all, and give him this program in the smallest number of bytes possible.
Your Task:
Write a program or function that, when given an array D containing the dimensions of the entire house, and a second array R containing the dimensions of the interior rooms, output as ASCII art, all possible configurations of the rooms inside the house.
All rooms and the exterior walls of the house should be formed as standard ASCII boxes, using the | symbol for vertical walls, the - symbol as horizontal walls, and the + symbol for corners.  For example, a house with the dimensions [4,4] will look like:
+----+
|    |
|    |
|    |
|    |
+----+

As you can see, corners do not count as part of a set of dimensions.  The number of - or | characters forming a side should equal the number given in the dimensions.  Rooms may share walls, or share walls with the house.  A room may not contain smaller rooms within itself.
For example, the configuration
+--+---+-+
|  |   | |
|  |   | |
+--+---+ |
|        |
|        |
+--------+

is valid for D=[5,8], and R=[[2,2],[2,3]].
Input:
Two arrays, one of which contains two integers, the dimensions for the house, and the other of which contains a series of arrays containing the dimensions for rooms.
Output:
Either an array of all possible houses as strings, or a string containing all possible houses, delimited in some consistent way.  Note that rotations of the exact same configuration should only be counted once.
Test Cases:
D     R                   ->   Output

[4,3] [[2,1],[4,1]]       -> +-+-+ +-+-+ +-+-+  Note that though there is an option to switch which side the [2,1] room and the [4,1] room are on, doing so would merely be rotating the house by 180 degrees, and therefore these possibilities do not count.
                             | | | +-+ | | | |
                             +-+ | | | | | | |
                             | | | | | | +-+ |
                             | | | +-+ | | | |
                             +-+-+ +-+-+ +-+-+

[4,7] [[3,1],[4,2],[2,2]  -> +----+--+ +----+--+ +----+--+ +----+--+  There are some more possiblities I didn't feel like adding, but it's the same four again, just with the [4,2] and the [2,2] room switched.
                             |    |  | |    |  | |    |  | |    |  |
                             |    |  | |    |  | |    |  | |    |  |
                             +---++--+ +--+-+-++ +-+--++-+ ++---+--+
                             |   |   | |  |   || | |   | | ||   |  |
                             +---+---+ +--+---++ +-+---+-+ ++---+--+

Scoring:
This is code-golf, lowest score in bytes wins!

Does mirroring count as the same configuration?

No.  You must reproduce mirrored configurations.

Your first test case isn't false ? D = [4,2], but your house is [4,3], isn't it ?

@HatsuPointerKun, thank-you for finding that typo.  It is now fixed.

The second test case, isn't [4,7] [[1,3],[2,4],[2,2]] rather than [4,7] [[3,1],[4,2],[2,2]]?

It's indeed a well known fact that architects do most of their designs with ASCII art in Notepad.

@mdahmoune, it doesn't matter which order a pair of dimensions are given in, as rooms can be rotated.

Python 2, 625 607 602 563 551 bytes

-5 bytes thanks to Mr.Xcoder.
-12 bytes when avoiding deep-copying.
-39 bytes with some list simplifications.

r,z=range,len
L,C=D;p,q,v,w=['+'],['|'],'*',' '
H=[p+['-']*C+p]
P=[[e[:]for e in H+[q+[w]*C+q]*L+H]]
def g(M,x,y,N):
 m=[e[:]for e in M]
 try:
  for i in r(z(N)):
   for j in r(z(N[0])):
	if v==N[i][j]and w!=M[x+i][y+j]:return[]
	m[x+i][y+j]=m[x+i][y+j]in[w,v,N[i][j]]and N[i][j]or'+'
 except:return[]
 return m
for l,c in R:
 H=[p+['-']*c+p]
 P=[g(U,x,y,[e[:]for e in H+[q+[v]*c+q]*l+H])for U in P for x in r(L+2)for y in r(C+2)]
F=[]
for m in P:
 if[e[::-1]for e in m[::-1]]not in F:F+=[m]
for m in F:
 print
 for e in m:print''.join(e).replace(v,w)

Try it online!
Some explanations
It is a greedy approach:

Find all positions where the first room can be allocated
Find all possible positions where the next room can be allocated from the remaining free space of the house, and so on for the other rooms.
If the last room was successfully allocated the code output the configuration if it is not a 180°-rotation of a previous configuration.

You had extraneous spaces at the end of lines, 604 bytes

602 bytes, using a list comprehension.


text:
Sort the climbing grades
My first code golf post, apologies for any mistakes...
Context
In rock climbing (bouldering specifically), the V/Vermin (USA) climbing grades start at 'VB' (the easiest grade), and then go 'V0', 'V0+', 'V1', 'V2', 'V3', 'V4', 'V5' etc. up to 'V17' (the hardest grade).
Task
You will take as input a list/array of climbing grades and you have to to return or print a list/array of the grades sorted from easiest to hardest.
If the input is empty, return an empty data structure; otherwise the input will always be a valid.
Test cases
Input | Output
[] |  []
['V1'] |  ['V1']
['V7', 'V12', 'V1'] | ['V1', 'V7', 'V12']
['V13', 'V14', 'VB', 'V0'] |  ['VB', 'V0', 'V13', 'V14']
['V0+', 'V0', 'V16', 'V2', 'VB', 'V6'] | ['VB', 'V0', 'V0+', 'V2', 'V6', 'V16']

This is a code-golf challenge.

Next time, post this on the sandbox to get feedback before posting it. Secondly, should you really answer your own challenge?

Will duplicate grades appear in the input?

@Mr.Xcoder No duplicates

@IanH. I see, thanks for the tips, well I deleted my own solution and will post it again in a few days (based on the feedback from others)

Welcome to PPCG! Pretty clear and nice for a first question. (y)

Very nice first question! The answers it has lead to are so varying and creative. :)

A good variation would be if you could handle both Vermin and Font grades

Python 2, 58 54 bytes
lambda x:sorted(x,key=lambda y,B10=0:eval(y[1:]+'10'))

Try it online!
How it works
y         y[1:]+'10'   eval(y[1:]+'10')
=======================================
VB        B10          0  (a variable we defined)
V0        010          8  (an octal literal)
V0+       0+10         10
V1        110          110
V2        210          210
...       ...          ...
V17       1710         1710

Looks like porting this to ES6 doesn’t beat Arnauld’s approach: a=>a.sort((a,b,B10=0)=>(g=s=>eval(s.slice(1)+10))(a)>g(b)) is 58 bytes.

a=>a.sort((a,b)=>(g=s=>eval(s.slice(B10=1)+10))(a)-g(b)) is 2 bytes shorter, but that's still too long.

@GB I think it was valid, but now it’s definitely valid.

Why use '10' and not something shorter? For example '2' saves 2 bytes.

@GB The trick is to trigger the translation from the octal notation "010" to 8 as decimal for "V0". With 2, you'd get "02" = 2, which is the same as "0+2".

This is very clever, and much better than my own Python solution, just un-deleted https://codegolf.stackexchange.com/a/137152/72698

JavaScript (ES6) / Firefox, 53 bytes
a=>a.sort((a,b)=>(g=s=>parseInt(s,32)%334+s)(a)>g(b))

Test cases
For Firefox:

let f =

a=>a.sort((a,b)=>(g=s=>parseInt(s,32)%334+s)(a)>g(b))

console.log(JSON.stringify(f([])))
console.log(JSON.stringify(f(['V1'])))
console.log(JSON.stringify(f(['V7', 'V12', 'V1'])))
console.log(JSON.stringify(f(['V13', 'V14', 'VB', 'V0'])))
console.log(JSON.stringify(f(['V0+', 'V0', 'V16', 'V2', 'VB', 'V6'])))

For Chrome or Edge (+4 bytes):

let f =

a=>a.sort((a,b)=>(g=s=>parseInt(s,32)%334+s)(a)>g(b)||-1)

console.log(JSON.stringify(f([])))
console.log(JSON.stringify(f(['V1'])))
console.log(JSON.stringify(f(['V7', 'V12', 'V1'])))
console.log(JSON.stringify(f(['V13', 'V14', 'VB', 'V0'])))
console.log(JSON.stringify(f(['V0+', 'V0', 'V16', 'V2', 'VB', 'V6'])))

How?
We apply 3 successive transformations that lead to lexicographically comparable strings.
s     | Base32 -> dec. | MOD 334 | +s
------+----------------+---------+---------
"VB"  |           1003 |       1 | "1VB"
"V0"  |            992 |     324 | "324V0"
"V0+" |            992 |     324 | "324V0+"
"V1"  |            993 |     325 | "325V1"
"V2"  |            994 |     326 | "326V2"
"V3"  |            995 |     327 | "327V3"
"V4"  |            996 |     328 | "328V4"
"V5"  |            997 |     329 | "329V5"
"V6"  |            998 |     330 | "330V6"
"V7"  |            999 |     331 | "331V7"
"V8"  |           1000 |     332 | "332V8"
"V9"  |           1001 |     333 | "333V9"
"V10" |          31776 |      46 | "46V10"
"V11" |          31777 |      47 | "47V11"
"V12" |          31778 |      48 | "48V12"
"V13" |          31779 |      49 | "49V13"
"V14" |          31780 |      50 | "50V14"
"V15" |          31781 |      51 | "51V15"
"V16" |          31782 |      52 | "52V16"
"V17" |          31783 |      53 | "53V17"

Did you come up with the base conversion/modulo idea?  Brilliant!

@kamoroso94 FWIW, here is the code that I wrote to find the base and the modulo. It gives some other possible answers (with m < 1000).

I tried a=>a.sort((a,b)=>(g=s=>parseInt(s,32)%334+s)(a)>g(b)) on Chrome, it doesn't give the correct answer to f(["VB","V0","V0+","V1","V2","V3","V4","V5","V6","V7","V8","V9","V10","V11","V12","V13","V14","V15","V16","V17"]) I'm not sure why; the edge-compatible version works fine on chrome.

@Ra8 Ah, yes. It appears to be unstable for Chrome as well. Returning a boolean from a sort() callback is just a hack that happens to work in Firefox, but we really are supposed to return a signed value. Thanks for your feedback!

Husk, 5 bytes
ÖiÖm±

Try it online!
The results are printed one per line, but internally this is a function that takes and returns a list of strings.
Explanation
This is surprisingly similar to Martin's Retina answer.
First we do Öm±, meaning "order by mapping is-digit".
This puts VB, V0 and V0+ in the correct order, since they are compared as [0,0], [0,1] and [0,1,0].
Next we do Öi, meaning "order by integer value".
Given a string, i returns the first sequence of digits occurring in it as an integer, or 0 if one is not found.
The three strings above are all mapped to 0 and the sort is stable, so they will be in the correct order in the output.

Retina, 14 bytes
B
!
O`
!
B
O#`

Try it online!
Explanation
B
!

Replace B with ! so that the lexicographic order of grades puts VB (or then V!) in front of all the numeric grades.
O`

Sort all input lines lexicographically. This doesn't give the right result but it does order V! < V0 < V0+ correctly.
!
B

Turn V! back into VB.
O#`

Sort the lines numerically. Retina simply looks for the first decimal number in a string to determines its sort key. If there is no number (such as for VB), it sets the value to 0. That means all of VB, V0 and V0+ have the same sort key. But Retina's sort is stable and we've already put them in the correct relative order.

V, 3 bytes
Úún

Try it online!
How does it work?
ú   # Sort on...
 n  #   the first decimal number on the line

This command is almost a valid solution, since every line that can't be sorted by numbers (AKA, VB) will be placed at the beginning, without the order changed. However, since it's only looking at numbers, it can't distinguish between V0 and V0+. Since Vim uses a stable sort, whichever of these came first will remain first after sorting it. So...
Ú   # Sort lexicographically (will place 'V0' before 'V0+')
 ú  # Sort by...
  n #   The first number on the line

How appropriate that V does well on this challenge :P

C#, 121 83 82 83 bytes
Saved 39 bytes thanks to TheLethalCoder and LiefdeWen
a=>a.OrderBy(x=>x[1]>65?-1:x=="V0+"?0.5:int.Parse(x.Remove(0,1)))

Try it online!
Bytecount includes using System.Linq.

How?

Gets an array of strings as input.
If the input is equal to VB, set the value to -1, if it's equal to VB0+, set the value to 0.
Order the input based on the number value that comes after the V.

Might be a bit of a hack, but it works! :)

94 bytes

@LiefdeWen You don't need the ToArray() an IOrderedEnumerable should be fine.

Sorry accidently removed System.Linq reference, fixed it

@TheLethalCoder You are right as always, 84 bytes

@LiefdeWen .Remove(0,1) for additional -1 byte :)

Save a byte by using 'B's char code. You might even be able to use > or < there too but I haven't checked

@IanH. Awesome, didn't know that

@TheLethalCoder Thats actually amazing. Using >65 (B is 66), works because numbers come before that.

This doesn’t work for the input { "V1", "V0+" }, as you map both of those to 1.

@Lynn Yeah, I had 0.5 in my original version to replace V0+, but apparently it got golfed out somewhere. Updated it at the cost of 2 bytes.

Ruby, 52 42 41 bytes
->x{[?B,0,"0+",*1..17].map{|a|"V#{a}"}&x}

Try it online!
How it works:
Turn the problem around, produce the full sorted list, then get the intersection with our input.
Thanks Lynn for saving 1 byte.

Clever! ->x{[?B,0,"0+",*1..17].map{|a|"V#{a}"}&x} saves a byte.

To kick things off here is my Python 3 solution... Apologies, posted this too soon against convention, now re-posting...
Python 3, 69 67 bytes
lambda l:sorted(l,key=lambda x:'B00+'.find(x[1:])+1or int(x[1:])+3)

Try it online!

It's discouraged to answer your own challenge immediately. Give some time for some other people to answer, at least 48 hours, probably longer.

@TheLethalCoder Oh right, on Stack Overflow such behavior is encouraged! Should I delete my answer?

@Chris_Rands Yes, I suggest you to delete it.

@Downvoter: Downvoting a new member for doing something they didn't know was frowned upon ain't cool; much better to simply point out that they shouldn't, as Lethal did.

Note though if someone doesn't post your solution you're welcome to do so. After waiting of course

If you choose not to delete the answer, you can drop the f= in front of the lambda

@Mr.Xcoder I've now un-deleted and dropped the f=, thanks!

This looks good now. We are just waiting for the downvoter to retract their vote.

Pyth, 16 bytes
Port of Python answer by OP.
o|hx"B00+"tN+3st

Test suite.

05AB1E, 17 13 8 bytes
Σþï}„VB†

Try it online!

Ha... † is better than D"VB"åiÁ by a loong-shot.

Jelly, 9 bytes
Ḋv-.F+LµÞ

A monadic link taking a list of lists of characters and returning the sorted list.
Try it online! (the footer formats the result nicely)
How?
Ḋv-.F+LµÞ - Link: list of lists of characters
       µÞ - sort by key:
Ḋ         -   dequeue (remove the 'V' from the item)
  -.      -   literal -0.5
 v        -   evaluate as Jelly code with argument -0.5
          -   ...this means `VB` and `V0+` become -0.5
          -      (to binary and addition respectively)
          -      while others become their literal numbers
    F     -   flatten
     +L   -   add the length of the item
          -   ...'VB', 'V0', 'V0+', 'V1', 'V2'... -> 1.5, 2, 2.5, 3, 4, ...

Haskell, 55 bytes
f l=['V':x|x<-"B":"0":"0+":map show[1..17],_:y<-l,x==y]

Try it online!

Swift 3, 102 bytes
var r={String((Int($0,radix:32) ?? 992)%334)+$0};func f(l:[String]){print(l.sorted(by:{r($0)<r($1)}))}

This is a function. You can call it as such:
f(l:["V0","VB","V13","V0+"])

Try it online!

How does this work?
This is basically a port of the amazing Javascript answer by @Arnauld, but optimized for Swift.
It maps each of the values to lexicographically orderable Strings as shown in the table below:

Initial String -> Result

V1  ->  325V1
V10 ->  46V10
V11 ->  47V11
V12 ->  48V12
V13 ->  49V13
V14 ->  50V14
V15 ->  51V15
V16 ->  52V16
V17 ->  53V17
V2  ->  326V2
V3  ->  327V3
V4  ->  328V4
V5  ->  329V5
V6  ->  330V6
V7  ->  331V7
V8  ->  332V8
V9  ->  333V9
V0+ ->  324V0+
V0  ->  324V0
VB  ->  1VB

Code Explanation

String((Int($0,radix:32) ?? 992)%334) - Converts each String from a base-32 Number to Decimal. In case the value is "V0+", the call to Int(_:radix:) will return nil, and we take the value of "V0", 992. We additionally take the result of mod 334, and finally convert it to String.

+$0 - Adds the current value to the String created above. For instance, if the String is V9, the function above returns 333 and we add V9, resulting in 333V9.

var r={...} - Declares a variable r to an anonymous closure, because it saves lots of bytes since it's used twice.

func f(l:[String]) - Defines a function f with a parameter l, a list of Strings.

print(l.sorted(by:{r($0)<r($1)})) - Prints the result of sorting the given list, with the key being the variable r defined above.

PowerShell, 45 bytes
param($a)'B',0,'0+'+1..17|%{"V$_"}|?{$_-in$a}

Try it online!
Uses the same process as G B's Ruby answer to construct the full argument list in sorted order, then select out those that are -in the input list.

Google Sheets, 142 bytes
=ArrayFormula(If(A1="","",Sort(Transpose(Split(A1,",")),Transpose(IfError(Find(Split(A1,","),"VBV0V0+"),Value(Mid(Split(A1,","),2,3))+9)),1)))

Input is a string in A1 with each entry separated by a comma.
Output is the formula's cell plus the n-1 cells below it where n is the number of entries in A1.

It's a long, messy formula so let's unpack it.

If(A1="","",~) fixes the null input. Without this, an empty input returns a #VALUE! error because the Split function doesn't work on empty inputs.
Transpose(Split(A1,",")) splits A1 at the commas and transposes it into a column because the Sort function only works on columns.
Transpose(IfError(Find(),Value()+9)) is breaks into these pieces:

Find(Split(A1,","),"VBV0V0+") tries to find each parameter in that string. These first three are the only ones that must be sorted as strings so we use Find to get their sort order.
Value(Mid(Split(A1,","),2,3))+9 gets the numerical value of the grade. This only matters for V1 and higher so they sort numerically just fine. The +9 at the end is to ensure V1 comes after V0+ since its Find value would be 5. Technically, then, only +5 is required but it costs me no more bytes to make extra double sure it sorts correctly.
IfError(Find(~),Value(~)) returns the Find value if the string was found (i.e., the grade is VB, V0, or V0+). If it can't be found, it returns the numerical value of the grade plus nine.
Transpose(IfError(~)) again turns it into a column so Sort can use it.

Sort(Transpose(Split(~)),Transpose(IfError(Find(~),Value(~)+9)),1) wraps it all up by sorting the split input using the custom sort order ascending.
ArrayFormula(~) wraps the entire thing so it returns the results as an array instead of just returning the first value in that array. This is what causes the formula in one cell to fill the cells below it, too.

I think this is the first time I've ever seen Google Sheets used. Kudos to you, and +1!

Bash + coreutils, 21
tr B .|sort -V|tr . B

GNU sort's -Version sorting mode almost does what we want.  Switch the B for a . and we're done.
Try it online.

Haskell, 90 84 83 61 bytes
import Data.List
f"VB"=[]
f(_:'1':[a])='X':[a]
f x=x
sortOn f

Try it online!
f is a function that converts climbing grades to strings that can be compared.  If converts VB to be the empty string so it gets the highest priority, it then replaces V1 with X in strings that are three long to lower the priority of V10-V17.  For the remainder we do nothing.
To sort the list we use Data.Lists's sortOn function (as suggested by Lynn) to create a point-free function.

That’s just g=sortOn f, which is also in Data.List.

Also, f(_:'1':a)='X':a saves 4 bytes!

@Lynn The first suggestion works, however the second one does not, I need [a] otherwise V1 will be pattern matched which is the problem I am trying to circumvent.

R, 45 bytes
l=paste0('V',c('B','0','0+',1:17));l[l%in%x]

How does this work?

Assign the correctly ordered vector of grades to 'l';

Use 'paste0' instead of 'paste' to avoiding making a 'sep=""' argument;

Index 'l' based on matches of 'l' in your input vector of mixed, unsorted grades.

TXR Lisp: 45 bytes
(op sort @1 :(ret`@(mod(toint @1 32)334)@1`))

Run:
1> (op sort @1 :(ret`@(mod(toint @1 32)334)@1`))
#<interpreted fun: lambda (#:arg-01-0168 . #:rest-0167)>
2> [*1 ()]
nil
3> [*1 (list "V0+" "V0" "V16" "V2" "VB" "V6")]
("VB" "V0" "V0+" "V2" "V6" "V16")

Jelly, 17 11 bytes
fØD
ṢÇÞÇV$Þ

Try it online!

Python2, 77 bytes
sorted(input(),key=lambda s:float(s[1:].replace("B","-1").replace("+",".5")))

I think this counts as a snippet! Because you are neither printing the result nor this is a function definition. You can make it into a lambda or print the result though.

@officialaimm nice try but does not work if V0+ s before V0.

Perl 5, 56 + 1 (-a) = 57 bytes
map{$i=$_;s/V//;$a[/B/?0:/^0/?length:$_+2]=$i}@F;say"@a"

Try it online!