text:
Fermat Near Misses
Fermat's last theorem says that there there are no positive, integral solutions to the equation a^n + b^n = c^n for any n>2. This was proven to be true by Andrew Wiles in 1994.
However, there are many "near misses" that almost satisfy the diophantine equation but miss it by one. Precisely, they are all the greater than 1 and are integral solutions of a^3 + b^3 = c^3 + 1 (the sequence is the value of each side of the equation, in increasing order).
Your task is given n, to print out the first n values of this sequence.
Here are the first few values of the sequence:
1729, 1092728, 3375001, 15438250, 121287376, 401947273, 3680797185, 6352182209, 7856862273, 12422690497, 73244501505, 145697644729, 179406144001, 648787169394, 938601300672, 985966166178, 1594232306569, 2898516861513, 9635042700640, 10119744747001, 31599452533376, 49108313528001, 50194406979073, 57507986235800, 58515008947768, 65753372717929, 71395901759126, 107741456072705, 194890060205353, 206173690790977, 251072400480057, 404682117722064, 498168062719418, 586607471154432, 588522607645609, 639746322022297, 729729243027001

This is code-golf, so shortest code in bytes wins!

https://oeis.org/A050794

The first is Ramanujan's https://en.wikipedia.org/wiki/Taxicab_number. Sequence of c, https://oeis.org/A050791 may be helpful.

Jelly, 16 bytes
*3‘
ḊŒc*3S€ċÇµ#Ç

Brute-force solution. Try it online!
*3‘           Helper link. Maps r to r³+1.

ḊŒc*3S€ċÇµ#Ç  Main link. No arguments.

         µ    Combine the links to the left into a chain.
          #   Read an integer n from STDIN and execute the chain to the left for
              k = 0, 1, 2, ... until n matches were found. Yield the matches.
Ḋ             Dequeue; yield [2, ..., k].
 Œc           Yield all 2-combinations of elements of that range.
   *3         Elevate the integers in each pair to the third power.
     S€       Compute the sum of each pair.
        Ç     Call the helper link, yielding k³+1.
       ċ      Count how many times k³+1 appears in the sums. This yields a truthy
              (i.e., non-zero) integer if and only if k is a match.
           Ç  Map the helper link over the array of matches.

Perl, 78 bytes
#!perl -nl
grep$_<(($_+2)**(1/3)|0)**3,map$i**3-$_**3,2..$i++and$_-=print$i**3+1while$_

Brute force approach. Couting the shebang as two, input is taken from stdin.
Sample Usage
$ echo 10 | perl fermat-near-miss.pl
1729
1092728
3375001
15438250
121287376
401947273
3680797185
6352182209
7856862273
12422690497

Try it online!

Brachylog, 31 bytes
:{#T#>>:{:3^}aLhH,Lb+.-H,#T=,}y

Try it online!
This is not complete brute force as this uses constraints. This is a bit slow on TIO (about 20 seconds for N = 5). Takes about 5 seconds for N = 5 and 13 seconds for N = 6 on my machine.
Explanation
:{                           }y    Return the first Input outputs of that predicate
  #T                               #T is a built-in list of 3 variables
    #>                             #T must contain strictly positive values
      >                            #T must be a strictly decreasing list of integers
       :{:3^}aL                    L is the list of cubes of the integers in #T
              LhH,                 H is the first element of L (the biggest)
                  Lb+.             Output is the sum of the last two elements of L
                     .-H,          Output - 1 = H
                         #T=,      Find values for #T that satisfy those constaints

Mathematica, 95 bytes
(b=9;While[Length[a=Select[Union@@Array[#^3+#2^3&,{b,b},2],IntegerQ[(#-1)^3^-1]&,#]]<#,b++];a)&

Unnamed function taking a single positive integer argument # and returning a list of the desired # integers. Spaced for human readability:
1  (b = 9; While[
2    Length[ a =
3      Select[
4        Union @@ Array[#^3 + #2^3 &, {b, b}, 2],
5        IntegerQ[(# - 1)^3^-1] &
6      , #]
7    ] < #, b++
8  ]; a) &

Line 4 calculates all possible sums of cubes of integers between 2 and b+1 (with the initialization b=9 in line 1) in sorted order. Lines 3-5 select from those sums only those that are also one more than a perfect cube; line 6 limits that list to at most # values, which are stored in a. But if this list has in fact fewer than # values, the While loop in lines 1-7 increments b and tries again. Finally, line 8 outputs a once it's the right length.
Holy hell this version is slow! For one extra byte, we can change b++ in line 7 to b*=9 and make the code actually run in reasonable time (indeed, that's how I tested it).

Racket 166 bytes
(let((c 0)(g(λ(x)(* x x x))))(for*((i(in-naturals))(j(range 1 i))(k(range j i))#:final(= c n))
(when(=(+(g j)(g k))(+ 1(g i)))(displayln(+ 1(g i)))(set! c(+ 1 c)))))

Ungolfed:
(define (f n)
  (let ((c 0)
        (g (λ (x) (* x x x))))
    (for* ((i (in-naturals))
           (j (range 1 i))
           (k (range j i))
           #:final (= c n))
      (when (= (+ (g j) (g k))
               (+ 1 (g i)))
        (displayln (+ 1(g i)))
        (set! c (add1 c))))))

Testing:
(f 5)

Output:
1729
1092728
3375001
15438250
121287376

Python 2, 102 98 bytes
def f(n,c=2):z=c**3+1;t=z in[(k/c)**3+(k%c)**3for k in range(c*c)];return[z]*n and[z]*t+f(n-t,c+1)

Try it online!

Pari/GP, 107 bytes
F(n)=c=2;while(n>0,c++;C=c^3+1;a=2;b=c-1;while(a<b,K=a^3+b^3;if(K==C,print(C);n--;break);if(K>C, b--,a++)))

Finds the first 10 solutions in 10 sec.
Goal:  a^3+b^3 = c^3+1

Gets number of required solutions by function-argument n
Increases c from 3 and for each c^3+1
searches a and b with 1 < a <= b < c such that
a^3+b^3=c^3+1 . If found, decrease required number of further soulutions n by 1    and repeat
Finishes, when number of
furtherly required solutions (in n) equals 0

Call it to get the first ten solutions:
F(10)

Readable code (requires leading and trailing braces as indicators for block-notation of the function. Also for convenience prints all variables of a solution):
{F(m) = c=2;
   while(m>0,
     c++;C=c^3+1;
     a=2;b=c-1;
     while(a<b,
           K=a^3+b^3;
            if(K==C,print([a,b,c,C]);m--;break);
            if(K>C, b--,a++);
          );
    );}

Pari/GP, 93 bytes
(Improvement by Dennis)
F(n)=c=2;while(n,C=c^3+1;a=2;b=c++;while(a<b,if(K=a^3+b^3-C,b-=K>0;a+=K<0,print(C);n--;b=a)))

Welcome to PPCG! I took the liberty of giving you answer the usual format (some userscripts and Stack Snippets rely on that). This seems to save a few bytes.

Hah, Dennis, thank you for the formatting. And the reduction is really cool! I've never seen that specific tweaks...  I'll take it into the answer as version.

Python 2, 122 119 Bytes
why are you still upvoting? Dennis crushed this answer ;)
Welcome to the longest solution to this question :/ I managed to shave off a whole byte by making longer conditions and removing as much indentation as possible.
x,y,z=2,3,4
n=input()
while n:
 if y**3+x**3-z**3==1and x<y<z:print z**3+1;n-=1
 x+=1
 if y<x:y+=1;x=2
 if z<y:z+=1;y=3

Output for n = 5:
1729
1092728
3375001
15438250
121287376

TI-Basic, 90 bytes
There must be a shorter way...
Prompt N
2->X
3->Y
4->Z
While N
If 1=X³+Y³-Z³ and X<Y and Y<Z
Then
DS<(N,0
X+1->X
If Y<X
Then
2->X
Y+1->Y
End
If Z<Y
Then
3->Y
Z+1->Z
End
End

MATLAB, 94 bytes
Another brute-force solution:
for z=4:inf,for y=3:z,for x=2:y,c=z^3+1;if x^3+y^3==c,n=n-1;c,if~n,return,end,end,end,end,end

Output for n=4:
>> n=4; fermat_near_misses
c =
        1729
c =
     1092728
c =
     3375001
c =
    15438250

Suppressing the c= part of the display increases the code to 100 bytes
for z=4:inf,for y=3:z,for x=2:y,c=z^3+1;if x^3+y^3==c,n=n-1;disp(c),if~n,return,end,end,end,end,end

>> n=4; fermat_near_misses_cleandisp
        1729
     1092728
     3375001
    15438250

Why are there 5 "end"s? Sorry I'm terrible at matlab

@ev3commander it's MATLAB's statement closing symbol, the "closing parenthesis" if you will

C#, 188 174 187 136 bytes
Golfed version thanks to TheLethalCoder for his great code golfing and tips (Try online!):
n=>{for(long a,b,c=3;n>0;c++)for(a=2;a<c;a++)for(b=a;b<c;b++)if(a*a*a+b*b*b==c*c*c+1)System.Console.WriteLine(c*c*(a=c)+n/n--);};

Execution time to find the first 10 numbers: 33,370842 seconds on my i7 laptop (original version below was 9,618127 seconds for the same task).
Ungolfed version:
using System;

public class Program
{
    public static void Main()
    {
        Action<int> action = n =>
        {
            for (long a, b, d, c = 3; n > 0; c++)
                for (a = 2; a < c; a++)
                    for (b = a; b < c; b++)
                        if (a * a * a + b * b * b == c * c * c + 1)
                            System.Console.WriteLine( c * c * (a = c) + n / n--);
        };

        //Called like
        action(5);
    }
}

Previous golfed 187 bytes version including using System;
using System;static void Main(){for(long a,b,c=3,n=int.Parse(Console.ReadLine());n>0;c++)for(a=2;a<c;a++)for(b=a;b<c;b++)if(a*a*a+b*b*b==c*c*c+1)Console.WriteLine(c*c*(a=c)+n/n--);}

Previous golfed 174 bytes version (thanks to Peter Taylor):
static void Main(){for(long a,b,c=3,n=int.Parse(Console.ReadLine());n>0;c++)for(a=2;a<c;a++)for(b=a;b<c;b++)if(a*a*a+b*b*b==c*c*c+1)Console.WriteLine(c*c*(a=c)+n/n--);}

Previous (original) golfed 188 bytes version (Try online!):
static void Main(){double a,b,c,d;int t=0,n=Convert.ToInt32(Console.ReadLine());for(c=3;t<n;c++)for(a=2;a<c;a++)for(b=a;b<c;b++){d=(c*c*c)+1;if(a*a*a+b*b*b==d){Console.WriteLine(d);t++;}}}

Execution time to find the first 10 numbers: 9,618127 seconds on my i7 laptop.
This is my first ever attempt in C# coding... A bit verbose compared to other languages...

You can declare variables in the first clause of the for loop. 2. int.Parse is shorter than Convert.ToInt32. 3. long is shorter than double and more accurate for this task. 4. t is unnecessary: you can count n down to 0 instead. 5. Technically I think you need to break two loops after printing, in case there's a triple coincidence.

Untested: static void Main(){for(long a,b,c=3,n=int.Parse(Console.ReadLine());n>0;c++)for(a=2;a<c;a++)for(b=a;b<c;b++)if(a*a*a+b*b*b==c*c*c+1)Console.WriteLine(c*c*(a=c)+n/n--);}

You can also compile to an Action which will save the bytes used in the method signature i.e. ()=>{/*code here*/};

You would also need to fully qualify names or add using System; into the byte count

@PeterTaylor Thanks for the great tips! I'm totally new to C#

@TheLethalCoder thanks for your advices, unfortunately adding using System; canceled all the previous code golfing :(

You can compile to an Action<int> which removes the method signature stuff, means you do not need to have to use Console.ReadLine to take input, so you can then fully qualify Console.WriteLine to System.Console.WriteLine saving the using statement from the byte count:

n=>{for(long a,b,d,c=3;n>0;c++)for(a=2;a<c;a++)for(b=a;b<c;b++)if(a*a*a+b*b*b==c*c*c+1)System.Console.WriteLine(c*c*(a=c)+n/n--);};  for 132 bytes I believe

You also declare the long value d but never use it so you can remove that from the byte count too

@TheLethalCoder I forgot to remove d variable! (always rushing...) Thanks. About your code n=>{for(long... is there no input parameter? I'm not sure I understand it :P

@Mario See this fiddle for an example. But note you only need to include the n=>{/*code here*/}; part and can ignore the Action... for the byte count

@TheLethalCoder, shame you can't use yield return in a lambda.

@PeterTaylor yeah annoyed me a few times before, but the challenge asks to print the output so not sure if that is acceptable anyway

@TheLethalCoder thanks a lot for your great golfing! I consider that your answer because I had no idea, thanks for teaching me new things! Only one thing (that I don't understand now why) your golfed solution is about 3,5 times slower than my original code, I noticed a lot of difference in runtime, so wanted to measure it and added in the post the execution times.

@Mario No worries, and I don't know why I never actually tested the code just gave you some tips to help take off some bytes

GameMaker Language, 119 bytes
Why is show_message() so long :(
x=2y=3z=4w=argument0 while n>0{if x*x*x+y*y*y-z*z*z=1&x<y&y<z{show_message(z*z*z+1)n--}x++if y<x{x=2y++}if z<y{y=3z++}}

x,y,z=2,3,4
n=input()
while n:
 if y3+x3-z3==1and x3+1;n-=1
 x+=1
 if y

Axiom, 246 bytes
h(x:PI):List INT==(r:List INT:=[];i:=0;a:=1;repeat(a:=a+1;b:=1;t:=a^3;repeat(b:=b+1;b>=a=>break;q:=t+b^3;l:=gcd(q-1,223092870);l~=1 and(q-1)rem(l^3)~=0=>0;c:=round((q-1)^(1./3))::INT;if c^3=q-1 then(r:=cons(q,r);i:=i+1;i>=x=>return reverse(r)))))

ungof and result
-- hh returns x in 1.. numbers in a INT list [y_1,...y_x] such that
-- for every y_k exist a,b,c in N with y_k=a^3+b^3=c^3+1
hh(x:PI):List INT==
   r:List INT:=[]
   i:=0;a:=1
   repeat
      a:=a+1
      b:=1
      t:=a^3
      repeat
          b:=b+1
          b>=a=>break
          q:=t+b^3
          l:=gcd(q-1,223092870);l~=1 and (q-1)rem(l^3)~=0 =>0 -- if l|(q-1)=> l^3|(q-1)
          c:=round((q-1.)^(1./3.))::INT
          if c^3=q-1 then(r:=cons(q,r);i:=i+1;output[i,a,b,c];i>=x=>return reverse(r))

(3) -> h 12
   (3)
   [1729, 1092728, 3375001, 15438250, 121287376, 401947273, 3680797185,
    6352182209, 7856862273, 12422690497, 73244501505, 145697644729]
                                                       Type: List Integer


text:
Volumes of ASCII boxes
Introduction
In this challenge, you are given as input the ASCII representation of the net (unfolded surface) of a rectangular cuboid (3D box).
The format is this:
....+--+.......
....|##|.......
....|##|.......
....|##|.......
+---+--+---+--+
|###|##|###|##|
+---+--+---+--+
....|##|.......
....|##|.......
....|##|.......
....+--+.......

Each face of the cuboid is a rectangle of #s surrounded by +-|-characters.
The outside of the net is filled with .s.
The net will always have the same orientation: there's a middle face surrounded by its four neighboring faces, and the counterpart of the middle face is at the right border of the input.
The input is padded with .s to a rectangular shape and will not contain extra rows or columns of .s.
The task
Your task is to take as input a diagram as above, and compute the volume of the cuboid that it represents, which is just the product of its height, width and depth.
You can take the input as a newline-delimited string or an array of strings.
The length of each edge is the distance between the +-characters at its two ends.
For example, the horizontal edge +--+ has length 3, and the vertical edge
+
|
|
|
+

has length 4.
The minimum length of an edge is 1.
The example cuboid above has volume 2*3*4 = 24.
Rules and scoring
You can write a full program or a function, and the lowest byte count wins.
Test cases
.++..
+++++
+++++
.++..
1

...++....
...||....
...||....
+--++--++
+--++--++
...||....
...||....
...++....
3

..+-+....
..|#|....
+-+-+-+-+
|#|#|#|#|
|#|#|#|#|
+-+-+-+-+
..|#|....
..+-+....
12

.+---+.....
++---++---+
||###||###|
||###||###|
||###||###|
++---++---+
.+---+.....
16

....++.....
....||.....
....||.....
....||.....
+---++---++
|###||###||
|###||###||
|###||###||
+---++---++
....||.....
....||.....
....||.....
....++.....
16

...+--+......
...|##|......
...|##|......
+--+--+--+--+
|##|##|##|##|
+--+--+--+--+
...|##|......
...|##|......
...+--+......
18

....+--+.......
....|##|.......
....|##|.......
....|##|.......
+---+--+---+--+
|###|##|###|##|
+---+--+---+--+
....|##|.......
....|##|.......
....|##|.......
....+--+.......
24

....+-----+..........
....|#####|..........
....|#####|..........
....|#####|..........
+---+-----+---+-----+
|###|#####|###|#####|
|###|#####|###|#####|
|###|#####|###|#####|
|###|#####|###|#####|
+---+-----+---+-----+
....|#####|..........
....|#####|..........
....|#####|..........
....+-----+..........
120

I really like this challenge. Because the input has so much redundant structure, there's lots of choices for how to recover the dimensions.

Retina, 29 28 bytes
T`.p`xy`\G\..+¶
xy

¶\|
$`
y

Try it online!
There's a lot of ways to approach this in Retina, depending on which area you want to multiply with which side, so I'm not sure how optimal this is, but it's actually already a lot shorter than I thought it would be.
I've currently got two other solutions at the same byte count which seem a bit more golfable than the above approach:
\G\..+¶

¶\|
$'¶
G`\.
T`.|+

¶\||\+¶\.\D+
$'¶
G`\.
T`.|+

Although in these I could save a byte each if I assume that the input ends with a trailing linefeed, but I'd rather not have to rely on that.
And another one, still at 28 bytes (this one actually multiplies three sides instead of multiplying one area by a side):
\G\.
x
-(?<=^.+)
$`
¶\|
$`
x

Explanation
The main idea is to multiply the area of the face on top by the length of the vertical side that touches the length border of the input.
I'll use the following input as an example (it has side lengths 2, 3 and 4, so an area of 24):
...+---+.......
...|###|.......
...|###|.......
+--+---+--+---+
|##|###|##|###|
+--+---+--+---+
...|###|.......
...|###|.......
...+---+.......

Stage 1: Transliterate
T`.p`xy`\G\..+¶

The regex \G\..+¶ matches a line which starts with . and is immediately adjacent to the previous line. So this matches all the lines that contain the top face. The stage itself turns . into x and all other characters (any of |+-#) into y. This gives us the following result:
xxxyyyyyxxxxxxx
xxxyyyyyxxxxxxx
xxxyyyyyxxxxxxx
+--+---+--+---+
|##|###|##|###|
+--+---+--+---+
...|###|.......
...|###|.......
...+---+.......

This has one more column of y than we need to represent the area of the top face. We fix this with the next stage.
Stage 2: Replace
xy

So we match a y that is preceded by an x (which is exactly one of them per line) and remove them both from the string. We get this:
xxyyyyxxxxxxx
xxyyyyxxxxxxx
xxyyyyxxxxxxx
+--+---+--+---+
|##|###|##|###|
+--+---+--+---+
...|###|.......
...|###|.......
...+---+.......

So now we've got the area of the top face represented by the number of ys.
Stage 3: Replace
¶\|
$`

Our goal here is to multiply this area A by the missing side length, which is the number of | at the beginning of a line plus 1. However, it's actually easier to multiply by a number n+1 because we've already got one copy of A in the string. If we replace n things with A, we end up with n+1 copies of A. This makes things a lot easier for us.
So we simply replace any | immediately after a linefeed with everything in front of the match. This mangles the string quite a lot and makes it a fair bit larger than we need, but the number of ys ends up being the result we're looking for:
xxyyyyxxxxxxx
xxyyyyxxxxxxx
xxyyyyxxxxxxx
+--+---+--+---+xxyyyyxxxxxxx
xxyyyyxxxxxxx
xxyyyyxxxxxxx
+--+---+--+---+##|###|##|###|
+--+---+--+---+
...|###|.......
...|###|.......
...+---+.......

Stage 4: Match
y

All that's left is to count the number of ys, which is printed as a decimal number at the end.

Python 2, 57 bytes
lambda l:l[0].find('+')*~l[0].count('-')*~`l`.count("'|")

A function that takes in a list of strings.
Determines the 3 dimensions separately:
l[0].find('+')
The index of the first + in the first row.
-~l[0].count('-')
The number of - signs in the first row.
~`l`.count("'|")
The number of rows starting with | symbol, via the string representation of the list having a quote symbol before it.

62 bytes:
def f(l):a=l[0].find('+');print(len(l[0])/2-a)*(len(l)-a+~a)*a

A function that takes in a list of strings and prints the result.
Finds one dimension a as the index of + in the first row. The other two dimensions are inferred from it and the width and height of the input rectangle.
A 63-byte alternative, finding the dimensions separately:
lambda l:l[0].find('+')*~l[0].count('-')*~zip(*l)[0].count('|')

Bash + coreutils, 83, 77 bytes
EDITS:

Saved 6 bytes, by using "Here String" and optimizing regexp a bit

Golfed
bc<<<`sed -rn '1{s/(.+)[^\.]*\1/(0\1)*(0/
s/\./+1/gp;a)*(-1
}
/^[+|]/a+1
'`\)

Explained
Transform with sed:
....+--+....... => (0+1+1+1+1)*(0+1+1+1 )*(-2 +1
. =>()
. =>()
. =>()
. =>()
+ => +1
| => +1
+ => +1
. =>()
. =>()
. =>()
. =>()

Get rid of newlines using backticks, append )
=> (0+1+1+1+1)*(0+1+1+1 )*(-2 +1 +1 +1 +1)

Feed resulting expression to bc
=> 24

Test
./box <<EOF
.++..
+++++
+++++
.++..
EOF

1

./box <<EOF
...++....
...||....
...||....
+--++--++
+--++--++
...||....
...||....
...++....
EOF

3

./box <<EOF
....+--+.......
....|##|.......
....|##|.......
....|##|.......
+---+--+---+--+
|###|##|###|##|
+---+--+---+--+
....|##|.......
....|##|.......
....|##|.......
....+--+.......
EOF

24

Try it online !
(uses bash arithmetic expansion, instead of bc, as the latter is not available)

Snails, 19 bytes
AM
=~d^.+\+.+l.+^.2

 Try it online.
The idea is that we start somewhere on the rightmost edge in the net, and then travel to somewhere in the bottommost face. The length of the edge and the area of the face are multiplied by the mechanism of counting all matching paths.
AM   ,, A -> count all matching paths
     ,, M -> first char matched is the one in the current direction
     ,,      from the starting location, rather than directly on it
=~          ,, check that we are on the right edge of the grid
d ^.+ \+    ,, go down, matching one or more non-'.' characters, then a '+'
.+          ,, go down one or more times
l .+        ,, go left one or more times
^. 2        ,, match two further characters which aren't '.' to the left

JavaScript (ES6), 67 91
s=>(a=~-s.search`
`/2-(b=s.indexOf`+`))*b*(s.split`
`.length-1-2*b)

Test

F=
s=>(a=~-s.search`
`/2-(b=s.indexOf`+`))*b*(s.split`
`.length-1-2*b)

out=x=>O.textContent+=x+'\n\n'

;`.++..
+++++
+++++
.++..
1

...++....
...||....
...||....
+--++--++
+--++--++
...||....
...||....
...++....
3

..+-+....
..|#|....
+-+-+-+-+
|#|#|#|#|
|#|#|#|#|
+-+-+-+-+
..|#|....
..+-+....
12

.+---+.....
++---++---+
||###||###|
||###||###|
||###||###|
++---++---+
.+---+.....
16

....++.....
....||.....
....||.....
....||.....
+---++---++
|###||###||
|###||###||
|###||###||
+---++---++
....||.....
....||.....
....||.....
....++.....
16

...+--+......
...|##|......
...|##|......
+--+--+--+--+
|##|##|##|##|
+--+--+--+--+
...|##|......
...|##|......
...+--+......
18

....+--+.......
....|##|.......
....|##|.......
....|##|.......
+---+--+---+--+
|###|##|###|##|
+---+--+---+--+
....|##|.......
....|##|.......
....|##|.......
....+--+.......
24

....+-----+..........
....|#####|..........
....|#####|..........
....|#####|..........
+---+-----+---+-----+
|###|#####|###|#####|
|###|#####|###|#####|
|###|#####|###|#####|
|###|#####|###|#####|
+---+-----+---+-----+
....|#####|..........
....|#####|..........
....|#####|..........
....+-----+..........
120`
.split('\n\n').forEach(t=>{
  t=t.split('\n')
  k=+t.pop()
  t=t.join('\n')
  v=F(t)
  out(v+' '+k +' '+(v==k?'OK':'KO')+'\n'+t)
})

Ruby, 44
Works on a similar principle to other answers: find the first + to find the depth, find the next . after the + to find the width, and count the number of | at end of line and add 1 to find height.
->s{(s=~/\+/)*($'=~/\./)*s.split("|
").size}

ungolfed in test program
f=->s{(s=~/\+/)*    # index of first match of /\+/ in s
($'=~/\./)*         # $' is a special variable, contains string to right of last match. index of /\./ in $'
s.split("|
").size}            # split the string at |\n to form an array and count the members

puts f[".++..
+++++
+++++
.++.."]

puts f["...++....
...||....
...||....
+--++--++
+--++--++
...||....
...||....
...++...."]

#etc.

05AB1E, 21 bytes
Let W and H be respectively the width and the height of the input - not the box.
Then, the box dimensions A, B and C follow these rules:
W = 2(A+C)+1
H = B+2C+1

The following figure shows what A, B and C are, in terms of edge names:
....AAAA.......
....|##|.......
....|##|.......
....|##|.......
B---+--CCCCC--+
B###|##|###|##|
B---+--+---+--+
....|##|.......
....|##|.......
....|##|.......
....+--+.......

Hence the above formulas.
This program computes A, deduces the values of B and C and finally computes their product.
S'.ÊO<D¹g<;-(D·|g-()P

S'.Ê                  From each character of the first line, yield 0 if it is '.' or 1 otherwise. The result is stored in an array
    O<D               A = sum(array) - 1
       ¹g<;-(D        C = (W-1)/2 - A
              ·|g-(   B = H-1-2*C
                   )  Yield [A,C,B]
                    P Take the product and implicitly display it

Try it online!
Former version - Different approach - 26 bytes
|vyS'.Ê})¬O<sø¬O<s€O¬Ê1k)P

|                          Take the input as an array of lines (strings)
 vy                        For each line
   S'.Ê                    For each character in the line, yield 0 if it is '.' or 1 otherwise
       }                   End For
        )                  Wrap the results as an array
         ¬O<               A = sum(first_line) - 1
            sø             Transpose the box pattern
              ¬O<          B = sum(first_line) - 1 ; since the pattern is transposed, it corresponds to the first column
                 s€O       Sum every line from the transposed pattern
                    ¬Ê1k   C = index of the first line that has a different sum from the first line
                        )  Yield [A, B, C]
                         P Take the product A*B*C and implicitly display it

Haskell, 64 56 bytes
f(x:r)=sum$fst(span(>'+')x)>>[1|'|':_<-"|":r,'-'<-'-':x]

Try it online!
Explanation
The input is expected to be a list of strings for each line, so in f the parameter x is the first line and r a list of the remaining lines.

fst(span(>'+')x) returns the .-prefix of the first line as a string, so length(fst(span(>'+')x)) is the first dimension d1.
A list comprehension can act as filter, e.g. ['-' | '-' <- x] returns a string of all - in the first line, so 1 + length['-' | '-' <- x] yields the second dimension d2.
Analogously the number of | in the first row can be counted, so 1 + length['|' | '|':_ <- r] is the third dimension d3.

The list comprehensions of 2. and 3. can be shortened to 1+sum[1|'-'<-x] and 1+sum[1|'|':_<-r] by building a list of ones for each occurrence of '-' or '|' and then taking the sum. We can further put the outer 1+ into the list comprehension by appending - to x and "|" to r to yield sum[1|'-'<-'-':x] and sum[1|'|':_<-"|":r]. Now we can combine both list comprehensions by putting both predicates in the same comprehension: sum[1|'|':_<-"|":r,'-'<-'-':x] Conveniently this computes exactly the product of the two dimensions because for lists F and G the following list comprehension is the Cartesian product F x G =[(a,b)|a<-F,b<-G].
Finally, instead of multiplying 1. with the combination of 2. and 3. we can make use of the >> operator on lists: F>>G repeats G length F times and concatenates the result. So fst(span(>'+')x)>>[1|'|':_<-"|":r,'-'<-'-':x] repeats the list of d2*d3 ones d1 times, yielding a list of d1*d2*d3 ones which are then summed up to get the volume.

You can take the input as a list of strings, removing the need for lines.

@Zgarb Thanks, this saves some bytes.

Befunge 93, 56 bytes
~2%#^_1+
  @.*+<
`"z"~<|:`~0+
5*\`#^_\1>*\~7
%2~\<\+1_^#

Try it Online!
Explanation:
The volume of the box can be calculated by multiplying the number of .s on the first line before any other characters, by the number of + and -s on the first line - 1, and the number of lines that start with a | + 1.
~2%#^_1+         Uses the ASCII value % 2 of a character to count the .s

%2~\<\+1_^#      IP wraps around to the bottom. Counts the non . chars
                 Works because ("+" % 2) == ("-" % 2) == 1

5*\`#^_\1>*\~7   Multiplies the previous 2 results and cycles through
                 characters until it hits a newline or EOF

`"z"~<|:`~0+     Adds 1 to the 3rd dimension if the following char is a "|"
                 Also checks for EOF; If there is more input, goes back to
                 previous line. Otherwise, goes to the last line

  @.*+<          Adds 1 to the 3rd dimension, multiplies it to the rest,
                 prints the volume, and ends the program

I had to move the IP up lines instead of down in order to use the vertical if in the 3rd line. If the IP was going down lines, the vertical if would force the top of the stack to be 1 when hitting the following horizontal if, sending it in the wrong direction.

Java 8, 185 129 bytes
thanks to Zgarb for -56 bytes
golfed:
int g(String[]i){int h=0;for(String k:i){if(k.charAt(0)=='.')h++;else break;}return((i[0].length()-2*h-1)/2)*(i.length-2*h-1)*h;}

ungolfed:
int g(String[] i) {
    int h = 0;
    for (String k : i) {
        if (k.charAt(0) == '.') h++;
        else break;
    }
    return ((i[0].length()-2*h-1)/2)*(i.length-2*h-1)*h;
}

Explanation
a*b*h = ((length_of_line-2*h-1)/2)*(number_of_lines-2*h-1)*h
where a and b are the dimensions of the base and  h is the height. You can find h by counting the first h lines where you begin with a ..

You can take the input as an array or strings, so no need for manually splitting it.

oops thx, fixing it...

Java, 112 bytes
int v(String[]s){int a=s[0].lastIndexOf('+')-s[0].indexOf('+'),b=s[0].length()/2-a;return a*b*(s.length-2*b-1);}

Expanded:
int v(String[] s)
{
  // length of the edge in the first line
  int a = s[0].lastIndexOf('+') - s[0].indexOf('+');
  // length of the second edge
  // int b = s[0].length() - 2 * a - 1; <-- multiplied by 2
  int b = s[0].length()/2 - a; // <-- hack, length is always odd
  // length of the third edge in ()
  // volume
  return a * b * (s.length - 2 * b - 1);
} // end method v

Powershell, 68 67 bytes
($c="$args"|% i*f +)*($args[0].Length/2-.5-$c)*($args.Count-1-2*$c)

Note: "$args"|% i*f + is shortcut for "$args".indexOf('+')
Explanation
Good explanation took from the Osable's answer:
Let W and H be respectively the width and the height of the input - not the box.
Then, the box dimensions A, B and C follow these rules:
W = 2(A+C)+1
H = B+2C+1

The following figure shows what A, B and C are, in terms of edge names:
CCCCAAAA.......
....|##|.......
....|##|.......
....|##|.......
B---+--+---+--+
B###|##|###|##|
B---+--+---+--+
....|##|.......
....|##|.......
....|##|.......
....+--+.......

And C is position of the first + in the first line of the input.
Test script:
$f = {

($c="$args"|% i*f +)*($args[0].Length/2-.5-$c)*($args.Count-1-2*$c)

}

@(

,(1, ".++..",
     "+++++",
     "+++++",
     ".++..")

,(3,"...++....",
    "...||....",
    "...||....",
    "+--++--++",
    "+--++--++",
    "...||....",
    "...||....",
    "...++....")

,(12,"..+-+....",
     "..|#|....",
     "+-+-+-+-+",
     "|#|#|#|#|",
     "|#|#|#|#|",
     "+-+-+-+-+",
     "..|#|....",
     "..+-+....")

,(16,".+---+.....",
     "++---++---+",
     "||###||###|",
     "||###||###|",
     "||###||###|",
     "++---++---+",
     ".+---+.....")

,(16,"....++.....",
     "....||.....",
     "....||.....",
     "....||.....",
     "+---++---++",
     "|###||###||",
     "|###||###||",
     "|###||###||",
     "+---++---++",
     "....||.....",
     "....||.....",
     "....||.....",
     "....++.....")

,(18,"...+--+......",
     "...|##|......",
     "...|##|......",
     "+--+--+--+--+",
     "|##|##|##|##|",
     "+--+--+--+--+",
     "...|##|......",
     "...|##|......",
     "...+--+......")

,(24,"....+--+.......",
     "....|##|.......",
     "....|##|.......",
     "....|##|.......",
     "+---+--+---+--+",
     "|###|##|###|##|",
     "+---+--+---+--+",
     "....|##|.......",
     "....|##|.......",
     "....|##|.......",
     "....+--+.......")

,(120,"....+-----+..........",
      "....|#####|..........",
      "....|#####|..........",
      "....|#####|..........",
      "+---+-----+---+-----+",
      "|###|#####|###|#####|",
      "|###|#####|###|#####|",
      "|###|#####|###|#####|",
      "|###|#####|###|#####|",
      "+---+-----+---+-----+",
      "....|#####|..........",
      "....|#####|..........",
      "....|#####|..........",
      "....+-----+..........")

) | % {
    $expected,$s = $_
    $result = &$f @s
    "$($result-eq$expected): $result"
}

Output:
True: 1
True: 3
True: 12
True: 16
True: 16
True: 18
True: 24
True: 120

Wolfram Language (Mathematica), 64 bytes
(2(x=#@"
")-(y=#@"|")-9)((9-5x+y)^2-9#@".")/54&@*CharacterCounts

Try it online!
Uses the number of ., |, and \n characters in the input to solve for the volume. It looks stupid because there's an actual new line in place of \n.
If A, B, and C are the sides, then . = 2C(A+2C), | = 5B+4C-9, and \n = B+2C, so we can solve for the volume ABC in terms of these three character counts.

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:
Is this Tic-Tac-Toe board valid?
Challenge
Given a tic-tac-toe board in any format, determine if it is valid or not. If a board can be the result of a tic-tac-toe game, then it is valid. For example, this board is valid:X O X
O X O
X O XOn the contrary, this board is invalid:
X X X
X X O
O O O
Input

A full (9/9) tic tac toe board (the outcome, not the game).

Rules

The input format must be able to depict all 512 possible input boards. It must be specified, along with the instructions to create it if it is obscure/unclear. You must state the marks of the board individually though.
There must be two possible outputs, one for validity and one for invalidity.
You can assume the board does not have empty spots.

Test cases
Valid:
X O X
O X O
X O X

X O X
X O X
O X O

X O O
O O X
O X X

O X O
X O X
O X O
Invalid:
X X X
X X X
X X X

O O O
O O O
O O O

X X X
O O O
X X X

O O O
O O X
X X X

X X O
O X O
O O X
A little help?
A board is considered valid (for this challenge) if and only if the following two conditions hold:

There are 5 X and 4 O, or 4 X and 5 O. For example,
X X X
O X O
X X Xis considered invalid, because there are 7 Xs and 2 Os.
Only the player with 5 marks has won, or none of them have won. For example,
X X X
O O O
O O Xis considered invalid, since either the row of Os or the row of Xs will be formed first. The two players can't have their turn simultaneously.

The current winner is...
...ais523's Jelly answer, at an astounding 26 bytes!

what if some of the board states are null? EG: a player got 3 in a row, thus the game was ended, and some spaces are left blank

@tuskiomi A full (9/9) tic tac toe board (the outcome, not the game).

Maybe also add a test-case like O O O X O X X O X, to show that the same player may have both a horizontal and vertical row.

You must state the marks of the board individually though. I'm not sure to understand that part. Could you provide a counterexample?

So XXX~OOE~EEE isn't valid input where E is empty? Can we assume or do we have to explicitly check that all squares are filled; in other words, can the program error on partial boards?

A normal tic-tac-toe game can never have 4 X and 5 O since X goes first.

In the list of invalid test cases, I don't understand why the last one is invalid.   The X has 5 marks, and has won.

@Tim X has 4 marks.

@MartinEnder "There are 5 X and 4 O, or 4 X and 5 O."

@Sparr "Only the player with 5 marks has won, or none of them have won."

@carusocomputing As I replied to tuskiomi, the input will always be a full board. You do not have to test that.

@Arnauld I mean that parts of the input itself must contain the states (i.e. 375 is not acceptable, but [[0,1,0],[1,1,0],[0,0,1]] is, because the latter contains the states in itself).

@downvoter(s): Why did you downvote?

Why is a board considered invalid if only the player with 4 marks wins?

Why aren't boards with fewer than 9 marks total included? There is a third state, unused, that a tile can be in, and if a player wins in fewer than 9 turns, one or more of the tiles will be in that state at the end of a game.

@Kevin (Reply to 1st comment) Because no 9/9 board will ever be completed if the second player (player with 4 marks) wins.

@Kevin (Reply to 2nd comment) So as to not make it awfully difficult.

Jelly, 26 bytes
ṢŒrṪ4=$$Ðfx3ðœ-µẆm€6R¤;/µL

Try it online!
The input format is a little unusual; it's a string representing the board, but with Windows newlines (carriage return followed by newline). For example, XXO\r\nOXO\r\nOOX. (Actually, any two-character padding string between the lines works, but Windows newlines are much more defensible than the other options.)
The basic idea is that we look for characters that appear 4 times in the input, but don't have three evenly spaced occurrences in the original string. With two or more characters of padding between the lines of a 3×3 grid, all horizontal, vertical, and diagonal lines are evenly spaced, but no other evenly spaced line can have three elements.
Explanation:
The ð and µs are chain separators, which split the program into multiple parts that are each independent. I've replaced them with spaces below, to make things a bit clearer.
ṢŒrṪ4=$$Ðfx3 œ- Ẇm€6R¤;/ L
Ṣ                           sorted version of the input
 Œr                         run-length-encode it
        Ðf                  keep only elements where
   Ṫ                        delete the last element, and it was
    4=                      equal to 4
      $$                    parse Ṫ4= as a group
          x3                repeat each element three times

                Ẇ           all sublists of the input
                 m€         take every nth element of each (€) sublist
                   6R       for each n in 1..6
                     ¤      parse 6R as a group
                      ;/    flatten one level (m€ creates a nested structure)

             œ-             multiset difference
                         L  length of that difference

In other words, we find the list of characters that appear exactly four times in the input, and make a list consisting of three copies of each of those; we find the list of all subsequences that are evenly spaced in the original string; and if we subtract the second from the first, we want the result to have length 1 (i.e. a player played four times but didn't win). Note that as we're on a 3×3 grid and every square is full, it's impossible for both players to have played four times. In Jelly, 1 is truthy, 0 is falsey, so we don't need to do anything special to convert the resulting list to a boolean. (The µL is required, though, because otherwise both “XXX” and “OOO” would be possible truthy output values, and the question requires that all valid boards give the same output.)

This is totally readable.

JavaScript (ES6), 88 87 bytes
s=>(a=[...s]).sort()[5]-a[3]&[7,56,73,84,146,273,292,448].every(j=>j&i,i=`0b`+s^~-a[4])

Takes input as a string of 9 0 and 1 characters and returns 1 for valid, 0 for invalid. We sort the characters into order. If the middle three characters are now the same then the board is invalid as there are too many of one piece. Otherwise, we convert the original board into binary, flipping the bits if there are more 0s than 1s. At this point the board is valid if 0 does not have a line of three, so we simply test all eight lines via an array of bitmasks. Edit: Saved 1 byte thanks to @ETHproductions.

@ETHproductions Ah, of course, the result is only going to be 0 or 1 anyway.

Why define i?

@l4m2 Indeed, .every(j=>j&(0b+s^~-a[4])) saves 2 bytes. (But I'm not going to bother to edit such an old answer.)

Python 3, 131 127 125 100 96 bytes
For a different algorithmic approach (and one that will be really suited to these multi-byte golfing languages with built-in compression), instead of calculating if the board is valid, let's have a 512-bit number where each bit represents whether or not a particular board is valid or not, and pass in a binary value representing the board. Furthermore, due to symmetry, the second half of the table can be eliminated, along with a bunch of zeros:
def z(b):return int('agqozfx67wwye6rxr508ch2i8qicekpreqkap0725pk',36)<<24&1<255)*(511-b-b)

The test value:
X X X
O X O
X X X

Is represented as the binary value 0b111010111, and the function returns a non-zero value if the board is valid.

Removed intermediate variable for 4 less bytes

Two fewer bytes as a&(1<255:b=511-b!

Found a golfier way to do the if.

Batch, 140 bytes
@set/aXXX=OOO=O=0
@for %%l in (%* %1%2%3 %1%4%7 %1%5%9 %2%5%8 %3%5%7 %3%6%9 %4%5%6 %7%8%9)do @set/a%%l+=1
@cmd/cset/a!XXX*!(O-=5)+!OOO*!~O

Takes input as nine separate command-line arguments and outputs 1 for valid and 0 for invalid. Works by tracking the number of times it sees an O and a orthogonal line of OOO or XXX. Conveniently Batch allows us to perform integer arithmetic indirectly, so we're not incrementing %%l but some variable instead (although we're only interested in the three variables mentioned). We then need to test that either X has not won and there are five Os or that O has not won and there are four Os.

Mathematica, 82 75 bytes
Thanks to Martin Ender for saving 7 bytes!
t=Total;3<(b=#~t~2)<6&&{t[c=If[b>4,1-#,#]],t/@c,Tr@c,Tr@Reverse@c}~FreeQ~3&

Unnamed function taking a 3x3 nested list of 1s and 0s as input and outputting True or False.
Uses some handy flexibility of the Total function (here golfed to t): given an example array e = { {1,2,3} , {4,5,6} , {7,8,9} }, the command t[e] sums the three vectors (here yielding {12,15,18}); the command t/@e sums each sublist individually (here yielding {6,15,24}); and the command e~t~2 sums all nine elements (here yielding 45).
So first we test, with 3<(b=#~t~2)<6, whether the total number of 1s is 4 or 5; if not we exit with False. If so, we use c=If[b>4,1-#,#] to force there to be four 1s, not five. Then we compute the column sums t[c], the row sums t/@c, the sum of the main diagonal Tr@c, and the sum of the opposite diagonal Tr@Reverse~c, and use ~FreeQ~3 to check that 3 fails to appear at any level in those computed sums.
Amusing side note: unlike most appearances on this site, here Tr is not used to sum a one-dimensional list but is actually used as designed—to calculate the trace of a two-dimensional matrix!

Pyth - 36 bytes
I include diagas and use two ternaries instead.
JsM+sCBQm@VdU3_BQ?q5KssQ*FJ?qK4!}3JZ

Test Suite

Python 2, 158 132 109 92 91 123 bytes
def v(b):f=sum(b,());w={x[0]for x in b+zip(*b)+[f[::4],f[-3:1:-2]]if len(set(x))==1};return sum(map(`b`.count,w))==len(w)*5

Input is a list/tuple of rows, each a three-tuple of strings, e.g.:
[('X', 'O', 'X'), ('O', 'X', 'O'), ('X', 'O', 'X')]
Saved some bytes by ignoring diagonals per @Maltysen's answer, which also shortened the following expression.
Thanks @vaultah for saving 17 18 bytes.
Checking diagonals turns out to be necessary, which removed a lot of the savings above.
Try it here.
Explanation
def v(b):
  f=sum(b,())
  w={x[0]for x in b+zip(*b)+[f[::4],f[-3:1:-2]]if len(set(x))==1}
  return sum(map(`b`.count,w))==len(w)*5

f is the flattened input for slicing.
w contains the characters with winning sequences.
Count the occurrences of each winning character, which will either be 0 if w is empty or 5 if len(w) is 1.  The 10 sum when both have a winning sequence is impossible.  The winner having 5 implies the loser has 4.  You can't have >5 without a winning sequence.

lambda b:len({x[0]for x in b+zip(*b)if len(set(x))==1})<2and set(map(b.count,'XO'))=={4,5} saves some bytes.

and I just noticed that ...and{4,5}==set(map(b.count,'XO')) saves one more byte.

I think this incorrectly deems the last "Invalid" example from the question as valid, because it doesn't ensure that the winner is the player with 5 marks.

@smls You're right.  Checking that condition cost a lot of bytes, maybe it can be golfed further.

JavaScript (ES6), 101 bytes
Takes input as a 9-bit binary mask where X = 1 and O = 0 (MSB = top left cell, LSB = bottom right cell).
n=>[7,56,73,84,146,273,292,448,o=x=0].map((m,i)=>(c-=n>>i&1,m&n^m?m&n||o++:m&&x++),c=4)&&!(c|x&&~c|o)

Test cases

let f =

n=>[7,56,73,84,146,273,292,448,o=x=0].map((m,i)=>(c-=n>>i&1,m&n^m?m&n||o++:m&&x++),c=4)&&!(c|x&&~c|o)

// valid
console.log(f(0b101010101));
console.log(f(0b101101010));
console.log(f(0b100001011));
console.log(f(0b010101010));

// invalid
console.log(f(0b111111111));
console.log(f(0b000000000));
console.log(f(0b111000111));
console.log(f(0b000001111));
console.log(f(0b110010001));

I knew there had to be a (somewhat) simple bitwise solution. Nice work

R, 88 82 bytes
x=scan();`if`(sum(x)%in%4:5,all(apply(combn(which(x==(sum(x)<5)),3),2,sum)!=15),F)

All combinations of three integers from 1 to 9 that sum up to 15 are the rows/columns/diagonals of the square shown below.
2 7 6
9 5 1
4 3 8

The function takes input as a vector of booleans, T for "X", F for "O", which is the flattened representation of the board. BUT, these are reordered so that their index is the same as the number in the square, in the the order (2,7,6,9,5,1,4,3,8). That order might be achieved by flattening the board in the normal way, and then slicing by c(6,1,8,7,5,3,2,9,4). So this
X O X
O X O
X O X

is represented as:
c(T, F, T, F, T, F, T, F, T)[c(6,1,8,7,5,3,2,9,4)]

which is:
c(F, T, F, T, T, T, F, T, F)

The function first determines whether there is a player with exactly four marks. If so, the function uses the fact-of-things-that-add-up-to-15 to determine whether that player has a three-in-a-row (the board is invalid iff that player does).
If you wanted to take a conventionally-flattened board as input, the code would look like this instead:
f=function(x)ifelse(sum(x)%in%4:5,all(apply(combn(c(2,7,6,9,5,1,4,3,8)[which(x==(sum(x)<5))],3),2,sum)!=15),F)

I'm new at this, advice would be appreciated.

Save 2 bytes if you use if() instead: f=function(x)if(sum(x)%in%4:5,all(apply(combn(which(x==(sum(x)<5)),3),2,sum)!=15),F). Not extensively tested mind you. Backticks ruin code, but it's backtick if backtick(.

Better yet; x=scan();if(sum(x)%in%4:5,all(apply(combn(which(x==(sum(x)<5)),3),2,sum)!=15),F) and input as 1 and 0. 82 bytes.

JavaScript (ES6), 145 139 131 127 bytes
s=>!(q="XO"[s.split`O`.length-5])|![...s].some((c,i)=>c==q&!/(.)(\1|..(\1|.(\1|.\1.).)..)\1/.test(s.slice(0,i)+0+s.slice(i+1)))

Input as a space-separated string, such as "XOX OXO XOX". Outputs 1 for an invalid board, 0 for a valid one. This obviously isn't the best technique, at least not with JavaScript...
This basically checks whether both the following hold:

There are exactly 4 or 5 Os, AND
there is at least one of the 5-instance piece which creates an undecided game when removed.

The regex is to check whether a game has been decided. It matches a board iff there are any runs of length three of one character with 0 (row), 2 (down-right diagonal), 3 (column), or 4 (down-left diagonal) chars separating each pair.
Test snippet

f=s=>!(q="XO"[s.split`O`.length-5])|![...s].some((c,i)=>c==q&!/(.)(\1|..(\1|.(\1|.\1.).)..)\1/.test(s.slice(0,i)+0+s.slice(i+1)))

g=s=>console.log(f(s))

// Valid boards (outputs 0)
g("XOX OXO XOX")
g("XOX XOX OXO")
g("XOO OOX OXX")
g("OXO XOX OXO")

// Invalid boards (outputs 1)
g("XXX XXX XXX")
g("OOO OOO OOO")
g("XXX OOO XXX")
g("OOO OOX XXX")
g("XXO OXO OOX")

Ruby, 104 99 91 bytes
->x{[7,56,448,292,146,73,84,273].none?{|y|b=x.to_i 2;((a=x.count'1')==4?b:a==5?~b:7)&y==y}}

Input format: binary string of 9 symbols (0s and 1s) representing the board, for example the first test case is 101010101.
First convert it to a binary number, check if popcount is 4 or 5, if it's 5 invert the number so we always have 4. Check if three of them are aligned (masking witn horizontal, vertical, diagonal).
TL;DR: Return false if player with 4 marks won, true otherwise.
Thanks Jordan for the comments,
I can't reproduce the UTF-8 string which would save another byte.

You can replace .select{...}[0] with .find{...}.

And you can save one more byte by replacing the array of numbers with "8ǀĤITđ".unpack("U*") (in case something gets lost in translation, the string is the result of calling pack("U*") on the original array; it's 12 bytes).

could you use any? instead of none?, flipping the output and saving a whole entire byte?

I did try with one? instead of none? but then I need a ! to flip the output.

Perl 6, 103 99 bytes
{my \c=%(.flat.Bag.invert)<5>;?all c,|(.[0]===c if [eq] $_ for |.flat[<0 4 8>,<2 4 6>],|$_,|.&zip)}

A lambda that accepts a list of lists like (('X','O','X'), ('O','X','O'), ('X','O','X')), and returns a Bool.
It works like this:

Check which mark appears exactly 5 times, and store it in c. (If no mark appears exactly 5 times, this will contain a falsy value)
Iterate over all diagonals, rows, and columns, and filter out the "winning" ones (i.e. those where all three letters are equal).
Check if c is truthy, and each winning line is of type c.

PHP, 125 bytes
for($p=$n=$argv[1];$p;$p/=2)$i+=$p&1;foreach([7,56,448,73,146,292,273,84]as$m)$n&$m^$m?$n&$m||$o++:$x++;echo!$x|!$o&&2>$i^=4;

I had the same idea as Arnauld: The board is valid if there are either 4 or 5 bits set and either X or O or nobody has a streak (but not both).
To generate input from field replace X with 1 and O with 0, join lines and convert binary to decimal, provide as command line argument.
prints 1 for valid; empty output for invalid. Run with -r.
breakdown
// count set bits
for($p=$n=$argv[1];$p;$p/=2)$i+=$p&1;
    /* ($p/=2 takes longer than $p>>=1, but eventually
       $p will come close enough to 0 for the loop to finish */
// count streaks for X and O
foreach([7,56,448,73,146,292,273,84]as$m)
    $n&$m^$m            // ($n masked with streak)!=streak <=> no streak for X
        ?$n&$m||$o++    // true: O has a streak if ($n masked with streak) is empty
        :$x++;          // false: X has a streak
echo!$x|!$o&&2>$i^=4;   // valid if not both have a streak
                        // AND $i is 4 or 5 (toggle 4 -> result 0 or 1)

Swift, 178 bytes
func t(i:String)->Bool{let r=i.characters.filter({$0=="X"}).count;let g=i.characters.split(separator:"\n").map(String.init).contains;return(r==5||r==4)&&(!g("XXX") && !g("OOO"))}

ES6 (Javacript), 130, 138, 117 bytes
EDITS:

21 bytes off thanks to excellent advice from @Neil !
Initial version was prone to a bug, which should now be fixed at cost of +8 bytes. (Thanks @ETHproductions for pointing it out)

An extremelly straighforward approach. Can probably be golfed a bit further.
Accepts input as 9 separate arguments, 1es and 0es

1 is for X
0 is for O

Arguments: 1-3 - first row, 4-6 - second row, 7-9 - third row.
Golfed
(a,b,c,d,e,f,g,h,j)=>![a+b+c,d+e+f,g+h+j,a+d+g,b+e+h,c+f+j,a+e+j,g+e+c,7].some(x=>x=="7777307777"[a+b+c+d+e+f+g+h+j])

Interactive "Test Bed"

var a=b=c=d=e=f=g=h=j=0;

T=(a,b,c,d,e,f,g,h,j)=>![a+b+c,d+e+f,g+h+j,a+d+g,b+e+h,c+f+j,a+e+j,g+e+c,7].some(x=>x=="7777307777"[a+b+c+d+e+f+g+h+j]);

function test() {
  if(T(a,b,c,d,e,f,g,h,j)) {
     grid.style.backgroundColor='green';
     msg.innerHTML="GOOD"
  } else {
     grid.style.backgroundColor='red';
     msg.innerHTML="BAD"
  }
}

     BAD

      <input type="checkbox" onchange="a=this.checked*1;test();" id="ca"/>
      <input type="checkbox" onchange="b=this.checked*1;test();" id="cb"/>
      <input type="checkbox" onchange="c=this.checked*1;test();" id="cc"/>

      <input type="checkbox" onchange="d=this.checked*1;test();" id="cd"/>
      <input type="checkbox" onchange="e=this.checked*1;test();" id="ce"/>
      <input type="checkbox" onchange="f=this.checked*1;test();" id="cf"/>

      <input type="checkbox" onchange="g=this.checked*1;test();" id="cg"/>
      <input type="checkbox" onchange="h=this.checked*1;test();" id="ch"/>
      <input type="checkbox" onchange="j=this.checked*1;test();" id="cj"/>

I may be wrong, but it looks like this only checks whether there is a winner. A valid board can have no winner; for example, [1,0,1,1,0,1,0,1,0] (XOX XOX OXO).

Yep, I've lost the negation while golfing it. It is supposed to check that an opposite side is not the winner. Should be fixed now. Thx !

(I started commenting before the latest edit) Can you a) write a+b+c+d+e+f+g+H+i instead of F.reduce((r,c)=>r+=c*1) (at which point you don't need F) b) write .includes(C) (and go on to inline C's value)?

@Neil, this will probably work, I'll give it a try tomorrow. Thx !

Is OOO XXX OXO a fail?

@Ismael Miguel - yep, it is invalid, as O and X both win

Oh, you are right. My testcase was the fail. Sorry!

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


text:
Bob's Passwords
Introduction
Bob likes to have different passwords for each website he uses. He wants passwords in a special format so that he can remember. Help him by building a password generator which is as short as possible in code length, because he likes keeping stuff short just like his name.
Challenge
Build Bob a password generator which takes in four parameters -

Domain address, (ex : stackexchange.com)
First name,
last name,
Birth date and year.

and outputs a string which has undergone the following transformations.
Every password has a template based on the length l of the domain name.
If l is prime then the template is of this form -
[birth-date][domain-name][lastname][birth-year][symbol]
else it is of this form -
[symbol][birth-year][firstname][domain-name][birth-date].
The symbol field will have values based on the domain type.

.com    ->  $$$
.org    ->  &&&
.net    ->  %%%
.edu    ->  +++
.gov    ->  @@@
.mil    ->  >>>
default ->  ~~~

Now, he also wants to run a caesar cipher over fields - [firstname][domain-name][lastname].The shift direction is right if l is prime else it is left. The shift value is determined by the value of addition of birth date and year.
After the above process, the text cannot be easily remembered so he wants the ciphered text to be pronounceable. To do this he wants to replace every third consecutive consonant with a vowel in alphabetical order (i.e, aeiou).
Finally, he wants to delete consecutive occurrences of same letters.
Example

Input  - stackexchange.com bob williams 0894

Output - 08qraicvafyecugjigyoq94$$$.

Explanation :
Password template is [birth-date][domain-name][lastname][birth-year][symbol],
because the length of domain name stackexchange is a prime. Symbol will be $$$ as domain type is .com.
Let's fill those values in the template - 08stackexchangewilliams94$$$.
Now caesar cipher has to be run on fields [firstname][domain-name][lastname] (it's just lastname in this case). Shift direction is right because l is prime and the shift value is 08+94 = 102.
So, 08stackexchangewilliams94$$$ turns into 08qryaicvafylecugjjgykq94$$$. Now every third consecutive consonant is replaced with a vowel - 08qraaicvafyeecugjigyoq94$$$  every consecutive ocuurences of same letter is deleted - 08qraicvafyecugjigyoq94$$$. Don't worry it is pronounceable for Bob.
Additional info

Domain address, first name and last name contain only lowercase
alphabets.
Domain address will always consist of only a second-level and top-level domain, like stackexchange.com and not codegolf.stackexchange.com. Also, domains like  .co.uk is not allowed but just .uk or .in is valid.
Replacement of vowel in alphabetical order is cyclic. I
mean after u, a is used to replace.
ASCII range for Caesar cipher is 97 - 122 inclusive.
You can take input as described here.
Output has to be a string.
The format of birth date and year is dd and yy.So 02 is acceptable and 2 is not.

This is code-golf, so the shortest code in bytes wins. Happy Golfing!

Will domain name always consist of only a second-level and top-level domain, like stackexchange.com, not img.stackexchange.com? What about country domains like bbc.co.uk?

Your example call uses 0894 which adds up to 102 but the explanation uses 08+96=106. The ciphered text appears to use the 102 value. Just a slight inconsistency that could be confusing...

@briantist sorry for the typo. I've corrected it now.

Does the length of the domain name include the .?

Bob is one crazy mofo if he can pronounce that.

@carusocomputing Maybe Bob is Welsh?

@briantist Roy'r fiddil un uh tor...

@ngenisis no it does not include the ..

Wou wrote default in the explanation for the symbol field

@RomanGräf I guess you are asking what is the default about. If the top-level domain name is anything else than the ones mentioned above then the default symbol is ~~~. (for ex. - .uk ,.int etc.)

No I meant you types defualt not default

PowerShell 3+, 480 476 474 453 450 448 bytes
param($d,$f,$l,$b)$s,$t=$d-split'\.'
$m,$y=$b-split'(?<=..)(?=..)'
$v=+$m+$y
$p='1'*$s.Length-match'^(?!(..+)\1+$)..'
$c={-join([char[]]"$input"|%{[char](97..122)[((+$_-97)+((26-$v),$v)[$p])%26]})}
$s=$s|&$c
$f=$f|&$c
$l=$l|&$c
$a=(($a=@{com='$';org='&';net='%';edu='+';gov='@';mil='>'}.$t),'~')[!$a]*3
("`"$(("$a$y$f$s$m","$m$s$l$y$a")[$p]-replace'([^aeiou\d]{3})',"`$('`$1'-replace'[a-z]`$$',('aeiou'[`$i++%5]))")`""|iex)-replace'([a-z])\1+','$1'

Try it online!
Saved 24 26 bytes thanks to TimmyD!
Wow, this was a crazy one. I don't think I can post a full breakdown of this until later or tomorrow.
Note: all line endings are \n (0x10), so that I don't have to use ; and put this all on one line.
Quick overview:

Split the domain into the second level and top level.
Split the birthdate into month and year.
Calculate the shift value.
Determine whether the length of the SLD is prime. Since the segment cannot be longer than 63 characters (see also RFC 1035), I think it was shorter just to hardcode the list of primes :) Using the regex method suggested.
Define a scriptblock (anonymous function essentially) to perform the Caesar cipher.
Apply the cipher to the SLD, first, and last names
Get the symbol with a hashtable and indexing funny business.
Finally, a giant mess where I apply the appropriate template, run a replace for the consonant triplets, replacing each one with a subexpression (code) that will replace that section with the appropriate value, then run the resulting string through Invoke-Expression (iex) to execute the generated emebedded code, then a final replace of consecutive letters with a single letter.

@TimmyD wow I never saw that before, and it's brilliant. Thanks!

@TimmyD you know, I originally tried to write it with unary -join and I could have sworn it was joining with spaces and not $nulls, which surprised me, but having just tried it again it worked as I originally expected. Weird (and thanks again)!


text:
Plotting the Cornu spiral
The Cornu Spiral can be calculated using Feynman's method for path integrals of light propagation. We will approximate this integral using the following discretisation.
Consider a mirror as in this image, where S is the light source and P the point where we collect light. We assume the light bounces in a straight ray from S to each point in the mirror and then to point P. We divide the mirror into N segments, in this example 13, labelled A to M, so that the path length of the light is R=SN+NP, where SN is the distance from S to mirror segment N, and similar for P. (Note that in the image the distance of points S and P to the mirror has been shortened a lot, for visual purposes. The block Q is rather irrelevant, and placed purely to ensure reflection via the mirror, and avoid direct light from S to P.)

For a given wave number k the phasor of a ray of light can be calculated as exp(i k R), where i is the imaginary unit. Plotting all these phasors head to tail from the left mirror segment to the right leads to the Cornu spiral. For 13 elements and the values described below this gives:

For large N, i.e. a lot of mirror segments, the spiral approaches the "true" Cornu spiral. See this image using various values for N:

Challenge
For a given N let x(n) be the x-coordinate centre of the n-th mirror segment (n = 0,1,2,...,N):
x(n) := n/N-0.5

Let SN(n) be the distance of S = (-1/2, 1000) to the n-th mirror segment:
SN(n) := sqrt((x(n)-(-1/2))^2 + 1000^2)

and similarly
NP(n) := sqrt((x(n)-1/2)^2 + 1000^2)

So the total distance travelled by the n-th light ray is
R(n) := SN(n) + NP(n)

Then we define the phasor (a complex number) of the light ray going through the n-th mirror segment as
P(n) = exp(i * 1e6 * R(n))

We now consider the cumulative sums (as an approximation to an integral)
C(n) = P(0)+P(1)+...+P(n)

The goal is now plotting a piecewise linear curve through the points (C(0), C(1), ..., C(n)), where the imaginary part of C(n) should be plotted against its real part.
The input should be the number of elements N, which has a minimum of 100 and a maximum of at least 1 million elements (more is of course allowed).
The output should be a plot or image in any format of at least 400×400 pixels, or using vector graphics. The colour of the line, axes scale etc are unimportant, as long as the shape is visible.
Since this is code-golf, the shortest code in bytes wins.
Please note that this is not an actual Cornu spiral, but an approximation to it. The initial path integral has been approximated using the Fresnel approximation, and the mirror is both not of infinite length and not containing an infinite number of segments, as well as mentioned it is not normalised by the amplitudes of the individual rays.

I had the values of n ranging from 1, but in agreement with Luis and flawr, who were the only answerers at the time of change, I corrected it to be from 0, which makes the mirror symmetric and is in agreement with the rest of the challenge. Apologies.

MATL, 29 26 25 bytes
Thanks to @Adriaan for 3 bytes off!
Q:qG/q1e3YytP+1e6j*ZeYsXG

Here's an example with input 365 366... because today is MATL's first birthday! (and 2016 is a leap year; thanks to @MadPhysicist for the correction).
Or try it in MATL online! (experimental compiler; refresh the page if it doesn't work).

Explanation
Q:q    % Input N implicitly. Push range [0 1 ... N] (row vector)
G/     % Divide by N, element-wise
q      % Subtract 1. This gives NP projected onto the x axis for each mirror element
1e3    % Push 1000. This is NP projected onto the y axis
Yy     % Hypotenuse function: computes distance NP
tP     % Duplicate, reverse. By symmetry, this is the distance SN
+      % Add. This is distance SNP for each mirror element (row vector)
1e6j   % Push 1e6*1i
*      % Multiply
Ze     % Exponential
Ys     % Cumulative sum
XG     % Plot in the complex plane

Grabs nearest towel and throws it in...

Happy Birthday MATL!

Isn't 2016 a leap year?

MATLAB, 88 84 81 79 bytes
g=@(x)hypot(1e3,x);h=@(x)plot(cumsum(exp(1e6i*(g(x)+g(1-x)))));f=@(N)h(0:1/N:1)

Thanks @LuisMendo for -3 bytes, and @Adriaan for -2 bytes!
The function g is the distance function we use in SN and NP, and h does the rest of the calculation plus plotting. f the actual function we want and it produces the vector we need.
This is the output for N=1111

GeoGebra, 107 bytes
1
1E6
InputBox[a]
Polyline[Sequence[Sum[Sequence[e^(i*b(((k/a)^2+b)^.5+((k/a-1)^2+b)^.5)),k,0,a],l],l,1,a]]

Each line is entered separately into the input bar. Input is taken from an input box.
Here is a gif of the execution:

How it works
Entering 1 and 1E6 implicitly assigns the values to a and b respectively. Next, the InputBox[a] command creates an input box and associates it with a.
The inner Sequence command iterates over integer values of k from 0 to a inclusive. For each value of k, the required distance is calculated using the expression ((k/a)^2+b)^.5+((k/a-1)^2+b)^.5). This is then multiplied by i*b, where i is the imaginary unit, and e is raised to the result. This yields a list of complex numbers.
After this, the outer Sequence performs the cumlative summation by iterating over integer values of l from 1 to a inclusive. For each value of l, the first l elements of the list are summed using the Sum command, again yielding a list of complex numbers.
GeoGebra treats the complex number a + bi as the point (a, b). Hence, the complex numbers can be plotted using the Polyline command, which joins all the points in the complex number list with straight line segments.

R, 102 82 80 bytes
Edit: scrapped the function for calculating the distance
Edit2: Noticed a nearly identical answer by @Plannapus (oh well)
Edit3: Saved 2 bytes thanks to @Plannapus as well
N=scan();x=1:N/N;plot(cumsum(exp((sqrt(x^2+1e6)+sqrt((x-1)^2+1e6))*1e6i)),t="l")

For N=1000 we get:

Actually you can go as low as 80 bytes since you don't need the parentheses around x anymore: N=scan();x=1:N/N;plot(cumsum(exp((sqrt(x^2+1e6)+sqrt((x-1)^2+1e6))*1e6i)),t="l")

And down to 77 bytes by replacing two sqrts with ^.5 and t="l" with ,,"l"...

R, 86 83 81 bytes
plot(cumsum(exp(1e6i*((1e6+(0:(N<-scan())/N)^2)^.5+(1e6+(0:N/N-1)^2)^.5))),t="l")

Thanks @JarkoDubbeldam for the extra 3 bytes.
For N=1000:

Wow, 2 R answers within 2 minutes. It's odd, I tried the same and I couldn't get it to work, but this works fine for me :S Anyways, good job!

Also, using scan as such plot(cumsum(exp(1e6i*(sqrt(1e6+(0:(N<-scan())/N)^2)+sqrt(1e6+(0:N/N-1)^2)))),t="l") saves a few bytes

Mathematica 89 Bytes (87 chars)
Graphics[Line[ReIm/@Tr/@Table[E^(I*10^6*Tr[√(10^6+(-{0,1}+j/#)^2)]),{i,0,#},{j,0,i}]]]&

Usage:
%@100

yields


text:
Replay previous console text
Create a script that, when run from a console, will display the text already in the console, prior to running.
Challenge

How will the winner of the challenge will be determined?

The golf with the shortest length (in bytes) will win.

Example Input and Output
Input:
(Shown is Windows)
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\CSS>dir
 Volume in drive C has no label.
 Volume Serial Number is B0A1-E768

 Directory of C:\Users\CSS

11/30/2016  07:18 PM    <DIR>          .
11/30/2016  07:18 PM    <DIR>          ..
12/01/2016  04:45 PM    <DIR>          .android
10/25/2016  12:41 PM    <DIR>          .atom
11/29/2016  05:52 PM    <DIR>          .dnx
10/27/2016  09:34 PM               148 .gitconfig
11/28/2016  03:02 PM    <DIR>          .MemuHyperv
11/29/2016  05:55 PM    <DIR>          .nuget
12/01/2016  04:42 PM    <DIR>          .oracle_jre_usage
10/26/2016  11:37 PM    <DIR>          .ssh
12/04/2016  06:20 PM    <DIR>          .VirtualBox
11/29/2016  12:56 PM    <DIR>          .vscode
11/28/2016  03:53 PM             8,528 2016-11-28-20-44-28.000-VBoxSVC.exe-2608.log
11/28/2016  05:09 PM    <DIR>          Andy
11/23/2016  10:01 AM    <DIR>          Contacts
12/11/2016  11:16 PM    <DIR>          Desktop
11/30/2016  07:35 PM    <DIR>          Documents
12/11/2016  01:43 AM    <DIR>          Downloads
11/23/2016  10:01 AM    <DIR>          Favorites
11/22/2016  07:23 PM               409 fciv.err
11/22/2016  07:21 PM               266 hi
11/23/2016  10:01 AM    <DIR>          Links
11/22/2016  04:28 PM                15 me.txt
11/28/2016  03:08 PM    <DIR>          Music
10/25/2016  12:44 AM    <DIR>          OneDrive
12/09/2016  05:57 PM    <DIR>          Pictures
11/23/2016  10:01 AM    <DIR>          Saved Games
11/24/2016  08:56 PM               151 search.bat
11/23/2016  10:01 AM    <DIR>          Searches
11/07/2016  11:00 AM                11 t.bat
11/24/2016  08:55 PM                93 update.bat
11/28/2016  03:08 PM    <DIR>          Videos
               8 File(s)          9,621 bytes
              24 Dir(s)  152,887,300,096 bytes free

C:\Users\CSS>

Output:
The script must display something like the text above, in the sense that it must display exactly what was in the console before the script was called.

Must it print out the entire terminal history, or just what's in the current window?

@GabrielBenamy The entire terminal history.

What precisely does "before the script was called" mean? When is the script called? If the invocation is directly from the terminal, is it when the user starts typing in the path to the script, or when they hit enter? If the invocation is indirect via a script which invokes my script, is it when the wrapper script is called or when it invokes my script?

@PeterTaylor The script is called when you hit enter. The script does not need to filter out the characters from the script being invoked. However, bonus points if it does.

The entire history of what was typed into the terminal is not necessarily stored anywhere.

That is why it is in the puzzles section. Any language that does store the history in any way, an answer is possible using that language. @feersum

Why was this question put on hold?

@cascading-style what's the 15 byte file named "Me.txt" contain?

Just the words Hello World...@carusocomputing

MacOS terminal, 84 bytes
osascript -e 'tell app "System Events" to keystroke "ac" using command down'
pbpaste

Simple select-all then copy-and-paste.


text:
Count up from 0 to 2017 without numbers in your source
This question was profoundly inspired by Joe Z's question.
But, with a twist...
So, now that it's almost 2017, it's time for a code question involving the number 2017.
Your task is to make a program that counts up from 0, printing each number until it reaches 2017. without using any of the characters 012345678 or 9  in your code; and without using any variables such as the date or time or a random number.
Acceptable Output
The output of your code must follow the following format:

[number]
[number]
[number]
etc.
A number, then a line feed, then repeat.

The shortest code (counting in bytes) to do so in any language in which numbers are valid tokens wins.

Example Output:
0
1
2
3
4
...
2016
2017

This is rather vague. How should the numbers be printed? What constitutes an external variable? You give two examples but never define it. What constitutes a valid token?

@ConorO'Brien please read the linked post.

Questions should be self-contained. You need to specify these in your own post, should the old question be unavailable in the future.

@ConorO'Brien Ok, i am editing it now.

What is so wrong with my question? please let me know so that I can fix it.@Dennis @ConnorO'Brien

For starters, you still haven't ruled which output formats are acceptable. Do we have to print then numbers separated by newlines? Can we return a list of numbers from a function?

That said, even with a perfect specification, it might still be considered a duplicate of the previous challenge. The difference is that we cannot simply print 20 and 17 this time; it has to be a single integer.

Don't be tricked the printing 2014 challenge having masses of votes. By modern standards, it's pretty awful, and I'd expect it to get a poor reception if posted today. See Using old challenges as a model as a thing to avoid, as well as Do X without Y.

^ Agreed. Come up with your own unique challenge.

Too bad this was closed. I just came up with a 7 char/8 byte solution.

By the way, you also posted this (and suggested an edit to my 2014 question) about 19 days too early. The New Year's Puzzle is supposed to be posted exactly on the new year, wherever it happens to be where you live.

Also, I think you just accepted my answer too quickly. I'd suggest waiting at least 7 days :)

In order to enter, I have to use line numbers for the Sinclair ZX81 - even if I write it in assembly. Will this still be allowed?

Jelly, 6 bytes
“¬×’ḶY

Try it online!
Explanation:
“¬×’ḶY Main link. Arguments: 0
“¬×’              2018
    Ḷ             Range [0..z)
     Y            Join z by newlines

PowerShell v2+, 15 bytes
''..+[char]'ߡ'

UTF-8 code point 2017, ߡ, functions as our upper bound. We turn it from a string into a char with [''], then to an int with +. The lower bound '' is implicitly cast to 0. Thus, this is the range operator .. from 0 to 2017. Default Write-Output prints each number with newlines between.

What a beautifully golfed answer!

APL (Dyalog APL), 13 bytes
Requires ⎕IO←0 which is default on many systems.
⍳⎕UCS'ߢ'

TryAPL online!
⍳ N first indices, where N is
⎕UCS the Unicode code point of
'ߢ' this character

Oops, I misread

Java, 99 bytes
Hobbyist programmer here. This is my first golf so apologies if I mess things up. Of course since I wrote in Java my code is going to be very large, but I think this may be as far as Java can go.
Golfed:
interface D{static void main(String[]z){for(int i='a'-'a';i<'ÿ'*''+'é';)System.out.println(i++);}

Ungolfed:
interface D{
    static void main(String[]z){
        for(int i='a'-'a';i<'ÿ'*''+'é';) //Between the seemingly empty quotes is an enquiry character with an ASCII value of 7, which has been included in the byte count and post.
            System.out.println(i++);
    }
}

Explanation:
This solution abuses the interaction Java's compiler has with chars. Since Java interprets ASCII characters as bytes, I can use that fact to do arithmetic without actually ever using a number. The y with a diaeresis ASCII 255, enquiry is 7, and the acute e is 233 (so I can have 2017 be included). Hopefully this isn't too cheaty to do!

Welcome to ppcg! Nice first post!

@Easterly Irk Cheers :) Hope I didn't do too poorly! Is there anything I need to know going further into golfing?

As you noted, Java isn't always the best language to golf in, but that's okay.  Also, as you might have seen, many users on this site create their own languages to golf in. The consensus on that is as long as the language predates the challenge, that's fine. That's about it, hope you have fun and stay here with us!

><> (Fish) 19 bytes
iaa,+:n:"#:"*d-=?;ao!

very simple, uses ascii chars to generate the number 2017 then compares to an increasing counter that gets printed.
i is input but without one becomes -1
a = 10 so aa, is 1 (10 div 10)
"#:" becomes (# multiply :) which makes 2030 which we take 13 (d) from to make 2017 (This number is a prime so we can't save bytes here).

Java, 147 bytes
Call with no cmd args
class t{public static void main(String[]a){int i=a.length,j=++i,h;j+=i--;h=j*j*j*j*j;j=h*j*j*j*j*j*j-(--h);j++;for(;i<j;)System.out.println(i++);}}

05AB1E, 8 bytes
žCžw<-Ý»

Try it online!

MATL, 15 11 bytes
4 bytes saved thanks to @Luis
'? 'pQQ:q"@

Try it Online!

@LuisMendo You're absolutely right! My golf skills are apparently getting rusty

You need more practice :-P

Labyrinth, 49 43 40 bytes
))::+:#:*:
@        (
(\"))****(
{ }
)!:

Try it online!

7, 29 bytes, 78 characters
Not going to win, but I had fun writing it. 7 uses a 3-bit character set that packs 8 characters into 3 bytes. Here's the program in octal encoding (which is most natural for the language):
770267133177162277266362217240522405240540562240540554240524052405052405405513

and here's how it looks on disk (via an xxd dump); looking on the right, we can verify that the file contains no digits:
00000000: fc2d cb67 f392 fd6c f247 a82a 5055 0582  .-.g...l.G.*PU..
00000010: e4a0 b05b 1415 4154 1455 0582 d2         ...[..AT.U...

Try it online!
Underload is the brainfuck of stack-based languages, and 7 is a variant of Underload modified to provide I/O capabilities and to reduce the size of the command set. (The command set had to be modified to allow for things like outputting mismatched parentheses.) So this is an example of how to write this program in a very primitive and low-level language.
Here's how the program works:
77026

We start by pushing the stack element 02, escaped once (thus it'll still appear as 02 on the stack; normally there's one level of unescaping). To push a stack element in 7, you precede it with a 7, and enclose any parts you want to escape in 7…6.
7 133  17 716 22 77266 36
        ( ( )    (( ))  )

The rest of the program is all stored in one large stack element. (In 7, there's no way to write code that runs immediately; you have to start by pushing it as a literal to the stack, then rely on it getting appended to the program implicitly when the program runs out of space.) We start by discarding the large stack element in question (13), then outputting the element below (3); that's 02. The first output of the program sets the output format the program uses. In this case, we're using output format 0, "integers". That accounts for (and removes) the zero. The output format we're using works by counting the number of 7s and 1s in the output string, and subtracting the number of 6s and 0s, to produce the integer to output; in this case, the string 2 has no 0s, 1s, 6s, or 7s, so it outputs 0. Finally, a trailing 2 (in this output format) produces a newline (the output would "naturally" be space-separated). After that, we push a large literal to the stack. This will eventually be used as a loop body, so we'll consider it when it runs.
22 1724052240524054056 2240540554240524052405052405405

Some people here may be used to Underload numerals from a previous challenge. 7 numerals are fairly similar. In the linked challenge, the only characters used were : and *; numbers represented like that can translate into 7 directly, with 2 serving the role of : and 405 serving the role of * (note that it's actually equivalent to Underload's ~*, but the two act identically in this context). Thus, given a number n, you can add 1 to it using 2n405, and you can multiply two numbers by appending them to each other; the null string is 1. One thing the linked challenge didn't mention, though, is exponentiation. This works a little differently in 7 than in Underload, but the same basic principles are in use in each case. Additionally, in 7, you can handle addition via putting code between the 4 and 05 (something that's more verbose in Underload because you can't put code inside the *). So we can restructure this part of the program like this:
2
   2
    17         start a new number (=1)
      2405     ×2                 (=2)
      2        ×(1          (=1)
         2405     ×2        (=2)
         2405     ×2        (=4)
      405       +1          (=5)) (=10)
     6         end of the new number
     2         ×(1          (=1)
        2405      ×2        (=2)
     405        +1          (=3)) (=3)
    5          exponentiate (10 ^ 3 = 1000)
   4           +(1          (=1)
     2405         ×2        (=2)
     2405         ×2        (=4)
     2405         ×2        (=8)
   05           )                 (=1008)
   2405        ×2                 (=2016)
405            +1                 (=2017)

The rest of the program is:
5 13

The 5 starts a loop, running the stack literal we pushed earlier 2017 times. Finally, the 13 pops the top stack element, meaning that the stack is now empty and the program ends.
So what does the loop body do? Here's how it decodes:
716      Append a 1 to TOS
22       Make two more copies of the TOS
77266    Append a 2 to TOS
3        Output TOS, discard top two stack elements

Appending a 1 will increase the numerical value (initially zero) that numeric output will see the stack as having. We make two temporary copies, and append a 2 (to provide the newline required by the question). Then we output it, discarding the temporary copies in the process. Doing this 2017 times will thus count from 1 to 2017. We outputted the 0 earlier, thus completing the program.

without numbers in your source

@RomanGräf: .-.g...l.G.*PU....[..AT.U... doesn't seem to contain numbers to me. (Non-ASCII and unprintable characters have been replaced with . there, but aren't digits by definition; all the digits are in ASCII.) The commands are all named after digits (when they have names at all), but none of them appear literally in the source itself.

Oh, I only read the octal translation.

Python 3, 32 bytes
print(*range(ord('ߢ')),sep='\n')

(K+R)eg, 9 bytes
ߡï(.\
,

Explanation:
ߡ      # Push 2017
 ï     # Count all the way from 0
       # Due to the irritating output-without-newline:
  (    # Repeat the length of the stack times:
   .   # Output the top of the stack
    \ ,# Output 1 newline

TIO

JavaScript (ES6), 52 bytes
for(n=x=+[],i=++x+x+''+n;n<i+i-x-x;)console.log(n++)

There's not much to say about it:
for(
  n = x = +[],              // n = x = 0
  i = ++x + x + '' + n;     // i = 1 + 1 + '' + 0 = "20"
  n < i + i - x - x;        // n < "2020" - 1 - 1 <=> n < 2018
)
console.log(n++)

It's acceptable for javascript answers to use alert() instead of console.log() which would save you a few bytes.

Stax, 6 bytes
ÇîHtUá

Run and debug it
Use packing to avoid appearance of the digits.

Japt -R, 5 4 bytes
#ߢo

Test it

W n d, 7 bytes
♦kb-╖úÜ

Explanation
Uncompressed:
2018   M % Foreach in the range 1..2018:
    a1-  % Return the current item - 1

Flags:n  % Join the output with newlines
```