text:
Checking String for enum in Java
Write a Java method to check if a given string matches any value in a given enum.
Your method will take two parameters, one a string and one an enum, and return true if the string representation of any of the enum's elements matches the given string, or false otherwise. Note that your method should still function normally if the String parameter is null, and that you aren't allowed to use any external libraries.
Test cases:
public enum E { A, B, C; }

public enum F { X, Y, Z; }

check("a", E.A); // is false (because "A" is uppercase)
check(null, E.A); // is false
check("C", E.A); // is true
check("X", F.X); // is true
check(null, F.X); // is false
check("y", F.X); // is false

The method has access (as a solver correctly understood) to a generic type E that has the only bound that "E extends Enum(E)".
Reference implementation (Ungolfed):
boolean <E extends Enum<E>> check(String s, E e){
    for(E ex : e.getDeclaringClass().getEnumConstants())
        if(ex.toString().equals(s)) return true;
    return false;
}

Another possible implementation (due to a solution) is (Ungolfed):
public static <E extends Enum<E>> boolean check(String s, E e){
    return java.util.stream.Stream.of(e.getDeclaringClass().getEnumConstants()).anyMatch(x->x.name().equals(s));
}

What I'm looking for is the shortest thing I could put after return (or, as a solutor did, after "(String s,E e)->)".
This is code-golf, so fewest bytes wins!

What should the method do? With the current spec, always returning true is allowed.

I'll edit, probably the request on parameters is too restrictive, I'll also add an example.

Single-language challenges are also discouraged here. Unless the challenge only makes sense for Java, you should allow all languages.

In this case, I'm starting from a Java enum so, unless another language can deal with a Java class, I don't see why I should allow other languages. (Sorry for my obstinacy, but I'm new here and I wanted this to solve a more practical than theoretical problem).

Okay, now I get what the challenge is about. Because it's so focused, I think it would be received better as a [tag:tips] question that asks for golfing advice, like "I want to check whether the name of a Java enum value matches a given string, is there a shorter way than this?"

Ok, tried to edit in that sense. May I know if there are some more not clear points left?

So is the code to check whether a given string is found in an enum?

The task could be described in the main text more explicitly, e.g. "The method should return true if the string is equal to the string representation of any value in the enum class, and false otherwise. null strings should also result in false." Remove the "shortest code wins" part too; [tag:tips] questions are not competitions.

Edited as suggested. Thank you.

Can we assume that the enum class will be E?

I prefer if you don't make assumptions on the class E because I'm going to use it within a context with generics.

I prefer if you don't make assumptions on the class E
That is a bit self-contradictory, as looking at your reference method you do use a literal E type at least twice there. You should then declare it as:   void check(String s,E e) instead.

Otherwise i can not see why E.valueOf() would be incorrect to do, or why do we need a second argument at all (as that is no different of how your check method operates).

The words "given" and "enum" are both somewhat ambiguous. If you really intend for the signature of the method to be boolean c(String, E) then "given" means two different things in the first sentence of the question. Other interpretations would lead to signatures boolean c(String, Enum) or boolean c(String, Class<? extends Enum>). The comment above that you "prefer if you don't make assumptions on the class E" suggests that you want the second or third signature, but the reference implementation uses the first. 2. It's confusing to ask for return values of True and False

I'll try to edit it.

There are now two reference implementations with different signatures. In my opinion that's adding to the confusion, not reducing it.

I don't get where the problem is. This method takes a string and a variable that must be an instance of some enum and returns true iff the string represents an instance of the same enum as the example given by the second argument.

Java 8, 86 bytes
(String s,E e)->java.util.stream.Stream.of(E.values()).anyMatch(x->x.name().equals(s))

Try it online!

My experience with java Stream is that it works by some odd magic, but it works so I won't question it and hopefully my code doesn't fall apart. Java really isn't my thing.

Taking that you do E.values() (which implies E to be of a known Enum type), you can now remove E e from the lambda signature, as it is not really used anywhere.

@zeppelin No, I can't, because the challenge states "Your method will take two parameters, one a string and one an enum".

@Mego E should be Enum, as this is supposed to take in any enum, not just E

Yep, because it implies that E is  instead (through OP failed to formulate that correctly), but in this case your E.values() code won't compile or work.

The test cases imply that the function should take a value, not an Enum class.

Java 4+, 96 bytes
boolean c(String a,Enum e){for(E f:values())if(f.toString().equals(a))return true;return false;}

Test code:
public enum E {
    A,B,C,D,E,F;
    public static void main(String[]a) {
        System.out.println(E.c("a",E));
        System.out.println(E.c("B",E));
        System.out.println(E.c("d",E));
        System.out.println(E.c("C",E));
        System.out.println(E.c("D",E));
        System.out.println(E.c("e",E));
        System.out.println(E.c("F",E));
    }
    boolean c(String a,Enum e){for(E f:values())if(f.toString().equals(a))return true;return false;}
}

Output:
false
true
false
true
true
false
true


text:
Lined up circle, n points
Draw lines between every pair of distinct points for n points arranged in a circle, producing something like the below result. Shortest code (in bytes) wins! Your lines don't have to be transparent, but it looks better that way. The output must be a vector graphic, or be an image at least 600 pixels by 600 pixels (either saved to a file or displayed on the screen). To complete the challenge you must draw at least 20.

It'd be cool if you had to take in a number n and draw lines for n points.

I second this idea. Change it before someone gets the first answer.

@shooqie Then the title wouldn't make sense though, unless that can be edited by the mods?

Or you can make a new one

Actually looks like anyone can edit the title, should I propose that as a change or leave it as is?

I mean, it's up to the submitter what he will do. You should propose it as a change though.

I don't think changing 37 to an arbitrary n would add much to the challenge as I expect most solutions to work with any number anyway, especially because 37 is odd and hence there are no mirror symmetries.

@Laikoni Well I figured it'd be interesting to see different patterns by changing the number, but I guess you could just use other people's solutions and change the 37 to whatever you want yourself.

Your sample output is not a vector graphic; it's a JPEG raster graphic.

@GlennRanders-Pehrson "or be an image at least 600 pixels by 600 pixels"

Do we take n as input or just pick an arbitrary n over 20?

What is the minimum permitted radius of the circle, as a fraction of the image size?

Somewhat related.

At least 80%? I mean... why is that concern?

What n did you use for your example?

@Titus 37, it was the initial challenge (check the question's revision history for more details)

Do we have to parametrize? Please clarify with for a given n (and rephrase or remove the last sentence) or with for n>=20 of your choice or explicitly allow both. Thanks.

For people interested in the mathematics behind this specific graph, check out this link on complete graphs.

Mathematica, 13 bytes
CompleteGraph

Looks like this only fails to give a circular embedding for n=4, but the question states n>=20

...and there was me trying to find the correct way to make a function to take n (I had the answer ready from the fixed 37) :(

Why is that a built in?! That language is crazy good at graphing.

@carusocomputing This function has nothing to do with "graphing" in the sense of plotting. Mathematica is also very good for graph theory problems and having a built-in to generate a complete graph seems like the first thing I would add if I added support for graphs to my language. The only reason this function happens to be useful for this challenge is that complete graphs are by default rendered with all vertices arranged in a circle.

If you're gonna support graphs, you better have a built in complete graph function, IMO.

@carusocomputing Welcome to Mathematica, the language that has a built-in for every existing function. :-P

I was downloading NetLogo because I thought "multi-turtle will make short work of this!" then remembered you Mathematicans are using the grown-up version.

MATL, 16 14 bytes
As I'm not terribly fluent with MATL I expect that this is somewhat more golfable. (Would be nice to at least beat Mathematica :-) I.e. the the flip w is not optimal, it could probably be avoided...
:G/4*Jw^2Z^!XG

Test it Online! (Thanks @Suever for this service, thanks @DrMcMoylex for -2 bytes.)
Explanation (for N=3):
  :               Generate Range 1:input:       [1,2,3]
   G/             Divide By the first input     [0.333,0.666,1]
     4*           Multiply by 4                 [1.33,2.66,4.0]
       Jw^        i ^ (the result so far)       [-0.49+ 0.86i,-.5-0.86i,1.00]
                  (This results in a list of the n-th roots of unity)
          2Z^     Take the cartesian product with itself (i.e. generate all 2-tuples of those points)
             !XG  Transpose and plot

It is worth noting that for generating the N-th roots of unity you can use the formula exp(2*pi*i*k/N) for k=1,2,3,...,N. But since exp(pi*i/2) = i you could also write i^(4*k/N) for k=1,2,3,...,N which is what I'm doing here.

You can change XH:H to :G

Aaah I forgot about G thank you very much!

PICO-8, 131 bytes
I wasn't really sure if I'd be breaking any rules, but I did it anyway!
Golfed
p={}for i=0,19 do add(p,{64+64*cos(i/20),64+64*sin(i/20)})end for x in all(p)do for y in all(p)do line(x[1],x[2],y[1],y[2])end end

Ungolfed
points={}

for i=0,19 do
  x=64+64*cos(i/20)
  y=64+64*sin(i/20)
  add(points,{x,y})
end

for x in all(points) do
  for y in all(points) do
    line(x[1],x[2],y[1],y[2])
  end
end

PICO-8 is a Lua based fantasy console with a native resolution of 128x128. I made the circle as big as I could...

Mathematica, 42 bytes
Creates a set of 37 points arranged in a circle, and then draws lines between all possible subsets of two points. Someone posted a shorter answer that takes advantage of CompleteGraph, but I believe this is the shortest one aside from those relying on CompleteGraph.
Graphics@Line@Subsets[CirclePoints@37,{2}]

There's no need to avoid drawing lines from a point to itself, so you could save 3 bytes by using Tuple. You also need to update this to accept arbitrary n, but conveniently that won't cost you any bytes.

Meant to say Tuples

HTML + JS (ES6), 34 + 177 164 162 = 196 bytes
Using the HTML5 Canvas API.
See it on CodePen.

f=n=>{with(Math)with(c.getContext`2d`)for(translate(S=300,S),O=n;O--;)for(rotate(a=PI*2/n),N=n;N--;)beginPath(stroke()),lineTo(0,S),lineTo(sin(a*N)*S,cos(a*N)*S)}

/* Demo */
f(20)
<canvas id=c width=600 height=600>

-13 bytes: Removed closePath(), moved stroke() inside beginPath()
-2 bytes: Defined variable a inside rotate()

Java, 346 338 322 301 Bytes
This solution works for all n>1, even though the original post didn't require that, it does.
My favorite is n=5, don't ask why, also, if you want a cooler GUI, use:
int a=Math.min(this.getHeight(),this.getWidth())/2;
In place of the hard-coded 300, it'll use the width or height of the frame as the diameter.
Saved 8 bytes thanks to Shooqie.
Saved 21 bytes thanks to Geobits.
import java.awt.*;void m(final int n){new Frame(){public void paint(Graphics g){Point[]p=new Point[n];int a=300;for(int i=1;i<n+1;i++){p[i-1]=new Point(a+(int)(a*Math.cos(i*2*Math.PI/n)),a+(int)(a*Math.sin(i*2*Math.PI/n)));for(int j=0;j<i;j++){g.drawLine(p[i-1].x,p[i-1].y,p[j].x,p[j].y);}}}}.show();}

Output for n=37:

You can drop Frame x= and final (I think?)

@shooqie oops, Frame x was from another solution that involved a thread. You need the final though as it's an internal class reference to an external variable in the owning class.

It works just fine on my machine. BTW I think you can shave off some bytes by moving int declarations outside the for loops

@shooqie in Java 6 it's saying "Cannot refer to the non-final local variable n in an enclosing scope" at compile time.

It worked for me on Java 8, but after you edited your post I'm only getting white screen.

@shooqie fixed, made a dumb mistake.

All right, it still works for me without the final keyword, IDE only gives me a warning that show() is deprecated.

I'm having a problem getting this to work. When run as-is, it just gives me a tiny window, too small to actually show anything (or even the border-buttons like close/maximize).

When I expand the window, it show this: http://imgur.com/a/cl9oW Any ideas?

@Geobits yeah, I made a change that didn't pan out haha. Fixed.

You can also drop the Panel entirely and rearrange some stuff to save quite a bit: import java.awt.*;void g(int n){new Frame(){public void paint(Graphics g){Point[]p=new Point[n];double f;for(int a=300,i=1,j;i<=n;i++){p[i-1]=new Point(a+(int)(a*Math.cos(f=i*2*Math.PI/n)),a+(int)(a*Math.sin(f)));for(j=0;j<i;)g.drawLine(p[i-1].x,p[i-1].y,p[j].x,p[j++].y);}}}.show();}

(for Java 6 add that final back in I guess)

@geobits there's some other stuff in there that's not Java 6 friendly. If you want to use my answer and make a Java 8 answer that beats this, feel free :).

Huh, really? I think all I did (beside final) was drop the panel and rearrange variables. It works on my Java 6 as long as I add the final back in.

Please also post the ungolfed code so we can actually read it...

Python 2, 258 235 229 Bytes
import itertools as T,math as M
from PIL import Image as I,ImageDraw as D
s=300
n=input()
t=2*M.pi/n
o=I.new('RGB',(s*2,)*2)
for x in T.combinations([(s*M.cos(t*i)+s,s*M.sin(t*i)+s)for i in range(n)],2):D.Draw(o).line(x)
o.show()

Output for n=37

Wouldn't be from PIL import* shorter?

@RomanGräf PIL is a weird package, you can't import *, depending on how you install, you could skip the PIL and import Image/ImageDraw directly

Octave, 88 69 bytes
N=input('');t=0:2*pi/N:N;k=nchoosek(1:N,2)';line(cos(t)(k),sin(t)(k))

Output for N=37:

Output for N=19:

Oh, I didn't even notice that there was already another Octave answer:)

Anyway, beat ya :-)

By a mile! My first thought was gplot too, but I didn't manage to make it short enough...

Perl, 229 bytes
It uses the same formula as most languages that don't have convenient builtin for this challenge (even if I didn't look at them to find it, but that's a fairly easy to find formula). So not very interesting, but there are usually not a lot of Perl answers to this kind of challenges, so I just wanted to propose one.
$i=new Imager xsize=>700,ysize=>700;for$x(1..$_){for$y(1..$_){$i->line(color=>red,x1=>350+300*cos($a=2*pi*$x/$_),x2=>350+300*cos($b=2*pi*$y/$_),y1=>350+300*sin$a,y2=>350+300*sin$b)}}$i->write(file=>"t.png")

And you'll need -MImager (9 bytes), -MMath::Trig (providing pi, 13 bytes), and -n (1 byte)  ==> + 23 bytes.
To run it :
perl -MImager -MMath::Trig -ne '$i=new Imager xsize=>700,ysize=>700;for$x(1..$_){for$y(1..$_){$i->line(color=>red,x1=>350+300*cos($a=2*pi*$x/$_),x2=>350+300*cos($b=2*pi*$y/$_),y1=>350+300*sin$a,y2=>350+300*sin$b)}}$i->write(file=>"t.png")' <<< 27

It will create a file named t.png which contains the image.
You'll need to install Imager though, but no worries, it's quite easy :
(echo y;echo) | perl -MCPAN -e 'install Imager'

(The echos will configure you cpan if you've never used it before. (actually that will only work if your perl is recent enough, I think for most of you it will be, and I'm sorry for the others!)).
And the more readable version (yes, it's fairly readable for a Perl script!) :
#!/usr/bin/perl -n
use Imager;
use Math::Trig;
$i=Imager->new(xsize=>700,ysize=>700);
for $x (1..$_){
    for $y (1..$_){
    $i->line(color=>red,x1=>350+300*cos($a=2*pi*$x/$_), x2=>350+300*cos($b=2*pi*$y/$_),
         y1=>350+300*sin($a), y2=>350+300*sin($b));
    }
}
$i->write(file=>"t.png");

 -1 byte thanks to Titus.

Does Perl require braces around single commands?

@Titus If you refer to the braces after the for loops, then yes, they are mandatory.

There´s a blank before y2. I bet you don´t need that. And can you write to STDOUT?

@Titus hmm indeed, thanks. I think I my terminal put a newline here so i didn't saw the space.

GeoGebra, 92 bytes
a=polygon((0,0),(1,0),20)
sequence(sequence(segment(vertex(a,i),vertex(a,j)),j,1,20),i,1,20)

Each line is separately entered into the input bar. Here is a gif showing the execution:

How it works
The polygon command creates a 20-sided polygon, with the vertices of the baseline at (0,0) and (1,0). The next command then iterates over each vertex of the polygon with index i, using the sequence and vertex commands, and for each vertex with index i, draws a line segment to every other vertex with index j using the segment command.

PHP, 186 184 196 bytes
imagecolorallocate($i=imagecreate(601,601),~0,~0,~0);for(;$a<$p=2*M_PI;)for($b=$a+=$p/=$argv[1];$b>0;)imageline($i,(1+cos($a))*$r=300,$r+$r*sin($a),$r+$r*cos($b-=$p),$r+$r*sin($b),1);imagepng($i);

writes the image to STDOUT
breakdown
// create image with white background
imagecolorallocate($i=imagecreate(601,601),~0,~0,~0);

// loop angle A from 0 to 2*PI
for(;$a<$p=2*M_PI;)
    // loop angle B from A down to 0
    for($b=$a+=$p/=$argv[1];$b;)    // ($a pre-increment)
        // draw black line from A to B
        imageline($i,                           // draw line
            (1+cos($a))*$r=300,$r+$r*sin($a),   // from A
            $r+$r*cos($b-=$p),$r+$r*sin($b),    // to B ($b pre-decrement)
            1                                   // undefined color=black
        );
// output
imagepng($i);

-12 bytes for fixed n=20
Replace $p=2*M_PI with 6 (-8), /=$argv[1] with =M_PI/10 (-2), and $b>0 with $b (-2)
Using exact PI/10 doesn´t hurt. With .3142, the rounding errors from the parametrized version remained, but with M_PI/10 they vanished and I can check $b(<>0) instead of $b>0. I could have saved two bytes with .314, but that would have off-set the points.
The limit $a<6 is sufficiently exact for 20 points.

174 bytes for fixed n=314
imagecolorallocate($i=imagecreate(601,601),~0,~0,~0);for(;$a<314;)for($b=$a++;$b--;)imageline($i,(1+cos($a))*$r=300,$r+$r*sin($a),$r+$r*cos($b),$r+$r*sin($b),1);imagepng($i);

Using 314 points results in a filled circle in that resolution (as do 136,140, every even number above that, and everything above 317).

Good answer, but it seems you've hardcoded 20 instead of taking that as input?

@Riking: True. But I can see no demand in the challenge for parametrizing it.

R, 127 123 bytes
plot((e=cbind(sin(t<-seq(0,2*pi,l=(n=21)))*2,cos(t)*2)));for(i in 2:n)for(j in 1:i)lines(c(e[i,1],e[j,1]),c(e[i,2],e[j,2]))

Produces :

Nice axis' labels uh ?
-4 bytes thanks to @Titus !

Not shorter, but it could be faster with for(i in 2:n){for(j in 1:i)...}. Does Rrequire the braces?

@Titus You're right ! And no, no braces needed there. Thanks !

NetLogo - 44 bytes
cro 20[create-links-to other turtles fd 20]

Octave, 50 48 46 45 bytes
@(N)gplot((k=0:2*pi/N:N)+k',[cos(k);sin(k)]')

This is an anyonmous function that plots the graph we're looking for.
Explanation:
(k=0:2*pi/N:N)+k' Makes a full N+1 x N+1 adjecency matrix and simultaneously defines the vector k of angles, which we we use then for [cos(k);sin(k)]', a matrix of coordinates where each graph node is positioned. gplot just plots the graph that we want.
For N = 29 we get:

BBC BASIC, 98 ascii characters
Tokenised filesize 86 bytes
r=600V.5142;29,r;r;:I.n:t=2*PI/n:F.i=1TOn*n:a=i DIVn*t:b=i MODn*t:L.r*SINa,r*COSa,r*SINb,r*COSb:N.

Dowload interpreter at http://www.bbcbasic.co.uk/bbcwin/bbcwin.html
There's nothing wrong with drawing every line twice, the appearance is identical :-P
Ungolfed
  r=600                              :REM Radius 600 units. 2 units per pixel, so 300 pixels
  VDU5142;29,r;r;                    :REM Set mode 20 (600 pixels high) and move origin away from screen corner
  INPUTn                             :REM Take input.
  t=2*PI/n                           :REM Step size in radians.
  FORi=1TOn*n                        :REM Iterate through all combinations.
    a=i DIVn*t                       :REM Get two angles a and b
    b=i MODn*t                       :REM by integer division and modlo
    LINEr*SINa,r*COSa,r*SINb,r*COSb  :REM calculate cartesian coordinates and draw line
  NEXT

Output n=21
This looks much better in the original rendering than in the browser.

Thanks for reminding me of the LINE function. Beats DRAW...

MATLAB, 36 bytes
@(n)plot(graph(ones(n),'Om'),'La','c')

This is an anoymous function that creates the plot.
@(n)                                     Define an anonymous fuction of
               ones(n)                   Create an × matrix of ones
         graph(       ,'Om')             Create a graph object with that adjacency
                                         matrix, omitting self-loops
    plot(                   ,'La','c')   Plot the graph with a circular layout

Example:

I'm surprised graph is not part of the bioinformatic toolbox...  didn't even know it existed... Nice :)

JavaScript (ES5)/SVG (HTML5), 181 bytes

document.write('<svg viewBox=-1e3,-1e3,2e3,2e3><path stroke=#000 fill=none d=M1e3,0')
with(Math)for(i=37;--i;)for(j=37;j--;)document.write('L'+1e3*cos(a=i*j*PI*2/37)+','+1e3*sin(a))

Only works for prime numbers, such as the original suggestion of 37. You can halve (rounded up) the initial value of i to obtain a fainter image. You can also consistently adjust the 1e3,2e3 to other values to taste (I started with 300,600 but decided that it was too coarse).

QBasic 4.5, 398 271 bytes
CLS:SCREEN 11:DEFSTR M-Z:DEFDBL A-L
INPUT"N",A:I=(360/A)*.0175:J=230
Q=",":FOR E=0 TO A
FOR F=E TO A
M=x$(COS(I*E)*J+J):N=x$(SIN(I*E)*J+J):O=x$(COS(I*F)*J+J):P=x$(SIN(I*F)*J+J):DRAW "BM"+M+Q+N+"M"+O+Q+P
NEXT:NEXT
FUNCTION x$(d):x$=LTRIM$(STR$(CINT(d))):END FUNCTION

The screen in QBasic can onl be 640x480, so the circle has a radius of only 230 px, unfortunately. Also, there's some artifacting because of float-to-int precision loss. Looks like this for N=36:

EDIT: I didn't need the storage, the type declaration and all the looping. Calculating all Carthesians from Polars in place is 50% cheaper in byte count...

QBIC, 98 94 bytes
$SCREEN 11|:i=6.3/a j=230[0,a|[b,a|line(cos(b*i)*j+j,sin(b*i)*j+j)-(cos(c*i)*j+j,sin(c*o)*j+j)

I've converted my original QBasic answer @LevelRiverSt 's answer to QBIC. I thought this would rely too heavily on functions that are not built into QBIC to be feasible, but as it turns out, it saves another 90 bytes. Substituting the
DRAW for LINE saves another 80 bytes. I knew I was forgetting something simple...
When run with a command line parameter of 36, it looks like this:

Processing, 274 bytes (239 + size call and function call)
void d(int s){float a=2*PI/s,x=0,y=-400,m,n;float[][]p=new float[2][s];translate(400,400);for(int i=0;i<s;i++){m=x*cos(a)-y*sin(a);n=x*sin(a)+y*cos(a);x=m;y=n;p[0][i]=x;p[1][i]=y;for(int j=0;j<i;j++)line(p[0][j],p[1][j],p[0][i],p[1][i]);}}
void setup(){size(800,800);d(50);}

I honestly don't know why, but setup had to be on the second line. I used https://en.wikipedia.org/wiki/Rotation_matrix to help me calculate the maths for rotation. This program calculates the points and pushes them to an array, with which we are using to draw lines.
Here is a picture of a polygon with 50 edges (the 100 edges one was almost completely black)

You can add stroke(0,alpha); to have transparent edges, where alpha is the opacity of the line. Here's the same polygon with alpha of 20.

Bash + Jelly + GraphViz, 52 characters, 52 or 63 bytes
Given that the programs in question disagree on which character encoding to use, the program is full of control characters. Here's what it looks like under xxd, in Latin-1 encoding (which represents each character in one byte):
00000000: 6a65 6c6c 7920 6520 2793 5213 636a 0c8e  jelly e '.R.cj..
00000010: 2d2d 59fe 9a3f 1d15 dc65 34d3 8442 7f05  --Y..?...e4..B..
00000020: 1172 80cf fb3b ff7d 277c 6369 7263 6f20  .r...;.}'|circo
00000030: 2d54 7073                                -Tps

I couldn't actually get the program to run, though, without converting the input into UTF-8 for some reason (which would make it 63 bytes long). Logically it should work as Latin-1 – none of the characters are outside the range 0 to 255 – but I keep getting "string index out of range" errors no matter how I configure the character encoding environment variables. So this will have to be counted as 63 bytes unless someone can figure out a way to run it without re-encoding it.
The program might be slightly more readable if we interpret it in Jelly's encoding:
jelly e 'ƓRŒcj€⁾--Y“Ȥ?øßṇe4ạ⁴B¶¦×r°Ẇ»;”}'|circo -Tps

The program takes the number of points on standard input and outputs a PostScript image on standard output. (It can trivially be adapted to output in any format GraphViz supports by changing the -Tps at the end; it's just that PostScript has the shortest name. Arguably, you can save five characters by removing the -Tps, but then you get output in GraphViz's internal image format that nothing else supports, which probably doesn't count for the purposes of the question.)
Fundamentally, this is just a Jelly program that calls into GraphViz to do the drawing; however, Jelly doesn't seem to have any capabilities for running external programs, so I had to use bash to link them together. (This also means that it's cheaper to make Jelly request input from stdin manually; normally it takes input from the command line, but that would mean extra bytes in the bash wrapper.) circo will automatically arrange all the points it's asked to draw in a circle, so the Jelly code just has to ask it to draw a list of points, all of which are connected to each other. Here's how it works:
ƓRŒcj€⁾--Y“Ȥ?øßṇe4ạ⁴B¶¦×r°Ẇ»;”}
Ɠ                               read number from stdin
 R                              produce range from 1 to that number
                                (here used to produce a list with
                                that many distinct elements)
  Œc                            select all unordered pairs from that
      ⁾--                       a string consisting of two hyphens
    j€                          join each pair via the string
         Y                      join on newlines
                            ;   prepend (in this context)
          “Ȥ?øßṇe4ạ⁴B¶¦×r°Ẇ»    "graph{node[shape=point]"
                             ”} follow output with a "}" character

The use of Jelly lets us slightly compress the string that configures the GraphViz output via its built-in dictionary. The dictionary has graph, node, and point. Annoyingly, it doesn't have shape (it has SHAPE, but GraphViz is case-sensitive), so we have to encode that character-by-character.
Here's the output for input 21 (with a slight modification to the program to make it output in a format that can be uploaded to Stack Exchange):

PHP + HTML SVG, 316 263 bytes
Golfed version with hardcoded n points and no input n parameter:
<svg height="610" width="610"><?for($i=1;$i<33;$i++){$x[]=300*sin(2*M_PI/32*$i)+305;$y[]=300*cos(2*M_PI/32)+305;}foreach($x as$j=>$w){foreach($y as$k=>$z){echo'<line x1="'.$x[$j].'" y1="'.$y[$j].'" x2="'.$x[$k].'" y2="'.$y[$k].'" style="stroke:red;"/>';}}?></svg>

Previous golfed version with input parameter for n points, 316 bytes:
<svg height="610" width="610"><?$n=$_GET[n];$d=2*M_PI/$n;$r=300;$o=305;for($i=1;$i<=$n;$i++){$x[]=$r*sin($d*$i)+$o;$y[]=$r*cos($d*$i)+$o;}foreach($x as$j=>$w){foreach($y as$k=>$z){echo'<line x1="'.$x[$j].'" y1="'.$y[$j].'" x2="'.$x[$k].'" y2="'.$y[$k].'" style="stroke:rgba(0,0,0,.15);stroke-width:1;" />';}}?></svg>

Usage: save in a file and call from the browser:
http://localhost/codegolf/circle.php?n=32

Ungolfed version with input parameter for n points and CSS:
<style>
line {
    stroke: rgba(0,0,0,.15);
    stroke-width:1;
}
</style>
<svg height="610" width="610">
<?php
$n=$_GET[n]; // number of points
$d=2*M_PI/$n; // circle parts
$r=300; // circle radius
$o=305; // offset x,y
for ($i=1;$i<=$n;$i++){
    $x[]=$r*sin($d*$i)+$o; // store x,y coordinates in array
    $y[]=$r*cos($d*$i)+$o;
}
foreach($x as $j => $w){ // iterate all x,y points and connect to each other
    foreach($y as $k => $z) {
        echo '<line x1="'.$x[$j].'" y1="'.$y[$j].'" x2="'.$x[$k].'" y2="'.$y[$k].'" />'."\n";
    }
}
?>
</svg>

Couldn't attach a 32 points fully functional snippet because of the 30k characters limit for a single post. Here is a screenshot:

The attached snippet is limited to 18 points because of the 30k single post limit.

line {
stroke: rgba(0,0,0,.15);
stroke-width:1;
}
<svg height="610" width="610">
<line x1="407.6060429977" y1="586.90778623577" x2="407.6060429977" y2="586.90778623577" />
<line x1="407.6060429977" y1="586.90778623577" x2="497.83628290596" y2="534.81333293569" />
<line x1="407.6060429977" y1="586.90778623577" x2="564.80762113533" y2="455" />
<line x1="407.6060429977" y1="586.90778623577" x2="600.44232590366" y2="357.09445330008" />
<line x1="407.6060429977" y1="586.90778623577" x2="600.44232590366" y2="252.90554669992" />
<line x1="407.6060429977" y1="586.90778623577" x2="564.80762113533" y2="155" />
<line x1="407.6060429977" y1="586.90778623577" x2="497.83628290596" y2="75.186667064307" />
<line x1="407.6060429977" y1="586.90778623577" x2="407.6060429977" y2="23.092213764227" />
<line x1="407.6060429977" y1="586.90778623577" x2="305" y2="5" />
<line x1="407.6060429977" y1="586.90778623577" x2="202.3939570023" y2="23.092213764227" />
<line x1="407.6060429977" y1="586.90778623577" x2="112.16371709404" y2="75.186667064307" />
<line x1="407.6060429977" y1="586.90778623577" x2="45.192378864669" y2="155" />
<line x1="407.6060429977" y1="586.90778623577" x2="9.5576740963376" y2="252.90554669992" />
<line x1="407.6060429977" y1="586.90778623577" x2="9.5576740963376" y2="357.09445330008" />
<line x1="407.6060429977" y1="586.90778623577" x2="45.192378864668" y2="455" />
<line x1="407.6060429977" y1="586.90778623577" x2="112.16371709404" y2="534.81333293569" />
<line x1="407.6060429977" y1="586.90778623577" x2="202.3939570023" y2="586.90778623577" />
<line x1="407.6060429977" y1="586.90778623577" x2="305" y2="605" />
<line x1="497.83628290596" y1="534.81333293569" x2="407.6060429977" y2="586.90778623577" />
<line x1="497.83628290596" y1="534.81333293569" x2="497.83628290596" y2="534.81333293569" />
<line x1="497.83628290596" y1="534.81333293569" x2="564.80762113533" y2="455" />
<line x1="497.83628290596" y1="534.81333293569" x2="600.44232590366" y2="357.09445330008" />
<line x1="497.83628290596" y1="534.81333293569" x2="600.44232590366" y2="252.90554669992" />
<line x1="497.83628290596" y1="534.81333293569" x2="564.80762113533" y2="155" />
<line x1="497.83628290596" y1="534.81333293569" x2="497.83628290596" y2="75.186667064307" />
<line x1="497.83628290596" y1="534.81333293569" x2="407.6060429977" y2="23.092213764227" />
<line x1="497.83628290596" y1="534.81333293569" x2="305" y2="5" />
<line x1="497.83628290596" y1="534.81333293569" x2="202.3939570023" y2="23.092213764227" />
<line x1="497.83628290596" y1="534.81333293569" x2="112.16371709404" y2="75.186667064307" />
<line x1="497.83628290596" y1="534.81333293569" x2="45.192378864669" y2="155" />
<line x1="497.83628290596" y1="534.81333293569" x2="9.5576740963376" y2="252.90554669992" />
<line x1="497.83628290596" y1="534.81333293569" x2="9.5576740963376" y2="357.09445330008" />
<line x1="497.83628290596" y1="534.81333293569" x2="45.192378864668" y2="455" />
<line x1="497.83628290596" y1="534.81333293569" x2="112.16371709404" y2="534.81333293569" />
<line x1="497.83628290596" y1="534.81333293569" x2="202.3939570023" y2="586.90778623577" />
<line x1="497.83628290596" y1="534.81333293569" x2="305" y2="605" />
<line x1="564.80762113533" y1="455" x2="407.6060429977" y2="586.90778623577" />
<line x1="564.80762113533" y1="455" x2="497.83628290596" y2="534.81333293569" />
<line x1="564.80762113533" y1="455" x2="564.80762113533" y2="455" />
<line x1="564.80762113533" y1="455" x2="600.44232590366" y2="357.09445330008" />
<line x1="564.80762113533" y1="455" x2="600.44232590366" y2="252.90554669992" />
<line x1="564.80762113533" y1="455" x2="564.80762113533" y2="155" />
<line x1="564.80762113533" y1="455" x2="497.83628290596" y2="75.186667064307" />
<line x1="564.80762113533" y1="455" x2="407.6060429977" y2="23.092213764227" />
<line x1="564.80762113533" y1="455" x2="305" y2="5" />
<line x1="564.80762113533" y1="455" x2="202.3939570023" y2="23.092213764227" />
<line x1="564.80762113533" y1="455" x2="112.16371709404" y2="75.186667064307" />
<line x1="564.80762113533" y1="455" x2="45.192378864669" y2="155" />
<line x1="564.80762113533" y1="455" x2="9.5576740963376" y2="252.90554669992" />
<line x1="564.80762113533" y1="455" x2="9.5576740963376" y2="357.09445330008" />
<line x1="564.80762113533" y1="455" x2="45.192378864668" y2="455" />
<line x1="564.80762113533" y1="455" x2="112.16371709404" y2="534.81333293569" />
<line x1="564.80762113533" y1="455" x2="202.3939570023" y2="586.90778623577" />
<line x1="564.80762113533" y1="455" x2="305" y2="605" />
<line x1="600.44232590366" y1="357.09445330008" x2="407.6060429977" y2="586.90778623577" />
<line x1="600.44232590366" y1="357.09445330008" x2="497.83628290596" y2="534.81333293569" />
<line x1="600.44232590366" y1="357.09445330008" x2="564.80762113533" y2="455" />
<line x1="600.44232590366" y1="357.09445330008" x2="600.44232590366" y2="357.09445330008" />
<line x1="600.44232590366" y1="357.09445330008" x2="600.44232590366" y2="252.90554669992" />
<line x1="600.44232590366" y1="357.09445330008" x2="564.80762113533" y2="155" />
<line x1="600.44232590366" y1="357.09445330008" x2="497.83628290596" y2="75.186667064307" />
<line x1="600.44232590366" y1="357.09445330008" x2="407.6060429977" y2="23.092213764227" />
<line x1="600.44232590366" y1="357.09445330008" x2="305" y2="5" />
<line x1="600.44232590366" y1="357.09445330008" x2="202.3939570023" y2="23.092213764227" />
<line x1="600.44232590366" y1="357.09445330008" x2="112.16371709404" y2="75.186667064307" />
<line x1="600.44232590366" y1="357.09445330008" x2="45.192378864669" y2="155" />
<line x1="600.44232590366" y1="357.09445330008" x2="9.5576740963376" y2="252.90554669992" />
<line x1="600.44232590366" y1="357.09445330008" x2="9.5576740963376" y2="357.09445330008" />
<line x1="600.44232590366" y1="357.09445330008" x2="45.192378864668" y2="455" />
<line x1="600.44232590366" y1="357.09445330008" x2="112.16371709404" y2="534.81333293569" />
<line x1="600.44232590366" y1="357.09445330008" x2="202.3939570023" y2="586.90778623577" />
<line x1="600.44232590366" y1="357.09445330008" x2="305" y2="605" />
<line x1="600.44232590366" y1="252.90554669992" x2="407.6060429977" y2="586.90778623577" />
<line x1="600.44232590366" y1="252.90554669992" x2="497.83628290596" y2="534.81333293569" />
<line x1="600.44232590366" y1="252.90554669992" x2="564.80762113533" y2="455" />
<line x1="600.44232590366" y1="252.90554669992" x2="600.44232590366" y2="357.09445330008" />
<line x1="600.44232590366" y1="252.90554669992" x2="600.44232590366" y2="252.90554669992" />
<line x1="600.44232590366" y1="252.90554669992" x2="564.80762113533" y2="155" />
<line x1="600.44232590366" y1="252.90554669992" x2="497.83628290596" y2="75.186667064307" />
<line x1="600.44232590366" y1="252.90554669992" x2="407.6060429977" y2="23.092213764227" />
<line x1="600.44232590366" y1="252.90554669992" x2="305" y2="5" />
<line x1="600.44232590366" y1="252.90554669992" x2="202.3939570023" y2="23.092213764227" />
<line x1="600.44232590366" y1="252.90554669992" x2="112.16371709404" y2="75.186667064307" />
<line x1="600.44232590366" y1="252.90554669992" x2="45.192378864669" y2="155" />
<line x1="600.44232590366" y1="252.90554669992" x2="9.5576740963376" y2="252.90554669992" />
<line x1="600.44232590366" y1="252.90554669992" x2="9.5576740963376" y2="357.09445330008" />
<line x1="600.44232590366" y1="252.90554669992" x2="45.192378864668" y2="455" />
<line x1="600.44232590366" y1="252.90554669992" x2="112.16371709404" y2="534.81333293569" />
<line x1="600.44232590366" y1="252.90554669992" x2="202.3939570023" y2="586.90778623577" />
<line x1="600.44232590366" y1="252.90554669992" x2="305" y2="605" />
<line x1="564.80762113533" y1="155" x2="407.6060429977" y2="586.90778623577" />
<line x1="564.80762113533" y1="155" x2="497.83628290596" y2="534.81333293569" />
<line x1="564.80762113533" y1="155" x2="564.80762113533" y2="455" />
<line x1="564.80762113533" y1="155" x2="600.44232590366" y2="357.09445330008" />
<line x1="564.80762113533" y1="155" x2="600.44232590366" y2="252.90554669992" />
<line x1="564.80762113533" y1="155" x2="564.80762113533" y2="155" />
<line x1="564.80762113533" y1="155" x2="497.83628290596" y2="75.186667064307" />
<line x1="564.80762113533" y1="155" x2="407.6060429977" y2="23.092213764227" />
<line x1="564.80762113533" y1="155" x2="305" y2="5" />
<line x1="564.80762113533" y1="155" x2="202.3939570023" y2="23.092213764227" />
<line x1="564.80762113533" y1="155" x2="112.16371709404" y2="75.186667064307" />
<line x1="564.80762113533" y1="155" x2="45.192378864669" y2="155" />
<line x1="564.80762113533" y1="155" x2="9.5576740963376" y2="252.90554669992" />
<line x1="564.80762113533" y1="155" x2="9.5576740963376" y2="357.09445330008" />
<line x1="564.80762113533" y1="155" x2="45.192378864668" y2="455" />
<line x1="564.80762113533" y1="155" x2="112.16371709404" y2="534.81333293569" />
<line x1="564.80762113533" y1="155" x2="202.3939570023" y2="586.90778623577" />
<line x1="564.80762113533" y1="155" x2="305" y2="605" />
<line x1="497.83628290596" y1="75.186667064307" x2="407.6060429977" y2="586.90778623577" />
<line x1="497.83628290596" y1="75.186667064307" x2="497.83628290596" y2="534.81333293569" />
<line x1="497.83628290596" y1="75.186667064307" x2="564.80762113533" y2="455" />
<line x1="497.83628290596" y1="75.186667064307" x2="600.44232590366" y2="357.09445330008" />
<line x1="497.83628290596" y1="75.186667064307" x2="600.44232590366" y2="252.90554669992" />
<line x1="497.83628290596" y1="75.186667064307" x2="564.80762113533" y2="155" />
<line x1="497.83628290596" y1="75.186667064307" x2="497.83628290596" y2="75.186667064307" />
<line x1="497.83628290596" y1="75.186667064307" x2="407.6060429977" y2="23.092213764227" />
<line x1="497.83628290596" y1="75.186667064307" x2="305" y2="5" />
<line x1="497.83628290596" y1="75.186667064307" x2="202.3939570023" y2="23.092213764227" />
<line x1="497.83628290596" y1="75.186667064307" x2="112.16371709404" y2="75.186667064307" />
<line x1="497.83628290596" y1="75.186667064307" x2="45.192378864669" y2="155" />
<line x1="497.83628290596" y1="75.186667064307" x2="9.5576740963376" y2="252.90554669992" />
<line x1="497.83628290596" y1="75.186667064307" x2="9.5576740963376" y2="357.09445330008" />
<line x1="497.83628290596" y1="75.186667064307" x2="45.192378864668" y2="455" />
<line x1="497.83628290596" y1="75.186667064307" x2="112.16371709404" y2="534.81333293569" />
<line x1="497.83628290596" y1="75.186667064307" x2="202.3939570023" y2="586.90778623577" />
<line x1="497.83628290596" y1="75.186667064307" x2="305" y2="605" />
<line x1="407.6060429977" y1="23.092213764227" x2="407.6060429977" y2="586.90778623577" />
<line x1="407.6060429977" y1="23.092213764227" x2="497.83628290596" y2="534.81333293569" />
<line x1="407.6060429977" y1="23.092213764227" x2="564.80762113533" y2="455" />
<line x1="407.6060429977" y1="23.092213764227" x2="600.44232590366" y2="357.09445330008" />
<line x1="407.6060429977" y1="23.092213764227" x2="600.44232590366" y2="252.90554669992" />
<line x1="407.6060429977" y1="23.092213764227" x2="564.80762113533" y2="155" />
<line x1="407.6060429977" y1="23.092213764227" x2="497.83628290596" y2="75.186667064307" />
<line x1="407.6060429977" y1="23.092213764227" x2="407.6060429977" y2="23.092213764227" />
<line x1="407.6060429977" y1="23.092213764227" x2="305" y2="5" />
<line x1="407.6060429977" y1="23.092213764227" x2="202.3939570023" y2="23.092213764227" />
<line x1="407.6060429977" y1="23.092213764227" x2="112.16371709404" y2="75.186667064307" />
<line x1="407.6060429977" y1="23.092213764227" x2="45.192378864669" y2="155" />
<line x1="407.6060429977" y1="23.092213764227" x2="9.5576740963376" y2="252.90554669992" />
<line x1="407.6060429977" y1="23.092213764227" x2="9.5576740963376" y2="357.09445330008" />
<line x1="407.6060429977" y1="23.092213764227" x2="45.192378864668" y2="455" />
<line x1="407.6060429977" y1="23.092213764227" x2="112.16371709404" y2="534.81333293569" />
<line x1="407.6060429977" y1="23.092213764227" x2="202.3939570023" y2="586.90778623577" />
<line x1="407.6060429977" y1="23.092213764227" x2="305" y2="605" />
<line x1="305" y1="5" x2="407.6060429977" y2="586.90778623577" />
<line x1="305" y1="5" x2="497.83628290596" y2="534.81333293569" />
<line x1="305" y1="5" x2="564.80762113533" y2="455" />
<line x1="305" y1="5" x2="600.44232590366" y2="357.09445330008" />
<line x1="305" y1="5" x2="600.44232590366" y2="252.90554669992" />
<line x1="305" y1="5" x2="564.80762113533" y2="155" />
<line x1="305" y1="5" x2="497.83628290596" y2="75.186667064307" />
<line x1="305" y1="5" x2="407.6060429977" y2="23.092213764227" />
<line x1="305" y1="5" x2="305" y2="5" />
<line x1="305" y1="5" x2="202.3939570023" y2="23.092213764227" />
<line x1="305" y1="5" x2="112.16371709404" y2="75.186667064307" />
<line x1="305" y1="5" x2="45.192378864669" y2="155" />
<line x1="305" y1="5" x2="9.5576740963376" y2="252.90554669992" />
<line x1="305" y1="5" x2="9.5576740963376" y2="357.09445330008" />
<line x1="305" y1="5" x2="45.192378864668" y2="455" />
<line x1="305" y1="5" x2="112.16371709404" y2="534.81333293569" />
<line x1="305" y1="5" x2="202.3939570023" y2="586.90778623577" />
<line x1="305" y1="5" x2="305" y2="605" />
<line x1="202.3939570023" y1="23.092213764227" x2="407.6060429977" y2="586.90778623577" />
<line x1="202.3939570023" y1="23.092213764227" x2="497.83628290596" y2="534.81333293569" />
<line x1="202.3939570023" y1="23.092213764227" x2="564.80762113533" y2="455" />
<line x1="202.3939570023" y1="23.092213764227" x2="600.44232590366" y2="357.09445330008" />
<line x1="202.3939570023" y1="23.092213764227" x2="600.44232590366" y2="252.90554669992" />
<line x1="202.3939570023" y1="23.092213764227" x2="564.80762113533" y2="155" />
<line x1="202.3939570023" y1="23.092213764227" x2="497.83628290596" y2="75.186667064307" />
<line x1="202.3939570023" y1="23.092213764227" x2="407.6060429977" y2="23.092213764227" />
<line x1="202.3939570023" y1="23.092213764227" x2="305" y2="5" />
<line x1="202.3939570023" y1="23.092213764227" x2="202.3939570023" y2="23.092213764227" />
<line x1="202.3939570023" y1="23.092213764227" x2="112.16371709404" y2="75.186667064307" />
<line x1="202.3939570023" y1="23.092213764227" x2="45.192378864669" y2="155" />
<line x1="202.3939570023" y1="23.092213764227" x2="9.5576740963376" y2="252.90554669992" />
<line x1="202.3939570023" y1="23.092213764227" x2="9.5576740963376" y2="357.09445330008" />
<line x1="202.3939570023" y1="23.092213764227" x2="45.192378864668" y2="455" />
<line x1="202.3939570023" y1="23.092213764227" x2="112.16371709404" y2="534.81333293569" />
<line x1="202.3939570023" y1="23.092213764227" x2="202.3939570023" y2="586.90778623577" />
<line x1="202.3939570023" y1="23.092213764227" x2="305" y2="605" />
<line x1="112.16371709404" y1="75.186667064307" x2="407.6060429977" y2="586.90778623577" />
<line x1="112.16371709404" y1="75.186667064307" x2="497.83628290596" y2="534.81333293569" />
<line x1="112.16371709404" y1="75.186667064307" x2="564.80762113533" y2="455" />
<line x1="112.16371709404" y1="75.186667064307" x2="600.44232590366" y2="357.09445330008" />
<line x1="112.16371709404" y1="75.186667064307" x2="600.44232590366" y2="252.90554669992" />
<line x1="112.16371709404" y1="75.186667064307" x2="564.80762113533" y2="155" />
<line x1="112.16371709404" y1="75.186667064307" x2="497.83628290596" y2="75.186667064307" />
<line x1="112.16371709404" y1="75.186667064307" x2="407.6060429977" y2="23.092213764227" />
<line x1="112.16371709404" y1="75.186667064307" x2="305" y2="5" />
<line x1="112.16371709404" y1="75.186667064307" x2="202.3939570023" y2="23.092213764227" />
<line x1="112.16371709404" y1="75.186667064307" x2="112.16371709404" y2="75.186667064307" />
<line x1="112.16371709404" y1="75.186667064307" x2="45.192378864669" y2="155" />
<line x1="112.16371709404" y1="75.186667064307" x2="9.5576740963376" y2="252.90554669992" />
<line x1="112.16371709404" y1="75.186667064307" x2="9.5576740963376" y2="357.09445330008" />
<line x1="112.16371709404" y1="75.186667064307" x2="45.192378864668" y2="455" />
<line x1="112.16371709404" y1="75.186667064307" x2="112.16371709404" y2="534.81333293569" />
<line x1="112.16371709404" y1="75.186667064307" x2="202.3939570023" y2="586.90778623577" />
<line x1="112.16371709404" y1="75.186667064307" x2="305" y2="605" />
<line x1="45.192378864669" y1="155" x2="407.6060429977" y2="586.90778623577" />
<line x1="45.192378864669" y1="155" x2="497.83628290596" y2="534.81333293569" />
<line x1="45.192378864669" y1="155" x2="564.80762113533" y2="455" />
<line x1="45.192378864669" y1="155" x2="600.44232590366" y2="357.09445330008" />
<line x1="45.192378864669" y1="155" x2="600.44232590366" y2="252.90554669992" />
<line x1="45.192378864669" y1="155" x2="564.80762113533" y2="155" />
<line x1="45.192378864669" y1="155" x2="497.83628290596" y2="75.186667064307" />
<line x1="45.192378864669" y1="155" x2="407.6060429977" y2="23.092213764227" />
<line x1="45.192378864669" y1="155" x2="305" y2="5" />
<line x1="45.192378864669" y1="155" x2="202.3939570023" y2="23.092213764227" />
<line x1="45.192378864669" y1="155" x2="112.16371709404" y2="75.186667064307" />
<line x1="45.192378864669" y1="155" x2="45.192378864669" y2="155" />
<line x1="45.192378864669" y1="155" x2="9.5576740963376" y2="252.90554669992" />
<line x1="45.192378864669" y1="155" x2="9.5576740963376" y2="357.09445330008" />
<line x1="45.192378864669" y1="155" x2="45.192378864668" y2="455" />
<line x1="45.192378864669" y1="155" x2="112.16371709404" y2="534.81333293569" />
<line x1="45.192378864669" y1="155" x2="202.3939570023" y2="586.90778623577" />
<line x1="45.192378864669" y1="155" x2="305" y2="605" />
<line x1="9.5576740963376" y1="252.90554669992" x2="407.6060429977" y2="586.90778623577" />
<line x1="9.5576740963376" y1="252.90554669992" x2="497.83628290596" y2="534.81333293569" />
<line x1="9.5576740963376" y1="252.90554669992" x2="564.80762113533" y2="455" />
<line x1="9.5576740963376" y1="252.90554669992" x2="600.44232590366" y2="357.09445330008" />
<line x1="9.5576740963376" y1="252.90554669992" x2="600.44232590366" y2="252.90554669992" />
<line x1="9.5576740963376" y1="252.90554669992" x2="564.80762113533" y2="155" />
<line x1="9.5576740963376" y1="252.90554669992" x2="497.83628290596" y2="75.186667064307" />
<line x1="9.5576740963376" y1="252.90554669992" x2="407.6060429977" y2="23.092213764227" />
<line x1="9.5576740963376" y1="252.90554669992" x2="305" y2="5" />
<line x1="9.5576740963376" y1="252.90554669992" x2="202.3939570023" y2="23.092213764227" />
<line x1="9.5576740963376" y1="252.90554669992" x2="112.16371709404" y2="75.186667064307" />
<line x1="9.5576740963376" y1="252.90554669992" x2="45.192378864669" y2="155" />
<line x1="9.5576740963376" y1="252.90554669992" x2="9.5576740963376" y2="252.90554669992" />
<line x1="9.5576740963376" y1="252.90554669992" x2="9.5576740963376" y2="357.09445330008" />
<line x1="9.5576740963376" y1="252.90554669992" x2="45.192378864668" y2="455" />
<line x1="9.5576740963376" y1="252.90554669992" x2="112.16371709404" y2="534.81333293569" />
<line x1="9.5576740963376" y1="252.90554669992" x2="202.3939570023" y2="586.90778623577" />
<line x1="9.5576740963376" y1="252.90554669992" x2="305" y2="605" />
<line x1="9.5576740963376" y1="357.09445330008" x2="407.6060429977" y2="586.90778623577" />
<line x1="9.5576740963376" y1="357.09445330008" x2="497.83628290596" y2="534.81333293569" />
<line x1="9.5576740963376" y1="357.09445330008" x2="564.80762113533" y2="455" />
<line x1="9.5576740963376" y1="357.09445330008" x2="600.44232590366" y2="357.09445330008" />
<line x1="9.5576740963376" y1="357.09445330008" x2="600.44232590366" y2="252.90554669992" />
<line x1="9.5576740963376" y1="357.09445330008" x2="564.80762113533" y2="155" />
<line x1="9.5576740963376" y1="357.09445330008" x2="497.83628290596" y2="75.186667064307" />
<line x1="9.5576740963376" y1="357.09445330008" x2="407.6060429977" y2="23.092213764227" />
<line x1="9.5576740963376" y1="357.09445330008" x2="305" y2="5" />
<line x1="9.5576740963376" y1="357.09445330008" x2="202.3939570023" y2="23.092213764227" />
<line x1="9.5576740963376" y1="357.09445330008" x2="112.16371709404" y2="75.186667064307" />
<line x1="9.5576740963376" y1="357.09445330008" x2="45.192378864669" y2="155" />
<line x1="9.5576740963376" y1="357.09445330008" x2="9.5576740963376" y2="252.90554669992" />
<line x1="9.5576740963376" y1="357.09445330008" x2="9.5576740963376" y2="357.09445330008" />
<line x1="9.5576740963376" y1="357.09445330008" x2="45.192378864668" y2="455" />
<line x1="9.5576740963376" y1="357.09445330008" x2="112.16371709404" y2="534.81333293569" />
<line x1="9.5576740963376" y1="357.09445330008" x2="202.3939570023" y2="586.90778623577" />
<line x1="9.5576740963376" y1="357.09445330008" x2="305" y2="605" />
<line x1="45.192378864668" y1="455" x2="407.6060429977" y2="586.90778623577" />
<line x1="45.192378864668" y1="455" x2="497.83628290596" y2="534.81333293569" />
<line x1="45.192378864668" y1="455" x2="564.80762113533" y2="455" />
<line x1="45.192378864668" y1="455" x2="600.44232590366" y2="357.09445330008" />
<line x1="45.192378864668" y1="455" x2="600.44232590366" y2="252.90554669992" />
<line x1="45.192378864668" y1="455" x2="564.80762113533" y2="155" />
<line x1="45.192378864668" y1="455" x2="497.83628290596" y2="75.186667064307" />
<line x1="45.192378864668" y1="455" x2="407.6060429977" y2="23.092213764227" />
<line x1="45.192378864668" y1="455" x2="305" y2="5" />
<line x1="45.192378864668" y1="455" x2="202.3939570023" y2="23.092213764227" />
<line x1="45.192378864668" y1="455" x2="112.16371709404" y2="75.186667064307" />
<line x1="45.192378864668" y1="455" x2="45.192378864669" y2="155" />
<line x1="45.192378864668" y1="455" x2="9.5576740963376" y2="252.90554669992" />
<line x1="45.192378864668" y1="455" x2="9.5576740963376" y2="357.09445330008" />
<line x1="45.192378864668" y1="455" x2="45.192378864668" y2="455" />
<line x1="45.192378864668" y1="455" x2="112.16371709404" y2="534.81333293569" />
<line x1="45.192378864668" y1="455" x2="202.3939570023" y2="586.90778623577" />
<line x1="45.192378864668" y1="455" x2="305" y2="605" />
<line x1="112.16371709404" y1="534.81333293569" x2="407.6060429977" y2="586.90778623577" />
<line x1="112.16371709404" y1="534.81333293569" x2="497.83628290596" y2="534.81333293569" />
<line x1="112.16371709404" y1="534.81333293569" x2="564.80762113533" y2="455" />
<line x1="112.16371709404" y1="534.81333293569" x2="600.44232590366" y2="357.09445330008" />
<line x1="112.16371709404" y1="534.81333293569" x2="600.44232590366" y2="252.90554669992" />
<line x1="112.16371709404" y1="534.81333293569" x2="564.80762113533" y2="155" />
<line x1="112.16371709404" y1="534.81333293569" x2="497.83628290596" y2="75.186667064307" />
<line x1="112.16371709404" y1="534.81333293569" x2="407.6060429977" y2="23.092213764227" />
<line x1="112.16371709404" y1="534.81333293569" x2="305" y2="5" />
<line x1="112.16371709404" y1="534.81333293569" x2="202.3939570023" y2="23.092213764227" />
<line x1="112.16371709404" y1="534.81333293569" x2="112.16371709404" y2="75.186667064307" />
<line x1="112.16371709404" y1="534.81333293569" x2="45.192378864669" y2="155" />
<line x1="112.16371709404" y1="534.81333293569" x2="9.5576740963376" y2="252.90554669992" />
<line x1="112.16371709404" y1="534.81333293569" x2="9.5576740963376" y2="357.09445330008" />
<line x1="112.16371709404" y1="534.81333293569" x2="45.192378864668" y2="455" />
<line x1="112.16371709404" y1="534.81333293569" x2="112.16371709404" y2="534.81333293569" />
<line x1="112.16371709404" y1="534.81333293569" x2="202.3939570023" y2="586.90778623577" />
<line x1="112.16371709404" y1="534.81333293569" x2="305" y2="605" />
<line x1="202.3939570023" y1="586.90778623577" x2="407.6060429977" y2="586.90778623577" />
<line x1="202.3939570023" y1="586.90778623577" x2="497.83628290596" y2="534.81333293569" />
<line x1="202.3939570023" y1="586.90778623577" x2="564.80762113533" y2="455" />
<line x1="202.3939570023" y1="586.90778623577" x2="600.44232590366" y2="357.09445330008" />
<line x1="202.3939570023" y1="586.90778623577" x2="600.44232590366" y2="252.90554669992" />
<line x1="202.3939570023" y1="586.90778623577" x2="564.80762113533" y2="155" />
<line x1="202.3939570023" y1="586.90778623577" x2="497.83628290596" y2="75.186667064307" />
<line x1="202.3939570023" y1="586.90778623577" x2="407.6060429977" y2="23.092213764227" />
<line x1="202.3939570023" y1="586.90778623577" x2="305" y2="5" />
<line x1="202.3939570023" y1="586.90778623577" x2="202.3939570023" y2="23.092213764227" />
<line x1="202.3939570023" y1="586.90778623577" x2="112.16371709404" y2="75.186667064307" />
<line x1="202.3939570023" y1="586.90778623577" x2="45.192378864669" y2="155" />
<line x1="202.3939570023" y1="586.90778623577" x2="9.5576740963376" y2="252.90554669992" />
<line x1="202.3939570023" y1="586.90778623577" x2="9.5576740963376" y2="357.09445330008" />
<line x1="202.3939570023" y1="586.90778623577" x2="45.192378864668" y2="455" />
<line x1="202.3939570023" y1="586.90778623577" x2="112.16371709404" y2="534.81333293569" />
<line x1="202.3939570023" y1="586.90778623577" x2="202.3939570023" y2="586.90778623577" />
<line x1="202.3939570023" y1="586.90778623577" x2="305" y2="605" />
<line x1="305" y1="605" x2="407.6060429977" y2="586.90778623577" />
<line x1="305" y1="605" x2="497.83628290596" y2="534.81333293569" />
<line x1="305" y1="605" x2="564.80762113533" y2="455" />
<line x1="305" y1="605" x2="600.44232590366" y2="357.09445330008" />
<line x1="305" y1="605" x2="600.44232590366" y2="252.90554669992" />
<line x1="305" y1="605" x2="564.80762113533" y2="155" />
<line x1="305" y1="605" x2="497.83628290596" y2="75.186667064307" />
<line x1="305" y1="605" x2="407.6060429977" y2="23.092213764227" />
<line x1="305" y1="605" x2="305" y2="5" />
<line x1="305" y1="605" x2="202.3939570023" y2="23.092213764227" />
<line x1="305" y1="605" x2="112.16371709404" y2="75.186667064307" />
<line x1="305" y1="605" x2="45.192378864669" y2="155" />
<line x1="305" y1="605" x2="9.5576740963376" y2="252.90554669992" />
<line x1="305" y1="605" x2="9.5576740963376" y2="357.09445330008" />
<line x1="305" y1="605" x2="45.192378864668" y2="455" />
<line x1="305" y1="605" x2="112.16371709404" y2="534.81333293569" />
<line x1="305" y1="605" x2="202.3939570023" y2="586.90778623577" />
<line x1="305" y1="605" x2="305" y2="605" />
</svg>

R, 108 bytes
plot(x<-cos(t<-seq(0,2*pi,l=21)),y<-sin(t),as=1);apply(expand.grid(1:21,1:21),1,function(e)lines(x[e],y[e]))

Could shave 5 bytes off if I got rid of argument ,as=1 which forces an aspect ratio of 1. Uses expand.grid to create a matrix with all possible pair of points, and uses apply to loop through it.

R + igraph, 87 bytes
Another solution using package igraph.
library(igraph);plot(make_full_graph(21),layout=cbind(cos(t<-seq(0,2*pi,l=21)),sin(t)))

source: Stack Exchange

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

sort: votes


text:
The codegolf object
Imagine this, we have an environment with a global scope containing just a single object, called codegolf. This object has a single child called stackexchange, which has a property called com.
Accessing this property would look like codegolf.stackexchange.com.
The challenge
The input of your program/function will be a string trying to access a property on the global scope. Whenever this property is found, you shall print/return a truthy value. If the property isn't found, a falsy value shall be printed/returned. The catch: when you try to access a property on a non-existant object, your program should throw any kind of error¹.
To make things a bit easier, you may assume that input will always be [a-z.], it will never be empty, it will never have repeating .'s and it will never start or end with a .. So codegolf. is an invalid input.
Test cases
codegolf.stackexchange.com => 1 // or any other truthy value
codegolf.stackexchange.net => 0 // or any other falsy value
codegolf.stackexchange => 1
codegolf.foo => 0
codegolf => 1
foo => 0
codegolf.com => 0
codegolf.constructor => 0

codegolf.foo.bar => Error (since foo is undefined)
codegolf.stackexchange.com.foo => Error (since com is a value, not an object)
codegolf.stackexchange.com.foo.bar => Error
foo.stackexchange.com => Error
foo.bar => Error
foo.bar.baz => Error

This is code-golf, shortest code in bytes wins
¹ if (and only if) your language of choice doesn't support errors at all, you must output something which makes it clear that this is an error. For example, if you use 1 for truthy and 0 for falsy, you may use "e" for an error. Be consistent in your return values and explain the behaviour in your post.

I feel like foo => Error would be more appropriate.

request to add codegolf.com to the test cases to rule out codegolf(.stackexchange)?(.com)?$ type checks

Another missing test case: foo.stackexchange.com

@carusocomputing Nope. Think about JavaScript. foo would return undefined, but it wouldn't throw an error. foo.bar would throw an error because foo is not defined.

@mbomb007 I mean, for Javascript yeah, for many other languages, that's not the case.

@carusocomputing True, but you can't say it's "more appropriate", when it makes sense both ways. codegolf.foo => 0, so foo => 0.

JavaScript, 135 bytes
v=>(c=(p,i)=>new Proxy({}, {get:(o,q)=>(r=q==p[i]?c(p,i+1):o.$,i==3?r||z:r)}),x=c(["codegolf","stackexchange","com"],0),!!eval("x."+v))

Reworked the first attempt to prevent builtin keys being accessible, at this point its going to be better to use a different approach, but hey!
Returns true for valid, false for missing and errors on error.

JavaScript (ES6), 87 bytes
Returns false/ true or throws ReferenceError.
s=>s.split`.`.map((w,i)=>e|['codegolf','stackexchange','com'][i]!=w&&e++,e=0)&&e>1?X:!e

let f =

s=>s.split`.`.map((w,i)=>e|['codegolf','stackexchange','com'][i]!=w&&e++,e=0)&&e>1?X:!e

console.log(f('codegolf.stackexchange.com')); // => true
console.log(f('codegolf.stackexchange.net')); // => false
console.log(f('codegolf.stackexchange'));     // => true
console.log(f('codegolf.foo'));               // => false
console.log(f('codegolf'));                   // => true
console.log(f('foo'));                        // => false
console.log(f('codegolf.com'));               // => false

console.log(f('codegolf.foo.bar'));           // => Error

Probabilistic version, 78 bytes (non-competing)
Because all properties are guaranteed to match [a-z], we can give this a try:
s=>s.split`.`.map((w,i)=>e|[162,6,2][i]-parseInt(w,36)%587&&e++,e=0)&&e>1?X:!e

Apart from the fact that 587 is a prime and leads to rather short values for the words we are interested in, this is a rather random modulo choice.
Although it does pass all test cases, it is of course likely to return false-positives.

let f =

s=>s.split`.`.map((w,i)=>e|[162,6,2][i]-parseInt(w,36)%587&&e++,e=0)&&e>1?X:!e

console.log(f('codegolf.stackexchange.com')); // => true
console.log(f('codegolf.stackexchange.net')); // => false
console.log(f('codegolf.stackexchange'));     // => true
console.log(f('codegolf.foo'));               // => false
console.log(f('codegolf'));                   // => true
console.log(f('foo'));                        // => false
console.log(f('codegolf.com'));               // => false

console.log(f('codegolf.foo.bar'));           // => Error

Batch, 269 231 bytes
@echo off
set/ps=
set w=1codegolf
for %%a in (%s:.= %)do call:l %%w
echo %w:~0,1%
exit/b
:g
if
:l
if %w:~-1%==. goto g
if not %1==%w% set w=0.&exit/b
set w=1com
if %1==com set w=1.
if %1==codegolf set w=1stackexchange

Takes input on STDIN; throws a syntax error for an invalid property. Works by using w as a state machine. If w ends with a . this means that the next property access is invalid. Edit: Saved 17 bytes by using the syntax error to abort the batch script. Saved 21 bytes by realising that one of my assignments could be unconditional.

Javascript, 84 82 bytes
Not short enough to win, but since I am a beginner I thought it would be fun to share it. Maybe someone has a suggestion for improvement.
s=>s.split`.`.length>3&&e||!!eval('codegolf={stackexchange:{com:true}};window.'+s)

It passes all the tests in the question, returns true for existing value, false for non-existent and it throws an error if you try to get a property of a non-existent or non-object variable. However I now realize that this solution has some issues as well. As pointed out by @Florent in the comments it returns true when string prototype properties such as .toString are called.
Edit: 2 bytes shorter thanks to @MamaFunRoll
Test snippet:

var f =
s=>s.split`.`.length>3&&e||!!eval('codegolf={stackexchange:{com:true}};window.'+s)

console.log(f('codegolf.stackexchange.com')) //true
console.log(f('codegolf.stackexchange.net')) //false
console.log(f('codegolf.stackexchange')) //true
console.log(f('codegolf.foo')) //false
console.log(f('codegolf')) //true
console.log(f('foo')) //false
console.log(f('codegolf.com')) //false

console.log(f('codegolf.foo.bar')) // TypeError
console.log(f('codegolf.stackexchange.com.foo')) //ReferenceError
console.log(f('codegolf.stackexchange.com.foo.bar')) //ReferenceError
console.log(f('foo.stackexchange.com')) // TypeError
console.log(f('foo.bar')) // TypeError
console.log(f('foo.bar.baz')) // TypeError

{
"message": "Unable to get property 'bar' of undefined or null reference",
"filename": "http://stacksnippets.net/js",
"lineno": 1,
"colno": 37
}

@RosLuP I am not sure what you mean by this comment. The function is supposed to throw an error for codegolf.foo.bar

than all ok for all you... but for me "throw" error is one error

@RosLuP yes, that's because all JavaScript scripts stops on the first error

.split('.') -> split\.`` Welcome!

Does not work. f("codegolf.toString")  should return false. f("codegolf.toString.toString") should throw.

C, 98 112 113 bytes
f(char*a){char*c="codegolf.stackexchage.com";while(*c&&*c==*a)++a,++c;return strchr(a,46)?*(a=0):!(*a|*c&*c-46);}

ungolfed
f(char*a){char*c="codegolf.stackexchage.com";
          while(*c&&*c==*a)++a,++c;
          return strchr(a,46)?*(a=0):!(*a|*c&*c-46);
         }

f(codegolf.stackexchage.com)=1
f(codegolf.stackexchage.net)=0
f(codegolf.stackexchage)=1
f(codegolf.foo)=0
f(codegolf)=1
f(foo)=0

for the below it has to seg fault
f(codegolf.stackexchage.com.foo)
f(foo.bar)
f(foo.bar.baz)
f(codegolf.foo.bar)
f(foo.v)

What about the error(s)? f(codegolf.stackexchage.com.foo) should error, not return 0, for example.

i don't fully understand why my C language entry that is less characters than
C#,Java,Javascript, python,Bathc,Javascript, has less points (-1) than everyone

Maybe they downvoted before you fixed the codegolf.stackexchange.com.foo error, or they don't realize you fixed it.  Edit the header to # C, <strike>98</strike> 112 bytes # to make it clear that you modified it.

3 is not an error either, in C it is what is considered a "truthy" value. See this meta post, and this code.

I not use exceptions, in case of error program return 3. Should be -1 but 3 save 1 character

@Ray thank you. In C the prefered way it is not exception, as in the not good languages, but it return one error code to the caller (as it has to be)

If people insist on a fatal exception, you could return 1/0 instead of 3 to raise a floating point exception signal.  But in a real program, returning a separate error code for separate types of errors, as you do here, is the Right Thing to do in C.  And since raising SIGFPE is mandated by the OS and hardware, not the language, it's my opinion that what you do here is both within the letter and spirit of the problem description.

1/0 return 1, *0 is not allowed... 1/0.0 not seg fault. What seg fault is *(a=0) or *(char*)0

JavaScript, 173 bytes
function d(a){var b="codegolf",u="stackexchange",c=a.split("."),e="e";return c.length==1?c[0]==b:c.length==2?c[0]==b?c[1]==u:e:c.length==3?c[0]==b?c[1]==u?c[2]=="com":e:e:e}

Works with IE 10, so should work on major modern browsers.
Try it here (+ ungolfed)

Could be way more golfed: d=(a,b="codegolf",u="stackexchange",c=a.split\.`,e="e")=>c[l="length"]==1?c[0]==b:c[l]==2?c[0]==b?c[1]==u:e:c[l]==3?c[0]==b?c[1]==u?c[2]=="com":e:e:e` (149 bytes)

@Florent I think he's trying to allow it to work on IE10 etc., so no arrow functions or default parameters.

+1 for a great answer, +1 for e="e", but -1 for IE 10.

C#, 155 bytes
Wasn't going to be the shortest but thought it would be fun give it a go in C#...
bool f(string s){var a=s.Split('.');int e=0,l=a.Length-1,i=l;for(;0<=i;i--){e+=a[i]!=new[]{"codegolf","stackexchange","com"}[i]?i<l?s[-1]:1:0;}return e<1;}

Splits the string and reverse iterates through the result.
A non matching element more than 1 iteration deep, errors (throwing an IndexOutOfRangeException by accessing a char at -1 position in the string).
Otherwise, returns false if any elements didn't match.

.NET Fiddle

Ruby, 84 80 bytes
Anonymous function which returns true or false, or divides by zero to raise error:
->s{k=1;s.split(?.).zip(%w[codegolf stackexchange com]){|i,o|1/0if !k;k=i==o};k}

Try it online

Java, 187 138 bytes
Version 2.0(138 bytes):
Idea shamelessly stolen from @Jamie.
l->{for(String []a=l.split,int l=i=a.length-1,e=0;i>=0;e+=a[i]!=new String[]{"codegolf","stackexchange","com"}[i]?i<l?s[-1]:1:0)return e;}

Version 1.0(187 bytes):
l->{String[]a=l.split(".");return a[0].equals("codegolf")?(a.length<2?1:(a[1].equals("stackexchange")?(a.length<3?1:(a[2].equals("com")?1:0)):(a.length<3?0:a[-1]))):(a.length<2?0:a[-1]);}

Explanation of the return part:
return a[0].equals("codegolf")?(a.length<2?1:(a[1].equals("stackexchange")?(a.length<3?1:(a[2].equals("com")?1:0)):(a.length<3?0:a[-1]))):(a.length<2?0:a[-1]);
return                                                                                ;
       a[0].equals("codegolf")?                                                                                :
                               (a.length<2? :                                                                                ) (a.length<2? :     )
                                           1 (a[1].equals("stackexchange")?                                       :                    )              0 a[-1]
                                                                           (a.length<3? :                        ) (a.length<3? :     )
                                                                                1 (a[2].equals("com")? : )              0 a[-1]
                                                                                1 0

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


text:
Who is the tallest?
N children, with no two sharing their exact size, are lined up in some order. Each can only compare heights with their immediate neighbours. When the teacher shouts "raise hands if you are the tallest", they do so if they are taller than both their neighbours, and they do so simultaneously. If only one raises their hand, he wins. If more than one raise their hands, they are all eliminated from the row (preserving the order of the rest of the children) and they repeat the process.
Write a program, which takes an array of distinct integers (you can assume they are strictly positive) and outputs the winner of this game. This is code-golf, so the shortest code wins.
Examples (with intermediate stages shown):
5 3 9 8 7 → 3 8 7 → 8
1 2 9 4 → 9
9 3 8 7 4 12 5 → 3 7 4 5 → 3 4 → 4

Current leaders:

Jelly: 17 bytes [by Dennis♦]
MATL: 20 bytes [by Luis Mendo]
APL: 28 bytes [voidhawk]
k: 40 bytes [by Paul Kerrigan]

There's also a battle of Pythons going on. Still waiting for more golfing languages to show up.
I currently accepted Dennis♦'s answer - if there are new winners, I'll update the selection.

sounds more like "who might be the tallest, or might not?" - to actually find "who is the tallest" you'd have to eliminate the ones that keep their hands down

I drew similarity to kids' games, where one person shouts some signature phrase after which the game is named. Funnily enough, the tallest is least likely to win (by a huge margin). Asymptotically, out of N! permutations, only in 2^(N-1) cases he wins.

Jelly, 17 bytes
j@N»3\=x@ḟ@ḢṖ?µ¬¿

Input is a comma-separated string of integers.
Try it online!
Credits go to @Xanderhall, @Sherlock, and @ErikGolfer for laying the groundwork.
How it works
j@N»3\=x@ḟ@ḢṖ?µ¬¿ Main link: Argument: A (integer or list of integers)

               ¬¿ While the logical NOT of A (0 for a positive integer, a non-empty
                  array for a non-empty array) is truthy:
              µ     Execute the chain of links to the left.
  N                   Negative; multiply all integers in A by -1.
j@                    Join -A, separating by A. This prepends and appends a
                      negative to A and appends more integers that will be ignored.
   »3\                Compute the maxima of all overlapping slices of length 3.
      =               Compare the maxima with the elements of A, yielding 1 or 0.
       x@             Repeat the elements of A, 1 or 0 times.
                      This ignores Booleans without a counterpart in A.
            Ṗ?        If the popped result is truthy, i.e., if it has at least two
                      elements:
         ḟ@             Filter/remove those elements from A.
                      Else:
           Ḣ            Head; extract the (only) element of the return value.

JavaScript (ES6), 78 76 72 bytes
Thanks to @edc65 for -4 bytes
f=a=>a.map((c,i)=>(p>c|c<a[i+1]?q:r).push(p=c),p=q=[],r=[])&&r[1]?f(q):r

Takes in an array of integers and outputs an array containing only the winner.
Test snippet

f=a=>a.map((c,i)=>(p>c|c<a[i+1]?q:r).push(p=c),p=q=[],r=[])&&r[1]?f(q):r

g=a=>a?console.log("Input:",`[${a}]`,"Output:",f(a.map(Number))+""):console.error("Invalid input")

g([5,3,9,8,7])
g([1,2,9,4])
g([9,3,8,7,4,12,5])
<input id=I value="9 1 8 2 7 3 6 4 5"><button onclick="g(I.value.match(/\d+/g))">Run</button>

Here are a few other attempts, using .filter and array comprhensions:
f=a=>(q=a.filter((c,i)=>p>(p=c)|c<a[i+1]||0*r.push(c),p=r=[]))&&r[1]?f(q):r
f=a=>(r=a.filter((c,i)=>p<(p=c)&c>~~a[i+1]||0*r.push(c),p=q=[]))[1]?f(q):r
f=a=>[for(c of(i=p=q=[],r=[],a))(p>c|c<a[++i]?q:r).push(p=c)]&&r[1]?f(q):r
f=a=>(q=[for(c of(i=p=r=[],a))if(p>(p=c)|c<a[++i]||0*r.push(c))c])&&r[1]?f(q):r

Or a double for-loop, horribly long:
a=>eval("for(r=[,1];r[1]&&(p=i=q=[],r=[]);a=q)for(c of a)(p>c|c<a[++i]?q:r).push(p=c));r")

Explanation
The way this works is pretty simple: it builds an array of those who are relatively taller (r) and an array of those that aren't (q), then returns r if it only has one item; if not, it runs itself on q and returns the result of that.

Where's the snack snippet?

@KritixiLithos Added :-)

"[1,2,5,8,9,12,3,4,10] Output: 5"
I think this should output 8, not 5. First, 12 and 10 are eliminated, then 9 and 4, then 8 wins.

@orion My bad, the snippet wasn't converting its arguments to numbers before sending them into the function. This has been fixed.

You can save 4 bytes on your filter example by switching q and r. You avoid the &&r and the filter expression turns out to be a byte shorter too.

f=a=>a.map((c,i)=>(p>c|c<a[i+1]?q:r).push(p=c),p=q=[],r=[])&&r[1]?f(q):r 72

MATL, 20 bytes
`tTYadZSd0<~&)nq}x2M

Input is a column vector, using ; as separator.
Try it online! Or verify all test cases.
Explanation
This is a direct implementation of the procedure described in the challenge. A do...while loop keeps removing elements until only one has been removed; and that one is the output.
The elements to be removed are detected by taking differences, signum, then differences again. Those that give a negative value are the ones to be removed.
`        % Do...while
  t      %   Duplicate. Takes input (implicit) the first time
  TYa    %   Append and prepend a zero
  d      %   Consecutive differences
  ZS     %   Signum
  d      %   Consecutive differences
  0<~    %   Logical mask of non-negative values: these should be kept
  &)     %   Split array into two: those that should kept, then those removed
  nq     %   Size minus 1. This is used as loop condition. The loop will exit
         %   if this is 0, that is, if only one element was removed
}        % Finally (i.e. execute at the end of the loop)
  x      %   Delete array of remaining elements
  2M     %   Push last element that was removed
         % End (implicit)
         % Display (implicit)

Python3, 265 260 248 243 203 121 117 112 111 bytes
def T(I):
 b=[0];q=[];J=b+I+b
 for i,x in enumerate(I):[q,b][J[i]<x>J[i+2]]+=x,
 return len(b)<3and b[1]or T(q)

Thank you @ZacharyT, @orion, and @mathmandan for saving 5 45 a lot of bytes!

Mathematica, 107 108 bytes
(For[x=y=#,Length@y>1,x=DeleteCases[x,#|##&@@y],y=Intersection[Max@@@x~Split~Less,#&@@@Split[x,#>#2&]]];y)&

Explanation
First, set x and y equal to the input List. The loop continues until Length@y==1. x~Split~Less is the list of lists of consecutive, increasing elements, Split[x,#>#2&] is the list of lists of consecutive, decreasing elements. Taking the Max of all of the lists in the former gives the list of children taller than the child to their right (along with the right-most child). Taking the first argument (#&) of all of the lists in the latter gives the list of children taller than the child to their left (along with the left-most child). The intersection of these two will be the list of children who raised their hand. Set this equal to y. x=DeleteCases[x,#|##&@@y] removes from x any elements matching an element of y (#|##& is equivalent to Alternatives). Once the loop terminates, return y. If the output must be an integer (rather than a list containing a single integer), return #&@@y (+4 bytes).
Thanks to Martin Ender for saving 2 bytes and making me comply with the rules. Open to suggestions.

I don't think !Less works as you expect, since this doesn't actually evaluate to a function. You'll probably need to use Greater (or #>#2&) there. You can use x~Split~Less for the first Split though and > for the Length condition.

As for having to evaluate Clear@y between function calls, I'm afraid that's not valid. You'll either have to reset it yourself, scope it better, or turn this into a full program with Input and Print.

Haskell, 85 bytes
import Data.List
f x=(#)=<<(x\\)$[b|a:b:c:_<-tails$0:x++[0],b<a||b<c]
[s]#_=s
_#i=f i

Usage example: f [9,3,8,7,4,12,5] -> 4.
How it works:
f x =                            -- main function with parameter x
         [b|                  ]  -- make a list of all b
            a:b:c:_              -- where b is the second element of all lists with
                                 -- at least 3 elements
             <- tails $ 0:x++[0] -- drawn from the tails of x with a 0 pre- and
                                 -- appended (tails [1,2,3] -> [1,2,3],[2,3],[3],[])
               ,b<a||b<c         -- and b is not greater than its neighbors
   (#)=<<(x\\)                   -- feed the list difference of x and that list
                                 -- and the list itself to the function #

[s]#_s                           -- if the list difference is a singleton list,
                                 -- return the element
_#i=f i                          -- else start over with the list of b's

A variant, also 85 bytes:
import Data.List
f x|n<-[b|a:b:c:_<-tails$0:x++[0],b<a||b<c]=last$f n:[s|[s]<-[x\\n]]

Bind the list of b (see above) to n and return the element s if x\\n is a singleton list and f n otherwise.

You can get rid of the import and save 3 bytes with f x|y@(_:z)<-x++[0]=(#)=<<(x\\)$[b|(a,b,c)<-zip3(0:y)y z,b<a||b<c].

@Zgarb: \\  still needs the import. Btw, tails can also be replaced by ...|a:b:c:_<-scanr(:)[]$0:x++[0],....

Ohh right, I didn't realize that.

Python 2, 100 98 bytes
def f(A):
 t=[0];l=[];a=b=0
 for c in A+[0]:[l,t][a<b>c]+=[b];a,b=b,c
 return t[-2]and f(l)or t[1]

Uses the short-circuiting return as in Yodle's answer (by Zachary T)

You can take 3 more bytes off by: using +=b, instead of +=[b] (credit to mathmandan), using t=[0] to use t to add to A, and then, since we now start with 0 in t, checking t[-2]<1 is shorter than len(t)<2, and use t[1] as the result in that case.

The last line becoming return t[-2]and f(l)or t[1].

Perl 6, 111 bytes
{(@_,{(($/=(0,|@$_,0).rotor(3=>-2).classify({+so .[1]>.[0,2].all})){1}>1??$/{0}!!$/{1})».[1]}...*==1)[*-1][0]}

Expanded:
{  # bare block lambda with implicit parameter list ｢@_｣

  (                                    # generate a sequence
    @_,                                # starting with the input

    {   # code block used to get the next value in the sequence
        # which has implicit parameter ｢$_｣

        (
          (

            $/ =   # store in ｢$/｣ for later use

            ( 0, |@$_, 0 )             # the input with 0s before and after
            .rotor( 3 => -2 )          # take 3 at a time, back up 2, repeat
            .classify({
              +                        # Numify the following:
              so                       # simplify the following Junction
              .[1] > .[ 0, 2 ].all     # is the middle larger than its neighbors
            })

          ){1}                         # look at the values where it is true
          > 1                          # is there more than 1?

        ??                             # if so
          $/{ 0 }                      # look at the false ones instead

        !!                             # otherwise
          $/{ 1 }                      # look at the true ones

      )».[1]                           # undo the transformation from ｢.rotor｣
    }

    ...                                # keep doing that until

    * == 1                             # there is only one value
  )\
  [ * - 1 ]                            # the last value of the sequence
  [ 0 ]                                # make it a singular value ( not a list )

}

Mathematica, 101 bytes
If[Equal@@(a=Position[Max/@Partition[#,3,1,{2,2},0]-#,0]),#[[Last@a]],#0@Fold[Drop@##&,#,Reverse@a]]&

Unnamed recursive function taking a list of numbers as input, and returning a list with a single number (the winner) as output.
The core of the algorithm is Max/@Partition[#,3,1,{2,2},0], which computes the array of (the-max-of-me-and-my-neighbors)s from the input list. a=Position[...-#,0] then subtracts the original list and returns where the 0s are; these are the hand-raising children.
If[Equal@@a, #[[Last@a]], #0@Fold[Drop@##&,#,Reverse@a]]& branches depending on whether all the elements of a are equal or not (in this case, they will be only if a is a singleton); if so, then this child is the winner and we output her number; if not, then we recursively call this function on the list with all elements at positions in a removed.

Python 2, 99 Bytes
def f(l):k=[x[0]for x in zip(l,[0]+l,l[1:]+[0])if(max(x),)>x];return(len(k)+2>len(l))*max(l)or f(k)

PHP, 131 bytes
$r=$a=$argv;for(;$r[1];$a=array_values(array_diff($a,$r))){$r=[];foreach($a as$i=>$x)if($x>$a[$i-1]&$x>$a[$i+1])$r[]=$x;}echo$r[0];

Takes numbers from command line arguments. Fails if filename starts with a positive number.
breakdown
// import (and init $r[1])
$r=$a=$argv;
// while more than 1 raised hand, remove them from data
for(;$r[1];$a=array_values(array_diff($a,$r)))
{
    // reset hands
    $r=[];
    // raise hands
    foreach($a as$i=>$x)
        if($x>$a[$i-1]&$x>$a[$i+1])$r[]=$x;
}
// output
echo$r[0];

Scala 129 bytes
Golfed
def x(a:List[Int]):Int={val (y,n)=(0+:a:+0).sliding(3).toList.partition(l=>l.max==l(1));if(y.length>1)x(n.map(_(1)))else y(0)(1)}

Ungolfed
def whoIsTallest(a: List[Int]): Int = {
  val (handUp, handDown) = (0 +: a :+ 0).sliding(3).toList.partition {
    case x :: y :: z :: Nil => y > x && y > z
  }
  if (handUp.length > 1)
    whoIsTallest(handDown.map(_(1)))
  else
    handUp.head(1)
}

By padding the list left and right with 0's, can then group in sets of 3 and partition the list for those where the hand is up, the left and right most elements compare to 0 on the outside so get the correct number (assuming nobodys height is negative!)

C++14, 182 bytes
#define P .push_back(c[i]);
int f(auto c){decltype(c)t,s;int i=0;(c[0]>c[1]?t:s)P for(;++i<c.size()-1;)(c[i-1]<c[i]&&c[i]>c[i+1]?t:s)P(c[i-1]<c[i]?t:s)P return t.size()<2?t[0]:f(s);}

Learned that the ternary operator can be used with C++ objects. Requires the input to be a random access container with push_back, like vector, deque and list.
Creates two containers t and s of the same type and appends the local tallest to t and the rest to s. If there is only 1 element in t return that one, otherwise recursive call itself with s.
Ungolfed:
int f(auto c){
  decltype(c)t,s;
  int i=0;
  (c[0]>c[1] ? t : s).push_back(c[i]);
  for(;++i<c.size()-1;)
    (c[i-1]<c[i]&&c[i]>c[i+1] ? t : s).push_back(c[i]);
  (c[i-1]<c[i] ? t : s).push_back(c[i]);
  return t.size()<2 ? t[0] : f(s);
}

R, 83 bytes
Two different versions:
This one takes a vector N:
while(T){Z=diff(sign(diff(c(0,N,0))))<0;if(sum(Z)>1)N=N[!Z]else{print(N[Z]);break}}

This one creates a function F defined recursively:
F=function(N){Z=diff(sign(diff(c(0,N,0))))<0;if(sum(Z)>1)F(N[!Z])else return(N[Z])}

k, 40 bytes
{$[1=+/B:(|>':|x)&>':x;x@&B;.z.s x@&~B]}

Explanation:$ is an if-else.The condition is whether 1 is the sum of B, which is defined as the minimum of two lists generated by checking if x is greater than the prior and post-positions (Pipe is reverse).  If this is true we return x where B is true.  Otherwise we recurse without the true positions.

APL (Dyalog Unicode), 28 bytesSBCS
{1=≢⍸s←⍵=3⌈/∊0⍵0:s/⍵⋄∇⍵/⍨~s}

Try it online!

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


text:
The eruption of Eyjafjallajökull?
Year of 2010, an Icelandic Vulcano, concisely named Eyjafjallajökull  erupted, resulting in my long-planned flight being canceled.
In case this ever happens again, I would really like to know in advance, so please help me build a simple visual alert system !
Input
Take the Icelandic Meteorological Office volcanic activity alert code, as an input (string):
GREEN - Volcano is in normal, non-eruptive state.
YELLOW - Volcano is experiencing signs of elevated unrest above known background levels.
ORANGE - Volcano is exhibiting heightened unrest with increased likelihood of eruption.
RED - Eruption is forecasted to be imminent with significant emission of ash into the atmosphere likely.
Output
The graphic (ASCII art) alert, illustrating the state of Eyjafjallajökull.
GREEN (Eyjafjallajökull is resting)
      al   la
     j       j
  jaf         öku
 y               l
E                 l
-------------------

YELLOW (some smoke appears !)
       ~   ~
         ~
      al   la
     j       j
  jaf         öku
 y               l
E                 l
-------------------

ORANGE (more smoke !)
      ~  ~  ~
       ~   ~
         ~
      al   la
     j       j
  jaf         öku
 y               l
E                 l
-------------------

RED (even more smoke and some ash, too !)
   `~ ~ ~ ~ ~ ~`
    ` ~  ~  ~ `
     ` ~   ~ `
       ` ~ `
      al   la
     j       j
  jaf         öku
 y               l
E                 l
-------------------

Rules

You may output to the screen (stdout), or return a string
This is code-golf ! The shortest answer (in bytes), wins
Feel free to replace ö with o
Trailing spaces are allowed, but not required
At most one trailing newline is allowed
At most 4 leading newlines are allowed (in place of smoke)

Pronounced: AY-JAH-FUH-JUH-AH-LAH-JUh-KUh-EW-LUH?

@carusocomputing - Almost it ! :)

at least it's shorter than Tungnafellsjökull :P

@DrMcMoylex
No, just a typo, should be fixed now. Thanks !

You joke about the name not being concise but it's actually very descriptive and shorter than its English translation "island mountain glacier" and also sounds a lot more beautiful. :P

Are trailing spaces required?

@darrylyeo, spaces are allowed but not required (updated the rules to mention that).

Are leading/trailing newlines allowed?

@Titus - one trailing newline is ok (just added this to the list of rules)

I've also added a rule allowing for leading newlines (at most 4 of them).
Never intended to do so, but existing answers do rely on this already, so it would be unfair to do otherwise.

I was expecting the Eyjafjallajökullmögöröv complexity tag

Ruby, 161
Here's my take on Iceland's famous landmark, the Eyjafjallajökull Tower.
Reasonably short but I haven't come up with a good way to golf the smoke yet.
->n{m=85-n[-3].ord>>2
%w{`~+~+~+~+~+~` `+~++~++~+` `+~+++~+` `+~+` al%3sla j%7sj jaf%9soku y%15sl E%17sl}.map{|i|(i%"").tr(?++?`*m," ").center(19)}[m,9]+[?-*19]}

Ungolfed in test program
f=->n{m=85-n[-3].ord>>2     #From ASCII code of 3rd from last letter, derive m=0 for RED up to 4 for GREEN (uppercase.)
  %w{`~+~+~+~+~+~` `+~++~++~+` `+~+++~+` `+~+` al%3sla j%7sj jaf%9soku y%15sl E%17sl}.
  map{|i|                   #For each line above decode as follows:
    (i%"").                 #Replace %Xs with X spaces, by inserting  empty strings and padding sprintf style.
    tr(?++?`*m," ").        #Replace + with space. If not red, replace ` with space.
    center(19)}[m,9]+       #Centre output to 19 characters per line. Start printing at line m and go on to the end (never more than 9 lines.)
  [?-*19]                   #Add a row of --- at the bottom.
}

puts f[gets.chomp]

Batch, 284 bytes
@set e=echo
@%e%off
set s=
set t=
goto %1
:RED
set t= `
%e%   `~ ~ ~ ~ ~ ~`
:ORANGE
%e%   %t%~  ~  ~%t%
:YELLOW
%e%    %t%~   ~%t%
%e%%s%%t%~%t%
:GREEN
%e%%s%al   la
%e%     j%s% j
%e%  jaf %s%  oku
%e% y %s%%s%  l
%e%E%s%%s%%s%l
%e%--------------------

Note: Lines 1 and 7 have one trailing space, line 3 has six and line 4 has three.

Nice use of goto.

JavaScript (ES6), 286 262 199 194 183 bytes
Pass input to the function f(), e.g. f('GREEN').

Y=`7~3~
9~
`
f=n=>({G:'',Y,O:`5 ~2~2~
`+Y,R:'3`~ ~ ~ ~ ~ ~`\n4` ~2~2~ `\n5` ~3~ `\n7` ~ `\n'}[n[0]]+`6al3la
5j7j
2jaf9oku
 y15l
E17l
`+'-'.repeat(19)).replace(/\d+/g,n=>' '.repeat(n))

-63 bytes: Used Regex instead of function to generate spaces.

Is s really worth it? By my count, it saves 4 bytes... but costs 16 bytes. On the other hand, I think you could save a couple of bytes by using _ more.

Produces invalid results for ORANGE (smoke is not aligned correctly)

@Neil Yeah, I anticipated that I'd need it more often than I really did. :P

@zeppelin Fixed.

it now fails with "r is not defined" for me :(

I realized that right after I updated! Try it again.

@darrylyeo It works now !

JavaScript (ES6), 235 220 218 bytes
c=>[344,592,160,640,192,32,28,2,1,~0].map(n=>(s='6222222661116600660').replace(/./g,(_,i)=>n&(1<<i|512>>i-9)?(s+'6allajjjafökuylEl')[p++]||'-':' '),p=0).join`
`.replace(/\d/g,n=>n%4<'GYOR'.search(c[0])?n&4?'`':'~':' ')

let f =

c=>[344,592,160,640,192,32,28,2,1,~0].map(n=>(s='6222222661116600660').replace(/./g,(_,i)=>n&(1<<i|512>>i-9)?(s+'6allajjjafökuylEl')[p++]||'-':' '),p=0).join`
`.replace(/\d/g,n=>n%4<'GYOR'.search(c[0])?n&4?'`':'~':' ')

console.log(f('GREEN'))
console.log(f('YELLOW'))
console.log(f('ORANGE'))
console.log(f('RED'))

PHP, 307 288 279 bytes
$o=" ";while($x<19)$o[$x+19*(($d=abs($x-9))>4?$d>7?$d-5:2:$d>3)]="Eyjafjal   lajokull"[$x++];echo strtr((($n=ord($argv[1])/8&3)-2?"":"   1~ ~ ~ ~ ~ ~2\n").($n%3?"     1~  ~  ~2\n":"").($n?"      1~   ~2\n       1 ~ 2\n":"").chunk_split(str_pad($o,114,"-"),19),12,$n-2?"  ":"`´");

uglyly bulky
breakdown
$o=" ";                                         // 0.init $o to string
while($x<19)$o[$x+19*(                      // 1.paint volcano
    ($d=abs($x-9))>4?$d>7?$d-5:2:$d>3           // 1a map [0..19] to row offsets
    )]="Eyjafjal   lajokull"[$x++];
echo strtr(                                     // 7. print
    (($n=ord($argv[1])/8&3)                     // 4.map GYOR to 0312
        -2?"":"   1~ ~ ~ ~ ~ ~2\n")             // 5a.add smoke & stuff for red
        .($n%3?"     1~  ~  ~2\n":"")           // 5b for orange
        .($n?"      1~   ~2\n       1 ~ 2\n":"")// 5c for yellow
    .chunk_split(                               // 3.insert linebreaks
        str_pad($o,114,"-")                     // 2.add ground
    ,19)
,12,$n-2?"  ":"`´");        // 6.replace stuff with ticks for red, with blanks else

><> (Fish) 351 339 302 bytes
\l?!;o00.>~00.
\a"-------------------"a"l                 E"a"l               y "a"ukö         faj  "a"j       j     "a" al   la      "
\i:"R"-?!v
 " `  "a~<|.!00"   `~ ~ ~ ~ ~ ~`"a"    ` ~  ~  ~ ` "a"     ` ~   ~ ` "a"       ` ~"
\ :"G"-?!v
\}a"~         "a"~   ~       "
\{:"Y"-?!v
\~a"~  ~  ~      "

Fairly basic and ugly at the moment, I'm working on golfing it down lower but the 'RED' input makes it harder to re-use lines.
Edit 1; Moved the initial volcano string onto 1 line to reduce line breaks, moved the 'RED' string in reverse to fill empty space. (12 bytes saved)
Edit 2;Took out 'O' check and just print if the other 3 are not inputted (it doesn't specify any non 'green,red,orange,yellow' inputs. Also took out movement and used spaces in the strings to bypass extra commands. (37 bytes saved)
Online version to test!

Python 2, 209 bytes (208 chars)
s=' '
y=' ~ '
v='ROY G'.index(input()[0])
a='` '[v>0]
print'\n'.join([s*3+a+'~'+' ~'*5+a,s*4+a+y*3+a,s*5+a+y*2+a,s*7+a+y+a,s*6+'al   la ',s*5+'j       j\n  jaf'+s*9+'öku\n y'+s*15+'l\nE'+s*17+'l','-'*19][v:])