text:
The Mystery String Printer (Robbers)
The cops thread can be found here: The Mystery String Printer (Cops)
Your challenge

Choose a submission from the cops thread, and print out the string from an answer in that thread.
The submission that you choose must not be safe (it must be newer than 7 days).
Your program, function, or REPL script needs to follow the same rules as the cops thread. Just to recap:

Your program must be ≤128 characters (if a cop's submission is in a smaller range of program lengths, your program must also be in that length range. For example, if a cop's program is ≤32 bytes, your program must be ≤32 bytes).
The program must produce the same output every time it is run.
No cryptographic functions.
The program must not take input.
No standard loopholes.

All new submissions must use the same language. Submissions from before this rule was made are fine, even if they don't.

Scoring
Scoring works similarly for robbers, but it is slightly different:

Cracking any program of ≤8 bytes gives 1 point.
Cracking a ≤16 byte program gives 2 points. ≤32 bytes gives 4 points, and so on.
Every additional submission, no matter the length, earns +5 points
Each cop's submission can only be cracked once- only the first person to crack each submission gets the points.

Submissions
Each answer must include

A link to the cop's submission.
Your program and programming language.
Also have the cop's program length (as a power of 2) as the last number in your header.

Additionally, please comment on the cop's submission with a link to your answer.
Here is a Stack Snippet to generate leaderboards. Please leave a comment if there is a problem with the snippet. If you would like to see all open cop submissions, see the snippet in the cops' challenge.

/* Configuration */

var QUESTION_ID = 60329; // Obtain this from the url
// It will be like http://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";

/* App */

var answers = [],
  answers_hash, answer_ids, answer_page = 1,
  more_answers = true,
  comment_page;

function answersUrl(index) {
  return "//api.stackexchange.com/2.2/questions/" + QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

function commentUrl(index, answers) {
  return "//api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {

  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function(data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });

}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function(data) {
      data.items.forEach(function(c) {

        answers_hash[c.post_id].comments.push(c);

      });

      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });
}

getAnswers();

var POINTS_REG = /(?:<=|≤|<=)\s?(?:<\/?strong>)?\s?(\d+)/
var POINTS_REG_ALT = /<h\d>.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

function getAuthorName(a) {
  return a.owner.display_name;
}

function process() {

  var valid = [];
  var open = [];

  answers.forEach(function(a) {

    var body = a.body;
    var cracked = false;

    var points = body.match(POINTS_REG);
    if (!points) points = body.match(POINTS_REG_ALT);

    if (points) {
      var length = parseInt(points[1]);
      var crackedpoints = 0;
      if (length > 64) crackedpoints = 16;
      else if (length > 32) crackedpoints = 8;
      else if (length > 16) crackedpoints = 4;
      else if (length > 8) crackedpoints = 2;
      else crackedpoints = 1;

      valid.push({
        user: getAuthorName(a),
        numberOfSubmissions: 1,
        points: crackedpoints

      });
    }
  });

  var pointTotals = [];
  valid.forEach(function(a) {

    var index = -1;
    var author = a.user;
    pointTotals.forEach(function(p) {
      if (p.user == author) index = pointTotals.indexOf(p);
    });

    if (index == -1) pointTotals.push(a);
    else {
      pointTotals[index].points += a.points;
      pointTotals[index].numberOfSubmissions++;
    }

  });

  pointTotals.forEach(function(a) {
    a.points += +((a.numberOfSubmissions - 1) * 5);
  });

  pointTotals.sort(function(a, b) {
    var aB = a.points,
      bB = b.points;
    return (bB - aB != 0) ? bB - aB : b.numberOfSubmissions - a.numberOfSubmissions;
  });

  pointTotals.forEach(function(a) {

    var answer = jQuery("#answer-template").html();
    answer = answer
      .replace("{{NAME}}", a.user)
      .replace("{{SUBMISSIONS}}", a.numberOfSubmissions)
      .replace("{{POINTS}}", a.points);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);

  });

}
body {
  text-align: left !important
}
#answer-list {
  padding: 20px;
  width: 240px;
  float: left;
}
#open-list {
  padding: 20px;
  width: 450px;
  float: left;
}
table thead {
  font-weight: bold;
  vertical-align: top;
}
table td {
  padding: 5px;
}

<link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Robber's Leaderboard

        Author
        Submissions
        Score

      {{NAME}}
      {{SUBMISSIONS}}
      {{POINTS}}

This contest is now closed.
Overall winner: kennytm
Most submissions: Sp3000
(Note that the amount of submissions doesn't translate exactly to the points, as the length of the cracked program is counted when calculating the score).

Note: every additional submission earns 5 points

Pyth, Dennis, ≤ 8
V./Tp*FN

Damn that was fun - the hardest part was figuring out how to do it short enough in Pyth.
Analysis
The 1234 at the start hints that we're probably dealing with a list of numbers, printed without a separator. Let's try and split the numbers up in a way that makes sense:
1 2 3 4 4 6 5 8 8 9 6 12 10 12 7 16 16 18 12 15 16 8 24 20 24 14 27 18 20 9 32 32 36 24 30 32 16 36 21 24 25 10

There's a few hints that we're on the right track:

All numbers have prime factors less than 10
A lot of numbers are pretty close to their index in the list

However, there are a few peculiarities. The number at index 23 is 24, and is the only case where the number at the index is greater than the index itself. However, the bigger clue is that some numbers are clearly smaller than their neighbours, particularly the 7 at index 15, the 8 at index 22 and the 9 at index 30.
Noting that this forms a 7-8-9 pattern, we can also see that the last number is a 10 at index 42. Given @Dennis' recent question on abelian groups, a quick check on OEIS reveals that 15, 22, 30, 42 is a subsequence of the partition numbers. Pyth has a builtin for partitions, which gives us two of eight characters: ./
But note that the last number is 10, which is suspicious because 10 is a preinitialised variable in Pyth, as T. ./T gives a full list of the 42 partitions of the number 10, which looks like it might come in handy.
Now the printing is done without a separator, so this hints at a use of p. Perhaps we loop through each partition, do something to it, then print with p? This gives us the following template:
V./Tp??N

where V is a for loop which loops over an iterable, storing each element in the variable N.
A quick look at the second last partition (5, 5) should make it obvious that we want to take a product. The naive way to reduce a list by multiplication is
u*GHd1

where d is the list in question. However, this is far too long.
Unfortunately, this is where I had to pull out a brute forcer. I haven't kept up with Pyth for a while, so I didn't know many of the newer features. There were only two characters left, which looked entirely doable.
The brute forcer then returned:
V./Tp*FN

where *F is fold by * (multiplication). No wonder I didn't find it in my search - I was looking up the keyword "reduce" rather than "fold"!

Even possible in 7: jk*M./T

@Jakube Oh wow, if the range had been <= 7 I would have been doomed. It sure has been a while since I've checked out the language.

><>, VTCAKAVSMoACE, ≤ 64
'9?':?!;1-$:'@'+o'3'*'='%$30.

Ironically, not only is this much lower the range limit, it's also portable and works with the online interpreter.
Analysis
Let's start with the target string:
yh[cPWNkz^EKLBiQMuSvI`n\Yw|JVXDUbZmfoRC_xrq{TlpHjGt]OadFAsgeyh[

><> pushes chars to the stack with ' or " in string mode, but with 63 chars to print and only 64 bytes to work with, the presence of capital letters (invalid instructions in ><>, for the standard looparound trick) make direct printing impossible. Hence, we must be doing something with the code points.
Converting to code points gives (I'm using Python here):
>>> L = [ord(c) for c in "yh[cPWNkz^EKLBiQMuSvI`n\Yw|JVXDUbZmfoRC_xrq{TlpHjGt]OadFAsgeyh["]
>>> L
[121, 104, 91, 99, 80, 87, 78, 107, 122, 94, 69, 75, 76, 66, 105, 81, 77, 117, 83, 118, 73, 96, 110, 92, 89, 119, 124, 74, 86, 88, 68, 85, 98, 90, 109, 102, 111, 82, 67, 95, 120, 114, 113, 123, 84, 108, 112, 72, 106, 71, 116, 93, 79, 97, 100, 70, 65, 115, 103, 101, 121, 104, 91]

Note that the last three numbers are the same as the first three. This hints at a possible modulo loop going on.
Let's take a look at how many different elements we have:
>>> len(set(L))
60

We have 63 elements in L, the first three of which coincide with the last three. This means that, aside from this collision, all other elements are unique. Now this hints at something like taking powers modulo a prime number. Indeed, 60 + 1 = 61 is prime, which is a good sign.
Let's try finding the smallest element
>>> min(L)
65

and use that to scale all the elements down so that the min element is 1:
>>> M = [x-64 for x in L]
>>> M
[57, 40, 27, 35, 16, 23, 14, 43, 58, 30, 5, 11, 12, 2, 41, 17, 13, 53, 19, 54, 9, 32, 46, 28, 25, 55, 60, 10, 22, 24, 4, 21, 34, 26, 45, 38, 47, 18, 3, 31, 56, 50, 49, 59, 20, 44, 48, 8, 42, 7, 52, 29, 15, 33, 36, 6, 1, 51, 39, 37, 57, 40, 27]

Note how the element after 1 is 51. If there's some sort of powers/multiplication thing going on, this is a good guess for our multiplier.
Let's give it a shot:
>>> (57*51)%61
40
>>> (40*51)%61
27
>>> all((x*51)%61 == y for x,y in zip(M, M[1:]))
True

Bingo! We can now backtrack, giving the following code:
x = 57
for _ in range(63):
    print(chr(x + 64), end="")
    x = (x*51)%61

which was then translated to ><>

Interestingly, this is dissimilar many ways to what I did - I used 37 and 112 (meant to use 101, but made a mistake in the code. Epic fail) as a continued multiplication set and modulo'd with 63, then added 64 to get into a readable ASCII range. +1 Well done.

Very nice, wish I could do that ;)

Mathematica, alphalpha, ≤ 32
GroupOrder[MonsterGroupM[]]

I hate to say this, but I just recognised the number on the spot.

Even shorter: 31!10!27079205916672

Dammit, I knew that number looked familiar.

Pyth, Maltysen, ≤4
C.ZG

Brute force took so long that I did it faster manually.
Analysis
C (convert string to base 256 int) is the easiest way to generate a large number in Pyth, so it's probably the first character. If we convert from base 256, we get:
xÚKLJNIMKÏÈÌÊÎÉÍË/(,*.)-+¯¨¬

Hmm... not very illuminating.
Now G is the alphabet string "abc...z", which looks like it could be a source for a long string to feed into C. Looking through the docs I find:
.Z    Compresses or decompresses a string.

If we're dealing with compression here, it wouldn't be surprising to get all sorts of extended ASCII characters. Trying C.ZG then gave the answer.

Fourier, Beta Decay, ≤ 32
2~x1~y20(xoy~z*x~yz~xq^~q)

Or alternatively, in CJam:
X0I{_2$+}*]2\f#

Analysis
At the start we can see a lot of powers of 2:
2
1
2
2
4
8
32
256
8192
2097152
...

If we take the log base 2 of these numbers, we get:
1 0 1 1 2 3 5 8 13 21 ...

which is the Fibonacci series, starting at 1, 0.

Snails, feersum, ≤2 bytes
z

This is actually 2 bytes; the character z followed by a newline \n.
I have no idea how it works or what it's doing, but after testing all possible inputs apart from ~+ and ~,, this was the only 2-byte program that produced 8 as output.
And it took ages to get this result. No wonder it's called "Snails" :-D

Note to self: The next time you fuzz test unknown software, do it inside a VM.

Rust, Liam Noronha, ≤128 bytes
fn main(){print!("AACAAEGAAACIIMOAAACAAEGQQQSYYDFAAACAAEGAAACIIMOHHHJHHLNXXXAGGKMAAACAAEGAAACIIMOAAACAAEGQQQSYYDFOOO");}

Simply printing the string verbatim is 120 bytes...

wow it was late when I did that. So dumb sorry. I could have made the text considerably longer with no effort. I'll post the actual source.

Macaroni 0.0.2, Doorknob, ≤64
set x "................................."print x print x print x

Python 2, Clear question with examples, <=64
One possible solution:
print ''.join([" `{.~{{~||"[int(c)] for c in str(3**4278)])

(9**2139, 27**1426 and 729**713 also give the same result)

CoffeeScript, user2428118, ≤64
alert 0+(btoa k.substr -2 for k of document.body.style).join ''

(works only on Chrome 46.0.2490.71 as described by the Cop.)

The output is obviously a concatenation of short base64-encoded strings due to all the "=". After decoding them, we find a list of 2-character strings like
['nt', 'ms', 'lf', 'ne', 'll', 'on', 'ay', 'on', …

which does not seem to make sense. But I find some odd items in it, like nX and tY. After filtering these out we get
>>> # Python
>>>
>>> [i for i in tt if not re.match('[a-z]{2}$', i)]
['nX', 'nY', 'tX', 'tY', 'wX', 'wY', 'r', 'nX', 'nY', 'tX', 'tY', 'nX', 'nY', 'nX', 'nY', 'nZ', 'x', 'y']

These X and Y seem to indicate the original source code used position properties like offsetX/Y. A particularly interesting is the nZ item. To check my assumption, I searched for all properties that end with "Z":
// CoffeeScript
checked = []
f = (o) ->
    if !(o in checked)
        for k of o
            if /Z$/.test(k)
                console.log(o, k)
            if o[k] instanceof Object
                f o[k]
f window

which shows tons of CSSStyleDeclaration, "webkitTransformOriginZ". From this we have a strong indication that the list is built up by the last 2 characters of all the keys of a style object, which the test above shows indeed is correct.

You found it, congratulations! Original source code

Python 2, histocrat, ≤16
[[[51002**3/6]]]

The biggest hint is the promise that it won't work in Python 3. What's changed in Python 3? The biggest suspect is that the division operator returns a float in Python 3.
So I assume the solution is of the form ⌊αβ/n⌋ = c = 22111101102001, as exponentiation is the only short way to create huge numbers.
If {α, β, n} indeed forms a solution, then (cn)1/β ≈ α should be very close to an integer. Therefore I use the following to try to brute-force the {α, β} for each n:
(* Mathematica *)
n=2; Sort[Table[{N[Abs[k - Round@k] /. k -> (22111101102001*n)^(1/b), 12], b}, {b, 2, 50}]]

(* Output: {{0.00262542213622, 7}, ...}

   The first number is the "quality" of the solution, lower is better.
   the second number is β.
   Thus α ≈ (nc)^(1/β) = 89
   But (89^7)/2 = 22115667447764, which is still far away from the answer.

*)

The actual result quickly comes out when n = 6.

Well done! That's the intended solution, and about how I expected someone would solve it (although I didn't realize ahead of time just how platform-dependent it was).

MATLAB, StewieGriffin, ≤ 16
[36;87]*' |'*5

Prints:
ans =
        5760       22320
       13920       53940

Nice! Glad you liked it :-) the way I did it: 5*'$W'.'*' |'.

I was considering making it a lot harder by multiplying by e.g. .73 instead of 5, do +5, or make it a 3x3 matrix but figured this was more fun. Could have done a lot with the three remaining bytes.

@StewieGriffin Never come across .' before, but makes complete sense - was wondering how to transpose a string without resorting to brackets.

Mathematica, LegionMammal978, ≤64
Print@Nest[Compress,ExampleData[{"Text","ToBeOrNotToBe"}],13]

Matlab, Luis Mendo, ≤16
I found it, yay!
fix(peaks(9).^2)

I didn't know that Octave can do this, too.

How? Had you heard of peaks()?

Yes, I have. I have by hazard been playing around with peaks.

Python, spacemanjosh, ≤ 64
n=0;d=1;L=[]
exec("L+=[10/(100-n)**.5];n+=d;d+=2;"*10)
print(L)

Glorious inverse symbolic calculator. Not well golfed, but hey it fits.
Edit: I golfed it.
print([10/(100-n*n)**.5for n in range(10)])

JavaScript ES6, Cᴏɴᴏʀ O'Bʀɪᴇɴ, ≤128 bytes
var x=122,s='0037122342526683102122';for(var i=23;i<=505;i+=2)s+=(x+=i);s;

I doubt this is exactly right since I didn't need anywhere near 128 bytes, but finding a repeating sequence was fun challenge.

Wow. I used a completely different method. Does that still count? :3

@CᴏɴᴏʀO'Bʀɪᴇɴ Usually does. I'm really curious about the original and what produces those first 22 bytes though, I'd guess something funky in the loop init

I'll post it when I get the time. I think its the flooring of the function s * s - s/(5-s)

Thue, ppperry, <=64
0::=11
1::=22
2::=33
3::=44
4::=55
a::=bbb
b::=000
::=
aaaaaaa

Decomposes 2016 into its prime factors, essentially. 62 characters, so my guess is this is similar to what you were going for.

You can do 0::=2222 to save some bytes.

Fair point, seems a bit less elegant though.

JavaScript, ev3commander, ≤ 32
console.log(0.1411200080598672)

OK, that was easy.

Lua <= 4, Egor Skriptunoff
A lot of users were getting agitated about this answer in chat, so I must relieve them from their misery. I don't know Lua and wasn't able to test it, but I would be very surprised if this doesn't work.
4^~9

This would be pretty obvious, but probably no one got it because bitwise operators were only added in version 5.3; ideone.com only has version 5.2.

facepalm I overlooked bitwise operators because they only use integers.

Pyth <= 4, Dennis
ljyG

That's length of join on newlines of all subsets of the alphabet.
Test run:
$ pyth -cd 'ljyG'
==================== 4 chars =====================
ljyG
==================================================
imp_print(Plen(join(subsets(G))))
==================================================
939524095

I figured out the number was 2^27 * 7 - 1 which is a strong hint that it's based on yG, which is 2^26 elements long. I then guessed it had to be converted to a string and its length printed. However, the only way of doing this I could think of for a while was ``, repr. Then I thought of j, which fits perfectly.

Python, DLosc, ≤32
(This solution uses Python 2)
a=97
while a<4e31:a^=a*2;print a

><>, Sp3000, <=8
'l(?; o>

The instruction pointer wraps around and the following steps happen:

'l(?; o>' pushes the ASCII values of l(?; o> to the stack
l pushes the size of the stack on the stack
( compare the top two stack elements: size of stack and ord('>')
?; stops the program if the stack size was bigger
o output the top element of the stack as character (this will be always o)
> sets IP direction, here it is no-op
we go back to the first step

Output is oooooooooooo.
We can get a lot of different outputs by changing [space] to something which pushes or pops on the stack and using another valid character instead of >, which may also push or pop.

Nice! For reference, I had: 'l=?;o*

C, tucuxi, ≤64
main(i){for(i=0;i<11000;++i)if(!(i&2*i))printf("1%d",!(i&1));}

The output are all 0 and 1, but C cannot print binary directly, so it's very likely these are boolean results.
There are more 1 than 0s, so I recorded the positions of 0s (3, 9, 13, 19, …), which turns out to be OEIS A075318. This is not useful though, there isn't a simple formula to determine where a number is in this sequence.
But we note that there are all odd numbers, so perhaps (x-1)/2 = {1, 4, 6, 9, 12, …} have more useful information. And this is A003622.
A003622 can be defined as "positions of 1's in A003849", which is exactly what we need to crack here. And A003849 is defined as "A003714 mod 2", where A003714 are simply all integers that x & (2*x) == 0. Thus we have got the solution.
OEIS rox.

truly impressive - I never cease to be surprised by the this site's users

Dyalog APL, Dennis, ≤4
*⍨⍟8

Computes ln(8)^ln(8). Would StackExchange stop converting my answers? I'll type a bunch of stuff here so it doesn't get turned into a comment.

I had 8*⍟⍟8 but didn't know about ⍨. Nice work :)

CJam, Reto Koradi, ≤ 4
HJK#

Pushes 17, then 1920 = 37589973457545958193355601.
Try it online.
There are only so many things you can do in four bytes. An integer this big had to involve powers or factorials somehow, and a factorial would have trailing zeroes.

That's correct. I'll handle the official post update later today.

PARI/GP, alephalpha, ≤ 4
9!-9

I don't actually know the language, but that has to be the right answer.

Pyth, xnor, ≤ 4
C`CG

CG (convert the alphabet string "abc...z" from base 256) is the typical Pyth way of generating a really large number. After that it's just stringify and convert from base again.

Ruby, Doorknob, ≤64
'@@'=~/(.)(.)/
p$~
test 0 rescue p"#$!@@".gsub //,$!.inspect+$/

Matlab/Octave, Wauzl, ≤16
"234"'*"567"

Using the same idea as Tom Carpenter's answer
(If it did not work, try this:)
[50;51;52]*'567'

@NaN See update. Both are ≤16 bytes and work on ideone.

Nice. I had (1*'234')'*'567' in mind, because your first answer does not work in Matlab.

CoffeeScript, J Atkin, ≤ 16
Math.PI*Math.LN2

Hooray for the inverse symbolic calculator.

Well, that was fast.

Ok, that was lame of me to try that ;)

LOLCODE, sysreq, ≤ 4
OBTW

Found the intended solution here. :/

+1 for either research or reading every single post on this site, not sure which

><> , randomra, ≤ 8
'ol(?;r>

For some reason, 23 was surprisingly hard to get.

Nice! My solution was 'l(?;o>x, with non-deterministic run and deterministic output.

TI-BASIC, Thomas Kwa, ≤ 4
³√(tanh(7°

I don't have any way to test the code, so I'm not completely sure if the notation is correct. The sequence of steps I used to get the output are:

Value 7.
Convert from degrees to radians.
Apply hyperbolic tangent.
Apply cube root.

Cracking method:

I made the assumption that the 4 bytes were one single byte constant, with 3 operators listed as "1 byte token" in the documentation applied to it.
For the constants, I used the 10 single digit numbers, and pi, giving 11 options.
For the operators, I picked the ones from the list of one byte tokens that looked like they would make sense in this context, resulting in a list of 26 operators.

This left me with brute forcing 11 * 26 * 26 * 26 possibilities, which a small C++ program completed in milliseconds on my laptop. Listing the smallest differences to the target value, it gave a bunch in the range of 1e-5, and a single one that was about 6e-8, which was close enough to be a solution.

Something like ʳ?

@ThomasKwa I multiplied by (pi/180). Reading the documentation again, I guess it makes sense that it would be the other operator. Because that one says "you can have the angle evaluated as if in degree mode".

Did you brute-force, or solve this manually?

@ThomasKwa I mostly let my computer solve it. ;) I'll add some explanation.

gs2, quartata, Range: <= 8
\x01\x02\x01\x07/e\x81e

The number is simply 2^5040 (i.e., 2 raised to the power of 7 factorial). Factorizing it was the easy part. Finding out how to work gs2 took a lot longer.
The workings of the program are described below (using \xNN notation to represent non-ASCII bytes):
\x01\x02                   Push the number 2 onto the stack
        \x01\x07           Push the number 7 onto the stack
                /          Change this into a list [1,2,3,4,5,6,7]
                 e         Multiply everything in this list (5040)
                  \x81     Make a list containing [2,2,2...] 5040 times
                      e    Multiply everything together again

This leaves the number 27! on the stack, which is printed when the program exits.

AppleScript, VTCAKAVSMoACE, ≤16
{1=1,1=0}>0

Needs 5 more bytes to redirect to stdout, so total size is exactly 16 bytes.

Well done! :D I was mildly hopeful that no one would recognize that the > character would throw that specific error, and try to use as integer or the like.

JavaScript, histocrat, ≤ 32
Well, this was lucky. I needed exactly 32 bytes:
[...'aa0abaabaa4abaaaa6abaa']+''

How this works:

the brand new spread-operator* creates an array from a string
+ '' forces the array to be casted to string, which implies a concatenation by , in JavaScript
the result of the expression is printed onto the console

So basically it's a shorter version of:
'aa0abaabaa4abaaaa6abaa'.split('').join()

* The spread-operator is a new Array Initializer in ECMAScript 2015 (ES6) standard. Works currently in Chrome and Firefox.

Ha, had no idea javascript had a splat now.

TI-BASIC, quartata, ≤2
Xmin

On a fresh calculator, the window dimensions are Xmin=Ymin= -10, Xmax=Ymax=10. I actually posted about this in a TI-BASIC golfing tip answer before @quartata posted the cop!

Current consensus is to allow all code to be run on a fresh interpreter. We can take advantage of this—all uninitialized real variables start at 0 in TI-BASIC, and Xmin starts as the possibly useful value -10. So if you ever need to take a running total in a program that doesn't take input from Ans, or you really need a -10 in one less byte, this tip can help you.

There are therefore four solutions: Xmin, Ymin, ZXmin, and ZYmin—the latter are the zoom tokens, which I don't know the exact purpose of.

I think the zoom tokens represent the screen location after zooming in on a graph... See here.

Stuck, @quartata, ≤8
The following Pyth program:
^33 9

produces the desired output
46411484401953

Cracking method: Searched Google for the number.

TI-BASIC, quartata, <=7
πE8/e

I found this using RIES.

It seems like REIS will prevent most simple math ops, which I can't say is such a bad thing.

Did not know about RIES. Definitely won't be doing any number ones then :P

Python 3, Mego, ≤128
(Using Python 3.5.0, not tested on previous versions. 105 98 bytes.)
import sys
a=sys.stdout
sys.stdout=None
from this import*
a.write(s.translate(s.maketrans(d))[4:])

Very good! I did it in 94, see my cops post for code.

Math++, SuperJedi224, ≤8 bytes
cbrt7835

I used the Inverse Symbolic Calculator.

Yeah, that's right.

Python, Status, ≤128 bytes
print"NEENER"*3# This code outputs the following string: "NEENERNEENERNEENER". This is achieved by evaluating "NEENER" * 3.

Microscript, SuperJedi224, ≤4 bytes
'~$q

It took me a while to find the ' instruction...

bc -l, NaN, <=8
l(4.76)

Derived from a rather longer solution found using ISC.

Javascript, user2428118, <= 16
Math.PI*9e9
Thanks to Sven the Surfer for the help.
I used ISC which was used to crack one of my answers.

TI-89 BASIC, @DankMemes, <=8
236!

The string of zeroes at the end gave it away.

Python, Zach Gates, ≤ 64
s='UCAG'
print(" ".join(x+y+z for x in s for y in s for z in s))

Behold the ton of other attempts:
# Python 3 only
from itertools import*
print(*map("".join,product(*["UCAG"]*3)))

# Python 2 only
def f(s):
 if s[2:]:print s,
 else:for x in"UCAG":f(s+x)
f("")

# Too long
o=""
for n in range(64):exec("o+='UCAG'[n%4];n//=4;"*3);o+=" "
print(o)

# Too long
L=[""]
exec("L=[x+y for x in L for y in'UCAG'];"*3)
print(" ".join(L))

><>, Cole, ≤ 8
'l?!;}n!

Pretty obvious when the code points in the output give basically all the chars.

Didn't have time to comment on this earlier but I'm still pretty impressed at how fast you got that. I wasn't sure if errors were allowed, but I considered putting * in stead of }; would that have been any harder? Ah well, guess I'll have to take a look at your submission.

@Cole * would indeed have been harder, but I'm not sure about the error thing either...

PowerShell, TimmyD, ≤2
$?

I looked at this page of commands and found two that seemed like they would print true.

Javascript ES6 REPL, pandorym, ≤16
6496/9090+"323"

QBasic, DLosc, <=32
FOR c=1TO 8
?TAB(c*c);c;
NEXT

The answer was so trivial, it was converted to a comment.
TAB can be used in a PRINT (shortcut ?) statement to set the cursor position.

Looks good now! (Also, not my original code, by the way--in fact, yours is 2 bytes shorter.)

JavaScript, Cᴏɴᴏʀ O'Bʀɪᴇɴ, ≤16 bytes
You could just enter the number in hexadecimal at the console like this:
0x6ffffffffffffe

This is one byte shorter:
s=1<<26;s*s*7-2

(In other languages, (7<<52)-2 would have worked fine, but not Javascript.)

Not the exact same one I had in mind.

@CᴏɴᴏʀO'Bʀɪᴇɴ but he produced the string.  Was it 7*Math.pow(2,52)?

CJam, Dennis, ≤ 4
P2mh

Glorious inverse symboli... shot

It was also the only Google search result, but I was too slow trying to figure out how to CJam.  Well done.

Pip, DLosc, ≤ 4
mTB3

The value is 1000 in base 3.
This one was easy to crack manually. The most obvious guess was that it was a number converted to binary. But that number would have been 105, which has no nice shortcut, and would result in 5 bytes of code. The next attempt was to try base 3 instead of base 2, and bingo!

VBA, JimmyJazzx, ≤32
Sub a()
MsgBox -2^31+23
End Sub

I think; I can't actually get it to stay like this since the VBA editor reformats and adds spaces between the math operators ... but typing that in works and doesn't error...

Yep. Not exactly what I had, But works just as well. VBA editor is a pain for spaces.And for most of the golfing counts its acceptable to remove unnecessary spaces from VBA. as long as when you copy paste it works.
Good job! knew someone would out math me quite quickly, but with 10 bytes to play with your limited

Lua, Egor Skriptunoff, ≤ 32
_='()()()'print(_:gsub(_,_.rep))

Welcome to PPCG! You should also ensure to add a comment on Egor's answer linking back to this post, so that Egor is aware you potentially cracked the solution.

Javascript (ES6, console), Shaun H, <= 64
[...[].pop+''].sort().map(x=>x.charCodeAt()+'').join('')

At first I thought I could get the Chrome string short enough with just hex literals, but then I realized what the code must have been doing.
Anyway, the main hint was that native functions have slightly different string representations in Chrome vs FF.

J, Mauris, <=4
%!7

This wasn't difficult. 0.000198413 = 1/5040 = 1/(7!)

J, Dennis, <=4
8!^5

How I found it:

assumed f ? ? ? format and inverted one-variable one-letter verbs (f) with no success
assumed x f g y format and checked fg == !! with (!!)"0/~i.10 then fg == !^ with (!^)"0/~i.10 which contained the desired output (4.81845e12) for 8!^5

Mathematica, Eridan, ≤64
IntegerString[18612512719586442658197,2]

Fishing, Eridan, ≤ 32
v+CCCCCCCCCCC
  `65617`nSSP

Calculates (65617^2)^2.

MATLAB, Tom Carpenter, ≤16
v=ver;[v.Name]
Thanks Martin for helping me out with this.

Groovy, quartata, ≤128
Only checked on ideone, I'm not sure if the output is the same on all platforms.
ClassLoader.systemClassLoader.packages.each{if(!(it.name=~/ls$/))println it.name[6..-1].reverse()}

The it.name=~/ls$/ is to filter out the additional org.codehaus.groovy.tools package.

Does not output the same on my system (Oracle Java 8, Groovy 2.4.5). Don't be fooled, this isn't what it looks like.

Wait a second... I'm confused. I believe I might have posted the wrong string...

Dammit. It appears that I posted the output of an older version of my program. I'm not sure what to do.

@quartata I recommend correcting the output in your original post. kennytm, I recommend deleting this answer for now, trying to crack the corrected submission, and then undeleting it. Does that sound reasonable?

@quartata Updated with the new submission (still only tested on ideone, groovy 2.4).

You got me (and you outgolfed me by one character D:)

Octave, flawr, ≤4
i^-i

which is equal to eπ/2 ≈ 4.8105.

Dangit, you got it just before me!

vim, Doorknob, 16
:redi@"|Ni!
pg?G

STATA, bmarks, ≤32 bytes
set ob 82
g a=_n*9/8
set ob 99
l

This uses the free interpreter.

This doesn't match the .s in lines 83 and after.

@bmarks Also, are you completely sure (including newlines) that the program is less than ≤ 32 bytes long?

The program (including newlines) is definitely ≤ 32 bytes long according to https://mothereff.in/byte-counter

@bmarks I fixed it

MATLAB, Tom Carpenter, ≤4
pi^i

It's not hard when the absolute value is 1.

Didn't think it would take long ;)

Javascript, Ludovic Zenohate Lagoua, ≤64
var a="'";for(var b=11;b<2004;b+=4){a+=b;}a+="'";console.log(a);

Python 2.7.2, Beta Decay, ≤ 64
import math,re;print zip(dir(math),dir(re))

I had 2.7.10 installed, and the additional __loader__ messed with the results, but this is probably it (I had to confirm with @BetaDecay in chat).

I can confirm this is the same program

Brainfuck, Daniel M., ≤ 64
++++++++++[->++++>++++++>++++++++>+<<<<]>.>>.<.>>++[-<++.>]

The code points are
[40, 80, 60, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104]

So we print the first three separately, then using the 80 to increment by 2 each time for the rest of the chars.

Python 2, <=8, by Clear question with examples
947**687

Factorizing this number took no time at all :-)

Hassium (in REPL), <=32 bytes, by Jacob Misirian
for(i=0;i<99;i++)print(i%6==0)

Not too much fancy in this one.

AppleScript, VTCAKAVSMoACE, ≤32 bytes
repeat 409 times
log "(**)"
end

The log command actually adds comment markers (*...*) to everything it outputs to the Messages window of the script editor, but it looks like they have to be added explicitly when printing to stdout. Either way, the program is still less than 32 characters.
I'm using Digital Trauma's trick of replacing end repeat with end to save a few bytes.

EDIT: As kennytm correctly pointed out, this outputs to stderr instead of stdout. As a workaround, I can suggest the following:
osascript -e 'repeat 409
log "(**)"
end' 2>&1

Including line breaks, the script inside the single quotes is 25 bytes, Add 5 bytes for  2>&1 at the end of the command line to redirect stderr to stdout, and it's still within the 32 byte limit.

Heh, nice one. I used Script Editor, so it did not require the end repeat with end trick. +1

The times is optional. However, on El Capitan it outputs to stderr.

Javascript, RononDex, ≤ 32 bytes
console.log(Math.log(42))

Very easy :-D

That wonderful inverse calculator :)

MATLAB, Tom Carpenter, ≤ 2
!<

Thanks to @AlexA. and @RetoKoradi for helping me test this. I don't have a Windows PC/VM...
Googling the desired output immediately revealed it as a typical Windows Cmd error. In fact,
<

produces the desired output, and a MATLAB command that is prefixed by a ! is a system command. I don't have MATLAB at hand to test this, but it should work.

Yup. Thought that one would be quite difficult, but never mind. I'd actually used !> but both do the same thing.

Google is your foe here. Searching for the error message immediately revealed it as a typical Cmd error.

><>, quartata, ≤ 32
1"qq"+\
v!?:  <$*d$-1
>~n;

I'd like to thank @quartata for make this interesting - despite being such a long number, it's actually just 13^226.

><>, Fongoid, ≤64 Bytes
"!":"~"=a$.1+:"!"(?;::1-$oo20.
"+"f8+0pa0.2-"-"c0p"3"f7+0p

A little bit hard-coded since I had room and I couldn't really think of a good way to go down once I got to ~ in the output (there probably is one and I probably just don't see it).
You can try it online here.

That self-modifying code is pretty slick!

Pip, DLosc, ≤ 2
O_

I don't really understand what the code does, but 2 characters is wide open to brute force cracking.

I've added an explanation to the original post.

Wolfram programming language, Eridan, ≤32
ContinuedFraction[Zeta[3],36]

It's sequence A013631 on OEIS.

Lua, jcgoble3, ≤ 128
x=111111111
h="haha"
p=h..3*x..2*x..h..7*x..h..2*x
q="ha"..6*x..p..p..h..6*x..h..7*x..h..4*x..h..5*x
"ha"..(q..h):rep(11)..q

124 bytes. Tested in Lua 5.3.1 REPL.
This is a cleaner version that can be executed as a single command or even a full program:
x=111111111 h="haha" p=h..3*x..2*x..h..7*x..h..2*x q=h..6*x..p..p..h..6*x..h..7*x..h..4*x..h..5*x print((q.."ha"):rep(11)..q)

125 bytes. Tested in Lua 5.3.1 REPL and ideone.

Thue, histocrat, ≤64
a::=yellowyellowyellowredyellowred
::=
aaaaaa

><>, Fongoid, ≤ 16
'$1-:0(?;$:o3+ !

That was some nice golfing practice.

Pyth, ConfusedMr_C, ≤ 32
sm*2s_c4s_Mcd2%2_c4sCM127

Only needed 25 chars. Took some while though.
Try it online: Demonstration
The idea is to take all chars of the ranges 32-63 und 96-126 (Yes, 127 is not included), rearrange them, duplicate these strings and join them.

Self-modifying Brainfuck, mbomb007, ≤8
<[-.+<]

stdin needs to be /dev/null and disregard the output from stderr.

QBasic, DLosc, ≤16
?STRING$(3,34)

Aw, shoot. Not the solution I had in mind. Have a +1 anyway--I learned something.

QBasic, DLosc, ≤8
?TAN(22)

Does the leading/trailing space thingy. I guess it's a QBasic quirk.

CJam, Eridan, ≤8
6C#E130#

I assumed it would be a list of numbers of the form i^j, so I did a search for those using substrings from output. I found that it was str(6 ** 12) + str(14 ** 130) using a Python script.

AppleScript, VTCAKAVSMoACE, ≤ 2 Bytes
id

I have no idea why this produces the output missing value; I just wrote a bash script to test all pairs of printable ASCII characters. I also found that it and me result in the output «script».

Gah. Brute forcing. But yes, that's correct. I was originally going to do a it, me, or, in fact, name code, but « wasn't ASCII. The reason why it outputs "missing value" is that id will (almost) never throw a syntax error, but executing it on its own without a following value will cause the script, not the compiler to say that it's missing a value. id would typically be used with, say, window id 283 of app "TextEdit" to select that specific window. +1, but sad that you brute forced it.

AppleScript, VTCAKAVSMoACE, ≤64
osascript -e 'repeat with i from 688 to 195049 by 629
log i mod 1e3
end' 2>&1

Needs a redirect to stdout, similar to https://codegolf.stackexchange.com/a/60601/32353. Total size is 64.

No, this is not correct - I do print to STDOUT.

@VTCAKAVSMoACE: Okay.

Python 3, ppperry, ≤32
0x1d4f620cb7a9ca2c585c639763613

That was not what I had in mind.

J, randomra, ≤ 8
#:/:|i:9

Try it online.
Cracking the code
Each row looks like the binary representation of a small integer, specifically of these integers:
9 8 10 7 11 6 12 5 13 4 14 3 15 2 16 1 17 0 18

These integers are a permutation of the range 0 … 18, so they were most likely the product of "grading up" a list of length 19.
Grading that list up once more yields
17 15 13 11 9 7 5 3 1 0 2 4 6 8 10 12 14 16 18

meaning that we must find a list whose elements are in the same order as this one. This very same list would work, but we must find another that fits in the byte range.
An obvious candidate is
9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9

which can be generated by applying absolute value to the list
_9 _8 _7 _6 _5 _4 _3 _2 _1 0 1 2 3 4 5 6 7 8 9

How it works

i:9 generates the range -9 … 9.
| applies absolute value to each integer in that range.
/: "grades up", i.e., sorts the indices of the above list by the values at those indices.
#: converts the resulting indices to binary.

Mathematica, quartata, 25 <= 64 bytes
2^315 3^117 75844139371^9

Method
output = 368921261...764501504

test = FactorInteger[output]
(* {{2,315},{3,117},{7,18},{11,9},{13,9},{17,9},{19,9},{23,9},{31,9},{47,9}} *)

(Times @@ Power @@@ Drop[test, 2])^(1/9)
(* 75844139371 *)

2^315 3^117 75844139371^9 == output
(* True *)

TI-BASIC, Cᴏɴᴏʀ O'Bʀɪᴇɴ, ≤2
θStep

I was thinking of using one of these window tokens for my 4-byte cop, but I didn't want to abuse the "may assume default settings" rule too much.

I was thinking Tstep, but this works as well. Nice job!

source: Stack Exchange

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

sort: votes


text:
Non-Unique/Duplicate Elements
Write a program which finds the non-unique elements of an array of signed integers. The resulting array can be in any order.
Your answer may be a snippet which assumes the input to be stored in a variable (d, say) and evaluates to the correct result.
Test Cases
Each test case is a single line in the format input => output. Note that other permutations of the output are valid as well.
[]                        => []
[-1, 0, 1]                => []
[1, 1]                    => [1]
[3, 0, 0, 1, 1, 0, 5, 3]  => [3, 0, 1]
[-34, 0, 1, -34, 4, 8, 4] => [-34, 4]

Order of the elements doesn't matter.
This is code golf, so the shortest answer (in bytes) wins.

Related

since this is for array of integers code would be different. I think much shorter. That is for a string.

Are we allowed to accept input as lines instead of as an array? For example, instead of [-1, 0, 1], can we input (replace \n with newlines): "-1\n0\n1"?

Does the output have to be a list or would a set be acceptable?

And does it have to output in that format?

Yes, the output needs to be an array, otherwise if iterable is allowed people would start producing 301 as results.

K5, 5 bytes
Assuming the input is already in a variable called d,
?d^?d

Take the distinct elements (?) of d except (d^) the distinct elements of d (?d). Nicely symmetrical, no? This works because the "except" operator removes only the first occurrence of the right argument from the left argument.
More generally,
nu: {?x^?x}

In action:
  nu'(();-1 0 1;1 1;3 0 0 1 1 0 5 3;-34 0 1 -34 4 8 4)
(()
 ()
 ,1
 0 1 3
 -34 4)

Edit:
If we wanted to preserve the order of the first occurrence of non-unique elements, we could reverse the source list before and after we remove the unique elements via except at the cost of 4 extra bytes:
  nu: {?|(|x)^?x}
  nu'(();-1 0 1;1 1;3 0 0 1 1 0 5 3;-34 0 1 -34 4 8 4)
(()
 ()
 ,1
 3 0 1
 -34 4)

CJam, 10
Assuming the array is already in variable D (based on this comment):
D{De=(},_&

Try it online
Explanation:
D{…},   filter items of D based on the block
  De=   count occurrences in D
  (     decrement (resulting in true/false for duplicate/unique)
_&      remove duplicates from the results

Note: append a p if you want pretty printing, otherwise the resulting array is just printed out with no delimiters by default. That is acceptable since the question specifies the snippet only needs to "evaluate to the correct result".
Standard input/output version, 13:
q~_{1$e=(},&p

Try it online
Explanation:
q~      read and evaluate the input array
_       duplicate the array
{…},    filter items based on the block
  1$    copy the array
  e=    count occurrences
  (     decrement (resulting in true/false for duplicate/unique)
&       set intersection with the initial array (removes duplicates)
p       pretty print

13: q~$e\{((<~}%p`

@Sp3000 I found another 13-byte version before reading your comment :) It preserves the order too.

Haskell - 32
import Data.List;f l=nub$l\\nub l

Pretty short, even with the import. a \\ b removes the first occurrence of each element of b from a, and nub makes all elements of a list unique.

Pyth, 7 bytes
S{.-Q{Q

Try it online.
How it works
Pyth automatically stores the evaluated input in Q and prints all unused return values.
     {Q  Convert Q into a set. This removes duplicates.
  .-Q    Perform "bagwise" difference of Q and set(Q).
         This removes the first occurrence of all elements in Q.
 {       Convert to set to deduplicate.
S        Sort. Returns a list.

SQL, 44 42 bytes
SELECT*FROM D GROUP BY I HAVING COUNT(*)>1

I hope it is OK to assume the integers are stored in table D?
This will work in both SQLServer, PostgreSQL and possibly others.  Thanks to @manatwork from the 2 bytes.

Assuming i is the only field in table d, in PostgreSQL you can reduce it to select*from d group by 1having count(*)>1. (MySQL and SQLite's parser will also handle the unseparated select*from part, but they not understand 1having.)

@manatwork cheers for that, sql server also understands the select*from.  Doesn't like the 1having though.. will leave that as I having

Matlab / Octave, 40
I'm assuming input values are real (not complex). The input is in a variable d.
unique(d(sum(triu(bsxfun(@eq,d,d')))>1))

Try it online in Octave.

No need to input, you can assume data in variable 'd'

@garg10may Thanks. Updated. You should specify that in your post

The output is incorrect when d = [3, 0, 0, 1, 1, 0, 5, 3]. There are two 0s.

@alephalpha Thanks! corrected (8 more bytes)

Shorter: d(sum(triu(bsxfun(@eq,d,d')))==2). Or in Octave: d(sum(triu(d==d'))==2)

@alephalpha Good idea! You should post that as an answer yourself

Mathematica, 29 26 bytes
Assuming that input is stored in d:
Select[d⋃d,d~Count~#>1&]

Otherwise, it's 29 bytes as an unnamed function:
Cases[#⋃#,n_/;#~Count~n>1]&

Here, d⋃d (or #⋃#) is a golfing trick to remove duplicates - by taking the set union with itself, Mathematica interprets the list as a set, removing duplicates automatically, while the actual union doesn't do anything.
Afterwards, both methods simply filter those elements which appear in the original list at least twice.

APL (Dyalog Unicode), 13 9 bytesSBCS
Anonymous tacit prefix function.
∊(⊂1↓⊣¨)⌸

Try it online!
(…)⌸ for each unique element (left argument) and the indices where it occurs (right argument), apply the following tacit function:
 ⊣¨ one of the left (the unique element) for each on the right (the indices)
 1↓ drop one
 ⊂ enclose (prevents padding with zeros to create a non-ragged matrix)
∊ ϵnlist (flatten)

PowerShell, 31 29 Bytes
($d|group|?{$_.Count-1}).Name

Assumes that $d is already populated (as given) -- e.g., $d=@(-34,0,1,-34,4,8,4).
Pipes the array into the Group-Object cmdlet, which groups like-items together and spits out an object that's essentially an array of arrays. We pipe that to a Where-Object (the ? operator) that has Count greater than one (i.e., there are duplicates), and output the .Name of those items. Has a side bonus of preserving the initial ordering, too.
Edit - saved two bytes thanks to Danko Durbić

I think you can replace $_.Count-gt1 with $_.Count-1 which would be true for any Count greater than one.

@DankoDurbić Excellent!

JavaScript (ES6), 37 bytes
Run this in the JavaScript console:
e={};d.filter(x=>(e[x]=1+e[x]||0)==1)

It's generally accepted that JavaScript needs some sort of explicit "output/print" function (such as console.log, alert, etc) to be considered complete. If a challenge says "write a program or function", then function returns also suffice. Aside that, very efficient solution!

@Mwr247 The question states that the anwer may be a snippet which evaluates to the correct result.

It seems I misinterpreted that paragraph. Apologies then =)

@Mwr247 No problem! :)

Python 3.5, 30
[x for x in{*d}if~-d.count(x)]

Uses Python 3.5's set unpacking. The ~- subtracts 1, which takes a count of 1 to 0 which is Falsy.
This gives a list. If giving a set is OK, then we use a set comprehension, saving 1 char and not needing version 3.5:
{x for x in d if~-d.count(x)}

SyntaxError: invalid syntax for Python 3 is it valid only for 3.5? When has python started becoming esoteric.

@garg10may Just wait til you see what 3.6 has in store...

@Sp3000 Awesome. Looks like the same set-up as Scala. Infinitely more readable than more alternatives.

R, 31 24 bytes
Thanks to flodel for the 7 bytes.
Assuming the input is already in d.
code:
unique(d[duplicated(d)])

edit: now it outputs correctly if there are more than 2 duplicates as pointed by aditsu.

That looks beautiful! But the 4th test case doesn't seem to be correct...

You can remove which since [ also accepts a logical argument.

Julia, 30 29 bytes
∪(d[find(sum(d.==d',1)-1)])

d.==d' creates a symmetric matrix with the value at i,j being true if d[i]==d[j] and false otherwise. summing in one dimension and then subtracting 1 will produce zero if there's only one of the element and nonzero if there's more than one. find will obtain the indexes of the non-zero elements, which are then used to index the array d itself. ∪ (union) acts like unique when used in this way, removing the repeats.
Old solution:
∪(filter(i->sum(d.==i)>1,d))

Simple - for each entry, it checks if there's more than one of it in the array. Those for which there are more than one are returned by "filter", and then ∪ (union) acts like unique when used in this way, removing the repeats.
Note: originally had it as a function, but question allows array to be stored in a variable, for which I've chosen d as suggested in the question.

Octave, 22 bytes
Based on Luis Mendo's answer.
d(sum(triu(d==d'))==2)

Mathematica, 31 29
Cases[{s_,t_/;t>1}:>s]@*Tally

Python 2.7, 36 42
list(set(filter(lambda x:d.count(x)>1,d)))

edit : surrounded the expression with list(..) in order to comply with the  format required in the question

this will output set not a list

So shall I surround my snippet with a call to  list(...) ?

Yes the output should be an array only.

Python 3 - 33 30 bytes
{_ for _ in d if d.count(_)>1}
Repl output, d as input.

Shell + GNU coreutils, 12
sort|uniq -d

Test output:
$ printf "%s\n" -34 0 1 -34 4 8 4 | ./nonuniq.sh
-34
4
$

Pyth, 7 bytes
ft/QT{Q

Explanation:
ft/QT{Q
           Q = eval(input())
     {Q    set(Q) - deduplicate
f          filter - with T as the filter variable.
  /QT      count in Q of T
 t         minus 1.

The filter removes all elements that appear exactly once from the set of elements.

LINQ,62 54 bytes
Kinda new here, but here goes nothing.
d.GroupBy(c=>c).Where(g=>g.Count()>1).Select(g=>g.Key)

Welcome to the site!  I don't know LINQ, but there's some whitespace you can probably remove from this to improve your score.

K (not K5), 10 bytes
x@&1<#:'=x

Assumes input is in x. I thought it'd be fun to do a non-K5 answer!

Assuming k4, & on a dictionary obviates the need for x@; it can also be made tacit as &1<#:'=: for 8 bytes (dropping the need for x to be initialized). As an aside, the order of the inputs is preserved either way.

K (oK), 7 bytes
Solution:
&1<#:'=

Try it online!
Explanation:
&1<#:'= / the solution
      = / group, key => value (index)
   #:'  / count length of each group
 1<     / 1 less than
&       / keys where true

Haskell + hgl, 11 10 bytes
(!!1)~<<bg

Attempt This Online!
Explanation

bg sort a list into lists of like values.
(!!1) get the second value or [] if there is none.

We use ~<< to glue these together, which basically acts as a concat map.
Reflection
This works pretty well, but the operator precedence is killing me.
Both of the following work but requires the parens to prevent an error.
nb<(df^*nb)
nb<(fdf~<nb)

If the operator precedence was different both of these would be competitive with the first one actually saving bytes.
I don't know if that means the precedence is wrong, but it's worth noticing.
(!!) should have a prefix function, and a bunch of versions with the index prefilled.  I noticed this earlier but still didn't fix it, and now it's coming back to haunt me.

Ruby, 30 28 bytes
In the Interactive Ruby Shell:
d.select{|x|d.count(x)>1}|[]

Saved 2 bytes thanks to Kirill L.

Save 2 bytes: d.select{|x|d.count(x>1)}|[]

I think you mean count(x)>1, not count(x>1).

Mathematica, 23 bytes
With input stored in d:
Pick[#,#2>1]&@@@Tally@d

As a function, 24 bytes:
Pick[#,#2>1]&@@@Tally@#&

for example, with
d = {3, 0, 0, 1, 1, 0, 5, 3}
Tally@d

returns this:
   {{3, 2},
    {0, 3},
    {1, 2},
    {5, 1}}

(first element of each sublist is the element, second one is frequency of occurrence). Applying to this list Pick[#,#2>1]&@@@ transforms it to
{Pick[3,2>1], Pick[0,3>1], Pick[1,2>1], Pick[5,1>1]}

And where the second argument of Pick evaluates to True the first argument is returned.

Perl 6, 16 bytes
Assuming the list is stored in $_ you could use any of the following snippets.
( which was specifically allowed )
(--«.BagHash).Set.keys # 23 bytes

keys .Bag (-) .Set # 18 bytes

# U+2216 SET MINUS
keys .Bag∖.Set # 16 bytes in utf8

If you don't care that you get a Bag you could leave off keys .
$_ = [3, 0, 0, 1, 1, 0, 5, 3];
.Bag∖.Set ∋ 3 # True
.Bag∖.Set ∋ 5 # False

None of these have the limitation of only working on signed integers, or even just numbers for that matter.
say keys .Bag∖.Set given |(<a b c d a a c>), 1/3, 2/3 - 1/3;
# (a c 0.333333)

JavaScript, 35 28 34 bytes
a=>a.filter(o=x=>(o[x]=-~o[x])==2)

Try It Online!

Return [0,0,0] for [0,0,0,0,0,0], intended?

@l4m2, fixed that.

Husk, 4 bytes
u-u¹

Try it online!
u       # unique element of
 -      # set difference between
  u¹    # unique elements of input
        # and input

Thunno D, \$7 \log_{256}(96) \approx\$ 5.76 bytes
Note: this only works on Thunno 1.1.3+
gc1>kZU

(No ATO link since that's on v1.1.0 at the moment)

Explanation
gc1>kZU   # Implicit input. The D flag duplicates it implicitly.
g   k     # Filter the input for elements where the following is truthy:
 c        #   The count of the element in the input
  1>      #   Is greater than 1
     ZU   # Deduplicate and output implicitly

Common Lisp, 57 bytes
(remove-duplicates(remove-if(lambda(x)(<(count x d)2))d))

Octave, 33 bytes
[~,a]=unique(d);d(a)=[];unique(d)

Finds the indices of the first occurrence of each unique integer,
removes those occurrences, and
finds the unique elements of the remaining array.

Here it is on ideone. I've wrapped the snippet in a function so I could call it using all of the sample inputs.

Java 8, 80 Bytes
x.stream().filter(i->x.indexOf(i)!=x.lastIndexOf(i)).collect(Collectors.toSet())

Assuming x contains the input List of numbers.

PHP, 35 37 bytes
Pretty straight forward:
array_diff_key($a,array_unique($a))

As a note: I didn't add the ; at the end of the line, as the questions states:

Your answer may be a snippet which assumes the input to be stored in a variable (d, say) and evaluates to the correct result

So this snippet could be used like this and evaluates to the correct result:
print implode(' ', array_diff_key($a,array_unique($a)));

Another note
The code above works for all test cases provided in the challenge. In those all non-unique characters are at most duplicates. If a element can occur more than two times, another array_unique() would be necessary, which increases the length to 49 bytes:
array_unique(array_diff_key($a,array_unique($a)))

Edits

Saved 2 bytes by replacing array_diff_assoc with array_diff_key. Thanks to Jörg Hülsermann.

array_diff_key instead array_diff_assoc

@JörgHülsermann Good catch. Thanks. Will take a look at your other suggestions within the next days.

Japt, 7 bytes
â £kX â

Try it online!
Explanation:
â £kX â
â         // Get all unique items from the input
  £       // Map X through the results
   kX     //   Remove X from the input
      â   //   Get unique items
-h        // Return the last item

Factor, 10 bytes
duplicates

Try it online!
Builtin

Elm, 91 bytes
e=List.member
g x z=case z of
 a::b->g(a::x)b++if e a b&&not(e a x)then[a]else[]
 _->[]

g[]

Your e function is the same as List.member (though you'll still want to alias it).

Curry (PAKCS), 58 bytes
x!(y:z)|elem y z&&all(/=y)x=y:(y:x)!z|1>0=x!z
_![]=[]

([]!)

Attempt This Online!
Weirdish port of my Elm answer.  Curry has nicer built in functions and pattern matching than Elm.

Hassium, 104 Bytes
func main(){r=[];i=[];foreach(e in d)if(!i.contains(e))i.add(e)else if(!r.contains(e))r.add(e);print(r)}

Run online and see expanded here

Python, 143 bytes
There are already some very good Python answers out there (see @dieters, @ppperry & @xnor answers) so I decided to take a different approach, have some fun with recursion and python lambda functions and see what could I come up with. This is not even close to the best answers here but it was fun to think.
The program takes the integer list as a parameter of function p and returns a list containing non-unique elements.
p=lambda i:[j for j in(lambda n:[]if len(n)<=1 else[(lambda x:x[0]if len([1 for o in x[1:]if x[0]==o])==1 else 'N')(n)]+p(n[1:]))(i) if j!='N']

Two line version for better readability:
p=lambda i:[j for j in(lambda n:[]if len(n)<=1 else[(lambda x:x[0]if
len([1 for o in x[1:]if x[0]==o])==1 else 'N')(n)]+p(n[1:]))(i) if j!='N']

Short Explanation
The inner lambda takes a list x as a parameter and returns the first element of such list if it is repeated only once in the rest of the list (x[1:]). If not it returns 'N'.
The lambda in between the outer and inner lambdas is the one in charge of the recursive search. This returns a list containing the non-unique elements and plenty of 'N's. This is the one which takes the integer list as a parameter.
The outer lambda filters the resulting list getting rid of the unwanted 'N's.
Test cases
p([])
[]
p([-1,0,1])
[]
p([3, 0, 0, 1, 1, 0, 5, 3])
[3,0,1]

STATA, 18 bytes
bys v:drop if _n-2

Note that this requires the paid version of STATA.
Assumes the data is stored in a variable v and then the result will be in v at the end. It works by sorting by v and grouping duplicate values together. Each duplicate value will have at least two values, which means it can drop anything that is not the second element of each value. Third and subsequent elements will already be represented and the first element will either be unique or represented by the second.
For example, make a file a.b with data:
3
0
0
1
1
0
5
3

Then run the following code
insheet using a.b,clear
rename v1 v
bys v:drop if _n-2 //the actual code that does stuff
list v,noobs noheader

J, 12 14 13 bytes
~.d#~1<+/=/~d

Assumes the list is in d.
Explanation:
         =/~d   NB. compare each element in d to each element in d
       +/       NB. sum the columns (giving amount of occurrences)
     1<         NB. see which columns are greater than 1 (=not unique)
  d#~           NB. select those elements from d
~.              NB. unique elements from that

If an anonymous function is OK as well, it can be shortened to 13 12:
~.#~1<+/"1@=

C# - 40
i.GroupBy(g=>g).SelectMany(s=>s.Skip(1))

Using select many to be able to use Skip and skip the first occurrence if it exists.

Jelly, 4 bytes, language postdates challenge
œ-QQ

Try it online!
Same algorithm as the accepted answer, just a shorter syntax.

This look so cryptic 0.o what is that first character?

PHP, 75 bytes
function a($b){return array_unique(array_diff_assoc($b,array_unique($b)));}

Try it online!

Python 2.7, 36 bytes
list({x for x in i if i.count(x)>1})

Where i is the input

You'll need to make it a lambda function because snippets aren't allowed.

3 other people did the same thing, and OP doesn't seem to mind

"Your answer may be a snippet which assumes the input to be stored in a variable". Note that this is not the default, but this question is old and the OP explicitly allowed it, so it is okay.

05AB1E, 8 6 5 4 bytes
¢ÏKÙ

Try it online or verify all test cases.
Explanation:
      #  e.g. input=[1,2,3,2,1,1,6,4,5,6]
¢     # Count how many times each item of the (implicit) input-list occurs in the
      # (implicit) input-list
      #  → [3,2,1,2,3,3,2,1,1,2]
 Ï    # Only keep the values in the (implicit) input-list at the truthy (==1) indices
      #  → [3,4,5]
  K   # Remove those values from the (implicit) input-list, leaving all non-unique items
      #  → [1,2,2,1,1,6,6]
   Ù  # Uniquify that list of non-unique items
      #  → [1,2,6]
      # (after which the result is output implicitly)

Kotlin, 41 bytes
{it.filter{v->it.count{it==v}>1}.toSet()}

Try it online!

Perl 6, 14 bytes
*.repeated.Set

Try it online!
Gets a Set of the repeated elements.

JavaScript (Node.js), 60 bytes
f=>[...new Set(f.filter(e=>f.indexOf(e)!=f.lastIndexOf(e)))]

Try it online!

JavaScript (Node.js), 43 bytes (another try)
a=>a.filter((t={},e=>!(1-(t[e]=++t[e]|0))))

Try it online!

Burlesque, 9 bytes
peJNB\\NB

Try it online!
pe # Parse and push
J  # Duplicate
NB # Remove duplicate elements
\\ # Difference between nubbed and original lists
NB # Nub the difference

Perl 5, 18 bytes
Since a snippet is allowed here, the input is assumed to be in @F.  The TIO link adds a little I/O around it.
grep++$k{$_}==2,@F

Try it online!

R, 24 bytes
names((t=table(v))[t>1])

Try it online!
Completely different approach to the previous R answer for the same number of bytes when written (as here) as a snippet with pre-defined variable v, but 4 bytes shorter as a full program (which, admittedly, isn't required by the challenge).
Outputs the non-unique elements as a vector of strings.

R, 25 bytes
(r=rle(sort(v)))$v[r$l>1]

Try it online!
One byte longer (and yet another approach) if you want to output as an integer vector.

Vyxal, 4 bytes
UÞ⊍U

Try it Online!
Multiset Symmetric difference is very powerful

JavaScript (Node.js), 36 bytes
a=>a.filter(o=x=>a.a+a+a==(o[x]+=a))

Try it online!

jq, 22 bytes
[group_by(.)[][1:2][]]

Try it online!
Explanation:
[                    ]     # collect
                   []      # each
              [1:2]        # second item
            []             # from each
 group_by( )               # array of arrays of
          .                # identical values

Zsh coreutils, 15 bytes
sort|uniq -d|rs

Try it online!

Arturo, 40 bytes
unique select b'x[1<size select b=>[=x]]

Try it

Japt, 7 bytes
ü lÉ cÎ

Try it (includes all test cases)
ü lÉ cÎ     :Implicit input of integer
ü           :Group & sort by value
  l         :Filter by length
   É        :  Minus 1
     c      :Flat map
      Î     :  First element

Pip -p, 11 bytes
UQ:_Ng>1FIg

Takes the integers as command-line arguments. Attempt This Online!
Explanation
UQ:_Ng>1FIg
          g  List of command-line arguments
        FI   Filter by this function:
   _N          The number of times this element appears in
     g         the list of command-line arguments
      >1       is greater than one
UQ:          Uniquify the resulting list

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

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


text:
Regular Polygrams
Given the number of vertices n ≥ 3 and the "step size" 1 ≤ m < n/2  (indicating the distance between two connected vertices), output a graphical representation of the corresponding regular polygram. If the polygram consist of multiple closed loops, each loop must be rendered in a different line colour. (If this sounds confusing, the examples below should hopefully clear things up.)
Rules
Any reasonable solution to the problem will likely satisfy these rules automatically - they are just there to put some constraints on the parameters of the output in order to prevent answers like "This black block is totally a polygram, but you can't see it because I set the line width to over 9000."

You can render the polygram either to a file (which may be written to disc or to the standard output stream) or display it on the screen.
You may use either vector or raster graphics. If your output is rasterised, your image must have dimensions of 400x400 pixels or more, and the polygram's radius (the distance from the centre to each vertex) must be between 35% and 50% of the side length.
The aspect ratio of the polygram must be 1 (so that its vertices lie on a proper circle) - the canvas of the image may be rectangular.
The lines of the polygram must be no thicker than 5% of the radius (and of course, they must have non-zero thickness to be visible).
You may render axes or a frame in addition to the polygram, but nothing else.
You may choose any (solid) background colour.
For polygrams consisting of multiple closed loops, you must support at least 6 visually distinct colours, all of which must be different from the background. (Grey-scale is fine, provided the shades are sufficiently spread out through the spectrum.) Your code must still work for more than 6 loops, but the colours don't have to be distinguishable for any additional loops (i.e. you may also reuse colours from previous loops at that point).

This is code golf, so the shortest answer (in bytes) wins.
Examples
Here are all the outputs up to n = 16 (where the column corresponds to n and the row to m):

Click for larger version.
As examples for larger n, here are (n, m) = (29, 11) and (30, 12):

What about anti aliasing and stuff? (Since we are dealing with angled lines)

@Optimizer I'm not going to prescribe an anti-aliasing algorithm. The lines may be aliased or anti-aliased as long as they are clearly visible. Use your best judgement.

Mathematica, 70 bytes
ListPolarPlot[Table[{2Pi(i+j#2)/#,1},{i,GCD@##},{j,#+1}],Joined->1>0]&

Well... this is my reference implementation which beats both submissions so far. I'm not intent on winning my own challenge, so I'm hoping someone will beat this.
The output is like the plots in the challenge itself, except I'm not removing the axes here:

MATLAB, 85 81
The function displays a plot on the screen.
function f(n,m)
hold all
axis equal
for k=1:gcd(m,n)
plot(i.^(4*(k:m:n^2)/n))
end

Result for n=30, m=12:

I am uncertain this works; if I've done it correctly, it will output this image for 30, 12. See: http://bit.ly/1GFZni7

@durron597 It actually works in Matlab, but the function is not immediately reusable, because the hold all leads to the next plot being drawn on top of the first... I don't know if we have a consensus about the reusability of functions to be honest.

@MartinBüttner It should be hold on to save a byte anyway; if you add four bytes it becomes reusable (clf\n)

Turns out we have a consensus and I even posted the question and answer myself a few months ago. o.O So by that meta post, this would be invalid without something to release the hold.

@MartinBüttner If you change hold all to clf\nhold on does that fix the problem?

@durron597 Only if I use clf\nhold all, otherwise it uses only one colour.

@MartinBüttner It is reusable, but you must close the plot window before calling it again.

@durron597 Added example output.

Hm, seems like a borderline case of reusability, but I'm willing to let it slip. I'm still waiting for a shorter solution though, my reference implementation has only 81 bytes. ;)

CJam, 114
"P2"N400:ASAN6N0aA*aA*q~:M;:K{:CK,f{M*+K%P*2*K/_[mc)\ms)]199f*}_+2ew{~1$.-Af/A,\ff*\f.+{:mo~_3$=@C6%)tt}/}/}/Sf*N*

It outputs the image in ASCII PGM format.
You can try it online, but the output is pretty long. You can change 400 and 199 to smaller numbers to reduce the image size.
CJam has no concept of images, drawing, lines or shapes, so I generated the image in a square matrix, pixel by pixel (one number representing a grey shade for each pixel).
This is what the result looks like for 30 12:


text:
Code me a Jam!!
On occasion I get a little blue and need a little music to cheer me up, but clicking the start button and finding my media player takes sooooooo long. I want a faster way to play a song.
The challenge:
Write a program that:

Choose a song from my home directory (so you don’t mix-up program sound
files with music) (this includes sub folders of the home directory).
This song should be a random choice from all the media in my home folder. This doesn't need to be a perfect random, but I don't want to hear the same song multiple times. (unless that's my only song ;)
To make it simple you should only look for files ending in .mp3.
In the event that you find no music in my home dir, you should print Sorry Joe, no Jams! to stdout or closest equivalent (btw my name isn't Joe ;)
The layout of my home folder will contain no infinite loops
You should use system to play the song instead of using built in media playing APIs in your language (i.e. I want the song to play in the default player for my system).
I should be able to place this file anywhere on my computer (e.g. my desktop or start folder)
Your answer should work on windows, multi-platform is a (un-scored) bonus

This is code golf so the shortest program in bytes wins!!

What is your home dir?

It will differ from computer to computer, so you should use a builtin in your land to determine that. (e.g. in python os.path.expanduser('~'))

Lol, I meant lang, not land

waiting for an answer in CJam :)

May I post a theoretical answer? I haven't used Windows in years, but I think I know an answer. It won't be golfed because I don't know that I can actually test it.

Go ahead, If I know how to use it I can try to test it for you. Otherwise some passer by might be nice and test it ;-)

PowerShell, 59 52 bytes
ii(ls -r./*.mp4|random);(,"Sorry Joe, no Jams!")[$?]

-7 byte golf improvements, thanks to Jaykul:

Use ii (Invoke-Item) instead of saps
No need to use Get- in Get-noun commandlet names, it will be searched by default.
No space needed after -r

Previously at 59 bytes
saps(ls -R ~/*.mp3|Get-Random);(,"Sorry Joe, no Jams!")[$?]

It will throw an error if there are no files, but it will print the message too.
Explanation:

saps is an alias for Start-Process
ls is an alias for Get-ChildItem
~ maps to the home directory, and -R is -Recurse
Get-Random selects a random item from the pipeline.
After trying to launch it, it uses the previous command exit value as an index into a two-item array which either does nothing, or returns the apology message.

Wow that is short, very nice!

You can shorten that to ii(ls -r./*.mp4|random);(,"Sorry Joe, no Jams!")[$?] or if you're not willing to assume PowerShell is in the home directory already (that's it's default), then add one character: ii(ls -r ~/*.mp4|random);(,"Sorry Joe, no Jams!")[$?]

@Jaykul Thanks! I can probably take Get- out of loads of my answers now.

save one more byte by replacing ii(ls -r./*.mp4|random); with ls -r./*.mp4|random|ii;

Dyalog APL, 78 75 73
{0::'Sorry Joe, no Jams!'⋄⎕SH⍵,{⍵⊃⍨?≢⍵}⎕SH∊'dir/b '⍵'*.mp3'}'%HOMEPATH%\'

Explanation:
{...} unnamed function, wherein ⍵ represents whatever is to the right of the }
APL statements (separated by ⋄) are executed leftmost first, but each statement is evaluated from right to left (no precedence rules), so each function gets whatever is to its right as argument
0:: sets a trap for all errors to return the string instead
∊'dir/b '⍵'*.mp3' makes the three strings into a single string
⎕SH passes its argument to cmd.exe
?≢⍵ random 1 ≤ integer  ≤ count (or 0 < float < 1 if count is 0)
⍵⊃⍨ pick that element (floats are invalid indices, so an error is triggered here if count was 0)
⍵, prepends the home dir
⎕SH passes its argument to cmd.exe

I may be missing somthing, but where does it print "Sorry Joe, no Jams!" if no media is found? (full disclosure, I have no idea how APL works ;)

@JAtkin Yeah, I forgot. Fixed.

@JAtkin Do you wan't an explanation now, or was "I have no idea how APL works" only a joke about my mistake?

No, that was for real, I have no clue how APL works.

Python 2, 178 bytes
import glob,os,random
try:os.startfile(random.choice([y for x in os.walk(os.getenv('HOMEPATH'))for y in glob.glob(os.path.join(x[0],'*.mp3'))]))
except:print"Sorry Joe, no Jams!"

Works on Windows, as per the spec.

Nice. I can confirm this works.

You can probably get rid of the []. Also, if you only need it to work on Windows, can't you just replace the call to os.path.join with x[0]+'\*.mp3' or something like that? It looks overly portable for golf :)

Linux shell utilities, 74
Ok, so this one's not going to work on windows, but in case you decide to use a real OS (), here's what you could do in Linux:
find ~ -name \*.mp3|shuf|(read l&&xdg-open "$l"||echo Sorry Joe, no Jams!)

Hey! I actually like windows 10. But I also like bash...

I have a copy of bash and the unix utils installed on my windows 7 box.  So this could work on windows if you have it set up right.

Is it possible to decompile this to Batsh?

@dorukayhan Probably, though I don't see what it would gain, given the dependencies on GNU find and shuf and xdg-utils xdg-open.