text:
Octal, Decimal, or Hexadecimal?
Given an input string containing only letters and numbers, write a program or function that prints the possible printable ASCII characters (Hex 20-7E) that correspond with the string's value in bases 8, 10, and 16 (where possible). The characters must be written in increasing order in terms of the bases with which they correspond (base 8 first, etc). The output can be in array format (like [& . F]) or separated by spaces or newlines (a trailing newline is optional) like the samples.
If there is not a possible printable ASCII character that can be formed, the program must not have any output.
Samples
31
==> 1

47
==> ' / G

69
==> E i

7A
==> z

100
==> @ d

156
==> n

189
==> <empty>

potaTO
==> <empty>

5G
==> <empty>

19
==> <empty>

This is code-golf, so the answer with the fewest bytes wins. Standard rules apply.

JavaScript (SpiderMonkey 30+), 74 bytes
s=>[for(b of'o0x')if((c=+(0+b+s))>31&c<127)String.fromCharCode(c)].join` `

You and your ES7 are killing mah ES6 o_o

@CᴏɴᴏʀO'Bʀɪᴇɴ When you're using both map and filter, array comprehensions are really useful.

@Neil Any reason to use '0'+b+... when b will always be a string? 0+b+...

@dev-null Bah, I fixed it in http://codegolf.stackexchange.com/a/73323/17602 but forgot to do it here too.

MATL, 23 24 28 bytes
1 byte off thanks to @David
8H6hhYs"G@ZA32:126m?6Mc

Try it online!
8H6hhYs         % array [8,10,16]
"               % for each base
  G             %   push input. Do nothing the first time
  @             %   push base (8, 10 or 16)
  ZA            %   convert from base to decimal. Takes implicit input the first time
  32:126m       %   is result in acceptable range?
  ?             %   if so
    6M          %     push result of base conversion again
    c           %     convert to char
                %   implicitly end if
                % implicitly end for each
                % implicitly display stack contents

I'm not sure if the  D is necessary, is it? Nice work on creating the vector, I did almost the same as you but couldn't shorten the vector from [8,10,16].

@David Thanks! I thought D was necessary in this case to empty the stack. But you're right, it's not! Thanks!

@David I need to include ' ':'~' as a predefined literal for next release!

32:126m is a good idea!!

Python 3, 84 82 bytes
def a(s):
 for n in 8,10,16:
  try:b=int(s,n);31<b<127and print(chr(b))
  except:0

Pyth, 23 21 20 18 bytes
@rd\m.xCizd0[8T16

Output as an array. There's a literal \x80 between the backslash and the C, which I've replaced with a •.
@rd\•m.xCizd0[8T16    Implicit: z=input
     m     d [8T16    Map the following lambda d over [8, 10, 16]:
      .x                try:
         izd              convert z from that base
        C                                          and convert to char
            0           except: return the number 0
@                     Filter that on presence in
 rd\•                   strings from space to \x80 (the printable ASCII characters).

Try it here.

Jolf, 26 bytes
Try it here! Test suite
 fΜ‘Ci8iΗi’dpAHdh sH"[ -~]

Explanation
 fΜ‘Ci8iΗi’dpAHdh sH"[ -~]
   ‘      ’                array containing
    Ci8                     input as base 8
       i                    input as base 10
        Ηi                  input as base 16
  Μ        d               mapped
            pAH             with from char code
_f             d           filtered
                _sH"[ -~]   with strings matching that.

C (function), 76

2 bytes saved thanks to @anatolyg.
5 bytes saved thanks to @luserdroog.

j,c;f(char*s){for(j=8;c=strtol(s,0,j);j=j*j/6)isprint(c)?printf("%c ",c):0;}

Ideone.

Your loop "increment" statement is awesome! It could be shortened though.

j*=j,j/=6 is more plainly written as j=j*j/6

@anatolyg of course  -thanks!  I was trying to be clever with combining operators  - something like j*=j/6 but that didn't work due to loss of precision during integer division

j<20, the comma operator discards the whole effect of this.

@luserdroog Yes - thanks!

Javascript ES6, 89 chars
s=>'0o,,0x'.split`,`.map(x=>(x+=s)>31&x<128&&String.fromCharCode(x)).filter(x=>x).join` `

Test:
f=s=>'0o,,0x'.split`,`.map(x=>(x+=s)>31&x<128&&String.fromCharCode(x)).filter(x=>x).join` `
"31,47,69,7A,100,156,189,potaTo,5G,19".split`,`.map(f) == "1,' / G,E i,z,@ d,n,,,,"

Lua, 147 Bytes
I don't think I can golf it down a lot more, I've tested a lot of ways to do it, and here come the shortest. Even using an old compiler which contains the deprecated function table.foreach(table,function) doesn't shave off some bytes.
This program takes a string as argument, and print the concatenation of a table values separated by spaces.
t={}for _,i in pairs({8,10,16})do x=tonumber(arg[1],i)x=x and x or 0 t[#t+1]=127>x and 19<x and string.char(x)or nil end print(table.concat(t," "))

Ungolfed and explanations
t={}                        -- Initalise the array containing the chars to print
for _,i in pairs({8,10,16}) -- Iterate over the array {8,10,16}
do
  x=tonumber(arg[1],i)      -- convert the input in base i to a number in base 10
  x=x and x or 0            -- if the input wasn't a number, x is nil
                            -- use a ternary operator to set x in this case
  t[#t+1]=127>x and 19<x    -- if x is the bytecode of a printable character
    and string.char(x)or nil-- insert this character into t
end
print(table.concat(t," "))  -- concatenate the values in t with " " as separator
                            -- and print it

If you're wandering why there's a variable set but not used in a golfed code (the variable _ in the for loop), here's why:
You have 2 ways to iterate over an array in Lua, either in a for style:
for i=1,#table do --[[code here, use table[i] ]] end

or in a foreach style:
for key,value do pairs(table) do --[[code here]] end

I was needing the values contained in the table {8,10,16} as they are the different bases I have to iterate over. But functions with multiple return won't allow you to chose which one you actually want to be returned, they follow an order. To have the variable value set, I need to catch the value of key too: that's what we call a dummy _.

Bash + GNU utilities + ascii, 36
Not sure if the use of the ascii utility is allowed.  Input is taken as a commandline parameter.
ascii $1|tac|grep -Po '(?<=s as `).'

ascii may be installed on Ubuntu with sudo apt-get install ascii.

R, 84 bytes
function(x){s=sapply;y=s(c(8,10,16),strtoi,x=x);cat(s(y[y%in%c(32:126)],intToUtf8))}

uses strtoi to convert to each of the bases and then convert to character if in the appropriate range. Could save 4 more bytes by removing cat if we allowed the default printing of characters (wrapped in "")

JavaScript ES6, 89 88 bytes
Saved 1 byte thanks to Neil!
n=>[..."0x+"].map(t=>String.fromCharCode(eval(`0${t+n}`))).filter(k=>~k.search(/[ -~]/))

Returns an array. If that's not okay, this works for an extra 8 bytes, displaying the possible matches.
n=>[..."0x+"].map(t=>String.fromCharCode(eval(`0${t+n}`))).filter(k=>~k.search(/[ -~]/)).join` `

F=n=>[..."0x+"].map(t=>String.fromCharCode(eval(`0${t+n}`))).filter(k=>~k.search(/[ -~]/)).join` `
//`
U=x=>o.innerHTML=F(+i.value);
i.onchange=i.onkeydown=i.onkeyup=i.onkeypress=U;U();
*{font-family:Consolas,monospace;}
<input id=i type="number" value=31>

Hmm, how old a JavaScript do you need that numbers beginning with 0 parse as octal?

@Neil Firefox seems to work okay with it.

Doesn't seem to work with 47.

@Neil Works again by reverting back to eval...

Ah, Number() requires 0o but eval is happy with just 0. Sorry for the confusion.

@Neil It's good!

oh right, forgot about that :P


text:
Compute overall ranking
You are given a table that represents the rankings of S subjects according to a number C of different criteria. The purpose is to

compute an overall ranking according to a weighted sum of the C ranking criteria,
using one of those criteria (i.e. columns), T, as tie-breaker.

The rankings are a S×C table of positive integers. The weights for computing the overall ranking are given as an array of non-negative numbers.
Entry (s,c) of the table contains the ranking of subject s according to criterion c; that is the position of subject s when all S subjects are sorted according to criterion c. (Another possible interpretation, not used here, would be: row s tells which user is ranked s-th according to criterion c).
Example
Consider the following table with S=6 and C=2:
1   4
4   5
6   1
3   3
5   2
2   6

Weights are
1.5 2.5

and column T=2 is used as tie-breaker.
The overall ranking for the first subject (first row) is 1*1.5+4*2.5 = 11.5. The overall ranking array is
11.5
18.5
11.5
12
12.5
18

The resulting ranking, which is the output, is then
2
6
1
3
4
5

Note that the first-ranked row is the third, not the first, according to the tie-breaking specification.
Input and output
Use any reasonable format for input and output. The rankings may be a 2D array of any orientation, an array of arrays, or separate arrays. Inputs may be taken in any fixed order.
Input and output rankings should be 1-based (as in the example above), because that's the natural way to speak of rankings.
Output may be a string of numbers with a fixed separator character or an array.
You can write a function or a program.
Test cases
Table, weights, tie-breaking column, output.
--- (Example above) ---

1   4
4   5
6   1
3   3
5   2
2   6

1.5 2.5

2

2
6
1
3
4
5

--- (Three columns) ---

4     4     1
2     3     5
5     1     3
3     5     2
1     2     4

0.5   1.4   0.9

1

3
4
1
5
2

--- (Only one weight is nonzero) ---

1     5
3     3
4     2
5     1
2     4

1     0

2

1
3
4
5
2

--- (Only one column) ---

2
4
1
3

1.25

1

2
4
1
3

--- (Only one row) ---

1 1 1

0.8 1.5 2

3

1

Jelly, 11 10 bytes
-1 byte by @Dennis
×⁵S€żị@€ỤỤ

Uses the fact that lists are lexicographically ordered.
This is a dyadic link that takes two arguments plus one input. The left argument is x, the rankings. The right argument is y, the tiebreaker. The input is the weights.
×⁵S€żị@€ỤỤ         Dyadic function. Inputs: x, y
×⁵                 Vectorized multiply x by the weights.

  S                Sum the rows.
                   This is the weighted ordering.
   ż               Zip with
    ị@€             x indexed at y, mapped over x
       ỤỤ          and compute the inverse of the permutation vector that sorts that.
                   A list is sorted by its inverse permutation, so
                   this is the inverse of the inverse; i.e. the original permutation.

Try it here.

MATL, 21 20 bytes
2#2$XSwiY*4#S)tn:tb(

Takes input as a matrix for the table of rankings, then the tie breaking column as a number, then a column vector of weightings for each column. Attempted explanation:
2#2$XS        % specifies 2 inputs/2 outputs for sortrows, takes 2 implicit inputs,
              % and sorts the matrix of ranks based on the second column. This means
              % ties are automatically broken in the correct way
wiY*          % swap the top 2 elements in the stack, take an input, and matrix multiply
              % the (sorted) ranking table by the weighting vector to give ranking array
4#S)         % sort the ranking array, taking only the permutation vector, and use it to
              % reorder the original sortrows permutation vector
tn:           % make a vector 1:(number of rows in ranking table)
tb(           % index 1:n vector using permutation vector to give final ranking
% implicit display

Try it Online!
(Written using MATL version 11.0.3 from a few weeks ago)
The equivalent Matlab code may be easier to understand:
[f,g]=sortrows(A,c); % 2#2$XS          (A=matrix of ranks, c=tie-break column)
[~,l]=sort(f*B);     % wiY*4#S        (B=weighting vector)
t=1:numel(g);        %
t(g(l))=t            % )tn:tb(

This should be able to be golfed further....

Nice approach! A recent addition that will save you 1 byte: 4#S instead of FT#S (when the number specified to # exceeds the allowed outputs, it is interpretted as ...FFTFF..)

When doing this I was thinking that something like that should be possible. I just read the spec and understand, it's a nice way to do it!

JavaScript (ES6), 114 bytes
(a,w,t)=>a.map(s=>s.reduce((p,v,c)=>p+v*w[c],0)).map((n,i,b)=>b.map((v,j)=>r+=n>v|v==n&a[j][t-1]
  a.map(s=>                        // for each row s in the criteria table
    s.reduce((p,v,c)=>p+v*w[c],0)  // create an array of the summed weights for each row
  )
  .map((n,i,b)=>                   // for each number n at i in the summed weights array b
    b.map((v,j)=>                  // compare it to each other summed weight
      r+=n>v                       // increment it's rank if n > v
        |v==n&a[j][t-1]<a[i][t-1], // or in case of tie, check the weights in column t
      r=1                          // initialise the rank to 1
    )|r                            // return the rank
  )
<textarea id="table" rows="5" cols="40">4     4     1
2     3     5
5     1     3
3     5     2
1     2     4</textarea>

Weights = <input type="text" id="weights" value="0.5   1.4   0.9" />

Tie-Breaker = <input type="number" id="tie" value="1" />

<button onclick="result.textContent=solution(table.value.split('\n').map(x=>x.split(/\s+/).map(n=>+n)),weights.value.split(/\s+/).map(n=>+n),+tie.value)">Go</button>

MATL, 16 bytes
Y*2GiY)v!4#XS4#S

Input is of the form: weights; table with each ranking on a different row; tie-breaker. Foe example,
[1.5 2.5]
[1 4 6 3 5 2; 4 5 1 3 2 6]
2

Try it online! First test case, second, third, fourth, fifth.
Y*         % implicitly input ranking table and weights. Matrix multiply, to produce
           % combined ranking as a row vector
2G         % push ranking table again
i          % input tie-breaker
Y)         % get that ranking from the table (as a row)
v!         % join combined ranking and tie-breaker column. Produce 2-col matrix
4#XS       % sort rows by first column (combined ranking) and then second
           % column (tie-breaker). Produce not the sorted matrix, but the indices
           % of the sorting, as a column vector
4#S        % sort that vector and get the indices of the sorting. Implicitly display

source: Stack Exchange

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

sort: votes


text:
Calculating dehydration synthesis results
Disclaimer: This challenge is extremely scientifically inaccurate.
;)
Given an input of a list of molecules, output what the result would be if they
were to all combine via dehydration synthesis, if possible.
For the purposes of this challenge, although this description is inaccurate, a
dehydration reaction
between two molecules is performed as follows:

Remove OH (one oxygen and one hydrogen atom) from either of the two
molecules.
Remove H (a single hydrogen atom) from the other one.
Combine the two molecules into one.

For instance, combining two
C6H12O6 molecules via dehydration
synthesis would result in
C12H22O11. Note that there are
two less Hs and one less O in the product than in the reactants. (These
missing parts would form H2O, hence "dehydration," but
that's irrelevant to this challenge.)
An example of molecules that cannot be combined via dehydration synthesis is
C6H12O6 +
CO2. The required amount of hydrogen and oxygen is
present, but neither OH nor H can be taken from the
CO2.
The format of the input for each molecule is a list of atoms concatenated. An
atom is always a single capital letter, possibly followed by a single lowercase
letter (you don't have to handle atoms like Uuo). Atoms may also have
integers ≥ 2 after them, representing how many of them there are; if this
number is not present, it is assumed to be 1. Atoms will never be repeated
within the same molecule.
Input may be provided as either an array/list/etc. of strings, or a single
string separated by any non-alphanumeric character. Output must be a single
string, but the output for "invalid input" (i.e. a list of molecules that
cannot be combined via dehydration synthesis) may be any string containing at
least one non-alphanumeric character (to distinguish from valid output). The
order of the atoms in the output does not matter.
Since this is code-golf, the shortest code in bytes will win.
Test cases (invalid output is represented here by an asterisk *):
In                                                Out
------------------------------------------------------------------
C6H12O6 C6H12O6 C6H12O6 C6H12O6 C6H12O6 C6H12O6 | C36H62O31
CHO5 CH2 CH2 CH2 CH2 CH2                        | C6H
CHO4 CH2 CH2 CH2 CH2 CH2                        | *
H H H CH3O3                                     | C
H H H CH4O2                                     | *
C6H12O6 ABCDELMNOP C6H12O6                      | *
HO HO HO H3                                     | <empty string>
HgO4 C6H12O6                                    | *
HgHO4 C6H12O6                                   | HgH11O9C6
PdZnXeRaHO KrArKRbFH                            | PdZnXeRaKrArKRbF

Flashbacks to my chem class... Nice challenge though.

Pyth (95 chars)
After seeing tiny, unreadable programs in CJam, Jelly, and Pyth, I decided to learn a golfing language, and because I am familiar with Python, I learned Pyth.  Here is my code to solve this question:
FNQ aY.dm.Dd0:N"([A-Z][a-z]*)(\d*)"4;FNYFkN XkH|s@Nk1; X"O"HJ-1lQ; X"H"H*2J;FNHI@HNpNI>@HN1p@HN

The method that I have used to combine the molecules is similar to the one that I have used above implemented in Python.  Here is a breakdown of that happens, statement by statement, character by character.
FNQ                                  For N in Q (input):
        m                             Map (same as python map())
         .Dd0                          Function for removing first element
             :N"([A-Z][a-z]*)(\d*)"4;  Get array of matches & groups
      .d                              Convert to dict
    aY                                Append to Y (pre-defined as an array)

FNY                                  For N in Y:
   FkN                                For K in N:
       XkH                             Increment/set H[k] (H pre-defined as a dict) to the following value
          |s@Nk1;                       if N[k] is null, then 1; else int(N[k])

 X"O"HJ-1lQ;                         Decrement H["O"] by length of Q - 1, and set J to length of Q - 1

 X"H"H*2J;                           Decrement H["H"] by 2 * J

FNH                                  For N in H:
   I@HN                               If H[N] (!= 0):
       pN                              Print N
         I>@HN1                       If H[N] > 1:
               p@HN                    Print H[N]

Test it!
Note: The spaces in the code are for suppressing outputs.

Python (337 336 chars)
import re
i=input().split()
a,d,o,e=[],{},"",len(i)-1
for b in i:a.append(dict(re.findall(r"([A-Z][a-z]*)(\d*)",b)))
a=[{b:int(c[b])if c[b]else 1for b in c}for c in a]
for b in a:
 for c in b:d[c]=c in d and d[c]+b[c]or b[c]
 if"H"not in b:d["-"]=0
d["H"]-=2*e;d["O"]-=e
for b in d:o+=b+(str(d[b])if d[b]-1else"")if d[b]else""
print(o)

Here is an example of how to use this program:
sh3.14$ python dehydrate.py <-Run the program
C6H12O6 HgHO4               <-Input
O9H11C6Hg                   <-Output

Try it!

I don't think having the user define i is acceptable as input. Try defining i as i=input().

@EasterlyIrk Really? I think it's valid.  Look at the question again: "Input may be provided as either an array/list/etc. of strings, or a single string separated by any non-alphanumeric character."

@KZhange yes, but consensus is that you may not force the user to do anything that modifies the code.

Here is a meta post about it: link.

@EasterlyIrk Okay, I have modified the program to be a function instead.  Thanks for notifying me, by the way.

You can also just use i=input().

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


text:
Output the Juggler sequence
The Juggler sequence is described as follows. Beginning with an input \$a_1\$, the next term is defined by the recurrence relation
$$a_{k+1} = \begin{cases}
\left\lfloor a_k ^ \frac 1 2 \right\rfloor,\text{ if } a_k \text{ is even} \\
\left\lfloor a_k ^ \frac 3 2 \right\rfloor,\text{ if } a_k \text{ is odd} \\
\end{cases}$$
The sequence terminates when it reaches 1, as all subsequent terms would then be 1.
Task
Given an input \$n\$ greater than or equal to 2, write a program/function/generator/etc. that outputs/returns the respective juggler sequence. The output can be in any reasonable form. You may not use a built-in that computes the juggler sequence, or any built-in that directly yields the result. You may assume that the sequence terminates in \$1\$.
Test Cases
Input: output
2: 2, 1
3: 3, 5, 11, 36, 6, 2, 1
4: 4, 2, 1
5: 5, 11, 36, 6, 2, 1

This is a code golf. Shortest code in bytes wins.

I got a little nerd sniped and computed the number of steps to halt for the first ~5.6*10^7 values (they all halt so far).

Reminds me of the Collatz conjecture (still unsolved)

@wim yes, it's very similar to that.

Jelly, 12 11 10 bytes
*BṪ×½Ḟµ’Ð¿

Thanks to @Sp3000 for golfing off 1 byte!
Try it online!
How it works
*BṪ×½Ḟµ’Ð¿    Main link. Input: n

*B            Elevate n to all of its digits in base 2.
  Ṫ           Extract the last power.
              This yields n ** (n % 2).
   ×½         Multiply with sqrt(n). This yields n ** (n % 2 + 0.5).
     Ḟ        Floor.

      µ       Push the previous chain on the stack and begin a new, monadic chain.
        Ð¿    Repeat the previous chain while...
       ’        n - 1 is non-zero.
              Collect all intermediate results in an array.

I'm almost afraid asking, since the poster has 87k reputation, but is it really possible to represent this in 10 bytes? You're using 10 characters, but can you really fit all of these very esoteric characters into only 256 combinations? ½, Ḟ, Ð would not seem to be my first choices for characters to add into my alphabet, considering I only have 256 places to fill...

@Annonymus Jelly uses a custom code page that encodes each of the 256 characters it understands as a sinlge byte each.

I see! Thanks. Btw, I found a bug in your table, character 20 (I'm assuming it's a space, if it isn't the "bug" is that this is unclear) gets removed since it is a lonely space, you should use   instead.

@Annonymus Yes, that looked a little weird. I didn't want to use NBSP since any attempt to copy the table would break, but   instead of the backticks seems to display an actual SP character. Thanks for pointing that out.

Julia, 64 50 48 42 32 30 bytes
g(x)=[x;x<3||g(x^(x%2+.5)÷1)]

This is a recursive function that accepts an integer and returns a float array.
We build an array by concatenating the input with the next term of the sequence, computed as x to the power of its parity plus 1/2. This gives us either x1/2 or x1+1/2 = x3/2. Integer division by 1 gets the floor. When the condition x < 3 is true, the final element will be a Boolean rather than a numeric value, but since the array is not of type Any, this is cast to have the same type as the rest of the array.
Saved 14 bytes thanks to Dennis!

Can the Julia interpreter handle source code in ISO 8859-1? Then the integer division would only be a single byte.

@MartinBüttner No, I've tried it before and it got pretty mad. Julia's parser assumes UTF-8.

JavaScript (ES7), 45 33 bytes
f=n=>n<2?n:n+","+f(n**(.5+n%2)|0)

Explanation
Recursive approach. Returns a comma-separated string of numbers.
f=n=>
  n<2?n:          // stop when n == 1
  n               // return n at the start of the list
  +","+f(         // add the rest of the sequence to the list
    n**(.5+n%2)|0 // juggler algorithm
  )

Test
** not used in test for browser compatibility.

f=n=>n<2?n:n+","+f(Math.pow(n,.5+n%2)|0)
<input type="number" oninput="result.textContent=f(+this.value)" />

I sure wish ** were supported in all browsers.

@ETHproductions I sure wish **  were supported in C#.

Mathematica, 40 39 bytes
Thanks to Martin Büttner for saving 1 byte.
NestWhileList[⌊#^.5#^#~Mod~2⌋&,#,#>1&]&

Test case
%[5]
(* {5,11,36,6,2,1} *)

MATL, 13 12 bytes
`tt2\.5+^ktq

Try it online!
Explanation
`     % do...while loop
tt   % duplicate top of stack twice, takes implicit input on first iteration
2\    % take a_k mod 2
.5+^  % adds 0.5, to give 1.5 if odd, 0.5 if even, and takes a_k^(0.5 or 1.5)
kt    % Rounds down, and duplicates
q     % Decrement by 1 and use for termination condition---if it is 0, loop will finish

Thanks Luis for saving a byte!

The floor function has been changed to k, so you can use that instead of Zo to save 1 byte. (Sorry for these changes; you can see the release summaries here)

Oh cool, thanks for letting me know!

Pyth, 14 12 bytes
.us@*B@N2NNQ

Demonstration
We start with a cumulative reduce, .u, which in this case starts at the input and applies a function until the result repeats, at which point it outputs all of the intermediate results.
The function takes the previous value as N. It starts by taking its square root with @N2. Next, it bifurcates that value on multiplication by N with *B ... N. This creates the list [N ** .5, (N ** .5) * N], the unfloored results for the even and odd cases. Next, the appropriate unfloored result is selected by indexing into the list with @ ... N. Since Pyth has modular indexing, no out-of-bounds errors are thrown. Finally, the result is floored with s.

Minkolang 0.15, 25 bytes
ndN(d$7;r2%2*1+;YdNd1=,).

Try it here!
Explanation
n                            Take number from input => n
 dN                          Duplicate and output as number
   (                         Open while loop
    d                        Duplicate top of stack => n, n
     $7                      Push 0.5
       ;                     Pop b,a and push a**b => n, sqrt(n)
        r                    Reverse stack => sqrt(n), n
         2%                  Modulo by 2
           2*                Multiply by 2
             1+              Add 1 => sqrt(n), [1 if even, 3 if odd]
               ;             Pop b,a and push a**b => sqrt(n)**{1,3}
                Y            Floor top of stack
                 dN          Duplicate and output as number
                   d1=,      Duplicate and => 0 if 1, 1 otherwise
                       ).    Pop top of stack and end while loop if 0, then stop.

APL, 28 24 16 bytes
{⌊⍵*.5+2|⎕←⍵}⍣=⎕

This is a program that accepts an integer and prints the successive outputs on separate lines.
Explanation:
{           }⍣=⎕   ⍝ Apply the function until the result is the input
 ⌊⍵*.5+2|⎕←⍵       ⍝ Print the input, compute floor(input^(input % 2 + 0.5))

Try it online
Saved 8 bytes thanks to Dennis!

TSQL, 89 bytes
Input goes in @N:
DECLARE @N INT = 5;

Code:
WITH N AS(SELECT @N N UNION ALL SELECT POWER(N,N%2+.5) N FROM N WHERE N>1)SELECT * FROM N

Java 7, 83 71 bytes
void g(int a){System.out.println(a);if(a>1)g((int)Math.pow(a,a%2+.5));}

I originally used a typical for loop, but I had to jump through hoops to get it working right. After stealing borrowing user81655's idea to recurse instead, I got it down twelve bytes.

Python 3, 57, 45, 43, 41 bytes
Better Solution with suggestion from @mathmandan
def a(n):print(n);n<2or a(n**(.5+n%2)//1)

This method will print each number on a new line
Previous Solution: Cut down to 43 bytes after xnor's recommendation
a=lambda n:[n][:n<2]or[n]+a(n**(n%2+.5)//1)

You can call the above by doing a(10) which returns [10, 3.0, 5.0, 11.0, 36.0, 6.0, 2.0, 1.0]
The above will output the values as floats. If you want them as integers, then we can just add an extra 2 bytes for 43 bytes:
def a(n):print(n);n<2or a(int(n**(.5+n%2)))

It's a bit shorter to handle the base case by doing [n][:n<2]or, or as 1/n*[n]or for the integer case.

Using Python 2, you can get it down to 41 bytes with def j(n):print n;n-1and j(n**(.5+n%2)//1).  (Or in Python 3, def j(n):print(n);n-1and j(n**(.5+n%2)//1) is 42 bytes.) It'll print the sequence term by term instead of collecting the terms in a list.

I can also remove another byte off that by doing n<2or rather than n-1and

R, 54  51 bytes
z=n=scan();while(n>1){n=n^(.5+n%%2)%/%1;z=c(z,n)};z

Saved 3 bytes thanks to plannapus.

Given that all n are positive, one can shorten floor(n^(.5+n%%2)) to n^(.5+n%%2)%/%1 I think. +1 Nonetheless.

Haskell, 70 bytes
Haskell doesn't have integer sqrt built-in, but I think there may be something shorter than floor.sqrt.fromInteger.
s=floor.sqrt.fromInteger
f n|odd n=s$n^3|1<2=s n
g 1=[1]
g n=n:g(f n)

Oracle SQL 11.2, 128 bytes
WITH v(i)AS(SELECT :1 FROM DUAL UNION ALL SELECT FLOOR(DECODE(MOD(i,2),0,SQRT(i),POWER(i,1.5)))FROM v WHERE i>1)SELECT i FROM v;

Un-golfed
WITH v(i) AS
(
  SELECT :1 FROM DUAL
  UNION ALL
--  SELECT FLOOR(POWER(i,0.5+MOD(i,2))) FROM v WHERE i>1
  SELECT FLOOR(DECODE(MOD(i,2),0,SQRT(i),POWER(i,1.5))) FROM v WHERE i>1
)
SELECT * FROM v;

Adding MOD(i,2) to .5 is shorter but there is a bug with POWER(2,.5) :
SELECT POWER(4,.5), FLOOR(POWER(4,.5)), TO_CHAR(POWER(4,.5)) FROM DUAL

gives
2   1   1,99999999999999999999999999999999999999

CJam, 18 bytes
ri{__2%.5+#i_(}g]p

Test it here
Similar to David's MATL answer.

TI-Basic, 30 Bytes
Prompt A
Repeat A=1
Disp A
int(A^(remainder(A,2)+.5->A
End
1

22 bytes if you take input from Ans, replace Repeat Ans=1 with While log(Ans, and use √(Ans)Ans^remainder(Ans,2.

Vyxal, 10 bytes
λ∷d›½e⌊;İJ

Try it Online!

JavaScript ES6, 109 102 bytes
s=>(f=n=>n==1?n:n%2?Math.pow(n,3/2)|0:Math.sqrt(n)|0,a=[s],eval("while(f(s)-1)a.push(s=f(s))"),a+",1")

I know this can be golfed. Returns a string of comma-separated numbers.

C++, 122 bytes
#include <iostream>
void f(int n){int i;while(n^1){std::cout<<n<<',';for(i=n*n;i*i>(n%2?n*n*n:n);i--);n=i;}std::cout<<1;}

Retina, 144 bytes
Input and output are in unary.
The 2nd-to-last line contains a space, and the two middle lines and the last line are empty.
{`(\b|)11+$
$&¶$&
m-1=`^(?=^(11)*(1?)).*$
$&,$2
(1+),1$
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,

m-1=`^
1:
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1

Try it online
Explanation
{`(\b|)11+$                 # Loop, Duplicate last line
$&¶$&
m-1=`^(?=^(11)*(1?)).*$     # Append ,n%2 to that line (number modulo 2)
$&,$2
(1+),1$                     # Cube that number if odd
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,                         # (Last stage of cubing number)

m-1=`^                      # Integer square root of that number,
1:                          #   borrowed and modified from another user's answer
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1

Integer square root in Retina, by  Digital Trauma

C, 64 63 61 bytes
t;q(n){for(;!t;n=pow(n,.5+n%2))printf("%d%c ",n,n^1?44:t++);}

You can replace n%2?1.5:0.5 with n%2+0.5 or .5+n%2 (if C allows it). If n%2 is true,  n%2 is 1, else 0.

Husk, 14 12 bytes
U¡o⌊?^1.5√%2

Try it online!
Explanation
U¡ȯ⌊?^1.5√%2
 ¡             iterate over the input infinitely, creating a list
  ȯ            with the following three functions:
               take the previous result
          %2   modulo 2
    ?^1.5      if truthy, raise to 3/2th power
         √     else take square root
   ⌊           floor the result
U              cut the list at fixed point

05AB1E, 12 9 bytes
Δ=DÉ·>;mï

-3 bytes thanks to @ovs.
Outputs each result on a separate line.
Try it online or verify some more test cases.
Explanation:
Δ          # Loop until the result no longer changes:
 =         #  Print the current value with trailing newline (without popping)
           #  (which will be the implicit input-integer in the first iteration)
  D        #  Duplicate the value
   É       #  Pop the copy, and check if it's odd (1 if odd; 0 if even)
    ·      #  Double that
     >     #  Increase it by 1
      ;    #  Halve it
       m   #  Take the current value to the power this 1/2 or 3/2
        ï  #  And then cast it to an integer to floor it

By combining fixed-point and manual printing, this get a bit shorter: ΔD=É·>;mï.

@ovs Ah nice. I hadn't thought about printing the results on separated newlines. That would have also resulted in a 10-byter in the infinite loop approach. But your 9-byter is even better by combining the fixed-point and printing indeed, thanks! :)

Jelly, 7 bytes
*Ḃ×½ḞµƬ

Try it online!
Basically Dennis' method, but updated to use the modern version of Jelly. I initially had 9 bytes, but switching to the ×½ method saved 2 bytes.
How it works
*Ḃ×½ḞµƬ - Main link. Takes n on the left
     µ  - Group the previous links into a monad f(n):
 Ḃ      -   Bit; n % 2
*       -   n ** (n % 2)
   ½    -   n ** (1 / 2)
  ×     -   n ** (n % 2 + 1 / 2)
    Ḟ   -   Floor
      Ƭ - Repeatedly apply f(n), yielding [n, f(n), f(f(n)), ..., 1]

Factor, 52 bytes
[ [ 3 dupn . odd? 3/2 .5 ? ^ 1 /i dup 1 > ] loop . ]

Try it online!

Lua, 49 bytes
b=...repeat a=b print(a)b=b^(.5+b%2)//1until a==b

Try it online!

Vyxal, 55 bitsv2, 6.875 bytes
∷.+e⌊)↔

Try it Online!
Explained
∷.+e⌊)↔
     )↔  # Generate until fixed point, starting with the input:
∷.+      #   Add the bit parity of the argument to 0.5 (0.5 if even, 1.5 if odd)
   e     #   And raise the argument to that number
    ⌊    #   Floor it.

Created with the help of Luminespire.

Nibbles, 7.5 bytes (15 nibbles)
`.$^^$^3%$~-2

Attempt This Online!
`.              # iterate while unique
  $             # starting with input:
        %$~     #  result-so-far modulo-2
      ^3        #  3 to the power of that (so: 3 or 1)
    ^$          #  result-so-far to the power of that
   ^       -2   #  floor square-root

TI BASIC, 43 bytes
I'm pulling a Thomas Kwa and answering this one on my mobile.
Input N
Repeat N=1
Disp N
remainder(N,2->B
If not(B:int(sqrt(N->N
If B:int(N^1.5->N
End
1

Replace sqrt with the actual symbol on your calculator. Displays a linefeed separated list of numbers, which is a reasonable format.

You can golf this more.

@ThomasKwa Yeah, you're probably right. I'll think about it for a bit.

JavaScript ES6, 76 bytes
Is a generator named j. To use, set a = j(<your value>);. To see the next value in the sequence, enter a.next().value.
function*j(N){for(yield N;N-1;)yield N=(N%2?Math.pow(N,3/2):Math.sqrt(N))|0}

Ungolfed:
function* juggler(N){
    yield N;
    while(N!=1){
        N = Math.floor(N % 2 ? Math.pow(N,3/2) : Math.sqrt(N));
        yield N;
    }
}

Perl 5, 34 bytes
33, plus 1 for -pE instead of -e
say;($_=int$_**($_%2+.5))-1&&redo

Explanation
First, -p sets the variable $_ equal to the input from stdin. Then we start a block of code:

say prints $_.
$_=int$_**($_%2+.5) sets $_ equal to the integer part of {$_ to the power of {{$_ modulo 2} + 0.5}}, due to the magic of order of operations (operator precedence). This assignment returns the new value of $_, and
(...)-1&&redo tests that returned value, minus 1. If the difference is 0, do nothing; otherwise, redo this block.

Finally, -p prints $_.
Of equal length
Also uses -p.
say()-($_=int$_**($_%2+.5))&&redo

This: prints $_; assigns as above; tests whether the return value of say (which is 1), minus the new value of $_, is 0, and redoes the block if so; then prints $_ at the end.

F# 77 bytes
Doesn't terminate at 1, but keeps going.
let j=Seq.unfold(fun x->Some(x,floor(match x%2. with 0.->x**0.5|1.->x**1.5)))

Usage:
j 3.;;
> val it : seq<float> = seq [3.0; 5.0; 11.0; 36.0; ...]

Version that actually terminates at 1, 100 bytes
let j=Seq.unfold(fun x->if x=1. then None else Some(x,floor(match x%2. with 0.->x**0.5|1.->x**1.5)))

Ungolfed
let juggle input =
    let next x =
        floor
            (match x % 2. with
                | 0. -> x ** 0.5
                | 1. -> x ** 1.5
                | _ -> failwith "this should never happen") // addressing a compiler warning
    Seq.unfold (fun x -> if x = 1. then None else Some(x, next x)) input

C#, 62 bytes
string f(int n)=>n+(n<2?"":","+f((int)Math.Pow(n,.5+n%2)));

Inspired by @user81655 and @Alex A., I used recursion.

dc, 22 21 bytes
[pd2%2*1+^vd1<F]dsFxn

Explained:
[                # Begin macro definition
 p               # Peek at top of stack (print without popping, followed by newline)
 d               # Duplicate top of stack
 2%              # Mod 2: If even, 0; if odd, 1
 2*1+            # If even: 0*2+1==1; if odd: 1*2+1==3
 ^v              # Raise, then square root: equivalent to `^(0.5)' or `^(1.5)'
 d1<F            # If result is not 1, run macro again
]dsFx            # Duplicate macro, store as `F', execute
n                # Print the final "1"

There's a bug: When the input is 1, the output consists of two 1s.

Raku, 30 bytes
{$_,{floor $_**(.5+$_%2)}...1}

Try it online!
This anonymous function returns the sequence of Juggler numbers.  { floor $_ ** (.5 + $_ % 2) } evaluates each successive term of the sequence, the floor of the previous number $_ raised to a power which is one-half plus the that number modulo 2.

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


text:
Chocolate numbers
Given an m by n chocolate bar, m,n positive, output the number of ways to break the bar into mn 1 by 1 pieces where each break occurs on a gridline.
Order is important. Pieces are also distinguishable, so the two pieces on either end of a 1 by 3 chocolate bar are not equivalent.
For instance, for a 2 by 2 block we have:
 _ _            _   _            _   _            _   _
|_‖_|    ->    |‗| |_|    ->    |_| |‗|    ->    |_| |_|
|_‖_|          |_| |_|           _  |_|           _   _
                                |_|              |_| |_|

 _ _            _   _            _   _            _   _
|_‖_|    ->    |_| |‗|    ->    |‗| |_|    ->    |_| |_|
|_‖_|          |_| |_|          |_|  _            _   _
                                    |_|          |_| |_|

 _ _            _ _              _   _            _   _
|‗|‗|    ->    |_‖_|      ->    |_| |_|    ->    |_| |_|
|_|_|           _ _               _ _             _   _
               |_|_|             |_‖_|           |_| |_|

 _ _            _ _               _ _             _   _
|‗|‗|    ->    |_|_|      ->     |_‖_|    ->     |_| |_|
|_|_|           _ _              _   _            _   _
               |_‖_|            |_| |_|          |_| |_|

Hence there are 4 ways to break up a 2 by 2 chocolate bar.
Rules

Input will be two integers via function input, STDIN, command line or similar. Output a single number, the number of ways to break up the chocolate bar.
Since the numbers go up pretty quickly, don't worry if the output exceeds the integer limits of your language – your submission will be valid as long as the algorithm theoretically works for all possible inputs.

Test cases
The output doesn't depend on the order of m,n, so the test cases are listed such that m <= n.
1 1 -> 1
1 2 -> 1
1 3 -> 2
1 4 -> 6
1 5 -> 24
1 10 -> 362880

2 2 -> 4
2 3 -> 56
2 4 -> 1712
2 5 -> 92800
2 10 -> 11106033743298560

3 3 -> 9408
3 4 -> 4948992
3 5 -> 6085088256
3 10 -> 76209753666310470268511846400

4 4 -> 63352393728

A261964 is the chocolate numbers arranged in a triangle such that each row corresponds to the sum m+n.

Mathematica, 85 bytes
f=If[##==1,1,Tr[Sum[Binomial[1##-2,i#-1]f[i,#]f[#2-i,#],{i,#2-1}]&@@@{{##},{#2,#}}]]&

Test case
f[4,4]
(* 63352393728 *)

Python 3, 168, 156, 147 bytes
Made improvements thanks to chat
f=lambda n:n<1or n*f(n-1);a=lambda m,n,c=lambda m,n:sum(f(m*n-2)/f(i*n-1)/f((m-i)*n-1)*a(i,n)*a(m-i,n)for i in range(1,m)):+(m+n<4)or c(m,n)+c(n,m)

Ungolfed:
f=lambda n:n<1or n*f(n-1) # Factorial
def a(m, n):
    if m+n < 4:
        return 1
    first = 0
    for i in range(1,m):
        first += f(m*n-2) * 1/f(i*n-1) * 1/f((m-i)*n-1) * a(i,n) * a(m-i,n)
    second = 0
    for i in range(1,n):
        second += f(m*n-2) * 1/f(i*m-1) * 1/f((n-i)*m-1) * a(i,m) * a(n-i,m)
    return first + second

Algorithm was based on this paper.
I could probably cut it down a lot more, I'm just not sure where

R, 208 198 bytes
f=function(m,n){g=function(i,j){a=0;if(j>1)for(x in 2:j-1)a=a+choose(j*i-2,x*i-1)*M[x,i]*M[j-x,i];a};s=max(m,n);M=matrix(1,s,s);for(i in 1:s)for(j in 1:s)if(i*j>2)M[i,j]=M[j,i]=g(i,j)+g(j,i);M[m,n]}

Indented, with newlines:
f = function(m,n){
    g=function(i,j){
        a = 0
        if(j>1) for(x in 2:j-1) a = a + choose(j*i-2,x*i-1) * M[x,i] * M[j-x,i]
        a
    }
    s = max(m,n)
    M = matrix(1,s,s)
    for(i in 1:s) for(j in 1:s) if(i*j>2) M[i,j] = M[j,i] = g(i,j) + g(j,i)
    M[m,n]
}

Usage:
> f(3,1)
[1] 2
> f(3,2)
[1] 56
> f(3,3)
[1] 9408
> f(4,3)
[1] 4948992
> f(5,3)
[1] 6085088256

In theory, one can write a shorter recursive version of ca. 160 bytes but it quickly reaches the default recursion limit and the default protection stack size and modifying these defaults (respectively using options(expressions=...) and argument --max-ppsize=) would result in a longer code than this one.

You can save two bytes by omitting f=.

Python 2, 135 bytes
C=lambda A:sum(C(A[:i]+A[i+1:]+[(c,H),(W-c,H)])for i,Q in enumerate(A)for W,H in(Q,Q[::-1])for c in range(1,W))or 1
print C([input()])

Here's what I came up with. It's really slow, but here's a faster version (needs repoze.lru):
from repoze.lru import lru_cache
C=lru_cache(maxsize=9999)(lambda A:sum(C(tuple(sorted(A[:i]+A[i+1:]+((c,H),(W-c,H)))))for i,Q in enumerate(A)for W,H in(Q,Q[::-1])for c in range(1,W))or 1)
print C((input(),))

Examples
$ time python2 chocolate.py <<< 2,5
92800

real    0m2.954s
user    0m0.000s
sys     0m0.015s

$ time python2 chocolate-fast.py <<< 3,5
6085088256

real    0m0.106s
user    0m0.000s
sys     0m0.015s

Explanation
The code defines a function C that takes an array of pieces. The algorithm is as such:

for i,Q in enumerate(A): loop through the array of pieces.
for W,H in(Q,Q[::-1]): calculate ways twice, rotating 90 degrees.
for c in range(1,W): loop through possible positions to split at.
A[:i]+A[i+1:]+[(c,H),(W-c,H)]: get a list without the split piece and with the two new pieces.
C(…): call the function again on that list.
sum(…): sum the results for each possible split.
or 1: if no splits are possible, there is exactly one way to split the chocolate.

Finally, the code is called with an array containing the input.

ES6, 141 bytes
c=(m,n)=>(f=n=>n<2||n*f(n-1),h=(m,n)=>[...Array(m-1)].reduce((t,_,i)=>t+f(m*n-2)/f(++i*n-1)/f((m-i)*n-1)*c(i,n)*c(m-i,n),0),h(m,n)+h(n,m))||1

Based on the formula found by @CameronAavik. Ungolfed:
function fact(n) {
    return n < 2 ? 1 : n * f(n - 1);
}
function half(m, n) {
    total = 0;
    for (i = 1; i < m; i++)
        total += fact(m * n - 2) / fact(i * n - 1) / fact((m - i) * n - 1) * choc(i, n) * choc(m - i, n)
    return total;
}
function choc(m, n) {
    total = half(m, n) + half(n, m);
    if (!total) total = 1;
    return total;
}


text:
Knights and Knaves
This is code-golf.
In this challenge, we will be writing programs/functions that solve "Knights and Knaves" puzzles.
Background
You find yourself on an island ... etc. ... every  person on the island except for you is either a knight or a knave.
Knights can only make true statements.
Knaves can only make false statements.
I don't want to rigorously define "statement," but we will say a statement is anything which is either "true" or "false." Note that this excludes paradoxical sentences.
For the purposes of this challenge, you will be coming across groups of islanders; they will make statements to you.
Your task is to determine who is a Knight and who is a Knave.
Input:
You will be given (in any reasonable format) the following information:

A list of the people present. They will be named with uppercase alphabet characters "A-Z". The limit on the number of people imposed by this will not be exceeded.
The statements that each person makes. See below for important details about this.

Output
You will then output (in any reasonable format) what each person is. For example, if there were players A B C D and A is a knight, but the rest are knaves, you could output
A: 1
B: 0
C: 0
D: 0

Important details:

Uppercase alphabet characters A-Z refer to islanders.
The characters 0 (zero) and 1 (one) refer to a "Knave" and a "Knight", respectively. (You can any other two non A-Z characters, as long as you specify)
Each islander present may make any natural number of statements, or may choose to say nothing.
The normal logical operators can be used in statements (IS*, AND, OR, NOT). On top of this, De Morgan's Laws and Conditionals may be used. The following are examples of how they might be presented in a spoken puzzle followed by how they might be input into your program.

(* on a more technical note. The "IS" operator is really used as containment (which isn't a logical operator). When I say "A is a Knight", I really mean "A is a member of the set of Knights". The true operator used would be 'ϵ'. For simplicity's sake, we will instead be using '='.)
I use the following (you may use whatever, as long as it is reasonable and consistent):

^ AND
v OR
= IS
~ NOT
=> IMPLIES
X: Person X claims that...

Person Z could make any combination of any of the following types of statements:
Person Z says that...

Person A is a Knight.
Z: A = 1
Person Q is a Knave.
Z: Q = 0
I am a Knight.
Z: Z = 1
Person A is a Knight OR Person B is a Knight.
Z: ( A = 1 ) v ( B = 1)
Person C is a Knight AND I am a Knave.
Z: ( C = 1 ) ^ ( Z = 0 )
Person R is NOT a Knight.
Z: ~( R = 1 )

On top of this, input may also use De Morgan's Laws

It is NOT True that both person A and Person B are Knaves
Z: ~( ( A = 0 ) ^ ( B = 0 ) )
It is False that either person A or person B is a Knight
Z: ~( ( A = 1 ) v ( B = 1) )

Finally, conditionals and their negations may be used

If I am a Knight, then person B is a Knave
Z: ( Z = 1 ) => ( B = 0 )
It is NOT True that If person B is a Knight, Then Person C is a Knave.
Z: ~( ( B = 1 ) => ( C = 0 ) )

Notes on conditionals
Check out wikipedia for more info.
A conditional statement takes the form p => q, where p and q are themselves statements. p is the "antecedent " and q is the "consequent". Here is some useful info

The negation of a condition looks like this: ~( p => q ) is equivalent to p ^ ~q
A false premise implies anything. That is: if p is false, then any statement p => q is true, regardless of what q is. For example: "if 2+2=5 then I am Spiderman" is a true statement.

Some simple test cases
These cases are given in the following fashion (1) how we would pose the problem in speech (2) how we might pose it to the computer (3) the correct output that the computer might give.

Person A and Person B approach you on the road and make the following statements:
A: B is a knave or I am a knight.
B: A is a knight.

Answer:

 B is a Knight and A is a Knight.

Input:
A B        # Cast of Characters
A: ( B = 0 ) v ( A = 1)
B: A = 1

Output:

    A = 1
    B = 1

Persons A, B, and F approach you on the road and make the following statements:
A: If I am a Knight, then B is a Knave.
B: If that is true, then F is a Knave too.

Answer:

 A is a Knight, B is a Knave, F is a Knight.

Input
A B F
A: ( A = 1 ) => ( B = 0 )
B: ( A = 1 ) => ( F = 0 )

Output:

    A = 1
    B = 0
    F = 1

Q, X, and W approach you on the road and make the following statements:
W: It is not true that both Q and X are Knights.
Q: That is true.
X: If what W says is true, then what Q says is false.

Answer:

 W and Q are Knights. X is a Knave.

Input
Q X W
W: ~( ( Q = 1 ) ^ ( X = 1 ) )
Q: W = 1
X: ( W = 1 ) => ( Q = 0 )

Output

    W = 1
    Q = 1
    X = 0

There is a  similar challenge from 3 years ago that focuses on parsing and does not contain conditionals or De Morgan's. And therefore, I would argue, is different enough in focus and implementation to avoid this being a dupe.
This challenge was briefly closed as a dupe. It has since been reopened.
I claim that this challenge is, first off, different in focus. The other challenge focuses on English parsing, this does not. Second it uses only AND and OR whereas this uses conditionals and allows for the solving of many more puzzles. At the end of the day, the question is whether or not answers from that challenge can be trivially substituted to this one, and I believe that the inclusion of conditionals and conditional negations adds sufficient complexity that more robust changes would need to be made in order to fit this challenge.

What can we conclude if a Knave says (B=1)=>(C=0)? ~((B=1)=>(C=0)) or (B=1)=>(C=1) or something else?

This is impossible to do in less than 5 minutes. This problem is known as SAT, and is exponential in complexity. Thus for n=26 in the general case (not 2 SAT), it is impossible to solve on a computer in a reasonable time.

Your first test case have 2 possible output. As you're using logical OR, it could be A:1 B:1 or A:1 B:0 because B's B=1 could be false while A would still be true.

@njpipeorgan If the Knave is B, he cannot say that. A false premise implies anything and therefore that statement would be true. If the Knave what a different character, you would take the negation, which is (B=1)^(C=1) as per how conditionals are normally dealt with

@Labo Thank you for clarifying that for me. I have removed the tie constraint.

@Katenkyo I believe it is correct. If A is a Knight, then B is making a true statement and hence must be a Knight. This leads to no inconsistencies. If A is a Knave, then his statement is false, so B must be a Knight. However, B claims that A is a Knight, which is inconsistent with what we know. Therefore it is impossible that A is a Knave as this leads to inconsistencies. So A must be a Knight and so B must be a Knight as well.

I believe your second test case is incorrect. If B is a knave, that means he is lying when he said that "if A is a knight, then F is a knight". The correct situation would be that that A is a knight, and both B, and F are knaves. Let me know if I am misunderstanding something

@CameronAavik I believe my work was correct. Assume B is a knave. Then his statement is false. The negation of a conditional p=>q is p^~q. Therefore B tells us that A is a knight and NOT ( F is a knave ).

It would be showing A is a knight and NOT ( F is a knight) which would turn up false

@CameronAavik I'm still pretty sure I'm right. join us in chat to discuss if you want.

For those wondering, the real issue was because I was looking at the input query and he was looking at the worded puzzle. That has been fixed

@Liam Oh, my bad, I've read it like B: B is a knight instead of B: A is a knight

Python 3, 450 342 307 bytes
Edit: it turns out I forgot an import...
My first solution takes advantage of having flexible naming for queries
from functools import*
def g(c,r):c=c.split();l,y=len(c),range;d=[dict((c[i],n>>i&1)for i in y(l))for n in y(2**l)];return[n[1]for n in[[eval(reduce(lambda x,y:x.replace(y,str(d[i][y])),d[i],')and '.join(['not',''][d[i][s[0]]]+'('+s[2:].replace('->','<1or')for s in r)+')')),d[i]]for i in y(len(d))]if n[0]]

You can call the above one with
g('Q X W', ['W: not( ( Q == 1 ) and ( X == 1 ) )','Q: W == 1', 'X: ( W == 1 ) -> ( Q == 0 )'])

The next one here uses the same format of queries as seen in the OP, it also doesn't have some of the modifications I made to the first one. It is 417 bytes because it converts between the two formats.
from functools import*
def g(c,r):c=c.split();l,y=len(c),range;d=[{**dict((c[i],n>>i&1)for i in y(l)),**{'v':'or','^':'and','=':'==','~':'not'}}for n in y(2**l)];f=lambda r,c:reduce(lambda x,y:x.replace(y,str(c[y])),c,('(0<1'+''.join([')^ '+['~',''][c[t[0]]]+'('+t[1]for t in[s.split(":")for s in r]])+')').replace('=>','<1or'));return[dict((o,j) for o,j in n[0].items() if o in c) for n in[[d[i],eval(f(r,d[i]))]for i in y(len(d))]if n[1]]

And it can be called by:
g('Q X W', ['W: ~( ( Q = 1 ) ^ ( X = 1 ) )','Q: W = 1', 'X: ( W = 1 ) => ( Q = 0 )'])

They both return
[{'X': 0, 'W': 1, 'Q': 1}]

Ungolfed Explanation:
from functools import *
def knight_and_knaves(cast,rules):
    # turns 'A B C' into ['A','B','C']
    cast = cast.split()
    # gets all numbers that can fit in len(cast) bits
    bitmasks = range(2 ** len(cast))
    # for every bitmask, apply the value for a bit to the boolean value for each cast member.
    # This returns a dictionary of all possible outcomes.
    d=[dict((cast[i], n>>i & 1) for i in range(len(cast))) for n in bitmasks]
    # Split rules at colon
    rules = [s.split(":")for s in rules]
    # Turns list of rules into one python expression, joins each rule with ')and ', maybe a 'not' depending on if the hypothesis has the rule as a lie, and '('.
    # Also replaces '->' with '<1or' which is equivalent to it. Also starts with '(True' and ends with ')' to resolve missing parentheses
    transform_rules = lambda d, rules: ('(True' + ''.join([')and ' + ['not', ''][d[rule[0]]] + '(' + rule[1].replace('->','<1or') for rule in rules]) + ')')
    # Applys transform_rules on each outcome and evaluates the result, storing it into a list of lists where each element is [outcome, value]
    outcomes=[[d[i],eval(reduce(lambda x,y:x.replace(y,str(d[i][y])),d[i],transform_rules(d[i], rules)))] for i in range(len(d))]
    # Filters outcomes if value is True
    return[n[0]for n in outcomes if n[1]]

Also, the second solution needs 3.5 (not 3.4) due to the use of PEP 448

Mathematica, 80 bytes
F[c_,s_]:=Select[Thread[c->#]&/@{True,False}~Tuples~Length@c,And@@Equal@@@s/.#&]

Explanation
The function F takes two arguments,

c is a list of all characters' names,
s is a list of statements, each of which contains two parts - who says what.

For example, there are three characters, Q, X and W.
characters={q,x,w};

And they say,
statements=
   {{w, !((q==True)&&(x==True))   },
    {q, w==True                   },
    {x, Implies[w==True,q==False] }};

where True and False means Knights and Knaves respectively. Then
F[characters, statements]

will give {{q->True, x->False, w->True}}, which means there is only one solution that Q and W are Knights while X is a Knave. If there are more than one solution, the output will look like {{...},{...},...}

The algorithm is very simple. {True,False}~Tuples~Length@c gives all possible combinations of Knights and Knaves among the characters. Then Thread[c->#]&/@ construct an array of rules based on these combinations. In the case of two characters A and B, the array will be
{{a->True, b->True },
 {a->True, b->False},
 {a->False,b->True },
 {a->False,b->False}}

Substituting the statements with one row of these rules, we will get an array looks like
{{True,True},{True,False},{False,False}}

The first column of this array is the identities of the speakers, and the second column indicates whether their statements are true or false. A valid solution requires the accordance between speakers' identities and their statements. The array above means that this combination is not a solution, since the second speaker, a Knight, makes an incorrect statement.
Select[...,And@@Equal@@@s/.#&]

does the substitutions and select those combinations that satisfy the condition.

Ruby, 128
This is the same algorithm as everyone else, try all possible combinations of knaves and knights and see which sticks.  I have another that I'm working on, but I think it'll be longer (though more interesting).
The statement inputs must be:

& AND
| OR
== IS
! NOT
> IMPLIES
X: Person X claims that...

I also require each statement and sub-statement to be in parentheses.  The only problem with this version is that it goes through at most 2^26 iterations, and if they're not all knaves, at least 2^(26-n) iterations!  To put that in perspective, that means that if there are two people, and at least one is not a knave, it will take a minimum of 16,777,216 iterations!
To limit that, I submit the following at 168 bytes.  Sub in 26 for #{o.size} to cut it back to 161.
->s{o=s[/.*?$/].split
i=0
eval h=o.zip(("%0#{o.size}b"%i+=1).chars).map{|k|k*?=}*?;until h&&o.all?{|t|!s[/#{t}:(.*)$/]||eval("(#{t}<1)^(#{$1.gsub(?>,'!=true||')})")}
h}

But if I can instead use an array of people and a map of statements e.g.:
c[[?A, ?B],
  {
    ?A=> "( B == 0 ) | ( A == 1)",
    ?B=> "A == 1"
  }
 ]

Then I get it down to 128.
->o,s{i=0
eval h=o.zip(("%026b"%i+=1).chars).map{|k|k*?=}*?;until h&&s.all?{|t,k|eval("(#{t}<1)^(#{k.gsub(?>,'!=true||')})")}
h}


text:
Shorter way to assign a default value to the standard output stream
I have this code :
tr ' ' '\n'|sort -n|head -1

The code is pretty simple, it takes a list of integer in the standard input stream (like 5 9 8 7 5 2 -12 -30), it sort the integers and display only the first integer. But i need to ouput 0 if the given list is empty. And i can't find a short way to that. I have a solution with a ternary operator and a echo 0, but i feel i can do far better. I just need to replace the input stream by 0 if this stream is empty.
Sidenote : I don't need to call read to get the user input. The program is called with the input stream directly like cmd < 1 5 6 -20 45
Here my current code :
read l
[ -n "$l" ]&&echo $l|tr ' ' '\n'|sort -n|head -1||echo 0

@Pietu1998 i added my current code

In this case you can cheat by always outputting a 0 first, if leading zeroes are allowed.

@orlp nice thinking but sadly leading zeroes are not allowed

This looks like a programming problem to go on Stack Overflow. I'm not sure though; I haven't done any action on the question in terms of close/up/down voting.

@AlexL. Make code X shorter will be very poorly received on Stack Overflow.

@Dennis That's for sure. But for one thing, this question isn't marked with the tag code-golf. Also, language-specific code-golf problems are generally not advised.

@AlexL. This isn't a code golf contest, it's a tips question, which is one of the con-challenges that are considered on topic.

@Dennis Whoops. Sorry for the confusion. I'm relatively new to the PPCG community and how it works. Thanks!

37 33 32 bytes
tr \  \\n|sort -n|sed s/^$/0/\;q

Edit: Saved 4 bytes thanks to @DigitalTrauma.

sed 1q is one shorter than head -1.  Then you can combine the sed expressions to get 33 bytes: tr \  \\n|sort -n|sed s/^$/0/\;1q

@DigitalTrauma Am I overlooking something or does sed q work?

yes - even better!

@DigitalTrauma @Neil The sed script can be shortened by 1 byte further using /./q\;c\0 as long as the empty list doesn't contain white spaces.

tr \  \\n -> fmt -1

34 bytes
a=($(tr \  \\n|sort -n))
echo $[a]

The first line saves the sorted input values in an array a.
This avoids using head -1, since referencing the array as $a will yield its first value.
The second line uses a in the arithmetic expansion $[a]. In this context, an empty string is interpreted as 0.
For a different default value, parameter substitution could be used instead. For example, the last line could become
echo ${a:-puppies}

42 bytes
Two different ways that have the same byte-count
Use awk as the last command
tr ' ' '\n'|sort -n|awk 'NR==1{print $1+0}'

Or do all the computations in awk
awk -v RS=" " '{m=m>$1?m:$1}END{print m+0}'

I could shrink the all in awk version by a couple bytes using awk -v RS=" " '$1>m{m=$1}END{print m+0}', but then the two versions would have different byte-counts. :p

Pure bash: 41 bytes.
No requirement of any tr, sort, head...
t=${1:-0};for i;{ ((t=i<t?i:t));};echo $t

In a function you could use local -i for integer variables:
f() { local -i t=$1;for i;{ ((t=i<t?i:t));};echo $t;}

Then
f 5 9 8 7 5 2 -12 -30
-30

f
0

Note: If you need to read them from stdin
read l
f $l

will do the job.
As:
read l;for i in ${l:-0};{ ((t=i<t?i:t));};echo $t;}

Another version 58 bytes.
Something longer, but could be quicker, as there is no loop.
. <(printf v[%d+99**9]=\  $@);v=(${!v[@]});echo $[v-99**9]

In a function:
f() { local v;. <(printf v[%d+99**9]=\  $@)
      v=(${!v[@]});echo $[v-99**9];}

Then
f 34 56 1000 12  -156 53 -12 -21 321 3221
-156

f
0

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


text:
Solving variants of the blue-eyes puzzle
The original "Blue Eyes" puzzle is given here (and below).

A group of people with assorted eye colors live on an island. They are
  all perfect logicians -- if a conclusion can be logically deduced,
  they will do it instantly. No one knows the color of their eyes. Every
  night at midnight, a ferry stops at the island. Any islanders who have
  figured out the color of their own eyes then leave the island, and the
  rest stay. Everyone can see everyone else at all times and keeps a
  count of the number of people they see with each eye color (excluding
  themselves), but they cannot otherwise communicate. Everyone on the
  island knows all the rules in this paragraph.
On this island there are 100 blue-eyed people, 100 brown-eyed people,
  and the Guru (she happens to have green eyes). So any given blue-eyed
  person can see 100 people with brown eyes and 99 people with blue eyes
  (and one with green), but that does not tell him his own eye color; as
  far as he knows the totals could be 101 brown and 99 blue. Or 100
  brown, 99 blue, and he could have red eyes.
The Guru is allowed to speak once (let's say at noon), on one day in
  all their endless years on the island. Standing before the islanders,
  she says the following:
"I can see someone who has blue eyes."
Who leaves the island, and on what night?

The answer is that they all leave on the hundredth day. This is due to the following logic:

If there is one blue-eyed person only, he will leave on day 1. If
  there are two-blue-eyed people only, nobody leaves on day 1. Following
  this, they both leave on day 2. Now if there are 3 blue-eyed people,
  nobody leaves on day 1. Nobody leaves on day 2 either. Now everyone
  knows that there are 3 blue-eyed people, because if there were only
  one, he would have left on day 1 and if there are two, they both would
  have left on day 2. Hence all 3 leave on day 3.
We can now write an inductive proof that if n blue-eyed people require
  n days to figure out their eye colours and leave, then n+1 blue-eyed
  people require n+1 days to do the same.

However, the code you write should be capable of solving not just the original puzzle, but also some variants that require slightly different inductive steps.
You will be told how many of the islanders have blue eyes and how many don't. You will also be given a statement by the oracle (a system of equations/inequations) that everyone on the island hears. You need to determine when the island will be free of the blue-eyed people.
The oracle's statements will use b for the number of blue-eyed people and r for the number of non-blue-eyed people. The equations can include < > <= >= = + - and any whole numbers.
Test cases
Based on this set of variants
50 50
b>=1
b<b+r

Output: 50
The second equation gives no new information, hence this problem becomes exactly the same as the original puzzle.
100 50
b+3>=r+4

Output: 25
100 0
b-2>8+1-1

Output: 90
50 50
b>=10
b<=75

Output: 41

@Dennis Is it ok now?

I think so. One minor clarification: It doesn't look like it from the test cases, but can the (in)equations include implicit multiplications like 3b<2r?

@Dennis No, but it could be written as b+b+b < r+r instead.

The third test case claims to be based on “At least 10 of you are blue-eyed”, but it actually simplifies to b>10, not b>=10, so the output should be 90, not 91.

@AndersKaseorg Too lazy to check but I believe you, hence edited.

Python 2, 60 48 bytes
f=lambda b,r,c:all(map(eval,c))and-~f(b-1,r+1,c)

Try it online!
How it works
By induction:

If the island composition is (b, r) and it is known that (b − 1, r + 1) is not possible, then on day 1, the blue-eyed islanders, seeing (b − 1, r), will conclude that they are blue-eyed and leave.
If the island composition is (b, r) and it is known that the blue-eyed islanders would have left on day n if the composition were (b − 1, r + 1), then on day n + 1, the blue-eyed islanders, seeing (b − 1, r), will conclude that they are blue-eyed and leave.

This second inference fails if b = 1, but in that case, the blue-eyed islander would never leave if they hadn’t already, and the test case would be invalid.
Note that non-blue-eyed islanders will never leave, in this version of the puzzle, because even if they use similar logic to conclude that they are not blue-eyed, they still don’t know which non-blue color their eyes are.

-12 bytes using a recursive function


text:
Implement decimal-multiplication modulo
Most people can't easily do modulus (or work out if a number is divisible by another number) in their heads because long division is harder than addition, subtraction and multiplication. The following method describes a way to calculate modulus in your head, as long as you can remember just a few different numbers. This challenge is to write some code that replicates this method instead of using the built-in modulo operator.
I apologise in advance for all of the restrictions, they are there to (hopefully) stop people from trying to work around the problem, instead of solving it the way it's presented. Another way of thinking about this is to assume that division is prohibitively expensive but the other three basic operators are relatively cheap to perform.

Decimal-multiplication modulo (d mod n) works by splitting the dividend (d) into chunks of the same length as the divisor (n), working from right to left. Then, working from left to right, each chunk is summed to a running total and the total is multiplied by a constant (c) before summing the next chunk. c is calculated by subtracting n from the next highest power of 10.

You may use any method to calculate the lowest power of 10 that is greater than n, including logarithms
You may keep subtracting n from c until c is less than n (but not negative)
You must not use division or modulo to calculate c
You must not convert any number to any base other than base 10
You may use any method to split d into groups of decimal digits, including division and modulo if it makes your code easier
You must only use the following mathematical operators on the chunks

addition: +, ++
subtraction: -, -- (not on numbers with more digits than n has)
multiplication: * (only by c)
comparison (<, >, ==, <=, >=, !=/<>)

You must not use subtraction on any number with more digits than n, except when calculating c
You must not subtract any value other than c, except when calculating c
You must not multiply by any value other than c
You must not use negative numbers at any point, including as the result of any calculation

You don't have to implement the method exactly as described here as long as you stick to its principles. E.g., if the divisor is 37 and one of the chunks is 56, you can subtract 37 from 56 to give 19 before using it further.
Your code will take two integers or string representations of decimal integers, whichever is most natural for your language. The first will be non-negative (d ≥ 0), the second will be positive (n ≥ 1). Your code will output a decimal integer or a string representation containing the result 0 ≤ d mod n ≤ n - 1.
Example
1234 mod 37
The lowest power of 10 higher than 37 is 100
c = 100 - 37 = 63 (26 is also acceptable as it is 63 - 37)
37 has two digits so split 1234 into two-digit chunks:
1234
% 37
====
12 34  -> vv
--
26 *  0 + 12 = 12
   --
26 * 12 + 34 = 346

346 has more than two digits, repeat the process:
 346
% 37
====
 3 46  -> vv
--
26 *  0 +  3 = 3
   --
26 *  3 + 46 = 124

124 also has more than two digits, repeat the process once more:
 124
% 37
====
 1 24  -> vv
--
26 *  0 +  1 = 1
   --
26 *  1 + 24 = 50

Since 50 has two digits and is larger than 37, subtract 37 from it as many times as needed to bring the total below 37.
  50
- 37
====
  13

13 is indeed 1234 mod 37.
This is code-golf, so the lowest score wins!

What range do we need to support for d and (separately) n?

@Neil Any integers your language can support, including integers represented by floating point without loss of precision. For many languages this will be numbers up to 9007199254740991 (64-bit IEEE 754).

3 downvotes, no explanations. Do you think the challenge is bad, badly defined, or badly worded? I'm happy to improve it if you give me feedback.

I downvoted due to all the restrictions. An "implement this algorithm in the shortest code" question is usually less interesting than a "solve this problem in the shortest code" question; I don't think this is an exception.

@ThomasKwa Solve this problem (mod) is a single operator in most languages, and often a single character (%). I'm attempting to replicate a method that a person can do in their head. The restrictions are because usually, no matter no carefully I explain what I am expecting, someone comes along and finds a loophole, which I find boring. As a consequence, I tend to go overboard trying to close loopholes before other people find them.

What if we use a non-mathematical algorithm? For example, reshaping a list into chunks of length n, then seeing how many are left over. You'll need to rule that out too. Again, this question is fundamentally about doing a problem a certain way, which takes the fun out of figuring out an algorithm.

@ThomasKwa How easily can you do that in your head?

Not easily. Why do you ask?

@CJDennis "I apologise in advance for all of the restrictions, they are there to (hopefully) stop people from trying to work around the problem, instead of solving it the way it's presented. " This isn't a good way to do things. Trying to find alternative methods to do things is a lot of the fun of code golfing. Do X without Y challenges tend not to work.

@xnor, ThomasKwa http://codegolf.stackexchange.com/questions/73091 has +26/-2 votes and was only asked yesterday. Seems to work there.

ES7, 86 bytes
f=(d,n,t=10**(''+n).length)=>d<n?d:f(d<t?d-n:(g=d=>d<t?d:g((d-d%t)/t)*(t-n)+d%t)(d),n)

Ungolfed:
function modulo(d, n) {
    var t = Math.pow(10, 1 + Math.floor(Math.log10(n)));
    var c = t - n;
    function chunk(p) {
        if (p < t) return p; // reached the leftmost chunk
        // first recursively process the left part of the number
        return chunk(Math.floor(p / t)) * c + p % t;
    }
    while (d >= t) d = chunk(d);
    while (d >= n) d -= n;
    return d;
}


text:
Compute minimax of an array
Consider an array x such as [1 5 3 4] and a number n, for example 2. Write all length-n sliding subarrays: [1 5], [5 3], [3 4]. Let the minimax of the array be defined as the minimum of the maxima of the sliding blocks. So in this case it would be the minimum of 5, 5, 4, which is 4.
Challenge
Given an array x and a positive integer n, output the minimax as defined above.
The array x will only contain positive integers. n will always be at least 1 and at most the length of x.
Computation may be done by any procedure, not necessarily as defined above.
Code golf, fewest bytes wins.
Test cases
x, n, result
[1 5 3 4], 2                    4
[1 2 3 4 5], 3                  3
[1 1 1 1 5], 4                  1
[5 42 3 23], 3                 42

Dyalog APL, 4 bytes
⌊/⌈/

This is a monadic function train that expects array and integer as right and left arguments, resp.
Try it with TryAPL.
How it works
A train of two functions is an atop, meaning that the right one is called first (with both arguments), then the left one is called on top of it (with the result as sole argument).
A monadic f/ simply reduces its argument by f. However, if called dyadically, f/ is n-wise reduce, and takes the slice size as its left argument.
⌊/⌈/    Monadic function. Right argument: A (array). Left argument: n (list)

  ⌈/    N-wise reduce A by maximum, using slices of length n.
⌊/      Reduce the maxima by minimum.

Wait... How do you reduce something that has already been reduced? Isn't it just a singular element?

@Cyoce The N-wise reduce yields an array of maxima. For example 2 ⌈/ 1 2 3 4 computes the maxima of (1 2) (2 3) (3 4), so it returns 2 3 4.

Ok. I thought it meant that an N-wise reduce took the first N elements and reduce them with the function, e.g a 2-wise reduce is just a normal reduce

How many bytes should ⌊ be counted as? 1 or 2?

@njpipeorgan That depends on the encoding. APL has its own legacy code page (which predates Unicode by several decades), and it encodes ⌊ and ⌈ as a single byte each.

CJam (11 bytes)
{ew::e>:e<}

Online demo

A full program would be q~ew::e>:e<, which is also 11 bytes

Ruby 39 bytes
->(x,n){x.each_slice(n).map(&:max).min}

Where x is the array and n is the number to chunk the array by.

don't you mean each_cons?

Oracle SQL 11.2, 261 bytes
SELECT MIN(m)FROM(SELECT MAX(a)OVER(ORDER BY i ROWS BETWEEN CURRENT ROW AND :2-1 FOLLOWING)m,SUM(1)OVER(ORDER BY i ROWS BETWEEN CURRENT ROW AND:2-1 FOLLOWING)c FROM(SELECT TRIM(COLUMN_VALUE)a,rownum i FROM XMLTABLE(('"'||REPLACE(:1,' ','","')||'"'))))WHERE:2=c;

Un-golfed
SELECT MIN(m)
FROM   (
         SELECT MAX(a)OVER(ORDER BY i ROWS BETWEEN CURRENT ROW AND :2-1 FOLLOWING)m,
                SUM(1)OVER(ORDER BY i ROWS BETWEEN CURRENT ROW AND :2-1 FOLLOWING)c
         FROM   (
                  SELECT TRIM(COLUMN_VALUE)a,rownum i
                  FROM XMLTABLE(('"'||REPLACE(:1,' ','","')||'"'))
                )
       )
WHERE :2=c;

MATL, 6 bytes
YCX>X<

Try it online!
YC    % Implicitly input array and number. Build a matrix with columns formed
      % by sliding blocks of the array with size given by the number
X>    % Maximum of each column
X<    % Minimum of all maxima. Implicitly display

Pyth, 10 bytes
hSmeSd.:QE

Explanation:
           - autoassign Q = eval(input())
      .:QE -   sublists(Q, eval(input())) - all sublists of Q of length num
  meSd     -  [sorted(d)[-1] for d in ^]
hS         - sorted(^)[0]

Takes input in the form list newline int
Try it here!
Or run a Test Suite!
Or also 10 bytes
hSeCSR.:EE

Explanation:
      .:EE -    sublists(Q, eval(input())) - all sublists of Q of length num
    SR     -   map(sorted, ^)
  eC       -  transpose(^)[-1]
hS         - sorted(^)[0]

Test Suite here

Jelly, 6 bytes
ṡ»/€«/

Try it online!
How it works
ṡ»/€«/  Main link. Left input: A (list). Right input: n (integer)

ṡ       Split A into overlapping slices of length n.
 »/€    Reduce each slice by maximum.
    «/  Reduce the maxima by minimum.

JavaScript (ES6), 84 83 72 bytes
(x,y)=>Math.min(...x.slice(y-1).map((a,i)=>Math.max(...x.slice(i,i+y))))

Thanks to user81655 for helping shave off 11 bytes

Being all positive: (x,y,M=Math.max)=>-M(...x.slice(y-1).map((a,i)=>-M(...x.slice(i,i+y))))

Julia 0.6, 51 bytes
f(x,n)=min([max(x[i-n+1:i]...)for i=n:endof(x)]...)

Try it online!
Nothing too groundbreaking. This is a function that accepts an array and an integer and returns an integer. It just uses the basic algorithm. It would be a whole lot shorter if min and max didn't require splatting arrays into arguments.
We get each overlapping subarray, take the max, and take the min of the result.

Perl 6, 32 bytes
{@^a.rotor($^b=>1-$b)».max.min}

Usage:
my &minimax = {@^a.rotor($^b=>1-$b)».max.min}

say minimax [1,5,3,4], 2;    # 4
say minimax [1,2,3,4,5], 3;  # 3
say minimax [1,1,1,1,5], 4;  # 1
say minimax [5,42,3,23], 3;  # 42

R, 41 35 bytes
Requires zoo to be installed.
function(x,n)min(zoo::rollmax(x,n))

edit - 6 bytes by realizing zoo::rollmax exists!

Vyxal, 4 bytes
lvGg

Try it Online!
Why reduce by things when you can just vectorise.
Explained
lvGg
l    # overlaps of input list of size input integer.
 vG  # maximum of each window
   g # minimum of that

Husk, 4 bytes
▼m▲X

Try it online!
Explanation
▼m▲X
   X  each consecutive slice of length
 m▲   maximum of each
▼     minimum

Jelly, 4 bytes
ṡṀ€Ṃ

Try it online!
Since Dennis' answer, the Ṁaximum and Ṃinimum monadic atoms have been added

Python 3, 55 bytes.
lambda x,n:min(max(x[b:b+n])for b in range(len(x)-n+1))

Test cases:
assert f([1, 5, 3, 4], 2) == 4
assert f([1, 2, 3, 4, 5], 3) == 3
assert f([1, 1, 1, 1, 5], 4) == 1
assert f([5, 42, 3, 23], 3 ) == 42

Python 2, 50 bytes
f=lambda l,n:l[n-1:]and min(max(l[:n]),f(l[1:],n))

Recursively computes the minimum of two things: the max of the first n entries, and the recursive function on the list with first element removed. For a base case of the list having fewer than n elements, gives the empty list, which serves as infinity because Python 2 puts lists as greater than numbers.

Mathematica, 23 bytes
Min@BlockMap[Max,##,1]&

Test case
%[{1,2,3,4,5},3]
(* 3 *)

Java 8, 128 126 124 105 bytes
a->n->{int r=0,m,j,t,i=-1;for(;i++<a.length-n;r=r<1|m<r?m:r)for(m=j=0;j<n;m=t>m?t:m)t=a[i+j++];return r;}

Try it online.
Explanation:
a->n->{                    // Method with Integer-array & Integer as parameters
                           // and Integer return-type
  int r=0,                 //  Result-integer, starting at 0
      m,                   //  Max-integer, uninitialized
      j,t,                 //  Temp integers
  i=-1;for(;i++<a.length-n //  Loop `i` in the range (-1,length-n]:
           ;               //    After every iteration:
            r=             //     Change the result to:
              r<1          //      If the result is 0 (first iteration),
              |m<r?        //      or the max is smaller than the result:
                m          //       Change the result to this max
              :            //      Else:
               r)          //       Keep it unchanged
    for(m=                 //   Reset the max to 0
        j=0;j<n            //   Inner loop `j` in the range [0,n):
        ;                  //     After every iteration:
         m=t>m?t:m)        //      Set `m` to the max of `m` and `t`
      t=a[i+j++];          //    Set `t` to the `i+j`'th item of the array
  return r;}               //  After the nested loops, return the result

J, 9 bytes
[:<./>./\

Similar to the APL answer. >./\ applies >./ (maximum) to the (left arg)-subsets of the right arg. Then, <./ finds the minimum of that, since it's capped with [:.
Test cases
   f =: [:<./>./\
   2 f 1 5 3 4
4
   3 f 1 2 3 4 5
3
   3 f 1 1 1 1 5
1
   3 f 5 42 3 23
42

Factor, 34 bytes
[ clump [ supremum ] map infimum ]

Try it online!
Explanation
                  ! { 1 5 3 4 } 2
clump             ! { { 1 5 } { 5 3 } { 3 4 } }
[ supremum ] map  ! { 5 5 4 }
infimum           ! 4

05AB1E, 6 bytes
ŒIù€àß

Try it online or verify all test cases.
Explanation:
Œ       # Get all sublists of the (implicit) input-list
 Iù     # Only keep those of a size equal to the second input
   €à   # Get the maximum of each inner list
     ß  # Pop and push the minimum of that
        # (after which the result is output implicitly)

Rust, 46 bytes
|s,n|s.windows(n).map(|a|a.iter().max()).min()

Try it online!
Takes in a &[u32] and returns an Option<Option<&u32>>. The result will be Some(Some(&minimax)) so long as valid input is supplied.

Burlesque, 7 bytes
CO)>]<]

Try it online!
CO  # Sliding window length N
)>] # Map max of block
<]  # Min of result

Julia 1.0, 48 bytes
x\n=minimum(n:length(x).|>i->max(x[i-n+1:i]...))

Try it online!
based on Alex A.'s answer

JavaScript (ES6), 70 bytes
x=>n=>-M(...x.slice(n-1).map((_,i)=>-M(...x.slice(i,i+n)))),M=Math.max

Using currying, this function saves 2 bytes from the previous answer.
Demo

f=x=>n=>-M(...x.slice(n-1).map((_,i)=>-M(...x.slice(i,i+n)))),M=Math.max
a=[[[1,5,3,4],2,4],[[1,2,3,4,5],3,3],[[1,1,1,1,5],4,1],[[5,42,3,23],3,42]]
document.write(`<pre>${a.map(r=>`${f(r[0])(r[1])==r[2]?'PASS':'FAIL'} ${r[1]}=>${r[2]}`).join`\n`}`)

Racket 84 bytes
(λ(l i)(apply min(for/list((j(-(length l)(- i 1))))(apply max(take(drop l j) i)))))

Ungolfed:
(define f
  (λ (l i)
    (apply min (for/list ((j (- (length l)
                                (- i 1))))
                 (apply max (take (drop l j) i))
                 ))))

Testing:
(f '[1 5 3 4]  2)
(f '[1 2 3 4 5] 3)
(f '[5 42 3 23] 3)

Output:
4
3
42

Clojure, 51 bytes
#(apply min(for[p(partition %2 1 %)](apply max p)))

SmileBASIC, 68 bytes
M=MAX(X)DIM T[N]FOR I=.TO LEN(X)-N-1COPY T,X,I,N
M=MIN(M,MAX(T))NEXT

Nothing special here. Inputs are X[] and N

T-SQL, 131 bytes
SELECT top 1max(iif(a<c,c,a))FROM x y
CROSS APPLY(SELECT a c FROM x WHERE y.b<b and b<y.b+@)z
GROUP BY b
HAVING-@=~sum(1)ORDER BY 1

Try it online

R, 64 bytes
function(x,n)min(apply(matrix(x,l<-sum(x|1)+1,n)[n:l-n,],1,max))

Try it online!
Answer without using zoo.

K (ngn/k), 6 bytes
&/|/':

Try it online!
Similar to @Dennis' APL answer, adapted to ngn/k.

|/': set up a stencil i f':x, taking the stencil/window length as the left arg (i) and the list input as the right arg (x). to each window, apply |/, i.e. the maximum
&/ take the minimum of the maximums

Arturo, 48 bytes
$[a,n][min map 0..-size a n'x->max a\[x..x+n-1]]

Try it


text:
Golf a Compute interpreter
Introduction
Compute is a esoteric joke language.
From the esolangs entry:

Compute has no required syntax and has the power to solve any and all
problems. It is smart enough to interpret any human language (English,
Spanish, Latin, etc), any programming language (C++, Java, brainfuck,
etc), or any kind of data you can think of. The only downfall is that
there is absolutely no I/O.

Some example programs
Hello World

A basic Hello World program
What is love?

Determines was love is (baby don't hurt me).
When will we ever graduate?

Determines the exact date of this site to get out of beta.
The Challenge
Your task is to write a full Compute interpreter. This sounds pretty hard, but keep in mind that Compute has absolutly no I/O. So your interpreter will just sleep one second for every line in the input program and output \n\nDone. after this (this is the only exception to the no I/O thing).
You can find the official interpreter at the bottom of this site.
Note that the official interpreter pauses one second for every character in the given source code. To avoid long waiting times while testing your interpreter with meaningful questions we stay with lines in this challenge.
Rules

The input might contain multiple lines seperated by a \n. There will always be at least one line.
Unlike the official implementation you don't have to take a file as input. You can take the Compute program in any form of input you want.
The only output allowed is \n\nDone.. A trailing newline is allowed.
Function or full program allowed.
Default rules for input/output.
Standard loopholes apply.
This is code-golf, so lowest byte-count wins. Tiebreaker is earlier submission.

Inevitably reminded me of this

@LuisMendo This is glorious! I almost lost it.

Well, we don't need a program to tell us when we're going to graduate. We already know that it's the 26th.

I think the interpreter sleeps a second for each character in source code.

@Doorknob, of what century?

@DenkerAffe I think you should make it clear that the challenge does not exactly match the language.

@DenkerAffe Pietu1998 means the chars/lines thing.

@msh210, no, that is the century.

05AB1E, 16 15 14 13 bytes
Code:
[Ig>#w’

D€µ.

Explanation:
[        # Starts an infinite loop
 I       # Input string
  g>     # Length + 1
    #    # If equal to 1, break out of the loop
     w   # Wait 1 second

This part is equivalent to "\n\nDone.":
      ’  # Push "\n\nDone." on top of the stack

D€µ.     # The compressed string is ended implicitly
         # Implicit, print top of the stack

Try it online!
Uses CP-1252 encoding.

JavaScript Shell REPL, 38 bytes
As a function that accepts the program as a string argument and returns the result:
s=>sleep(s.split`
`.length)||`

Done.`

29 bytes if the function can accept its input in the form of an array of lines, or if it should sleep 1 second per character:
s=>sleep(s.length)||`

Done.`

34 bytes if it should also be more like a program and explicitly print Done:
s=>sleep(s.length)||print`

Done.`

This works for me in the standalone Spidermonkey interpreter.

Javascript ES6, 46 45 bytes
a=>setTimeout(x=>alert`

Done.`,a.length*1e3)

Thanks to ӍѲꝆΛҐӍΛПҒЦꝆ for saving one byte
Assumes an array as input.
As both ӍѲꝆΛҐӍΛПҒЦꝆ and edc65 have pointed out you can write the following, but it won't save any bytes:
a=>setTimeout("alert`\n\nDone`",a.length*1e3)

1e3 is better than 10e2.

Also, convert the arrow function to a string. See http://codegolf.stackexchange.com/a/60960/41247

@ӍѲꝆΛҐӍΛПҒЦꝆ  I'm not sure that would work. Since he already has a template string, you would need to escape it

@ӍѲꝆΛҐӍΛПҒЦꝆ 1e3 is better than 10e2 can't believe i missed that .

@edc65 You are not the first to talk about it, ӍѲꝆΛҐӍΛПҒЦꝆ also mentioned it. :-)

Bash + coreutils, 28
sleep `wc -l`
echo "

Done."

Sleeps 1 second for every line.  Use wc -c instead for every byte, or wc -m instead for every character.

Shouldn't there be an extra newline?

@immibis Yes - you're right - fixed.

Oration, 117 bytes
I need time!
To iterate, input().
Inhale.
Now sleep(1).
Backtracking.
Boring,
boring.
Listen!
Capture Done.
Carry on!

Let's explain this. First, this transpiles to:
import time
while input():
    time.sleep(1)
print("\n")
print("\n")
print("Done")

Still confused? Let's put it like this:
I need time!

Imports the module time.
To iterate, input().

This is a while loop whose condition is input().
Inhale.

Our program needs to breathe now, and inhale, whilst less healthy, is golfier.
Now sleep(1).

Now take the most recent module imported and appends .sleep(1) to it.
Backtracking.

Let's exit the while loop.
Boring,
boring.

Prints two newlines.
Listen!

Begins capturing a string.
Capture Done.

Adds Done. to the captured string.
Carry on!

Finishes capturing string.

Looks like a fun language. Would you add a link to an interpreter + docs?

@DenkerAffe The docs and interpreter can both be found in the heading I just edited in.

@Conor Thanks, gonna have a look at it. :)

Pyth, 15 14 bytes
.dcl.z1b"Done.

(You can try it online, but there's really no point in doing so.)

You are missing the period after Done (which is pretty funny since you told someone the same on another answer) :P

@DenkerAffe Thanks. (Byte count was correct, though.)

@muddyfish Thats what the challenge says. The official interpreter goes char-wise, but I changed it to lines to avoid waiting times.

@DenkerAffe Ok now our entries our exactly the same. Whos to keep? I'm going to assume Pietu1998 because they were correct first

Is b necessary?

@busukxuan Yes, to print the newlines.

I think everyone hates Pyth by now....

MATL, 17 bytes
10c'Done.'`jt?1Y.

A trailing empty line (followed by newline) is used to mark end of input. This is needed in MATL because input is interactive and each input ends with a newline.
Try it online!
10c           % push newline character
'Done.'       % push string
`             % do...while
  j           % input string
  t           % duplicate
  ?           % if non-empty
    1Y.       % pause for 1 second
              % loop condition is the current string. If non-empty: next iteration
              % If empty: exit loop and print stack contents. There are two strings
              % and a newline is printed after each, so the desired output is obtained

Are you missing the period after Done?

@Pietu1998 Whoops. Corrected. Thanks!

Perl, 21 + 1 = 22 bytes
sleep 1}{$_="\n\nDone."

Requires the -p flag:
$ perl -pe'sleep 1}{$_="\n\nDone."' <<< $'a\nb\nc'

Done.

Python 3, 58 bytes
import time
while input():time.sleep(1)
print("\n\nDone.")

Just wanna point this out, it would be 2 Bytes shorter in python 2, print"\n\nDone"

Oh yeah, I forgot... Sorry.

QBasic, 54 bytes
LINE INPUT x$
IF x$=""GOTO 1
SLEEP 1
RUN
1?
?
?"Done."

Takes the program line by line from user input, terminated by a blank line. Abides by the letter of the law, though possibly not the spirit, by pausing 1 second after reading each line. (The specification doesn't technically say that the pauses all have to come after the input is completed.) If this is considered too shady, here's a 64-byte version that pauses after the whole program has been input:
DO
LINE INPUT x$
IF x$=""GOTO 1
t=t+1
LOOP
1SLEEP t
?
?
?"Done."

Bonus version with file I/O (87 bytes):
INPUT f$
OPEN f$FOR INPUT AS 1
1LINE INPUT #1,x$
SLEEP 1
IF 0=EOF(1)GOTO 1
?
?
?"Done."

Ruby, 32 bytes
$<.map{sleep 1}
puts"\n\nDone."

Reads from stdin.

OCaml, 61 bytes
fun a->List.iter(fun _->Unix.sleep 1)a;print_string"\n\nDone"

Assumes the input is a list.

Jelly, 12 bytes
ỴLœS@⁷⁷“ẋḲp»

Try it online!
Note: Please do not suggest putting the ⁷⁷ in the compressed string, it will make it longer (“¡OÑL[Ṁ»).
Explanation:
ỴLœS@⁷⁷“ẋḲp» Main link. Arguments: z.
ỴL           The number of lines in z. (x)
     ⁷       Newline ("\n") (y)
  œS@        After sleeping for x seconds, return y.
      ⁷      Newline ("\n")
       “ẋḲp» Compressed string ("Done.")

awk, 34 bytes
END{print"\nDone."|"cat;sleep "NR}

As there is no I/O and the final outcome is inevitable,  the Done. part is outputed right in the beginning.
$ awk 'END{print"\nDone."|"cat;sleep "NR}' file

Only way to sleep in awk is to use system sleep. Shortest way to invocate it is to print|"sleep "NR and we might as well abuse that useless print.