text:
ASCII art "Hello-World!"
Your goal is to write the shortest program that outputs "Hello-World!" as ASCII art.
Rules :

It must be human readable, I don't care about it's size (cols/rows)
Output must contain only spaces (" "), sharps ("#") and newlines
The output must work with a monospaced font (but the letters doesn't necessary use a monospaced font)
In the result, each character must be separated from each other by at least one space

Please add a title with the language and the number of bytes in your code.

bash: 33 characters – http://pastebin.com/HZ1w8z8g Is this acceptable?

Why the hyphen though?...

I suppose to make impossible or unfeasibly hard the use of something predefined like HQ9+.

What is "The output must work with a monospaced font (but the letters doesn't necessary use a monospaced font)" supposed to mean? Should it be a monospaced font or not?

@PeterTaylor: The output consisting of spaces and hashes must work with a monospaced font, but the letters represented by the plethora of hashes need not all have the same width.

Does the case of the letters matter?

@manatwork if you add the number of characters needed to code figlet then it's acceptable :)

Related, but different: Say “Hello” to the world in ASCII art

@Tomas yes, the case matters.

@manatwork Technically, that's not forbidden.

You should have restricted this contest to ascii-only source and no use of any external fonts. Would have been much more fun. Let's at least make a sub-contest for that.

@manatwork How does it make HQ9 hard? All you need is to draw the ASCII ART, replace something with a Q(probably the . on !), and voila.

A Unix command. In Unix there used be a command-line tool to achieve just this. In good old matrix-printer days it was necessary to generate a title page for the output of a printing job. So there was a command for just this purpose: the generation of the ASCII-art representation of the arguments. But what was its name? It was so long ago that I forgot it - I did not use it many times anyway, but I was aware of it.

In the result, each character must be separated from each other by at least one space, the chars in "hello world" or the "#"s with which this is printed?

@avalancha At least one space between the # separating each letters

@ijbalazs: You may be thinking of either banner or figlet.

I absolutely enjoyed this one
Perl, 126 116 114 102 98   87 (69) chars (ascii only & no external fonts)
As of now shortest ascii solution which doesn't use any external fonts.
Well, I wanted to present some elegant solution but @Ilmari Karonen challenged me with unpack... shouldn't have done that :-)
Well, this 92 88 69 chars code generates the uglish unreadable output identical to
@Ilmari Karonen's:
say map{y/01/ #/r}unpack"((b6)7a)*",'eT@j@DE
UUBjdeE
wTujjTA
eUBTddE'

More elegant variant without unpack (88 chars):
map{print$"x$_,$/x/4/,"#"x!/7/}7&ord,7&ord>>3for'HRyYOKLIIjIRHBa@AJIAIIIJaQHQNSRH'=~/./g

But I think such |.|e||.-|||.,d! thing is nothing which resembles Hello-World! and shouldn't be allowed, so real solution goes here - unpack variant, 87 chars:
say map{y/01/ #/r}unpack"((b6)9a)*",'E`D@HB@Hd
EcD@HB@Hd
ggDsIbaIf
e`dDhRRHE
ECICPaQPf'

Output:

More elegant variant at 98 chars:
map{print$"x$_,$/x/1/,"#"x!/7/}7&ord,7&ord>>3for'PW{nw^QD[w}vK@X@PcP@jCDjXQk[rRRbSQD\CWbXeX'=~/./g

Output:

Older solution (114 chars), different type of coding:
print'#'x(3&ord),$"x($:=15&ord>>2),$/x!$:for'EmM}U}]MBEQSM}U}]MBOFNMQOKUMSKUOBEM]MMM]IIIMIUQIAEQWMMgFROYQOB'=~/./g

Output:

Forgot the exclamation at the end, i.e. Hello-World! Also, should be lower-case e, but I know you did upper-case to make it readable as a five pixel high font...

JavaScript, 178 bytes
c=document.createElement("canvas").getContext("2d");c.fillText("Hello-World!",0,7);d=c.getImageData(1,0,56,7).data;s="";for(i=3;i<1568;i+=4){s+=d[i]?"#":" ";s+=(i+1)%224?"":"\n"}

That works in Firefox 27 Scratchpad.
#   #        #  #          #   #   #          #     #  #
#   #        #  #          #  # #  #          #     #  #
#   #   ##   #  #   ##      # # # #   ##   ## #   ###  #
#####  #  #  #  #  #  #     # # # #  #  #  #  #  #  #  #
#   #  ####  #  #  #  # ##  # # # #  #  #  #  #  #  #  #
#   #  #     #  #  #  #     # # # #  #  #  #  #  #  #
#   #   ###  #  #   ##       #   #    ##   #  #   ###  #

I recognise Arial :-D

This is my favourite. You've used an interesting method to arrive at the solution. Wonderful!

Ingenious, I do believe you've just created Figlet for JavaScript ;)

Dagnammit, this was my first thought too! Here's an upvote instead. :)

Mathematica 101 99 98
This rasterizes the expression, obtains the binary image data, converts each 1 to "#", each 0 to "" (empty space) and displays output in a 12 by 130 character grid.
GraphicsGrid[ImageData@ImageResize[Binarize@Rasterize@Style["Hello-World!",99],130]
  /.{1→"",0→"#"}]

One character economized thanks to Jonathan Van Matre.

Why does the thickness vary between the l's?

I did the rasterization on the expression as a single image. If I had done it letter by letter, the l's would have been identical. Also, by increasing the rasterization grid size, the output tends to approach the quality of the printed characters. But a larger grid results in relatively smaller "#", to the point that they appear to be mere pixels.  The question remains: why do 2 l's in an image receive different weights?

@MrZander, that's the very reason fonts have hinting: When trying to fit fonts into a low-resolution pixel grid, like in ASCII art or on screen stem width is never really uniform because the font cannot have integral-pixel wide stems at all sizes. Here is a nice explanation with pictures.

@Joey, nice explanation and link.

prbably the best looking

Clever exploitation of Binarize@Rasterize. You can save a few bytes using 9 and 99 in place of 130 and 130. The output is somewhat less pretty, but still both readable and recognizably composed of #s.

Jonathan Van Matre, Thanks. The first parameter could  be reduced to 99 but I wouldn't want to reduce the second, due to output quality. (I realize that this is a code-golf challenge, but I do have my pride.)

Delphi 85 bytes
var s:tstringlist;begin s:=tstringlist.Create;s.LoadFromFile('\a');Write(s.Text);end.

I know, its not the prettiest solution but there was no rule that said you couldnt use external resources.
Result:

+1 for the creativity of using # as background rather than foreground.

You can declare s as TStrings instead. (But keep the instantiation with TStringList.)

Is the file you're loading from something that actually ships with Delphi, or did you write it yourself? If the latter, I think you'd need to count its length as part of your score.

@Ilmari, I'm sure Delphi doesn't ship with a file with "Hello-World" ASCII art :) Moreover, it's described in the answer, that it uses external resources.

@TLama: I assumed so, too, I was just trying to phrase it politely. My point is that, even if external resources were allowed, this program would still fail on anyone's computer except its author's (and, in fact, we have no proof that it even works on his computer).  Also, I can beat his score with the following Perl script: do X. The content of the "external resource" X is left unspecified (it works for me, isn't that enough?), but I've provided a couple of possible suggestions below...

Perl 5, 54 bytes / 71 printable ASCII chars

Note: This is the second version of this answer.  For the original 64-byte / 95-char version using PHP and gzinflate(), see the history of this answer.

Here's the 71-char printable ASCII version:
y/01/ #/,say for unpack'(B40)4',unpack u,'4I*`1`(JJI!$FFNRJU52HIJ0*))H'

The 54-byte version contains non-printable characters, so I'm providing it as a hex dump.  On Unixish systems, you can use xxd -r to turn the hex dump back into an executable Perl script:
0000000: 792f 3031 2f20 232f 2c73 6179 2066 6f72  y/01/ #/,say for
0000010: 2075 6e70 6163 6b27 2842 3430 2934 272c   unpack'(B40)4',
0000020: 27a4 a011 008a aaa4 1126 9aec aad5 54a8  '........&....T.
0000030: a6a4 0a24 9a27                           ...$.'

Both need to be run with perl -M5.010 to enable the Perl 5.10+ say feature.  They will produce the following output:

(Shown as a screenshot, because the huge line-height on SE makes ASCII art ugly and hard to read.  The lower case "e" is kind of awkward, but I believe this qualifies as readable, if only barely so.)

Ps. If the output of the solution above feels too minimalistic for you, here's a 92-character variant that produces output similar to Tomas's solution:
y/01/ #/,say for unpack'(B56)*',unpack u,'CH!(`"(`"":,2``B``@GGDC\'(C#(YI!)("I)"2*,),`4,03D'

Here's a screenshot:

Pps. I'm pretty sure this (GolfScript, 51 chars) is the shortest printable-ASCII solution, if you don't count the ones that just call banner / FIGLet or that cheat in some other way:
'iJ@Q@HmURBIMM{JkUUJeMRAQIM'{2base(;{' #'=}/}%39/n*

The output is the same as for my 71-char Perl solution above.

I'd say you have just crossed the border of readability :-)

It's considerably more readable in my terminal than here on SE, because of the huge line spacing here.

I mean, it is unreadable anyway. BTW I can produce your output in 92 chars, with no external compression algorithm :-)

@Tomas: You're right, zipping does not seem to be the winning answer here. I'd give you a +1 for that if I hadn't already. BTW, I can do it in 71 chars; see above. :-)

@Tomas: ps. I added a version that produces output similar to yours.

The bottommost line of the 93-char like-Tomas's-output solution seems to be garbled for me.

Ilmari, you shouldn't have challenged me with unpack :-) Found a solution of 69 chars (87 with the nice output of mine).

@FireFly: Huh, you're right, there was a stray backslash in the code. I've no idea how it ended up in there, but I've fixed it now.

Shell + Figlet (35)
$ figlet -w 90 -f banner Hello-World!
#     #                                   #     #                             ###
#     # ###### #      #       ####        #  #  #  ####  #####  #      #####  ###
#     # #      #      #      #    #       #  #  # #    # #    # #      #    # ###
####### #####  #      #      #    # ##### #  #  # #    # #    # #      #    #  #
#     # #      #      #      #    #       #  #  # #    # #####  #      #    #
#     # #      #      #      #    #       #  #  # #    # #   #  #      #    # ###
#     # ###### ###### ######  ####         ## ##   ####  #    # ###### #####  ###

What kind of font is this? Those just look like smaller upper-case characters.

it's banner -f banner It was the first font I found that used # instead of * or | and _.

here's the same in pure Python

Changing "90" to "9" yields a tall and skinny hello world, however because the OP does not care about columns or rows, it should be acceptable.

Sometimes voters baffle me.  How come this gets a net score of +8, but the other figlet answer gets a net score of -3?

Python 260 215 186 152
>>> print'eJyNkFEKwDAIQ/93isC7/x3LyIJullHrR1BfJSIJPUHTlmiUPHbxC7L56wNCgZAxv3SjDWIxsoOb\nzMaBwyHYPJ5sVPNYxXism74vcIsFZlYyrg=='.decode('base64').decode('zip')
#   #        #  #          #   #   #          #     #  #
#   #        #  #          #  # #  #          #     #  #
#   #   ##   #  #   ##      # # # #   ##   ## #   ###  #
#####  #  #  #  #  #  #     # # # #  #  #  #  #  #  #  #
#   #  ####  #  #  #  # ##  # # # #  #  #  #  #  #  #  #
#   #  #     #  #  #  #     # # # #  #  #  #  #  #  #
#   #   ###  #  #   ##       #   #    ##   #  #   ###  #

Python 196 183 130 114 (but uglyer)
>>> print'eJxTVlBWgCAgAQHKqBywAJeyAgJCZREcZWUYyaUMIpUVEKqRNcLEueDqEaZBLVVWQDITADIdFBw='.decode('base64').decode('zip')
# #  #  # #        # # #        #   # #
# # # # # #  #     # # #  #  ## #  ## #
### ##  # # # # ## # # # # # #  # # #
# #  ## # #  #      # #   #  #  #  ## #

I used zipped data in base64 encoding. and the code decode it from base64 encoding and then unzipping it.

Wow, that's really stretching legibility!

PHP — 183 bytes
Using sebcap26's ASCII art as the source...
foreach(str_split(base64_decode('iASAERACCYgEgBKQAgmIxIwKoxo5+SSSCqSSSYnkksqkkkmJBJIKpJJIiOSMBEMSOQ'))as$i=>$j)echo strtr(sprintf("%8s%s",decbin(ord($j)),($i+1)%7?"":"\n"),'01',' #');

#   #        #  #          #   #   #          #     #  #
#   #        #  #          #  # #  #          #     #  #
#   #   ##   #  #   ##      # # # #   ##   ## #   ###  #
#####  #  #  #  #  #  #     # # # #  #  #  #  #  #  #  #
#   #  ####  #  #  #  # ##  # # # #  #  #  #  #  #  #  #
#   #  #     #  #  #  #     # # # #  #  #  #  #  #  #
#   #   ###  #  #   ##       #   #    ##   #  #   ###  #

Brainfuck, 372 Byte
(I know. but just for completeness, there has to be brainfuck ^^ It'S not going to get much shorter, as there are little repetitions. First and second line loop already...)
++++++++[>++++>++++<<-]>+++>>++++++++++>>+>++[-<<<<<.>.<.>..>>>[-<<<.>>>]<[-<<<.>>>]<<..<.>>>++[-<<.<.>..........<.>....>>]<<<.>.<.>>.>+>>]<<<<<...>.<.>.<.>.<.>.<.>..<..>..<...>.<.>..<.>..<.>..<..>...<..>.<.>..<...>.<.>>.<<.>.<.>.<.>...<.>.<.>.<.>..<.>.....<.>.<...>.<.>.<.>..<.>.<.>...<.>.<.>..<.>>.<<.>.<.>.<...>.<.>.<.>..<..>.......<..>.<..>...<..>..<.>...<.>..<..>..<.

Interpreter here: http://koti.mbnet.fi/villes/php/bf.php

# #     # #          #     #          #    # #
# #  #  # #          #     #          #    # #
### # # # #  ##  ### #  #  #  ##   ## #  ### #
# # #   # # #  #     # ### # #  # #   # #  #
# # ### # #  ##       ## ##   ##  #   #  ##  #

Combining @ASKASK's number generator and image with my loops and some additional tuning, we get:
Brainfuck, 343 339 336  334 Bytes
Looks uglier than my original version though.
+++++[->++++++>+++++++>++<<<]>++>>>+>>++[-<<<<.<.>.<..>>>[-<<<.>>>]>[-<<<.>>>]<<<<..>.<.>>>++[-<<.<.........>.<...>>>]<<.<.>.>.>>+>]<<<<..<<+++++[->>.<.<]>.>.<..>...<.>.<.>.<.>.<..>.<...>..<.>.<..>..<.>.>.<.<.>.<.>.<...>.<.>.<.>.<.>.<.....<++++++[->>.<.<]>..>.<.>.<.>.>.<.<.>.<..>.<..>.<.>.<..>.<.......>...<...>.<..>.<...>.<..>.<..>.

(image see @ASKASK's Answer)

EcmaScript 6, 172 161
'¡I%e!c0ĄJ¥eìo0¸ËefMs0µKcÊIs0´Ê¢1éo'.split(0).map(s=>s.split('').map(c=>{for(i=8,s='';i--;)s+=(c.charCodeAt(0)-33)&(1<<i)?'#':' ';return s;}).join('')).join('\n')

Output:
#         # #        #   #   #           #    #
###   ##  # #  ##    #   #   #  ##  # ## #  ###
#  # #### # # #  #   #   #   # #  # ##   # #  #
#  # #    # # #  #    # # # #  #  # #    # #  #
#  #  ### # #  ##      #   #    ##  #    #  ###

Explanation:

The ASCII text is compacted into a string where each bit represent a pixel:

0 for SPACE
1 for #

An offset of 33 is applied in order to get only printable characters.

The first fat arrow function's brackets and return statement are not necessary.

@manatwork I tried to removed it but then it was no longer compiling. Are you sure about that?

Firefox 27.0: http://i.stack.imgur.com/VyqnC.png

charCodeAt(0) can be reduced to charCodeAt().

Sclipting, 38 characters (76 bytes)
갦륈똄릵꺕녔꺒녪냕녪낷뚕년꺒녦냉괄낵要감嚙긂밃⓶掘⓶終丟併껧뜴꼧밍替現겠合終

Output:
# # ## #  #   #     #   #  #  ##  #  ##  #
# # #  #  #  # #    #   # # # # # #  # # #
### ## #  #  # # ## # # # # # ##  #  # # #
# # #  #  #  # #    # # # # # # # #  # #
# # ## ## ##  #      # #   #  # # ## ##  #

The code-golf info page says "If you use Unicode, byte count should use UTF-8." If I'm not mistaken, that makes your program-length 114 bytes. (The 76 bytes you mention would be for UTF-16 without a BOM.)

@r.e.s.: I changed that, as it makes no sense to require that. My Sclipting interpreter understands UTF-16 just fine, so it’s a valid program encoded as UTF-16.

Timwi, case matters

Shouldn't this be 'Hello-World" and not "HELLO-WORLD"

@user689 - actually "Hello-World!" with an exclamation point at the end...

A mix between Korean and Chinese/Japanese ideographs.  I thought those were only used for people's names in Korean now.  Interesting.

Oh, I see why now.

I see that you edited the info page for the code-golf tag.  It might have been a better idea to first propose and discuss such changes -- e.g. in response to Scoring code golf (bytes vs. characters).

@r.e.s.: Actually my edit was a proposal and it has been accepted by the community. (I don’t have the rep to edit it directly.)

I suppose "accepted by the community" means "accepted, without community discussion, by a small number of people with the power to do so."

@r.e.s.: I apologize for any friction caused by my (and the reviewers’) actions. I didn’t realize that this was controversial. Please consider giving me the benefit of the doubt. I am engaging in community discussion about this on meta now.

Brainfuck, 362 bytes
Sorry @johannes-h, I saw yours and was inspired to make my own. It uses a combination of faster number generation at the beginning and a simpler picture to generate the result in less bytes. It does not however use loops anywhere else so it is up for optimization.
+++++[->++++++>+++++++>++<<<]>++>.<.>.<.....>.<.>.<.........>.<...>.<.........>.<...>.<.>.>.<.<.>.<..>.<..>.<.>.<.........>.<...>.<.........>.<...>.<.>.>.<...<.>.<.>.<.>.<.>.<..>.<..>...<.>.<.>.<.>.<..>.<...>..<.>.<..>..<.>.>.<.<.>.<.>.<...>.<.>.<.>.<.>.<.....>.<.>.<.>.<.>.<.>.<.>.<...>.<.>.<.>.>.<.<.>.<..>.<..>.<.>.<..>.<.......>...<...>.<..>.<...>.<..>.<..>.

which generates:

Hm. How much shorter is the number generation? 'cause changing the image looks like cheating to me (at least when directly comparing our solutions - perfectly valid in this contest of course) ^^ BUt I'm going to look into yours later on :)
You can take my loop for the first two lines however. It's a lot shorter (was about 10-20 bytes if I remember correctly)

got your version down to 343 Byte, see my answer

and even shorter, replacing more repetitions by loops. 339 now.

I dont have neough reputation to comment on yours but if you look closely at your new version you will find a "><" in there that can be deleted to take away two bytes :)

ImageMagick + sed, 71 bytes
I don't see any other ImageMagick entries, so here's my late stake in the ground:
convert +antialias label:Hello-World! xpm:-|sed '8,+9y/ /#/;s/[^#]/ /g'

I think the sed portion can probably be golfed some more.
Try it online.
Output:

  #    #          #  #            ##   #    #            #      #  #
  #    #          #  #             #   ##  ##            #      #  #
  #    #          #  #             #  ###  #             #      #  #
  #    #   ####   #  #  ####       #  # #  #  ####   # # #  ### #  #
  ######  #    #  #  # ##  ##      #  # #  # ##  ##  ##  # ##  ##  #
  #    #  ######  #  # #    # ###   # #  # # #    #  #   # #    #  #
  #    #  #       #  # #    #       ##   ##  #    #  #   # #    #  #
  #    #  ##  ##  #  # ##  ##       ##   ##  ##  ##  #   # ##  ##
  #    #   ####   #  #  ####        ##   ##   ####   #   #  ### #  #

Postscript, 154 133
<~GasbQ8I>GO#QsOD7:?,pa&5XCgo@jeLPX:a4F9kN1nu1B@8KjD"^]WgY[MA.2VBjpTNo5$Pi%uI9Lr>,9`~>/FlateDecode filter 999 string readstring pop =

i.e.
    <~GasbQ8I>GO#QsOD7:?,pa&5XCgo@jeLPX:a4F9kN1nu1B@8KjD"^]WgY[MA.2VBjpTNo5$Pi%uI
9Lr>,9`~>
/FlateDecode filter
999 string readstring pop
=

ASCII-only source, inspiration for ASCII-art was Johannes H.'s answer :-)
# #     # #         #    #          #    # #
# #  #  # #         #    #          #    # #
### # # # #  ##  ## #    #  ##   ## #  ### #
# # #   # # #  #    # ## # #  # #   # #  #
# # ### # #  ##      #  #   ##  #   #  ##  #

(more readable in terminal)
Perl, 102
print$-%44?'':"\n",vec(unpack(u,'<!040`A!:4@`A`*%7918REEM1":T4)75E(#&1"0``'),$-++,1)?'#':' 'for 0..219

Same output as above. I know I lost to both Perl answers above, but I publish it anyway. At least I tried and was moving in the right direction (and hadn't seen shortest answer) :-).

Pure Bash, no external utilities - 133 characters:
c=" #";for x in 0x{5250088045,55520A914D,74556AAA54,535205124D};do while((s=(t=x)^(x/=2)*2,t));do L=${c:s:1}$L;done;echo "$L";L=;done

Uses right and left shift (divide and multiply by 2) and xor to find the one bits.
Font data stolen from Blender/Ilmari Karonen.
Tested in Bash 3.2 and 4.2
By the way, this is only 166 characters:
echo "# #  #  # #        #   #        #   # #
# # # # # #  #     # # #  #   # #  ## #
### #   # # # # ## # # # # # #  # # #
# #  ## # #  #      # #   #  #  #  ## #"

Javascript / ES6 (108 bytes)
Copy into console:
[,0xa0a028045,0xeeae2bb5d,0xacaabaa54,0xaeae2ba5d].map(a=>a.toString(2).replace(/./g,b=>' #'[b])).join('\n')

Output:
"
# #     # #       # #        #   # #
### ### # # ###   # # ### ## # ### #
# # ##  # # # # # ### # # #  # # #
# # ### # # ###   # # ### #  # ### #"

(Needs ECMAScript6 compatible browser ie. Firefox 22+)
Inspired by @maximeeuziere, @p01, @aemkei

.join('\n') can be reduced to .join(\
`)` where the space is an actual new line character.

Authors: xem, aemkei, p01, jonas
Execute this in the JS console.
JavaScript, cross-browser,133 132 126 117 bytes
for(i=s="";l=[43117609029,64070269789,46349920852,46890400349][i++];)for(j=0,s+="\n";c=l.toString(2)[j++];)s+=" #"[c]

JavaScript, ES6, works on Firefox, 108 bytes
[,0xa0a028045,0xeeae2bb5d,0xacaabaa54,0xaeae2ba5d].map(a=>a.toString(2).replace(/./g,b=>' #'[b])).join('\n')

Result:
>
# #     # #       # #        #   # #
### ### # # ###   # # ### ## # ### #
# # ##  # # # # # ### # # #  # # #
# # ### # # ###   # # ### #  # ### #

@p01 made a shorter version (118 bytes) here: https://twitter.com/p01/status/433230019419471872

Python 3, 114
print('\n'.join(bin(x)[2:]for x in[353530052677,366448644429,499649260116,357858349645]).translate({48:32,49:35}))

Output (4-character tall e and W stolen from @Ilmari Karonen):
# #  #  # #        #   #        #   # #
# # # # # #  #     # # #  #   # #  ## #
### #   # # # # ## # # # # # #  # # #
# #  ## # #  #      # #   #  #  #  ## #

And a shorter one (107):
print('\n'.join(bin(x)[2:]for x in[11993933918769,16391913257513,12021315382193]).translate({48:32,49:35}))

Output:
# # ### #   #   ###   # # ### ##  #   ##   #
### ### #   #   # #   # # # # ### #   # #  #
# # ### ### ### ###   ### ### # # ### ##   #

It's mostly unreadable. Your World from 2nd output is actually Uorld.

@SilviuBurcea: It looks better on an actual terminal emulator. Also, "Human-readable" gives you a bit of wiggle room. I'm sure you can guess what `"HELLO ⊔ORLD!" means.

Use hex constants and shave a few characters off

@Floris: I tried that. The two-character prefix makes them just as long up until around 20 digits.

Python 154 Characters, (Char 5X7 in size)
print'\n'.join(map(''.join,zip(*(''.join("# "[int(e)]for e in"{:07b}".format(ord(c))[1:])for c in"€÷÷÷€ÿñêêòÿ€ÿ€ÿñîîñÿûûÿŸáþÁ¿ÁþáŸÿñîîñÿàïÿ€ÿÿñîî€ÿ‚"))))

Output
#   #      # #         #   #   #         #     # #
#   #      # #         #  # #  #         #     # #
#   #  ##  # #  ##      # # # #   ##  ## #   ### #
##### #  # # # #  #     # # # #  #  # #  #  #  # #
#   # #### # # #  # ##  # # # #  #  # #  #  #  # #
#   # #    # # #  #     # # # #  #  # #  #  #  #
#   #  ### # #  ##       #   #    ##  #  #   ### #

bash, 175 170 bytes
You need to waste quite a few characters in order to produce a pretty output!
base64 -d<<<H4sICKaT9FICAzAxAK2RQQ7AIAgE776CZP7/x1ZjERebcJAL0QybhcV6YdWizAPNaUatQQLFpj6h+c/XA05WF9Wtk9WJcxz4oe6e1YPQa7Wiut2wfjJ16STY30lSnNIlzvdpHhd6MiTOB65NYc+LAgAA|zcat

Output:
#     #                                         #     #                                   ###
#     #  ######  #       #        ####          #  #  #   ####   #####   #       #####    ###
#     #  #       #       #       #    #         #  #  #  #    #  #    #  #       #    #   ###
#######  #####   #       #       #    #  #####  #  #  #  #    #  #    #  #       #    #    #
#     #  #       #       #       #    #         #  #  #  #    #  #####   #       #    #
#     #  #       #       #       #    #         #  #  #  #    #  #   #   #       #    #   ###
#     #  ######  ######  ######   ####           ## ##    ####   #    #  ######  #####    ###

You can make it smaller with lzma/unlzma

Shell, 20 characters:
banner Hello-world\!

For this to work, of course you need the banner program.  On Debian, you can get it by installing the bsdmainutils package.
This prints a beautifully rendered version of your message, designed to be printed on one of the old continuous-feed printers, so the output of the above text is 322 lines long by 123 columns wide, and you turn the printout on its side to read the message.  You could hang the resulting paper on the wall as a banner, hence the name.
http://en.wikipedia.org/wiki/Banner_%28Unix%29
EDIT: Looks like Debian also has the sysvbanner package, which installs a banner program that prints the text horizontally for display on a terminal.  However, this only prints the first 10 characters of the message, so it is kind of annoying for this code-golf problem!

I believe you meant to write banner hello-world.

@Floris, thanks for the heads-up.  Fixed.

Note that banner appeared on Unix v7 in 1979 and is found on virtually every Unix.

@sch, I agree that banner is available for virtually every UNIX.  I just put the Debian package as a convenient proof that I wasn't just making something up, for people who didn't know about it.  These days I wouldn't expect to find banner installed by default on a UNIX, any more than I would expect to find a continuous-feed printer in a computer lab anymore.  But any code golf on making banner text really ought to have the banner program in it somewhere.  It's part of our rich cultural history as computer geeks.  :-)

Bash:
(103 89 Bytes)
Code:
base64 -d<<<rohBEmRiqIihFVRS7IitVWRSqIihVVRQru5Aoldi|xxd -b|sed -e's/ //g;s/1/#/g;s/0/ /g'|cut -b'9-55'

Output:
# # ### #   #    #     #   #  #  ##  #   ##   #
# # #   #   #   # #    #   # # # # # #   # #  #
### ##  #   #   # # ## # # # # # ##  #   # #  #
# # #   #   #   # #    # # # # # # # #   # #
# # ### ### ###  #      # #   #  # # ### ##   #

Smaller, but less readable (Based on http://mckgyver.pbworks.com/f/1240440791/3PixelFont.jpg):
Code:
base64 -d<<<V0nCLsmQdklaqslQV23BTq2Q|xxd -b|sed -e's/ //g;s/1/#/g;s/0/ /g;'|cut -c'9-52'

Output:
 # # ### #  #  ###    #   # ### ##  #  ##  #
 ### ##  #  #  # # ## # # # # # ##  #  # # #
 # # ### ## ## ###     # #  ### # # ## ##  #

HTML, 209 characters

<pre># #     # #                      #   # #
# #     # #        # # #         #   # #
###  ## # #  #     # # #  #  ##  #  ## #
# # ##  # # # # ## # # # # # # # # # #
# # ### # #  #      # #   #  #   # ### #</pre>

Does this count? :)

Bash 37, 33
toilet<<<"Hello-world"|tr \"m \#

 #    #        ###    ###                                       ###        #
 #    #  ###     #      #     ###         #     #  ###    # ##    #     ####
 ###### ##  #    #      #    ## ##        ## # ## ## ##   ##  #   #    ## ##
 #    # #####    #      #    #   #   ###   #####  #   #   #       #    #   #
 #    # #####    ###    ###  #####          # #   #####   #       ###  #####

Which is the same as:
echo "Hello-world" | toilet

From man toilet

TOIlet - display large colourful character

With tr "'\"m" "#" all " chars are replaced with #.

tr's parameters would be shorter escaped than quoted. I mean tr \'\"m \# instead of tr "'\"m" "#".

Oh good one, I wasn't aware of that. Thanks @manatwork

Wait a second. The toilet output had no single quote. Why you included it in tr's 1st parameter? Just tr \"m \# is enough.

@manatwork I think I need more coffee :)

F# - 204 characters
for s in(Seq.map(Seq.unfold(function|0L->None|i->Some(" #".[int(i%2L)],i/2L)))[173948798213L;174770890021L;191304848727L;182715110773L;45277009173L;191279670629L])do printfn"%s"(new string(Seq.toArray s))

Output:
# #     # #        # #         #   # #
# #  #  # #  #     # #  #   ## #   # #
### # # # # # #    # # # # #   #  ## #
# # ### # # # # ## # # # # #   # # # #
# # #   # # # #    ### # # #   # # #
# #  ## # #  #     # #  #  #   #  ## #

Python + pyfiglet -- 87 characters
from pyfiglet import figlet_format
print(figlet_format('Hello-World!', font='banner'))

Output
#     #                                   #     #                             ###
#     # ###### #      #       ####        #  #  #  ####  #####  #      #####  ###
#     # #      #      #      #    #       #  #  # #    # #    # #      #    # ###
####### #####  #      #      #    # ##### #  #  # #    # #    # #      #    #  #
#     # #      #      #      #    #       #  #  # #    # #####  #      #    #
#     # #      #      #      #    #       #  #  # #    # #   #  #      #    # ###
#     # ###### ###### ######  ####         ## ##   ####  #    # ###### #####  ###

To install pyfiglet, run:
$ pip install pyfiglet

Python with pyfiglet: 66 using argv, 69 without
66:
from pyfiglet import*
print(figlet_format(sys.argv[1],font='3x5'))

69:
from pyfiglet import*
print(figlet_format('Hello-World!',font='3x5'))

firs must be called as, for example:
python asciiart.py 'Hello-World!'
second:
python asciiart.py.
Output:
    # #      #   #          # #          #    #  #
    # # ###  #   #  ###     # # ### ###  #  ###  #
    ### ##   #   #  # # ### ### # # #    #  # #  #
    # # ###  ##  ## ###     ### ### #    ## ###
    # #                     # #                  #

(Well, it looks kinda crappy with this font. Nevertheless :) )
[edit] removed obsolete dash from the argument.

Why the extra dash in front of the output?

My mistake, that's the output from the one using argv, where I used a dash before the argument (matter of habit, as I use bash all the time). I'll edit it, thank you.

Javascript 137 (134)
Uses the bits of integers to represent sharps an white spaces.
Tested with Firefox 27.
137 character
s="";[0xadb73eead9,g=0xa9252aaa94,0xed252aac95,g+1,0xad272aee99].map(n=>{for(;n>0;n/=2)n%2?[s="#"+s,n--]:s=" "+s;s="\n"+s});console.log(s)

# # ## #  #  ###  # # # ### ### #  ##  #
# # #  #  #  # #  # # # # # # # #  # # #
### ## #  #  # #  # # # # # ##  #  # # #
# # #  #  #  # #  # # # # # # # #  # #
# # ## ## ## ###  ##### ### # # ## ##  #"

134 character (rotated 180°)
s="";[0xadb73eead9,g=0xa9252aaa94,0xed252aac95,g+1,0xad272aee99].map(n=>{s+="\n";for(;n>0;n/=2)n%2?[s+="#",n--]:s+=" "});console.log(s)

"
#  ## ## # # ### #####  ### ## ## ## # #
  # #  # # # # # # # #  # #  #  #  # # #
# # #  #  ## # # # # #  # #  #  # ## ###
# # #  # # # # # # # #  # #  #  #  # # #
#  ##  # ### ### # # #  ###  #  # ## # #"

Python3 (126)
There's an additional space between the chars to make it better readable. So technically it's a 125 character solution.
print(' '.join(['','\n'][i%40==0]+['#',' '][int('72liw1j4glyc34dum02j2a4ipxa8b7vvp65x511',36)//2**i%2==0]for i in range(200)))

Output:
#   #   # #   #     #     # # #     #   #   #   # # #   # # #   #     # #     #
#   #   #     #     #     #   #     #   #   #   #   #   #   #   #     #   #   #
# # #   # #   #     #     #   #     #   #   #   #   #   # #     #     #   #   #
#   #   #     #     #     #   #     #   #   #   #   #   #   #   #     #   #
#   #   # #   # #   # #   # # #     # # # # #   # # #   #   #   # #   # #     #

Smalltalk, 151
although this golf game is already over, for the reference:
i:=((Form extent:115@14)displayString:'Hello world'x:0y:12;asImage).0to:13 do:[:y|i valuesAtY:y from:0to:114 do:[:x :p|({$#.$ }at:p+1)print].Stdout cr]

output:
 ***  ***             ***       ***                                                         ***           **
  *    *                *         *                                                           *            *
  *    *                *         *                                                           *            *
  *    *     ***        *         *        ***              ***   ***    ***     *** ***      *        *** *
  ******    *   *       *         *       *   *              *     *    *   *      **   *     *       *   **
  *    *   *     *      *         *      *     *             *  *  *   *     *     *          *      *     *
  *    *   *******      *         *      *     *              * * *    *     *     *          *      *     *
  *    *   *            *         *      *     *              * * *    *     *     *          *      *     *
  *    *    *    *      *         *       *   *               ** **     *   *      *          *       *   **
 ***  ***    ****    *******   *******     ***                *   *      ***     ******    *******     *** **

You have to only use ' '(spaces) and '#' characters(also newline characters).

my mistake; the output was from a previous run; the code is correct "{$#.$ }at:p+1".

C#, 205 203 202 bytes
I'm storing the text as an array of 5 longs, each representing a row in the display. I iterate over the array, and use bitwise comparison to work out if each bit is a # (1) or a space (0).
class G{static void Main(){foreach(var c in new long[]{0x14401100505,0x16589102525,0x15455575557,0x5455505535,0x16448A02565})for(int i=0;i<42;i++)System.Console.Write((i>40)?"\n":(c&1L<<i)>0?"#":" ");}}

"cURL", 16 characters:

program: (computer science) a sequence of instructions that a computer can interpret and execute;

curl floris.us/h

Produces:
#   #      #  #           #   #          #     #  #
#   #  ##  #  #   ##      #   #  ##   ## #   ###  #
##### #### #  #  #  # ### # # # #  # #   #  #  #  #
#   # #    #  #  #  #     # # # #  # #   #  #  #
#   #  ##   #  #  ##       # #   ##  #    #  ###  #

I guess if I had a cooler domain, it would be shorter...

Personally, I would consider this cheating.

@RyanCarlson yes, but it's short...

@RyanCarlson It isn't any worse than using figlet.

How is this different from putting an arbitrarily large program into a script called x, setting execute permission on x, setting the PATH to include the current directory, and then saying you have a one-character solution (just type x!).  I think this whole class of solution is cheating.

@mojo, figlet is at least a common program, to which people have access.  Some people already have it installed, and others can install it.  I don't think it's "cheating" to use such a program.  But I do think this problem would be better if it required answers to be written in a programming language and not run any external programs or include any library modules.  (That would of course invalidate my own answer, which depends on the user having the banner program installed.)

@steveha - The only "difference" I can offer is that this "program" is available on your computer already - no scripts to write etc. Those operations would be additional key strokes that you would have to count. This - no extra key strokes needed on your computer. I agree it is a weak defense, but not much worse than banner or others like it. Agree with your suggested improvement of the question though.

@steveha The reason I wouldn't use figlet or banner is because they do all the ASCII art work for you. It seems like that was the heart of the challenge. "Cheating" might be an overstatement, but I wouldn't consider my own entry very legitimate if I used it.

I'd agree that this is a cheeky/cheaty solution, but I will note that you must have an http:// as part of the URL. Just because your fancy browser hides it doesn't mean it's not there. :)

@Floris You can transform your answer in a shell one: curl floris.us/h ;-)

@IonicăBizău - thanks for that suggestion! It does indeed work!

Shell + pyfiglet, 31 characters
pyfiglet can run as a shell tool, so we can simply go like this:
pyfiglet -f'3x5' 'Hello-World!'

which gives us:
# #      #   #          # #          #    #  #
# # ###  #   #  ###     # # ### ###  #  ###  #
### ##   #   #  # # ### ### # # #    #  # #  #
# # ###  ##  ## ###     ### ### #    ## ###
# #                     # #                  #

Looks much better with less line spacing.
Letters are separated with one space, and in terminal it's well readable.

You could save two chars by just dropping the py. Also, there's no need to quote 3x5.

Big rule abuse, nothing even remotely similar to golfing.

No need for any of those quotes

Why not just compile one of the other solutions in this post, and give the binary a one character name?

I provided this answer seeing others use bash+banner and bash+figlet, both external tools. If that's rule abuse, my other answer uses python 2.7 with pyfiglet. Is using an established library discouraged/prohibited?

Taku, the purpose of code golf should be to write a short program that solves the problem, not just call another program or library or whatever that already solves the very problem! Otherwise we might get to the extreme @The111 mentions. Well, it's a hole in the rules, it's your decision to abuse it or not. But think why did you get zero upvotes..

I see your point. Please excuse my misunderstanding, then, based on many answers in this - and other - topics, I got the idea that the purpose was just to write the shortest code possible, any hack goes, but that would indeed lead to calling some URL containing ASCIIart through curl, and, granted, it would be pointless. Thanks for pointing that out, I'm still new to the idea, and not a sesoned programmer as well. I'll keep my libraries in my pants next time :)


text:
Partition of Array
Given an integer array. You have to check whether it is possible to divide the array in two parts such that the sum of elements of one part is equal to the sum of the element of the other part.If it is possible print "YES" otherwise "NO".
Sample Input
4 3 5 5 3

Sample Output
YES

Explanation
Array can be divided in two parts {4,3,3} and {5,5}

Sample Input
1 3

Sample Output
NO

Sample Input
5 5

Sample Output
YES

This looks like it simplifies to the subset sum problem.

Do you accept True/False as output?

@PeterTaylor That asked people to find if the sum of a group in the array equals 0.  This asks people if the sum of one group is the same as the sum of another group within the same array.  The techniques used are very similar, but the outcome is completely different.

@user2509848, applying the standard rule of thumb for duplicates (how much effort is required to port a solution from the older question?), I think the answer here is "not enough". All that is required is a trivial change to the input (add -sum(input)/2 to the input array) and a trivial change to the output.

OK, I guess it is a duplicate.  I was thinking of a completely different approach.

@PeterTaylor That was a pretty good reduction! I wouldn't have seen that.

Ruby 98
f=->a{s=a.inject :+;(1..a.count).any?{|i|a.combination(i).any?{|r|r.inject(:+)*2==s}}?'Yes':'No'}

Why not (1..a.size) ?

Prolog
Without proper output (92 chars)
s(A):-s(A,0,0).
s([],B,B).
s([H|T],B,C):-D is B+H,s(T,D,C).
s([H|T],B,C):-D is C+H,s(T,B,D).

With proper output (121 chars)
s(A):-(s(A,0,0),print('YES'),!;print('NO')).
s([],B,B).
s([H|T],B,C):-D is B+H,s(T,D,C).
s([H|T],B,C):-D is C+H,s(T,B,D).

To query the rules:
s([4,3,5,5,3])
s([1,3])

Ruby with ActiveSupport 74
p (1..a.size).any?{|b|a.combination(b).any?{|c|c.sum*2==a.sum}}?'YES':'NO'

Ruby 88
p (1..a.size).any?{|b|a.combination(b).any?{|c|c.reduce(:+)*2==a.reduce(:+)}}?'YES':'NO'

Mathematica 59
With spaces for readability,
f@a_ := If[Select[Subsets@a, Tr@# == Tr@a/2 &] == {}, "NO\n", "YES\n"]

The Logic
If there exists no subset of the input integer array, a, having, as its total, one-half of the total of a, then NO. Else, YES.

Examples
f[{4, 3, 5, 5, 3}]

YES

f[{4, 3, 5}]

NO

It prints YES and NO for the same example?

No. I mis-entered the second input!

Haskell - 113 (30 chars for imports)
import Control.Monad(filterM)
f x|t="YES"
 |1>0="NO"where t=or$map(==(sum x)/2)$map(sum)$filterM(\_->[0>1,1>0])x

Query by calling f on a list:
*Main> f [4,3,5,5,3]
"YES"
*Main> f [1,3]
"NO"
*Main> f [5,5]
"YES"

This is my first attempt at golfing in Haskell, if anyone has any tips for shortening my code they are welcomed.

MATLAB 75 64
Quite happy with this. Too bad the function names are so much characters.
@(x)['NO '+[11,-10,51]*ismember(sum(x)/2,cumsum(perms(x),2)) '']

Javascript
Only works in browsers with ECMAScript 6 support (Firefox works).  Defines a function that can be called with a list of integers, the target sum value, and the length of the list.
53 characters (sans formatting and specific criteria)
q=(l,s,i)=>--i>=0&&(q(l,s,i)||l[i]==s||q(l,s-l[i],i))

This will work with both positive and negative floating point numbers as well, not just integers.  It can also find whether the list at any point can sum to any arbitrary sum, which is much more general than the problem requires.
106 Characters (with formatting and starting criteria)
q=(l,i,s)=>--i>=0&&(q(l,i,s)||l[i]==s||q(l,i,s-l[i]));f=l=>q(l,l.length,l.reduce((a,b)=>a+b)/2)?'YES':'NO'

Fully half of the code here is just boilerplate required to limit the solution to this specific case, and format the output according to the criteria.
A non recursive solution that builds the table from the bottom is more efficient but also takes more characters.

GolfScript 64 47
~:x[[]]{{+}+1$%+}@/(;{{+}*2*x{+}*=},'YES''NO'if

Explanation: Find a subset (using this subset method) whose sum is exactly half of the total sum of the input.
Previous solution:
~].,.))2?,{2base}%\{\,=}+,\`{]zip{~\2*(*}%}+%{{+}*!},'YES''NO'if

Explanation:  This uses base to count and find every possible array of length n comprised of only 1s and 0s.  Then it uses this array to negate or do nothing to elements of the initial array.   For example, for input [1 2 3], we would have [1 2 3][1 2 -3][1 -2 3][1 -2 -3][-1 2 3][-1 2 -3][-1 -2 3][-1 -2 -3].  The program then returns 'YES' if and only if the sum of the elements of any of these arrays is 0.  Negating some subset of the array, then adding all the elements and checking if it equals 0 is clearly equivalent to checking for a 2-part partition.
I'm sure this implementation can be improved upon, but I think the idea is there.

GolfScript, 34 characters
~]1,\{2*{1$+}+%}/)2/?)!"YES
NO"n/=

The code basically calculates the totals of all possible subsets and then searches for (half of) the overall total in this list. (Actualy the code calculates doubles all the subset sums and searches for the list's total in order to not conflict with integer division.) You can see the example running online.
> 4 3 5 5 3
YES

> 4 5 5 5 3
NO

C++ — 294 275
Not very compact, but you don't often see C++ in code challenges!
Features

can get NO result in O(1) time for many inputs
uses no external algorithms for generating subsets, all in code
C++ was used for easy vector creation

Code
#include <iostream>
#include <vector>
using namespace std;int main(){vector<int>v;int s,e,w,g,t;for(s=0;cin>>e;s+=e)v.push_back(e);if(!(s&1)){s/=2;w=v.size();for(e=0;e<1<<w;e++){for(g=0,t=0;g<w;g++)if(e&1<<g)t+=v[g];if(t==s){cout<<"YES\n";return 0;}}}cout<<"NO\n";return 1;}

To compile
g++ -o partition partition.cpp

Examples
$ echo 4 3 5 5 3 | ./partition
YES

$ echo {1..28} | ./partition
YES # after a slight delay

$ echo 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 29 | ./partition
NO # after a long delay

$ echo {1..29} | ./partition
NO # immediately

Limitations

upper limit is 29 elements, could use unsigned long long int to extend to 61 or 62 elements, but the basic idea is the same

C#, 169 bytes
It enumerates through a series of arrays of the same length as the input.  Each array contains a list of +1 and -1 values which are multiplied against each corresponding input value.  If the sum of the multiplied arrays is zero, then some numbers sum to the same as the rest of the numbers.
For the sake of golfing the +1/-1 array is actually +2/0 and 1 subtracted from it when used.
Example:
input    = n = {  4,  3,  5,  5,  3 }
polarity = p = { +1, +1, -1, -1, +1 }
n*p      =     { +4, +3, -5, -5, +3 }
result   = x = Sum(n*p) == 0

Code:
bool S(int[]n){
    int i=0,l=n.Length,s;
    var x=false;
    var p=new int[l+1];
    while(i>=0){
        s=0;
        for(i=l;i-->0;)
            s+=n[i]*(p[i]-1);
        x|=s==0;
        for(i=l;p[i]<1&&i-->0;)
            p[i]=2-p[i];
    }
    return x;
}

Test:
Console.WriteLine(S(new[]{4,3,5,5,3}));
True

Console.WriteLine(S(new[]{1,3}));
False

Console.WriteLine(S(new[]{2}));
False

Console.WriteLine(S(new[]{0}));
True
// Presuming Sum{0} == Sum{}

source: Stack Exchange

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

sort: votes


text:
Unreliable data stream
Your challenge is to golf a program that mimics a data transmission stream. Your program should read input from stdin and output it directly to stdout. To make the problem more interesting, the output stream is 'faulty', and must meet several requirements:

There should be a 10% chance that each character is shifted +1 ascii code (ex 'a' becomes 'b', '9' becomes ':'), etc.
The input and output should only cover printable ascii values ('!' through '~', decimal 33 through decimal 126, inclusive).  If the random +1 occurs on a '~' (decimal 126), a '!' (decimal 33) should be output instead.
If three characters are randomly shifted in a row, the program should output "ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR" (trailing newline optional) and halt execution.

To simplify the problem, here are a few other criteria:

You can assume the input will always be valid; that is, it will only contain values '!' through '~'.
The program should continue on until three characters are randomly shifted in a row; it's safe to assume that EOF will never occur.
The randomness must differ across runs; if your random number generator needs to be seeded to get an unique result each run, then your code needs to seed it.
You must write a program, not a function.
You must take input from stdin and write output to stdout.
You may not use any external libraries or resources.
Your code must have a freely available and working intrepreter or compiler.

Standard code-golf rules apply.  Winner is whoever has the shortest program posted two weeks from now (Thursday, Feb 20th, 2014).

Is it OK to assume that there will be an EOF? In particular, can I read all the input into memory before producing any output, like GolfScript normally does?

@IlmariKaronen probably not; it wouldn't be possible to guarantee enough input for your RNG to make 3 consecutive errors.

@IlmariKaronen as per the specs, EOF will never occur.  The only exit condition is three characters flipping in a row.

Befunge-98, 166 159 156 155 148
This one improves on the other excellent Befunge answer with the correct probability (1/10) and is slightly more compact:
~>?#v?1+\1>+\:'~1+-4k#x07_$'!>,:3-!#v_
>#?>>>\$\0^>
^<<
A"##  "CT YOUR SYSTEM ADMINISTRATOR"<@,kM'"ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONT

Some implementation comments: x is used in two places as a "goto." Edge wrapping is (ab)used extensively, including control flowing through the space gap between ASE and CONTACT. The "3-in-a-row" counter is kept at the bottom of the stack; backslash is used to swap to and access it where needed.

This is quality befunge right here. I really like what you did with the string at the end, to allow the entry point where you needed it

I tried a lot of things this weekend to whittle this down and I can't, even by a single character. But I haven't given up! :)

Restructured the RNG block to use only three ? instructions (one of which is hit by two paths, so the probability is still exactly 1/10) and made some other minor tweaks to shave off 7 more chars!

Congrats on winning!

C, 168 characters
i;main(c){for(srand(&c);i++<3;putchar(rand()%10?i=0,c:c-126?c+1:33))c=getchar();
puts("ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR");}

This solution's seeding of the PRNG takes advantage of the fact that modern OSes change the stack's location in memory on each run, as a basic measure against stack-smashing exploits.

You can get rid of the variable c completely by moving the getchar() call into putchar() and using some fancy math...

I believe you still need to have c so you can test getchar()'s value against 126 in addition to passing it to putchar().

Hence the fancy math...I believe putchar((getchar()-33+(rand()%10?i=0:1))%94+33)) should work.  Using your solution as a base, it gets me down to 165 characters.

Ruby, 156
e=3
putc(($_.ord-33+r=rand(10)/9)%94+33)/e=r>0?e-r :3while gets(1)rescue$><<'ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR'

Could you explain what is that :3while?

@UriAgassi the :3 is actually the end of this statement: e=r>0?e-r :3 which sets the value of e (number of sequential errors remaining before we abort) based on r (1 if the last character processed was an error, 0 if not).  It's just pushed up against the while to save space :>

And ruby recognizes the while without a space before it? That is so obscure and unreadable! ;)

C# - 346 330 313 309 297 288 278 274
Kinda long but does the job.
using System;class m{static void Main(){int c=0;var r=new Random();while(c<3){int n=r.Next(10);var j=Console.In.Read();Console.Write((char)(n<1?j>'}'?'!':++j:j));c=n<1?c+1:0;}Console.Write("ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR");}}

c=n==0?c+1:0 is shorter than c+=(n==0?1:-c)...

(n==1?1:0) is shorter than (n==1?n--:(--n-n)) (and then of course change the later n==0 to n==1)

Thanks a lot, you've nearly rewritten the entire program!

You're amazing.

Hm, why the (false)? If anything, don’t you want (true)?

278: using System;class m{static void Main(){int c=0;var r=new Random();while(c<3){int n=r.Next(10);var j=Console.ReadKey(true).KeyChar;Console.Write(n<1?j=='~'?'!':++j:j);c=n<1?c+1:0;}Console.Write("ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR");}}

Yeah, forgot about that. Also, that doesn't compile.

It says "Error CS1056: Unexpected character `' (CS1056) (h)"

StackExchange adds two characters in there (U+200B (ZERO WIDTH SPACE) and U+200C (ZERO WIDTH NON-JOINER)). You’ll need to remove those.

277: http://pastebin.com/raw.php?i=5aSfmQhU

BTW a friend of mine just pointed out that Console.ReadKey() does not, strictly speaking, constitute stdin as required by the challenge... :(

I think it uses Console.In internally which is stdin.

No, it does not. It uses a special WinAPI call, and it works only with keyboard input. Try redirecting a file into your program and it won’t work.

I'm using Mono and it works but it ignores EOF, as specified in the specification.

C, 260 257 237 225 189 174
My first golf, suggestions appreciated.
n;main(){for(srand(&n);n!=3;putchar((getchar()+(rand()%10==7?!!++n:(n=0))-33%94)+33));puts("ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR");}

7 is very random.
Compiling will give you warnings.
Thanks for help from breadbox and Josh.

Initial suggestions: Leave off the #include; C will accept (with warnings) calls to undeclared functions (within limits). Use global variables to get automatic zero-initialization. Find ways to use the ternary operator instead of if/else statements. Using for in place of while gives more opportunities for reducing the number of top-level statements and omitting the brackets around the loop body. Lots more that could be mentioned: examine other C solutions on this site.

Thanks for the suggestions - I thought gcc would complain without at least stdio, but apparently it's cool. I also had a silly variable still named 'count'. It looks like the for loop cut down a lot, too.

You can declare n and c at the global scope.  This would allow you to drop the int declaration as well as letting the initialization to zero be automatic.

I decided to use c's uninitialized value in srand. I guess I could use &c or &n instead, which is what breadbox used.

I love the trick you came up with to eliminate the need for your second variable!

But, as I posted on @breadbox's answer, I think it can be done slightly shorter...but at that point, your two answers are just converging on one another!

The problem is the part that wraps around the +1 from ~to !. If that can be reduced by using one additional variable, the total length might be decreased...

That's why you should mod by 94 instead of 93.  Values 0-93 will remain the same, but in the case you get a +1 on ~ you'll find 94%94==0, which will give you the wrap around.

7 may be random, but it's not guaranteed to be random. http://xkcd.com/221/

Batch - 359
Open to suggestions to make it completely compliant to the challenge rules.
I will work on making it smaller / better - I wanted to post it while it's working, before I break it.
@echo off&setLocal enableDelayedExpansion&for /L %%a in (33,1,126)do cmd/cexit %%a&set %%a=!=exitcodeAscii!
set a=%~1
:l
if defined a (
set c=!a:~0,1!&set a=!a:~1!&set b=0&set/ar=%RANDOM%*10/32768+1
if !r!==1 for /L %%b in (33,1,126)do (
if !b!==1 echo !%%b!>>f
if "!c!"=="!%%b!" set b=1
)
if !b!==1 set/pc=<f&del f
set o=%o%!c!&goto l
)
echo %o%

There are definitely quite a few ways to golf it down.
h:\uprof>UDS.bat "test ing"
tesu inh

h:\uprof>UDS.bat "test ing"
tfsu ing

Un-golfed -
@echo off
setLocal enableDelayedExpansion
for /L %%a in (33,1,126) do (
    cmd /c exit %%a
    set %%a=!=exitcodeAscii!
)
set a=%~1
:l
if defined a (
    set c=!a:~0,1!
    set a=!a:~1!
    set b=0
    set /a r=%RANDOM%*10/32768+1
    if !r!==1 for /L %%b in (33,1,126) do (
        if !b!==1  echo !%%b!>>f
        if "!c!"=="!%%b!" set b=1
    )
    if !b!==1 set /p c=<f& del f
    set o=%o%!c!
    goto l
)
echo %o%

sh bash, on OSX, 211, 208, 203, 200, 196, 185
IFS=
while read -n1 a;do
((RANDOM>3276))&&echo $a&&t=0||{
tr !-}~ \"-~!<<<$a
((t++==2))&&echo ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR&&exit
}
done

Slightly better than 10% since random will generate numbers between 0 and 32767, so really it's 3,277 in 32,768 odds (10.0006%).
Thanks, @Gilles (but not sure what you mean about the while restructure.  had some other ideas in the shower, too.

Since you're using bash features (so this is a bash solution, really), you can shorten [ $RANDOM -gt 3276 ] to ((RANDOM>3276)) and [ $[t++] -eq 2 ] to ((t++==2)). I think you can also save a few characters by restructuring as while read -n1 a;((RANDOM>3276))&&….

@Gilles Thanks.  What do you mean about the while read... part?

Sorry, I truncated in the wrong place. Make the loop while …;do :;done or until …;do :;done, you should be able to shave a few characters.

PHP 190
that's the further i could golf it, but i think it's pretty good that it is less than 100 chars from the leading
<? while($a=fread(STDIN,1)){if(!rand(0,9)){$a=$a=='~'?'!':chr(ord($a)+1);@$i+=1;$i>2&&die("ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR");}else$i=0;echo$a;}

Vyxal s, 63 bytes
ƛ₀℅‹¬;:ĠṠ3<A[?C+₇‹33VC|`»ȯ ¬⋎ 4625: un₆¬×→ »ȯ, ƛṙ λḊ λ¢ ƛβ ↑Ẇ`⇧

Try it Online!
ƛ    ;                      # Map input to...
 ₀℅‹¬                       # 1 with chance 10%
      :ĠṠ                   # Get sums of groups of identical run lengths
         3<A[               # If all are less than 3 (no error)
             ?C+            # Add randoms to input charcodes
                ₇‹33V       # Replace 127 with 33
                     C      # Get charcodes
                      |`... # Else output the string

05AB1E, 65 64 63 bytes
v9°Ω})DÅγsÏ3åi.•kUàø¸àŸ´•uŽIZ‘‰ëƒË ÿ: ÿ‰ë,‚µ€Í€ž‚«¢é‘ësÇ+ƵQ33:ç

Try it online!

JavaScript (Node.js), 215 bytes
for(z=1,r='';z<<=9;z|=y+''==x,r+=y>'~'?'!':y)require('fs').readSync(0,x=Buffer(1),0,1),y=x.map(t=>t+(Math.random()<.1));console.log(r+'ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR')

Try it online!

Kotlin, 357 355 bytes
2 bytes saved after discovering this
import java.util.*import kotlin.random.*import kotlin.random.Random
var c=0
fun main(){var a =Scanner(System.`in`).next().toMutableList()
for(i in a.indices){if(Random.nextUInt()%10u<1u){c++;if(a[i]=='~')a[i]='!' else a[i]=a[i]+1}else if(c<3)c=0}
if(c>2)print("ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR")else print(a)}

Try it online!
I've noticed that adding newlines causes the same amount of bytes to accumulate compared to adding a semicolon. hence why it isnYt so one liney.
this of course does not work with tio.run as it requires input.
If you see any places where there could be any kind of improvement please tell.
Ungolfed version
import java.util.*import kotlin.random.*import kotlin.random.Random
var c =0
fun main()
{
    var a = Scanner(System.`in`).next().toMutableList()
    for(i in a.indices){
        if(Random.nextUInt()%10u<1u)
        {
            c++
            if(a[i]=='~') a[i]='!'
            else a[i]=a[i]+1
        }
        else if(c<3)c=0
    }
    if(c>2) print("ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR")
    else print(a)
}

 Try it online!
    import java.util.*;import kotlin.random.Random;import kotlin.random.*
    var c=0
    fun main(){var a =Scanner(System.`in`).next().toMutableList()
    for(i in a.indices){if(Random.nextUInt()%10u<1u){c++;if(a[i]=='~')a[i]='!' else a[i]=a[i]+1}else if(c<3)c=0}
    if(c>2)print("ERROR CODE 4625: UNRECOVERABLE ERROR, PLEASE CONTACT YOUR SYSTEM ADMINISTRATOR")else print(a)}

all_licenses: 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/


text:
Animated sound waveform
Make an animated sound waveform using any programming language your prefer, the squares of the spectrum can be of a single color (no rainbow effect).
The animation must be infinite and not a loop sequence (must be a random animation).
You can use any kind of external library you prefer.
This is a code-golf so the shortest code will win.
Example of waveform:

(a screenshot of the result is appreciated)
Edit:
I thought was obvious,but the waveform must be horizontal.

I think the winning answer is going to look quite unlike your example unless you at least specify minimum numbers of segments in the horizontal and vertical directions and a minimum number of frames before the animation repeats. Even then, the results won't be very realistic if the values in each channel are changed randomly.

This is not a spectrum. Did you mean "waveform" or "bar plot"?

Didn't know the exact name,thanks

Define "infinite"; PRNGs can have periods anywhere from 2^32 to 2^19934, both of which aren't quite infinite.

APL (61)
{∇n⊣⎕DL.1⊣⎕SM←1 1,⍨⊂' '⍪⊖⍉↑⍴∘'▇'¨,0,⍪n←24⌊0⌈⍵+3-?5/⍨⍴⍵}?24/40

It starts with random-sized bars, and changes the height of each of the bars by a random number between -2 and 2 each frame.
Screenshot:

INVALID TOKEN trying with tryapl?

@FezVrasta: Use Dyalog APL. TryAPL is very limited, my guess is most of the APL code on this site won't run there.

Ruby 96
The program takes two arguments which are the height and width of the "graphics", so to make it fill a 80x24 terminal, run it with ruby spectrum.rb 80 24
w,h=$*.map &:to_i
loop{o=(1..w).map{rand h}
h.times{|i|puts o.map{|j|j>i ?" ":?#}*''}
sleep 0.1}

Displays something like this in the terminal:
       #
       #
     ###  #
  #  ###  #
  ## ###  ##
  ## #### ##
 ######## ##
######### ##       #
######### ##      ##
######### ##      ##
######### ##   #####
#############  #####
#############  #####
####################

Ruby 22
With horizontal bars and fixed width (heigh = height of terminal)
loop{puts ?#*rand(24)}

Bash and Linux utils, 79
The question specifications are a little imprecise, so here is my vertically-scrolling ascii-art interpretation that uses real sound input samples (much more interesting than random data)
arecord -q|xxd -g1 -c1|while read _ s _;do printf "%$[0x$s-88]s
"|tr " " =;done

Output for a few milliseconds of Rachmaninov's Piano Concerto #2:

=========================================
======================================
=======================================
===========================================
========================================
======================================
========================================
=========================================
========================================
======================================
========================================
==========================================
========================================
======================================
=========================================
=========================================

well.. the example is horizontal actually.

@FezVrasta - True, though it wasn't explicitly stated.  Horizontal scrolling will be much harder in just about any ascii-art environment.  I was more interested in this for the fun of using real sound input samples

Batch - 193
@echo off&setLocal enableDelayedExpansion
:s
set/ar=%RANDOM%*17/32768+4&for /l %%a in (20,-1,1)do (if %%a GEQ %r% (set l%%a= !l%%a!) else set l%%a=Û!l%%a!)&echo !l%%a!
ping 1>nul&cls&@goto s

Un-golfed -
@echo off
setLocal enableDelayedExpansion
:s
set /a r=%RANDOM%*17/32768+4
for /l %%a in (20,-1,1) do (
    if %%a GEQ %r% (set l%%a= !l%%a!) else set l%%a=Û!l%%a!
) & echo !l%%a!
ping 1>nul
cls
goto s

This will work assuming you have an infinitely wide terminal window - I'll work on the text wrapping...
Not the prettiest - but it does the trick - 295 bytes
@echo off&setLocal enableDelayedExpansion
for /f "tokens=2" %%w in ('mode con^|findstr Col')do set w=%%w
:s
mode con:cols=%w% lines=20
set/ar=%RANDOM%*17/32768+4&for /l %%a in (20,-1,1)do (if %%a GEQ %r% (set l%%a= !l%%a!) else set l%%a=Û!l%%a!)&echo !l%%a!
set/aw+=1&ping 1>nul&cls&@goto s

Mathematica 105
This animates continually, at approximately 24 frames per second, as if it were capturing sound in real-time. However, it is not processing sound at all.  (That would would require considerably more code.)
data1@n_ := NormalDistribution[0, 1]~RandomVariate~150;
Animate[Histogram[data1@a, Axes -> False], {a, 0, Infinity}]

Matlab (43 / 37)
while(1)hist(randn(100,1));pause(1/24);end

Inspired by the Mathematica approach, this is just a histogram of 100 random, normally distributed numbers. the plot regenerates at 1/24 second per frame (24 fps).

Shorter, Stranger version (37):
while(1)bar(randn(9,1));pause(.1);end

This version includes negative numbers, so it doesn't exactly fit the requirements.


text:
Refactor variable names in JavaScript code
Your challenge today is to refactor JavaScript code. You will take three strings as input; a JavaScript string, a old variable name, and the name you want to refactor it to. For example, an input of
"var x = 100; alert(x);", "x", "num"

Will output
"var num = 100; alert(num);"

Here's a more advanced test case:
"var gb = 1; var g = bg = 2; gb = bg = g = function(gg) { alert(gb); };
var str = 'g gb bg gg'; var regexp = /gb gb gb/g; //comment gb gb g g
/*gb gb g g*/", "gb", "aaa"

It should output
var aaa = 1; var g = bg = 2; aaa = bg = g = function(gg) { alert(aaa); };
var str = 'g gb bg gg'; var regexp = /gb gb g g/g; //comment gb gb g g
/*gb gb g g*/

And the same JS input with the other arguments "g", "aaa" should output
var gb = 1; var aaa = bg = 2; gb = bg = aaa = function(gg) { alert(gb); };
var str = 'g gb bg gg'; var regexp = /gb gb gb/g; //comment gb gb g g
/*gb gb g g*/

Here is one last much more complicated test case:
var g = 1; "g\"g"; "g'"; g; '"g\'g"g'; /g"\/*\//g; g; "// /*"; g; "*/"

It should output, with other parameters "g" and "a", this:
var a = 1; "g\"g"; "g'"; a; '"g\'g"g'; /g"\/*\//g; a; "// /*"; a; "*/"

(sidenote: I really like /g"\/*\//g; I think that's just evil :D)

Full specification:

For simplicity, you may ignore scope. Ex. "var a=1; function(){var a=2;}; var o={a: 3}", "a", "b" can output var b=1; function(){var b=2;}; var o={b: 3}.
Text in strings ('...' and "..."), regexps and their modifiers (/.../...), and comments (//...\n and /*...*/) must not be modified.
Also for simplicity, a valid identifier is one that starts with a letter, dollar sign, or underscore, and the rest of the characters are letters, numbers, dollar signs, or underscores.
You may assume that the input contains no syntax errors.
This is code-golf, so the shortest code in bytes will win.
If you use network access, all bytes downloaded from the network count towards your score.
You must use an actual programming language. No IDE solutions, like emacs or vim keystrokes. ;)

wait, what's wrong with vim keystrokes? :-)

do we have to support /[/]/ (character classes containing unescaped slash characters)? Ruby doesn't.

Asking the same as @JanDvorak above: do we need to support /[/]/ (character classes containing unescaped slash characters)? Most languages with built-in support for regular expressions don't; however, JavaScript does.

@toothbrush No, you do not. (Sorry for forgetting to reply ;-))

Ruby, 134 (113?) characters
*c,o,n=*$<;puts (c*?\n).gsub(/('|")((\\?+.)*?)\1|\/\*[\s\S]*?\*\/|\/\/.*|\/(\[\g<2>\]|\g<2>)+?\/\w*|([\w$]+)/){$5==o.chop&&n.chop||$&}

Unicode is not supported. If Unicode identifiers are to be supported, replace \w with [[:word:]]  and [\w$] with ([[:word:]]|\$) (and adjust the backreferences).
If unescaped slashes inside regexp literals (such as /[/]/) don't need to be supported, we can handle them together with string literals (116 characters). This also gives us string flags:
*c,o,n=*$<;puts (c*?\n).gsub(/\/\*[\s\S]*?\*\/|\/\/.*|('|"|\/)((\\?+.)*?)\1\w*|([\w$]+)/){$4==o.chop&&n.chop||$&}

Ungolfed version:
*code, old, new = *$<

puts code.join("\n").gsub (/
     ('|")((\\?+.)*?)\1           #strings
   | \/\*[\s\S]*?\*\/             #multiline comments
   | \/\/.*                       #single-line comments
   | \/(\[\g<2>\]|\g<2>)+?\/\w*   #regexes
   | ([\w$]+)                     #identifiers and keywords
/x){
  if $5 == old.chop then new.chop else $& end
}

Perl, 122
@a=<>;chomp(($y,$x)=(pop@a,pop@a));$_=join'',@a;s!//.*?\n|/\*.*?\*/|("|'|/)(\\?+.)*?\1\w*|([\w\$]+)!$3eq$x?$y:$&!sge;print

i.e. (semi-ungolfed)
@a=<>;
chomp(($y,$x)=(pop@a,pop@a));
$_=join'',@a;
s!//.*?\n|/\*.*?\*/|("|'|/)(\\?+.)*?\1\w*|([\w\$]+)!$3eq$x?$y:$&!sge;
print

practically the same as Ruby's short version answer (except I didn't knew about possessive quantifiers trick and my first take was slightly longer). Regexp is shorter, but 'I/O' part spoils everything (Perl can't do (@a,$x,$y)=<>), and my assumption (the same I see in Ruby's, if I'm not mistaken) was we feed JS string line by line through STDIN, followed by 'old name' and 'new name' on separate lines.

ECMAScript 6, 136 bytes
(s,o,n)=>s.replace(/\/\/.*?\n|\/\*[\s\S]+?\*\/|('|")(\\\1|[^\1])+?\1|\/(\\u[a-f\d]{4}|\\.|[^\/])+\/[angi]*|[a-z_$][\w$]*/gi,x=>x==o?n:x)

Runs fine on any recent version of Firefox/Google Chrome.

It creates a function with three parameters:

The code
The old variable name
The new variable name

See this JSFiddle for an example.


text:
Darts meets Codegolf
I think everyone is familiar with the game of darts. For those that don't understand the scores, here is a useful link.
The board
A dartboard can be compared to a pie cut in 20 pieces.
Each piece is divided in 4 sections.

a small outer ring called "double" (points x2)
a big ring called "single" (points x1)
another small ring called "triple" (points x3)
another big ring called "single" (points x1)

In the middle of the board are 2 more rings, a green one and red one (classic board)

Red ring, at the center of the board, is called "bullseye" or "double bull" and is good for 50 points. This one counts as a double and because of that it's allowed to checkout with it.
Green ring is called "bull", "single bull", or simply "25" and counts as a single.

Challenge
Find all checkout possibilities with 3 darts or less.
The user can enter an integer and you will have to check if it's possible to get the score to 0 with 3 darts (or fewer).
Examples
example 1:
Input: 170
Output: T20, T20, Bullseye

Example 2:
Input: 6
Output: D3;
        S3,S1,D1;
        S2,D2;
        S2,S2,D1;
        D2,D1;
        S4,D1;
        D1,D1,D1;
        S1,S1,D2;
        T1,S1,D1;

Example 3:
Input: 169
Output: No possible checkout!

Rules

Basic dart rules, you must end with a double (outer ring of the board or bullseye)
No use of external resources.
Hard coding of possible checkouts is allowed, but remember, this is codegolf, it won't get your code short ;)
Cells to hit will be displayed in format C+N where C = T for Triple, D for double and S for single.
bullseye can be called bullseye or DB, DBull or something similar.

Possible checkouts
To get you started, the highest possible checkout is 170.
169, 168, 166, 165, 163, 162, and 159 are not possible in 3 darts.
The lowest possible checkout is 2.
In addition
This isn't a requirement: add in a possibility to show all possible checkouts for all scores.  Basically because I wonder how many combinations are possible :P
Winner will be the one with the shortest code.
Happy coding.

The first listed rule is incorrect (and invalidates the first example) because you can also finish on a bull. It would be helpful to clarify whether you're expecting a program, a function, or both; and how much flexibility there is in the output format.

@PeterTaylor I will make this more clear, since the green ring and red ring in the middle are called Single bull and bullseye or double bull.

+1 for excellent question. This is the kind of real world problem that computers are good at solving. You can throw a 6 in S2 D1 D1, which is missing from your example output (it should be there, unless you consider S2 S2 D1 and D1 D1 D1 to be the same, but they are clearly listed as different.) There are some minor ambiguities about output format and counting of results which I will address in my answer.

C++  248 / 228  230 / 214 chars
Rev 0:
int f(int s){char m[4]="SDT";int t=0;for(int b=2;b<77;b+=1+(b==62)*12)for(int a=2;a<77;a+=1+(a==62)*12){int c=s-a/3*(a%3+1)-b/3*(b%3+1);if(((c+38)/40==1)|(c==50)&&(c%2==0)&(a>=b)){printf("%c%d %c%d D%d\n",m[a%3],a/3,m[b%3],b/3,c/2);t++;}}return t;}

Rev 1. Saved some characters by declaring all variables at once, and by eliminating unnecessary brackets. It turns out that in C++ all logic and bitwise and/or are lower precedence than comparisions.
int f(int s){char m[4]="SDT";int a,b,c,t=0;for(b=2;b<77;b+=1+(b==62)*12)for(a=2;a<77;a+=1+(a==62)*12){c=s-a/3*(a%3+1)-b/3*(b%3+1);if(c>1&c<41|c==50&&c%2==0&a>=b){printf("%c%d %c%d D%d\n",m[a%3],a/3,m[b%3],b/3,c/2);t++;}}return t;}

I did a function rather than program, as others have done. It returns the total number of possibilities found. It can be reduced from 230 to 214 characters by eliminating the totalising feature.
Sample output, score 6:

I count different first and second darts as the same combination, as the OP has done (example:
T1 S1 D1 = S1 T1 D1) even though this costs an extra 7 characters. I always list the higher score first (ignoring doubling and trebling) as I figure this is more relevant to the player (who may change his strategy if he misses with the first dart.) For the same reason I list the darts in order according to the second dart. I consider the 3rd dart to be completely different to the other two, therefore I consider D1 D2 and D2 D1 to be different cases whereas the OP has them listed as the same.
With this system of counting I get 42336 total possibilities, the same as mmumboss. Counting different first and second darts as different combinations, this goes up to 83349.
I haven't used a for loop with sets as others have done (I'm fairly new to C++ and I don't even know if it's possible.) Instead I abuse a conditional in the loop increment to jump from 20 up to 25. I use the variable from a single loop to encode all possible scores for a single dart, like this: S1 D1 T1 S2 D2 T2 etc. with modulus and division to decode. This saves on the verbosity of declaring more for loops, although it makes expressions more complicated.
The result of this is that an unused dart is shown as T0, but I think it's clear what is meant, especially as (by considering different first and second darts as the same combination) I have been able to group them all together at the beginning of my output.
Ungolfed version here. A couple of other features are use of the & and && operators selectively with | in such a way as to give the order of precedence I want without brackets.
int f(int s)
{
  char m[4] = "SDT";
  int a,b,c,t=0;
    for (b = 2; b < 77; b += 1 + (b == 62) * 12)
      for (a = 2; a < 77; a += 1 + (a == 62) * 12){
        c = s - a / 3 * (a % 3 + 1) - b / 3 * (b % 3 + 1);
        if (c>1 & c<41 | c == 50 && c % 2 == 0 & a >= b){
          printf("%c%d %c%d D%d\n", m[a % 3], a / 3, m[b % 3], b / 3, c / 2);
          t++;
        }
     }
   return t;
}

204 bytes

MATLAB (299 249 241 chars)
This is my first serious golfing. My first attempt (136 chars) gives the correct result, but not with the correct formatting. It gives all possibilities looking at the number of points for each dart. This means that single 20 and double 10 do have a separate entry, however, they are both displayed as 20. Of course the last dart is always a double.
function f(x);u=[1:20 25].';y=[u;2*u; 3*u(1:end-1)];v=combvec([combnk(y,2);[y y];[zeros(62,1) y];[0 0]].',y(22:42).').';v(sum(v,2)==x,:)

In the second attempt the formatting is improved, which has of course increased the number of characters:
function f(x);h=.1;u=h+[1:20,25].';y=[u;2*u;3*u(1:20)];v=combvec([combnk(y,2);[y,y];h*ones(62,1),y];[h,h]].',y(22:42).').';t='SDT';r=@fix;strrep(arrayfun(@(x)[t(int8((x-r(x))/h)),num2str(h*r(x)/(x-r(x)))],v(sum(r(v),2)==x,:),'un',0),'S0','')

Improved from 299 to 249 characters, while at the same time even improving the output formatting. For this improved version the output for the example cases is:
f(170):
'T20'    'T20'    'D25'

f(6):
'S1'    'S3'    'D1'
'S1'    'T1'    'D1'
'S2'    'D1'    'D1'
'S2'    'S2'    'D1'
'D1'    'D1'    'D1'
''      'S4'    'D1'
''      'D2'    'D1'
'S1'    'S1'    'D2'
''      'S2'    'D2'
''      'D1'    'D2'
''      ''      'D3'

f(169):
Empty cell array: 0-by-3

Additional:
According to my calculation skills there are a grand total of 42336 possibilities to end the dart game.

Result should show what cell to hit, so in the first it says 60 60 50 should be T20 T20 Bullseye. I'll make this more clear in the question. Nice going though, almost there :)

Yes, I already pointed that out myself. This is the first unfinished attempt. ;)

oops sorry lol, I was to curious about the code and result I didnt read the story above xD

This should be better. Only thing I can think of is that the bull is still displayed as 25. But I hope this is okay, since otherwise there is no other possibility than to hard code this, which is simply no fun.

Single bull as 25 is indeed acceptable, its the only way you can throw 25 with 1 dart anyhow

By the way: according to my calculation skills there are 42336 possibilities to end the dart game. ;)

+1 because I counted the same way as you and got the same result. This means both our programs are working B-D

Ruby (260 chars)
"The last one should be a double" was the missing piece - couldn't figure out why 168 should not have results...:
c=->n,d=3{d=d-1;r=[];n==0?[r]:(d>=0&&n>0?(o='0SDT';((1..20).map{|p|(1..3).map{|h|c.(n-p*h,d).map{|m|r<<["#{o[h]}#{p}"]+m}}};c.(n-50,d).map{|m|r<<['DB']+m};c.(n-25,d).map{|m|r<<[?B]+m})):1;r.select{|*i,j|j[?D]}.tap{|x|d!=2?1:puts(x.map{|i|"#{i.join(?,)};"})})}

c.(170)
T20,T20,DB;

c.(6)
S1,S1,D2;
S1,T1,D1;
S1,S3,D1;
D1,D1,D1;
D1,S2,D1;
D1,D2;
T1,S1,D1;
S2,D1,D1;
S2,S2,D1;
S2,D2;
D2,D1;
S3,S1,D1;
D3;
S4,D1;

Python 2.7 (270 chars)
Not sure python will allow a one-liner, but he it is in three.
def f(n):
 a={'%s%s'%('0SDT'[i],n):n*i for n in range(1,21)+[25] for i in [1,2,3] if n*i<75};a['']=0
 for r in [' '.join(h[:3]) for h in [(x,y,z,a[x]+a[y]+a[z]) for x in a for y in a for z in {k:a[k] for k in a if 'D' in k}] if h[3]==n and len(h[0])<=len(h[1])]:print r

Or 278+ chars with a proper 'No Checkout' message (e.g. 290 here):
def f(n):
 a={'%s%s'%('0SDT'[i],n):n*i for n in range(1,21)+[25] for i in [1,2,3] if n*i<75};a['']=0;
 for r in [' '.join(h[:3]) for h in [(x,y,z,a[x]+a[y]+a[z]) for x in a for y in a for z in {k:a[k] for k in a if 'D' in k}] if h[3]==n and len(h[0])<=len(h[1])] or ['No Checkout']:print r

Here we go:
f(170)
T20 T20 D25

f(6)
S3 S1 D1
S2 S2 D1
S2 D1 D1
S1 S3 D1
S1 S1 D2
S1 T1 D1
 S2 D2
 S4 D1
  D3
 D2 D1
 D1 D2
T1 S1 D1
D1 S2 D1
D1 D1 D1

f(169)
No Checkout

Things I'm not happy with:
for x in a for y in a for z in

This is over 10% of the total. Is there a more compact way without itertools etc?
and len(h[0])<=len(h[1])

This is used to prevent duplicates in the case of a two dart finish (e.g. ['', 'S1', 'D1'] and ['S1', '', 'D1']). I deem order to matter (hey - the last dart has to be a double, so clearly order matters), but the non-throw is a special case.

05AB1E, 43 bytes
20L25ª3Lâ¨Ðʒθ<}Uã«XâXìε˜2ô}ʒPOQ}εε`…TSDsèì

Pretty slow.. Outputs as a list of lists, or an empty list if no finish is possible. My bulls are S25 and D25; if this is not allowed I can change it.
Try it online or verify a few test cases at once.
Explanation:
There are a couple of steps:
1) Create a list of all possible single, double, and triple darts:
20L         # Create a list in the range [1,20]
   25ª      # Append 25 to this list
      3L    # Create a list in the range [1,3]
        â   # Create all possible pairs of these two lists
         ¨  # Remove the last pair (which is the Triple Bull)
            # Now we have a list of all possible darts:
            #  [[1,1],[1,2],[1,3],[2,1],...,[20,3],[25,1],[25,2]]

2) Get all possible finishers (ending with a double) of up to 3 darts:
Ð           # Triplicate this list
 ʒ  }       # Filter the top copy by:
  θ         #  Where the last value
   <        #  Decremented by 1 is truthy (==1), so all doubles
     U      # Pop this filtered list of doubles, and store it in variable `X`
 ã          # Create all possible pairs of the list of darts with itself
  «         # Merge it with the list of darts
            # We now have a list containing all possible variations for 1 or 2 darts
 Xâ         # Then create all possible pairs of these with the doubles from variable `X`
   Xì       # And prepend the doubles themselves as well
            # Now we have all possible variations of 1 double; 1 dart + 1 double;
            # or 2 darts + 1 double
     ε   }  # Map each to:
      ˜     #  Deep-flatten the list
       2ô   #  And split it into parts of size 2
            #  (this is to convert for example a 2 darts + 1 double from
            #   [[[20,3],[5,1]],[1,2]] to [[20,3],[5,1],[1,2]])
            # Now we have a list of all possible finishers of up to 3 darts

3) Only keep those for which the total score is equal to the input-integer:
ʒ   }       # Filter this list by:
 P          #  Get the product of each inner-most lists
            #   i.e. [[20,3],[5,1],[1,2]] → [60,5,2]
  O         #  Take the sum of those
            #   i.e. [60,5,2] → 67
   Q        #  Check if this value is equal to the (implicit) input-integer
            # Now we only have the finishers left with a total value equal to the input

4) Convert the data to the pretty-printed result-list (i.e [[20,3],[5,1],[1,2]] becomes ["T20","S5","D2"]):
ε           # Map each of the remaining finishers of up to 3 darts to:
 ε          #  Map each inner list to:
  `         #   Push both values separately to the stack ([20,3] → 20 and 3)
   …TSD     #   Push string "TSD"
       s    #   Swap to get the integer for single/double/triple at the top of the stack
        è   #   Use it to index into the string
            #   NOTE: 05AB1E has 0-based indexing with automatic wraparound,
            #   so the triple 3 will wrap around to index 0 for character "T"
         ì  #   Prepend this character in front of the dart-value
            # (after which the result is output implicitly as result)

Kotlin, 254 bytes
Note: algorythm is based on Level River St's C++ answer.
{s:Int->val m="SDT"
var c=0
val r=(2..62).toList()+listOf(75,76)
for(t in r)for(o in r){val l=s-o/3*(o%3+1)-t/3*(t%3+1)
if((l>1&&l<41||l==50)&&l%2==0&&o>=t){println("${m[o%3]}${o/3},${m[t%3]}${t/3},D${l/2}")
c++}}
if(c<1)println("No possible checkout!")}

Try it online!

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


text:
Concert tuning WAV
I used to play the oboe, the instrument that is, for some reason, used to tune the orchestra to A440. Anyways, continuing on with my story, I was bad at it and quit.
Write a program that generates a valid, full scale, 5 second, WAV file with a sample rate of 44.1 kHz that plays a 440 Hz (+3/-1 Hz) tone.  Your code is responsible for generating the structure of the file format; no external resources.
+75 penalty if the tone does not approximate a sine wave (harmonic power must be less than 1% of the fundamental--a good polynomial approximation should be able to exceed 20 dB; I think parabolic is about -28 dB)

define "sine wave". Is it okay if I  use a truncated triangle wave, a parabolic wave or (say) a 20-line approximation, or I have to get it right within a few ULP?

Specifically, having a measurable metric as part of the goal (say, using Audacity spectral analysis) would be optimal.

Can you clarify rules for amplitude? Does it have to be 0 dBFS? Or, taking it to the extreme, can I use only 1 bit, and just toggle the bit 880 times a second?

@dvnrrs yeah, full scale is basically what I was going for in saying "audible" (was trying to avoid 1 LSB WAVs).

@Tobia I loosened "sine" to be things that are very-nearly-sinusoidal, if a polynomial or other approximation would work better.

GolfScript, 89 bytes
This GolfScript program contains non-printable characters, so I'm providing it as a hex dump.  On Unixish systems with the xxd program installed, you can feed this hex dump to xxd -r to reconstruct the actual program.
0000000: 2752 4946 4678 5d03 0057 4156 4566 6d74  'RIFFx]..WAVEfmt
0000010: 2010 0000 0001 0001 0044 ac00 0044 ac00   ........D...D..
0000020: 0001 0008 0064 6174 6154 5d03 0027 2784  .....dataT]..''.
0000030: 8c94 9ba3 abb2 bac1 c7ce d4da e0e5 e9ee  ................
0000040: f2f5 f8fa fcfe ffff 272e 2d31 252b 2e7b  ........'.-1%+.{
0000050: 7e7d 252b 3232 3035 2a                   ~}%+2205*

The output of this program is a 220,545 byte 44.1 kHz 8-bit PCM WAV file that should play a 441 Hz tone for five seconds.
The code itself simply consists of two literal single-quoted strings: the first one contains a minimal WAV header, while the second 25-byte string, representing a quarter of the sine wave, is cloned, reversed, joined to the original, cloned again, inverted, joined again and finally repeated 2205 times to produce the actual audio data.
Ps. The output of the program above includes as extra trailing 0x0A byte (i.e. a line feed), which is technically not part of the WAV data.  Since it lies past the end of the RIFF chunk, reasonable decoders should ignore it.  (This could be fixed, at the cost of two extra bytes of code.)

"generate a ... WAV file with a sample rate of 44.1 kHz"

@JanDvorak: Oh. I could've sworn that wasn't there when I started writing this, but maybe I just missed it. :-(

@JanDvorak: OK, fixed it, now it's 44.1 kHz.

C, 204 bytes
Won't win, but here it is anyway :-)
x;main(i){char *h="riff\xec\xda& wave\x86\x8d\x94@0   ! ! d\xcc  \xa8x! \" 0 \x84\x81\x94\x81\xc8\xda& ";for(i=45;--i;)putchar(*h++-' ');for(;i++<220500;){x=(32767*sin(i/15.952));printf("%c%c",x,x>>8);}}

Needs to be compiled with the maths library, of course.
Outputs a 5-second WAV file to stdout (16-bit samples, 44.1 kHz sampling), but this can easily be redirected to a file (e.g., ./a.out >foo.wav)

R, 285 characters
S=44100;s=sin(0:(5*S-1)*pi*880/S);c=32767*s/max(abs(s));a=file("c.wav","wb");w=writeChar;W=function(x,z)writeBin(as.integer(x),a,z,e="little");w("RIFF",a,4,NULL);W(441036,4);w("WAVEfmt ",a,8,NULL);W(16,4);W(c(1,1),2);W(S*1:2,4);W(c(2,16),2);w("data",a,4,NULL);W(S*10,4);W(c,2);close(a)

Create a wav file called c.wav in the working directory.
Indented:
S=44100
s=sin(0:(5*S-1)*pi*880/S) #Sin Wave
c=32767*s/max(abs(s)) #Normalized
a=file("c.wav","wb") #Open connection with empty wav file
w=writeChar #Write characters
W=function(x,z)writeBin(as.integer(x),a,z,e="little") #Write binary data
w("RIFF",a,4,NULL)
W(441036,4)
w("WAVEfmt ",a,8,NULL)
W(16,4)
W(c(1,1),2)
W(S*1:2,4)
W(c(2,16),2)
w("data",a,4,NULL)
W(S*10,4)
W(c,2)
close(a)

no external resources

how is this an external resource?

"Your code is responsible for generating the structure of the file format" - this means that you can't use writeWave. The challenge lies in implementing the wav spec.

ok ok, before I rewrite it, is the creation of the sinewave itself at least ok with you guys like that?

It's fine for me.

@FezVrasta JanDvorak Done... And i rewrote the sine wave creation as well, just because.


text:
Output the alphabet with the shortest code possible
You have to output the alphabet (upper case) with the shortest code possible.
Exact output expected : ABCDEFGHIJKLMNOPQRSTUVWXYZ

APL, 2 chars
⎕A

It's a constant string with the uppercase letters from A to Z

Python 35 chars
print("ABCDEFGHIJKLMNOPQRSTUVWXYZ")

BASH 21 chars
echo {A..Z}|tr -d " "

Output:
~$ echo {A..Z}|tr -d " "
ABCDEFGHIJKLMNOPQRSTUVWXYZ

For a shorter way see the bash solution posted for this question's duplicate.

Sure, but the Output has to be exactly in the form provided. The answer you linked to is in lowercase with spaces. But nevertheless thank you for pointing me there :)

Interesting. printf %s {A..Z} gives me uppercase letters without any space.

Hmmm, true. Maybe you could then just submit this as an answer

Pointless. This question will be probably closed soon as duplicate. I only posted trying to help you get the taste of golfing.

Thanks for this and kudos for posting a better variant :)

Ruby 2.0.0, bytesize: 19:
=> p([*'A'..'Z'].join)
=> "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

update. this produce without quotes:
=> ruby -e '$><<[*?A..?Z].join'
=> ABCDEFGHIJKLMNOPQRSTUVWXYZ

You can use ?A and ?Z instead of 'A' and 'Z'. And you can use *'' instead of .join. And the parenthesis is not necessary there. Sadly this outputs the alphabet between double quotes.

thanx @manatwork I'm surprised *''!

R, 19
cat(LETTERS,sep="")

Output:
ABCDEFGHIJKLMNOPQRSTUVWXYZ

Delphi
52 bytes
var i:int16;begin for i:=65to 90do write(chr(i))end.

45 bytes
begin write('ABCDEFGHIJKLMNOPQRSTUVWXYZ');end.

You have to post a functional piece of code, including declarations and any other stuff required by the language.

Edited it, I thought you just needed the required code to display it... my bad

Actually the program X; is not necessary and in this case byte is enough. Not mentioning that the variable declaration in the second version is pointless.

sighs could get it shorter anyhow, just had something coming up all of a sudden, I will edit it soon..