text:
Minesweeper At Work
Everyone knows the old minesweeper game that shipped with Windows XP. It's a simple grid with a 9x9 matrix of cells containing either a number (indicating how many mines are adjacent to it) or a mine.

The challenge is to generate a random 9x9 grid with 10 bombs given any integer seed (up to whatever your machine/language's largest int is) with brownie points if you implement the PRNG yourself
example output: cells contain either numerals 0-8 or * for mines
*101*1000
110111000
123210000
1***10000
123210011
00000002*
00000114*
000112*3*
0001*2121

Shortest code in bytes wins.. standard rules etc, etc..

You should indicate what the numbers mean :)

Microsoft Minesweeper is a heck of a lot older than XP and minesweeper-like games date back to at least the 60s.

Also, I don't have time to play Minesweeper while at work -- I'm too busy on PPCG. ;-)

What counts as a PRNG, exactly? How many different configurations must it be able to produce? Can we not use the seed and just generate a different configuration each time, if our language has a PRNG which is automatically initallized to a "random" seed?

@TimmyD But XP's version is the first version that had a 9x9 grid. Anything older uses an 8x8 grid for Beginner. #outnerded ;)

Dyalog APL, 40 bytes
⎕rl←1⋄(1,¨a)⍕¨{⍉3+/0,⍵,0}⍣2⊢a←9 9⍴9≥?⍨81
(assumes ⎕io←0)
the 1 in ⎕rl←1 is the seed
from right to left:
?⍨81 is the same as 81?81 - a random permutation
9≥ results in a bitmask containing ten 1s at random positions, the rest are 0s
a←9 9⍴ reshape to a 9-by-9 square and call it "a"
{ }⍣2 do the following twice:
⍉3+/0,⍵,0 sliding window sum of 3 columns (assume 0s outside), then transpose
(1,¨a)⍕¨ is format (convert to string) each. The left argument to ⍕ specifies the total number of characters and fractional characters in the result. If ⍕ can't format according to that spec it outputs a * - a lucky coincidence for this problem. a will be 1 where the mines are - trying to fit a whole and fractional part into a single char is impossible, so those will appear as *s.

Can you explain the ⎕io←0 assumption? I'm not familiar with Dyalog APL...

Array indices in Dyalog are 1-based by default. Setting ⎕io (the "Index Origin") to 0 makes them 0-based and changes some primitives accordingly, e.g.
⍳3 will be 0 1 2, not 1 2 3.
That can be done either programmatically (⎕io←0) or from the preferences in the GUI.
Having this choice is a 50-year-old mistake that still splits the tiny APL community of today.

MATLAB, 94 93 bytes
rng(input(''));x(9,9)=~1;x(randperm(81,10))=1;y=[conv2(+x,ones(3),'s')+48 ''];y(x)=42;disp(y)

Example run (the first line after the code is the input typed by the user):
>> rng(input(''));x(9,9)=~1;x(randperm(81,10))=1;y=[conv2(+x,ones(3),'s')+48 ''];y(x)=42;disp(y)
99
*10001*2*
220001232
*201111*1
*312*1111
12*211000
011211000
0001*1000
000112110
000001*10

Explanation
rng(input(''));

takes an integer and uses it as seed. (This works in modern MATLAB versions. Old versions may need a different syntax.)
x(9,9)=~1;

assigns logical 0, or false (obtained by logically negating 1) to the entry (9,9) of a matrix x. The rest of the entries are automatically initiallized to logical 0 too.
x(randperm(81,10))=1;

assigns 1 (autoomatically cast to logical 1, or true) to 10 of the
81 entries of x, chosen randomly without replacement. These entries are the ones that contain bombs.
conv2(+x,ones(3),'s')

is an abbreviation of conv2(+x,ones(3),'same'). It convolves the matrix x (which needs to be cast to double, using +) with a 3×3 neighbourhood containing 1. This counts how many bombs are adjacent to each entry. For entries that contain a bomb it includes that bomb, but the value there will be overwritten later.
y=[...+48 ''];

adds 48 to the value, to convert from number to ASCII code. Concatenating with the empty matrix casts these ASCII codes to chars.
y(x)=42;

assigns 42 (ASCII code for '*') to the positions of the bombs. These positions are given by x, which is here used as a logical index.
disp(y)

displays the result.

Javascript (ES6), 204 or 198 bytes
Custom PRNG (204 bytes)
s=>(p=-1,S=n=>(x=p%9-(n+=p)%9)*x-64&&b[n]=='*',T=n=>S(n)+S(-n),b=[...'*00000000'.repeat(9)]).sort(_=>(s=(22695477*s+1)>>>0)&1||-1).map(c=>(p++,c=='0'?T(1)+T(8)+T(9)+T(10):c)).join``.match(/.{9}/g).join`
`

This code is using a linear congruential generator with multiplier 22695477 and increment 1 (this is the Borland C/C++ implementation).
Due to the poor efficiency of the PRNG during its warmup phase, I had to place one bomb per row (instead of 10 at the beginning or 10 at the end of the unshuffled array). So, there are only 9 bombs. I may try to fix that later.
Also, there must be a simpler/shorter way of processing the 'out of board' check (x=p%9-(n+=p)%9)*x-64 but I just can't figure it out right now.
Using Math.random() (198 bytes)
s=>(p=-1,S=n=>(x=p%9-(n+=p)%9)*x-64&&b[n]=='*',T=n=>S(n)+S(-n),b=[...'**********'+'0'.repeat(71)]).sort(_=>Math.random()-.5).map(c=>(p++,c=='0'?T(1)+T(8)+T(9)+T(10):c)).join``.match(/.{9}/g).join`
`

This one includes 10 mines as requested.
Demo

let f =
_=>(p=-1,S=n=>(x=p%9-(n+=p)%9)*x-64&&b[n]=='*',T=n=>S(n)+S(-n),b=[...'**********'+'0'.repeat(71)]).sort(_=>Math.random()-.5).map(c=>(p++,c=='0'?T(1)+T(8)+T(9)+T(10):c)).join``.match(/.{9}/g).join`
`
console.log(f())

'**********'+'0' is equal to '**********'+0; that saves two bytes on the 198-byte-version.

@PaulSchmitz - Unfortunately this '0' is supposed to be repeated and 0.repeat() wouldn't work.

Oops, I though it would get executed like ...('**********'+0).repeat(71). Sorry.

R, 187 Bytes
set.seed();x=1:121;y=x[!(x%%11 %in% 0:1|(x-1)%/%11 %in% c(0,10))];z=sample(y,10);x=x*0;for(t in z){p=t+c(-10:-12,-1,1,10:12);x[p]=x[p]+1};x[z]=9;m=data.frame(matrix(x[y],9));m[m==9]='*';m

Try it on Ideone
Explanation:
set.seed() take a cst seed.
x is the index for a 11*11 matrix
y is the index of the 9*9 matrix in the 11*11 matrix
z is the index of the bomb
x=x*0 initialise the matrix value
The loop add 1 to x in case of adjacent bomb.

I think you have to take the argument to set.seed() as input.

Python 2, 269 266 264 bytes
from random import*
seed(input())
z=1,0,-1
n=range(9)
m=[[0]*9 for _ in n]
for x,y in sample([[x,y]for x in n for y in n],10):
 m[x][y]=-9
 for a in z:
  for b in z:
    if 0<=x+a<9>0<=y+b<9:m[x+a][y+b]+=1 # it gets displayed as 4 spaces, but the beginning of this line is a single tab
print("\n".join("".join([`c`,'*'][c<0]for c in l)for l in m))

Try it on ideone.com
Saved 2 bytes thanks to Aaron.
Most likely still golfable.
Explanation
random is imported for using seed to seed the PRNG and sample to select ten bomb locations randomly. m is a 9 x 9 matrix saving the board. For each of the bomb locations, the corresponding entry in m gets set to -9 and all neighbouring entries get incremented. This way m ends up containing the count of adjacent bombs for non-bomb cells and a negative number for bomb cells. The final print prints the whole board by iterating through all lines l in m and all cells c in l.

What exactly is 'random' used for, exactly?

@Qwerp-Derp probably to seed the random number generator indirectly used by sample()

save 2 bytes by mixing tab indents inside for a in z: block (only python 2.x)

JavaScript ES6, 244 bytes

f=(a=[...Array(11)].map(_=>Array(11).fill(0)),n=10,r=_=>Math.random()*9|0,x=r(),y=r())=>a[x+1][y+1]>8||[0,1,2].map(i=>[0,1,2].map(j=>a[x+i][y+j]++),a[x+1][y+1]=9)&&--n?f(a,n):a.slice(1,-1).map(a=>a.slice(1,-1).map(n=>n<9?n:`*`).join``).join`
`
;o.textContent=f()
<pre id=o>

You may want to elaborate on which part is your code.

@NoOneIsHere The first 244 bytes, hopefully ;-) The first line should be 242 bytes long, then there's the newline and the ``` character.

Ruby, 181 194 183+1 = 184 bytes
Forgot to actually set the seed, whoops. Uses the -n flag.
Try it online!
srand$_.to_i
a=[0]*81
[*0..80].sample(10).map{|i|w=i%9;h=i/9;a[i]=-99
(r=-1..1).map{|x|x+=w
x<0||x>8?0:r.map{|y|y+=h
y<0||y>8?0:a[9*y+x]+=1}}}
puts a.map{|c|c<0??*:c}.join.scan /.{9}/

Python 2, 172 bytes
from random import*
seed(input())
r=range
b=set(sample(r(81),10))
for j in r(9):print''.join([[`len({x-10,x-9,x-8,x-1,x+1,x+8,x+9,x+10}&b)`,'*'][x in b]for x in r(j,81,9)])

Try it online!


text:
Help: Aliens Programmers only speak ASCII
Setting the Scene:
It is an average afternoon, as you unwind after a long day by engaging in your favorite pastime: answering the plethora of captivating questions on PPCG. It hasn't been a good day for you; those damned Pyth programmers keep getting best answer and it's killing your vibe. Suddenly, you notice a new question has been posted! You make up your mind; not this time CJammers. Furiously, you begin to type, birthing a stream of characters; a fetus of the glorious BrainFuck loop that your end product will be. You type and type. Faster! Faster still! You're so focused you don't even notice the lights on your screen start to flicker on and off. Suddenly, the monitor glows green, an alien like symbol branded upon the desktop. Using your impeccable skills you cat ~/Desktop/aliensymbol and get presented with a bunch of numbers, a message! Being the shrewd PPCG programmer that you are, you notice that it looks like ASCII. No matter for you, you print(chr(i) for i in file) and decipher the message. Your first thought: "I need to share this with the community!".
...
Who would've thought it? That the first people to make contact with aliens would be the humble programmers of PPCG. Why us? Maybe it is because we are the epitome of human intelligence. Or maybe because BrainFuck is about as close as we have to an alien language. Nevertheless, the aliens - being the ultra-intelligent life forms that they are - want to test whether they should classify the human race as  intelligent or not. As a test of our mental prowess, the aliens have asked us to send them a few computer programs to demonstrate that we are technologically cultured. The issue is, the only human language they understand is numerical ASCII!
Help humankind show those creatures who the real intellectual alpha is. We need to send them a script that will convert our text based source codes into their numerical ASCII versions. Unfortunately, due to our underdeveloped technology (thanks Obama), we must send as small a translating program as possible. Good thing they chose to contact PPCG!
The Challenge:
The premise of this challenge is simple: you are to write a program that will take any program's source code (or any general text file for that matter), and output a space separated version of it with an ASCII translation below each line. That is, given an input of a text file, you need to output each line of that file followed by a line containing the ASCII representation of each character in the line above it (with each number lining up with the character it represents).
An example will greatly clarify this. Taking the source code of the infamous hello world as the input:
#include <stdio.h>

int main() {
    printf("hello, world\n");
    return 0;
}

your program should output:
#   i   n   c   l   u   d   e       <   s   t   d   i   o   .   h   >
35  105 110 99  108 117 100 101 32  60  115 116 100 105 111 46  104 62  10

10
i   n   t       m   a   i   n   (   )       {
105 110 116 32  109 97  105 110 40  41  32  123 10
                p   r   i   n   t   f   (   "   h   e   l   l   o   ,       w   o   r   l   d   \   n   "   )   ;
32  32  32  32  112 114 105 110 116 102 40  34  104 101 108 108 111 44  32  119 111 114 108 100 92  110 34  41  59  10
                r   e   t   u   r   n       0   ;
32  32  32  32  114 101 116 117 114 110 32  48  59  10
}
125 10

Implementation Details:
You may choose to take the input in whatever form you wish (opening file, command line pipe, function parameter etc.) and you should output to stdout or return the output from a function.
Things to note

Each character in the output is separated by a '\t' to allow for the space of 3 digits in the line below to line up (we are going to assume your tab is set to 4 spaces or more).
The newlines are displayed on the line that the return key was pressed (notice the 10's in the example)
The '\t' and '\n' printing requirements are lax. Your output must, in the general sense, look pleasing to the eye (need to show those aliens we have aesthetic sense as well), and if you can bend the previous two points while maintaining visual integrity, you will be forgiven.
You can choose to assume whether or not there is a newline at the end of the last line.

Scoring
This is code-golf so shortest program wins. Note, even if your program isn't the shortest, but uses really neat tricks relative to the language you are using, many +1's to you!
Good luck. The intergalactic intelligence ranking of humanity rests on your shoulders.
Note: Please forgive the plot holes. I'm not a writer :D

Maybe drop or greatly simplify the "plot" and just leave the challenge. I'm honestly not going to read 3 paragraphs of backstory. I'm just going to read the challenge, since that's what I'm here for.

Why is the line break not doing a line break but is apparently being printed as a space? Do we have to account for that?

@YetiCGN "The newlines are displayed on the line that the return key was pressed"

@YetiCGN The line break is acting as a line break (you can't see the character representing it but you can see the break) and  you still need to explicitly write it in the ascii version. Think of it as if you regex searched the source code for '\n'. Everywhere your search would highlight is where you should write the 10. Here is an example from vim (ignore the last one).

@mbomb007 tbh, that was a pretty epic backstory. I kinda enjoyed it

@mbomb007 Those who want to read can, those who don't can go straight to the challenge part; such is the beauty of subtitles.

May we assume the last line is terminated by a newline ?

@TonHospel  Yes. I'll update the question to allow new lines at the end.

Ah, The output is not what I meant. May we assume the input has a newline at the end (otherwise making sure the line of digits is on a new line gets messy)

@TonHospel Sure (y). I want to avoid having people do annoying edge case checking in their solutions.

I read it as "the first people to make contact with humans would be the humble programmers of PPCG."

"int maint ()"?

Ugh, decimal numbers. Not competing, hex is so much nicer.

@mirabilos ç'est une histoire triste.

Dyalog APL, 14 bytes
Takes list of strings that include newline sequences (10 or 13 10 etc.)
↑(⊢,[.5]⎕UCS)¨

↑ matrify the list of lists consisting of
(...)¨ for each line return...
 ⊢ the text itself
 ,[.5] followed in a new dimension before the first dimension by
 ⎕UCS the Unicode Character Set code points
TryAPL online!

Aren't you calling this once per each line rather than taking in all the input at once?

@StevenH. No, the (right-most part of the) function contains a loop, but as a whole, it is called just once. See the TryAPL example that f is called directly on the input. To call a function once per line, if would have said f¨.

Pyth, 17 13 bytes
Another one of those Pyth programmers.  Sorry.
The new code requires each line to be wrapped in quotes and escaped (including newlines if you desire them to be printed), but puts an extra newline between the line and the ASCII.
jjLC9smCMBd.Q

Try it online!
Explanation:
           .Q  Evaluate all input lines
      m        For each of those lines:
         Bd     Return the line and
       CM       the line mapped to ASCII characters
     s         Sum all these together to begin alternating between line and mapped line
 jLC9          Join all the characters and numbers in the lines and mapped lines on tabs
j              And join all of those on newlines

I'm keeping the old code and its' explanation below.
#Jw
jKC9J
jK+CMJT

Try it online! or use an easier-to-read test case.
Explanation:
#                  Until we run into an error:
 Jw                 Read in the next line of input and call it J.
                     (When there is no line of input, error is thrown that ends program.)

j                  Join:
    J               all characters in input line
 KC9                and insert tab characters (C9), which we can refer to later as K.
                        (Setting it to a variable doesn't save or lose bytes.)

                   Implicit print that join with trailing newline.

j                  Join:
   CMJ              the mapping of ASCII numbers to characters in the input,
 K                  inserting tab characters in between every number
  +   T             And with a trailing 10 for the newline at the end.

I think your first link doesn't work as well as the second one does (doesn't print new lines I think). You might want to update the code in it.

Vim, 86, 77 keystrokes
:g/^/norm A<C-v><C-v>10<C-v><esc>Yp:s/./\=char2nr(submatch(0))."\t"/g<C-v><cr>k:s/./&\t/g<C-v><cr>
:%s/<C-v><cr>0<cr>

This is way too long, but that's what you get when you use vim's eval feature (\=).

Can't tell if your \= is explaining the eval feature, or a sad face because you're using the eval feature ...

@timmyD The first. This is my sad face. D;

@DJMcMayhem why don't you just use this to avoid ambiguity

Python 2, 105 bytes
This uses a slightly different approach than the OP's answer. Note that SO messes up my literal tabs with spaces.
def f(s):
 o=x=''
 for c in s:
    o+=c+"  ";x+="%s    "%ord(c)
    if"\n"==c:print o[:-1],x;o=x=''
 print o+"\n"+x

Try it online

Wouldn't x+=ord(c)+"    " be shorter than "%s    "%ord(c)?

@DJMcMayhem You cannot append an integer to a string. x+=`ord(c)`+" " is the same length.

Perl, >33 31 bytes
Includes +3 for -F (cannot be combined with -e and the code has ' too, so space and - are counted too).
Run with the input on STDIN or give one or more filenames as argument
perl -M5.010 asciidump.pl <<< "Hoi"

asciidump.pl
#!/usr/bin/perl -F
$"=v9;say"@F@{[unpack'W*']}"

Output is not aesthetic if the text contains a tab or there is no final newline

C, 136 117 114 Bytes
#define p(s)while(l[i])printf(s,l[i++]);i=0;puts("")
char l[99];i;f(f){while(fgets(l,99,f)){p("%c\t");p("%d\t");}}

char l[99];i;f(f){while(fgets(l,256,f)){i=0;while(l[i])printf("%c\t",l[i++]);i=0;puts("");while(l[i])printf("%d\t",l[i++]);puts("");}}

Can be tested like this
infile;
main(c,v)char**v;
{
    infile=fopen(v[1],"r");
    f(infile);
}

Having char**v inside the main() would save you 2 characters there..

Uh, I only count 114 bytes in that code. I think you're using CRLF instead of LF (117->115), plus you have a trailing newline (115->114).

Pyth, 21 bytes
j.imjC9d.zmjC9+CMdT.z

Here's an entry from one of "those damned Pyth programmers" ;)
A program that takes input of an unquoted multiline string on STDIN and prints the result. This assumes that all input has a trailing newline. If you want it to deal with no trailing newline, add < at the beginning of the program and )_3 at the end.
Try it online
The output for the test case is difficult to see in the online interpreter, so I've included it here:
#   i   n   c   l   u   d   e       <   s   t   d   i   o   .   h   >
35  105 110 99  108 117 100 101 32  60  115 116 100 105 111 46  104 62  10

10
i   n   t       m   a   i   n   t   (   )       {
105 110 116 32  109 97  105 110 116 40  41  32  123 10
                p   r   i   n   t   f   (   "   h   e   l   l   o   ,       w   o   r   l   d   \   n   "   )   ;
32  32  32  32  112 114 105 110 116 102 40  34  104 101 108 108 111 44  32  119 111 114 108 100 92  110 34  41  59  10
                r   e   t   u   r   n       0   ;
32  32  32  32  114 101 116 117 114 110 32  48  59  10
}
125 10

How it works
j.imjC9d.zmjC9+CMdT.z  Program. Input: .z (All of STDIN split on newlines)
     C9                 Yield tab character by taking chr(9)
    j                   Join on tab
   m   d.z             Map that over .z
               CM       Map ord()
              +   T     Append 10
           jC9          Join on tab
          m      d .z  Map that over .z
 .i                    Interleave the results of the two mappings
j                      Join on newlines
                       Implicitly print

you can save 2 bytes by getting rid of the .z and taking input as list of lines

@Maltysen Judging by the question and the other answers, I think splitting on newlines is part of the challenge.

PowerShell v2+, 85 bytes
gc $args|%{$a=$b='';$_-split'(.)'-ne''|%{$a+="$_`t";$b+="$(+[char]$_)`t"};$a;$b+"10"}

Input is via a path to a file. We then Get-Content (alias gc) on that file, which automatically splits on newlines. We loop over each of those |%{...}. Start by setting $a and $b to an empty string -- these are our ASCII characters and code points respectively. We then -split the input line on every character, keeping it (.), and removing the empty values -ne'' (it's due to how .NET regex parses), then send those into another loop.
Each inner loop, we string concatenate the current character with a tab `t and add that onto $a. Similarly for $b, excepting we're explicitly casting as a char and then as an int +.
Outside the inner loop, we place the resulting $a and $b (with a linefeed designator, since that'll never come up in our looping) on the pipeline. Those are gathered up with an implicit Write-Output at program completion.
Example
(with the understanding that I've got a trailing linefeed and Markdown mangles the tab character)
PS C:\Tools\Scripts\golfing> .\aliens-only-understand-ascii.ps1 '.\aliens-only-understand-ascii.txt'
#   i   n   c   l   u   d   e       <   s   t   d   i   o   .   h   >
35  105 110 99  108 117 100 101 32  60  115 116 100 105 111 46  104 62  10

10
i   n   t       m   a   i   n   t   (   )       {
105 110 116 32  109 97  105 110 116 40  41  32  123 10
                p   r   i   n   t   f   (   "   h   e   l   l   o   w   ,       w   o   r   l   d   \   n   "   )   ;
32  32  32  32  112 114 105 110 116 102 40  34  104 101 108 108 111 119 44  32  119 111 114 108 100 92  110 34  41  59  10
                r   e   t   u   r   n       0   ;
32  32  32  32  114 101 116 117 114 110 32  48  59  10
}
125 10

Damn, I just wrote a PowerShell answer while somehow managing to completely miss this one! Always glad to see posh represented though! :)

PHP, 131 115 bytes
Just a FGITW, maybe I can improve upon it more. Turns out, I can!
First version at 131 bytes:
<?$s=file($argv[1]);foreach($s as$l){$a=str_split(trim($l));echo join(' ',$a).'
';$i=0;while($c=ord($l{$i++}))echo$c.'  ';echo'
';};

The filename is supplied as the first argument after the script name: php aliens.php helloworld.c
Second version at 115 bytes:
function($s){foreach($s as$l){$a=str_split($l);echo join('  ',$a);$i=0;while($c=ord($a[$i++]))echo$c.'  ';echo'
';}};

The first version accounts for missing newlines at the end of the line, but after the additional clarification, we can leave that code out and put everything in a function to save 16 bytes.
The whitespace characters in join('    ',$a) as well as in echo$c.'  ' are tab characters = \t. The newlines in the code are on purpose.

><> (Fish), 48 Bytes
>i:0(?v::oa=?v9o
2';'oa<.20r  <~p3
o9nv?=0l
voa<

A task the language shines at! I'm sure I could probably have golfed out a little bit more, but it's been a long week. Might take a look at it later though.
Try it online!
Alternate try it online that looks nicer in my opinion, but the text wrapping messes up a bit for input with long lines like the test case.

Python 3, 89 77 bytes
more golfed version based on the same idea:
def f(s):
 for a in s:print(*map('{:>4}'.format,[*a,*a.encode()]),end='\n\n')

If there are '\t's in the input, then change the 4 to a 9.
Prior version:
def f(s):
 for l in s:
  print(*l,sep='\t',end='');print(*l.encode(),sep='\t',end='\n\n')

Takes a list of strings, each ending with a '\n'.

protip: you can leave the print statements on the end of the for l in s i.e for l in s:print(*l,sep='\t',end='');print(*l.encode(),sep='\t',end='\n\n')

I haven't tested it, but I think to could take 8 off with lambda s:'\n\n'.join(*map('{:>4}'.format,[*a,*a.encode()])for a in s)

Powershell, 56 Bytes
gc $args|%{($a=[char[]]$_)-join"    ";[int[]]$a+10-join"    "}

Script accepts a filepath as input. Get-Content automatically splits input into an array of strings split on newlines in the source.
From there I enter a foreach, cast to an array of characters and set that to $a, join that with tabs and print it. Next but still within the foreach I cast the character array to an integer array, append a linefeed and join again with a tab.
Call looks like this:
PS C:\PretendFolder> .\aoua.ps1 ".\aoua.txt"

and here is an output sample
#   i   n   c   l   u   d   e       <   s   t   d   i   o   .   h   >
35  105 110 99  108 117 100 101 32  60  115 116 100 105 111 46  104 62  10

10
i   n   t       m   a   i   n   (   )       {
105 110 116 32  109 97  105 110 40  41  32  123 10
                p   r   i   n   t   f   (   "   h   e   l   l   o   ,       w   o   r   l   d   \   n   "   )   ;
32  32  32  32  112 114 105 110 116 102 40  34  104 101 108 108 111 44  32  119 111 114 108 100 92  110 34  41  59  10
                r   e   t   u   r   n       0   ;
32  32  32  32  114 101 116 117 114 110 32  48  59  10
}
125 10

JavaScript (ES6), 94 bytes
s=>s.replace(/(.*)\n?/g,(s,n)=>n&&[...s].join`␉`+`
${[...n].map(c=>c.charCodeAt()).join`␉`}
`)

Where ␉ represents the literal tab character. Works as long as the input doesn't contain tab characters. 81-byte version that also requires the input to have a trailing newline:
s=>s.replace(/.*\n/g,s=>[...s].join`␉`+[...s].map(c=>c.charCodeAt()).join`␉`+`
`)

I think .split().map() may win over .replace(). Once escaped characters optimized with backticks, this should be 85 bytes: s=>s.split('\n').map(c=>(s=[...c]).join('\t')+'\n'+s.map(c=>c.charCodeAt()).join('\t')).join('\n') (Sorry, I've no idea if/how backticks can be included in a comment.)

@Arnauld Doesn't work for (e.g.) a bare newline character. Also, to include backticks in a comment, precede them with a backslash.

C#, 64 63 bytes
s=>{foreach(int c in s+(s=""))s+=c+(10==c?"\n":"    ");return s;};

-1 byte by using actual tab character instead of \t. Note: renders as 4 spaces above and 2 spaces in the ungolfed version below.
Ungolfed:
/*Func<string, string> Lambda =*/ s =>
{
    // Enumerate the ascii (int) values of the chars in s,
    // but at the same time set input s to "" to use at the output var.
    // +(s="")   is 2 bytes less than   var o="";
    foreach (int c in s + (s=""))
        // Append the string representation of the ascii value,
        // Append new line if c was new line, otherwise append tab.
        s += c + (10==c ? "\n" : "  ");
    return s;
};

Results:
(Note: Visual Studio has used \r\n for the new lines when I pasted the input in, hence the 13  10 line endings in output)
Input:

#include <stdio.h>

int maint() {
    printf("hello, world\n");
    return 0;
}

Output:

35  105 110 99  108 117 100 101 32  60  115 116 100 105 111 46  104 62  13  10
13  10
105 110 116 32  109 97  105 110 116 40  41  32  123 13  10
32  32  32  32  112 114 105 110 116 102 40  34  104 101 108 108 111 44  32  119 111 114 108 100 92  110 34  41  59  13  10
32  32  32  32  114 101 116 117 114 110 32  48  59  13  10
125

CJam, 27 bytes
qN/{_1/9c*N+\{is9c}%+}%AN+*

Try it online!
Explanation
q       e# Take the whole input
N/      e# Split on newlines
{       e# Map this block to every line:
_        e# Duplicate
1/       e# Split into characters
9c*      e# Join with tabs (ASCII code 9)
N+       e# Append a newline
\        e# Swap top elements
{is9c}%  e# Map each character to its ASCII code plus a tab character
+        e# Concatenate the two lines
}%      e# (end of block)
AN+*    e# Join with "10" plus a newline

The 1/ and the s are unnecessary.

PowerShell, 61 59 bytes
gc m|%{$b="$_
"[0..$_.Length]
$b-join'    '
[int[]]$b-join' '}

Things to note:

Reads the input from a file named m in the current directory.
All line breaks, (including the one embedded in the string after the first $_) are literal linefeeds only (0xA), so one byte each.
The contents of the strings directly after the -join operators are each a single tab character (regardless of how it's rendered here).

Ungolfed
Get-Content m | ForEach-Object -Process { # Read the file line by line
    $b = "$_`n"[0..$_.Length]   # Line by line processing strips line endings, so add a newline
                                # Index operator on a [string] returns a [char], or given a [range], a [char[]]
                                # Using $_.Length automatically accounts for the extra linebreak (0 based index)
    $b -join "`t"               # PowerShell displays [char] as the printable character by default, so join the array with a tab
    [int[]]$b -join "`t"        # We need to convert the [char]s to an [int]s so we can display it as a number
                                # So cast the [char[]] as [int[]], then join with tab again

}

Your code is printing ascii 13, newline instead of 10, carriage return as in the challenge's output example

@Chirishman PowerShell does support using only ASCII 10 for linebreaks in .ps1 files, but it can be tricky to do so in Windows with most text editors. Using SCiTE or Notepad++ or other line-ending aware editors you can ensure it's using unix endings. Once you're certain the file doesn't contain any 13's, it will print the 10's.

Java, 202 bytes
s->{for(String g : s.split("\n")){g.chars().forEach(c->System.out.print((char)c+"   "));System.out.println();g.chars().forEach(c->System.out.print(c+(c<10?"  ":c<100?"  ":" ")));System.out.println();}};

I can't even be bothered making this shorter..

Haskell - 71 bytes
f q=unlines[(x>>=(++"\t").show.ord)++'\n':intersperse '\t'x|x<-lines q]

Python 3, 92 97 107 bytes

    for i in list(open(input()).read().split("\n")):
        for j in i: print(i+"\n"+ord(j))

p=print
for i in list(open(input()).read().split("\n"))
    s=t=''
    for j in i:
        r=str(ord(j))
        s+=j+' '*len(r)
        t+=r+' '
    p(s)
    p(t)

This is untested, but should work.
Thanks @gowrath for pointing out that the code isn't doing as the question specifies.

Why not? All the input() command is doing there is getting the name of the file to open.

@gowrath oh, ok.

This doesn't overlay the text and ascii outputs as in the question spec; just prints the numbers.

@gowrath thanks, I'll fix that asap.

@sonrad10 Delete until fixed.

source: Stack Exchange

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

sort: votes


text:
Find every digit from the largest column
Here's a relatively simple challenge for you:
Given a list of positive integers:

Line them up in a grid, and sum each column. For example, if the input was [123, 7, 49, 681], the grid would look like this:
 1  2  3
 7
 4  9
 6  8  1

And the sum of each column would be [18, 19, 4]:
 1  2  3
 7
 4  9
 6  8  1
 --------
 18 19 4

Find the maximum of these sums, which in this case would be 19, and then
Output every digit that is at the same index as this maximum column. In this case, that would be
2
9
8

You do not have to output these numbers in any particular order.
Note that there are only three outputs, even though we had 4 inputs. In the case of a tie, pick the earliest index. For example, if the input was [25, 223, 302], your grid is:
2  5
2  2  3
3  0  2
-------
7  7  5

You should output
2
2
3

You can print these numbers in any format you like. List format, newline separated, space separated, etc. You may not take the input as a 2D array of digits, e.g.
[[1, 2, 3],
[7],
[4, 9],
[6, 8, 1]

But other than that, you can take input as a list of strings, a list of digits, or any other reasonable format.
You may also assume that all inputs will be valid and contain at least two numbers.
As usual, the shortest answer in bytes wins!
Test IO:
#Input                      #Output
[1, 11, 111, 1111]      --> [1, 1, 1, 1]
[1, 12, 123]            --> [2, 2]
[987654321, 111]        --> [9, 1]
[111, 123456789]        --> [9]
[4, 8, 15, 16, 23, 42]  --> [4, 8, 1, 1, 2, 4]
[4, 8, 12, 26, 27, 38]  --> [2, 6, 7, 8]
[24, 53]                --> [2, 5]
[12, 304, 506]          --> [4, 6]
[30, 285, 121]          --> [0, 8, 2]

The title is difficult to understand. The problem seems to lie with the expression, "largest column".  Perhaps something like, "Find the column with the greatest total" or "Column addition: find the maximum sum".

The problem statement says "given a list of positive integers", but one of the examples has a 0. Zero is usually not considered positive in english.

@tonhospel Which one? The one with 302? That only has a zero after you split up the columns.

Right, I misintereted the input format. Fixing my submission..

Haskell, 63 bytes
import Data.Lists
argmax sum.transpose.map(map(read.pure).show)

Usage example: argmax sum.transpose.map(map(read.pure).show) $ [12,304,506] -> [4,6].
How it works:
                     map                       -- for each number
                         map(read.pure).show   -- turn into list of digits
           transpose                           -- transpose the list of list
argmax sum                                     -- find the element with the
                                               -- largest sum

Jelly, 6 bytes
DZṚSÞṪ

Try it online!. This is a relatively straightforward implementation of the question.
D              Convert each number in the input to a list of digits, e.g.
               [353, 2247] -> [[3, 5, 3], [2, 2, 4, 7]]
 Z             Zip the lists together, e.g. [[3, 2], [5, 2], [3, 4], [7]]
  Ṛ            Reverse the list of lists so that first occurrences are now
               at the end, e.g. [[7], [3, 4], [5, 2], [3, 2]]
   SÞ          Sort by sum - this uses Python's sorted function, which is stable
               so equal elements end up in order of appearance, e.g.
               [[3, 2], [7], [3, 4], [5, 2]]
     Ṫ         Tail - get the last element, e.g. [5, 2]

Not to detract from your solution, but isn't this actually 11 bytes, given it contains some UTF-8 multi-byte characters.

@Joshua It's a bit weird, but Jelly uses its own custom code page that encodes each of the 256 characters it understands in a single byte. It's not usually scored in UTF-8, much the same way APL wouldn't be.

Ahh, ok. Thanks for the explanation.

Ruby, 100 97 bytes
a=$<.map &:chomp
puts a.map(&:size).max.times.map{|i|a.map{|e|e[i]}.compact}.max_by{|e|eval e*?+}

eval e*?+ is great! Also you can just do $<.map; no need to splat it into an array.

@Jordan Thank you for your advice!

Javascript (ES6), 108 103 100 bytes
It's a bit verbose and could probably be golfed some more with a different approach. I wish I could get rid of this .filter(n=>n).
Saved 5 bytes thanks to Neil
Saved 3 bytes thanks to edc65
l=>l.map(n=>[...n].map((d,x)=>(m=(s[x]=(s[x]|0)-d)<m?s[c=x]:m,d)),s=[m=0]).map(n=>n[c]).filter(n=>n)

Demo

let f =
l=>l.map(n=>[...n].map((d,x)=>(m=(s[x]=(s[x]|0)-d)<m?s[c=x]:m,d)),s=[m=0]).map(n=>n[c]).filter(n=>n)

console.log(f(["1", "11", "111", "1111"]).join`,`);          // --> [1, 1, 1, 1]
console.log(f(["1", "12", "123"]).join`,`);                  // --> [2, 2]
console.log(f(["987654321", "111"]).join`,`);                // --> [9, 1]
console.log(f(["111", "123456789"]).join`,`);                // --> [9]
console.log(f(["4", "8", "15", "16", "23", "42"]).join`,`);  // --> [4, 8, 1, 1, 2, 4]
console.log(f(["4", "8", "12", "26", "27", "38"]).join`,`);  // --> [2, 6, 7, 8]
console.log(f(["24", "53"]).join`,`);                        // --> [2, 5]
console.log(f(["12", "304", "506"]).join`,`);                // --> [4, 6]
console.log(f(["30", "285", "121"]).join`,`);                // --> [0, 8, 2]

If you use (d,x)=>(...,d) then the inner map returns a copy of k, thus saving you having to assign k, which saves you 4 bytes.

I think negating m, i.e. (s[x]=(s[x]|0)-d)<m, saves you a byte.

@Neil - Good eye, as usual ;)

I tried a filter-less approach. It turned out to be... 103 bytes! a=>a.map(n=>[...n+''].map((d,i)=>(t=s[i]=s[i]||[0],t.push(d),(t[0]-=d)<m?r=t:0)),s=[],m=0)&&r.slice(1)

You can get the input as a list of string and not numbers. That way you can cut the +''

Mathematica 82 bytes
This pads the digits of each number with x's to the right, transposes the matrix, removes the dummy x's, orders by sum of the digits and takes the greatest.
SortBy[#~Select~NumberQ&/@Transpose[PadRight[#,30,x]&/@IntegerDigits@#],Tr][[-1]]&

There ought to be some way to use the superscript-T form of Transpose to save a few bytes.

Perl, 49 48 bytes
Includes +1 for -p
Run with the input on STDIN, prints to STDOUT the column numbers prefixed by +
lcolumn.pl
123
7
49
681

lcolumn.pl:
#!/usr/bin/perl -p
s/./@;[@-].="+$&"/eg}{($_)=sort{eval"$b<=>$a"}@

Pyth, 5 8 bytes
esDsMM.T

Takes in input as a list of strings, outputs as a nothing-separated list of digits.
Try it online!
Explanation:
      .T  Transpose input to zip together corresponding columns
   sMM    Cast to digit lists
 sD       sort(D) by (s)um
e         take last element, implicitly print

Hmm, this doesn't seem to work for all testcases? I've tried the last one, and it gives a different output than in OP's question.

@KevinCruijssen Yeah, I messed up. It was sorting by integer value instead because of the strings messing with Pyth's overloading.

Pyth, 11 bytes
h.MsZ.TmjdT

A program that takes input of a list of integers on STDIN and prints a list.
Try it online
How it works
h.MsZ.TmjdT  Program. Input: Q
        j T   Yield the base-10 representation, giving a list of digits
       m d   Map that over Q (implicit input fill)
     .T      Justified transpose, giving each column as a list
 .MsZ        Filter the above by maximum sum
h            First element of above
             Implicitly print

JavaScript (ES6), 90
(l,x)=>[...l+0].map((t,i)=>l.map(n=>(n=n[i])&&(v-=n,t.push(n)),v=t=[])|v>=x||(x=v,r=t))&&r

f=(l,x)=>[...l+0].map((t,i)=>l.map(n=>(n=n[i])&&(v-=n,t.push(n)),v=t=[])|v>=x||(x=v,r=t))&&r

;[
 [[123, 7, 49, 681]       , [2,9,8]]
,[[25, 223, 302]          , [2, 2, 3]]
,[[1, 11, 111, 1111]      , [1, 1, 1, 1]]
,[[1, 12, 123]            , [2, 2]]
,[[987654321, 111]        , [9, 1]]
,[[111, 123456789]        , [9]]
,[[4, 8, 15, 16, 23, 42]  , [4, 8, 1, 1, 2, 4]]
,[[4, 8, 12, 26, 27, 38]  , [2, 6, 7, 8]]
,[[24, 53]                , [2, 5]]
,[[12, 304, 506]          , [4, 6]]
,[[30, 285, 121]          , [0, 8, 2]]]
.forEach(t=>{
  var i=t[0], o=t[1], r, ok
  i=i.map(x=>x+'') // convert i to a string list
  r=f(i)
  ok = (r+'')==(o+'') // compare r and o as comma separated strings
  console.log(ok?'OK':'KO', i+' -> '+ r)

})

Pyth - 9 bytes
esD_.TjRT

Test Suite.

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


text:
Outputting x to y
Challenge
You must choose one number x (y = x + 9) and create ten unique programs which each print out one of the numbers in the range x to y inclusive. However, there are three twists:

Each program's score is the difference between length of your program in bytes and n (where n is the number that the program outputs). i.e. If a program is 12 bytes long and it outputs the number 15, its score is 3 (|15-12| = 3).

You must not use comments to achieve this byte count.

Your program must not contain any number which is contained within the number which the program outputs. i.e. If a program outputs 1659, the program cannot contain 1, 6, 5 or 9
Your program must not contain any of the characters which are the first letters of the number which the program outpts. i.e. If the program outputs 1659, the program cannot contain o, s, f or n (one, six, five and nine)

Rules
If any number is impossible, this is counted as a DNP. You should declare all DNPs in your range.
The following is a list of numbers and their spellings. The disallowed characters for each are highlighted in bold:

0: Zero
1: One
2: Two
3: Three
4: Four
5: Five
6: Six
7: Seven
8: Eight
9: Nine

Scoring
Your overall score is the sum of all your programs' scores.
Winning
The person with the lowest score with the fewest DNPs wins.
In the event of a tie, the person whose last edit was earliest wins.

Do I understand right that I can choose n=1000000 (one million), write programs that output 1000000 to 1000009 without the banned letters or digits, and then pad them to the required length using anything other than comments?

@xnor Unfortunately, yes.

Can we output numbers in base 1, i.e. unary?

@nimi Yes, but only if it's your language's native format. So, Retina can output in unary, but Python cannot

Tie-breaking by lowest x would have been a better idea, but Jelly still manages x = 0 without effort.

@Dennis I disagree with lowest x as that would make it impossible for non-golfing languages to compete (which actually could be competitive here due to the scoring mechanism). Unfortunately we haven't seen any such answers yet, but I feel like they have the potential of being really interesting. Tie-break by first wasn't the best idea either and I'm not sure what would have been a good tie-breaker.

@Dennis I agree with Emigna on that. I have my Python x=40 answer tie with the Jelly x=3/x=2/x=0 answer, and probably most of the answers here. But I would suggest another rule; in the event of a tie, the answer with the latest edit by the OP will win. I might post that on meta.

05AB1E, score = 0
Chosen x = 1
Programs
1: Variable initialized as 1
X

2: zeroth prime number
0Ø

3: first digit of 2^15
žG¬

4: integer root of 16
žvtï

5: first digit of pi + 2
žqS¬Ì

6: first digit of 2nd to last set from the powerset of 256
žzœ¨¤¬

7: the (e // e)th primeth prime
žržr÷ØØ

8: the first 2 digits of the sum of the 10 first multiples of 3, divided by 2
TLx+O¨Y÷

9: ceil(sqrt(sum(range[1..10])))+2 XOR 1st prime
TLOtîÌXØ^

10: int(prod([1..9])/2^15)-1
žmS¨PžG/ï<

brainfuck, score = 0
Chosen x = 15
15
+++[>+++++<-]>.

16
+++[>+++++<-]>+.

17
>+[>-[-<]>>]>+-+.

18
+++[>++++++<-]>+-.

19
+++[>++++++<-]>++-.

20
++++[>+++++<-]>+-+-.

21
+++[>+++++++<-]>++--.

22
+++[>+++++++<-]>+--++.

23
>-[++++[<]>->+]<+++---.

24
+++++[>+++++<-]>++----+.

Output is in byte values.

Jelly, score 0
x=3, using ten completely different methods
2ÆN          -  3: second prime
6ḃ2S         -  4: sum of digits of 6 in bijective-base 2
2*4BL        -  5: number of bits in 16
2+1R+/       -  6: third triangle number
⁵×ØeḞDṪ      -  7: 1st decimal place of Euler's number
12,6_/+2     -  8: Number of vertices on a cube
ȷ*4×ØPḞDṪ    -  9: the 12th decimal place of pi
9999b9999Ḍ   - 10: decimal of 9999 base 9999
45683g38654  - 11: greatest common divisor of 45683 and its reverse
6RLRL×7RLÆfS - 12: sum of the prime factors of 42 (6*7 is the ultimate question)

Run all ten at TryItOnline

Previous (just another boring answer)
x=2
1‘          - 1 incremented            1+1 =  2
1‘‘         - 1 incremented twice    1+1+1 =  3
1‘‘‘        - 1 incremented thrice 1+1+1+1 =  4
1‘‘‘‘       -                ... 1+1+1+1+1 =  5
1‘‘‘‘‘      -              ... 1+1+1+1+1+1 =  6
1‘‘‘‘‘‘     -            ... 1+1+1+1+1+1+1 =  7
1‘‘‘‘‘‘‘    -          ... 1+1+1+1+1+1+1+1 =  8
1‘‘‘‘‘‘‘    -        ... 1+1+1+1+1+1+1+1+1 =  9
3‘‘‘‘‘‘‘‘’  - 3 incremented eight times then decremented
                       3+1+1+1+1+1+1+1+1-1 = 10
3‘‘‘‘‘‘‘‘‘’ - 3 incremented nine times then decremented
                     3+1+1+1+1+1+1+1+1+1-1 = 11

If tie-break is on lowest x then for x=0
          - 0: empty program returns zero
¬         - 1: logical not
¬‘        - 2: logical not then increment
¬‘‘       - 3: logical not then increment twice
¬‘‘‘      - 4: logical not then increment thrice
¬‘‘‘‘     - 5: logical not then increment four times
¬‘‘‘‘‘    - 6: logical not then increment five times
¬‘‘‘‘‘‘   - 7: logical not then increment six times
¬‘‘‘‘‘‘‘  - 8: logical not then increment seven times
¬‘‘‘‘‘‘‘‘ - 9: logical not then increment eight times

Run all ten at TryItOnline

Nice ones! It was answers like these I was hoping to see more of on this challenge.

+1 for going the extra mile and making interesting answers :)

@Emigna yeah, I think the idea of "unique" probably should have been specified somehow as being essentially different (although I'm not quite sure how - I have used the same operators and literals in multiple programs. banning that would make for an interesting twist, although it would exclude some languages)

For x=0, you can also do Unary (using ‘ instead of ¬).

Python 2, score 0
x = 14
print +2*3+3+5
print 6+2*3+3+0
print 7+2*3+3+00
print 6+2*3+5+0+0
print-~6+2*3+5+0+0
exec"pri\x6et 22-3"
exec"prin\164 9+8+3"
exec"prin\x74 9+9+03"
exec"prin\164-~9+8+04"
exec"prin\164-~9-~8+04"

Emotinomicon, 205 bytes
x = 16

71 ⏬⏬
81 ⏬ ⏬
91⏪⏬⏩
02⏬⏬ ℹ
 12⏬⏬ ℹ
22⏪⏬⏬⏩
32 ⏪⏬⏬⏩
42⏬⏬
ℹℹ➕

Pro tip: Prepend a  before each snippet to clean the output.

Pyke, x=2, score 0
1h
1hh
1hhh
1hhhh
1hhhhh
1hhhhhh
1hhhhhhh
1hhhhhhhh
ZOhhhhhhhh
ZOhhhhhhhhh

Pyth, x=2, score 0
h1
hh1
hhh1
hhhh1
hhhhh1
hhhhhh1
hhhhhhh1
hhhhhhhh1
hhhhhhyyld
hhhhhhhyyld

Mathematica, x = 4, score 0
3+1&
4+01&
5+001&
6+0001&
7+00001&
8+000001&
8+2+22-22&
9+00000002&
9+000000003&
9+0000000004&

Anonymous functions. Take no input and return numbers as output.

PHP 7 , x=4,score=0
2+2;
11-6;
18-12;
3+2**2;
2+2+2+2;
3+2**2+2;
2+2+2+2+2;
3+2**2+2+2;
3*3+3+6-3-3;
4**2-5+2+0*2;

http://php.net/manual/de/features.commandline.usage.php No I don't forget it. You are right the ** operator belongs to PHP 5.6 but I am was not sure if this feature is new in PHP 7.

It must be something like http://php.net/manual/en/features.commandline.interactive.php . I use the right side on https://repl.it/languages/php . I found http://david.acz.org/phpa/ but this plugin does not exactly make it

Ah I see, you're using a REPL. I think you should tag your language then as something like PHP/REPL or REPL/PHP. Here's a discussion on meta about it.

Ru, score = 0
x = 2
’1
’’1
’’’1
’’’’1
’’’’’1
’’’’’’1
’’’’’’’1
’’’’’’’’1
→’’’’’’’’2
→’’’’’’’’’2

dc, x = 5, score 0
# Note: in dc all numbers typed in use the input radix. By default it is 10, which
#means that a number like CF is not 207, but 12*10^1 + 15*10^0 = 135.

CCDap              # 5   print character with the ASCII code  (1333 % 256 =) 53
CCEadp             # 6   print character with the ASCII code  (1334 % 256 =) 54
CCFaddp            # 7   print character with the ASCII code  (1335 % 256 =) 55
ACBAaddp           # 8   print character with the ASCII code (11320 % 256 =) 56
ACBBadddp          # 9   print character with the ASCII code (11321 % 256 =) 57
Addddddddp         #10   print 10 (A)
Bdddddddddp        #11   print 11 (B)
Cddddddddddp       #12   print 12 (C)
Ddddddddddddp      #13   print 13 (D)
Eddddddddddddp     #14   print 14 (E)

Comments were added for a better understanding. All the above 10 programs are standalone, but you could have a bonus program that prints all the numbers from 5 to 14, by copy-pasting each code into one single file.


text:
Convert to Bibi-binary
Bibi-binary is a numeric system invented by Boby Lapointe in order to represent numbers in letters which pronunciation seems funny.
Your task is to convert decimal numbers into Bibi-binary!
Conversion
A number is converted to base 16 (hexadecimal) and each character is replaced by its Bibi-binary name:
0 = HO
1 = HA
2 = HE
3 = HI
4 = BO
5 = BA
6 = BE
7 = BI
8 = KO
9 = KA
A = KE
B = KI
C = DO
D = DA
E = DE
F = DI

Let N be a positive integer (between 1 -> 2^31-1).
For every character in the hexadecimal representation of N, replace the character by its according Bibi-binary pair (the table above contains all the pairs).
Example

N = 156
H = (hexadecimal representation of N) --> 9C
9 --> KA, C --> DO

Thus the output is KADO.
Input & output
You will receive an positive 32-bit integer N, which you will have to turn into Bibi-binary.
You may (return, print, etc...) in any convenient format, but the pairs have to be connected! So KA DO wouldn't be okay, but KADO would.
Both, lowercase and uppercase are allowed.
Rules

No loopholes.
This is code-golf, so the shortest code wins.

Testcases
2048 -> KOHOHO
156 -> KADO
10000 -> HEBIHAHO
12 -> DO

The spec seems to say that the input will be non-negative in one section and positive in another - could you please clarify which one is intended?

@Sp3000 positive is intended. I'll edit that in, thanks!

Your spec still says between 0 -> 2^31-1, but 0 isn't positive (in English).

@Dennis I treated 0 as positive. I'll edit that out. Thanks for the mention!

@TuukkaX 0 is precisely the distinction between positive and non-negative.

05AB1E, 20 18 16 bytes
hv…Ã‚kdžM¨ÁâyHèJ

Explanation
h                     # convert input to hex
 v                    # for each
  …Ã‚kd               # string of the possible first Bibi-binary letters
       žM¨Á           # string of the possible second Bibi-binary letters
           â          # cartesian product to produce list of Bibi-binary pairs
            yH        # convert hex char to base 10
              è       # use this to index into the list
               J      # join

Try it online!
Saved 2 bytes thanks to Adnan

…Ã‚kd is a compressed version of "hbkd" :).

Also, I'm not sure if it's possible but H also converts a hexadecimal number to base 10.

Python 2, 58 bytes
f=lambda n:(n>15and f(n/16)or"")+"HBKD"[n/4%4]+"OAEI"[n%4]

A recursive solution. Try it on Ideone.

f=lambda n:n*'_'and f(n/16)+"HBKD"[n/4%4]+"OAEI"[n%4] saves 5 bytes.

I undeleted my comment. The OP clarified and input 0 is invalid.

Python 2, 81 76 bytes
lambda n:''.join('HBKD'[int(x,16)/4]+'OAEI'[int(x,16)%4]for x in hex(n)[2:])

Chooses the bibi-digit to represent each hex digit based on the patterns in the bibi-digits.

Javascript (ES6), 58 53 43 bytes
f=n=>n?f(n>>4)+'HBKD'[n/4&3]+'OAEI'[n&3]:''

Saved 10 bytes (no support for n = 0 anymore)
Demo

var f=n=>n?f(n>>4)+'HBKD'[n/4&3]+'OAEI'[n&3]:''

console.log(f(2048));   // -> KOHOHO
console.log(f(156));    // -> KADO
console.log(f(10000));  // -> HEBIHAHO
console.log(f(12));     // -> DO

Can you shorten this now that zero is no longer a requirement?

Jelly, 17 bytes
b⁴d4ị"€“BKDH“AEIO

Try it online! or verify all test cases.
How it works
b⁴d4ị"€“BKDH“AEIO  Main link. Argument: n

b⁴                 Convert n to base 16.
  d4               Divmod 4; map each base-16 digit k to [k / 4, k % 4].
       “BKDH“AEIO  Yield ["BKDH", "AEIO"].
      €            For each quotient-remainder pair [q, r]:
    ị"               Yield "BKDH"[q] and "AEIO"[r] (1-based indexing).

Pyth, 28 bytes
L+?>b15y/b16k@*"HBKD""OAEI"b

Defines a function y. Basically the same algorithm as my Python answer.
Explanation:
L                            # Define a function, y, with an argument, b.
  ?>b15                      # If b > 15, then:
       y/b16                 # Call y with b / 16, else:
            k                # The empty string.
 +                           # Append with
              *"HBKD""OAEI"  # The Cartesian product of "HBKD" and "OAEI". Gives all the letter pairs in order
             @             b # Get the b'th number from that list. Because @ in Pyth is modular, we don't need to take b % 16.

Try it here! (The extra two chars at the end is just to call the function)

Ruby, 55 51 bytes
A recursive anonymous function:
f=->i{(i>15?f[i/16]:'')+'HBKD'[i%16/4]+'OAEI'[i%4]}

Call it for example with f[156] and it returns "KADO"

PHP ,63 Bytes

contribution by @Titus Thank You
for($n=$argv[1];$n;$n>>=4)$r=HBKD[$n/4&3].OAEI[$n&3].$r;echo$r;

72 Bytes works also with zero
do$r=OAEIHBKD[$t*4+($n=&$argv[1])%4].$r;while(($t=!$t)|$n=$n>>2);echo$r;

76 Bytes alternative Version
for($i=2*strlen(dechex($n=$argv[1]));$i;)echo HBKDOAEI[$i%2*4+$n/4**--$i%4];

Try this one: for($n=$argv[1];$n;$n>>=2)$r=HBKDOAEI[$n%4+4*$t=!$t].$r;echo$r;

Also: You forgot to golf the curlys from your first version.

for($n=$argv[1];$n;$n>>=4)$r=HBKD[$n/4&3].OAEI[$n&3].$r;echo$r; for also 63 bytes or a port of Arnauld´s answer for 61: function f($n){return$n?f($n>>4).HBKD[$n/4&3].OAEI[$n&3]:'';}

@Titus your first version works not correctly by an input of 1 or 16. Nice I have not realize that zero as input is not longer allowed

yup, just noticed. it doesnt print the H in first place. Take the second one.

J, 35 33 bytes
[:,(,/'HBKD',"0/'OAEI'){~16#.inv]

Generates the table of bibi-binary values for integers [0, 16), then converts the input n to a list of base 16 digits and selects the corresponding bibi-binary name for each hex digit.
Saved 2 bytes thanks to @randomra.
Usage
   ,/'HBKD',"0/'OAEI'
HO
HA
HE
HI
BO
BA
BE
BI
KO
KA
KE
KI
DO
DA
DE
DI

This part generates a 16 x 2 array of characters for the bibi-binary name of each hex digit.
   f =: [:,(,/'HBKD',."0 1'OAEI'){~16#.inv]
   f 156
KADO
   f 2048
KOHOHO

Explanation
,/'HBKD',"0/'OAEI'
  'HBKD'    'OAEI'  Constant char arrays
        ,"0/        Form the table of joining each char with the other
,/                  Join the rows of that table

[:,(,/'HBKD',."0 1'OAEI'){~16#.inv]  Input: n
                                  ]  Identity function, get n
                           16#.inv   Performs the inverse of converting an array of
                                     hex digits meaning it converts a value to a list of
                                     hex digits
   (,/'HBKD',."0 1'OAEI')            Create the bibi-binary names of each hex digit
                         {~          For each hex digit, select its bibi-binary name
[:,                                  Join the names to form a single string and return

'HBKDOAEI'{~[:(+0 4$~$)4#.inv]

Perl, 52 51 bytes
Includes +1 for -p
Run with the number on STDIN
bibi.pl <<< 156

bibi.pl:
#!/usr/bin/perl -p
1while$\=(<{H,B,K,D}{O,A,E,I}>)[$_%16].$\,$_>>=4}{

Ruby, 85 83 bytes
->x{x.to_s(16).chars.map{|d|"HOHAHEHIBOBABEBIKOKAKEKIDODADEDI"[2*d.to_i(16),2]}*''}

Just a quick and simple solution without encoding the string.

Pyth, 21 bytes
sm@*"HBKD""OAEI"djQ16

A program that takes input of an integer from STDIN and prints the result.
Try it online
How it works
sm@*"HBKD""OAEI"djQ16  Program. Input: Q
                 jQ16  Yield decimal digits of the base-16 representation of Q as a list
    "HBKD"              Possible first letters
          "OAEI"        Possible second letters
   *                    Cartesian product of those two strings
  @                     Index into the above
 m              d      Map that across the digits list
s                      Concatenate
                       Implicitly print

PHP, 93 bytes
$a=HBKDOAEI;$h=dechex($argv[1]);while($h{$i}!=''|$c=hexdec($h{$i++}))echo$a{$c/4}.$a{4+$c%4};

This basically leverages the integrated hexadecimal functions and a little trick in the while statement to save on curly braces.

Dyalog APL, 19 bytes
Requires ⎕IO←0 which is default on many systems.
∊(,'HBKD'∘.,'OAEI')[16⊥⍣¯1⊢⎕]

∊ enlist (make completely flat)
(...
 , the raveled
 'HBKD'∘.,'OAEI' concatenation table (i.e. all combos)
)[ indexed by...
 16⊥⍣¯1 the inverse of base-16 to base 10 (i.e. base-10 to base 16) representation
 ⊢ of
 ⎕ the numeric input
]
TryAPL online!

CJam, 20 bytes
qiGb"HBKD""OAEI"m*f=

Try it online! (As a linefeed-separated test suite.)
Explanation
qi      e# Read input and convert to integer.
Gb      e# Get hexadecimal digits.
"HBKD"  e# Push this string.
"OAEI"  e# Push this string.
m*      e# Cartesian product, yields ["HO" "HA" "HE" "HI" "BO" ... "DE" "DI"].
f=      e# For each digit, select the corresponding syllable.

Java, 224 bytes
class N{public static void main(String[]a){String x="0HO1HA2HE3HI4BO5BA6BE7BI8KO9KAaKEbKIcDOdDAeDEfDI";for(int c:Long.toHexString(Long.valueOf(a[0])).toCharArray()){c=x.indexOf(c)+1;System.out.print(x.substring(c++,++c));}}}

Using some lookup table trickery
Usage of Long type was to shave off a few bytes compared to Integer

Lua, 196 Bytes
function(n)s=""t={"H","B","K","D"}p={"O","A","E","I"}while n>0 do s=n%4 ..s n=math.floor(n/4)end s=("0"):rep(#s%2)..s o=nil return s:gsub(".",function(s)o=not o return o and t[s+1]or p[s+1]end)end

Lua is annoying for this sort of a task, as it doesn't per default contain a hex or binary conversion method. Most of the flesh is converting it to base 4. After that we force a 0 behind it if we need to using s=("0"):rep(#s%2), then we using gsub replace all the didgets with with their BIBI counterpart.

K (ngn/k), 30 27 bytes
,/(,/"HBKD",/:\:"OAEI")@16\

Try it online!
Quite similar to the J solution by @miles and the APL solution by @adám.

Japt, 13 bytes
s"HBKD"ï"OAEI

Try it
Or, with string compression:
s`baki`ó rï

Try it

what is this sorcery

Just a straightforward custom base conversion, @Razetime.

Haskell, 76 bytes
(until(\x->x<="HO"||x>="HP")(drop 2)`map`mapM id([1..8]>>["HBKD","OAEI"])!!)

Try it online!
Since the input is guaranteed to fit in 32 bits, we can generate a list of all \$16^8 = 2^{32}\$ strings and index into it, after removing HO (zeroes) from the start.
(Haskell's Prelude has no good tools for base conversion, but Cartesian products are real easy with mapM.)
To strip superfluous HOs from the start of each string, we drop 2 characters from the front until the string either equals HO (0), or does not start with HO.
The obvious way to write this is x=="HO"||take 2x/="HO", but x<="HO"||x>="HP" is a little shorter.

Since the challenge says that the input is positive, it looks like you don't have to special-case 0.

Hmm, I'll leave it as is, because some of the other answers go out of their way to handle 0, and it seemed to have been unclear at some point in the history of the challenge looking at the comment; and I like my <= >= trick better than I like saving some bytes with until((/="HO").take 2)

Here's a way to handle the HO-removal by defining it as a separate function: TIO It may be possible to shorten the first line here, perhaps by reordering it to avoid the map. Though now that I think about it, it might be best to just calculate how many characters to drop from the size-16 string based on n, without looking at the resulting string.

Haskell, 50 bytes
(l!!)
l=[]:tail[x++[a,b]|x<-l,a<-"HBKD",b<-"OAEI"]

Try it online!
Recursively defines the infinite list l of all encoded numbers starting from 0.

Haskell, 54 bytes
f n=mapM id([1|i<-[0..8],16^i<=n]>>["HBKD","OAEI"])!!n

Try it online!
Based off of Lynn's solution. The new idea is to avoid leading "zeroes" (HO's) by predicting the number of digits in advance and only generating that many copies for mapM. A number has one digit in base 16 for each number in 1,16,256,4096,... that is no greater than it. This gives the empty string for zero, but we could change it to HO like this:
56 bytes
f n=mapM id(0:[1|i<-[1..8],16^i<=n]>>["HBKD","OAEI"])!!n

Try it online!
A variant where we compute the number of digits directly:
60 bytes
f n=mapM id([0..until(\i->16^i>n)(+1)0]>>["HBKD","OAEI"])!!n

Try it online!

Haskell, 54 bytes
f 0=""
f n=f(div n 16)++mapM id[cycle"HBKD","OAEI"]!!n

Try it online!

Chip, 174 bytes
 z---.
!+ZZZ^~s
Axxx])~-vv/c
Ex]xx' ,x]/b
Bxxx])~^}~/d
Fx]xx'g*-}^a
Cxx])v]--/c
G]xx'>x~v/d
Dxx])x+-]/a
H]xx'`}--/b
 )x)-----'
Axx].zv~S
Bxx]+^'
Cxx]<
Dxx]<
E]v-'
F]<
G]<
H]'

Try it online! TIO includes a Bash wrapper that converts an integer string to an actual 32-bit integer value.
The top half prints out the letters corresponding to the binary data, once the bottom half has detected that we've reached the interesting data (in other words, we skip leading zeroes. To print all leading zeroes, remove the second line that starts with A and down.

C (gcc), 206 bytes
#include<stdio.h>
#include<unistd.h>
int main(){int a=0;char c;while(read(0,&c,1)){a*=10;a+=c-'0';}c=8;while(c--)if(a&15<<c*4)break;if(c!=7)c++;while(c--)printf("%c%c","HBKD"[a>>c*4+2&3],"OAEI"[a>>c*4&3]);}

Uses as requested input, no check done on read return.
int a=0;char c;                                                                                // declares accumilator and input char
               while(read(0,&c,1)){a*=10;a+=c-'0';}                                                                                // read input in accumulator
                                                   c=8;while(c--)if(a&15<<c*4)break;if(c!=7)c++;                                                              // goto first not null byte
                                                                                while(c--)printf("%c%c",                                      // print for each byte
                                                                                "HBKD"[a>>c*4+2&3],                   // fetching right consonant
                                                                                "OAEI"[a>>c*4&3]); // fetching right vowel

Try it online!

Hi ceilingcat, what a good idea, I'll integrate it soon ;-)

137 bytes

Husk, 20 bytes
ṁ!ṙ1*"HBKD""OAEI"B16

Try it online!
Similiar to the APL answer.
Husk, 22 bytes
ṁz!e"BKDH""AEIO"m‰4B16

Try it online!
Idea from Dennis' answer.

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


text:
The Letter E with E
Your task is to display the below letter "E" shaped ASCII art, given five inputs.
Examples:
Input: 7,2,+,|,- (Note: You don't have to follow this exact input format, and if you don't use it, then you must explain how your own input format works)
Explanation:

7 total width, including the left and right edge characters.
2 Number of vertical characters.
+ The character that should display at the edges.
| The character that should display vertically between the edges.
- The character that should display horizontally.

Output of the above example:
+-----+
|
|
+-----+
|
|
+-----+

Other examples:
Input: 7,2,@,|,-
Output:
@-----@
|
|
@-----@
|
|
@-----@

Input: 7,2,+,|,#
Output:
+#####+
|
|
+#####+
|
|
+#####+

Input: 8,3,+,|,#
Output:
+######+
|
|
|
+######+
|
|
|
+######+

Input: 8,3,+,@,#
Output:
+######+
@
@
@
+######+
@
@
@
+######+

Input: 9,4,^,$,!
Output:
^!!!!!!!^
$
$
$
$
^!!!!!!!^
$
$
$
$
^!!!!!!!^

Cheating and standard loopholes are not allowed.
Your code must not print anything to STDERR.
Your code may accept any character encoding you choose as the input, but any character encoding you choose must, as a minimum, support all the 95 printable ASCII characters.
The shortest code, in bytes, that completes this challenge successfully, is the winning code.
Leaderboard

var QUESTION_ID=92138,OVERRIDE_USER=58717;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

I dislike the special case of 'no input given'. In my opinion, it doesn't add anything to the challenge and complicates a lot for nothing.

Is the title because you could give E as an input, and make an E with Es?

Despite that I dislike it, what does the 'no input' really mean? My Floroid solution will just hang for the rest of eternity if you don't pass input. For my solution to be competing, you'd have to pass 5 zeroes and I would have to check whether the inputs are zeroes and treat accordingly...? -1.

@TheBitByte See my second comment to see what I think is really wrong with it. Now that you edited that out, +1.

@TuukkaX: "No input" means when your process attempts to read from stdin, it gets an empty string.  On any sensible operating system, this will happen immediately, and not hang the process.

@Kevin Yup. I was just having a little confusion with interpretation of 'no input'. Empty string is not equal to 'no input' in my mind. And I was so used to run the code inside an interpreter, on which I literally wait for the input to be fed, so that's why I threw that out there.

Do we need to include the corners on the input or not?

@TheBitByte Please add that to the question, thanks.

Your first example is incorrect.

Is a trailing new line allowed?

05AB1E, 16 14 bytes
Í×s.ø©|`×`»D®»

Explanation
Í×                  # create a string of the correct nr of horizontal chars
  s.ø               # add the corner char on both sides
     ©              # save in register while keeping it on the stack
      |`            # push the remaining inputs to the top of the stack
        ×`          # push the correct nr of vertical chars on the stack
          »         # join on newline (joining the top vertical and horizontal sections)
           D        # duplicate this
            ®       # push the horizontal part again
             »      # join everything on newline

Try it online!
Saved 4 bytes thanks to Adnan.

Out of curiosity, why are you using the © register :p?

@Adnan: Good catch! I was going to, but ended up not using it and forgot to remove it :)

@muddyfish: Reading the explanation from the question that part wasn't obvious, so I missed it. Thanks for letting me know!

There's also a special surround command which works here: Í×s.øU×S»X»D»Xr».

@Adnan: Right you are. Good thinking! I've never used that before :)

Okay, after some puzzling, I think this also works :p Í×s.ø©|`×`»D®».

@Adnan: Brilliant use of |! Never though of that.

Python, 53 51 55 Bytes
lambda a,b,c,d,e:d.join("\n"*-~b).join([c+e*(a-2)+c]*3)

+4 Bytes thanks to @nimi
anonymous lambda function, to call it, write f= before it. Example:
>>> print f(4,1,"€","|","-")
€--€
|
€--€
|
€--€

alternative, 53 Bytes
lambda a,b,c,d,e:((c+e*a+c+"\n"+(d+"\n")*b)*3)[:-b*2]

old version with the special case of no input, 69 65 63 Bytes
yay to changing the requirements mid-challenge...
lambda a=1,b=1,(c,d,e)="+|-":d.join("\n"*-~b).join([c+e*a+c]*3)

Small bug: the first argument (2 in your example) is the total length of the line, including the corners, so the right input for your shape is f(4,1 ...).

@nimi thanks for the tip. (+4 bytes :( ) OPs first example is a bit confusing. (Some of the other answers have this bug aswell)

C, 167 161 159 bytes
Yeah.
#define p putchar
i,j;g(a,c,e){p(c);for(i=2;i++<a;)p(e);p(c);p(10);}h(b,d){for(i=0;i++ p('\n') ? or even p(10) if that'll work

How did I miss that! Thanks, @RiaD.

Also if you start loop with 2, you will save to more bytes

Javascript (ES6), 64 bytes
(h,v,e,V,H)=>(v=(h=e+H.repeat(h-2)+e)+`
${V}`.repeat(v)+`
`)+v+h

Example

let f =
(h,v,e,V,H)=>(v=(h=e+H.repeat(h-2)+e)+`
${V}`.repeat(v)+`
`)+v+h

console.log(f(8,3,'+','@','#'))

Does this handle the special case of no input?

{   "message": "Script error.",   "filename": "",   "lineno": 0,   "colno": 0 } when run inline.

@AgentCrazyPython - Run on IE? It has no support for .repeat()

@Arnauld naw, safari

oh, it's ES6...

@AgentCrazyPython Runs for me just fine.

Ruby, 54 45 42 bytes
->x,y,c,v,h{[c+h*~-~-x+c+$/]*3*((v+$/)*y)}

It's an anonymous function that takes the different part of the input as separate parameters and returns the result as a complete string.
For example,
f=->x,y,c,v,h{[c+h*~-~-x+c+$/]*3*((v+$/)*y)}
puts f[6, 2, 'Ø', 'V', '>']

prints
Ø>>>>Ø
V
V
Ø>>>>Ø
V
V
Ø>>>>Ø

Pyke, 16 15 bytes
*2mtz:zn+Q*' +D

Try it here!

V, 18 bytes
älJxxÀPjddÀpkäGYGp

Try it online!

R, 80 bytes
Pretty repetitive :
function(h,v,a,b,c)cat(t<-c(a,rep(c,h),a,"\n"),d<-rep(c(b,"\n"),v),t,d,t,sep="")

Ungolfed :
function(h,v,a,b,c)

cat(t<-c(a,rep(c,h),a,"\n"),
    d<-rep(c(b,"\n"),v),
    t,d,t,
    sep="")

Perl, 40 + 1 (-n) = 41 bytes
Thanks to @Ton Hospel for saving 14 bytes and allowing the program to work with entry greater than 10.
/.$/;$,=$/.<>x<>;say+($`.$&x(<>-2).$`)x3

Need -n as well as -E (or -M5.010) to run.
For instance :
perl -nE '/.$/;$,=$/.<>x<>;say+($`.$&x(<>-2).$`)x3' <<< '^$
!
4
9'

@TheBitByte Ok great, it's done, thanks.

This is already very good. But you can play a bit with the input format and also solve the flaw that the challenge does not say the repeats are < 10 by putting /(.)(.)/;$,=$' x<>;say+($1.$2x(<>-2).$1.$/)x3 in a file (since it uses $') and calling with perl -M5.010 -n prog.pl <<< '^!S\n4\n9' (use real newlines) which counts as 48 bytes (2 extra handicap since it cannot be combined with -e)

@TonHospel Thanks. Right, I had not even noticed that this wouldn't work with numbers >10.. Great work with the input format, thanks.

This is getting close to abusing the freedom to select the input format, but: perl -nE '/.$/;$,=$/.<>x<>;say+($`.$&x(<>-2).$`)x3' <<< '^$\n!\n4\n9' is 41 bytes (no more $') and also gets rid of the spurious trailing newline

@TonHospel Indeed, I came up with that solution after your first suggestion, but I wasn't too comfortable with it because of the input format... Since we both thought about it, I changed my answer, but still, I feel like it's a bit cheaty...

MATL, 15 bytes
Thanks to @muddyfish for a correction
2-Y"yv!iiY"!yyy

Try it online!
Explanation
The stack contents after each step are indicated for clarity, using the first example in the challenge.
2-    % Implicitly input number of repetitions of the char of the horizontal line.
      % Subtract 2
      %   STACK: 5
Y"    % Implicitly input char of the horizontal line. Apply run-length decoding
      %   STACK: '-----' (string)
y     % Implicitly input (from below) the char of the corners. Duplicate onto the top
      %   STACK: '+', '-----', '+'
v!    % Concatenate all the stack horizontally. We now have the horizontal line
      % including the corners
      %   STACK: '+-----+'
iiY"  % Take two inputs: char of the vertical line and number of repetitions
      %   STACK: '+-----+', '||'
!     % Transpose. This tranforms the string into a vertical char array, which
      % gives the vertical line
      %   STACK: '+-----+', ['|';'|'] (vertical char array)
y     % Duplicate from below: this pushes a new copy of the horizontal line
      % onto the top of the stack
      %   STACK: '+-----+', ['|';'|'], '+-----+'
y     % Duplicate from below: this pushes a new copy of the vertical line
      % onto the top of the stack
      %   STACK: '+-----+', ['|';'|'], '+-----+', ['|';'|'],
y     % Duplicate from below: this pushes a new copy of the horizontal line
      % onto the top of the stack
      %   STACK: '+-----+', ['|';'|'], '+-----+', ['|';'|'], '+-----+'
      % Implicitly display

Dyalog APL, 31 29 bytes
Prompts for horizontal-character, width, junction-character, height, vertical-character – in that order.
h↓⊃⍪/3/⊂↑(⍞⍴⍨h←⎕),⊂⍞{∊⍺⍵⍺}⎕⍴⍞

⎕⍴⍞ input-horizontal-character and repeat input-width times (⍵ below)
⍞{...} input-junction-character which will be ⍺ in the function...
 ∊⍺⍵⍺ flatten [[junction],[horizontals],[junction]]
⊂ encapsulate so it can be part of a list
(...), prepend...
 h←⎕ input-height
 ⍞⍴⍨ input-vertical-character and repeat it that many times
↑ make the list of strings into a character table
⊂ encapsulate (so it can be repeated as a whole)
3/ repeat it three times
╻  ╻  ╻
┗━ ┗━ ┗━

⍪/ concatenate the three pieces vertically
╻
┣━
┣━
┗━

(this encapsulates them too, so we need to...)
⊃ remove the encapsulation
h↓ drop the first h (rows)
┏━
┣━
┗━

TryAPL online!

Pyth, 19 bytes
jP*3,++Jw*-E2wJj*Ew

A program that takes newline-separated input on STDIN of the corner character, number of horizontal characters, horizontal character, number of vertical characters and the vertical character, and prints the result.
Try it online
How it works
jP*3,++Jw*-E2wJj*Ew  Program.
       Jw            Get the corner character. Store in J
           E         Get the number of horizontal characters
          - 2        -2
         *   w       Get the horizontal character and repeat it that many times
      +              Add J at the beginning of that
     +         J     and at the end
                 E   Get the number of vertical characters
                * w  Get the vertical character and repeat it that many times
               j     Join the above on newlines
    ,                Construct a 2-element list from the horizontal and vertical strings
  *3                 Repeat it 3 times
 P                   Everything except the last element
j                    Join the above on newlines
                     Implicitly print

MATLAB, 95 92 91 85 81 bytes
MATLAB 'E' function. (edit: doesn't work on Octave)
function a=e(n,m,c,h,v);a(1:n)=h;a=[c a c];a(2:m+1,1)=v;a=[a;a;a];a=a(1:3+2*m,:);

And ungolfed:
function a=e(n,m,c,h,v); %Declare the function
a(1:n)=h;                %Initialise return with top line excluding the corners
a=[c a c];               %Then add corner pieces
a(2:m+1,1)=v;            %Next add the first vertical part
a=[a;a;a];               %Repeat three times vertically to get an E with a tail
a=a(1:3+2*m,:);          %And then lop off the tail

The function should be called like:
e(5,2,'*','-','|')

Which will return:
+-----+
|
|
+-----+
|
|
+-----+

This can probably be simplified a bit, I'll keep working on it. I don't like having the entire function declaration to get the input, so will see if I can improve that.

Saved 3 bytes by simplifying generation of first line to first make the line without corners and then add the corners as this reduces the number of times indexing is required.

Another byte saved by starting with the first corner.

6 more bytes by replacing repmat(a,3,1) call with [a;a;a].

Saved 4 bytes by using a without specific initialisation (it's already declared in the function declaration) - thanks @LuisMendo

@LuisMendo interesting. I originally had a=[c a c] in there but removed it to shrink things down as normally you can't index access a non-existent variable and create it in the process. I forgot that this was a function so a is already declared in the function declaration as the return value. Thanks :)

In fact you can do it even if not in a function - indexing a non-existent variable does create it. Learn new things every day.

Java 7, 205 129 bytes
String c(int w,int h,String a,char b,char c){String r=a,n="\n",l="";for(;w-->2;r+=c);r+=a+n;for(;h-->0;l+=b+n);return r+l+r+l+r;}

-76 bytes thanks to an anonymous stranger.
PS: Don't go edit other people's posts next time. If you have something to golf please leave it as a comment, or if it's using a completely different approach you could make your own answer. Still thanks for golfing away all these bytes, though - whoever you are..
Ungolfed & test cases:
Try it here.
class M {
    static String c(int w, int h, String a, char b, char c){
        String r = a,
               n = "\n",
               l = "";
        for(; w-- > 2; r += c);
        r += a+n;
        for( ;h-- > 0; l += b+n);
        return r+l+r+l+r;
    }

    public static void main(String[] a) {
        System.out.print(c(7, 2, "+", '|', '-'));
        System.out.print(c(9, 4, "?", '¡', '¿'));
    }
}

Output:
+-----+
|
|
+-----+
|
|
+-----+

?¿¿¿¿¿¿¿?
¡
¡
¡
¡
?¿¿¿¿¿¿¿?
¡
¡
¡
¡
?¿¿¿¿¿¿¿?

C, 130 bytes
#define p putchar
#define E for(o=0;o++<O;p(10))p(S);
#define W for(p(P),D=0;D++<C-2;)p(_);p(P);p(10);
f(C,O,P,S,_,D,o){W E W E W}

Usage:
main(){f(7,2,'+','|','-');}

Output
+-----+
|
|
+-----+
|
|
+-----+

Removing the semicolons in defines and adding it as f(C,O,P,S,_,D,o){W;E;W;E;W;} saves a byte.

C#, 108 bytes
(m,n,e,v,h)=>{string x=e+new string(h,m-2)+e+"\n",y=new string(v,n).Replace(v+"",v+"\n");return x+y+x+y+x;};

Anonymous function which generates each horizontal and vertical line and builds the final output.
Ungolfed function:
(m,n,e,v,h)=>
{
    string x = e + new string(h, m - 2) + e + "\n",
        y = new string(v, n).Replace(v + "", v + "\n");
    return x + y + x + y + x;
};

Full program with test cases:
using System;

namespace LetterEWithoutE
{
    class Program
    {
        static void Main(string[] args)
        {
            Func<int,int,char,char,char,string>f= (m,n,e,v,h)=>{string x=e+new string(h,m-2)+e+"\n",y=new string(v,n).Replace(v+"",v+"\n");return x+y+x+y+x;};

            Console.WriteLine(f(7,2,'+','|','-'));
            Console.WriteLine(f(7,2,'@','|','-'));
            Console.WriteLine(f(7,2,'@','|','#'));
            Console.WriteLine(f(8,3,'+','|','#'));
            Console.WriteLine(f(8,3,'+','@','#'));
            Console.WriteLine(f(9,4,'^','$','!'));
        }
    }
}

Python 3, 60 bytes
A Function
def p(a,b,c,d,e):q=c+e*(a-2)+c;return(q+'\n'+(d+'\n')*b)*2+q

Test Case
>>> print(p(8,2,'+','|','#'))
+######+
|
|
+######+
|
|
+######+

you have 2 too many dashes in the output

Bash + coreutils, 105 bytes
printf -- "$3`printf -- "$4%.0s" $(seq $1)`$3`printf "\n$5%.0s" $(seq $2)`%.0s\n" {1..3}|sed -n 1,$(($2*2+3))p

Assuming the file within which this is stored is named A.sh, the usage would be:
bash A.sh <Horizontal Segment Length w/out Edge Chars> <Vertical Segment Length> '<Left/Right Edge Char>' '<Char Between Edges>' '<Vertical Char>'

The -- are needed, just in case one of the character inputs happens to be a -, and printf apparently doesn't handle dashes in the beginning of a string very nice without the double-dashes.
Explanation
Assuming that the input is 5 2 + * |...

$3printf -- "$4%.0s" $(seq $1)$3printf "\n$5%.0s" $(seq $2)
Create the first horizontal segment and vertical segment all together. This would result in:
+*****+
|
|

printf -- "$3printf -- "$4%.0s" $(seq $1)$3printf "\n$5%.0s" $(seq $2)%.0s\n" {1..3}
Repeat the previously created part 3 times over. This now results in:
+*****+
|
|
+*****+
|
|
+*****+
|
|

printf -- "$3printf -- "$4%.0s" $(seq $1)$3printf "\n$5%.0s" $(seq $2)%.0s\n" {1..3}|sed -n 1,$(($2*2+3))p
Finally pipe the previous output to sed to get rid of the last 2 line segments by only outputting the first <Vertical Segment Length>*2+3 lines of the E. We finally get the E we want:
+*****+
|
|
+*****+
|
|
+*****+

PowerShell v2+, 60 59 bytes
param($a,$b,$c,$d,$e)(,($x="$c$($e*($a-2))$c")+,$d*$b)*2;$x

Takes input as individual command-line arguments. Constructs the horizontal string, stores that into $x for use later, then forms that into an array with the comma-operator ,. Performs array concatenation (i.e., adding elements to the end) of $d formulated into an array of $b elements. That, in turn, is formulated into an array of two elements with another comma operator, and is left on the pipeline. Then, the horizontal $x is left on the pipeline. Abuses the default formatting of Write-Output to put a newline between elements.
Example
PS C:\Tools\Scripts\golfing> .\the-letter-e-without-e.ps1 5 3 "z" "v" "d"
zdddz
v
v
v
zdddz
v
v
v
zdddz

Brainf*ck, 147 bytes
,>,>++++++++[<------<------>>-]<<-->>>,>,>,>+++>++>++++++++++<<[-<<<.<<<[->>+>>>.<<<<<]>>[-<<+>>]>.>>>>>.<[-<<<<<<[->+>>.>>>>.<<<<<<<]>[<+>-]]>>>>]

Takes input from stdin as first 5 characters entered. The first two are have 48 subtracted from their ASCII code so 0-9 behave as expected. For numbers > 9, add 48 to the number and use the corresponding character. The other three characters are as specified in the challenge.
I'm sure it's not the optimal solution but life is too short to golf brainf*ck.
With comments:
[
    Input: number number corner vertical horizontal
    Numbers are single digits; add 48 and use the ASCII character corresponding
    to the number you want for numbers > 9.
    First number is the number of characters across. Second is the number down.

    Layout: {first number-2} {second number} {temp} {a} {b} {c}
]

,>,>++++++++[<------<------>>-]<<-->>>,>,>,
now we should have the first five cells with the specified layout
the 6th will hold 3 as a counter and the 7th 2 and the 8th 10 '\n'

>+++>++>++++++++++<<
[  while the 6th cell is not 0
    -
    <<<.    print corner
    <<<[->>+>>>.<<<<<]  print horizontal characters
    >>[-<<+>>]         copy temp back to 1st cell
    >.>>>>>.           print corner and newline
    <
    [ If the second counter is not zero
        -
        <<<<<<[->+>>.>>>>.<<<<<<<]  print vertical and newline n times
        >[<+>-]           copy temp back to 2nd cell
    ]
    >>>>
]

Example run:
sean@SEANSBOX:~/Dropbox/Code/BF$ ./bf E.b
94^$!
^!!!!!!!^
$
$
$
$
^!!!!!!!^
$
$
$
$
^!!!!!!!^

Lua(5.2), 144 bytes
k,a,p,q=loadstring,arg,io.write,print l,d=k"for i=3,a[1]do p(a[5])end",k"for i=1,a[2]do q(a[4])end"b=a[3]p(b)l()q(b)d()p(b)l()q(b)d()p(b)l()p(b)

Try it online! (Coding Ground)
It should output something like that right now:
+@@@@@+
l
l
+@@@@@+
l
l
+@@@@@+

Own input: 7 2 + l @
You can change the input in project->compile options  and there change the values, each value as in the example but not separated by commas but by spaces.

PHP, 97 bytes
list(,$w,$h,$c,$v,$r)=$argv;echo$b=str_pad($a=str_pad($c,++$w,$r)."$c\n",--$h*2+$w,"$v\n"),$b,$a;

no loop, only builtins.
Run with php -r '' <parameters>.

Vyxal, 10 bytes
⇩*+Ǐ∇εJǏ∞⁋

Try it Online!
 *         # Repeat the horizontal character...
⇩          # Horizontal distance - 2 times
  +Ǐ       # Prepend and append the corner character
    ∇ε     # Push the vertical character repeated by the amount
      J    # Append that to the line
       Ǐ   # Append the first line
        ∞  # Mirror
         ⁋ # Join by newlines

Racket 124 bytes
(λ(w h a b c)(for((i 3))(display a)(for((i w))(display c))(display a)(when(< i 2)(displayln "")(for((j h))(displayln b)))))

More readable form:
(define(f w h a b c)
  (for((i 3))
    (display a)
    (for((i w))
      (display c))
    (display a)
    (when(< i 2)
      (displayln "")
      (for((j h))
        (displayln b)))))

Testing:
(f 7 2 "+" "|" "-" )

+-------+
|
|
+-------+
|
|
+-------+

QBIC, 44 bytes
::;;;X=A[q,a-2|X=X+C]X=X+A ?X[1,2|[1,b|?B]?X

Explanation
::;;;                 Get the input parameters, 2 numbers and 3 strings
X=A[q,a-2|X=X+C]X=X+A Build the horizontal string: The corner string, x-2 times the filler string and another corner
?X                    Print the horizontal string
[1,2|                 Do the next thing twice
[1,b|?B]?X            Print the right number of vertical strings, then the horizontal string.

PHP, 94 Bytes
<?list($v,$h,$p,$d,$r)=$_GET[a];for($h++;$i<=2*$h;)echo$i++%$h?$d:str_pad($p,$v-1,$r).$p,"\n";

Input format an array in the same order as the suggested string

If you use ,"\n" instead of ."\n", you can drop the parens for the ternary.

for($h++;$i<=2*$h;) and $i++%$h saves another byte.

$v-1 gives only 3 horizontal characters for [5,2,+,|,-]. Number of horizontal characters, not including the left and right edge characters

@Titus that is right, I have rollback your edit. 5 Horizontal means 3 Characters with 2 edges = 5. Make  look at the question. And for the others ideas Thank You

C++, 121 Bytes
#import<string>
#import<iostream>
#define f(w,h,C,W,H){std::string s(w,W),t;s=C+s+C+"\n";for(int i=h;i--;)t=t+H+"\n";std::cout<<s+t+s+t+s;}

Ungolfed:
#import<string>
#import<iostream>
#define f(w,h,C,W,H){
    std::string s(w,W),t;  //define two strings, one empty, one with horizontal characters
    s = C+s+C+"\n";        //assemble a horizontal bar
    for(int i=h;i--;)
        t=t+H+"\n";        //assemble a vertical bar
    std::cout<<s+t+s+t+s;  //print
}

In C++ its not allowed to declare functions without type as in C. But macros that behave just like a function are totally possible. Note also that the ungolfed version will not compile until you add a "\" to each but the last line of the macro.
You might save two additional bytes by removing the {}, but then you can't use the macro twice in a row.
Usage:
int main() {
    f(4,2,'+','-','|')
    f(2,1,'@','#','i')
    return 0;
}

Output:
+----+
|
|
+----+
|
|
+----+
@##@
i
@##@
i
@##@

Try it online

CJam, 23 bytes
riri)N*r2*\r*\@r**a3*\*

Try it online!
The input is is in the given order, but should be space separated instead of using a comma. Some of the difficulty is getting the input the right order for CJam's join operation *; for comparison rearranging the input in could save 4 bytes.
If the inputs are dubbed A B C D E then the program works something like this:
ri     e# get A as integer
ri)N*  e# create B+1 newlines
r2*    e# create 2 Cs
\r*    e# join newlines with D (hereafter ND)
\@     e# bring A & Cs to the front
r*     e# create A Es
*      e# join, puts Es between Cs (hereafter CEC)
a3*    e# makes 3 copies of CEC strings
\*     e# join, puts NDs between CECs

Japt -R, 18 bytes
Can't seem to do better than 18 :\
5õ_gVÇXÃ·¸pW²ùUY é

Try it
[W²ùUY é XpV y]ê ê

Try it