text:
Which switches are on?
Introduction
You are sitting with your coworker, having lunch, and bragging to him/her about the latest and supposedly greatest project you've been working on. Getting sick and tired of your constant showcase of egoism, he/she gives you a challenge just so you'll shut up. Being the egoistic and happy-go-lucky person you are, you of course accept (because you must accept each and every challenge). The challenge, as he/she explains it is, given an input of a block of text containing 1 or more of each character in !@#$^&*, output in any reasonable format the coordinates of the switch(es) that is/are "on".
According to your coworker, a switch is a $, and a switch is classified as "on" if and only if it satisfies at least 1 of the following criteria:

It is surrounded by all ^. So...
^^^
^$^
^^^

results in an "on" switch.
It is surrounded by all &. So...
&&&
&$&
&&&

results in an "on" switch.
It is completely covered on at least two sides with *. For instance,
***
&$&
***

results in an "on" switch, but
&*&
&$&
&*&

does not, since the switch is not completely covered on any two sides by *s.
There is at least 1 ! and/or 1 @ in any of the corners around it. This does not count if either of these are not in a corner. So...
!&&
^$@
@&!

results in an "on" switch, since there is at least 1 ! and/or @ in at least 1 of the corners (in the above case, there are 2 valid !s and 1 valid @ in 3 corners). And...
&!&
^$@
^!&

does not, although there are 2 !s and 1 @, since none of them are in any of the corners.
1 or more # are not on any sides around the switch, unless at least 1 & surrounds the switch. In other words, if there is at least 1 # present on a side, it overrides all other rules, unless there is also a & present. Therefore:
#&*
*$*
!**

results in an "on" switch, although a # exists, since there is an & around the switch, and it follows at least 1 of the above rules. However, if the exclamation point were not present like so:
#&*
*$*
***

The switch would be off, since it does not follow at least one of the above rules. Therefore, even though a switch may be surrounded by a # and a &, it would still be off unless it follows one or more of these rules. Also, there must always be a >=1:1 ratio between &s and #s for the switch to be valid. For instance,
#&!
*$*
**#

would still be an invalid switch, although it follows 1 of these rules, since there are 2 #s, but only 1 &, and therefore not a >=1:1 ratio between &s and #s. To make this valid, you must add 1 or more additional &s to any edge in order balance the number of #s and &s out, possibly like so:
#&!
*$&
&*#

3:2 ratio between &s and #s

Finally...
#^^
^$*
@^!

results in an "off" switch, although it follows 1 or more of the above rules, since it contains at least 1 # around it, and no &s to outbalance it.
The valid switches will only be inside an input, and therefore, each valid $ must be surrounded completely by any 8 of the valid characters. For instance, if the entire input were to be:
*$*
!$!
!!!

the top $ is definitely not a valid switch since the switch is on an edge, and therefore the switch is not completely surrounded by 8 valid characters. In this instance, the switch should not even be considered. However, the switch in the middle is completely valid, and as a matter of fact is "on", since it meets at least one of the above requirements.

To demonstrate, consider this block of characters:
!@#^^$#!@
!@#$$*$&@
@$^!$!@&&

which we can label for coordinates like so, calling the vertical axis y and the horizontal axis x:
y

3 !@#^^$#!@
2 !@#$$*$&@
1 @$^!$!@&&

  123456789 x

The coordinates must always be returned in an (x,y) format, similar to a two-dimensional coordinate grid. Now, which switches are on? Well, let's first find them all. We can already see that there is 1 in the very top row, and another in the very bottom. However, those are automatically no-ops, since they are not completely surrounded by 8 characters.
Next comes the one in row 2. Specifically, this one:
#^^
#$$
^!$

We can see that there are 3 $ signs in this, but we just want to focus on the one in the middle, and, as you can probably see, it is already invalid, since it has 2 #s around it with no &s to balance them out. Additionally, this does not even follow any of the rules, so even if it was a valid switch, it would be "off" anyways.
Next comes another one in row 2:
^^$
$$*
!$!

Again, only focus on the switch in the middle. This switch is "on", since it has at least 1 ! in at least 1 corner. The coordinates of this one are (5,2).
Moving on, we finally move onto the last switch. This one is also in the second row and appears like so:
$#!
*$&
!@&

and, as you can probably see, this one is also a valid switch, although there is a # surrounding it, since there are 2 other &s to outbalance the #. In addition to that, it also has at least 1 ! in at least 1 of the corners, and therefore not only is the switch valid, but it's also "on". The coordinates of this switch are (7,2).
We have finally reached the end, and have found 2 "on" switches in that entire block on text. Their coordinates are (5,2) and (7,2), which is our final answer, and what the output should be. However, this input was very simple. Inputs can get a lot bigger, as there is not limit on how big the block of text can get. For instance, the input could even be a randomized 200x200 block of text.
Contraints

Standard Loopholes are prohibited.
There can't possibly be a built-in for this, but just in case there is (looking at you Mathematica), the use of built-ins that directly solve this are prohibited.

Test Cases:
Given in the format string input -> [array output]:
@#$$&^!&!#
@*&!!^$&^@
$!#*$@#@$!   ->  [[7,3],[9,2]]
*@^#*$@&*#

#^&!$!&$@@#&^^&*&*&&
!^#*#@&^#^*$&!$!*^$$
#^#*#$@$@*&^*#^!^@&* -> [[19,3],[15,3],[8,2]]
#$@$!#@$$^!#!@^@^^*#

@!@!^&*@*@
*$*^$!*&#$
@$^*@!&&&#
**$#@$@@#!  -> [[2,8],[5,8],[6,6],[9,3]]
##*&*#!^&^
$&^!#$&^&@
^^!#*#@#$*
$@@&#@^!!&
#@&#!$$^@$

!!@##!$^#!&!@$##$*$#
$^*^^&^!$&^!^^@^&!#!
@*#&@#&*$!&^&*!@*&** -> [[9,4],[9,3]]
^!!#&#&&&#*^#!^!^@!$
&$$^*$^$!#*&$&$#^^&$

More coming soon
Additional Notes

You can assume that the input will always be in the form of a complete block (i.e. a rectangle or square)
There will never be any other character in the input than those in !@#$^&*.

Remember, this is a code-golf so the shortest code wins!

Seems a bit long and arbitrary.

@orlp That's what I'm going for. It's a challenge anyways. Why do you say it's arbitrary though?

@R.Kap There's no justification for any of the rules; they seem made up to add complexity for no reason.

@QPaysTaxes What justification does this need? These are made up for the sake of the challenge. It is a challenge, and a challenge can literally be anything. All it really needs is a set of rules, an input, and what the output should be based on those rules.

I'm not saying I'm agree, I'm explaining why it looks arbitrary. Take my most popular challenge as an example: If you stripped away all the context and just said, "You are given a set of strings. Based on indentation, group them, shuffle the groups, then shuffle the interior groups, but keep members of interior groups at the bottom if they exist", that wouldn't make much sense. However, because it has context, all of those weird rules and restrictions at least pretend to make sense.

@QPaysTaxes Ah, I see.

@QPaysTaxes What do you think now?

I personally thought it was fine without the added bit at the beginning, but it doesn't really detract from it either. This looks like a great challenge to break out the 2D pattern-matching languages.

@R.Kap Eating an entire sack of potatoes is also an unjustified challenge. The rules are that all the potatoes must be consumed, the input is the sack of potatoes, the output is the empty sack (and possibly some other waste). I am thus comparing your challege to the act of asking everyone to eat a sack of potatoes.

@R.Kap your third test case is incorrect, the results should be [[2,8],[5,8],[6,6],[9,3]]

JavaScript (ES6), 363 339 312 309 298 bytes
This is a function taking the input as a string and returning a list of coordinates. It's split into 2 main parts: a transformation of switches into a pair of coordinates and its surrounding characters, and a 'is it on' check based on the rules of the challenge on the surrounding characters.
a=>[...a].map((z,p,m)=>(y-=z==B,z)=='$'&&(r=m[p-n-2]+m[p-n]+m[p+n]+m[p+n+2]+m[p-n-1]+m[p-1]+m[p+1]+m[p+n+1],r=r[L]<9?r:'')[T]`&`[L]>=r[T]`#`[L]&&(/(\^|&){8}|\*{4}(.\*\*.|\*..\*)/.exec(r)||/!|@/.exec(r.substr(0,4)))&&[1+(p-(w-y))%n,y],y=w=a[T='split'](B='\n')[L='length'],n=a.search(B)).filter(e=>e)

Python 2, 299 297 279 275 261 259 bytes
m=input()
R=range
h=len(m)
for y in R(h-2):
 for x in R(len(m[0])-2):
	a=''.join(m[y+o][x:x+3]for o in R(3))
	if(a.count('&')>=a.count('#'))*(a[:4]+a[5:]in('^'*8,'&'*8)or'*'*6in(a[:3]+a[6:],a[::3]+a[2::3])or'!'in a[::2]or'@'in a[::2])*a[4]=='$':print x+2,h+~y

Try it online!
Takes input as a list of strings
Prints the output as a pair of x,y coordinates on each line

Haskell, 304 bytes
import Data.List
s!c=sum[1|a<-s,a==c]
f t|Just w<-elemIndex '\n't,h<-t!'\n'=[c|c<-mapM(\a->[2..a-1])[w,h],s<-[(\[x,y]->t!!((h-y-1)*(w+1)+x))<$>mapM(\a->[a-2..a])c],s!!4=='$',foldr1(-)((s!)<$>"#&")<1,or$("@!"/="@!"\\map(s!!)[0,2..8]):zipWith(\c i->all(==c)$(s!!)<$>[0..8]\\(4:i))"^&**"[[],[],[1,7],[3,5]]]

This defines the function f which performs the given task.


text:
Convert a Forsyth-Edwards Notation string to ASCII art
In chess, Forsyth-Edwards Notation, more commonly called "FEN", is a textual way of transcribing boards. It describes each of the board's eight rows (called "ranks" in chess) from top to bottom from White's perspective. The pieces are written as K (king), Q (queen), R (rook), B (bishop), N (knight), and P (pawn). Black pieces use these letters in lowercase, and white pieces use these letters in uppercase. Empty spaces are indicated by a number from 1 to 8 indicating how many consecutive empty spaces there are. A completely empty rank would be 8, a single black rook in the rightmost column (called "files" in chess) would be 7r, and two white pawns on each end of a row would be PP4PP. Ranks are separated by a /. There is normally other information added, indicating which side is to move, castling and en passant rights, move number, and halfmove clock, but we will ignore them for the purposes of this challenge.
Input
A FEN string, from the command line or STDIN, as you please. You may assume that this string is always valid.
Output
Write to STDOUT a simple ASCII art representation of the board as it would actually appear:

Pieces are represented by their character in FEN
Empty squares are represented by spaces
Pieces and squares are separated by a pipe | and there are pipes on each side of the board

So an empty board, written as 8/8/8/8/8/8/8/8 in FEN, would appear as
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |

The starting position of a chess game is written as rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR, and would appear as
|r|n|b|q|k|b|n|r|
|p|p|p|p|p|p|p|p|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
|P|P|P|P|P|P|P|P|
|R|N|B|Q|K|B|N|R|

The final position of Anderssen-Kieseritzky 1851, called "The Immortal Game" in the chess community, is written as r1bk3r/p2pBpNp/n4n2/1p1NP2P/6P1/3P4/P1P1K3/q5b1, and your program when fed that input would output:
|r| |b|k| | | |r|
|p| | |p|B|p|N|p|
|n| | | | |n| | |
| |p| |N|P| | |P|
| | | | | | |P| |
| | | |P| | | | |
|P| |P| |K| | | |
|q| | | | | |b| |

Is it acceptable to write a function which takes input and returns output, rather than writing it to STDOUT?

@QPaysTaxes By default we allow it and indeed several solutions do that already. Ultimately it's up to the OP though it seems unnecessary to override our defaults in this case.

The answer you accepted is not the shortest one. Regardless of your feelings towards golfing languages, code golf means that the shortest code wins.

@Dennis If I cannot exclude golfing languages from the challenge outright, I will exclude them from the winner's circle. Users may vote for the golfing language winner as they please and scroll down to see it.

You also cannot penalize them or accept an arbitrary answer. The whole site is built around objective winning criteria.

@Dennis I have removed my votes from all answers from which I could remove them and removed the accept of the Perl answer. I will not, however, accept an answer to this question unless that is also required.

No, that's not required. Many challenges do not have accepted answers.

+1 for an interesting challenge. -2 for accepting the wrong answer for no good reason

Perl, 28 bytes
Includes +2 for -lp
Give input on STDIN
fen.pl <<< "r1bk3r/p2pBpNp/n4n2/1p1NP2P/6P1/3P4/P1P1K3/q5b1"

fen.pl:
#!/usr/bin/perl -lp
s/\d/$"x$&/eg;s/|/|/g;y;/;

Actually in the league of some golfing languages...
Notice that the file based version needs the final newline in the file so that one is really 29 bytes. But the commandline version doesn't need that extra newline and therefore the code counts as 28 bytes:
perl -lpe 's/\d/$"x$&/eg;s/|/|/g;y;/;' <<< "r1bk3r/p2pBpNp/n4n2/1p1NP2P/6P1/3P4/P1P1K3/q5b1"

Missing shebang?

Retina, 13 bytes
\d
$*
/
¶

|

Try it online!
Explanation
The first part (note the trailing space):
\d
$*

is to convert a to the specific number of spaces. Retina has a $* feature to repeat. The way it works is: <num>$*<char> if there is no <num>, Retina will assume $& or the matched string, in this case the matched number.
The next part:
/
¶

is pretty simple, it replaces all / with ¶ which is a newline.
The last part works the same:

|
This will replace everything (hence why there is nothing on the first line) with |. Putting a | everywhere.

You can even do it all in ASCII for the same byte count with S\/` as the second stage.

Ruby - 75 82 78 76 75 62 59 58 57 56 bytes
->n{"|#{n.gsub(/\d|
/){' '*$&.hex}.chars*?|}|".tr'/',$/}

Saved a few bytes thanks to Ventero
Let me explain (with \n replacing the literal newline):
->n{"...".tr'/',$/}

This implicitly returns the value of the string, with each / replaced with a newline (by default, $/ contains a newline)
"|#{...}|"

This is super simple; it's just a string containing a pipe, string interpolation, and another pipe. The string interpolation is evaluated
n.gsub(/\d|\n/){' '*$&.hex}...

This replaces every number with that many spaces. I can save a few bytes by also finding newlines here; because hex returns 0 if the string isn't a valid number, when it finds a newline –- i.e. the one at the end of the result of gets –- it replaces it with a 0-length string, effectively deleting it. Without this, there would be a trailing pipe.
$& is a magic variable which represents the complete text of the latest variable match, which lets me save a byte by eliminating |d|. I can save another byte by using .hex instead of .to_i, which works because every number is less than 9, which means that hex and decimal have the same values.
.chars*?|

This puts a pipe between every character. Note that this is what puts the pipes on either side of the lines (except the first and last) because the slashes, which eventually turn into newlines through tr, count as characters, and are therefore surrounded by pipes. The ?| just means "the one-character string "|"".
And... that's it. It's a frankly scandalously simple program. It just uses a lot of sneaky syntax tricks.

You can save 4 more characters by applying a few simple tricks: puts"|#{gets.gsub(/\d|\n/){' '*$&.hex}.chars*?|}|".split'/' (of course, replace the \n with a literal newline again).

Pyth - 24 22 21 bytes
.i*\|72jcu:G`H*Hd9z\/

Test Suite.
+                     Concatenate
 K\|                  Store "|" in K and use value
+         K           Concatenate to end
 jK                   Join string by K, this puts "|" between each char
  :                   String substitution
        \/            Replace "/"
         b            With newline
   u                  Reduce
        9             Over [0, 9)
         z            With input as base case
    :G                String substitution current val
     `H               Replace stringifyed int from list we're looping through
     *Hd              With " "*that int

JavaScript ES7, 80 70 bytes
Is an anonymous function that accepts a string as input.
a=>[,...[+t?" ".repeat(t):t<"0"?`
`:t for(t of a)].join``,`
`].join`|`

80-byte ES6-only appraoch.
a=>a.split`/`.map(x=>[,...x.replace(/\d/g,t=>" ".repeat(t)),`
`].join`|`).join``

Explanation
We use an array comprehension to loop over the list:
[+t?" ".repeat(t):t<"0"?`
`:t for(t of a)]

This is equivalent to:
[!isNaN(parseInt(t, 10)) ? " ".repeat(parseInt(t, 10)) : t === "/" ? "\n" : t for(t of a)]

If it's a number, we have that number of spaces. If it's a /, we have a newline. Otherwise, we have the character. Then, we join the comprehension with nothing to make a string.
Then, we create an array of length 3 [,...that,"\n"]. ... splats the joined comprehension into chars. Joining this yields the result.

Don't you mean ES6? ES7 isn't out yet I believe.

@ericw31415 It isn't out, you're correct, but some browsers have started implementing part of the ES7 spec.

Oh OK. But still your code doesn't use any of the ES7 features, right?

@ericw31415 Actually, it does. Array comprehensions ([x for(x of a)]) are ES7.

Weren't Array Comprehensions removed from the spec, MDN says they were

@SpeedyNinja At the bottom it appears to be that they are still planned forbES7, though this current version of compressions is being deprecated in favor of the for of  before the expression. shudders

Pyth, 23 bytes
VT=:Q`N*dN;jc.i*\|72Q\/

Try it online!
How it works:
VT=:Q`N*dN;jc.i*\|72Q\/
VT        ;                for N in range(10):
  =:Q`N*dN                     Q = Q.replace(`N`,repeat(' ',N))
             .i*\|72Q      temp = interweave(repeat('|',72), Q)
            c        \/    temp = chop(temp,'/')
           j               temp = join(temp,'\n')
                           print temp

Julia, 62 bytes
s->split("|"join(replace(s,r"\d",d->" "^parse(d)),"|")"|","/")

This is an anonymous function that accepts a string and returns an array of strings. To call it, assign it to a variable.
The approach is the same as in QPaysTaxes' clever Ruby answer. We replace each digit in the input with that many spaces, place | between each character, tack | onto the front and back, and split into an array on /.
Try it online!

Yay I inspired things :D

@QPaysTaxes You did indeed. Nice solution!

Retina, 50 45 bytes
This was fun haha. Not only am I a noob in Retina,  but also in regex in general... This can probably be golfed a lot, so I'll do some more research.
Code:
8
44
7
34
6
42
5
 4
4
22
3
 2
2

1

/
¶

|

Try it online!

Try using the $* functionality :)

05AB1E, 21 bytes
Code:
9GNNð×:}S'|ý"|ÿ|"'/¶:

Also 21 bytes: '|¹9GNNð×:}S'|«JJ'/¶:.
Uses CP-1252 encoding. Try it online!.

Python 3.5, 112 bytes:
def r(o):print(''.join(['| '*8if h=='8'else'| '*int(h)if h.isdigit()else'|\n'if h=='/'else'|'+h for h in o])+'|')

Try it online! (Ideone)

JavaScript (ES6), 69 67 62 bytes
s=>[,...s.replace(/[/-8]/g,c=>+c?' '.repeat(c):`
`),,].join`|`

The extra commas create empty values in the outer split which creates the beginning and ending | characters. You need two trailing commas because trailing commas are optional at the end of lists, so the first one is still part of the previous item.
Edit: Saved 5 bytes thanks to @user81655.

Would /[\d/]/g,c=>+c?\ `.repeat(c):`\n`` work?

@user81655 Thanks, but I didn't like your emoticon, so I replaced it with an annoyed face with glasses.

R (out of competition)
Sorry if it's not appropriate to post this, but I thought it was cool that I just happened to have a function lying around that actually works for this question without editing! It prints unicode output rather than ascii, though. I can't remember quite why I wrote it, but it wasn't to answer a challenge.
function(x){
# x = FEN position, a string
# can be split with / or ,
# example: forsythe("rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R")

allowed <- c(paste(1:64),
c("k", "q", "r", "b", "n", "p", "K", "Q", "R", "B", "N", "P"))
chars <- strsplit(x, "")[[1]]
chars <- chars[-which(!(chars %in% allowed))]
out <- c()
for (i in 1:length(chars)){
  if (chars[i] %in% paste(1:64)){
    out <- c(out, rep(" ", as.numeric(chars[i])))
  }
  else{
    out <- c(out, chars[i])
  }
}
if (length(out) < 64) out <- c(out, rep(" ", 64-length(out)))

pieces <- strsplit("KQRBNPkqrbnp", "")[[1]]
unicode <- c("\u2654", "\u2655", "\u2656",
"\u2657", "\u2658", "\u2659", "\u265A", "\u265B",
"\u265C", "\u265D", "\u265E", "\u265F")

for (i in 1:64){
  if (out[i] %in% pieces){
    out[i] <- unicode[which(pieces==out[i])]
  }
  else{
  }
}
out <- matrix(out, nc=8, byrow=T)
#print(out)

plot(0, xlim=c(0, 8), ylim=c(0, 8), type="n", xaxt="n", yaxt="n",
xlab="", ylab="")
for (i in 0:7){ for (j in 0:7){ rect(i, j, i+1, j+1,
col=ifelse(((i+j) %% 2) == 0, grey(0.95), "white"), border=F) }}

for (i in 0:7){ for (j in 0:7){
  text(i+0.5, j+0.5, out[8-j, i+1], cex=2)
}}

axis(1, labels=letters[1:8], at=1:8 - 0.5, tick=F)
axis(2, labels=paste(1:8), at=1:8-0.5, las=2, tick=F)

}

The rules outlined in our help center state that all solutions to challenges must be a serious contender for the winning criteria in use. For code golf, this means that all answers must be golfed.

Technically, it is golfed. Just not very well.

Jolf, 28 bytes
RΜGi'/dΆγ'|RGρH«\d»d*♣PHEγγS

Replace ♣ with the character \x05, or try it here!

C, 252 bytes
i=-1,j,s=1,x;C(char*n){while(n[++i])s+=isdigit(n[i])?n[i]*2+1:2;char*m=(char*)malloc(s);for(i=j=-1;n[++i]&(m[++j]='|');)if(n[i]=='/')m[++j]='\n';else if(isdigit(n[i]))for(x=n[i]-'0';x;--x&&(m[++j]='|'))m[++j]=' ';else m[++j]=n[i];m[++j]='\0';return m;}

Detailed try online
// input-string, input-string-size
char* C(char*n)
{
    int i=-1,j,s=1,x;

    // figure out required grid size
    while(n[++i])s+=isdigit(n[i])?n[i]*2+1:2;
    char*m=(char*)malloc(s);

    i=j=-1;
    while(n[++i]) // while not end of string
    {
        m[++j]='|'; // seperator

        if (n[i]=='/') // end of row
            m[++j]='\n';
        else if (isdigit(n[i])) // fill spaces
            for(x=n[i]-'0';x;--x&&(m[++j]='|')) m[++j]=' ';
        else
            m[++j]=n[i]; // single literals
    }

    m[++j]='|';
    m[++j]='\0';
    return m;
}

Haskell, 110 Bytes
p '/'="\n"
p c|'1'<=c&&c<='8'=replicate(read[c])' '
p c=[c]
main=getLine>>=putStrLn.('|':).(>>=(:"|")).(>>=p)

Ungolfed:
p c | c=='/'           = "\n"
    | '1'<=c && c<='8' = replicate (read [c]) ' '
    | otherwise        = [c]
addPipes string = "|" ++ concatMap (\c -> [c] ++ "|") string
main = getLine >>= putStrLn . addPipes . concatMap p

JavaScript (FireFox 30+), 61
Using array comprehension that is not standard EcmaScript anymore
f=>'|'+[for(c of f)+c?' |'.repeat(c):c<'A'?`
|`:c+'|'].join``

Test

F=f=>'|'+[for(c of f)+c?' |'.repeat(c):c<'A'?`\n|`:c+'|'].join``

console.log=x=>O.textContent+=x+'\n'

;['8/8/8/8/8/8/8/8','rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR',
'r1bk3r/p2pBpNp/n4n2/1p1NP2P/6P1/3P4/P1P1K3/q5b1']
.forEach(t=>console.log(F(t)+'\n'))

Python, 84 bytes
lambda a:"".join(c*c.isalpha()or"\n"*(c=="/")or" "*int(c)for c in a).replace("","|")

Explanation:
        c*c.isalpha()                                                       - if c is alphabetical, use c
                       "\n"*(c=="/")                                        - if it's "|", replace it with a newline
                                      " "*int(c)                            - else its an int.
"".join(                                                  ).replace("","|") - interweave "|" between the chars

Lua, 106 Bytes
print("|"..(...):gsub(".",function(c)return c:find("%d")and(" |"):rep(c)or c=="/"and"\n|"or c.."|"end),'')

Ungolfed
print("|"..                   -- prepend | to the following string
  (...):gsub(".",function(c)  -- iterate over each character in the argument
    return                    -- replaces in the argument
           c:find("%d")       -- if c is a number
             and(" |"):rep(c) --   replace by " |"*c
           or c=="/"          -- elseif c is a slash
             and"\n|"         -- replace by "\n|"
           or c.."|"          -- else (case letter)replace by c
  end)                        -- return the modified string
,'')                          -- add an empty parameter to print
                              -- it suppresses the second output of gsub

print((...):gsub(".",function(c)return(c:find("%d")and("| "):rep(c)or c=="/"and"|\n"or"|"..c)end).."|")

print((...):gsub("%d",function(c)return("| "):rep(c)end):gsub("/","|\n"):gsub("([^%d%s|])","|%1").."|") for the same byte-count.

print((...):gsub("%d",function(c)return("| "):rep(c)end):gsub("([^%d |])","|%1"):gsub("/","\n").."|") is 101 bytes

><>, 64 bytes
<v?(0:i
r\
"<o-*=@"%/":   v?*(@)@":/"::;?(0:o"|
 ^~?="0":-1o" "<

4 wasted bytes due to alignment issues, not sure how to golf them out though. ¯\_(ツ)_/¯

Java 7, 190 184 bytes
String Z(int c){String m="";if(c==47)m+="|\n";else if(c>57)m+="|"+c;else while(c-->48)m+="| ";return m;}String C(String n){String m="";for(char x:n.toCharArray())m+=Z(x);return m+"|";}

Detailed try online
public static String Z(char c)
{
    String m="";
    if(c=='/')m+="|\n";
    else if(c>'9')m+="|"+c;
    else while(c-->'0')m+="| ";
    return m;
}

public static String C(String n)
{
    String m="";
    for(char x:n.toCharArray())m+=Z(x);
    return m+"|";
}

You can save a couple of bytes be using integers instead of char literals in the comparisons

@Blue notes taken

Pyke, 25 20 bytes
FD~u{RIbd*(s\/n:k\|:

Explanation:
F         (          -    for char in input:
 D~u{RI              -     if char in '0123456789':
       bd*           -      char = " "*int(char)
           s         -   sum(^)
            \/n:     -  ^.replace("/","\n")
                k\|: - ^.replace("", "|")

Try it here!

brev, 89 bytes
(fn(print(strse x'num(->(m 0)string->number(make-string #\ ))"."(c conc "|")"/""\n")"|"))

Japt v2.0a0 -R, 15 bytes
r\dÈ°çÃrP'| q'/

Try it
r\dÈ°çÃrP'| q'/     :Implicit input of string U
r                   :Replace
 \d                 :  Regex /[0-9]/g
   È                :  Pass each match through a function
    °               :    Postfix increment (to convert from string to integer)
     ç              :    Repeat a space that many time
      Ã             :End replace
       r            :Replace
        P           :  Empty string
         '|         :  With "|"
            q'/     :Split on "/"
                    :Implicit output, joined with newlines

source: Stack Exchange

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

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

sort: votes


text:
Polynomialception
Given two polynomials f,g of arbitrary degree over the integers, your program/function should evaluate the first polynomial in the second polynomial. f(g(x)) (a.k.a. the composition (fog)(x) of the two polynomials)
Details
Builtins are allowed. You can assume any reasonable formatting as input/output, but the input and output format should match. E.g. formatting as a string
x^2+3x+5

or as as list of coefficients:
[1,3,5] or alternatively [5,3,1]

Furthermore the input polynomials can be assumed to be fully expanded, and the outputs are also expected to be fully expanded.
Examples
A(x) = x^2 + 3x + 5, B(y) = y+1
A(B(y)) = (y+1)^2 + 3(y+1) + 5 = y^2 + 5y + 9

A(x) = x^6 + x^2 + 1, B(y) = y^2 - y
A(B(y))= y^12 - 6y^11 + 15y^10 - 20y^9 + 15y^8 - 6y^7 + y^6 + y^4 - 2 y^3 + y^2 + 1

A(x) = 24x^3 - 144x^2 + 288x - 192, B(y) = y + 2
A(B(y)) = 24y^3

A(x) = 3x^4 - 36x^3 + 138x^2 - 180x + 27, B(y) = 2y + 3
A(B(y)) = 48y^4 - 96y^2

what about builtins?

@Maltysen "Details: Builtins are allowed.(...)"  :D

I think "any reasonable format" might be a bit stretchable. If a function that evaluates the polynomial is allowed, then the composition function (.) is an answer in Haskell. You probably mean some representation of the list of coefficients.

@xnor I don't think you could describe such a function as fully expanded.

Must we avoid needless zero coefficients?

@xnor If the Haskell function composition operatur would again fully expand the other functions that would be ok, but I doubt it does that. But thanks for mentioning the (leading) zero coefficients. I think these should be avoided. Or can you give me an example where these make sense?

The title! I just got it :-D

@LuisMendo Quick thinker =P

Haskell, 86 72 bytes
u!c=foldr1((.u).zipWith(+).(++[0,0..])).map c
o g=(0:)!((<$>g).(*))!pure

Defines a function o such that o g f computes the composition f ∘ g.  Polynomials are represented by a nonempty list of coefficients starting at the constant term.
Demo
*Main> o [1,1] [5,3,1]
[9,5,1]
*Main> o [0,-1,1] [1,0,1,0,0,0,1]
[1,0,1,-2,1,0,1,-6,15,-20,15,-6,1]
*Main> o [2,1] [-192,288,-144,24]
[0,0,0,24]
*Main> o [3,2] [27,-180,138,-36,3]
[0,0,-96,0,48]

How it works
No polynomial-related builtins or libraries.  Observe the similar recurrences
f(x) = a + f₁(x)x ⇒ f(x)g(x) = a g(x) + f₁(x)g(x)x,
f(x) = a + f₁(x)x ⇒ f(g(x)) = a + f₁(g(x))g(x),
for polynomial multiplication and composition, respectively.  They both take the form
f(x) = a + f₁(x)x ⇒ W(f)(x) = C(a)(x) + U(W(f₁))(x).
The operator ! solves a recurrence of this form for W given U and C, using zipWith(+).(++[0,0..]) for polynomial addition (assuming the second argument is longer—for our purposes, it always will be).  Then,
(0:) multiplies a polynomial argument by x (by prepending a zero coefficient);
(<$>g).(*) multiplies a scalar argument by the polynomial g;
(0:)!((<$>g).(*)) multiplies a polynomial argument by the polynomial g;
pure lifts a scalar argument to a constant polynomial (singleton list);
(0:)!((<$>g).(*))!pure composes a polynomial argument with the polynomial g.

Mathematica, 17 bytes
Expand[#/.x->#2]&

Example usage:
In[17]:= Expand[#/.x->#2]& [27 - 180x + 138x^2 - 36x^3 + 3x^4, 3 + 2x]

              2       4
Out[17]= -96 x  + 48 x

TI-Basic 68k, 12 bytes
a|x=b→f(a,b)

The usage is straightforward, e.g. for the first example:
f(x^2+3x+5,y+1)

Which returns
y^2+5y+9

It seems like cheating to me to require the inputs to be in different variables. Does that matter for this answer?

Feel free to do so, I explicitly allowed any reasonable convenient input format.

Concerning the edit of your comment: yes it does matter.

I'm not too familiar with the rules on this site. Is it correct for → to be 1 byte in TI-BASIC?

@asmeurer Indeed: TI-Basic is scored by the encoding used on the corresponding calculators. If you are interested in the details, you can read that here on meta. A table of tokens can be found here on ti-basic-dev.

Python 2, 138 156 162 bytes
The inputs are expected to be integer lists with smallest powers first.
def c(a,b):
 g=lambda p,q:q>[]and q[0]+p*g(p,q[1:]);B=99**len(`a+b`);s=g(g(B,b),a);o=[]
 while s:o+=(s+B/2)%B-B/2,;s=(s-o[-1])/B
 return o

Ungolfed:
def c(a,b):
 B=sum(map(abs,a+b))**len(a+b)**2
 w=sum(B**i*x for i,x in enumerate(b))
 s=sum(w**i*x for i,x in enumerate(a))
 o=[]
 while s:o+=min(s%B,s%B-B,key=abs),; s=(s-o[-1])/B
 return o

In this computation, the polynomial coefficients are seen as digits (which may be negative) of a number in a very large base. After polynomials are in this format, multiplication or addition is a single integer operation. As long as the base is sufficiently large, there won't be any carries that spill over into neighboring digits.
-18 from improving bound on B as suggested by @xnor.

Nice method. For B, would 10**len(`a+b`) be enough?

@xnor Maybe... it's hard for me to tell.

+1 This is a really creative solution, and a nice use of bigints!!!

@xnor Now I've managed to convince myself that hte coefficient length is linear in the input length :)

Python + SymPy, 59 35 bytes
from sympy import*
var('x')
compose

Thanks to @asmeurer for golfing off 24 bytes!
Test run
>>> from sympy import*
>>> var('x')
x
>>> f = compose
>>> f(x**2 + 3*x + 5, x + 1)
x**2 + 5*x + 9

SymPy has a compose() function.

@asmeurer It even simplifies the result... Thanks!

Remove the var('x') and require that the polynomial be expressed in pi :)

Where's the answer? It no longer defines any functions or does anything...

@feersum According to this, compose is a valid answer because it evaluates to a function.

@Dennis For the expression that evalutaes to a function case, I only meant if the entire code is the expression, not some substring of it.

@feersum I fail to see how this is different from an import plus a lambda.

@Dennis It isn't. The lambda should also be named, if you have a separate import statement.

@feersum That has never been the case. You just edited that meta post.

@Mego I indeed edited, as I just discovered that it was subject to misinterpretation.

@feersum You edited an accepted meta post to modify the policy for your own agenda. That's not ok.

@Mego I always intended this meaning, but my wording was ambiguous.

@feersum Though you may have thought your wording was ambiguous, it clearly was not for the rest of the community. We accepted the consensus that from module import*;function was a valid submission. Regardless, this is a more recent policy, which allows imports and helper functions with unnamed lambdas.

@Mego The meta post is merely an opinion which others are free to agree or disagree with. Regarding Martin's answer, the point (1) saying "the submitted code" may evaluate to a function does not suggest to me that it's OK if only the last line evaluates to a function, rather than the entire code.

@feersum Defining helper functions also prevents the entire code from evaluating to a single function. Try it with eval and see for yourself.

@Mego Sure, what's your point? (BTW, that's not true in all cases in Python. I've written unnamed lambdas before where a helper function is defined in an optional argument).

Sage, 24 bytes
lambda A,B:A(B).expand()

As of Sage 6.9 (the version that runs on http://sagecell.sagemath.org), function calls without explicit argument assignment (f(2) rather than f(x=2)) causes an annoying and unhelpful message to be printed to STDERR. Because STDERR can be ignored by default in code golf, this is still valid.
This is very similar to Dennis's SymPy answer because Sage is a) built on Python, and b) uses Maxima, a computer algebra system very similar to SymPy in many ways. However, Sage is much more powerful than Python with SymPy, and thus is a different enough language that it merits its own answer.
Verify all test cases online

PARI/GP, 19 bytes
(a,b)->subst(a,x,b)

which lets you do
%(x^2+1,x^2+x-1)

to get

%2 = x^4 + 2*x^3 - x^2 - 2*x + 2

MATLAB with Symbolic Toolbox, 28 bytes
@(f,g)collect(subs(f,'x',g))

This is an anonymous function. To call it assign it to a variable or use ans.  Inputs are strings with the format (spaces are optional)
x^2 + 3*x + 5

Example run:
>> @(f,g)collect(subs(f,'x',g))
ans =
    @(f,g)collect(subs(f,'x',g))
>> ans('3*x^4 - 36*x^3 + 138*x^2 - 180*x + 27','2*x + 3')
ans =
48*x^4 - 96*x^2

Pyth, 51 34 bytes
AQsM.t*LVG.usM.t.e+*]0k*LbHN0tG]1Z

Test suite.

when python outgolfs pyth

@downrep_nation not anymore :)

Python 2, 239 232 223 bytes
r=range
e=reduce
a=lambda*l:map(lambda x,y:(x or 0)+(y or 0),*l)
m=lambda p,q:[sum((p+k*[0])[i]*(q+k*[0])[k-i]for i in r(k+1))for k in r(len(p+q)-1)]
o=lambda f,g:e(a,[e(m,[[c]]+[g]*k)for k,c in enumerate(f)])

A 'proper' implementation that does not abuse bases. Least significant coefficient first.
a is polynomial addition, m is polynomial multiplication, and o is composition.

Is m([c],e(m,[[1]]+[g]*k)) not the same as e(m,[[c]]+[g]*k)?

@Neil Good call, can squash two in one with that!

a=lambda*l:map(lambda x,y:(x or 0)+(y or 0),*l)

@AndersKaseorg Right, I added it, thanks :)

It might be possible to simplify your polynomial addition, since I think one list will always be longer than the other, so you don't need the ( or 0) in that version.

JavaScript (ES6), 150 103 bytes
(f,g)=>f.map(n=>r=p.map((m,i)=>(g.map((n,j)=>p[j+=i]=m*n+(p[j]||0)),m*n+(r[i]||0)),p=[]),r=[],p=[1])&&r

Accepts and returns polynomials as an array a = [a0, a1, a2, ...] that represents a0 + a1*x + a2*x2 ...
Edit: Saved 47 bytes by switching from recursive to iterative polynomial multiplication, which then allowed me to merge two map calls.
Explanation: r is the result, which starts at zero, represented by an empty array, and p is gh, which starts at one. p is multiplied by each fh in turn, and the result accumulated in r. p is also multiplied by g at the same time.
(f,g)=>f.map(n=>            Loop through each term of f (n = f[h])
 r=p.map((m,i)=>(           Loop through each term of p (m = p[i])
  g.map((n,j)=>             Loop though each term of g (n = g[j])
   p[j+=i]=m*n+(p[j]||0)),  Accumulate p*g in p
  m*n+(r[i]||0)),           Meanwhile add p[i]*f[h] to r[i]
  p=[]),                    Reset p to 0 each loop to calculate p*g
 r=[],                      Initialise r to 0
 p=[1]                      Initialise p to 1
)&&r                        Return the result

Ruby 2.4 + polynomial, 41+12 = 53 bytes
Uses flag -rpolynomial. Input is two Polynomial objects.
If someone outgolfs me in vanilla Ruby (no polynomial external library), I will be very impressed.
->a,b{i=-1;a.coefs.map{|c|c*b**i+=1}.sum}

Maxima, 34 bytes
Try it online!
lambda([a,b],expand(subst(b,x,a)))

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


text:
Generate a parity bit
A parity bit, is one of the simplest forms of a checksum. First, you have to pick the parity, even or odd. Let's say we pick even. Now, we need a message to transmit. Let's say our message is "Foo". This is written in binary as:
01000110 01101111 01101111

Now, we count the total number of 1's in there, which is 15. Since 15 is an odd number, we must add one extra bit to the end of our message, and we will now have an even number of 'on' bits. This last added bit is known as the "parity bit". If we had picked an odd parity for our checksum, we would have to add an extra '0' so that the number of on bits remains odd.
The challenge:
You must write a program or function that determines what the correct parity bit for a string is. Your program must take two inputs:

A string, s. This is the message that the checksum will be calculated on. This will be restricted to the 95 printable ASCII characters.

A character or single character string p, that will either be e for even parity, or o for odd parity.

and produce a truthy-falsey value representing the correct parity bit. Truthy if it's a 1, and falsey if it's a 0.
Builtins that count the number of "on" bits in a string or character are not allowed. For example, a function f that does this: f('a') == 3 or f('foo') == 16 is banned. Anything else, such as base conversion, is fair game.
Test IO:
(without the quotes)
s: "0"
p: 'e'
output: 0

s: "Foo"
p: 'e'
output: 1

s: "Hello World!"
p: 'o'
output: 0

s: "Alex is right"
p: 'e'
output: 1

s: "Programming Puzzles and Code-Golf"
p: 'e'
output: 0

s: "Programming Puzzles and Code-Golf"
p: 'o'
output: 1

This is codegolf, so standard loopholes apply, and the shortest answer in bytes wins.
Leaderboard

var QUESTION_ID=78569,OVERRIDE_USER=31716;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

Rather annoyingly, o has even parity.

Can you clarify "Builtins that count the number of "on" bits in a string or character are not allowed." a bit better? What about built-in base conversion? Etc..

@DrGreenEggsandHamDJ Comments on Stack sites are volatile and subject to disappear without warning for no reason, at any capable user's whim. As a result, it's highly encouraged that specs integral to the challenge be in the post itself, not the comment section.

@DrGreenEggsandHamDJ To be clear, if I compose two builtin functions g and x into a function f such that f('a') == 3 and f('foo') == 16, does that count as a builtin?

@cat For example, in python: str(int(s, 2)).count('1')? No, I wouldn't consider that to be a single builtin function that violates that rule. Does my edit make it more clear?

@DrGreenEggsandHamDJ Yes, it does, thank you!

Do I have to accept the p in char form if my language has a character type that's disparate from the string type? Or can I ask for it in string form (that is, "e" rather than 101)?

@cat As far as I'm concerned char == single_char_string. I also edited that into the post.

@DJMcMayhem Actually it's not the same thing (at least in C), single_char_string is an array consisting of one char element and '\0'. Also, do I really need to get e or o as strings or chars, or can I get 0 or 1 too?

Does sum count as counting ON bits? For example, does sum([0,0,1,1,1,1,0,0,1,1,0]) in Python count as a cheat? Because it doesn't count ON bits, it sums up all the numbers, and it just happens to function like this, in this case.

@EriktheGolfer I'm pretty sure I answered both of those points in the post. I know that char and string with only one char are different. I don't care which one your program takes, which is why I specified they're both OK. I also wrote Builtins that count the number of "on" bits in a string or character are not allowed. For example, a function f that does this: f('a') == 3 or f('foo') == 16 is banned. Anything else, such as base conversion, is fair game. So since sum('a') != 3 it doesn't count as a builtin.

MATL, 8 7 bytes
8\hBz2\

Try it online! Or verify all test cases at once.
8\    % Implicitly take first input ('e' or 'o'), and compute modulo 8. Inputs 'e' and 'o'
      % give 5 or 7 respectively, which have an even or odd number of `1` bits resp.
h     % Implicitly take second input, and concatenate
B     % Convert to binary. Gives 2D array, with one row for each original entry
z     % Number of nonzero values in that 2D array
2\    % Modulo 2, i.e. compute parity

Java, 97 bytes
Because, ya know, Java.
(s,c)->{boolean e=1>0;for(int i:s.getBytes())while(i>0){if(i%2==1)e=!e;i/=2;}return c=='o'?e:!e;}

This is a lambda for a BiFunction<String, Character, Boolean>.
e and o appear to be reversed in the return statement because apparently my logic was backwards.

C, 62 bytes

12 bytes saved thanks to @LevelRiverSt and @TonHospel.

XOR has the nice property that it can be used to reduce strings down to one char, while preserving parity.
f(s,p)char*s;{for(p/=8;*s;)p^=*s>>4^*s++;p^=p/4;return p%4%3;}

Ideone.

27030>>((p^p>>4)&15)&1  should calculate the parity of p and is even 1 byte shorter

The space in char *s is uneeded

62 bytes: f(s,p)char*s;{for(p/=8;*s;)p^=*s>>4^*s++;p^=p/4;return p%4%3;} The %3 will always return 0 for a 0, but may return 1 or 2 for a 1. This is acceptable under the rules: truthy if it's a 1

27030>>((p^p>>4)&15)&1.  Well, err, obviously.  ;-)

@LevelRiverSt Brilliant! thanks!

You can reverse the order of the input arguments and do p=p%4%3;, or at least if you use TIO.

Python 2, 51 bytes
lambda s,p:`map(bin,map(ord,p+s))`[9:].count('1')%2

This is based on an idea of Sp3000 to count 1's in the string representation of the list of character codes in binary rather than summing for each character.
The new trick is to handle e and o in this as well. If e was odd and o even, we could just prepend the parity bit to the string before doing the count (flipping them because '1' is Truthy). Unfortunately, they are not. But, if we remove all but their last two bits, it's now true.
e 0b11001|01
o 0b11011|11

This is done by removing the first 9 character of the string representation.
['0b11001|01',

Wow, that's a really neat way of handling eo!

Python, 58 57 bytes
lambda s,p:sum(bin(ord(c)).count("1")for c in s)&1!=p>'e'

53 (Python 2 only): lambda s,p:\map(bin,map(ord,s))`.count('1')%2^(p>'e')`

You can save a byte with !=p>'e'.

Wait, my byte-save doesn't actually work because Python treats it as a chained inequality.

lambda s,p:`map(bin,map(ord,p+s))`[8:].count('1')%2

@xnor Just post your own answer.

Jelly, 9 8 bytes
OBFSḂ⁼V}

Try it online!
O         convert each character in argument 1 (left arg) to its codepoint (ord)
 B        convert to binary (list of 0s and 1s)
  F       flatten
   S      sum the entire list, giving the number of 1s in the entire string
    Ḃ     mod 2 (take the last bit)
       }  now, with the second (right) argument...
      V   eval with no arguments. This returns...
            1 for e because it expands to 0e0 (i.e., does 0 exist in [0])
            0 for o because it expands to 0o0 (0 OR 0, false OR false, false)
     ⁼    test equality between the two results

Thanks to Dennis for a byte!

I was myself trying to come up with a Jelly answer, but those chaining rules ellude me :-)

@LuisMendo I'm in the same boat; this is my first Jelly answer after having been trying to learn it for... way too long :P

That V}... that one was really cool!!! (Dennis is a real golfer) +1 It beat every attempt of mine.

Pyth, 12 bytes
q@"oe"sjCz2w

Test suite.
         z    take a line of input
        C     convert to int
       j  2   convert to base 2, array-wise (so, array of 0s and 1s)
      s       sum (count the number of ones)
 @"oe"        modular index into the string to get either "o" or "e"
q          w  test equality to second line of input

JavaScript (ES6), 84 72 bytes
(s,p)=>(t=p>'e',[...s].map(c=>t^=c.charCodeAt()),t^=t/16,t^=t/4,t^t/2)&1

Bit twiddling turned out to be shorter than converting to base 2 and counting 1s.

IA-32 machine code, 15 bytes
Hexdump:
0f b6 c2 40 32 01 0f 9b c0 3a 21 41 72 f6 c3

Assembly code:
    movzx eax, dl;
    inc eax;
repeat:
    xor al, [ecx];
    setpo al;
    cmp ah, [ecx];
    inc ecx;
    jb repeat;
    ret;

This is a function that receives its first argument (string) in ecx and second argument (char) in dl. It returns the result in eax, so it's compatible with the fastcall calling convention.
This code bends the rules when it uses the setpo instruction:

Builtins that count the number of "on" bits in a string or character are not allowed

This instruction sets al to the parity bit calculated by the previous instruction - so I have these two nitpicks on the rules:

It doesn't count the number of "on" bits - it calculates the parity bit directly!
Technically, it's the previous instruction (xor) that calculates the parity bit. The setpo instruction only moves it to the al register.

These semantic details out of the way, here is the explanation on what the code does.
The representations of the characters are:
'e' = 01100101
'o' = 01101111

If we add 1 to them, they happen to have just the right parity:
'e' + 1 = 01100110 (odd parity)
'o' + 1 = 01110000 (even parity)

So we XOR all the characters of the string, initializing al to these values, which gives the answer.

The first instruction is movzx eax, dl instead of the more obvious (and shorter) mov al, dl, because I want to have the number 0 in a register (ah in this case) in order to be able to compare it in the right order (0, [ecx] rather than [ecx], 0).

Perl, 29 bytes
Includes +2 for -p
Run with the input on STDIN as parity character space string, e.g.
parity.pl <<< "p Programming Puzzles and Code-Golf"

parity.pl
#!/usr/bin/perl -p
$_=unpack"B*",$_|b;$_=1&y;1;

J, 27 bytes
'oe'&i.@[=[:~:/^:2@#:3&u:@]

Usage
   f =: 'oe'&i.@[=[:~:/^:2@#:3&u:@]
   'e' f '0'
0
   'e' f 'Foo'
1
   'o' f 'Hello World!'
0
   'e' f 'Alex is right'
1
   'e' f 'Programming Puzzles and Code-Golf'
0
   'o' f 'Programming Puzzles and Code-Golf'
1

05AB1E, 15, 13 bytes
Code:
€ÇbSOÈ„oe²k<^

Example Input:
Programming Puzzles and Code-Golf
o

Example Output:
1

Explanation:
€                 # for each char in string
 Ç                # get ascii value
  b               # convert to binary
   S              # split to single chars (ex: '1101' to '1','1','0','1')
    O             # sum
     È            # check if even
      „oe         # push string "oe"
         ²        # push 2nd input (p)
          k       # get 1-based index of p in "oe"
           <      # decrease (to get either 0-based index)
            ^     # xor with result of È

Thanks to Adnan for saving 2 bytes.

Wow, very nice! You can golf off two bytes by using the ² command. This automatically pushes the second input on top of the stack. Also, two-char strings can be shortend using „. So "oe" is equivalent to „. For 13 bytes: €ÇbSOÈ„oe²k<^ :)

05AB1E also uses CP-1252 encoding, so each character here is 1 byte :).

@Adnan: Thanks! Used notepad++ for the bytecount and just assumed that it counted chars :P

Bash and unix tools (72 bytes)
f(){ bc<<<"$(xxd -b<<<"$2$1"|cut -b9-64|tail -c +7|tr -dc 1|wc -c)%2" }

Excepts s as the first and p as the second argument. Fortunately the last 3 bits of o and e has odd and even parity respectively.
xxd -b        print the concatenation of `p` and `s` in binary
cut -b9-64    parse xxd output
tail -c +7    keep only the last 3 bits of `p`
tr -dc 1      keep only the `1`s
wc -c         count them
bc ...%2      modulo two

Supplying the input via <<< adds a line feed character, but the parity of \n is even, so it is not a problem.

JavaScript (ES6), 69 bytes
(s,p)=>[...s].map(c=>{for(n=c.charCodeAt();n;n>>=1)r^=n&1},r=p>"e")|r

Julia, 58 47 45 40 bytes
f(s,p)=(p>'e')$endof(prod(bin,s)∩49)&1

This is a function that accepts a string and a character and returns an integer.
To get the number of ones in the binary representation, we first apply the bin function to each character in the string, which gives us an array of binary strings. Then reduce them into one using prod (since * is string concatenation in Julia) and take the set intersection of that string and the character code for 1, which gives us a string of ones. The last index of that string is the number of ones. We XOR this with 1 if the provided character is o and 0 otherwise, then get the parity using bitwise AND 1.
Try it online! (includes all test cases)
Saved 18 bytes thanks to Dennis!

PowerShell v2+, 91 bytes
/me cries in a corner
param([char[]]$a,$b)$b-eq'o'-xor(-join($a|%{[convert]::toString(+$_,2)})-replace0).length%2

Yeah ... so, base conversion is not a strong suit for PowerShell. The conversion from input string to binary representation $a|%{[convert]::toString(+$_,2)} is 32 bytes in and of itself ...
Takes input $a and $b, explicitly casting $a as a char-array in the process. We then check whether $b is -equal to o, and -xor that with the other half of the program. For that part, we take the input string $a, pipe it through a loop to convert each letter to binary, -join all those together to form one solid string, and -replace all the 0s with nothing. We then count the .length of that string and take it mod-2 to determine if it's even or odd, which will conveniently be either 0 or 1, perfect for the -xor.
Will return True or False accordingly. See test cases below:
PS C:\Tools\Scripts\golfing> .\generate-parity-bit.ps1 "0" e
False

PS C:\Tools\Scripts\golfing> .\generate-parity-bit.ps1 "Foo" e
True

PS C:\Tools\Scripts\golfing> .\generate-parity-bit.ps1 "Hello World!" o
False

PS C:\Tools\Scripts\golfing> .\generate-parity-bit.ps1 "Alex is right" e
True

PS C:\Tools\Scripts\golfing> .\generate-parity-bit.ps1 "Programming Puzzles and Code-Golf" e
False

PS C:\Tools\Scripts\golfing> .\generate-parity-bit.ps1 "Programming Puzzles and Code-Golf" o
True

Factor, 85 bytes
For some reason I couldn't wrap my head around this one until a few minutes ago, when I simplified (and maybe shortened?) the code.
[ "e" = [ even? ] [ odd? ] ? [ [ >bin ] { } map-as concat [ 49 = ] count ] dip call ]

? is like a ternary operator: it tests the truthiness of the third stack item, and either selects the true value or the false value.
It's roughly equivalent to the following C-like pseduocode:
void* parity_tester_function = strcmp(p, "e") ? (void *) even?  // it's a function pointer (I think)
                                              : (void *) odd? ;

The rest of the code is pretty simple:
[                       ! to count a string's set bits:
    [ >bin ] { } map-as ! get the binary of each character, and map as an array, because you can't have stringy data nested in another string (that's called a type error)
    concat              ! { "a" "B" } concat -> "aB"
    [ 49 = ] count      ! count items in the resulting string which match this condition (in this case, the condition we're testing is whether the character has the same code point as "1")
] dip                   ! take the above function pointer off the stack, apply this anonymous function to the now-top of the stack, then restore the value after the quotation finishes.
                        ! in other words, apply this quotation to the second-to-top item on the stack
call                    ! remember that conditionally chosen function pointer? it's on the top of the stack, and the number of sets bits is second.
                        ! we're gonna call either odd? or even? on the number of set bits, and return the same thing it does.

 Common Lisp, 87
(lambda(s p)(=(mod(reduce'+(mapcar'logcount(map'list'char-code s)))2)(position p"oe")))

Sum the logcount of char-codes of s.
The remainder of this, when divided by 2, is compared to the position of the parity argument p in the string "oe" (either 0 or 1). For example, if there are 4 ones, the remainder is zero. If p is o, then no additional bit should be added, and the test return false.

Pretty-printed
(lambda (s p)
  (= (mod (reduce '+ (mapcar 'logcount (map 'list 'char-code s))) 2)
     (position p "oe")))

Java, 91 bytes
(s,c)->{s+=c%8;int e=1;for(int i:s.getBytes())while(i>0){if(i%2==1)e^=1;i/=2;}return e==0;}

I did the same as @CAT97, but stripped some characters by using the modulo 8 and concatenate of @Luis Mendo and the use of int instead of boolean.
This is a lambda for a BiFunction<String, Character, Boolean>.

Matlab, 49 bytes
f=@(x,p)mod(sum(sum(dec2bin(x)-'0'))+(p-'e'>0),2)

where:

x is the input string;
p is 'e' for even parity and 'o' for the odd one.

For example:
>> f('Programming Puzzles and Code-Golf','e')

ans =

     0

Ruby, 57 bytes
If 0 was falsey in Ruby, the == could probably be switched to just -, or there could be other optimizations, but it isn't.
->s,b{s.gsub(/./){$&.ord.to_s 2}.count(?1)%2==(b>?i?0:1)}

Retina, 102 bytes
Takes the string on the first line, and the letter on the second line. Uses ISO 8859-1 encoding.
[12478abdghkmnpsuvyzCEFIJLOQRTWX#%&)*,/;=>@[\]^| ](?=.*¶)
1
[^1](?=.*¶)
0
^(0|10*1)*¶o|^0*1(0|10*1)*¶e

Try it online
The character class on the first line matches any character with an odd number of ones in the binary representation.
Description of how even/odd detection with regex works here.

Octave, 56 bytes
f=@(s,p) mod(sum((i=bitunpack([s p]))(1:length(i)-5)),2)

The bitunpack function, for ASCII characters, returns them in little-endian order. So by putting the parity flag at the end of our string, unpacking the whole thing, and dropping the last 5 bits, we can then sum up the whole thing mod 2 for our ultimate answer.
Usage:
octave:137> f('Hello World!', 'o')
ans = 0
octave:138> f('Hello World!', 'e')
ans =  1


text:
Coding Around The Clock
Write a single line program two or more characters long that contains no line terminators and takes no input. For example, your program might be:
MyProgram

When your program is arranged into the shapes a clock's hands make at 12, 3, 6, and 9 o'clock, it needs to output the corresponding hour number. No other times need be supported.
Specifically:

When your program is arranged like clock hands at 12 o'clock ()
m
a
r
g
o
r
P
y
M

running it should output 12.
When your program is arranged like clock hands at 3 o'clock ()
m
a
r
g
o
r
P
y
MyProgram

running it should output 3.
When your program is arranged like clock hands at 6 o'clock ()
m
a
r
g
o
r
P
y
M
y
P
r
o
g
r
a
m

running it should output 6.
When your program is arranged like clock hands at 9 o'clock ()
........m
........a
........r
........g
........o
........r
........P
........y
margorPyM

running it should output 9.

Notes

The first character in your program is always placed at the center of the clock. (Note how there is only one M in the 6 o'clock example.)
Any one non-newline character may be used to indent the program for the 9 o'clock arrangement. In the examples . is used, but space or / or # would be just as valid.
For the 3 o'clock arrangement, no characters should be in the empty upper right region. (i.e. keep it empty, don't fill it with spaces.)
The initial program arrangement (MyProgram as is) does not need to do anything. Only the 12, 3, 6, and 9 o'clock arrangements need to have correct, well-defined output.
Code that only works as a function or REPL command is not allowed. Each of the four arrangements should be ready to run as full programs as is.

The shortest program in bytes wins. e.g. MyProgram has a length of 9 bytes.

I have no idea how to even begin doing this

You can see what programs you need to account for using this: function all(e,n){n=n||" ";var i=e.split("").reverse().join("\n"),l=i+e.slice(1),r=i+e.split("").join("\n").slice(1),s=i.replace(/^./gm,n.repeat(e.length-1)+"$&").replace(/\n.+$/,"\n"+e.split("").reverse().join(""));return[i,l,r,s].join("\n\n")} (javascript); e is the program, and n is the filler character

So, in Python, for instance, no lambda, no functions, and no REPL commands? This is going to take some miracle to get done on my part...

Is it OK if a character is printed and then erased with backspace?

And here comes the magic, thanks to @feersum

@R.Kap Not exactly. What I mean is each arrangement should be a valid full program - if it also works as a function or REPL command (as it might indeed in Python) that's fine.

@feersum Yes, that sounds ok

Oh, okay, that makes it a bit easier.

Here's a CJam script to generate all four codes from a single line and a padding character: http://cjam.tryitonline.net/#code=bDpMVyVOKk1MVyVOKkwxPitNTFclTDE-K04qTUwxPlclOnNMLGxjOlg7ZntYZVt9TFclYStOKl1OKg&input=TXlQcm9ncmFtCi4 Feel free to include it in the post.

@MartinBüttner That's the definition of meta-metagolf right there. There should be a challenge just for that.

I was gonna attempt this in Brainfuck, but it turns out the challenge fucked my brain before BF could.

@cat I believe that's impossible because programs 3 and 6 would be indistinguishable to Brainfuck as they only differ in whitespace.

@MartinBüttner Yeah, I think so too.

Also out of curiosity, does "any character" for indentation include backspaces or NULs? What about Unicode combining characters?

@immibis Yes. Any character means any character.

GolfScript, 11 10 bytes
21;;3#9];6

Uses # as padding character.
12 o'clock
6
;
]
9
#
3
;
;
1
2

Try it online!
How it works.

6 is pushed on the stack, ; discards it.
] wraps the stack in an array (does not affect output).
9 and 3 are pushed on the stack, ; and ; discard them.
Finally, 1 and 2 are pushed on the stack, and implicitly printed without separation.

3 o'clock
6
;
]
9
#
3
;
;
1
21;;3#9];6

Try it online!
How it works

6 is pushed on the stack, ; discards it.
] wraps the stack in an array (does not affect output).
9 and 3 are pushed on the stack, ; and ; discard them.
1 and 21 are pushed on the stack, ;; discards them.
3 is pushed on the stack.
# begins a comment until the end of the line.

6 o'clock
6
;
]
9
#
3
;
;
1
2
1
;
;
3
#
9
]
;
6

Try it online!
How it works

6 is pushed on the stack, ; discards it.
] wraps the stack in an array (does not affect output).
9 and 3 are pushed on the stack, ; and ; discard them.
1, 2 and 1 are pushed on the stack.
; and ; discard the last 1 and 2.
3 and 9 are pushed on the stack.
] and ; wrap the stack in an array and discard it, clearing the stack.
6 is pushed on the stack.

9 o'clock
#########6
#########;
#########]
#########9
##########
#########3
#########;
#########;
#########1
6;]9#3;;12

Try it online!
How it works

All lines but the last are comments.
6 is pushed on the stack, ; discards it.
] wraps the stack in an array (does not affect output).
9 is pushed on the stack.
# begins a comment until the end of the line.

><>, 20 bytes
X   n-+g+aa0g+9a2c!v

There's unprintables in there, namely:

After the X is \x06\t
After the c is \x03

The same part of source code is run each time, using g on two parts of the source code to determine what to subtract from 12.
v                         Make IP move downwards
 !\x03                    Jump over the \x03
      c                   Push 12
       2a9+g              Get the char at position (2, 19), i.e. the \t for
                          3 o'clock, the \x03 for 9 o'clock, 0 otherwise
            0aa+g         Get the char at position (0, 20), i.e. first char on
                          the line after the X, \x06 for 6 o'clock
                 +        Add
                  -       Subtract from the 12
                   n      Output as number
                    \t    Unrecognised instruction - errors out

12 o'clock | 3 o'clock | 6 o'clock |  9 o'clock (looks misaligned due to the tab)

"12 votes 0 answers? Wait until Sp proves it's trivial please." –Helka, in chat

ROOP, 54 bytes
OW    3#H V  1#1  H#6  WO#H V>V1#OW V>V9#OW   2#OW   1

Uses < as padding character.
12 o'clock | 3 o'clock | 6 o'clock |  9 o'clock
12 o'clock
The 1 and the 2 that are near the top fall for 3 cycles. When they reach the W operator, the operator places the number in O, which represents the output.
The 1 in this part
1

V

H

fell for 2 cycles, the V operator moves it below and at the next cycle activates the H operator that ends the program.
3 o'clock
O are also objects that move and fall. Since the code now has a line with more than one character, all other lines are filled with empty spaces. All O moves to the right and fall, causing the W operators to have no place to send the 1 and 2.
The only O that does not move is the one that is trapped in the center. The 3 above falls for 4 cycles to the W.
Then the numbers that fall are filling the 4 spaces between the W and3. When it is filled, another number can pass over all of them and reach the H operator that ends the program.
6 o'clock
1

H
#
6

W
O

Very similar to the 12, the 6 falls to the W and the 1 to the H. This occurs in 2 cycles, ending the program before the 12 case occurs.
9 o'clock
<9
<V
<>
<V
<
<W
<O
<#
<1
<V
<>
<V
<
<H

(I show a single column of < because the others do nothing).
The V picks up the 9 and moves it to the pipe below, which deflects the object to the left. The pipe < moves the object down and the next one to the right. The V operator put the 9 in the space below and then it is sent to the output.
The 1 makes equal movements and reaches the H, which ends the program. As the pipes move objects in the same cycle, all this takes a single cycle.


text:
One-to-one correspondence between pairs of integers and the positive integers
It is well-known that there are one-to-one correspondences between pairs of integers and the positive integers. Your task is to write code defining such a correspondence (by defining a pair of functions/programs that are inverses of each other) in your programming language of choice, plus a correctness check (see below) with the smallest number of bytes for the correspondence definition (not taking the correctness check into account).
The solution must include :

the definition of a function/program f having two integer arguments and returning an integer (that's one direction of the bijection).
either the definition of a function/program g having one integer argument and returning a pair of integers (might be an array, a list, the concatenation of the two integers separated by something   ...) or two functions/programs a and b having an integer argument and returning an integer (that's the other direction).
an additional code snippet checking that for the f and g (or f and a,b) you defined above, you have g(f(x,y))=(x,y) (or a(f(x,y))=x and b(f(x,y))=y) for any integers x,y in the range -100 < x < 100,-100 < y < 100. Note that f and g have to work for values outside of this range as well.

You may rename a,b,f or g of course. The two solutions do not have to be written in the same language.
Below is a not-optimal-at-all solution in PARI/GP, with 597 characters for the function definitions.
plane_to_line(x,y)={
my(ax,ay,z);
ax=abs(x);
ay=abs(y);
if((ax<=ay)*(y<0),        z=4*y*y-2*y+x+2;);
if((ax<=ay)*(y>=0),       z=4*y*y-2*y-x+2;);
if((ay<=ax)*(x<0),        z=4*x*x    -y+2;);
if((ay<=ax)*(x>=0)*(y<0), z=4*x*x+4*x+y+2;);
if((ay<=ax)*(x>=0)*(y>=0),z=4*x*x-4*x+y+2;);
if((x==0)*(y==0),z=1;);
return(z);
}

line_to_plane(z)={
my(l,d,x,y);
l=floor((1+sqrt(z-1))/2);
d=z-(4*l*l-4*l+2);
if(d<=l,x=l;y=d;);
if((l<d)*(d<=3*l),x=2*l-d;y=l;);
if((3*l<d)*(d<=5*l),x=(-l);y=4*l-d;);
if((5*l<d)*(d<=7*l),x=d-6*l;y=(-l););
if((7*l<d)*(d<8*l) ,x=l;y=d-8*l;);
if(z==1,x=0;y=0;);
return([x,y]);
}

and the correctness-check code :
accu=List([])
m=100;
for(x=-m,m,for(y=-m,m,if(line_to_plane(plane_to_line(x,y))!=[x,y],\
listput(accu,[x,y]);)))
Vec(accu)

We've already done the second part of this but I guess the fact that both functions need to be each other's inverse might be sufficient interaction to justify a multi-part challenge.

@MartinBüttner I'm not sure independent multi-part works. Part of the challenge is to pick the encoding that gives you the shortest functions.

@LevelRiverSt I might be misunderstanding you, but I think that's what I said?

Can we provide only one program which can be called both ways?

I find the way this challenge is written overly technical and confusing. You will lose some people by using words like bijection, where one-to-one correspondence would do. I'm not sure what Z^2 means. on googling I found Z to be the integers, so Z^2 would be the square numbers. But you seem to mean a tuple of two integers. Please clarify the spec, perhaps with examples. Note that your own code is not a spec. The spec should be in English, with your code only to support it.   Also, does the checking function count as part of the codegolf score? if so, why?

@Fatalize sure, but I presume that would make your byte count higher

@LevelRiverSt The notation Z refers to a set of numbers, but Z^2 refers to a set constitued of pair of numbers in Z. You could represent in your mind by oposing Z(or Z^1) as a 1-dimension environment (a line), and Z^2 as a 2-dimension environment. Z^n is a n-dimension environment. It means that for every single point in one of these environment, there's an unique correspondant in each of the other ones. that's what this challenge is about ;)

@EwanDelanoy I think Fatalize was suggesting to count the program that can do both things only once.

@LevelRiverSt To supplement Katenkyo's comment, the reason Z^n stands for n-tuples is that the omitted operator isn't (pairwise) multiplication but the Cartesian product. Z^2 = ZxZ.

The test that g(f(x, y)) = (x, y) for all x, y is not sufficient to guarantee that f and g define a one-to-one correspondence. Counterexample in Python 2:
f=lambda*l:int(repr(l).encode('hex'),16);g=lambda n:eval((len('%x'%n)%2*'0'+'%x'%n).decode('hex'));r=range(-100,101);assert all(g(f(x,y))==(x,y)for x in r for y in r)
Must it also be true that f(g(n)) = n for all n? Should you require a check for this?

@AndersKaseorg No test on a finite set can ever show one-to-one correspondance. I might have included a requirement test for $f(g(n))=n$ but I didn't.

Finiteness is not the point. One can satisfy g(f(x, y)) = (x, y) for all (x, y) as long as f is merely injective (as in my example); it need not be bijective. Do you require that f(g(n)) = n for all n is true, even if you don’t require a test for it?

@AndersKaseorg Yes, $f(g(n))=n$ is expressed by the expression "one-to-one correspondence" even though I don't require a test for it as you say

MATL, 43 36 bytes
This uses the spiral (1YL) function, which generates a square 2D array of given size with values arranged in an outward spiral. For example, with input 7 it produces
43 44 45 46 47 48 49
42 21 22 23 24 25 26
41 20  7  8  9 10 27
40 19  6  1  2 11 28
39 18  5  4  3 12 29
38 17 16 15 14 13 30
37 36 35 34 33 32 31

The center of the array, which contains 1,  corresponds to the tuple [0 0]. The upper left corner corresponds to [-3 -3] etc. So for example f (-3,-3) will be 43 and g (43) will be [-3 -3].
The code generates a 2D array with this spiral matrix, as large as needed to do the conversion. Note that larger sizes always give the same result for the entries already included in smaller sizes.
From Z2 to N (18 bytes):
|X>tEQ1YLGb+QZ}3$)

Try it online!
|X>   % input is a 2-tuple. Take maximum of absolute values
tEQ   % duplicate. Multiply by 2 and increase by 1. This gives necessary size of spiral
1YL   % generate spiral
G     % push input 2-tuple again
b+Q   % bubble up, add, increase by 1. This makes the center correspont to [0 0]
Z}    % split tuple into its values
3$)   % use those two value as indices into the spiral array to obtain result

From N to Z2 (25 18 bytes)
Eqt1YLG=2#fhw2/k-q

Try it online!
Eq      % input is a number. Multiply by 2, add 1. This assures size is enough and odd
t1YL    % duplicate. Generate spiral of that size
G=      % compare each entry with the input value
2#fh    % 2-tuple of row and column indices of matching entry
w2/k-q  % swap. Offset values so that center corresponds to [0 0]

Snippet for checking
Note that G needs to be modified to accomodate the fact that we have don't have a single input. The code is slow, so the link checks tuples with values from -9 to 9 only. For -99 to 99 just replace the first line.
The code tests each tuple with values in the defined range. It does the conversion to a number, then from that number back to a tuple, and then checks if the original and recovered tuple are equal. The results should all be 1, indicating that all comparisons give true.
It takes a while to run.
Try it online!
-9:9                     % Or use -99:99. But it takes long
HZ^!"@                   % Cartesian power: gives tuples [-9 -9] ... [9 9].
                         % For each such tuple
|X>tEQ1YL@b+QZ}3$)       % Code from Z^2 to N with `G` replaced by `@` (current tuple)
XJ                       % Copy result into clipboard J
Eqt1YLJ=2#fhw2/k-q       % Code from N to Z^2 with `G` replaced by `J`
@!X=                     % Compare original tuple with recovered tuple: are they equal?

JavaScript (ES6), 171 bytes
(x,y)=>(h=x=>parseInt((x^x>>31).toString(2)+(x>>>31),4),h(x)*2+h(y))
x=>(h=x=>parseInt(x.toString(2).replace(/.(?!(..)*$)/g,''),2),i=x=>x<<31>>31^x>>>1,[i(h(x>>>1)),i(h(x))])

Bit twiddling: negative numbers have their bits flipped; each integer is then doubled, and 1 added if it was originally negative; the bits from the integers are then interleaved. The reverse operation deletes alternate bits, divides by 2, and flips all the bits if the value was negative. I could save 3 bytes by limiting myself to 15-bit values instead of 16-bit values.

f=(x,y)=>(h=x=>parseInt((x^x>>31).toString(2)+(x>>>31),4),h(x)*2+h(y))
g=x=>(h=x=>parseInt(x.toString(2).replace(/.(?!(..)*$)/g,''),2),i=x=>x<<31>>31^x>>>1,[i(h(x>>>1)),i(h(x))])
for(i=-100;i<=100;i++)for(j=-100;j<100;j++)if(g(f(i,j))[0]!=i||g(f(i,j))[1]!=j)alert([i,j])

Jelly, 50 48 46 45 43 40 39 bytes
Plane to line (18 17 16 bytes):
AḤ_<0$
+RS+
,Ñç/

Try it online!
Line to plane (32 30 29 27 24 23 bytes):
HĊN⁸¡
³R‘R’U⁹¡F³ịÇ
ç1,¢

Try it online!
Explanation:
I'll only explain plane to line, because line to plane is just its opposite.
Firstly, we convert each integer to a natural number, by the function f(x) = 2*|x| - (x<0).
Then, we convert the two natural numbers to another two natural numbers, by the function g(x,y) = (x+y,y).
Finally, we convert them into one natural number, by the function h(x,y) = (x+1)C2 + y

@LuisMendo Yes, and now the try-it-online links' input is 7

This looks better :-) I assume you are working on the checking snippet

@LuisMendo Does the checking snippet count towards the score?

No, the challenge says not taking the correctness check into account


text:
Calculate the Kronecker sum of two matrices
In the examples below, A and B will be 2-by-2 matrices, and the matrices are one-indexed.
A Kronecker product has the following properties:
A⊗B =  A(1,1)*B   A(1,2)*B
        A(2,1)*B   A(2,2)*B

     =  A(1,1)*B(1,1)   A(1,1)*B(1,2)   A(1,2)*B(1,1)   A(1,2)*B(1,2)
        A(1,1)*B(2,1)   A(1,1)*B(2,2)   A(1,2)*B(2,1)   A(1,2)*B(2,2)
        A(2,1)*B(1,1)   A(2,1)*B(1,2)   A(2,2)*B(1,1)   A(2,2)*B(1,2)
        A(2,2)*B(2,1)   A(2,2)*B(1,2)   A(2,2)*B(2,1)   A(2,2)*B(2,2)

A Kronecker sum has the following properties:
A⊕B = A⊗Ib + Ia⊗B

Ia and Ib are the identity matrices with the dimensions of A and B respectively. A and B are square matrices. Note that A and B can be of different sizes.
A⊕B =  A(1,1)+B(1,1)  B(1,2)         A(1,2)         0
        B(2,1)         A(1,1)+B(2,2)  0              A(1,2)
        A(2,1)         0              A(2,2)+B(1,1)  B(1,2)
        0              A(2,1)         B(2,1)         A(2,2)+B(2,2)

Given two square matrices, A and B, calculate the Kronecker sum of the two matrices.

The size of the matrices will be at least 2-by-2. The maximum size will be whatever your computer / language can handle by default, but minimum 5-by-5 input (5 MB output).
All input values will be non-negative integers
Builtin functions that calculate the Kronecker sum or Kronecker products are not allowed
In general: Standard rules regarding I/O format, program & functions, loopholes etc.

Test cases:
A =
     1     2
     3     4
B =
     5    10
     7     9

A⊕B =
     6    10     2     0
     7    10     0     2
     3     0     9    10
     0     3     7    13

----

A =
    28    83    96
     5    70     4
    10    32    44
B =
    39    19    65
    77    49    71
    80    45    76

A⊕B =
    67    19    65    83     0     0    96     0     0
    77    77    71     0    83     0     0    96     0
    80    45   104     0     0    83     0     0    96
     5     0     0   109    19    65     4     0     0
     0     5     0    77   119    71     0     4     0
     0     0     5    80    45   146     0     0     4
    10     0     0    32     0     0    83    19    65
     0    10     0     0    32     0    77    93    71
     0     0    10     0     0    32    80    45   120

----

A =
    76    57    54
    76     8    78
    39     6    94
B =
    59    92
    55    29

A⊕B =
   135    92    57     0    54     0
    55   105     0    57     0    54
    76     0    67    92    78     0
     0    76    55    37     0    78
    39     0     6     0   153    92
     0    39     0     6    55   123

Jelly, 26 21 20 19 bytes
æ*9Bs2¤×€€/€S;"/€;/

Input is a list of two 2D lists, output is a single 2D list. Try it online! or verify all test cases.
How it works
æ*9Bs2¤×€€/€S;"/€;/  Main link.
                     Argument: [A, B] (matrices of dimensions n×n and m×m)

      ¤              Evaluate the four links to the left as a niladic chain.
  9B                 Convert 9 to base 2, yielding [1, 0, 0, 1].
    s2               Split into sublists of length 2, yielding [[1, 0], [0, 1]].
æ*                   Vectorized matrix power.
                     This yields [[A¹, B⁰], [A⁰, B¹]], where B⁰ and A⁰ are the
                     identity matrices of dimensions m×m and n×n.
          /€         Reduce each pair by the following:
        €€             For each entry of the first matrix:
       ×                 Multiply the second matrix by that entry.
            S        Sum the two results, element by element.
                     This yields the Kronecker sum, in form of a n×n matrix of
                     m×m matrices.
               /€    Reduce each row of the outer matrix...
             ;"        by zipwith-concatenation.
                     This concatenates the columns of the matrices in each row,
                     yielding a list of length n of n×nm matrices.
                 ;/  Concatenate the lists, yielding a single nm×nm matrix.

So many euros... your program is rich!

CJam, 40 39 38 bytes
9Yb2/q~f{.{_,,_ff=?}:ffff*::.+:~}:..+p

Input format is a list containing A and B as 2D lists, e.g.
[[[1 2] [3 4]] [[5 10] [7 9]]]

Output format is a single CJam-style 2D list.
Test suite. (With more readable output format.)
Explanation
This code is an exercise in compound (or infix) operators. These are generally useful for array manipulation, but this challenge exacerbated the need for them. Here is a quick overview:

f expects a list and something else on the stack and maps the following binary operator over the list, passing in the other element as the second argument. E.g. [1 2 3] 2 f* and 2 [1 2 3] f* both give [2 4 6]. If both elements are lists, the first one is mapped over and the second one is used to curry the binary operator.
: has two uses: if the operator following it is unary, this is a simple map. E.g. [1 0 -1 4 -3] :z is [1 0 1 4 3], where z gets the modulus of a number. If the operator following it is binary, this will fold the operator instead. E.g. [1 2 3 4] :+ is 10.
. vectorises a binary operator. It expects two lists as arguments and applies the operator to corresponding pairs. E.g. [1 2 3] [5 7 11] .* gives [5 14 33].

Note that : itself is always a unary operator, whereas f and . themselves are always binary operators. These can be arbitrarily nested (provided they have the right arities). And that's what we'll do...
9Yb      e# Push the binary representation of 9, i.e. [1 0 0 1].
2/       e# Split into pairs, i.e. [[1 0] [0 1]]. We'll use these to indicate
         e# which of the two inputs we turn into an identity matrix.
q~       e# Read and evaluate input, [A B].
f{       e# This block is mapped over the [[1 0] [0 1]] list, also pushing
         e# [A B] onto the stack for each iteration.
  .{     e#   The stack has either [1 0] [A B] or [0 1] [A B]. We apply this
         e#   block to corresponding pairs, e.g. 1 A and 0 B.
    _,   e#     Duplicate the matrix and get its length/height N.
    ,_   e#     Turn into a range [0 1 ... N-1] and duplicate it.
    ff=  e#     Double f on two lists is an interesting idiom to compute an
         e#     outer product: the first f means that we map over the first list
         e#     with the second list as an additional parameter. That means for
         e#     the remaining operator the two arguments are a single integer
         e#     and a list. The second f then maps over the second list, passing
         e#     in the the number from the outer map as the first parameter.
         e#     That means the operator following ff is applied to every possible
         e#     pair of values in the two lists, neatly laid out in a 2D list.
         e#     The operator we're applying is an equality check, which is 1
         e#     only along the diagonal and 0 everywhere else. That is, we've
         e#     created an NxN identity matrix.
    ?    e#     Depending on whether the integer we've got along with the matrix
         e#     is 0 or 1, either pick the original matrix or the identity.
  }
         e#   At this point, the stack contains either [A Ib] or [Ia B].
         e#   Note that A, B, Ia and Ib are all 2D matrices.
         e#   We now want to compute the Kronecker product of this pair.
  :ffff* e#   The ffff* is the important step for the Kronecker product (but
         e#   not the whole story). It's an operator which takes two matrices
         e#   and replaces each cell of the first matrix with the second matrix
         e#   multiplied by that cell (so yeah, we'll end up with a 4D list of
         e#   matrices nested inside a matrix).
         e#   The leading : is a fold operation, but it's a bit of a degenerate
         e#   fold operation that is only used to apply the following binary operator
         e#   to the two elements of a list.
         e#   Now the ffff* works essentially the same as the ff= above, but
         e#   we have to deal with two more dimensions now. The first ff maps
         e#   over the cells of the first matrix, passing in the second matrix
         e#   as an additional argument. The second ff then maps over the second
         e#   matrix, passing in the cell from the outer map. We multiply them
         e#   with *.
         e#   Just to recap, we've essentially got the Kronecker product on the
         e#   stack now, but it's still a 4D list not a 2D list.
         e#   The four dimensions are:
         e#     1. Columns of the outer matrix.
         e#     2. Rows of the outer matrix.
         e#     3. Columns of the submatrices.
         e#     4. Rows of the submatrices.
         e#   We need to unravel that into a plain 2D matrix.
  ::.+   e#   This joins the rows of submatrices across columns of the outer matrix.
         e#   It might be easiest to read this from the right:
         e#     +    Takes two rows and concatenates them.
         e#     .+   Takes two matrices and concatenates corresponding rows.
         e#     :.+  Takes a list of matrices and folds .+ over them, thereby
         e#          concatenating the corresponding rows of all matrices.
         e#     ::.+ Maps this fold operation over the rows of the outer matrix.
         e#   We're almost done now, we just need to flatten the outer-most level
         e#   in order to get rid of the distinction of rows of the outer matrix.
  :~     e#   We do this by mapping ~ over those rows, which simply unwraps them.
}
         e# Phew: we've now got a list containing the two Kronecker products
         e# on the stack. The rest is easy, just perform pairwise addition.
:..+     e# Again, the : is a degenerate fold which is used to apply a binary
         e# operation to the two list elements. The ..+ then simply vectorises
         e# addition twice, such that we add corresponding cells of the 2D matrices.
p        e# All done, just pretty-print the matrix.

fffffffffff what on earth... I hope that survives golfing so that you explain it eventually :P

@FryAmTheEggman :ffff* might be the longest (compound) operator I've ever used in CJam... For one more byte one could go even crazier though: 9Yb2/Q~f.{\{,,_ff=}&}::ffff*:::.+::~:..+p (and yeah, will add an explanation when I'm done golfing).

J - 38 33 31 bytes
i=:=@i.@#
[:,./^:2(*/i)+(*/~i)~

Usage
   f =: [:,./^:2(*/i)+(*/~i)~
   (2 2 $ 1 2 3 4) f (2 2 $ 5 10 7 9)
6 10 2  0
7 10 0  2
3  0 9 10
0  3 7 13
   (3 3 $ 28 83 96 5 70 4 10 32 44) f (3 3 $ 39 19 65 77 49 71 80 45 76)
67 19  65  83   0   0 96  0   0
77 77  71   0  83   0  0 96   0
80 45 104   0   0  83  0  0  96
 5  0   0 109  19  65  4  0   0
 0  5   0  77 119  71  0  4   0
 0  0   5  80  45 146  0  0   4
10  0   0  32   0   0 83 19  65
 0 10   0   0  32   0 77 93  71
 0  0  10   0   0  32 80 45 120
   (3 3 $ 76 57 54 76 8 78 39 6 94) f (2 2 $ 59 92 55 29)
135  92 57  0  54   0
 55 105  0 57   0  54
 76   0 67 92  78   0
  0  76 55 37   0  78
 39   0  6  0 153  92
  0  39  0  6  55 123

Using matrix division will fail if one of the matrices is singular. For example, (2 2 $ 1 2 3 4) f (2 2 $ 1 1 1 1) will raise a domain error.

@Dennis good catch, I was only testing against random values ? 4 4 $ 100 . I'm not sure if there's a way to make use of dyad compose x f&g y = (g x) f (g y) or something else here.

Julia, 60 59 58 56 bytes
A%B=hvcat(sum(A^0),sum(i->map(a->a*B^i,A'^-~-i),0:1)...)

Try it online!
How it works

For matrices A and B, map(a->a*B,A') computes the Kronecker product A⊗B.
The result is a vector of matrix blocks with the dimensions of B.
We have to transpose A (with ') since matrices are stored in column-major order.
Since bitwise NOT with two's complement satisfies the identity ~n = -(n + 1) for all integers n, we have that -~-n = -(~(-n)) = --((-n) + 1) = 1 - n, so -~-0 = 1 and -~-1 = 0.
This way the anonymous function i->map(a->a*B^i,A'^-~-i) applies the above map to B⁰ (the identity matrix with B's dimensions) and A¹ = A when i = 0, and to B¹ and A⁰ when i = 1.
sum(i->map(a->a*B^i,A'^-~-i),0:1) sums over {0,1} with the above anonymous function, computing the Kronecker sum A⊕B as A¹⊗B⁰ + A⁰⊗B¹.
The result is a vector of matrix blocks with the dimensions of B.
sum(A^0) computes the sum of all entries of the identity matrix of A's dimensions. For an n×n matrix A, this yields n.
Finally, hvcat(sum(A^0),sum(i->map(a->a*B^i,A'^-~-i),0:1)...) concatenates the matrix blocks that form A⊕B.
With first argument n, hvcat concatenates n matrix blocks horizontally, and the resulting (larger) blocks vertically.

Ruby, 102
->a,b{r=0..-1+a.size*q=b.size
r.map{|i|r.map{|j|(i/q==j/q ?b[i%q][j%q]:0)+(i%q==j%q ?a[i/q][j/q]:0)}}}

In test program
f=->a,b{r=0..-1+a.size*q=b.size
r.map{|i|r.map{|j|(i/q==j/q ?b[i%q][j%q]:0)+(i%q==j%q ?a[i/q][j/q]:0)}}}

aa =[[1,2],[3,4]]
bb =[[5,10],[7,9]]
f[aa,bb].each{|e|p e}
puts

aa =[[28,83,96],[5,70,4],[10,32,44]]
bb =[[39,19,65],[77,49,71],[80,45,76]]
f[aa,bb].each{|e|p e}
puts

aa =[[76,57,54],[76,8,78],[39,6,94]]
bb =[[59,92],[55,29]]
f[aa,bb].each{|e|p e}
puts

Requires two 2D arrays as input and returns a 2D array.
There are probably better ways of doing this: using a function to avoid repetition; using a single loop and printing the output. Will look into them later.

JavaScript (ES6), 109
Built upon the answer to the other challenge
(a,b)=>a.map((a,k)=>b.map((b,i)=>a.map((y,l)=>b.map((x,j)=>r.push(y*(i==j)+x*(k==l))),t.push(r=[]))),t=[])&&t

Test

f=(a,b)=>a.map((a,k)=>b.map((b,i)=>a.map((y,l)=>b.map((x,j)=>r.push(y*(i==j)+x*(k==l))),t.push(r=[]))),t=[])&&t

console.log=x=>O.textContent+=x+'\n'

function show(label, mat)
{
  console.log(label)
  console.log(mat.join`\n`)
}

;[
  {a:[[1,2],[3,4]], b:[[5,10],[7,9]]},
  {a:[[28,83,96],[5,70,4],[10,32,44]], b:[[39,19,65],[77,49,71],[80,45,76]]},
  {a:[[76,57,54],[76,8,78],[39,6,94]], b:[[59,92],[55,29]]}
].forEach(t=>{
  show('A',t.a)
  show('B',t.b)
  show('A⊕B',f(t.a,t.b))
  show('B⊕A',f(t.b,t.a))
  console.log('-----------------')
})


text:
Transform a matrix
Write a program or function where a matrix A (maximum value of dimensions of the matrix is 100) is transformed to a new matrix B. Each element of the new matrix B is the sum of the positive neighbors of the corresponding element of the matrix A.
Only neighbors in the four orthogonal directions are considered, and the edges do not wrap around.
Example input:
 1  2  3
 4 -1 -2
-3 -4 10
 1  2 10

Output:
 6  4  2
 1  6 13
 5 12 10
 2 11 12

Rules:

As input use integers.
This is a code-golf, so the shortest code in bytes wins.

Welcome to Programming Puzzles & Code Golf! All challenges here require an objective winning criterion, in order to indisputably determine which solution should win. Typically, this is [tag:code-golf], which means that the shortest code in bytes wins. Furthermore, it would be helpful to specify the valid input/output formats (2d array? single string? etc.). Finally, there are some edge cases you haven't covered; for example, will a number ever be surrounded only by negative numbers?

Thank you. I guess up to[100][100], and yes a number will be surrounded by negative numbers.

In what ways can we take input?

@Doorknob The sum of an empty set of numbers is 0.

@Maltysen STDIN, I guess.

@M.T Can we also take the input through function arguments?

@R.Kap yes, you can.

I was talking about if it could be as a string, list of strings, list of lists on ints, etc.

@Maltysen ints.

Are builtins disallowed?

MATL, 9 bytes
t0>*1Y6Z+

Try it online!
Explanation
The input matrix is multplied by an appropriate mask to make negative values equal to 0. Then a 2D convolution is applied to compute the sum of neighbours of each entry.
t     % Take input implicitly: 2D array. Duplicate
0>    % Is each entry positive? This gives a mask of positive values
*     % Multiply: set negative values of input array to zero
1Y6   % Predefined literal: [0 1 0; 1 0 1; 0 1 0]
Z+    % 2D convolution preserving size. Implicitly display

Are phones allowed as I/O?

Well then, I doubt it if this is beatable :p

@Adnan In Python it's not

This guy did this while on the phone, and here I am, having to dedicate some of my time to trying to solve some of these problems...

@R.Kap I meant "typed from the phone" (not "typed while talking on the phone"). Sorry about my English :-)

@LuisMendo Either way -- these sorts of problems require a lot of time and trial and error on my part (partially because I purposefully use unconventional, challenging languages)

Octave, 46 44 40 bytes
Saved 2 bytes thanks to @flawr
@LuisMendo's kernel was 4 bytes shorter than @flawr's.
@(M)conv2(M.*(M>0),(x='aba')~=x','same')

Just like @LuisMendo's answer! Only less... golfy.
You can see it here on ideone.

COMON, I was just about to post this exact answer.

@flawr LOL! Golf is a game of speed! Wait, what?

PS: If you switch to matlab you can replace 'same' with 's' But the convolution kernels should be more golfable...

@flawr I thought about that, but 1) I don't have MATLAB, and 2) it doesn't work on ideone. :(

mod(spiral(3)+1,2) would be one shorter=)

Two shoter: [m=0:1,0;1,m;m,0] (I feel proud=)

You can use save 6 bytes using (x='aba')~=x' instead of [0 1 0;1 0 1;0 1 0]

@LuisMendo What is this witchcraft?

My google-fu is failing me. What the Torvalds does M.*(<boolean>) do?

@cat .* is element-wise matrix multiplication. The boolean matrix is, MATLAB being largely typeless, treated as numeric. So M>0 is just acting as a mask.

@LuisMendo Do you have to destroy every last bit of my self esteem???

@flawr :-P ¯\(ツ)/¯

@LuisMendo =) Sadly this one does not work in Matlab, you'd need to use some bsxfun or so...

@flawr In Matlab you can't do that "intermediate" assignment to x either

@LuisMendo I know, I'm just looking for ways of golfing those kernels in matlab too=)

@flawr If you have the Comm Toolbox, you can use ~de2bi([5 2 5])

(x='aba')~=x'. That's just awesome @Luis!

@StewieGriffin It's crazy what you can do in Octave with those intermediate assignments!

@LuisMendo Is that one in the Octave Tips thread yet?

@beaker It is more or less covered, yes

JavaScript (ES6), 99 94 bytes
a=>a.map((b,i)=>b.map((_,j)=>(g=(c=j,k=j)=>c[k]>0&&c[k])(a[i-1])+g(a[i+1])+g(b,j-1)+g(b,j+1)))

Accepts and returns a two-dimensional array.
Edit: Completely rewritten when I discovered that default arguments work when you pass an explicitly undefined value, such as when you index off the end of an array.

Related: http://codegolf.stackexchange.com/a/78671/44704

@Socialz Neils version is older.

@flawr Some people might be looking at this message chain in vote order, not the post date order, hence I commented that related answer. This one is 4 bytes longer than user's one.

So you basically want to advertise the other post??

@Socialz Was 4 bytes longer, yes ;-)

I'm not letting you get ahead that easy. ;)

This is getting exciting! JS war!

@Socialz Sorry, I don't think I can match his latest result, although at least I'm still not 4 bytes longer.

JavaScript (ES6), 95 93 bytes

document.write("<pre>"+(

m=>m.map((a,r)=>a.map((_,c)=>(s=(x,y=0)=>(n=(m[r+y]||0)[c+x])>0&&n)(1)+s(-1)+s(0,1)+s(0,-1)))

)([[  1,  2,  3 ],
   [  4, -1, -2 ],
   [ -3, -4, 10 ],
   [  1,  2, 10 ]])

.join`\n`)

Python with SciPy, 127 bytes
from scipy.signal import*
lambda A,r=range(3):convolve2d([[x*(x>0)for x in y]for y in A],[[0,1,0],[1,0,1],[0,1,0]],mode='same')

This computes the result using Luis Mendo's method.
Try it online

Mathcad,  bytes
Uses standard 2D convolution of the filtered array with a 3x3 kernel.  Variants with negative element sums and diagonal kernel also added as part compensation for the program not being in the running for least bytes.

No byte count entered as Mathcad scoring has yet to be determined.  However, using keyboard equivalence, it is the region of 28 bytes assuming that matrix input doesn't count towards the total.
Note that what you see in the image above is exactly how the solutionn is entered and displayed in Mathcad.

Jelly, 23 20 18 bytes
0;+ḊṖ
ZÇ€Z+Ç€
+AHÇ

Try it online!
Algorithm
Let's say there is only one row: [1,2,3,4].
Let's say A is the result of prepending a zero, i.e. [0,1,2,3,4].
B is the result of removing the first item, i.e. [2,3,4].
Then the final result is simply A+B vectorized, then removing the last item.
Now, the algorithm is to apply this to every row as well as every column, then find their vectorized sum.
To each column?! I thought Jelly does not support this...
You're right. Therefore, I transposed it, applied to each row, then transposed it again.
Algorithm for removing negative numbers
Here, you just add to each number their absolute. It effectively eliminates negative numbers while doubling each positive number. Then, just halve the whole matrix.

Pyth, 36 bytes
Lm+Vt+d0+0dbJmm/+.akk2dQ.b+VNYyJCyCJ

Try it online!
Direct translation of my answer in Jelly.


text:
Negative base conversion
We already have a base conversion question, but not one with negative bases (nope, this doesn't count).
(Corresponding wiki article.)
You will receive a number (may be negative) and a base (must be negative), and your task is to convert the number into the base.
The base will only be from -10 to -2.
Specs

You may receive the number in any positive base, including unary.
You may choose receive the magnitude of the base instead (10 instead of -10).
The input can be taken in any reasonable format.

Scoring
This is code-golf, shortest solution in bytes wins.
Testcases
input        output
8163, -10    12243
-8163, -10   9977
17, -3       212

It is not a duplicate because I could use Retina to do your linked challenge but I would not be able to trivially modify that algorithm to fit this challenge.

That may be true for Retina, but for most answers I can simply replace all -2s with int(input) and 2s with -int(input)

Jelly, 1 byte
b

Jelly supports negative bases with its base conversion builtin.
Try it online!
(bV at two bytes if the output must be a single integer.)

Outputting a number as an array? Is that an accepted output format for numbers?

@Downgoat The challenge does not give a specific output format.

but an array of value [1,2,3] is not equivalent (or I don't think it can be) directly cast to the integer value of 123. If a challenge is to output a string. I wouldn't output a char array (unless that's a string in my language), I would output a string. See this loophole