text:
Center of Mass from a list of coordinates and their masses
Here is a quick Monday morning challenge...
Write a function or program in the least number of bytes that:

Takes as input a list of [x,y] coordinates
Takes as input a list of the [x,y] coordinates' respective masses
Outputs the calculated center of mass in the form of [xBar,yBar].

Note:

Input can be taken in any form, as long as an array is used.

The center of mass can be calculated by the following formula:

In plain English...

To find xBar, multiply each mass by its respective x coordinate, sum the resulting list, and divide it by the sum of all masses.
To find yBar, multiply each mass by its respective y coordinate, sum the resulting list, and divide it by the sum of all masses.

Trivial Python 2.7 example:
def center(coord, mass):
    sumMass = float(reduce(lambda a, b: a+b, mass))
    momentX = reduce(lambda m, x: m+x, (a*b for a, b in zip(mass, zip(*coord)[0])))
    momentY = reduce(lambda m, y: m+y, (a*b for a, b in zip(mass, zip(*coord)[1])))
    xBar = momentX / sumMass
    yBar = momentY / sumMass
    return [xBar, yBar]

Test Cases:
> center([[0, 2], [3, 4], [0, 1], [1, 1]], [2, 6, 2, 10])
[1.4, 2.0]

> center([[3, 1], [0, 0], [1, 4]], [2, 4, 1])
[1.0, 0.8571428571428571]

This is code-golf, so the least number of bytes wins!

Since this is just "compute a weighted average of vectors" I'd be quite surprised if we haven't done it before. (At the moment, I can't find anything though.)

@MartinBüttner I looked as well, and could not find any. If this is a dupe, feel free to close it though.

Can the input be taken in the other order? Or in the form: [x,y,m],[x,y,m]...?

@FryAmTheEggman Question edited for valid inputs.

@MrPublic: What about [(x1,y1,m1), (x2,y2,m2)], e.g. a list of tuples? Or doesn't it matter whether the arguments are tuples, lists or arrays? What about three lists/arrays?

@FryAmTheEggman Frankly, it does not matter. Whichever you prefer/your golfing language has access to.

I know you've basically been saying "yes" for language-friendlier input options, but I wanted to check anyway - would an object input be acceptable? ({m: m1, x: x1, y:y1},{m: m2, x: x2, y:y2}, etc.?)

@ricdesi Sure, that can work

Can m be a taken as a column array instead of a row array? In your nested-list notation it would be [[2] [6] [2] [10]]

@DonMuesli Sure

What about [x1, x2, ...], [y1, y2, ...], [m1, m2, ...]?

@Mego Yes, that is a valid input

What about the wrong type in input? What about the input is as [[1,2,3],[3,4,5]] and one insert [[1,2,3], [4,5]] ?

What about overflow in the intermediate calculus?

MATL, 6 5 bytes
ys/Y*

Input format is a row vector with the masses, then a two-column matrix with the coordinates (in which spaces or commas are optional).

First example:
[2, 6, 2, 10]
[0,2; 3,4; 0,1; 1,1]

Second example:
[2, 4, 1]
[3,1; 0,0; 1,4]

Try it online!
Explanation
Let m denote the vector of masses (first input) and c the matrix of coordinates (second input).
y     % implicitly take two inputs. Duplicate the first.
      % (Stack contains, bottom to top: m, c, m)
s     % sum of m.
      % (Stack: m, c, sum-of-m)
/     % divide.
      % (Stack: m, c-divided-by-sum-of-m)
Y*    % matrix multiplication.
      % (Stack: final result)
      % implicitly display

y is pretty useful!! +1

@David Yeah! Combined with implicit input, it does a lot of things in this case :-)

Mathematica, 10 bytes
#.#2/Tr@#&

Example:
In[1]:= #.#2/Tr@#&[{2,6,2,10},{{0,2},{3,4},{0,1},{1,1}}]

Out[1]= {7/5, 2}

I never used Dot.  But I will after seeing your usage above!

Mathcad, 19 "bytes"

Uses Mathcad's tables for data input
Uses Mathcad's built-in vector scalar product for multiplying axis ordinate and mass
Uses Mathcad's built-in summation operator for total mass

As Mathcad uses a 2D "whiteboard" and special operators (eg, summation operator, integral operator), and saves in an XML format, an actual worksheet may contain several hundred (or more) characters.  For the purposes of Code Golf, I've taken a Mathcad "byte count" to be the number of characters or operators that the user must enter to create the worksheet.
The first (program) version of the challenge takes 19 "bytes" using this definition and the function version takes 41 "bytes".

First time I've ever seen a Matcad solution here. Very nice. +1.

Thank you, rayryeng.  It's probably because it's a bit of a challenge doing some of the "holes" on the "course" given that Mathcad only has basic string functions and doesn't have human-readable, text-only source code.

Jelly, 6 bytes
S÷@×"S

or
÷S$×"S

Input is via two command-line arguments, masses first, coordinates second.
Try it online!
Explanation
S       Sum the masses.
   x"   Multiply each vector by the corresponding mass.
 ÷@     Divide the results by the sum of masses.
     S  Sum the vectors.

or
÷S$     Divide the masses by their sum.
   ×"   Multiply each vector by the corresponding normalised mass.
     S  Sum the vectors.

Julia, 25 17 bytes
f(c,m)=m*c/sum(m)

Missed the obvious approach :/ Call like f([3 1;0 0;1 4], [2 4 1]).

MATLAB / Octave, 18 16 bytes
Thanks to user beaker and Don Muesli for removing 2 bytes!
Given that the coordinates are in a N x 2 matrix x where the first column is the X coordinate and the second column is the Y coordinate, and the masses are in a 1 x N matrix y (or a row vector):
@(x,y)y*x/sum(y)

The explanation of this code is quite straight forward.  This is an anonymous function that takes in the two inputs x and y.  We perform the weighted summation (the numerator expression of each coordinate) in a linear algebra approach using matrix-vector multiplication.  By taking the vector y of masses and multiplying this with the matrix of coordinates x by matrix-vector multiplication, you would compute the weighted sum of both coordinates individually, then we divide each of these coordinates by the sum of the masses thus finding the desired centre of mass returned as a 1 x 2 row vector for each coordinate respectively.
Example runs
>> A=@(x,y)y*x/sum(y)

A =

    @(x,y)y*x/sum(y)

>> x = [0 2; 3 4; 0 1; 1 1];
>> y = [2 6 2 10];
>> A(x,y)

ans =

    1.4000    2.0000

>> x = [3 1; 0 0; 1 4];
>> y = [2 4 1];
>> A(x,y)

ans =

    1.0000    0.8571

Try it online!
https://ideone.com/BzbQ3e

You can remove ;, and also ' by properly choosing input format (x as row vector)

@DonMuesli Thanks :) Reduced the byte count by 2.

CJam, 14 bytes
{_:+df/.f*:.+}

An unnamed function with expects the list of coordinate pairs and the list of masses on the stack (in that order) and leaves the centre of mass in their place.
Test it here.
Explanation
_    e# Duplicate list of masses.
:+d  e# Get sum, convert to double.
f/   e# Divide each mass by the sum, normalising the list of masses.
.f*  e# Multiply each component of each vector by the corresponding weight.
:.+  e# Element-wise sum of all weighted vectors.

Perl 6, 36 33 30 bytes
{[Z+](@^a Z»*»@^b) X/sum @b}

Seriously, 16 bytes
╩2└Σ;╛2└*/@╜2└*/

Takes input as [x-coords]\n[y-coords]\n[masses], and outputs as xbar\nybar
Try it online!
Explanation:
╩2└Σ;╛2└*/@╜2└*/
╩                 push each line of input into its own numbered register
 2└Σ;             push 2 copies of the sum of the masses
     ╛2└*/        push masses and y-coords, dot product, divide by sum of masses
          @       swap
           ╜2└*/  push masses and x-coords, dot product, divide by sum of masses

Haskell, 55 50 bytes
z=zipWith
f a=map(/sum a).foldr1(z(+)).z(map.(*))a

This defines a binary function f, used as follows:
> f [1,2] [[1,2],[3,4]]
[2.3333333333333335,3.333333333333333]

See it pass both test cases.
Explanation
Haskell is not well suited for processing multidimensional lists, so I'm jumping through some hoops here.
The first line defines a short alias for zipWith, which we need twice.
Basically, f is a function that takes the list of weights a and produces f a, a function that takes the list of positions and produces the center of mass.
f a is a composition of three functions:
z(map.(*))a      -- First sub-function:
z         a      --   Zip the list of positions with the mass list a
  map.(*)        --   using the function map.(*), which takes a mass m
                 --   and maps (*m) over the corresponding position vector
foldr1(z(+))     -- Second sub-function:
foldr1           --   Fold (reduce) the list of mass-times-position vectors
       z(+)      --   using element-wise addition
map(/sum a)      -- Third sub-function:
map              --   Map over both coordinates:
   (/sum a)      --     Divide by the sum of all masses

JavaScript (ES6), 60 bytes
a=>a.map(([x,y,m])=>{s+=m;t+=x*m;u+=y*m},s=t=u=0)&&[t/s,u/s]

Accepts an array of (x, y, mass) "triples" and returns a "tuple".

Are the parentheses around [x,y,m] necessary? iirc, they're not required if there's only one input argument to the arrow function.

@PatrickRoberts Yes, they're necessary in all cases except that one trivial one of exactly one standard argument.

R, 32 25 bytes
function(a,m)m%*%a/sum(m)

edit -7 bytes by switch to matrix algebra (thanks @Sp3000 Julia answer)
pass an array (matrix with 2 columns, x,y) as coordinates
and vector m of weights, returns an array with the required coordinates

PHP, 142 bytes
function p($q,$d){return$q*$d;}function c($f){$s=array_sum;$m=array_map;$e=$f[0];return[$s($m(p,$e,$f[1]))/$s($e),$s($m(p,$e,$f[2]))/$s($e)];}

Exploded view
function p($q, $d) {
  return $q * $d;
}

function c($f) {
  $s = array_sum;
  $m = array_map;
  $e = $f[0];
  return [ $s($m(p,$e,$f[1])) / $s($e),
           $s($m(p,$e,$f[2])) / $s($e) ];
}

Required input
Array[Array]: [ [ mass1, mass2, ... ],
                [ xpos1, xpos2, ... ],
                [ ypos1, ypos2, ... ] ]

Return
Array: [ xbar, ybar ]

The p() function is a basic map, multiplying each [m] value with the corresponding [x] or [y] value.  The c() function takes in the Array[Array], presents the array_sum and array_map functions for space, then calculates Σmx/Σm and Σmy/Σm.
Might be possible to turn the calculation itself into a function for space, will see.

Mathcad, 8 "bytes"
I don't know what I wasn't thinking of in my previous answer.  Here's a shorter way making proper use of matrix multiplication.  The variable p contains the data - if setting the variable counts towards the total, then add another 2 "bytes" (creation of input table = 1 byte, variable name = 1 byte).

Python 3,  95 90 88 bytes
Solution
lambda c,m:list(map(sum,zip(*[[i[0]*j/sum(m),i[1]*j/sum(m)]for i,j in zip(*([c,m]))])))

Results
>>> f([[0,2],[3,4],[0,1],[1,1]],[2,6,2,10])
[1.3999999999999999, 2.0]
>>> f([[3,1],[0,0],[1,4]],[2,4,1])
[1.0, 0.8571428571428571]

thanks to @Zgarb saving 2 bytes

A recursive solution for fun (95 bytes)
f=lambda c,m,x=0,y=0,s=0:f(c[1:],m[1:],x+c[0][0]*m[0],y+c[0][1]*m[0],s+m[0])if c else[x/s,y/s]

Results
>>> f([[0,2],[3,4],[0,1],[1,1]],[2,6,2,10])
[1.4, 2.0]
>>> f([[3,1],[0,0],[1,4]],[2,4,1])
[1.0, 0.8571428571428571]

I think *([c]+[m]) could be shortened to *[c,m].

Python 3, 63 bytes
lambda a,b:[sum(x*y/sum(b)for x,y in zip(L,b))for L in zip(*a)]

Vector operations on lists is long :/
This is an anonymous lambda function - give it a name and call like  f([[0,2],[3,4],[0,1],[1,1]],[2,6,2,10]).

Axiom, 158 bytes
c(a:List List Float):List Float==(x:=y:=m:=0.;for i in 1..#a repeat(~index?(3,a.i)=>return[];x:=x+a.i.3*a.i.1;y:=y+a.i.3*a.i.2;m:=m+a.i.3);m=0.=>[];[x/m,y/m])

ungolf it
-- Input List of Coordinate and masses as [[xi,yi,mi]]
-- Return center of mass for the list a as [x,y] Float coordinates
-- or [] if some error occur [for example masses are all 0]
cc(a:List List Float):List Float==
    x:=y:=m:=0.
    for i in 1..#a repeat
         ~index?(3,a.i)=>return []
         x:=x+a.i.3*a.i.1
         y:=y+a.i.3*a.i.2
         m:=m+a.i.3
    m=0.=>return []
    return[x/m,y/m]

results
(21) -> c([[0,2,2],[3,4,6],[0,1,2],[1,1,10]])
   (21)  [1.4,2.0]
                                                         Type: List Float
(22) -> c([[3,1,2],[0,0,4],[1,4,1]])
   (22)  [1.0,0.8571428571 4285714286]
                                                         Type: List Float

k, 13 bytes
{(+/x*y)%+/y}

Try it online!


text:
Yahtzee Small Straight Detection
In the game Yahtzee, players roll five six-sided dice, and attempt to create certain hands to score points. One such hand is a small straight: four consecutive numbers, not necessarily in order. The three possible small straights are 1, 2, 3, 4, 2, 3, 4, 5, and 3, 4, 5, 6.
For example, [3, 5, 6, 1, 4] contains the small straight [3, 4, 5, 6].
Input
An unsorted list of five integers, each between 1 and 6 inclusive, representing a Yahtzee hand.
Output
A truthy value if the hand contains a small straight and a falsy value otherwise.
Test cases
Truthy:
[[1, 2, 3, 3, 4], [1, 2, 3, 4, 5], [3, 5, 6, 1, 4], [1, 5, 3, 4, 6], [4, 5, 2, 3, 5], [1, 4, 3, 2, 2], [5, 4, 3, 6, 3], [5, 3, 5, 4, 6], [2, 4, 5, 1, 3], [3, 6, 4, 5, 3], [5, 6, 4, 3, 5], [4, 5, 3, 6, 3], [4, 5, 5, 3, 2], [4, 5, 2, 3, 5], [4, 6, 5, 3, 6], [4, 2, 3, 1, 5], [3, 6, 4, 6, 5], [5, 2, 1, 3, 4], [4, 4, 1, 2, 3], [4, 1, 4, 2, 3], [5, 1, 4, 3, 6], [5, 2, 2, 3, 4], [4, 4, 6, 5, 3], [2, 4, 3, 5, 1], [5, 4, 2, 5, 3], [2, 3, 5, 5, 4], [1, 6, 3, 4, 5], [4, 5, 3, 3, 6], [6, 4, 3, 6, 5], [4, 6, 6, 5, 3], [4, 3, 5, 2, 2], [2, 3, 2, 1, 4], [4, 2, 6, 1, 3], [4, 4, 5, 3, 6], [4, 5, 6, 3, 6]]

Falsy:
[[1, 2, 3, 5, 6], [5, 1, 1, 6, 6], [4, 6, 4, 1, 1], [6, 4, 1, 6, 4], [4, 6, 3, 6, 6], [2, 1, 4, 6, 4], [2, 6, 1, 5, 6], [2, 6, 1, 5, 6], [3, 6, 5, 3, 2], [3, 2, 3, 5, 3], [5, 5, 6, 2, 3], [3, 4, 6, 4, 3], [1, 4, 5, 5, 1], [1, 4, 4, 4, 1], [1, 6, 5, 1, 4], [6, 6, 4, 5, 4], [5, 3, 3, 3, 2], [5, 2, 1, 5, 3], [3, 5, 1, 6, 2], [6, 4, 2, 1, 2], [1, 3, 1, 3, 2], [3, 1, 3, 4, 3], [4, 3, 1, 6, 3], [4, 6, 3, 3, 6], [3, 6, 3, 6, 4], [1, 1, 3, 1, 3], [5, 5, 1, 3, 2], [3, 4, 2, 6, 6], [5, 4, 2, 6, 1], [2, 4, 4, 5, 4], [3, 6, 2, 5, 5], [2, 5, 3, 5, 1], [3, 2, 2, 3, 4], [5, 2, 2, 6, 2], [5, 6, 2, 5, 6]]

Inspired by this
Catalogue

var QUESTION_ID=74997;var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";var COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk";var OVERRIDE_USER=30525;var answers=[],answers_hash,answer_ids,answer_page=1,more_answers=true,comment_page;function answersUrl(index){return"http://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"http://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){if(c.owner.user_id===OVERRIDE_USER)answers_hash[c.post_id].comments.push(c)});if(data.has_more)getComments();else if(more_answers)getAnswers();else process()}})}getAnswers();var SCORE_REG=/<h\d>\s*([^\n,<]*(?:<(?:[^\n>]*>[^\n<]*<\/[^\n>]*>)[^\n,<]*)*),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;var OVERRIDE_REG=/^Override\s*header:\s*/i;function getAuthorName(a){return a.owner.display_name}function process(){var valid=[];answers.forEach(function(a){var body=a.body;a.comments.forEach(function(c){if(OVERRIDE_REG.test(c.body))body='
'+c.body.replace(OVERRIDE_REG,'')+'
'});var match=body.match(SCORE_REG);if(match)valid.push({user:getAuthorName(a),size:+match[2],language:match[1],link:a.share_link,});else console.log(body)});valid.sort(function(a,b){var aB=a.size,bB=b.size;return aB-bB});var languages={};var place=1;var lastSize=null;var lastPlace=1;valid.forEach(function(a){if(a.size!=lastSize)lastPlace=place;lastSize=a.size;++place;var answer=jQuery("#answer-template").html();answer=answer.replace("{{PLACE}}",lastPlace+".").replace("{{NAME}}",a.user).replace("{{LANGUAGE}}",a.language).replace("{{SIZE}}",a.size).replace("{{LINK}}",a.link);answer=jQuery(answer);jQuery("#answers").append(answer);var lang=a.language;lang=jQuery(''+lang+'').text();languages[lang]=languages[lang]||{lang:a.language,lang_raw:lang.toLowerCase(),user:a.user,size:a.size,link:a.link}});var langs=[];for(var lang in languages)if(languages.hasOwnProperty(lang))langs.push(languages[lang]);langs.sort(function(a,b){if(a.lang_raw>b.lang_raw)return 1;if(a.lang_raw<b.lang_raw)return-1;return 0});for(var i=0;i<langs.length;++i){var language=jQuery("#language-template").html();var lang=langs[i];language=language.replace("{{LANGUAGE}}",lang.lang).replace("{{NAME}}",lang.user).replace("{{SIZE}}",lang.size).replace("{{LINK}}",lang.link);language=jQuery(language);jQuery("#languages").append(language)}}
body{text-align:left!important}#answer-list{padding:10px;width:290px;float:left}#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Shortest Solution by Language

Language	User	Score

Leaderboard

	Author	Language	Size

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

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

Does the truthy value have to be consistent? Could I output some (non-constant) positive integer for truthy results and 0 for falsy results?

@MartinBüttner It needn't be consistent.

Make sure to check if it works on [1,2,3,3,4]. Many answers die because of this.

Can I assume the array is padded by zeros?

@CatsAreFluffy No.

@CatsAreFluffy "die"

What if the hand is a large straight? Should it give true or false

@edc65 True; as in the second test case.

MATL, 7 12 11 9 8 6 bytes
Thanks a lot to @lirtosiast for removing 2 bytes
ud7BXf

Truthy is an array of nonzero values. Falsy is empty array (no output displayed).
As of release 16.2.0, u is stable by default. So the code needs an extra S to sort the output: uSd7BXf (7 bytes). The link includes this modification.
Try it online!
u     % input array implicitly. Transform into array of unique elements sorted
d     % array of differences between consecutive elements
7B    % push arrray [1 1 1] (number 7 converted to binary)
Xf    % indices of occurrences of the second array within the first

6 bytes?! This is unbelievable!

@AandN \o/ \o/ \o/

I'd like it if you would keep the byte count history like other users do. It shows the progression.

@mbomb007 I had removed it because the first answer was wrong, so its byte count is meaningless. But here it goes, I've kept it since the first working version

At least the progression from 8 to 6 was correct...

@mbomb007 Do you mean it's usual to keep the initial byte count even if the answer wasn't working properly? Well, I guess it makes sense: an increase in byte count implies the question wasn't working. I'll do that

@DonMuesli Yeah. Like CatsAreFluffy's answer.

@mbomb007 That's a good idea. There is no ambiguity. I'll do that in the future. Thanks!

Crossed out 9 is almost still regular 9 ;(

@DonMuesli FWIW I agree with you and disagree with mbomb007. Versions that weren't working are meaningless and shouldn't be included in the history. I usually include only byte counts of working versions, so it's definitely a strictly decreasing sequence.

@MartinBüttner So, remove byte count of non-working versions only. That's a good idea. (In this answer I had initially removed the whole byte count history)

Python, 44 bytes
lambda l:any({i+1,i+2,i+3}<set(l)for i in l)

Back after 9 months with an improvement. We don't need to check if i is in the set with Zgarb's idea of checking only start values in the set. We can now also use < for strict subsets because i must also be included.

47 bytes:
lambda l:any({i,i+1,i+2,i+3}<=set(l)for i in l)

Checks if any die rolls is the start of a small straight set. Thanks to Zgarb for the idea of only checking start values in the list, saving 5 bytes.
Python 3.5 has shorter set conversion, for 45 bytes
lambda l:any({i,i+1,i+2,i+3}<={*l}for i in l)

It's the same length to do {*range(i,i+4)} as {i,i+1,i+2,i+3}.

Labyrinth, 41 bytes
=|?30
0 _ }:/2
3 1  { "!
({(  &{/
} )
+:"

A collab answer with @MartinBüttner. I think we've squeezed this one far beyond my initial expectations.
Output is 1 for truthy, empty for falsy. Try it online!
Quick explanation
Convert each number n to a binary integer 1 followed by n+1 zeroes, i.e. 2^(n+1). Bitwise OR the results and check for 1111 (in binary). Exponentiation needs to be implemented manually in Labyrinth.
Detailed explanation
The usual primer:

Labyrinth is a stack-based 2D programming language. For memory there is a main stack and an auxiliary stack, and popping from an empty stack produces 0 rather than an error.
At each junction, where the instruction pointer could move down two or more possible paths, the top of the stack is checked to decide where to go next. Negative is left, zero is forward, positive is right.
Digits in Labyrinth do not push the corresponding digit to the stack – rather, they pop n and push n*10 + <digit>. To start a new number, _ pushes zero.

Setup
Execution begins at the top-left, with the instruction pointer facing rightwards. We execute:
=        Swap tops of main and auxiliary stacks
|        Bitwise OR

Aside from effectively pushing zeroes, these instructions don't change the stack.
Left loop: exponentiate and bitwise OR
Labyrinth doesn't have exponentiation, so we need to implement it manually. First we read an integer with ?, and since this is guaranteed to be positive we turn right. _1 pushes 1 and we enter the inner loop.
The inner loop does the following:
(       Decrement. For the first iteration this turns 1 into 0 so we move straight ahead
        downwards; for other iterations when we're coming from the left this turns 2^k into
        2^k-1 > 0, making us turn right (also downwards)
)       Increment again
"       No-op
:+      Duplicate and add, i.e. double
}       Move result to aux
(       Decrement input n. Since this is at a junction, we turn right and continue the
        loop if n is still positive, else we exit the loop by going forwards if n is 0
{       Move result from aux to main

Since this is a do-while loop, for input n this calculates 2^(n+1). We end with the zeroed input on the stack, and 30 turns this zero into 30. We then perform the same instructions from the setup, but this time they're actually useful.
=       Swap tops of main and aux, moving 30 to aux and 2^(n+1) to main
|       Bitwise OR (for the first input, this is bitwise OR with an implicit zero at
        the bottom of the stack)

This loop continues for each number in the input until EOF, when ? returns 0. This makes us move forwards instead of turning, leading into...
Bridge: some extra setup
The 30 after the ? turns the 0 from EOF into 30, which is pushed to the auxiliary stack via }. Of importance is the fact that we pushed a 30 to the auxiliary stack for every input number, so now the auxiliary stack contains 5 + 1 = 6 copies of the number 30.
Meanwhile, the main stack contains the bitwise OR of 2^(n+1) for each input n. Let's call this bitwise OR b, since it gets modified in the right loop.
Right loop: check result and output
Here's what happens in the right-hand side loop:
:     Duplicate top of stack. This makes us turn right for the first iteration, since
      b is positive. For later iterations, when we're coming in from the
      right, we usually take the same turn (but see below)
{&    Bitwise AND with a 30 pulled from aux
{/    Integer division by a 30 pulled from aux. This returns 1 or 0 depending on whether
      we have found a small straight.
"     No-op at a junction. Turn right if small straight, else go forward.

[If small straight found]
!     Output the previous 1. This is at a dead end, so we turn around.
"     No-op at junction. Turn right since top of stack is positive.
      (stuff happens - see below)

[If small straight not found]
2     Turn 0 into 2
/     Divide b by said 2
      (continue loop)

Now, termination is a little tricky with this program. Here are the possible ways the program can terminate:

After 3 iterations of the right loop, and b is still positive: Remember how we put six 30s into the auxiliary stack? Since we use two of them each iteration, on the fourth iteration we start pulling zeroes from the bottom of the auxiliary stack. This causes a division by zero when we do {/, and the program terminates.
After outputting a 1 for a small straight: So we've executed ! then turned right at the no-op " junction. Then we're in for a rollercoaster as we start crawling all over the left half again:

2     Pops b, pushes 10*b + 2
/}    Divide bottom zero by b, giving zero, pushing to aux
03    Zero at bottom of stack becomes 3
?     Push 0 due to EOF, main stack [3 0]. Go straight.
|=    Bitwise OR then swap tops of main and aux
03    Zero at bottom of stack becomes 3, stacks [3 | 3]
({(   Dec, shift dec. Stacks [2 2 | ], and we're in the exponentiator again.

After a few trips in the exponentiator, the stack looks something like [12 | 30 30], which errors out by division by zero after another two iterations in the right loop.

After b becomes zero at some point: The key here is that the : in the right loop is at a junction. If the input was, say, 1 1 1 1 1, then b would be 4, then 2, then 1, then 0 after the third iteration. Instead of turning at the :, the IP now moves straight ahead, and something like the previous case happens to cause an eventual termination.

All in all it's a mess how the program terminates, but hey anything to save those few bytes!

Mathematica, 39 43 44 31 39 44 bytes
Differences@Union@#~MatchQ~{___,1,1,1,___} &

Well, not crossed out 44 is still 44...

Haskell, 39 34 bytes
f x=any(\y->all(`elem`x)[y..y+3])x

Usage example: f [1,2,3,3,4] -> True.
Similar to @xnor's answer, i.e. check if any of the small straights are in the input list. Actually I'm testing all "small straights" (i.e. 4 consecutive numbers) starting with any of the numbers from the input list, some of them being invalid and therefore always fail the all test and don't distort the any test, e.g. [5,6,7,8].
Edit: @Zgarb saved 5 bytes. Thanks!

MATL, 11 bytes
udY'w1=)2>a

Try it online
u           unique (implicit sort)
d           diff
Y'          run-length-encode
w1=)        exract the length of all runs of ones
2>          check whether they are longer than two
a           any (any non-zero element)

JavaScript (ES6), 55 53 bytes
a=>(z=[0,1,2,3]).some(b=>z.every(c=>a.includes(c+b)))

returns true for truthy and false for falsy.
How it works
Return if some value in [0, 1, 2, 3] fulfills the condition that for every value in [0, 1, 2, 3] the sum of these two values is in the input array.
So, return if the array has every value in [0, 1, 2, 3] (impossible), [1, 2, 3, 4], [2, 3, 4, 5], or [3, 4, 5, 6].

Perl, 47 43 42 39 37 29 bytes
Includes +1 for -p
Run with the sequence on STDIN, e.g.
perl -p smallstraight.pl <<< "1 2 3 3 4"

smallstraight.pl:
s//$_|=1x$'.w/reg;$_=/.w{4}/

Explanation
s//          / eg             Each possible postfix string (including the
                              empty string) is assigned to $' in turn
                              So each input digit will be the start of $'
                              at least once
       1x$'.w                 Put a w at position $'.
                              e.g. digit 4 becomes 1111w
   $_|=                       Or into existing $_.
                                w        is binary 0111 0111
                                space    is binary 0010 0000
                                digit<=7 is binary 0011 0xxx
                              So an "or" with "w" is always w again:
                                                   0111 0111
                              And no other way can you get a w since w is the
                              only thing that can set the high bits. So the
                              already existing string in $_ has no effect on
                              the number of w's in the result
              r               The $_ that has been "or"ed several times is
                              exfiltrated out of the substitution. It will
                              have a w in every position that the original
                              string had a digit with an extra w at position
                              0 since the s///g will also have matched the
                              empty string at the end
                              So e.g. "1 2 3 5 6" will become "wwww3ww 6"
                  $_=/.w{4}/  We have a small straight if there were 4
                              consecutive numbers, now 4 consecutive w's. But
                              the w we always get at the start of the string
                              doesn't count. Notice that the string cannot
                              have a newline since bit "0010 0000" is always
                              set. So "." to skip one character is safe

Ruby, 58 55 50 47 43 33 bytes
I just now saw that I have been beaten to the punch by Paul's Ruby answer. I am not deterred however as I think this could still be a decent answer with some more golfing. Based, in part, on xnor's Python answer.
Edit: Some golfing and correcting a mix-up in the ternary conditional.
Edit: I now use .any? like Not that Charles does in their Ruby answer but only because I needed a simple way to remove a and to return only a truthy and a falsey with !([*i..i+3]-l)[0] since .map would return an array of true and false.
->l{l.any?{|i|!([*i..i+3]-l)[0]}}

Returns either true or false.
Ungolfed:
def f(l)
  a = p
  l.any? do |i|
    if ( (i..i+3).to_a - l )[0]     # if (i..i+3) in l
      a = false                     # a[0] is equivalent to !a.empty?
    else
      a = true
    end
  end
  puts a
end

Important note: For those who want to use the (a2 - a1).empty? code to determine if all elements of a2 are in a1, note that if you want to make sure that, for example, [2,1,2] is in [1,2,3,3] to multiplicity of elements, you need other code. Relevant discussion of this problem here.

Could you link to the answer instead of the user?

@CᴏɴᴏʀO'Bʀɪᴇɴ Fixed.

I think I accidentally used the same algorithm you did.  Sorry!  http://codegolf.stackexchange.com/a/75273  I wouldn't have posted if I noticed that before I posted it.

@NotthatCharles Well, your answer was better than mine, so I have given you an upvote.

Also, just as a note, since 0 is truthy in Ruby, I think your answer is invalid.  p is a one-character falsy value.

@NotthatCharles Done. Thanks.

Ruby, 31
Instead of trying to be smart like the first Ruby answer, this just goes through the array of integers, and for each integer, sees if there's a small straight in the input starting with that integer.  Doesn't worry about the possible values or uniqueness.
This seems to be using the same algorithm as Sherlock's answer.
->x{x.any?{|d|[*d..d+3]-x==[]}}

Pyth, 13 11
@.PQ4.:S6 4

2 bytes thanks to Jakube!
Returns a non-empty list for truthy, empty list for falsy.
Try it online or run the Test Suite (split by a syntax error for Readability™).

.PQ4 instead of .:{SQ4

Japt, 13 12 bytes
Uá4 d@7o ¬fX

Test it online! or Verify all test cases.
How it works
       // Implicit: U = input array
Uá4    // Take all permutations of U of length 4.
d@     // Return whether any item X returns truthily to this function:
7o ¬   //  Take the range [0..7) and join. Produces "0123456".
fX     //  Match X in this string.
       //  This returns null if X is not a subset of [0..7), and a (truthy) array otherwise.
       // Implicit output

Nice approach!!

CJam, 16 15 12 bytes
7,4ewl~f&3f>

Yields a non-empty string for truthy test cases and an empty string for falsy ones.
Test suite.
Explanation
7,      e# Push [0 1 2 3 4 5 6].
4ew     e# Get all length-4 sublists. This gives:
        e#   [[0 1 2 3]
        e#    [1 2 3 4]
        e#    [2 3 4 5]
        e#    [3 4 5 6]]
        e# i.e. all possible small straights (and an impossible one).
l~      e# Read and evaluate input.
f&      e# Set intersection of each small straight with the full list.
        e# If any small straight is contained in the list, all 4 of its
        e# elements will be retained.
3f>     e# Discard the first three elements of each intersection. If a
        e# small straight was not in the list, this will give an empty
        e# list. Otherwise, one element will remain.

At the end of the program, this list is flattened into a single string and printed to STDOUT. If any of the small straights were found, their remaining elements will be in the string. Otherwise all the lists were empty, and so the string is also empty.

@mbomb007 "i.e. all possible small straights (and an impossible one)." The input will never contain zero, so that small straight will never be found and therefore doesn't affect the result.

@mbomb007 Yeah, getting rid of [0 1 2 3] would cost 2 bytes.

C#, 156 151 150 131 121 93 92 90 bytes
int l;bool f(int[]a){foreach(var v in a)l|=1<<v-1;return(l&15)>14||(l&30)>29||(l&60)>59;}

or: (same number of bytes)
int l;bool f(int[]a){foreach(var v in a)l|=1<<v;return(l&30)>29||(l&60)>59||(l&120)>119;}

Ungolfed:
int l;
bool f(int[] a)
{
    foreach (var v in a)
        l |= 1 << v - 1;
    return (l & 15) > 14 ||   //Bits 1-4 are set OR
           (l & 30) > 29 ||   //Bits 2-5 are set OR
           (l & 60) > 59;     //Bits 3-6 are set
}

Big Edit: Just realized I only need to post a function, not a whole program.  That saves a whole lot.  No boilerplate, no need to convert string input into numbers, etc.  Now we're actually approaching a respectable number of bytes (for a non-golfing language anyhow).

return bool to save 3 bytes.

@Timbo - Yeah, I thought about that after I went home yesterday, fixed it.  That was leftover from it being a full program (main in C# must return either void or int.)  Unfortunately, I also gained 2 bytes because I was expecting 0-5 instead of 1-6.  So net loss of 1 byte anyhow.

05AB1E, 9 8 10 bytes
Truthy is containing an array in the output, falsy is when no output is produced. Code:
œvy¦¥1QPiy

Explanation outdated:
œ          # Compute all permutations
 vy        # Map over each permutation
   ¦       # Head, leaves [1:]
    ¥      # Delta, computes the differences between the elements
     P     # Product, which computes the product of the array
      iy   # If equal to 1, push the array again
           # Implicit, if there is a match, an array will be displayed.

Try it online!
Uses CP-1252 encoding.

Javascript ES6 47 bytes
q=>/12+3+4|23+4+5|34+5+6/.test(q.sort().join``)

Javascript ES6 52 bytes
q=>/1,+1,+1/.test(q.sort().map((a,i)=>a-q[i-1]||``))

//sort the array
//map each element to the difference from the last element
//Look for three 'increment by ones' (ignore increment by 0s)

Old answer
Javascript ES6 64 bytes
thanks to ETHproductions for helping save several bytes
q=>q.sort().map(o=>(o-s?o-s<2?t++:t=t>3?t:1:0,s=o),t=1,s=-1)|t>3

q=>              //take an input
q.sort()         //sort it
.map(            //for each number
  o=>
    s=           //set current value =
      !(o-s) ?   //if it's a duplicate
        o :      //just keep the current state (set s to s again)
        (
         o-s < 2 ?  //if the current values is one more than the next one
           t++ :    //increment the total
           t=t>4?t:1 //otherwise, set the total back to 1, unless we've hit 4 total already
         )&&o  //set the current value to the current token
   ,t=1,s=-1)  //init the total, and the current value (set it to -1 since we won't hit that anyways

|t>3 //return total > 3 (so 1 if we get a run of 4 or 5)

Testing
//true and false test cases from OP
tr = [[1, 2, 3, 3, 4], [1, 2, 3, 4, 5], [3, 5, 6, 1, 4], [1, 5, 3, 4, 6], [4, 5, 2, 3, 5], [1, 4, 3, 2, 2], [5, 4, 3, 6, 3], [5, 3, 5, 4, 6], [2, 4, 5, 1, 3], [3, 6, 4, 5, 3], [5, 6, 4, 3, 5], [4, 5, 3, 6, 3], [4, 5, 5, 3, 2], [4, 5, 2, 3, 5], [4, 6, 5, 3, 6], [4, 2, 3, 1, 5], [3, 6, 4, 6, 5], [5, 2, 1, 3, 4], [4, 4, 1, 2, 3], [4, 1, 4, 2, 3], [5, 1, 4, 3, 6], [5, 2, 2, 3, 4], [4, 4, 6, 5, 3], [2, 4, 3, 5, 1], [5, 4, 2, 5, 3], [2, 3, 5, 5, 4], [1, 6, 3, 4, 5], [4, 5, 3, 3, 6], [6, 4, 3, 6, 5], [4, 6, 6, 5, 3], [4, 3, 5, 2, 2], [2, 3, 2, 1, 4], [4, 2, 6, 1, 3], [4, 4, 5, 3, 6], [4, 5, 6, 3, 6]]

fa = [[1, 2, 3, 5, 6], [5, 1, 1, 6, 6], [4, 6, 4, 1, 1], [6, 4, 1, 6, 4], [4, 6, 3, 6, 6], [2, 1, 4, 6, 4], [2, 6, 1, 5, 6], [2, 6, 1, 5, 6], [3, 6, 5, 3, 2], [3, 2, 3, 5, 3], [5, 5, 6, 2, 3], [3, 4, 6, 4, 3], [1, 4, 5, 5, 1], [1, 4, 4, 4, 1], [1, 6, 5, 1, 4], [6, 6, 4, 5, 4], [5, 3, 3, 3, 2], [5, 2, 1, 5, 3], [3, 5, 1, 6, 2], [6, 4, 2, 1, 2], [1, 3, 1, 3, 2], [3, 1, 3, 4, 3], [4, 3, 1, 6, 3], [4, 6, 3, 3, 6], [3, 6, 3, 6, 4], [1, 1, 3, 1, 3], [5, 5, 1, 3, 2], [3, 4, 2, 6, 6], [5, 4, 2, 6, 1], [2, 4, 4, 5, 4], [3, 6, 2, 5, 5], [2, 5, 3, 5, 1], [3, 2, 2, 3, 4], [5, 2, 2, 6, 2], [5, 6, 2, 5, 6]]

f=q=>q.sort().map(o=>(o-s?o-s<2?t++:t=t>3?t:1:0,s=o),t=1,s=-1)|t>3

tr.map(f)   //just look to make sure every value is true
fa.map(f)  //just look to make sure every value is false

I believe the parentheses can be removed from t=(t>4)?t:1.

Here's a couple more minor improvements: q=>q.sort().map(o=>(o-s?o-s<2?t++:t=t>4?t:1:0,s=o),t=1,s=9)|t>3 This version returns 1 for truthy and 0 for falsy.

TI-BASIC, 25 bytes
not(min(fPart(prod(Ans+36)/(65{703,779,287

An equivalent (ungolfed) Python expression which you can test:
def has_small_straight(l):
    product = reduce(lambda x,y: x*y, [x + 36 for x in l], 1)
    numbers = [37*19*13*5, 19*13*5*41, 13*5*41*7]
    return not(all([product%x for x in numbers]))

The idea behind this is divisibility. To check whether a 1, 2, 3, 4, 2, 3, 4, 5, or 3, 4, 5, 6 occurs, we can map the numbers 1-6 to 37-42, and then multiply the correct numbers together.
Each of the numbers in [37,42] have a prime factor that the other numbers lack.
n             |  1 |  2 |  3 |  4 |  5 |  6 |
n + 36        | 37 | 38 | 39 | 40 | 41 | 42 |
Factor        | 37 | 19 | 13 |  5 | 41 |  7 |

Therefore, if the product of the five numbers is divisible by 37, the original list contained a 1. If by 19, it contained a 2; etc. If it is divisible by 37*19*13*5 = 65*703, it contains 1, 2, 3, and 4 and similarly for the other two numbers.
This solution is an improvement on one that @Weregoose posted in 2009.

This is brilliant!

Ruby - 80 -> 79 -> 76 -> 54 -> 48 -> 40 bytes
Fifth Try (40 bytes):
->x{/1234|2345|3456/===x.uniq.sort.join}

Uses lambda syntax to define the function. (Thanks to competing Ruby golfer @Sherlock9 for this idea.)
To test using lambda call:
s = ->x{/1234|2345|3456/===x.uniq.sort.join}
s.call([1,3,5,4,4])
s.call([1,3,5,4,2])

Fourth Try:
def s?(x)/1234|2345|3456/===x.uniq.sort.join end

Replaced nil? and negation with === operator.
Third Try:
def s?(x)!(/1234|2345|3456/=~x.uniq.sort.join).nil?end

Uses regular expression.
Second Try:
def s?(x)[1234,2345,3456].select{|a|x.uniq.sort.join.include?a.to_s}.any?end

New approach uses dedup (uniq), sort and join, plus include? to search for a match of any solutions in the input rendered as a string.
First Try: 79 bytes
def s?(x)[[1,2,3,4],[2,3,4,5],[3,4,5,6]].select{|a|(a&x.uniq).length>3}.any?end

Tester:
x = [1,4,3,3,6]
s?(x)

x = [2,4,5,1,3]
s?(x)

Uses deduping (uniq function) plus set intersection (& operator) to test if any of the good sequences matches the given sequence. No sorting needed.

Dyalog APL, 15 bytes
{∨/∧/⍵∊⍨⍵∘.+⍳4}
uses ⎕IO=0
⍳4 is 0 1 2 3
⍵∘.+⍳4 is 5×4 a matrix of each die incremented by each of ⍳4
⍵∊⍨ checks if the elements of the matrix are in the hand, result is a boolean (0-or-1) matrix, we need to find a row of all 1s
∧/ is the and-reduction by rows, result is a boolean vector
∨/ is the or-reduction of that vector

Seriously, 21 bytes
3R`;4+@x`M4,╨╗`╜íu`MΣ

Try it online!
Outputs a positive value for true, and a 0 for false.
Explanation:
3R`;4+@x`M4,╨╗`╜íu`MΣ
3R`;4+@x`M             push [[1,2,3,4], [2,3,4,5], [3,4,5,6]
          4,╨╗         push all 4-length permutations of input to register 0
              `   `M   map:
               ╜íu       push 1-based index of list in permutations, 0 if not found
                    Σ  sum

PHP, 95 bytes
function s($d){$a=array_diff;$r=range;return!($a($r(1,4),$d)&&$a($r(2,5),$d)&&$a($r(3,6),$d));}

Exploded view
function s($d){
  $a = array_diff;
  $r = range;
  return !($a($r(1,4),$d)
        && $a($r(2,5),$d)
        && $a($r(3,6),$d));
}

Input / function call
s(Array[int, int, int, int, int]);

Output
bool

Jelly, 9 bytes
There has to be an 8-byte solution, will continue searching... Code:
Œ!Ḋ€Iµ7Be

This is the same as my 05AB1E solution.
Explanation:
Œ!         # Compute all permutations
  Ḋ€       # Dequeue each, leaving [1:]
    I      # Delta function
     µ     # Start a new monadic chain
      7B   # 7 in binary, which is [1, 1, 1]
        e  # Return 1 if this array exists

Try it online!

Another, alternative 9: Œ!I=1ZS3e...

Doesn't work for [1, 2, 1, 2, 1], and neither does your other answer unfortunately. My alternative seems to work (but I've been wrong before... test it too :) ), feel free to use that.

PARI/GP, 71 bytes
This can probably be golfed further, but as a start:
s=setminus;v->t=s([1..6],Set(v));!#s(t,[1,2])+!#s(t,[5,6])+!#s(t,[1,6])

I don't see a way of reducing duplication without using more space; this version is 75 bytes:
s=setminus;v->t=s([1..6],Set(v));z=(u->!#s(t,u));z([1,2])+z([5,6])+z([1,6])

Retina, 70 54 bytes
Input is a single string of the integers like 13342. Output is a 1 if found, or a 0 if not.
.                       # Replace integer digits with unary
$*x,
+`(x+(x+,))\2           # Sorts the list by repeated swapping
$2$1
(x+,)\1                 # Removes adjacent duplicates
$1
(x+,)x\1xx\1xxx\1       # Matches a small straight

Note that the removal of duplicates only needs to occur once, since there are only five numbers. Needing to remove more than one number would mean there isn't a small straight anyway.
Try it online
Thanks to Martin for the idea to move the commas inside the capture groups, saving a whopping 16 bytes.

How does it work?

. $*x Replace numbers with n x's, where n is the number. +\ Repeat the following until the string stabilizes (x+(x+,))\2 $2$1 Replace nxmx,mx, with mx,nxmx (x+,)\1 $1 Replace xn,xn, with xn, (x+,)x\1xx\1xxx\1 Match nx,xnx,xxnx,xxxn*x` Updated

@CatsAreFluffy I'm not using that as a description. Just an FYI. Anyone who's ever read the Retina github page once over should get that. Comments about what is being accomplished (like sorting, removing duplicates) are more important than describing that each is a replacement.

Scala, 76 70 61 60 bytes
(s:Seq[Int])=>(1 to 6)sliding(4)exists(t=>(s diff t).size<2)

Tester:
val f =
val truthy = Seq(Seq(1, 2, 3, 3, 4), Seq(1, 2, 3, 4, 5), Seq(3, 5, 6, 1, 4), Seq(1, 5, 3, 4, 6), Seq(4, 5, 2, 3, 5), Seq(1, 4, 3, 2, 2), Seq(5, 4, 3, 6, 3), Seq(5, 3, 5, 4, 6), Seq(2, 4, 5, 1, 3), Seq(3, 6, 4, 5, 3), Seq(5, 6, 4, 3, 5), Seq(4, 5, 3, 6, 3), Seq(4, 5, 5, 3, 2), Seq(4, 5, 2, 3, 5), Seq(4, 6, 5, 3, 6), Seq(4, 2, 3, 1, 5), Seq(3, 6, 4, 6, 5), Seq(5, 2, 1, 3, 4), Seq(4, 4, 1, 2, 3), Seq(4, 1, 4, 2, 3), Seq(5, 1, 4, 3, 6), Seq(5, 2, 2, 3, 4), Seq(4, 4, 6, 5, 3), Seq(2, 4, 3, 5, 1), Seq(5, 4, 2, 5, 3), Seq(2, 3, 5, 5, 4), Seq(1, 6, 3, 4, 5), Seq(4, 5, 3, 3, 6), Seq(6, 4, 3, 6, 5), Seq(4, 6, 6, 5, 3), Seq(4, 3, 5, 2, 2), Seq(2, 3, 2, 1, 4), Seq(4, 2, 6, 1, 3), Seq(4, 4, 5, 3, 6), Seq(4, 5, 6, 3, 6))
val falsy = Seq(Seq(1, 2, 3, 5, 6), Seq(5, 1, 1, 6, 6), Seq(4, 6, 4, 1, 1), Seq(6, 4, 1, 6, 4), Seq(4, 6, 3, 6, 6), Seq(2, 1, 4, 6, 4), Seq(2, 6, 1, 5, 6), Seq(2, 6, 1, 5, 6), Seq(3, 6, 5, 3, 2), Seq(3, 2, 3, 5, 3), Seq(5, 5, 6, 2, 3), Seq(3, 4, 6, 4, 3), Seq(1, 4, 5, 5, 1), Seq(1, 4, 4, 4, 1), Seq(1, 6, 5, 1, 4), Seq(6, 6, 4, 5, 4), Seq(5, 3, 3, 3, 2), Seq(5, 2, 1, 5, 3), Seq(3, 5, 1, 6, 2), Seq(6, 4, 2, 1, 2), Seq(1, 3, 1, 3, 2), Seq(3, 1, 3, 4, 3), Seq(4, 3, 1, 6, 3), Seq(4, 6, 3, 3, 6), Seq(3, 6, 3, 6, 4), Seq(1, 1, 3, 1, 3), Seq(5, 5, 1, 3, 2), Seq(3, 4, 2, 6, 6), Seq(5, 4, 2, 6, 1), Seq(2, 4, 4, 5, 4), Seq(3, 6, 2, 5, 5), Seq(2, 5, 3, 5, 1), Seq(3, 2, 2, 3, 4), Seq(5, 2, 2, 6, 2), Seq(5, 6, 2, 5, 6))
println("Failed truthy: " + truthy.filterNot(f))
println("Failed falsy: " + falsy.filter(f))

Pyth, 11 bytes
f!-TQ.:S6 4

Test suite
Generate the length 4 substrings of [1..6], then filter them on no elements remaining when the elements of the input are removed.

Jelly, 8 bytes
6Rṡ4ḟ€ċ“

Try it online! or verify the truthy test cases and the falsy test cases.
How it works
6Rṡ4ḟ€ċ“  Main link. Argument: A (list)

6R        Yield [1, 2, 3, 4, 5, 6].
  ṡ4      Split it into overlapping slices of length 4, yielding
          [[1, 2, 3, 4], [2, 3, 4, 5], [3, 4, 5, 6]].
    ḟ€    Remove all occurrences of A's elements from each slice.
      ċ“  Count the resulting number of empty list.
          This returns the number of distinct small straights in A (0, 1 or 2).

Javascript ES6 43 bytes
q=>/1,1,1,1/.test(q.map(a=>l[a]=1,l=[])&&l)

  //couldn't quite get this to work :/

q=>q.map(a=>l&=~(1<<a),l=62)&&l<7||l==32

This takes the number 62 (111110 in binary)
For each number in the input array it removes that bit
The resulting number should either be
100000 or
000000 or
000010 or
000110 or
000100

so I check if the result is less than 7 (0000111)
or if it's equal to 32 (100000)

Couldn't it be 34, with a list like 2,3,4,5,2?

That still doesn't change the fact this doesn't work for [3, 4, 5, 4, 3]. I think you need to use 126 instead of 62...

Mumps, 113 78 Bytes
The version of Mumps I'm using is InterSystems Cache.
I can't think of a way of golfing this technique any shorter; with a different technique it might be possible, but for now this'll do and at least it's shorter than C++... but not by much. Anyway...
OK, here's a shorter way. Instead of having 3 separate variables for the short runs, use a single variable for all 6 'dice' and extract the portions later:
R R S Y=111111 F F=1:1:5{S $E(Y,$E(R,F))=0} W '$E(Y,1,4)!'$E(Y,2,5)!'$E(Y,3,6)

so much for me not finding a better way with the same technique... I should look before I leap, eh? ;-)
I'll leave my original answer below for historical purposes...

R R S (G,H,I)=1111 F F=1:1:5{S Q=$E(R,F) S:1234[Q $E(G,Q)=0 S:2345[Q $E(H,Q-1)=0 S:3456[Q $E(I,Q-2)=0} W 'G!'H!'I

and here's the explanation of what's going on with the code:
R R                   ; read from STDIN to variable R
S (G,H,I)=1111        ; set our 3 possible short straights
F F=1:1:5{            ; For loop from 1 to 5
S Q=$E(R,F)           ; get each digit from the input and save in Q
S:1234[Q $E(G,Q)=0    ; If Q is either 1,2,3 or 4, zero out that position in G.
S:2345[Q $E(H,Q-1)=0  ; if Q is either 2,3,4 or 5, zero out that position (-1) in H.
S:3456[Q $E(I,Q-2)=0  ; if Q is either 3,4,5 or 6, zero out that position (-2) in I.
}                     ; and end the loop.
W 'G!'H!'I            ; If G,H, or I are all zeroes (indicating a full straight),
                      ; taking the not of each will make (at least one) of the
                      ; values true. OR-ing all three values will let us know if
                      ; at least one short straight was complete.
                      ; Output is 1 for truthy, 0 for falsy.

I didn't test every single truthy & falsy input as that involved manually typing them all in; but I did test approximately the first half of each, verified the long straights still show truthy and several of the runs noted to not necessarily work correctly ([4,2,5,3,4], [1,2,3,3,4] etc.) and seems to be working correctly.

Jelly, 11
QṢṡ4ðfø6Rṡ4

Try it online!
This is pretty much a copy of my Pyth answer, just trying to figure out how to chain stuff. Feels like it should be golfable.
Expansion:
QṢṡ4ðfø6Rṡ4  ##  1, 2, 0 chain, 1 argument from command line
QṢṡ4         ##  first chain, uniQue and Sort the input, then
             ##  get overlapping lists of length 4 (ṡ)
    ð        ##  separator
     f       ##  filter left argument on being a member of right argument
      ø      ##  separator
       6Rṡ4  ##  all overlapping lists of length 4, from 1-indexed range of 6
             ##  generates [1,2,3,4],[2,3,4,5],[3,4,5,6]

If you want to ask any hard questions, like why the separators are different, then my answer to you is: "I'll answer in 6-8 weeks" :P (More seriously, I think it's the pattern matching, monad-dyad vs nilad-dyad, but I don't know and don't want to spread misinformation.)

Explanation:Q    Unique elements Ṣ   sort the list ṡ4  all slices of length 4 ðf filter by { 6R range form 1 to 6 ṡ4 all slices of length 4 from that

For some reason Q is with the uppercase overdot operators in the documentation. Maybe it was an overdot once?

@CatsAreFluffy I have no idea, I used the one from the code page in the atoms page.

PowerShell v3+, 85 45 42 bytes
-join($args|sort -u)-match"1234|2345|3456"

Requires v3 or newer for the -Unique flag on the Sort-Object cmdlet.
Takes commandline $args as individual elements, then sorts only the -unique values, and -joins it together into a string. If that then regex -matches against the 1234|2345|3456 pattern, output is True; else, False. The Boolean value is left on the pipeline and output is implicit.
Saved 3 bytes thanks to Titus

Minkolang, 24 bytes
Try it here! Saved 3 bytes thanks to El'endia Starman!
$ns4[2~c-1R]xs011130$ZN.
$n                          C take all input C
  s                         C sort the stack C
   4[      ]                C repeat that 4x C
     2~c                    C copy 2nd elem. C
        -                   C subtract top 2 C
         1R                 C rot stack once C
            x               C drop top elem. C
             s              C sort the stack C
              011130$Z      C count # of 111 C
                      N.    C output and end C

I'm pretty happy that the explanation came in fixed width. It was coincidental the first three times, then I decided to roll with it.

JavaScript (ES6), 57 bytes
s=>(g=(n,m=4)=>!m||~s.search(n)&&g(n+1,m-1))(1)|g(2)|g(3)

Takes a string as input, and checks whether it contains all the digits in the sets (1,2,3,4), (2,3,4,5) or (3,4,5,6). Returns 1 if it does and 0 if it doesn't.

C++17, 69 68 66 bytes
-1 byte for changing truthy and falsey value. -2 bytes for setting r inside the initializer list.
As unnamed generic variadic lambda returning via reference parameter.
[](int&r,auto...p){for(int s:{r=30,60,120})r*=s-(s&(...|(1<<p)));}

The folding expression (...|(1<<p)) shifts 1 to the left for each item in p and bitwise-or them to create a set of fallen dice. Then compare this with the bitsets of small straights. Returns 0 for detection and otherwise for otherwise.
Ungolfed and usage:
#include<iostream>
using namespace std;

auto f=
[](int& r, auto...p){
 for (int s: {r = 30,60,120})
  r *= s - (s & (...|(1<<p)));
}
;

int main() {
  int r;
  f(r,1,2,3,4,6);
  cout << r << endl;
  f(r,2,3,4,5,2);
  cout << r << endl;
  f(r,3,4,5,6,6);
  cout << r << endl;
  f(r,1,1,3,5,4);
  cout << r << endl;
}

It seems like GCC 6.2 has a bug, that only left folds of the form ...|f(p) work, right folds like f(p)|... don't work.
previous 77 76 bytes solution
-1 byte for 0-indexing. Another -1 for changing truthy/falsey value.
Heavy use of parameter packs and fold expressions. As unnamed lambda returning via reference parameter:
[](int&r,auto...p){[&](auto...s){r=(...*(s-(s&(...|(1<<p)))));}(30,60,120);}

Ungolfed & explanation:
[](int& r, auto... p){ //out-reference and parameter pack
  [&](auto...s){       //declare inline lambda accepting another parameter pack and reference capture everything
    r=(...*(s-(s&(...|(1<<p-1)))));    //explained below
  }(30,60,120);         //immediately call the lambda with the bitset of small streets
}

    r=(...*(s-(s&(...|(1<<p)))));
                       (1<<p)      shift 1 to the left for each input p
                  (...|(1<<p))     fold with binary-or, create bitset
                s&(...|(1<<p))     binary-and with each constant s
            s-(s&(...|(1<<p)))    subtracts any of the constants, so if any small street is present the result is 0
       ...*(s-(s&(...|(1<<p))))   fold with multiply, like any(...)
    r=(...*(s-(s&(...|(1<<p))))); apply result to output parameter

Usage:
int main() {
  int r;
  f(r,1,2,3,5,4);
  cout << r << endl;
}

awk, 51 chars
{for(;++i<7;)a=a gsub(i,1);exit sub(/[12]{4}/,1,a)}

Solution searches for numbers [1-6] from given string in that order, packs their frequencies to var a (11235 -> 21101), searches for four consecutive 1s or 2s (there can be only 1 2`) and exits with search result.
$ echo 1,2,2,3,5|awk '{for(;++i<7;)a=a gsub(i,1);exit sub(/[12]{4}/,1,a)}'
$ echo $?
0
$ echo 1,2,3,4,5|awk '{for(;++i<7;)a=a gsub(i,1);exit sub(/[12]{4}/,1,a)}'
$ echo $?
1

btw, small straight over here is 1,2,3,4,5.

Clojure, 54 bytes
#(some(fn[p](every?(set %)p))(partition 4 1(range 7)))

(partition 4 1(range 7)) returns possible small-straights (we can ignore 0): ((0 1 2 3) (1 2 3 4) (2 3 4 5) (3 4 5 6))
some returns true if some arguments of p return true from the anonymous function and nil otherwise. Within every? returns true if the "function" (set of values of input list) returns a truthy value for all arguments of p. Thus the combination of some and every? checks if there exists such partition for which all numbers are found from the input argument %.

Perl 6, 32 24 18 bytes
{@_⊇^4+1+any ^3}

^4 is the range of integers from 0 to 3.  ^4+1 is the range of integers from 1 to 4.  any ^3 is the or-junction of the values 0, 1, and 2.  Adding it to the range 1-4 produces the or-junction of the ranges 1-4, 2-5, and 3-6.  A truthy value is returned if the argument list @_ is a superset of any of those ranges.

Kotlin, 80 68 bytes
d.toHashSet().zipWithNext{a,b->b-a}.joinToString("").contains("111")

Try it online!

Brachylog, 5 bytes
pb~⟦₂

Try it online!
Takes input through the input variable and outputs through success or failure. (The output variable contains the smallest and largest numbers within the small straight.)
p        Some permutation of the input,
 b       with its first element removed,
  ~⟦₂    is a range.

This brute forces permutations until either one of them is of the form [_ | sorted small straight] or there aren't any permutations left to check.

05AB1E, 6 bytes
ê¥JƵAå

Try it online!
ê          # sorted uniquified input
 ¥         # deltas (e.g. [1, 2, 3, 4, 6] => [1, 1, 1, 2])
  J        # join
   ƵA      # compressed integer 111
     å     # is it a substring of the joined deltas?

Lol. After seeing the MATL answer just yet I was about to post this exact solution, haha. Here a test suite. Alternative 6-byter: ê¥¥¥0å.

K (ngn/k), 16 bytes
{|/&/~^x?x+/:!4}

Try it online!
Another port of @ngn's APL answer, using ~^x?y as the membership test.

R + pryr, 49 bytes
(pryr is a package that gives shorthand for creating functions)
f=pryr::f;f(any(combn(x,4,f(sum(diff(x))))==3))

Using @ETHproductions idea of taking all combinations of length 4

I've edited your post to include the library name; including it is standard procedure for nonstandard libraries.

C++, 189 168 144 143 bytes
void main(int i,char *x[]){char c[6]={0},*v=x[1];for(i=0;v[i];)c[v[i++]-'1']++;printf(c[2]&&c[3]&&(c[0]&&c[1]||c[1]&&c[4]||c[4]&&c[5])?"T":"F")}

Input must be a 5-digit integer on the command line, e.g. test.exe 12334

Lots of extra stuff here you don't need.  That whole if statement for error-checking isn't necessary, as we can assume the input is valid.  Also, you only need to output a "truthy" or "falsey" value, you don't need to literally print the words "TRUE" or "FALSE".  A simple 1 or 0 would suffice.  The return statement is also not needed.

The testcases as given include square brackets, spaces and commas, which would cause UB at c[v[i]-'1']++.  Thought I might get flamed for voiding main.  Still, I could still shave 21 bytes off with the other changes.

The exact input format on PPCG is usually left up to the programmers.  Certainly many (probably most) of the answers on here would fail if they were required to use the input format exactly as given.  Oh, and nobody is expecting code-golf to be 100% standards-compliant.  If it compiles and produces correct output, it's good enough.

"F" can be replaced with ""

PHP, 65 bytes
while($i++<3)array_intersect($r=range($i,$i+3),$argv)<$r?:die(1);

Takes dice from command line arguments; exits with code 1 for straight, 0 else. Run with -r.

Stax, 7 bytes
Ç╒t╛♦─├

Run and debug it
Algorithm:

Sort
Remove duplicates
Compute pairwise differences
Check for [1,1,1] as contiguous sub-array.

J, 18 bytes
4 e.1#.]e.~]+/i.@4

Try it online!
Inspired by ngn's APL answer.

source: Stack Exchange

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

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

sort: votes


text:
Half-reverse a binary string
This is a follow-up question to my Puzzling.SE question: I asked if there’s a function f mapping Boolean strings to Boolean strings, so that f(f(b)) = reverse(b) for all input strings b. (By reverse, I mean the function that reverses the order of bits.)
The above link contains a positive answer, with proof, by the great f'', but you might want to ponder the question for yourself before looking.
Implement such a function f in as few bytes as possible.

You may either read input from STDIN, or take a function argument; and either write the result string to STDOUT, or return it.
Either way, you may work with actual strings of two distinct bytes or characters of your choice (say 0 and 1, or \x00 and \x01), or with arrays/lists of truthy and falsy values. Pick two values and stick with those, though.
The result of a single application of f must be a binary string itself: no silly answers like b -> if b starts with 'x' then reverse(b[1:]) else 'x' + b...
Your function should be total; in particular, the input may be the empty string, or one bit long, etc. There’s no upper bound for the string’s length.
It should also be pure: don’t keep any global state between function calls; the input string must completely determine the output string.

Can output have different length than input?

Sure! (In fact, otherwise, the challenge is provably impossible.)

Does it have to work for strings of length one or zero?

Yes; the function has to be total. I’ve clarified this in the question!

Related.

This would have been much easier if you wanted to half-flip a binary string i.e. f(f(b))=map(~,b).

CJam, 32 bytes
1q1]s:~__W%.&_,2/0t0#2%{2>W%2>}|

Try it online.
Too long...

Python 2, 64 69 bytes
def f(s):p=(s+s).find(s,1);return[s[~p::-1],s+s[:p]][len(s)/p%2]

Ungolfed:
def f(s):
    p = (s+s).find(s,1)
    n = len(s)/p
    return s[:p][::1|n%-2] * -~(n-1^1)

This finds the string's period, i.e. the minimal p such that s is a string of length p repeated n times (I found a golfy method on SO). Then if n is odd, it adds one more repetition of the period. If n is even, it removes one repeat of the period and reverses it.
Thanks to @Sp3000 for helping to implement the function mapping between 1<->2, 3<->4, etc.

...When will the ungolfed code be updated?

@CatsAreFluffy I have no plan to modify the ungolfed code as it uses the same idea with only a trivial difference. The English on the other hand is up-to-date.

Perl, 49 47 bytes
Includes +2 for -lp
Based on @feersum's very nice algorithm
Run with input on STDIN, e.g.
perl -lp halfreverse.pl <<< "101001"

halfreverse.pl:
/^(.+?)((\1\1?)*)$/;$_=$3eq$1?reverse$2:$_.$1

Explanation
/^               $/         Match the complete input string
  (.+?)                     Non-greedy match. Try only one digit at the start,
                            if that doesn't work try 2, then 3 etc. The string
                            being tried is remembered in backreference \1
       ((\1\1?)*)           Try to repeat \1 as many times as possible but
                            prefer in groups of 2. Fall back to only 1 at the
                            end of the string if the trailing part has an odd
                            number of \1 (so the total count is even)

   $3eq$1                   So the last match $3 equals the first match $1
         ?                  if and only if the total count is even
          reverse$2         If total count is even drop the first instance of
                   :        \1 and reverse
                    $_.$1   If total count is odd extend $_ by one instance
$_=                         Assign result

How does it work??

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


text:
Solve an algebraic expression
The Challenge
Your task is to create a program that can solve an algebraic equation.
Input
Input will consist of a String. The string will be an equality involving the variable x, and follows the following rules:

the equation will always be linear
The valid operations in the equation are + - * /
Parenthesis will not be used
Order of operations must be respected
The coefficients of x will always have * in between the coefficient and x
You can assume that there will be exactly one solution for x

Output
Output will be through the stdout (or an acceptable equivalent). The output should be the value of x that satisfies the equality. (You can round to the nearest thousandth if the decimal expansion is too long.)

Test cases
x=5
=> 5

2*x=5
=> 2.5

3*x/2=7
=> 4.667

2*x=x+5
=> 5

3*x+3=4*x-1
=> 4

3+x*2+x=x+x/2+x/2
=> -3

Scoring
Because this is a code-golf, the shortest solution (in bytes) wins. (NOTE: You may not use built-ins that trivialize the problem.)

You should avoid edits which disqualify existing answers.

In general we recommend challenges be posted to the Sandbox where they can get feedback from the community prior to being posted live.

please don't use built-ins is neither here or there. Are they allowed or are they not? And what built-ins does this cover?

What do you mean "is neither here or there"? And no, they are not allowed if they trivialize the problem (e.g. you can do something like print solveThisEquation('x+4=5')

please don't use built-ins is a request, not a rule. 2. What about built-ins that parse the equation but do not solve it? Can we use eval?

Yes, it is a request. But that doesn't change anything. 2. You can't use a built-in algebraic solver, such as Mathematica's Solve.

For the sake of clarity, we consider "request" and "rule" to be mutually exclusive. Challenge specifications should consist entirely of rules, e.g. "you must do this" or "you can't do that," rather than requests. Then it's not clear whether we actually can't do something. Do you see what I mean?

Can there by signs on the numbers ? E.g. +5 + -3 * x

Can I assume the multiplier will always be before the variable (eg x*3 never occurs)?

@AlexA. Then it is a rule.

Perl, 49 bytes
Ah, builtins got disallowed. I'll leave this solution up for reference though it is now non competing.
Includes +2 for -lp (-l can be dropped but is ugly)
Run with the equation on STDIN:
perl -lp algebra.pl <<< "x=5"

algebra.pl:
s'x'$.'g;$_=s/=(.*)/-($1)//(1-eval()*$.--/eval)

I can't tell whether this is symbolically solving the equation, but if it is then this is invalid as the OP has edited the question to disallow such built-ins.

@AlexA. I don't think it is.

@AlexA. No, it isn't symbolically solving. Perl has no "solve". It replaces f(x)=g(x) by f(x)-g(x), then uses a builtin to evaluates this at x=0 and x=1 respectively. It then calculates where the 0 must be

Javascript, 62 bytes
Without builtins, but with eval.
(s,f=eval("x=>"+s.replace(/=(.*)/,"-($1)")))=>f(0)/(f(0)-f(1))

Uses eval to transform foo(x) = bar(x) into a function f(x) = foo(x) - bar(x), then calculates x = f(0) / (f(0) - f(1)).

Utterly explodes for input close()

Python 3, 587 bytes
from re import sub as r,findall as f
a=input()
i=int;s=str;l=len;d=r"(\d+\.?\d*)";d=d,d
a=r(r"%s\*%s"%d,(lambda x:s(i(x.group(1))*i(x.group(2)))),a)
a=r(r"%s\/%s"%d,(lambda x:s(i(x.group(1))/i(x.group(2)))),a)
a=r(r"%s\-%s"%d,(lambda x:s(i(x.group(1))-i(x.group(2)))),a)
a=r(r"%s\+%s"%d,(lambda x:s(i(x.group(1))+i(x.group(2)))),a)
a=f(r"(\d+\.?\d*.)",a+"=")
if l(a)==0 or a[0][1]!="*":a[0:0]=["1"]
if l(a)==1 or a[1][1]!="=":a[1:1]=["0"]
if l(a)==2 or a[2][1]!="*":a[2:2]=["1"]
if l(a)==3 or a[3][1]!="=":a[3:3]=["0"]
a=[int(x[0])for x in a]
z=a[1]-a[3]
print(z/(z-a[0]-a[1]+a[2]+a[3]))

The only longer answers I've seen use 80% of the code to store a big data table. But unlike eval-based solutions, it only uses e twice! (In re and len.)
Log, Day 20: Used Solve. Solve got banned. Learned re. Used re. Slept.

Matlab, 61 bytes
x=[1 0];a=eval([strrep(input(''),'=','-(') ')']);a(2)/diff(a)

Uses the same algorithm as Ton Haspel to solve the equation. Replaces the = by -( and adds a ) at the end to make the string an equation that should equal zero, and solves (Newton's method is exact for linear functions).
Input is just a string, e.g.: '3+x*2+x=x+x/2+x/2'.
Matlab has a nice builtin for this too,
solve(input(''))


text:
Never tell me the odds
Input
A integer n ( ≥ 1) and a digit d (an integer such that 0 ≤ d ≤ 9).
In either order; from stdin or parameters or whatever; to a program or function; etc.
Output
The integers from 1 to n inclusive (in order) whose decimal representations contain an even number of ds. (That is, the integers in the list are the integers that have, respectively, an even number of ds.)
In any standard format, etc. In particular, the output need not be represented in decimal.
If output as a single string, the integers must be separated somehow (spaces, commas, newlines, null bytes, whatever).
Examples
in(d,n) ↦ out
1,12    ↦ 2 3 4 5 6 7 8 9 11
0,111   ↦ 1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,36,37,38,39,41,42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,59,61,62,63,64,65,66,67,68,69,71,72,73,74,75,76,77,78,79,81,82,83,84,85,86,87,88,89,91,92,93,94,95,96,97,98,99,100,111

Thanks
To quintopia for the title.

Does 0 count as an even number?

@MilkyWay90, of course.

Jelly, 7 bytes
RDċ€Ḃ¬T

Try it online!
How it works
RDċ€Ḃ¬T  Main link. Arguments: n, d

R        Range; yield [1, ..., n].
 D       Convert each integer in the range to base 10.
  ċ€     Count the occurrences of d in each array of decimal digits.
    Ḃ    Compute the parities.
     ¬   Negate, so even amounts evaluate to 1, odds to 0.
      T  Find all indices of truthy elements.

05AB1E, 11 10 bytes
Code:
\>GN¹¢ÈiN,

Explanation:
\           # Pop input, which saves the first input into ¹
 >          # Increment on second input
  G         # For N in range(1, input + 1)
   N        # Push N
    ¹       # Push the first input from the input register
     ¢      # Count the number of occurences of the digit in N
      È     # Is even?
       iN,  # If true, print N with a newline

Try it online
Uses CP-1252 encoding.

¢ interprets both arguments as strings?

@Sparr That depends, it can also be done on lists containing strings. But here, it interprets both arguments as strings.

Haskell, 69 63 52 50 bytes
d#n=[i|i<-[1..n],even$sum[1|x<-show i,read[x]==d]]

Straightforwared solution for my first ever post here. It uses show to count the number of d's. I explicitly did not use Char as input for d, which would have saved 12 6 (after Damien's edit) bytes.
EDIT: 11 bytes less thanks to Damien!
EDIT 2: another 2 bytes less thanks to nimi!

you could replace filter by a comprehension list: f d n=[i|i<-[1..n],even$sum[1|x<-show i,read[x]==d]]

Befunge, 1080 945 bytes
vd>"000">" "v
&0      ^              p21-1+*68<
62            >        v
8           >-|        >12g68*-:|
*             >11g1+11p^        $
+                      v  <
5                         |%2g11<
5                      v.:<
+         v            <
0         >268*+12p68*11p"000"40p50p60pv
p
           v                             -1<
             v-g01p06+1g06<
>&         >:>:10g1-`     |            >:0`|
             v            <                @
             v-+55p05+1g05<
             >:54+`       |
   v               p04+g04<
  ^          <                <      <
   >60g68*-0`|      >50g68*-0`|
             >" "60p^         >" "50p^

The score is given that we count the entire square, including newlines, which makes sense.
You can copy paste the code into the interpeter. Provide two inputs, first d and then n. This solution does not work for values larger than n > 999.
This will obviously not be a contender for the grand prize, but I've been wanting to implement a codegolf in Befunge for a while now, so I decided to just do it. I figure this will not be even close to an optimal Befunge solution, as it is the first actual thing I've done in Befunge. So, hints are welcome, if you need clarification or more information, please let me know in the comments.
Attempt at explanation:
In the first column downward we read an integer from the input, add 48 (6*8, you'll see this more often) to it to convert it to the corresponding ASCII value and puts it to (10, 0).
& - read input
68*+ - add 48
55+0p - put the value at (10, 0)
Note that the d at (1, 0) is just an easy way to get the number 100 on the stack.
After that, we go east and read another integer and head in to what I call the ASCIIfier. This turns the current number into a series of ASCII characters. The ASCIIfier is the rectangular piece from (13, 12) to (26, 17).
It consists of two loops, first counting the hunderds and than the tens and putting them into the three digits at (6, 0) and (5, 0). After that the last digit is put into (4, 0). So the numbers is actually in reverse.
v-g01p06+1g06< - increment the "hunderds counter" located at (0, 6) and decrease current value by 100
>:10g1-`     | - ASCIIfier entry; check if the current value is > 99, if so, go up, else go down
v            < - go to start of "tens counter"
v-+55p05+1g05< - increment the "tens counter" located at (0, 5) and decrease current value by 10
>:54+`       | - check if current value is > 9, if so, go up, else go down
      p04+g04< - put the final value into the "singles counter" located at (0, 4)

After putting the current integer into a series of ASCII characters, we go a bit more south to remove prepended zeroes. Thus, afterwards, what are initially the three zeroes at the top, will be the current number, without prepended zeroes.
Then we go back up, all the way to the North, where we put the three digits on the stack. We iterate over the three digits in the top loop, each time incrementing the counter located at (1, 1) if the current digit corresponds with the input d
When that is done we go and check to see if the counter that located at (1, 1) is odd or even. If it is even, we output the current number and move on to the big outer loop to decrement the current value and start over again.

Please do post an explanation if you have time!

I've added an attempt at a description.. Found out it wasn't so easy to clarify... Don't hesitate to ask further...

By the way, I just found out I have to output the result in ascending order, which makes this even more unfitting to the requirements....

Always +1 for a working Befunge answer! BTW, is this really 945 bytes? This says 679

Hehe, thanks. I counted 945 because I took the entire square of 21 lines x 45 columns (including newlines)

Python 2, 50 bytes
f=lambda d,n:n*[0]and f(d,n-1)+~`n`.count(d)%2*[n]

A recursive function that takes the digit d as a string and the upper bound n as a number.
The count of digits d's in n is tested to be even by taking it's bit complement modulo 2, which gives 1 for even and 0 for odd. This many n's are appending to the list, and the function recurse down to n-1, stopping via logical short-circuit on the empty list when n==0.
If the output may be given in decreasing order, one byte can be saved, for 49 bytes:
f=lambda d,n:n*[0]and~`n`.count(d)%2*[n]+f(d,n-1)

Old 51-byte solution:
lambda d,n:[x+1for x in range(n)if~`~x`.count(d)&1]

An anonymous function that takes the digit d as a string and the upper bound n as a number.
Two tricks are used:

Python's range is zero-indexed 0...n-1, so we add one to each potential value x. Then, to count d's in x+1, it saves a character to use its negation ~x instead.
To filter for even values, we do ~_%2, which first bit-flips to switch parity, then takes the last bit with &1 (same as %2 here), producing a truthy value only if the original was even.

Pyth, 10 bytes
f!%/`Tz2SE

Try it online. Test suite.

Lua, 86 Bytes
If using inconsistent separator is allowed, I could replace io.write by print, meaning numbers would be separated by one or multiple newlines.
This is a full program, which have to be called like this: lua file.lua d n.
It removes all non-d character from the current number and uses the size of the resulting string to decide weither or not it should be outputed.
for i=1,0+arg[2]do io.write(#(i..''):gsub("[^"..arg[1].."]","")%2<1 and i.." "or"")end

JavaScript (ES6) 64
An anonymous function with output to console. Straightforward implementation using split to count the digits.
(d,n)=>{for(i=0;i++<n;)(i+'').split(d).length&1&&console.log(i)}

Output using alert would be 6 byte less, but I really don't like it (and I'm not going to beat the toy languages anyway)

MATL, 12 10 bytes
:!V!=s2\~f

First input is n, second is d as a string. For example:
12
'1'

Try it online!
:       % implicitly take input n (number). Generate row vector [1,2,...,n]
!       % transpose into column vector
V       % convert each number to string. Gives 2D char array padded with spaces
!       % transpose
=       % implicitly take input d (string). Compare with each element of the array
s       % sum of each column: number of coincidences with d
2\~     % true for even values
f       % find indices of true values. Implicitly display

Ruby, 47 42 bytes
?1.upto $*[1]{|s|s.count($*[0])%2<1&&p(s)}

Run with d and n as command-line parameters, e.g.
ruby golf.rb 1 12

Great first answer! Welcome to PPCG! :D

Well done! In Ruby 1.9+, you can use ?1 for "1". And it's less pretty, but a byte shorter, to do %2>0 instead of .odd?

PowerShell, 62 55
param($1,$2);1..$2|?{!(([char[]]"$_"-match$1).Count%2)}

edit: using a param block in this case is shorter. removed some redundant space

Not a golfing language but its the only one I really know. This would work saved as a script and called like this M:\Scripts\cgNeverTellMeTheOdds.ps1 1 12. First argument is the digit d and the second is integer n.
Create an array of number 1 to n. For each of those convert that into a character array. 10 would be 1,0. Using -match as an array operator return all the elements that match the digit d. Count the amount of elements returned and mod 2 the result. Result will be 0 for even and 1 for odd. 0 as a boolean is false so we use ! for the loop to evaluate the odd results to false and even results to true.
Output is a newline delimited on console.

Welcome to PPCG, nice first answer! :)

@FryAmTheEggman Sweet. Thanks for the nod. I though this would be buried under all the other answers.

Bash + GNU utilities, 37

1 byte saved thanks to @Ruud.

seq $1|egrep "^[^$2]*($2[^$2]*){2}*$"

The * following the opening parenthesis appears to be redundant. Removing it saves you 1 byte.

@Ruud yes - thanks - fixed now.

Retina, 99 105 bytes
Note the trailing spaces. <empty> represents an empty line.
\d+$
$*
+`^(. )(1*)1\b
$1$2 1$2
1+
$.0
+`^(.)(.*) ((?!\1)\d)*\1((?!\1)\d|(\1)((?!\1)\d)*\1)*\b
$1$2
^.
<empty>

Takes input like 1 12. Output is space separated in decreasing order.
I modified 0*1(0|10*1)* to match an odd number of \1 in a number. I changed 0 to (?!\1)\d, and 1 to \1 to create the long regex line you see above. Understanding how the linked regex works is crucial.
Try it online
Commented explanation of old version
If descending order were okay
\d+$            Convert last number N to unary
$*
+`1(1*)$        Create list N N-1 ... 1 in unary
$0 $1
 (1)+           Convert back to decimal
 $#1
+`^(.)(.*) ((?!\1)\d)*\1((?!\1)\d|(\1)((?!\1)\d)*\1)*   Remove numbers w/ odd num of D's
$1$2
^.              Remove first parameter
<empty>

You can use 1+ and $.0 to do the conversion from unary back to decimal.

Python 3.4, 92 85 79 85 bytes
Saved 7 bytes thanks to Mego
Saved another 6 bytes thanks to mbomb007
Regained those 6 bytes because Python 3.x
This is my first shot at code golf, so here goes nothing!
lambda n,d:[i for i in range(n+1)if len([j for j in list(str(i))if j==str(d)])%2is 0]

There are a few spaces you can remove in this. Also, if you make it an unnamed lambda, it will be considerably shorter.

You can use \d`instead ofstr(d), and if you assume *n* is an integer (< 2**32), you can use `i`instead ofstr(i)`.

Are the backticks shorthand for str()?

The backticks were a shorthand for__repr__ in python 2, they were removed in python 3. You should probably change your header to reflect that restriction.

Yeah, I just found that while digging around and throwing a test case in the interpreter. Sadface.

Perl 6, 38 bytes
{(1..$^n).grep(*.comb.Bag{~$^d} %% 2)}

Brachylog, 32 bytes
:1reIlL,"":Ic:.xl-L=%2=0,Iw,@Sw\

Expects N as input and the digit as output, e.g. brachylog_main(12,1).
Explanation
:1reI                            § I is a number between 1 and Input
     lL,                         § L is the length of I
        "":Ic                    § Convert I to a string
             :.x                 § Remove all occurences of Output in that string
                l-L=%2=0,        § Check that the length of that new string - L mod 2 is 0
                         Iw,@Sw  § Write I, then write a space
                               \ § Backtrack (i.e. try a new value of I)

Mathematica, 54 bytes
Position[Count[#2]/@IntegerDigits/@Range@#,x_/;2∣x]&

Perl, 28 29 31 bytes
Includes +2 for -an
Run with the specification digit and count on consecutive lines on STDIN:
echo -e "0\n111" | perl -anE'map s/@F/$&/g%2||say,1..<>'

Retina, 72 71 55
\d+$
$*
\B
¶$`
1+
$.0
G`(.),((?>.*?\1){2})*(?!.*\1)
.,
<empty>

Great thanks to Martin, who totally by accident reminded me of atomic matching groups!
Try it online!
Explanation:
\d+$
$*

Replace the number, but not the digit, with its unary equivalent.
\B
¶$`

\B matches each position (zero-width) that is not a word boundary. Note that this will not match any of the following: the beginning of the string, the end of the string, or any position around the comma character. Each of these non-boundaries is then replaced with a newline and then the string that comes before the match ($`). This gives a list like:
d,1
d,11
d,111

Where d is any single decimal digit.
1+
$.0

This converts all lists of 1s into the decimal representation of their lengths. This conveniently won't affect the 1 that could be before the comma, as it's length it always 1 as well.
G`(.),((?>.*?\1){2})*(?!.*\1)

Here, the G turns on grep mode, which means that lines that match the regex are kept, and other lines are discarded. This regex is complicated, but it essentially matches groups of 2 of the leading digit (stored in capture group 1, so we can reference it with \1).
The key here, is that if it failed when using the non-greedy match up to the two earliest appearances of the digits, it would then just roll back and try again, with . matching over the digit. This would make numbers like 111 match when our digit is 1. Therefore, we use ?> to make the match atomic, essentially preventing the regex from backtracking to before it matched this value. An atomic match works kind of like possesive matching would in certain flavours. Since the * meta-character is followed by a ? the . will match characters up until it is able to match what we stored in \1. Then once we do this twice, the regular expression's "memory" is destroyed, preventing the behaviour that would normally occur, where it goes back and has the . match an additional character, our \1 digit, which would created invalid matches.
Then, we check that from the final position, after matching repeated groups of two of the input digit, that we cannot match another input digit.
.,
<empty>

Here we are just removing the digit and comma from each of the strings, so we just get our nice answer.

Please add an explanation.

@mbomb007 Ok, added :)

Atomic matching is something I don't yet understand.

@mbomb007 I've attempted to clarify what is going on, let me know if something stands out as being unclear.

Java 8, 84 bytes
This is a lambda expression for a BiConsumer< Integer, Integer>:
(d,n)->for(int x=0;x++<n;)if((""+x).split(""+d,-1).length%2>0)System.out.println(x);

Explanation:
for each number between 1 and n, convert the number to a string and split it using d as the delimiter. If it was split into an odd number of sections, then print out the number followed by a new line.

Oracle SQL 11.2, 111 82 bytes
SELECT LEVEL FROM DUAL WHERE MOD(REGEXP_COUNT(LEVEL,:d),2)=0 CONNECT BY LEVEL<=:n;

Kotlin, 136 bytes
fun main(a:Array<String>)=print({n:String,d:String->IntRange(1,n.toInt()).filter{"$it".count{"$it"==d}%2==0}.joinToString()}(a[0],a[1]))

Fully functional program, takes arguments as: n d
Try it online!

Python 2, 57 54 bytes
lambda d,n:[i for i in range(1,n+1)if`i`.count(d)%2<1]

Usage
>>> (lambda d,n:[i for i in range(1,n+1)if`i`.count(d)%2<1])('1', 12)
[2, 3, 4, 5, 6, 7, 8, 9, 11]

Julia, 44 bytes
f(n,d)=filter(i->sum(d.==digits(i))%2<1,1:n)

This is a function that accepts two integers and returns an array.
We start with the set of integers from 1 to n, inclusive. For each integer i, we determine which of its decimal digits are equal to d, which yields a Boolean array. We sum this to get the number of occurrences of d as a digit in i, and filter the original range based on the parity of the sum.
Try it here

Seriously, 17 bytes
╩╜R;`$╛@c2@%Y`M@░

Takes inputs as n\n'd' (integer, newline, string).
Try it online!
Explanation:
╩╜R;`$╛@c2@%Y`M@░
╩                  push all inputs to registers
 ╜R;               push two copies of range(1, n+1)
    `        `M    map:
     $╛@c            count the number of d's
         2@%Y        modulo 2, logical not (1 if even, 0 if odd)
               @░  filter: take only the values of range(1, n+1) where the count is even

Mathematica, 45 bytes
Select[a=#2;Range@#,2∣DigitCount[#,10,a]&]&

Uses the built-in DigitCount.

Japt, 13 12 bytes
Uò1 f_s èV v

Input is n, then d wrapped in quotes. Test it online!
How it works
       // Implicit: U = input integer, V = input string
Uò1    // Create the inclusive range [1..U].
f_     // Filter to only the items Z that return truthily to this function:
s èV   //  Take Z.toString(), then count the number of matches of V.
v      //  Return 1 (truthy) if even, 0 (falsy) otherwise.
       // Implicit output, array separated by commas

CJam, 38 bytes
r:P;r~1+,0-_{s{s}%Pe=2%!}%]z{~{}{;}?}%

Explanation
r:P;                                    e# set input d to variable P
    r~1+,0-                             e# create a range(1, n+1)
           _{s{s}%Pe=2%!}%              e# determine which numbers are needed
                          ]z{~{}{;}?}%  e# remove extra numbers

Scala, 66 bytes
(d:Int,n:Int)=>(1 to n).map(""+).filter(_.count((""+d)(0)==)%2==0)

R, 145 bytes (I am sure there are ways to shorten this further) :)
g<-sapply(sprintf("%s",seq(1:111)),function(z){if(sapply(regmatches(z,gregexpr("0",z)),length)%%2==0){z}else{NULL}})
names(g[!sapply(g,is.null)])

C, 175 Bytes
_;main(f,n,d){f?f-1?main(0,n,d),printf(_?"%d ":"",n),(n-1?main(2,n-1,d):0):(scanf("%d %d",&n,&d),main(2,n,d)):(n>9?n%10==d?(main(0,n/10,d),_=!_):main(0,n/10,d):(_=!(n==d)));}

Takes n, then d, from standard input. Prints the correct numbers in reverse order.
Expansion
_; // declare return variable
main(f,n,d) //entry point (function selection [1==real main],n,d)
{
    f?
        f-1?
            //recursive loop from 'n' to 1
            main(0,n,d), //call even_digits?
            printf(_?"%d ":"",n),
            (n-1?main(2,n-1,d):0)
        :
            //actual main, just scan and run the loop
            (scanf("%d %d",&n,&d),main(2,n,d))
    :
        //even_digits? (stores result in _)
        (n>9? // recursive case, many digits
            n%10==d?
                (main(0,n/10,d),_=!_)
            :
                main(0,n/10,d)
         :
            (_=!(n==d)) //base case: 1 digit, return !(n==d)
        );
}

I feel like it might be possible to remove the duplicated main(0,n/10,d) near the end.

This doesn't (you say) print them in order.

Python 2, 68 chars
f=lambda d,n:filter(lambda x:x.count(`d`)%2^1,map(str,range(1,n+1)))

This function takes two ints and returns a list of the numbers with an even number of ds.

Just curious, why the downvote?  This is my first post on code golf.

If this isn't recursive, you don't have to name it.  lambda d,n:... is fine.

And good job with your first post, keep going!

Thunno 2, 5 bytes
æṘ¹cE

Try it online!
Explanation
æṘ¹cE  # Implicit input
æ      # Filter [1..first input] by:
   c   #   The count of...
  ¹    #   ...the second input...
 Ṙ     #   ...in this number...
    E  #   ...is even?
       # Implicit output