text:
Get the century of a year
Your program has to have an year like 1957 to be the input and then output the century of that year.
For example:
In: 1946
Out: 20
In: 1705
Out: 18
In: 1900
Out: 19
In: 100
Out: 1
In: 2001
Out 21

because 1946 is in the 20th century.
Keep in mind that 2000 should be 20th century or 1900 should be in 19th century.
Therefore, the first century spans from the year 1 up to and including the year 100, the second - from the year 101 up to and including the year 200, etc.
Any programming language is allowed and keep your code short and sweet. :)
Additional Challenge: Try to also include float values

"Try to also include float values" Huh? What do you mean?

@wastl Maybe OP means Century = Year/100 + 1 without rounding... But that means that 2000 and 1900 etc. would be 21st and 20th century respectively

Why the downvotes?

@LuisfelipeDejesusMunoz Probably because it is trivial.

Since when we are downvoting trivial challenges?

@DeadPossum I downvoted because this challenge is neither interesting nor golf-able. There is no algorithmic complexity in finding the century: nearly all answers simply implement the expression floor((year - 1)/100) + 1, and there aren't other clever optimizations that can be done to shorten the overall program; there aren't any "alternative approaches" to the challenge. Since most answers implement the exact same expression, this challenge looks no more interesting than a list of "floor," "decrement," "divide," and "increment" functions in various languages.

How far in the future must our answers be correct until? Is it acceptable to only produce correct input up to the present year? (It matters in the R answer, we can save 2 bytes by only being correct up to the year 9998, possibly 9999)

Real programmers enumerate their centuries starting from zero.

05AB1E,  4  3 bytes
-1 byte thanks to Jonathon Allan
т/î

Try it online!

I like the extra spaces around the 4 so that the crossed-out 4 is no longer a 4.

ArnoldC, 308 298 bytes
IT'S SHOWTIME
HEY CHRISTMAS TREE x
YOU SET US UP 0
GET YOUR ASS TO MARS x
DO IT NOW
I WANT TO ASK YOU A BUNCH OF QUESTIONS AND I WANT TO HAVE THEM ANSWERED IMMEDIATELY
GET TO THE CHOPPER x
HERE IS MY INVITATION x
GET UP 99
HE HAD TO SPLIT 100
ENOUGH TALK
TALK TO THE HAND x
YOU HAVE BEEN TERMINATED

Try it online!
This seemed a challenge easy enough to try to write my first answer in ArnoldC...

Upvote cause it's ArnoldC

Please vote on the solution, not the language.

JavaScript, 14 bytes
y=>1+--y/100|0

Try it online

Taxi, 1327/2433 1057/1835 bytes
Two versions here; the shortest one works but shows the result in decimal format (e.g. 20.000000 instead of 20). I am posting both because, while the longer version is more correct, I still hope to win this code golf with the short one (it could require a little bit of tweaking, though).
Short version
You can test it here.
Go to Post Office: west, 1st left, 1st right, 1st left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: west, 1st left, 1st right.
Pickup a passenger going to Addition Alley.
Go to Starchild Numerology: east, 1st left, 1st left, 1st left, 2nd left.
99 is waiting at Starchild Numerology.
100 is waiting at Starchild Numerology.
Pickup a passenger going to Addition Alley.
Pickup a passenger going to Narrow Path Park.
Go to Addition Alley: east, 1st left, 2nd right, 3rd right, 1st right.
Pickup a passenger going to Divide and Conquer.
Go to Narrow Path Park: north, 1st right, 1st left, 1st right.
Pickup a passenger going to Divide and Conquer.
Go to Divide and Conquer: east, 1st right, 2nd right.
Pickup a passenger going to Trunkers.
Go to Trunkers: east, 1st right, 3rd right, 1st left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: east, 1st right, 1st right.
Pickup a passenger going to Post Office.
Go to Post Office: east, 1st left, 1st right.
Go to Taxi Garage: east, 1st right, 1st left, 1st right.

Long version
You can test it here.:
Go to Post Office: west, 1st left, 1st right, 1st left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: west, 1st left, 1st right.
Pickup a passenger going to Addition Alley.
Go to Starchild Numerology: east, 1st left, 1st left, 1st left, 2nd left.
99 is waiting at Starchild Numerology.
100 is waiting at Starchild Numerology.
Pickup a passenger going to Addition Alley.
Pickup a passenger going to Narrow Path Park.
Go to Addition Alley: east, 1st left, 2nd right, 3rd right, 1st right.
Pickup a passenger going to Divide and Conquer.
Go to Narrow Path Park: north, 1st right, 1st left, 1st right.
Pickup a passenger going to Divide and Conquer.
Go to Divide and Conquer: east, 1st right, 2nd right.
Pickup a passenger going to Trunkers.
Go to Trunkers: east, 1st right, 3rd right, 1st left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: east, 1st right, 1st right.
Pickup a passenger going to Chop Suey.
Go to Chop Suey: east, 6th right, 1st left.
Pickup a passenger going to KonKat's.
[processDigits]
Pickup a passenger going to Cyclone.
Go to Cyclone: north, 1st left, 3rd left.
Pickup a passenger going to Crime Lab.
Go to Writer's Depot: west.
"." is waiting at Writer's Depot.
Pickup a passenger going to Crime Lab.
Go to Crime Lab: east, 1st right, 2nd right, 2nd left.
Switch to plan "notAColon" if no one is waiting.
Switch to plan "print".
[notAColon]
Go to Cyclone: west, 1st right, 1st left, 2nd right.
Pickup a passenger going to KonKat's.
Go to KonKat's: east, 2nd right, 2nd right.
Pickup a passenger going to KonKat's.
Go to Chop Suey: north, 1st right, 1st right.
Switch to plan "processDigits".
[print]
Go to KonKat's: east.
Pickup a passenger going to Post Office.
Go to Post Office: south, 3rd right, 1st left.
Go to Taxi Garage: east, 1st right, 1st left, 1st right.

Welcome to PPCG!

Vim, 13 bytes
3I0<Esc>$3hd0<C-x>xx<C-a>

Shorter version

Brachylog, 6 bytes
/₁₀₀⌉₁

Try it online!
Just wanted to try my hand at Brachylog. Uses the "divide by 100 and ceil the result" method that many other answers use.

Now that you are a Brachylog expert :p maybe try Ex-Increasing Set Sequence, it might be quite good for that :)

It's been a while since I saw a Brachylog answer not posted by me :p

R, 19 18 16 bytes
1+scan()%/%99.99

Try it online!
Saved 1 byte thanks to digEmAll!
-2 bytes thanks to JDL!

Not completely sure... does this work too 1+(scan()-1)%/%100 (18 bytes) or I'm missing something ?

@digEmAll Nice! Seems to work fine.

the challenge doesn't say how far in the future we need to go but 1+scan()%/%99.99 may save 2 bytes (it will start to go wonky after 100 centuries)

Cubix, 11 10 bytes
@)OuI('d,U

Try it online!
This wraps onto the cube as follows
    @ )
    O u
I ( ' d , U . .
. . . . . . . .
    . .
    . .

Watch it run
Not sure what I was thinking when I did the first one.
Excluding the path changes the general process is I('d,)O@ - Input integer, decrement, push 100, integer divide, increment, output integer and exit.
Float version 16 bytes
And since it was an interesting exercise, here's a version that will handle a float input.  Try 1900, 1900.0 and 1900.1.  Of course it isn't really doing floats as Cubix prefers integers and the format of the float doesn't really matter. 1900 1, 1900-1 and 1900.1 are all treated the same.
WBiWIUd'.(B?@,)O

Try it online!
And wrapped
    W B
    i W
I U d ' . ( B ?
@ , ) O . . . .
    . .
    . .

Watch it run
This one does (excluding path changes)

IiI Input integer, input char (-1 for EOI or char value for seperator), Input integer
? Test TOS

If 0 B(, reverse stack and decrement TOS
If positive B reverse stack
** negative shouldn't happen **

'd,)O@ push 100, integer divide, increment TOS, output and exit

LOLCODE, 76 bytes
HAI 1.2
I HAS A x
GIMMEH x
VISIBLE QUOSHUNT OF SUM OF x AN 99 AN 100
KTHXBYE

Try it online!

QUOSHUNT. LOLCODE always cracks me up.

Hexagony, 11 bytes
?({!@/)d':/

Try it online!
Linear code (9 bytes):
?({d':)!@

Ungolfed code:
  ? ( {
 ! @ / )
d ' : / .
 . . . .
  . . .

It may be possible to save 1 or 2 bytes by using : to terminate (division by zero error), but I can't find out a way.

10 bytes - Almost work, except it doesn't halt

Just a minor defect..

MarioLANG, 821 807 625 595 570 386 bytes
;
-
)
)
+
+
(                >- >- >- >- >- >- >- >- >- >-)
(                "= "= "= "= "= "= "= "= "= "=+
>       >      >[!![!![!![!![!![!![!![!![!![!!(
"======="======"=##=##=##=##=##=##=##=##=##=##
!(![-)+<!(![(< ![ <  <  <  <  <  <  <  <  <  <<
#=#===="#=#==" #=="=="=="=="=="=="=="=="=="=="=
  >(   ! (<   >))-[!(+
  "====#=="   =====#=:
             !     <
             #====="

Try it online!
I'm sure this can be golfier Now this is starting to be quite golfy, though it took me a while to figure out a way to do the division in MarioLANG.
Improvements:

Lots of bytes saved by taking advantage of the fact that Mario starts falling from the upper left corner of the code.
Code before a fall has been placed during the fall.
Great improvement after redesigning the division-by-10 part.

Explanation:

First we set a to INPUT as integer and substract 1.
Then we set b to 0 and c equals to 2.
Then we substract 1 from a 10 times, checking every step if a has reached 0.
If we successfully substract 10 from a, increment b.
Repeat this until a is 0. Now we have the result of the division in b.
Substract 1 from c and move b to a if b is not 0. After moving the value b is set to 0.
Repeat the division-by-10 operation one more time, substracting 1 from c again and now that c is 0 the program outputs the result in b and exits.

Bash, 20 19 bytes
echo $[($1+99)/100]

Try it online!
-1 thanks to W W

19 bytes

18 bytes, by getting the 1st two bytes of the string and increment -> echo $[${1:0:2}+1]

@BastianBittorf That fails for numbers < 1000 and multiples of 100.

Japt, 9 4 bytes
-5 from @Shaggy
/L c

Try it online!

You just need to divide by 100 and round up: https://ethproductions.github.io/japt/?v=1.4.6&code=L0wgYw==&input=WwoxOTk5CjIwMDAKMjAwMQpdLW1S

SOGL V0.12, 3 bytes
M/U

Try it Here!

C (gcc), 23 22 bytes
f(i){return--i/100+1;}

Try it online!
-1 byte saved thanks to @luser droog
20 bytes
R;f(i){R=--i/100+1;}

Try it online!
-2 bytes saved thanks to @Digital Trauma
18 bytes
f(i){i=--i/100+1;}

Try it online!
Another -2 bytes saved thanks to @ErikF

Any tips on improving the score? I feel like a couple bytes could be saved

If you're OK with a bit of undefined behaviour, you can do this for 20.

Drop the space after return.

You can reuse the i as its own return (18 bytes): Try it online!

@ErikF that's absolutely amazing

Stax, 5 bytes (packed)
vAJ/^

Run and debug it
Explanation:
vAJ/^ Full program, implicit input
v     Decrement
 AJ   Push 100 (102)
   /  Integer division
    ^ Increment

Perl 5 -p, 18 15 bytes
$_=1+--$_/100|0

Try it online!
(-3 whole bytes, thanks to @Dom Hastings.)
Or with -p -MPOSIX:
15 13 bytes
$_=ceil$_/100

Try it online!
(-2 bytes, again thanks to @Dom Hastings.)

Solid answer, cant think of a shorter approach right  now! You can drop the parens on ceil for -2 and reorder the first using |0 for a few savings too: Try it online!

@DomHastings That's what the |0 in the JS answer was for! (Trying to learn Brachylog left me seeing "alternate predicate" instead of "coerce to int" there.) Thank you. Just in case you're able to make something of it, here's the regex approach that I started with: /..?$/;$_=$`+($&>0) (I'm now trying to see if I can learn enough Retina to implement this in that).

Here's a 13 byte solution that doesn't use any command line module inclusions.

Retina, 26 bytes
r`(.*)(.?.)
$2*X$1*
X+
_
.

Try it online!
My first attempt at Retina. Can probably be golfed more (though, I like the (.?.) babyface in this one).

It seems shorter to use arithmetic unfortunately. Hope you enjoy Retina golfing! :)

@FryAmTheEggman That's pretty neat, learnt a few things from that (I stopped reading the Unary arithmetic tutorial page when I realized it was outdated, didn't want to get confused by old syntax). That final |$ is an especially neat trick for an increment. (And I will, thanks!)

dc, 6
Assuming input and output on the top-of-stack is OK:
99+A0/

Try it online!

Java 8, 12 bytes
y->~-y/100+1

Try it online.
Explanation:
y->     // Method with integer as both parameter and return-type
  ~-y   //  Decrease the input by 1
  /100  //  Then integer-divide it by 100
  +1    //  And then add 1

nah, I guess youll have to provide wrapping stuff, too.

@LMD This has been discussed many times in the meta ever since functions were allowed as alternative for full programs, but Java and C# doesn't need to add the definitions, parameter-types, nor trailing semi-colon to the code for lambdas (recursive methods and imports are a different story of course).

If I knew those rules... sniff

@LMD Python will still be shorter in 90%+ of the challenges compared to Java lambdas, so don't worry about it too much. ;) This is one challenge where Java is slightly shorter however (compared to the equivalent 18 bytes in Python).

+1, though I prefer y->--y/100+1 for the sake of readability.

@OlivierGrégoire Yeah, after posting it and I saw some of the other answers I indeed agree. But since the byte-count and functionality is the same I won't edit it for now. I do agree that it's more readable, and I should have thought about it when posting my answer..

@KevinCruijssen No worries, it's only a personal preference. Your answer is as clear as the suggestion, plus you explain the code, so what more can we ask for? ;)

GolfScript, 5 7 bytes
~(100/)

Try it online!
~(100/)
AAA  AA
\\\   \\
 \\\   \Increments the stack
  \\\   Divides the stack
   \\\
    \\Adds 100 to the stack
     \Decrements the stack
      Turn the input string into an int

Note that e.g. 2001 is in the 21st century. This one works: ~(100/)

Perl 6, 13 bytes
(*+99)/100+|0

Test it
Expanded:
# WhateverCode lambda
(
  *      # this is the parameter
    + 99 # add 99 to adjust the century

) / 100  # divide by 100

+| 0     # Integer bitwise-or with 0 (coerce to Int)

Python 2, 18 bytes
lambda x:~-x/100+1

Try it online!

Putting 100 in seems to return 1.99

@Acccumulation no?

Sorry, I missed that it was Python 2 rather than 3.

@Acccumulation Duplicate the / and it´s both Python 2 and 3.

Haskell, 16 bytes
(`div`100).(+99)

Try it online!
16 bytes
f x=div(x+99)100

Try it online!

Excel Vba, 89 bytes
Function GetCentury(Year As Long)
GetCentury = Mid((Year - 1) / 100, 1, 2) + 1
End Function

And a version with 65 bytes
Function C(Y As Long)
C = Mid((Y - 1) / 100, 1, 2) + 1
End Function

Honestly I dont even know if this is a valid entry :/

Welcome to PPCG! Usually you would state your golfed version first and add a longer version as explanation only. Thus your score 65 bytes. I'm not familiar with VBA, but can you remove some of the spaces in C = Mid((Y - 1) / 100, 1, 2) + 1? Finally you may want to check out our Tips for Golfing in VBA. Have fun!

Shakespeare Programming Language, 195 bytes
,.Ajax,.Page,.Act I:.Scene I:.[Enter Ajax and Page]Ajax:Listen toheart!You is the sum ofa cat the quotient betweenthe sum ofyou a pig the square ofthe sum ofa big big big cat a big cat!Open heart

Try it online!
Explanation:
,.Ajax,.Page,.Act I:.Scene I:.[Enter Ajax and Page]Ajax:   #Header

Listen toheart!   # Set Page to the input

# Set Page to (n-1)/(10)**2+1
You is the sum ofa cat the quotient betweenthe sum ofyou a pig the square ofthe sum ofa big big big cat a big cat!

Open heart  # Print Page's value as a number

Elixir, 89 78 bytes
Not perfect but I'm just learning Elixir so code-golf it is!
IO.gets("")|>String.to_integer|>(&(Integer.floor_div(100,&1-1)+1)).()|>IO.puts

Try it online!
In a better format:
IO.gets("")                # Get input from terminal
|>String.to_integer        # Make it an int
|>(&(                      # Declare an anonymous function
  Integer.floor_div(100,   # Do a floored division with 100 on the bottom
     &1-1)                  # ... and the integer input minus 1 on top
  +1))                    # Add 1 to the result
  .()                      # Gotta invoke that anonymous for pipes
|>IO.puts                  # Output

Pyth - 6 7 bytes
.EcQ100

Explanation:
.EcQ100  Implicit print
   Q     Input
  /      Divided by
    100  100
.E       Rounded up

Fixed edge case

I believe this fails the test case for input 1900.  Should return 19, instead of 20

PHP, 22 bytes
<?=1+--$argv[1]/100|0;

Try it online
<?=ceil($argv[1]/100);

Try it online

It's a bit awkward, but you can save 1 byte using -R: Try it online!

Pepe, 31 bytes
rEeEEeeEeeREeEREEEEeeREeEEEReEE

Try it online!
Basically ceil(n/100).
Explanation:
rEeEEeeEeeREeEREEEEeeREeEEEReEE - full program

rEeEEeeEee                      - push 100 to stack B
          REeE                  - input as number to stack A. float gets rounded.
              REEEEee           - A / B, or A / 100. push in stack A.
                     REeEEE     - ceil(A)
                           ReEE - output stack A as number

PHP, 19 bytes
<?=ceil($argn/100);

or
<?=--$argn/100+1|0;

Save to file, run as pipe with -nF.

Vyxal, 6 4 bytes
‹₁ḭ›

Try it Online!
Explained
‹₁ḭ›
‹    # decrement
 ₁ḭ  # divide floor by 100
   › # increment

Gaia, 4 bytes
(ℍ/)

Pretty straightforward...
Thanks to Mr. Xcoder and this post for getting me interested in this cool but relatively unused language!
Try it online!

@JonathanAllan True, edited.

TI-Basic, 6 bytes
When given only one argument, sub( divides it by 100.
sub(Ans+99

Octave/MATLAB, 15 14 bytes
@(x)(x+49)/100

Try it online!
Managed to save a byte by requiring the input to be provided as an integer not a double.
This anonymous function takes an integer as an input, and returns the required value.
MATLAB/Octave when dividing integers performs rounding rather than truncation (Why Mathworks? Why?!). To convert rounding to ceil, we need to add on 49 to the number prior to division.

Original, perhaps uninteresting answer:
@(x)ceil(x/100)

Try it online!
Anonymous function to find the result. Just the standard ceil() of dividing by 100.

Excel VBA, 13 bytes
An anonymous function that takes input from cell [A1] and outputs to the console.
?[A1-1]\100+1

Hahaha. I went all way in creating a function

Python 2, 18 bytes
lambda x:-(x/-100)

Taking advantage of the fact / divides towards 0, we make a impromptu ceil division, assuming all inputs are positive which is the case according to the spec. Would work in Python 3 with // but it's golfier in Py2.
Uses ceil(year/100)

Common Lisp, 29 19 18 bytes
(ceiling(/ x 100))

Or, if variable definitions aren't allowed, 21 bytes
(ceiling(/(read)100))

Pretty self-explanatory, can be tested with something along these lines:
(setf x 1900)
(print (ceiling (/ x 100)))

a snippet is not allowed (i.e. you can't assume x is defined)

@ASCII-only I assumed it was allowed, considering most of the other answers rely on a variable/state being already defined.  For example, both Excel answers, TI-Basic, Octave/Matlab

Well, Excel is kinda a special case (it's not even a programming language), Ans in TI-BASIC can be considered STDIN (well, at least I think so), and Octave/Matlab defines a lambda

I’d argue that Ans in TI basic is definitely a variable. It performs like one in all TI Basic programs. However, when I get home, I’ll amend my answer to better accommodate those rules.

Hmm, thinking about it, you're right. Then in that case I'd say that answer is invalid as well

Ruby, 24 bytes
def f(n);(n-1)/100+1;end

Try it online!

MATL, 7 bytes
q100/kQ

Try it online!

Wouldn’t 100/Xk do?

Jelly, 4 bytes
÷ȷ2Ċ

Try it online!

Labyrinth, 10 bytes
?(_100/)!@

Same method as my Gaia answer.
Try it online!

Kotlin, 19 bytes
{y:Int->(y+99)/100}

Try it online!

Bash + coreutils, 18 bytes
bc<<<"($1+99)/100"

Try it online!

When shell submissions use external programs we typically mention that in the language field to distinguish them from pure shell solutions. So in this case consider specifying the language as "Bash + coreutils" or "Bash + bc".

Whitespace, 51 50 bytes
[S S S T    N
_Push_1][S N
S _Duplicate_1][S N
S _Duplicate_1][T   N
T   T   _Read_STDIN_as_integer][T   T   T   _Retrieve_input][S S S T    N
_Push_1][T  S S T   _Subtract][S S S T  T   S S T   S S N
_Push_100][T    S T S _Integer_divide][T    S S S _Add][T   N
S T _Print_as_integer]

Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.
-1 byte thanks to @aschepler.
Try it online.
Explanation in pseudo-code:
Integer n = STDIN as integer
n = n - 1
n = n integer-divided by 100
n = n + 1
Print n as integer to STDOUT

You can take off one byte by removing one Dup (-3) and replacing the Swap (-3) with a Push 1 (+5).

@aschepler Ah, of course. Thanks!

Scala, 24 bytes
def f(a:Int)=(a-1)/100+1

Try it online!
Scala, 33 bytes, with floats
def f(a:Float)=(Int)((a-1)/100)+1

Try it online!

TeaScript, 8 bytes
Mc(x / h

Try it online!

CJam, 6 bytes
(100/)

Try it online!

K (oK), 7 bytes
Solution:
-_-.01*

Try it online!
Explanation:
Pretty trivial... almost looks like an emoji (-_-):
-_-.01* / the solution
      * / multiply input by
   .01  / 0.01
  -     / negate  \
 _      / floor    - ceiling the result
-       / negate  /

C (gcc), 19 bytes
f(x){x=x/100.+.99;}

Try it online!

Vim (5 bytes)
99^AXx

This code looks for number at or on the right of the cursor, adds 99 (^A99) and divides it by 100 (Xx).
Note: ^A is single byte (0x1 – Start Of Heading).

MAWP, 11 bytes
@1A554WWPM:

Try it!
Saved 3 bytes thanks to @Razetime

9 bytes

@Razetime your variant doesn't handle edge cases like 1900. However, still saved some bytes by adding 1A

oh, silly mistake in that one.

Go, 33 31 bytes
func(y int)int{return^-y/100+1}

Attempt This Online!

-2 by @Steffan: (y-1) => ^-y

(y-1) => ^-y

befunge 11 bytes
&1-aa*/1+.@@

& read input,
1- subtract one (2000 is 20th century)
aa*/ divide by 100
1+ add one
. print
@ end

Lua, 21 bytes
print((...-1)//100+1)

Try it online!
I'm not sure if I can get the year as an argument, but that's how I did it.

EXCEL, 17 bytes
A1 as input
=ROUNDUP(A1/100,)

Brain-Flak, 68 bytes
({}[()])<>((((((()()()){}){}){}()){}){})({<(({})){({}[()])<>}{}>()})

Try it online!
Pushing the number 100 is longer than the div algorithm itself! Calculates (n-1)/100+1.

brainfuck, 147 bytes
,>,>,>,>>++++++++[-<++++++>]<[->+<<-<-<-<->>>>]<[-<+>]<[<+>[-]]<[->+>+<<]>>>++++++++++[-<->]+<[<[-<+>]>>-<[-]]>[<<<<+>>>>-]>[-<<<<<+>+>>>>]<<<<<.>.

Try it online!
Explanation
,>,>,>,>                 input
>++++++++[-<++++++>]     store a '0'
<[- >+<                  save '0'
 <-<-<-<->>>>            subtract '0'
]
<[-<+>]                  move 10^0 to 10^1
<[                       check if 10^1 has a non-zero value
 <+>                     increment 10^2
 [-]                     exit
]
<[->+>+<<]               copy 10^2 twice
>>>
++++++++++               store a ten
[-<->]                   subtract ten
+                        flag for if check
<                        if zero then carry
[                        not zero
 <[-<+>]                 put 10^2 one to the left
 >>-<[-]
]>
[                        it was zero so carry
 <<<<+>>>>-
]
>[-<<<<<+>+>>>>]<<<<<.>. print

This does not work for years below 1000. I also tried to think of a solution in brainfuck but I couldn't get past this limitation.

@Charlie Well, if you fill your input with leading zeros it does.

JavaScript, 14 bytes
n=>n/100+.99|0

Since the century is roughly year/100 + 1, minus an offset of 1 year, it can be calculated like (n+99)/100. This is then rounded down to an integer in the last two bytes.

Ruby, 14 bytes
->n{~-n/100+1}

Try it online!
I think it's squeezed as much as possible. I would love to see if anyone has any clever tricks to make this smaller.

Ruby, 16 bytes
->i{(i-1)/100+1}

Excel, 15 21 18 13 bytes
=INT(99%+A1%)

Input is in cell A1

Does =LEFT(A1+99,2) work?  I don't know Excel.

@WW It would except it has the same failure I just noted in my original: Fails on years <= 1000. I used that method on the new formula, though, to save a byte.

Doesn't =CEILING(A1/100,1) work for 18 bytes?

@Neil Maybe, yes. Maybe I clearly didn't spend enough time on this because I saw it as a relatively easily challenge and overlooked some pitfalls and optimizations.

If you want to go the extra mile, in pt-br version is =TETO(A1/100;1)

@EngineerToast Change A1/100 to A1% for 15 bytes, or adapt the LEFT version to =INT(99%+A1%) for 13 bytes.

APL (Dyalog), 6 bytes
⌈⎕÷100

My first APL answer!
Thanks to @dzaima for saving me a load of bytes!
Try it online!

@dzaima That's a stupid rule...

Well blame the people who didn't believe in year 0 :p

Charcoal, 7 bytes
Ｉ⌈∕Ｎ¹⁰⁰

Try it online! Link is to verbose version of code. Explanation:
    ¹⁰⁰ Literal 100
   Ｎ    Input number
  ∕     Floating-point division
 ⌈      Ceiling
Ｉ       Cast to string
        Implicitly print

Noether, 7 bytes
I100/UP

Try it online

Java, 19 bytes
y->Math.ceil(y/100)

Try it online.
In java, the ceil function helps. Input and output are both double.

Hello and welcome to PPCG! This question is code golf, so you want to make your submission as short as possible (I believe you can remove the spaces.) Also please provide a header with the name of the language you submitted and your answer's bytecount.

Welcome to PPCG! Your code currently seems to give a few incorrect answers.

@KevinCruijssen it does happen to work if you take input as a double instead of an int...

@ETHproductions Oh, didn't notice that but you're right. I've edited the answer to our standards. Please take a look at it so you can see how to do it yourself next time akhil7886. And once again welcome to PPCG.

@KevinCruijssen BTW you don't need the ds after the year: https://tio.run/##hZC9DoIwEIB3n@LGdqAW408I0TeAhdE41FK0WAqhhaQxPHstympYLvfzXb7L1WxkUV2@PFfMGMiY1O8NgNRW9BXjAvK5BCjb4a4EVGhJHE5Df9qEYCyzkkMOGs7gXXTJmH0SLqRCbhtTin06Y13YC9hCj60soQk2VNhe6sf1Bgz/VIUzVjSkHSzpwsgqjTSpUJzsj/hr/Y@c6GENScJBK8gqsaM0xssDJv8B

@BetaDecay Ah, you're completely right. Ah well, now it's perhaps more clear the inputs are doubles (just thinking of a good excuse here, lol). ;p

Python 3, 30 bytes
print((int(input())-1)//100+1)

Try it online!

Math++, 12 bytes
_(.99+?/100)

Swift 4, 18 bytes
print((n-1)/100+1)

Try it online!
n is the input of the program

x86_64 machine language on Linux, 12 bytes
0:   97                      xchg   %eax,%edi
1:   ff c8                   dec    %eax
3:   6a 64                   pushq  $0x64
5:   59                      pop    %rcx
6:   99                      cltd
7:   f7 f9                   idiv   %ecx
9:   ff c0                   inc    %eax
b:   c3                      retq

Try it online!

Rockstar, 51 bytes
A nice easy one to finish the week after this monstrosity!
listen to Y
let Y be-1
let Y be/100
turn up Y
say Y

Try it here (Code will need to be pasted in)

J-uby, 18 bytes
:pred|~:/&100|:+&1

:+&-1 is equivalent to :pred but IMO :pred is prettier. Alas :+&1 is shorter than :succ.
Attempt This Online!

Thunno 2, 3 bytes
ɦ/ṃ

Attempt This Online!
Explanation
ɦ/ṃ  #      input
ɦ    #              100
 /   #            /
  ṃ  # ceil(           )
     # Implicit output

Ly, 7 bytes
'c+SppJ

Try it online!
This uses the (N+99) trick other code uses to get the right century for xx00 years.  After that it converts the result to a string and prints the first two digits.
'c       - push 99 onto the stack
  +      - add number on STDIN to 99
   S     - split number to digits
    pp   - delete two least significant digits
      J  - recombine the remaining two digits into a number

The stack prints as number by default when the program exits


text:
The Traveling Toothbrush
Introduction
Today's challenge is all about teeth. Specifically, how long it takes to brush from one tooth to another. Your challenge is, given the locations of two teeth, output the shortest amount of time possible to brush from the first to the second.
Challenge
For this challenge we will be using a layout of an average adult human mouth:

This diagram shows the widely used ISO numbering system. The system divides the mouth in four parts and assigns them each a number: upper right (1), upper left (2), lower left (3), and lower right (4). They then number the teeth of each section from the middle of the mouth out from 1-8. Therefore the fourth tooth from the center in the upper right side (section 1) is tooth number 14.
Let's assume brushing one tooth takes 1 unit of time.  Moving from one tooth to the next one sideways takes 0 units of time. You can also cross from a tooth to the tooth directly above or below it, which also takes 1 unit of time. So how long does it take you to brush from tooth 14 to tooth 31? By looking at the diagram above, you will see it takes 7 units of time. Here is how that's calculated:
Action : Unit of time
Brushing tooth 14 : 1 unit
Brushing tooth 13 : 1 unit
Brushing tooth 12 : 1 unit
Brushing tooth 11 : 1 unit
Brushing tooth 21 : 1 unit
Cross to bottom of mouth : 1 unit
Brushing tooth 31 : 1 unit
------------------------------
Total: 7 units

Note his is not the only route we could have took, but there are no shorter routes.
So your challenge is:

You will write a full program or function which accepts two arguments that are teeth numbers, and outputs (or returns) the shortest time to brush from one to the other.
You make take input as numbers or strings, and output how ever you wish (within acceptable methods).
Standard loopholes are forbidden by default.
This question is code-golf, so shortest bytecount wins.
Here are some testcases (Thanks Jonathan Allan):
14, 21 => 5
14, 44 => 3
14, 14 => 1
33, 37 => 5

Good luck!

@JonathanAllan will add when I get back to my computer.

"Moving from tooth to tooth takes 0 units of time." <- More precisely, I think you mean "Moving from one tooth to the next sideways takes 0 units of time". (I first took it to mean moving from any tooth to any other takes 1 unit, which made the next sentence confusing.)

@sundar you're right, will edit.

@JonathanAllan done.

Jelly,  24  20 bytes
d30%20ị2¦⁵R;C$¤)ạ/Ḅ‘

A monadic link accepting a list of two integers (e.g. [14,31] for the from 14 to 31 example) which yields the brushing-time.
Try it online!

Previous 24 byter built the mouth and used base 8, input was a list of lists of digits:
8R;C$C+⁴U,+ɗ⁴
ḅ8¢œiⱮạ/Ḅ‘

JavaScript (ES6), 65 bytes

f=([s,t],[u,v])=>s<3^u<3?f(s+t,5-u+v)+2:s-u?t-+-v:t<v?++v-t:++t-v

for(i=1;i<5;i++)for(j=1;j<9;j++){let o=document.createElement("option");o.text=""+i+j;s.add(o);t.add(o.cloneNode(true));}

<select id=s></select><select id=t></select>
1

Takes input as strings.

Python 2, 91 bytes
def f(a,b):A,B=a/10,b/10;return[abs(a-b)%10+1+2*(A!=B),a%10+b%10+2-(A+B)%2*2][A!=B!=A+B!=5]

Try it online!

JavaScript (ES6), 67 bytes
([a,b],[x,y])=>(u=(a==x)+3*!(a+x-5))?Math.abs(b-y)+u:2*!(a-x&1)+b+y

Expects inputs as two 2-element arrays of digits. 12 -> [1, 2] I hope this
is acceptable.
Try it online!
Looks like a near duplicate to @Chas Brown's Python
answer, so I can remove it
if necessary (unsure of the conventions here).
Explanation
var g =
([a,b], [x,y]) =>
    (u = (a == x)                // if same quadrant of mouth
     + 3 * !(a + x - 5))         // or strictly traversing vertically (e.g. 1 to 4, or 2 to 3)
        ? Math.abs(b - y) + u    // absolute difference plus additional units of time
        : 2 * !(a - x & 1)       // = 2 if traversing diagonally
            + b + y

"Looks like a near duplicate to @Chas Brown's Python answer, so I can remove it if necessary (unsure of the conventions here)." Since they are different languages both may stay. Only if two answers in the same language are exactly the same it's best practice that the one posted last delete their answer (although if two people having the exact same answer and they found it independent of each other they are allowed to keep both; most will delete their answer if they have the exact same as someone who posted sooner, though). But with different languages there is no problem. Welcome to PPCG! :)

Python 2,  80  78 bytes
Probably some golfing opportunities here still
lambda s,e,l=(range(11)+range(0,-9,-1))*2:abs(l[s%30]-l[e%30]+s/30*2-e/30*2)+1

An unnamed function accepting two integers, s and e, which returns the brushing-time.
Try it online!

Clean, 134 128 126 bytes
import StdEnv
@n=hd[i\\i<-[0..]&k<-[18,17..11]++[21..28]++[48,47..41]++[31..38]|n==k]rem 16
$a b=abs(@a- @b)+a/30bitxor b/30+2

Try it online!
Defines the function $ :: Int Int -> Int, which just finds the distance between the two teeth as Cartesian coordinates. Pretty boring solution really.

source: Stack Exchange

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

sort: votes


text:
Where's Blackhat?
Challenge
Write code which, given an image of a panel from a random xkcd comic, returns a truthy value if Blackhat is in the comic or falsey if not.
Who is Blackhat?
Blackhat is the unofficial name given to the character in xkcd comics who wears a black hat:

Taken from the Explain xkcd page on Blackhat
Blackhat's hat is always straight sided, black and looks the same as in the above image.
Other characters may also have hats and hair but none will have hats which are black and straight sided.
Input
The image may be input in anyway you wish whether it be a path to the image or bytes via STDIN. You should not need to take a URL as input.
Rules
Hardcoding the answer is not banned, but it is not appreciated.
You are not allowed to access the internet to get the answer.
Examples
All images cropped from images from https://xkcd.com
Blackhat is in the panel (return truthy)

Blackhat is not in the panel (return falsey)

Test Battery
The 20 images which contain Blackhat can be found here: https://beta-decay.github.io/blackhat.zip
The 20 images which do not contain Blackhat can be found here: https://beta-decay.github.io/no_blackhat.zip
If you want more images to test your programs with (to train for the mystery test cases), you can find a list of all appearances of Blackhat here: http://www.explainxkcd.com/wiki/index.php/Category:Comics_featuring_Black_Hat
Winning
The program which correctly identifies whether Blackhat is in the comic or not for the most images wins. Your header should include your score as a percentage.
In the event of a tiebreak, the tied programs will be given "mystery" images (i.e. ones that only I know about). The code which identifies the most correctly wins the tiebreak.
The mystery images will be revealed along with the scores.
Note: it seems that Randall’s name for him may be Hat Guy. I prefer Blackhat though.

Major stumbling blocks in no_blackhat.zip: #10 the pilot; #19 the webcams

@JonathanAllan Similarly in blackhat.zip: #6 two hat black hat and #16 blackhat with a bit of hair

I'll not be surprised if Mathematica has a built-in for that. (For reference)

Suggestion for a different tie breaker: have a different, smaller set of images (say 5 true cases and 5 false) that are unrevealed here, and the winner of the tie breaker is the one that generalises best to these unknown images. That would incentivize the more generic smarter solutions vs ones that overfit to these specific images.

The test cases with the police and with the RIAA/MPAA are just evil. Good test battery, @BetaDecay.

Let us continue this discussion in chat.

Relevant: "How do I find Waldo with Mathematica", which implements small-area-of-red-and-white-stripes detection in an arbitrary image https://stackoverflow.com/questions/8479058/how-do-i-find-waldo-with-mathematica

@BetaDecay: Thanks for the bounty! I am curious to see your hidden/mystery images and test my script with them too (but never mind if you haven't created that set yet).

@Night2 Sorry! I only planned to make any of there was tie. Nice work on 100% though!

PHP (>=7), 100% (40/40)
<?php

set_time_limit(0);

class BlackHat
{
    const ROTATION_RANGE = 45;

    private $image;
    private $currentImage;
    private $currentImageWidth;
    private $currentImageHeight;

    public function __construct($path)
    {
        $this->image = imagecreatefrompng($path);
    }

    public function hasBlackHat()
    {
        $angles = [0];

        for ($i = 1; $i <= self::ROTATION_RANGE; $i++) {
            $angles[] = $i;
            $angles[] = -$i;
        }

        foreach ($angles as $angle) {
            if ($angle == 0) {
                $this->currentImage = $this->image;
            } else {
                $this->currentImage = $this->rotate($angle);
            }

            $this->currentImageWidth = imagesx($this->currentImage);
            $this->currentImageHeight = imagesy($this->currentImage);

            if ($this->findBlackHat()) return true;
        }

        return false;
    }

    private function findBlackHat()
    {
        for ($y = 0; $y < $this->currentImageHeight; $y++) {
            for ($x = 0; $x < $this->currentImageWidth; $x++) {
                if ($this->isBlackish($x, $y) && $this->isHat($x, $y)) return true;
            }
        }

        return false;
    }

    private function isHat($x, $y)
    {
        $hatWidth = $this->getBlackishSequenceSize($x, $y, 'right');
        if ($hatWidth < 10) return false;

        $hatHeight = $this->getBlackishSequenceSize($x, $y, 'bottom');

        $hatLeftRim = $hatRightRim = 0;
        for (; ; $hatHeight--) {
            if ($hatHeight < 5) return false;

            $hatLeftRim = $this->getBlackishSequenceSize($x, $y + $hatHeight, 'left');
            if ($hatLeftRim < 3) continue;

            $hatRightRim = $this->getBlackishSequenceSize($x + $hatWidth, $y + $hatHeight, 'right');
            if ($hatRightRim < 2) $hatRightRim = $this->getBlackishSequenceSize($x + $hatWidth, $y + $hatHeight, 'right', 'isLessBlackish');
            if ($hatRightRim < 2) continue;

            break;
        }

        $ratio = $hatWidth / $hatHeight;
        if ($ratio < 2 || $ratio > 4.2) return false;

        $widthRatio = $hatWidth / ($hatLeftRim + $hatRightRim);
        if ($widthRatio < 0.83) return false;
        if ($hatHeight / $hatLeftRim < 1 || $hatHeight / $hatRightRim < 1) return false;

        $pointsScore = 0;
        if ($this->isSurroundedBy($x, $y, 3, true, true, false, false)) $pointsScore++;
        if ($this->isSurroundedBy($x + $hatWidth, $y, 3, true, false, false, true)) $pointsScore++;
        if ($this->isSurroundedBy($x, $y + $hatHeight, 3, false, false, true, false)) $pointsScore++;
        if ($this->isSurroundedBy($x + $hatWidth, $y + $hatHeight, 3, false, false, true, false)) $pointsScore++;
        if ($this->isSurroundedBy($x - $hatLeftRim, $y + $hatHeight, 3, true, true, true, false)) $pointsScore++;
        if ($this->isSurroundedBy($x + $hatWidth + $hatRightRim, $y + $hatHeight, 3, true, false, true, true)) $pointsScore++;
        if ($pointsScore < 3 || ($hatHeight >= 19 && $pointsScore < 4) || ($hatHeight >= 28 && $pointsScore < 5)) return false;

        $middleCheckSize = ($hatHeight >= 15 ? 3 : 2);
        if (!$this->isSurroundedBy($x + (int)($hatWidth / 2), $y, $middleCheckSize, true, null, null, null)) return false;
        if (!$this->isSurroundedBy($x + (int)($hatWidth / 2), $y + $hatHeight, $middleCheckSize, null, null, true, null)) {
            if (!$this->isSurroundedBy($x + (int)(($hatWidth / 4) * 3), $y + $hatHeight, $middleCheckSize, null, null, true, null)) return false;
        }
        if (!$this->isSurroundedBy($x, $y + (int)($hatHeight / 2), $middleCheckSize + 1, null, true, null, null)) return false;
        if (!$this->isSurroundedBy($x + $hatWidth, $y + (int)($hatHeight / 2), $middleCheckSize, null, null, null, true)) return false;

        $badBlacks = 0;
        for ($i = 1; $i <= 3; $i++) {
            if ($y - $i >= 0) {
                if ($this->isBlackish($x, $y - $i)) $badBlacks++;
            }

            if ($x - $i >= 0 && $y - $i >= 0) {
                if ($this->isBlackish($x - $i, $y - $i)) $badBlacks++;
            }
        }
        if ($badBlacks > 2) return false;

        $total = ($hatWidth + 1) * ($hatHeight + 1);
        $blacks = 0;
        for ($i = $x; $i <= $x + $hatWidth; $i++) {
            for ($j = $y; $j <= $y + $hatHeight; $j++) {
                $isBlack = $this->isBlackish($i, $j);
                if ($isBlack) $blacks++;
            }
        }

        if (($total / $blacks > 1.15)) return false;

        return true;
    }

    private function getColor($x, $y)
    {
        return imagecolorsforindex($this->currentImage, imagecolorat($this->currentImage, $x, $y));
    }

    private function isBlackish($x, $y)
    {
        $color = $this->getColor($x, $y);
        return ($color['red'] < 78 && $color['green'] < 78 && $color['blue'] < 78 && $color['alpha'] < 30);
    }

    private function isLessBlackish($x, $y)
    {
        $color = $this->getColor($x, $y);
        return ($color['red'] < 96 && $color['green'] < 96 && $color['blue'] < 96 && $color['alpha'] < 40);
    }

    private function getBlackishSequenceSize($x, $y, $direction, $fn = 'isBlackish')
    {
        $size = 0;

        if ($direction == 'right') {
            for ($x++; ; $x++) {
                if ($x >= $this->currentImageWidth) break;
                if (!$this->$fn($x, $y)) break;
                $size++;
            }
        } elseif ($direction == 'left') {
            for ($x--; ; $x--) {
                if ($x < 0) break;
                if (!$this->$fn($x, $y)) break;
                $size++;
            }
        } elseif ($direction == 'bottom') {
            for ($y++; ; $y++) {
                if ($y >= $this->currentImageHeight) break;
                if (!$this->$fn($x, $y)) break;
                $size++;
            }
        }

        return $size;
    }

    private function isSurroundedBy($x, $y, $size, $top = null, $left = null, $bottom = null, $right = null)
    {
        if ($top !== null) {
            $flag = false;
            for ($i = 1; $i <= $size; $i++) {
                if ($y - $i < 0) break;
                $isBlackish = $this->isBlackish($x, $y - $i);

                if (
                    ($top && !$isBlackish) ||
                    (!$top && $isBlackish)
                ) {
                    $flag = true;
                } elseif ($flag) {
                    return false;
                }
            }
            if (!$flag) return false;
        }

        if ($left !== null) {
            $flag = false;
            for ($i = 1; $i <= $size; $i++) {
                if ($x - $i < 0) break;
                $isBlackish = $this->isBlackish($x - $i, $y);

                if (
                    ($left && !$isBlackish) ||
                    (!$left && $isBlackish)
                ) {
                    $flag = true;
                } elseif ($flag) {
                    return false;
                }
            }
            if (!$flag) return false;
        }

        if ($bottom !== null) {
            $flag = false;
            for ($i = 1; $i <= $size; $i++) {
                if ($y + $i >= $this->currentImageHeight) break;
                $isBlackish = $this->isBlackish($x, $y + $i);

                if (
                    ($bottom && !$isBlackish) ||
                    (!$bottom && $isBlackish)
                ) {
                    $flag = true;
                } elseif ($flag) {
                    return false;
                }
            }
            if (!$flag) return false;
        }

        if ($right !== null) {
            $flag = false;
            for ($i = 1; $i <= $size; $i++) {
                if ($x + $i >= $this->currentImageWidth) break;
                $isBlackish = $this->isBlackish($x + $i, $y);

                if (
                    ($right && !$isBlackish) ||
                    (!$right && $isBlackish)
                ) {
                    $flag = true;
                } elseif ($flag) {
                    return false;
                }
            }
            if (!$flag) return false;
        }

        return true;
    }

    private function rotate($angle)
    {
        return imagerotate($this->image, $angle, imagecolorallocate($this->image, 255, 255, 255));
    }
}

$bh = new BlackHat($argv[1]);
echo $bh->hasBlackHat() ? 'true' : 'false';

To run it:
php <filename> <image_path>

Example:
php black_hat.php "/tmp/blackhat/1.PNG"

Notes

Prints "true" if finds black hat and "false" if doesn't find it.
This should work on previous versions of PHP as well, but to be safe, use PHP>=7 with GD.
This script actually tries to find the hat and by doing so, it might rotate the image many many times and each time checks for thousands and thousands of pixels and clues. So the larger the image is or the more dark pixels it has, the script will take more time to finish. It should take a few seconds to a minute for majority of images though.
I would love to train this script more, but I don't have enough time to do so.
This script is not golfed (again because I don't have enough time), but has lots of potential to golf in case of a tie.

Some examples of detected black hats:

These examples are acquired by drawing red lines on special points found on the image that script decided has a black hat (images can have rotation compared to original ones).

Extra
Before posting here, I did test this script against another set of 15 images, 10 with black hat and 5 without black hat and it went correct for all of them as well (100%).
Here is the ZIP file containing extra test images I used: extra.zip
In the extra/blackhat directory, the detection results with red lines are also available. For example extra/blackhat/1.png is the test image and extra/blackhat/1_r.png is the detection result of it.

The tiebreak isn't code golf. Instead, the programs are fed hidden test cases until the tie break is resolved. I'll then tell you the result and post the test cases :)

@BetaDecay: Thanks for clarification, this sentence (shortest wins on a tie) was in my head from previous versions of the question, so I was thinking that if a tie happens on hidden test cases, then shortest code wins. My bad!

You win the prize for least likely image processing language too :)

@Anush Well at least PHP has imagerotate built-in, so...

What I like about PHP is that it has some basic functionality for almost anything. It has bundled GD for so many years and GD actually satisfies most common needs of working with images. But what I like more about PHP is that there are always some extensions/packages which will give you more (because of having a huge community). For example there are OpenCV extensions for PHP which allow actual image processing to be done!

Checkout Mathematica :) (unfortunately it's not free)

@BetaDecay What's hidden test case score?

We need a golf challenge for solutions that get 100% now.

@user202729 There wasn’t a tie, so no hidden test cases were needed

Matlab, 87,5%
function hat=is_blackhat_here2(filepath)

img_hsv = rgb2hsv(imread(filepath));
img_v = img_hsv(:,:,3);

bw = imdilate(imerode( ~im2bw(img_v), strel('disk', 4, 8)), strel('disk', 4, 8));
bw = bwlabel(bw, 8);
bw = imdilate(imerode(bw, strel('disk', 1, 4)), strel('disk', 1, 4));
bw = bwlabel(bw, 4);

region_stats = regionprops(logical(bw), 'all');
hat = false;
for i = 1 : numel(region_stats)
    if mean(img_v(region_stats(i).PixelIdxList)) < 0.15 ...
            && region_stats(i).Area > 30 ...
            && region_stats(i).Solidity > 0.88 ...
            && region_stats(i).Eccentricity > 0.6 ...
            && region_stats(i).Eccentricity < 1 ...
            && abs(region_stats(i).Orientation) < 75...
            && region_stats(i).MinorAxisLength / region_stats(i).MajorAxisLength < 0.5;
        hat = true;
        break;
    end
end

Enhancement of the previous version, with some checks added on the shape of the candidate regions.
Classification errors in HAT set: images 4, 14, 15, 17.
Classification errors in NON HAT set: images 4.
Some examples of corrected classified images:

Example of a wrong classified image:

OLD VERSION (77,5%)
function hat=is_blackhat_here(filepath)

img_hsv = rgb2hsv(imread(filepath));
img_v = img_hsv(:,:,3);
bw = imerode(~im2bw(img_v), strel('disk', 5, 8));

hat =  mean(img_v(bw)) < 0.04;

Approach based on image erosion, similar to the solution proposed by Mnemonic, but based on V channel of the HSV image.
Moreover, the mean value of the channel of the selected area is checked (not its size).
Classification errors in HAT set: images 4, 5, 10.
Classification errors in NON HAT set: images 4, 5, 6, 7, 13, 14.

Pyth, 62.5%
<214.O.n'z

Accepts the filename of an image file on stdin. Returns True if the average of all its RGB color components are greater than 214.  You read that right: apparently blackhat images tend to be brighter than no-blackhat images.
(Surely someone can do better—this isn’t code-golf!)

I was amazed at the power of Pyth until I realised :D

For an instant I thought "Since when Pyth has a built in for recognizing blackhat images"

62.5% is 25 out of 40 images. A random guessing program (with fixed seed, something like that) would have a probability of ${\sum_{i=25}^{40} {40 \choose i} \over 2^{40}} \approx 7.7% $ of doing at least as good as that.

Python 2, 65% 72.5% 77.5% (= 31/40)
import cv2
import numpy as np
from scipy import misc

def blackhat(path):
    im = misc.imread(path)
    black = (im[:, :, 0] < 10) & (im[:, :, 1] < 10) & (im[:, :, 2] < 10)
    black = black.astype(np.ubyte)

    black = cv2.erode(black, np.ones((3, 3)), iterations=3)

    return 5 < np.sum(black) < 2000

This figures out which pixels are black, then erodes away small contiguous pieces.  Certainly room for improvement here.

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


text:
Sort of numbers
Within the recesses of Unicode characters, there exists a Unicode block of (currently) 63 characters named "Number Forms", which consists of characters that have numerical values such as the roman numeral Ⅻ, vulgar fractions like ⅑ or ↉, or weird ones like ↊ (10) or ↈ (100000).
Your task is to write a program or function that, when given a list of assigned Unicode characters within this block, sorts the list by the numerical values of each character.
A (sortable) list of characters and values can be found on the Wikipedia Page.
To be self contained though, here's a list of the codepoints and their values:
Hex     Char   Value
0x00BC: ¼   = 1/4 or 0.25
0x00BD: ½   = 1/2 or 0.5
0x00BE: ¾   = 3/4 or 0.75
0x2150: ⅐   = 1/7 or 0.142857
0x2151: ⅑   = 1/9 or 0.111111
0x2152: ⅒   = 1/10 or 0.1
0x2153: ⅓   = 1/3 or 0.333333
0x2154: ⅔   = 2/3 or 0.666667
0x2155: ⅕   = 1/5 or 0.2
0x2156: ⅖   = 2/5 or 0.4
0x2157: ⅗   = 3/5 or 0.6
0x2158: ⅘   = 4/5 or 0.8
0x2159: ⅙   = 1/6 or 0.166667
0x215A: ⅚   = 5/6 or 0.833333
0x215B: ⅛   = 1/8 or 0.125
0x215C: ⅜   = 3/8 or 0.375
0x215D: ⅝   = 5/8 or 0.625
0x215E: ⅞   = 7/8 or 0.875
0x215F: ⅟   = 1
0x2160: Ⅰ   = 1
0x2161: Ⅱ   = 2
0x2162: Ⅲ   = 3
0x2163: Ⅳ   = 4
0x2164: Ⅴ   = 5
0x2165: Ⅵ   = 6
0x2166: Ⅶ   = 7
0x2167: Ⅷ   = 8
0x2168: Ⅸ   = 9
0x2169: Ⅹ   = 10
0x216A: Ⅺ   = 11
0x216B: Ⅻ   = 12
0x216C: Ⅼ   = 50
0x216D: Ⅽ   = 100
0x216E: Ⅾ   = 500
0x216F: Ⅿ   = 1000
0x2170: ⅰ   = 1
0x2171: ⅱ   = 2
0x2172: ⅲ   = 3
0x2173: ⅳ   = 4
0x2174: ⅴ   = 5
0x2175: ⅵ   = 6
0x2176: ⅶ   = 7
0x2177: ⅷ   = 8
0x2178: ⅸ   = 9
0x2179: ⅹ   = 10
0x217A: ⅺ   = 11
0x217B: ⅻ   = 12
0x217C: ⅼ   = 50
0x217D: ⅽ   = 100
0x217E: ⅾ   = 500
0x217F: ⅿ   = 1000
0x2180: ↀ   = 1000
0x2181: ↁ   = 5000
0x2182: ↂ   = 10000
0x2183: Ↄ   = 100
0x2184: ↄ   = 100
0x2185: ↅ   = 6
0x2186: ↆ   = 50
0x2187: ↇ   = 50000
0x2188: ↈ   = 100000
0x2189: ↉   = 0
0x218A: ↊   = 10
0x218B: ↋   = 11

Test cases:
['½','ↆ','ↂ','⅒','Ⅽ','⅑','ⅷ'] -> ['⅒','⅑','½','ⅷ','ↆ','Ⅽ','ↂ']

['¼','↋','↉','ↅ','⅐','⅟','Ⅻ','ⅺ'] -> ['↉','⅐','¼','⅟','ↅ','↋','ⅺ','Ⅻ']

['¼','½','¾','⅐','⅑','⅒','⅓','⅔','⅕','⅖','⅗','⅘','⅙','⅚','⅛','⅜','⅝','⅞','⅟'] -> ['⅒','⅑','⅛','⅐','⅙','⅕','¼','⅓','⅜','⅖','½','⅗','⅝','⅔','¾','⅘','⅚','⅞','⅟']

'⅞ⅾ↊ↄⅨⅮⅺↁⅸⅰⅩⅱⅶ¾ⅧↅↃ↋ↆ⅔ⅼⅲ⅘⅒ⅽⅦ⅕ⅤⅭⅳↂⅪⅬⅯↇⅠⅷ⅛Ⅵ½ⅵ¼ⅻ⅐Ⅱ⅜⅗⅝⅚Ⅳ⅓ⅴ↉ⅿⅫⅹↀↈ⅙⅑Ⅲ⅖⅟' -> '↉⅒⅑⅛⅐⅙⅕¼⅓⅜⅖½⅗⅝⅔¾⅘⅚⅞⅟ⅠⅰⅡⅱⅢⅲⅣⅳⅤⅴⅥⅵↅⅦⅶⅧⅷⅨⅸⅩⅹ↊Ⅺⅺ↋ⅫⅻⅬⅼↆⅭⅽↄↃⅮⅾⅯⅿↀↁↂↇↈ'

['Ↄ','ↄ','↊','↋'] -> ['↊','↋','ↄ','Ↄ']

Note that four of the symbols (the ones used in the last case) are not unicode numbers, though they still have a numerical value, so make sure to check before just posting a built-in.
Rules:

If any more characters are assigned to this block in the future, you won't need to update your code to support them.
Order of characters with identical values doesn't matter.
IO is flexible.

Output must be as the characters though, not the numerical values

Standard Loopholes are forbidden.
I'm not banning built-ins that can fetch the numerical value of a character, but I encourage also adding a non-builtin answer if possible.
This is code-golf, so shortest answer in bytes for each languages wins! Good luck!

R.I.P monospacing :(

Python 3, 216 213 bytes
-3 bytes thanks to TFeld

lambda l:sorted(l,key='⅒⅑⅐⅙⅕¼⅓⅖½⅗⅔¾⅘⅚⅟ⅠⅰⅡⅱⅢⅲⅣⅳⅤⅴⅥⅵↅⅦⅶⅧⅷⅨⅸⅩⅹ↊Ⅺⅺ↋ⅫⅻⅬⅼↆⅭⅽↃↄ⅛⅜Ⅾⅾ⅝⅞Ⅿⅿↀↁↂↇↈ'.find)

Try it online!
With built-in that fetch the numerical value, 111 bytes
lambda l:sorted(l,key=lambda c:[10,11,100,100,0]['↊↋Ↄↄ'.find(c)]or numeric(c))
from unicodedata import*

Try it online!

You can save 3 bytes by removing ↉ from the string (find returns -1 which is smallest)

Perl 6, 57 bytes
*.sort: {%(<Ↄ 100 ↄ 100 ↊ 10 ↋ 11>){$_}//.unival}

Try it online!
Just looks up the four exceptional characters in a hash, or falls back to the built-in unival method.

You don't need the space after the colon. Also, your link is still in a code block rather than a Whatever lambda

05AB1E (legacy), 192 74 63 61 bytes
Σ•Bšā¿ÑáζΔÕæ₅"®GÙ₂®°ƶío"§óÏ4¸bćÔ!₃ùZFúÐìŸ
,λ₂Ï¦P(Ì•65в₂+sÇт%k

-118 bytes by using characters of 05AB1E's code page only, so we don't need to use UTF-8 encoding.
-11 bytes thanks to @Adnan.
-2 bytes thanks to @Grimy.
Try it online or verify all test cases.
Explanation:
Σ            # Sort the input by:
 •Bšā¿ÑáζΔÕæ₅"®GÙ₂®°ƶío"§óÏ4¸bćÔ!₃ùZFúÐìŸ
 ,λ₂Ï¦P(Ì•65в₂+
             #  List of ASCII values modulo-100 of the characters we want to sort
 sÇ          #  Get the ASCII value of the current input-character
   т%        #  Take modulo 100 of this ASCII value
 k           #  And get the index in the list of ASCII values, as sorting order

So what is •Bšā¿ÑáζΔÕæ₅"®GÙ₂®°ƶío"§óÏ4¸bćÔ!₃ùZFúÐìŸ\n,λ₂Ï¦P(Ì•65в₂+?
Based on the order of the characters modulo-100 we get the following list:
[85,30,29,39,28,37,33,88,31,40,34,89,35,41,32,90,36,38,42,43,44,60,45,61,46,62,47,63,48,64,49,65,81,50,66,51,67,52,68,53,69,86,54,70,87,55,71,56,72,82,57,73,79,80,58,74,59,75,76,77,78,83,84]

These are generated by the following program:
"↉⅒⅑⅛⅐⅙⅕¼⅓⅜⅖½⅗⅝⅔¾⅘⅚⅞⅟ⅠⅰⅡⅱⅢⅲⅣⅳⅤⅴⅥⅵↅⅦⅶⅧⅷⅨⅸⅩⅹ↊Ⅺⅺ↋ⅫⅻⅬⅼↆⅭⅽↃↄⅮⅾⅯⅿↀↁↂↇↈ"Çт%

Try it online.
•Bšā¿ÑáζΔÕæ₅"®GÙ₂®°ƶío"§óÏ4¸bćÔ!₃ùZFúÐìŸ\n,λ₂Ï¦P(Ì•65в₂+ is a shorter variation of this list by taking the compressed number 1485725021600091112740267145165274006958935956446028449609419704394607952161907963838640094709317691369972842282463, then converting it to Base-65, and then adding 26 to each.
Try it online and verify that the lists are the same.

How does the encoding work? Surely not all of those characters are single bytes in 05AB1E's encoding

Yes, not all of those characters are in 05AB1E's encoding, so that would be 192 bytes.

@Okx Hmm, TIO mentioned 68 chars, 68 bytes (SBCS) though, so that's what I looked at for the byte-count. How do you know it's 192?

I think SBCS implies that TIO just assumes that every character is a single byte, instead of checking it against the languages code page

Yeah, it is not possible to represent this code as a 68-byte file which forces us to fall back to UTF-8, which is indeed 192 bytes.

@JoKing So, now I'm only using characters from 05AB1E's code page. ;) Still a boring approach, but will see if I can find some kind of arithmetic pattern.

I think you can replace "]&%/$-)\'0*a+1(b,.234D5E6F7G8H9IY:J;K<L=M^>N_?O@PZAQWXBRCSTUV["Ç8-` with `•4Œ”dóŒfÝŸĀTUÕáOyÖOÀÁàu¼6¹₆Žr‡_›y³eß₂©ǝ²ƶ"SAÎAñ'¡û†Ø(•91в`

@Adnan Thanks! Btw, do you know why the verify all test cases doesn't work anymore?

Hmm, that seems to be a parsing error not registring the closing bracket. I'll look into this.

-2 bytes by using a better encoding. This is a fairly general trick (another example), so you may want to add it to your tips post.

Japt, 72 bytes
ñ@`'%!x("y#) z$&*+,<-=.>/?0@1aq2b3c4d5ev6fw7g8hr9iop:j;klmn¡`u bXcuL

Try it or run all test cases

Explanation
ñ@                 :Sort by passing each X through a function
  `...`            :  A compressed string, which itself contains a bunch of unprintables (See below for codepoints of original string)
       u           :  Uppercase
         b         :  Index of
          Xc       :   Charcode of X
            uL     :   Mod 100 and get character at that codepoint

Codepoints
30,29,39,28,37,33,120,31,40,34,121,35,41,32,122,36,38,42,43,44,60,45,61,46,62,47,63,48,64,49,97,113,50,98,51,99,52,100,53,101,118,54,102,119,55,103,56,104,114,57,105,111,112,58,106,59,107,108,109,110,115,116

Original Solution, 90 89 88 bytes
ñ!b`(&" )#$*!%'+,-=.>/?0@1a2br3c4d5e6fw7gx8h9:jpq;k<lmÍ/`®iv u nLõd)dÃi6'¼ iA'½ iE'¾

Try it or run all test cases

Explanation
   `...`                                :A compressed string, which itself contains a bunch of unprintables (See below for codepoints of original string)
        ®                               :Map
         iv                             :  Prepend "v"
            u                           :  Convert to uppercase
               Lõ                       :  Range [1,100]
                 d                      :  Characters at those codepoints
              n   )                     :  Convert from that base to base-10
                   d                    :  Get the character at that codepoint
                    Ã                   :End map
                     i6'¼               :Insert "¼" at (0-based) index 6
                          iA'½          :Insert "½" at index 10
                               iE'¾     :Insert "¾" at index 14
ñ                                       :Sort the input array
 !b                                     :  By finding the index of the current element in the string above

Codepoints
31,30,40,29,38,34,32,41,35,36,42,33,37,39,43,44,45,61,46,62,47,63,48,64,49,97,50,98,114,51,99,52,100,53,101,54,102,119,55,103,120,56,104,57,105,115,58,106,112,113,59,107,60,108,109,110,111,116,117

Retina, 193 bytes (UTF-8)
2{O`.
T`¼-¾⅐-↋\LI ^]Q@TU\\[ZYWSPNK\HFDB?=;975X\VR\OMJG\ECA><:86432\-)#1%0,*&.(!"$/+'`Ro

Try it online! Explanation: Sorts the characters in code point order, then maps between the numeric characters and ASCII characters so that the numeric characters with the lowest value map the the ASCII characters with the lowest code point and vice versa. Then repeats the exercise, so that the characters are now sorted in order of this ASCII mapping, which corresponds to the desired numeric order, before they are transformed back. Edit: Saved 100 (!) bytes by specifying the order of the ASCII characters rather than the numeric characters.

Jelly, 55 bytes
O%70‘“$Żz*ṀḢD⁹VṢaʠƝ lẹkƝʋ9⁽ƭXmż4#⁺3ç%|ọṢLxƈ⁽}ÞƇ2’Œ?¤iµÞ

A monadic link accepting a list of characters which yields a list of characters.
Try it online!
How?
Much simpler than it looks since “$Żz*ṀḢD⁹VṢaʠƝ lẹkƝʋ9⁽ƭXmż4#⁺3ç%|ọṢLxƈ⁽}ÞƇ2’ is just a large number in base 250 using Jelly's code-page as the digits, I shall use “...’ in its place.
O%70‘“...’Œ?¤iµÞ - Link: list of characters
               Þ - sort by:
              µ  -   the monadic function (i.e. f(character)):
O                -     get the ordinal value of the character
 %70             -     modulo by 70 (get the remainder after dividing by 70)
                 -       - giving integers in [0,69] excluding [52,58]
    ‘            -     increment (below code pattern can't have anything but '↉' map to 0)
            ¤    -     nilad followed by link(s) as a nilad:
     “...’       -       literal 7826363328008670802853323905140295872014816612737076282224746687856347808481112431487214423845098801
          Œ?     -       get the permutation of natural numbers [1,N] with minimal N such
                 -         that this permutation would reside at the given index in a
                 -         sorted list of all permutations of those same numbers
                 -         -> [46,52,53,54,55,56,57,58,61,60,70,59,68,64,49,62,1,65,50,66,2,63,51,67,69,3,4,5,21,6,22,7,23,8,24,9,25,10,26,42,11,27,12,28,13,29,14,30,47,15,31,48,16,32,17,33,43,18,34,40,41,19,35,20,36,37,38,39,44,45]
             i   -     first index of (the ordinal mod 70 plus 1) in that list

Aside
Somewhat ironically the nearest to a "use a built-in approach" I could muster was 85 bytes, this uses a compressed string:
from unicodedata import*; copy_to( atoms['
'], numeric( atoms['
'].call()))

which is split on newlines and joined with ⁸s to give the Python code:
from unicodedata import*; copy_to( atoms['⁸'], numeric( atoms['⁸'].call()))

which is executable within Jelly's interpreter - it will place the Unicode character's numeric value into the left argument nilad, ⁸ for later use.

05AB1E, 56 53 51 50 49 48 bytes
ΣÇ©1ö•Ω‘~Èr–Õî5®Î¼ÓÂ∍_OûR•42в•мjāl†£•₂°*S>ÅΓ®Íè+

Try it online!
At the core of this solution is a compressed list mapping unicode code points to a sorting key. Characters that correspond to the same number are mapped to the same key, so we only need 40 different keys.
70 is the smallest number by which we can modulo all input codepoints and get distinct results. Since indexing in 05AB1E wraps around, we don’t need to explicitly 70%, just make sure the list is length 70.
Notice that there are long stretches of consecutive code points with consecutive keys. Thus, encoding (key - codepoint) rather than simply (key) gives long stretches of identical numbers, which can be run-length encoded. However, the range of code points is very large (damn those 0xBC .. 0xBE), which would be an issue. So instead of (key - codepoint), we encode (key - sum_of_digits(codepoint)), which unfortunately limits the stretch length to 10, but does quite well at reducing the range of encoded values. (Other functions are of course possible, like codepoint % constant, but sum of digits gives the best results).
Additionally, it turns out rotating the list by 2 plays well with run-length encoding, so we subtract 2 from the codepoint before indexing.
•Ω‘~Èr–Õî5®Î¼ÓÂ∍_OûR•42в    # compressed list [25, 34, 27, 36, 30, 38, 29, 35, 41, 0, 28, 16, 19, 31, 7, 4, 11, 17, 22, 13, 16, 17, 20, 8, 19, 4, 18, 21]
•мjāl†£•                    # compressed integer 79980000101007
        ₂°*                 # times 10**26
           S                # split to a list of digits
            >               # add 1 to each
             ÅΓ             # run-length decode, using the first list as elements and the second list as lengths

Σ                           # sort by
 Ç©1ö                       # sum of digits of the codepoint
           +                # plus
     ...  è                 # the element of the run-length decoded list
        ®Í                  # with index (codepoint - 2) % 70

JavaScript (SpiderMonkey), 117 bytes
a=>a.sort((a,b)=>(g=c=>';<=>GHIJCDEF?@AB/37~15:;8-9+6.24,*)0N(DEH@GMJKLH'[(c.charCodeAt()&127^44)%92%76%60])(a)>g(b))

Try it online!

T-SQL, 207 bytes
SELECT*FROM t ORDER BY
CHARINDEX(c,N'⅒⅑⅛⅐⅙⅕¼⅓⅜⅖½⅗⅝⅔¾⅘⅚⅞⅟ⅠⅰⅡⅱⅢⅲⅣⅳⅤⅴⅥ
              ⅵↅⅦⅶⅧⅷⅨⅸⅩⅹ↊Ⅺⅺ↋ⅫⅻⅬⅼↆⅭⅽↃↄⅮⅾⅯⅿↀↁↂↇↈ'COLLATE Thai_BIN)

Return in the middle of the string is for readability only. I think I got the byte count correct (3 of the numeric characters are 1-byte, the remainder are 2-bytes), character count is 148.
I pre-sorted the string in ascending order, leaving out ↉ (which returns 0) as suggested by other answers.
Any binary collation will work, I used Thai_BIN since it has the shortest name. (A collation in SQL prescribes how character sorting/comparison is done, I need binary so each character only matches itself.)
Per our IO standards, input is taken via pre-existing table t with NCHAR(1) field c.
If you define the input table itself using a binary collation, you can leave that out to save 16 bytes:
CREATE TABLE t(c NCHAR(1) COLLATE Thai_BIN)

Which characters would match each other if you didn't use binary collation?

@Neil Well, depends on which other collation you use, actually! :). The most obvious one I noticed (using my server default of SQL_Latin1_General_SP1_CI_AS) was that the upper and lowercase Roman numerals match each other. Which.... hmm... might actually work for me here, since they resolve to the same number. But if the collation name is so much longer, that counteracts the savings. BRB, gotta test some more...

@Neil Nope, no good. With non-binary collations, 10 of the less common  characters (⅐⅑⅒Ↄↄↅↆↇↈ↉↊↋ if you are curious) all match up to each other.

Ah, that's a shame, but thanks for letting me know!

Ruby, 77 bytes
Changes all the characters to letters that represent the numerical values and sorts by that.
->a{a.sort_by{|e|e.tr'¼-¾⅐-↋','HLPECBIOGKMQFRDJNSaa-pa-ppqrnnfmstAjk'}}

Try it online!

Perl 6, 13 52 bytes
*.sort:{%(<Ↄ 99 ↄ 99 ↊ 10 ↋ 11>){$_}//.EVAL}

Try it online!

Using eval isn't cheating, but this simply doesn't solve the challenge. 52 that actually works: *.sort:{%(<Ↄ 99 ↄ 99 ↊ 10 ↋ 11>){$_}//.EVAL}


text:
Tips for golfing in TeaScript

TeaScript is a powerful JavaScript golfing language created by StackExchange, PPCG, user Downgoat. TeaScript compiles to JavaScript and contains many helpful features for golfing

This question is to list some TeaScript golfing tips

Why the downvotes?

Too short description, perhaps?

(anyway. looking at the descriptions at the other tips questions, there should be a short description what the language is, and why is it interesting to golf in. otherwise it's not going to attract much interest.)

Maybe linking to a documentation which on 2nd page contains 2 dead links to the language's Web Interface, raise more suspicions than interest…

Well,, I'd expect a question like this to either ask about something or deliver some initial content (self-answer). I don't see much use in a "placeholder question". But that might be just me.

I'd advise adding your own tips to get the ball rolling

@BetaDecay I just started with it and haven't found any yet.

many helpful features for golfing There's definitely at least 1 tip.


text:
Generate an expression yielding near-equidistributed result
Create a program (any language) which, given positive integer m, outputs a valid C expression that:

Uses a single variable x assumed of 32-bit unsigned type (i.e. uint32_t)
Would evaluate to range [0, m) for any of the 2³² possible x, reaching any of the m possible outcomes either 2³² / m or 2³² / m + 1 times (where / rounds down).
Is limited to use of

variable x as operand
constants from 0 to 2³²-1, in decimal (42) or hexadecimal (0x2a)
operators among (listed by groups of decreasing priority in C)

+ -  restricted to addition or subtraction of two operands
<< >>  restricted to right argument constant in range [0, 31]
&  restricted to bitwise and
^  bitwise xor
|  bitwise or

parenthesis for  (expression)
sequence idiom  (x=expression1),expression2  which evaluates expression1, assigns it to x, then evaluates to expression2. The sequence idiom can only  be used to form the overall expression or expression2 in a sequence. , and = do not account as operator.

It is assumed all arithmetic is such that all quantities are truncated to 32-bit, and that right shift >> introduce zeroes.
When given input m, the first output of the program must be an expression valid for m, aiming at a minimal operator count. Further output, if any, should be expressions for incremental m.
Example outputs (believed optimum) for first few inputs m:
output                     m  count  alternative output
0                          1    0    (0)
x&1                        2    1    x>>31
(x-(x>>1)+(x>>2))>>30      3    5    (x=x-(x>>2)),(x=x-(x>>31)),x>>30
x&3                        4    1    x>>30

Following comment, this is a code challenge. Ranking criteria:

Producing conforming expressions with minimum operator count up to the highest m. Expressions posted or linked in other answers are used to assess minimum, after verification.
Minimal expression depth up to the highest m. Depth is 0 for x or constant. The result of an operator has the maximum depth of the two operands when they differ or in a sequence, or 1 more otherwise. Expressions in the example output have depth 1, except for 0. The expression x+1&x+2^x+3&x+4 has depth 3, and any shorter expression has lower depth.
Programs that convincingly produce minimal output (as defined above) are preferred.
Programs which can be evaluated at compile time by a C/C++ compiler for constant m, so that use of R(x,m) generates the same object code as the expression for m does, are preferred. Nice-to-have: not requiring C++, not requiring inline.

Motivation: starting from x uniformly random, we want to restrict it to [0, m) with a distribution comparable to the expression x%m, in a way that is fast and constant-time. Count and depth match instruction and register count on LEG Brain M0, an imaginary 32-bit CPU.

Modifying the following C program changing E and M, then compiling and running it on a compiler with 32-bit int, exhaustively checks an expression against requirement 2, assuming that it is a well-formed C expression that matches requirements 1 and 3. Try it online!
// Verify an expression for requirement 2

// expression under test
#define E (x=x-(x>>2)),(x=x-(x>>31)),x>>30
#define M 3                     // value of m matching that expression

#define T uint32_t              // type for x (change at your own risk!)
#define N 32                    // number of bits in type T
#define C (T)                   // cast to type T; use in E only!

#include <stdint.h>
typedef T t;                    // type for x
#include <inttypes.h>
#if N==32
    #define pPRIuTN "%"PRIu32
    #define pPRIxTN "%08"PRIx32
#elif N==16
    #define pPRIuTN "%"PRIu16
    #define pPRIxTN "%04"PRIx16
#elif N==8
    #define pPRIuTN "%"PRIu8
    #define pPRIxTN "%02"PRIx8
#endif
#include <stdio.h>
#include <string.h>

#define m ((t)M)     // m per our type
#define R(z) #z      // stringizer
#define S(z) R(z)

t c[m];              // counter array (initialized to 0)

int main(void) {
    t fail = sizeof(t)*8!=N || (t)(-1)<0 || ((t)(-1)>>(N-1))!=1,
        lo, hi, xlo, xhi, v, x, y = 0;
    if (fail)
        printf("### fail, please check T: "S(T)" versus N: "S(N)"\n");
    else
        {
    // laboriously show the expression tested, without extra parenthesis
        #define LEN (sizeof(S((E)))-3)  // length of the expression
        char exp[LEN+1];                // the expression, NUL-terminated
        memcpy(exp,S((E))+1,LEN);
        exp[LEN]=0;
        printf("Testing expression %s for m="pPRIuTN"\n",exp,m);
    // compute counts
        do {
            x = y;
            x = (E);
            if (x<m)
                ++c[x];
            else if (!fail) {
                fail = 1;
                printf("### fail, value "pPRIuTN" at input x="pPRIuTN"=0x"pPRIxTN" should be less than m="pPRIuTN"\n",x,y,y,m);
            }
        } while(++y);
    // find minimum and maximum count, and where it occurs
        hi = xlo = xhi = 0;
        lo = (t)-1;
        v = m;
        do {
            y = c[--v];
            if (y>hi)
                hi = y, xhi = v;
            else if (y<lo)
                lo = y, xlo = v;
        } while(v);
    // show results
        if (hi==0 && m>1) // can occur if there was overflow or other error
            fail=1, printf("### fail, only the value "pPRIuTN" occurs\n",x);
        else {
            x = (t)(-m)/m+1;   // lower limit
            y = (t)(-1)/m+1;   // upper limit
            if (lo<x)
                fail=1, printf("### fail, value "pPRIuTN" occurs "pPRIuTN" times, minimum "pPRIuTN"\n",xlo,lo,x);
            if (hi>y)
                fail=1, printf("### fail, value "pPRIuTN" occurs "pPRIuTN" times, maximum "pPRIuTN"\n",xhi,hi,y);
            if (!fail)
                printf("### pass!\n");
            }
        }
    return fail;
}

What is the result of executing x=1+(x=2) or (x=1)+(x=2)+x? If it's undefined behavior, you should specify so.

Operator count should be tagged [tag:atomic-code-golf]?

@ W W: Is atomic-code-golf for when the program, not the output should have the minimum number of (language feature)? That's fine with me, but perhaps the tag's help should be clarified: "scored by the number of operations in a specific fragment of a language you define" applies, here I want the less possible operators in C, and that's ranking criteria #1. Or perhaps a code-challenge just can't be a code-golf..

No not operator?

Warning for those playing with the 16-bit or 8-bit reduced width versions of the validator: C’s promotion rules mean that you’ll need to explicitly mask out high bits for some operations. For example, the 8-bit validator accepts ((x+x+x&0xff)>>7)+(x>>7) but not ((x+x+x)>>7)+(x>>7) for m = 3.

Haskell
import Data.Bits

bitLen :: Int -> Int
bitLen n = finiteBitSize n - countLeadingZeros n

expr' :: Maybe Int -> Int -> String
expr' sh m =
  case sh of
    Nothing
      | m == 1 -> "0"
      | n == 0 -> "x" ++ s
      | o == 0 -> "x-(x-(x>>1)>>" ++ show (i - j - 1) ++ ")" ++ s
      | otherwise ->
        "x-(x-(" ++ expr' (Just j) o ++ ")>>" ++ show (i - j) ++ ")" ++ s
      where s
              | i == 32 = ""
              | otherwise = ">>" ++ show (32 - i)
    Just h
      | n == 0 -> "x>>" ++ show (h - i)
      | o == 0 -> "(x-(x>>" ++ show (i - j) ++ ")>>" ++ show (h - i) ++ ")-1"
      | otherwise ->
        "x-(x-(" ++
        expr' (Just j) o ++ ")>>" ++ show (i - j) ++ ")>>" ++ show (h - i)
  where
    i = bitLen (m - 1)
    n = bit i - m
    j = bitLen (n - 1)
    o = bit j - n

expr :: Int -> String
expr = expr' Nothing

Try it online!
The first few expressions are

0
x>>31
x-(x-(x>>1)>>1)>>30
x>>30
x-(x-(x>>2)>>1)>>29
x-(x-(x>>1)>>1)>>29
x-(x-(x>>1)>>2)>>29
x>>29
x-(x-(x>>3)>>1)>>28
x-(x-(x>>2)>>1)>>28
x-(x-((x-(x>>2)>>1)-1)>>1)>>28
x-(x-(x>>1)>>1)>>28
x-(x-(x>>2)>>2)>>28
x-(x-(x>>1)>>2)>>28
x-(x-(x>>1)>>3)>>28
x>>28
x-(x-(x>>4)>>1)>>27
x-(x-(x>>3)>>1)>>27
x-(x-((x-(x>>2)>>2)-1)>>1)>>27
x-(x-(x>>2)>>1)>>27

C++ template version
template <unsigned m> unsigned Rs(unsigned x, unsigned h);

template <unsigned o>
unsigned Rs2(unsigned x, unsigned h, unsigned i, unsigned j) {
  return (x - ((x - Rs<o>(x, j)) >> (i - j))) >> (h - j);
}
template <> unsigned Rs2<0>(unsigned x, unsigned h, unsigned i, unsigned j) {
  return ((x - (x >> (i - j))) >> (h - i)) - 1;
}

template <unsigned n> unsigned Rs1(unsigned x, unsigned h, unsigned i) {
  constexpr unsigned j = bitlen<n - 1>();
  constexpr unsigned o = (1 << j) - n;
  return Rs2<o>(x, h, i, j);
}
template <> unsigned Rs1<0>(unsigned x, unsigned h, unsigned i) {
  return x >> (h - i);
}

template <unsigned m> unsigned Rs(unsigned x, unsigned h) {
  constexpr unsigned i = bitlen<m - 1>();
  constexpr unsigned n = (1 << i) - m;
  return Rs1<n>(x, h, i);
}

template <unsigned o> unsigned R2(unsigned x, unsigned i, unsigned j) {
  return (x - Rs<o>(x, j)) >> (i - j);
}
template <> unsigned R2<0>(unsigned x, unsigned i, unsigned j) {
  return (x - (x >> 1)) >> (i - j - 1);
}

template <unsigned n> unsigned R1(unsigned x, unsigned i) {
  constexpr unsigned j = bitlen<n - 1>();
  constexpr unsigned o = (1 << j) - n;
  return R2<o>(x, i, j);
}
template <> unsigned R1<0>(unsigned, unsigned) { return 0; }

template <unsigned m> unsigned R(unsigned x) {
  constexpr unsigned i = bitlen<m - 1>();
  constexpr unsigned n = (1 << i) - m;
  return (x - R1<n>(x, i)) >> (32 - i);
}

For example, gcc -O2 generates the following identical code for R<19>(x) and x-(x-((x-(x>>2)>>2)-1)>>1)>>27:
movl    %edi, %edx
movl    %edi, %ecx
leal    1(%rdi), %eax
shrl    $2, %edx
subl    %edx, %ecx
movl    %ecx, %edx
shrl    $2, %edx
subl    %edx, %eax
shrl    %eax
subl    %eax, %edi
movl    %edi, %eax
shrl    $27, %eax

How it works
The expression being computed is equivalent to \$\left\lfloor \frac{mx + m - c(m)}{2^{32}} \right\rfloor\$, where \$c(m)\$ satisfies \$0 < c(m) \le m\$.  The specific choice of \$c(m)\$ made for golfing reasons is
$$
\begin{align*}
c(2^{i + 2}k + 2^i) &= 1 \quad (k \ge 0, i \ge 0), \\
c(2^i - 2^j) &= 1 \quad (i > j \ge 0), \\
c(2^{h + 1}k + 2^h + 2^i - 2^j) &= 2^h \quad (k \ge 0, h > i > j + 1 \ge 1). \\
\end{align*}
$$
The equivalence can be shown by repeated use of the identity
$$
-{\left\lfloor \frac{k}{2^i} \right\rfloor} = \left\lfloor \frac{2^i - 1 - k}{2^i} \right\rfloor.
$$

You were first with a much better algorithm. My prototype essentially consisted of (x > 0) + (x > 1) + (x > 2) + (x > 3) + ....

@fgrieu I did some brute-force searching and found a couple of shortened expressions: (x-(x>>3)>>1)+(x>>2)>>28 for m = 11, x-(x-(x>>2)-(x>>4)>>1)>>27 for m = 21. I’m not sure how they might generalize, though.

Can you describe in arithmetic what these function do? At first I thought it was x // (2^32 // m) but that's not right.

@orlp: I get that they compute a close approximation of ((uint64_t)m*x)>>32 (wich always pass criteria 2), performing the multiplication by addition and subtraction of shifts of x, without overflow, and, critically, with a marginal error which stays within the tolerance of requirement 2. Beyond that uh.. I'm staring with admiration.

@orlp I’ve added an explanation of that at the end.

What did you use to brute force those shortened expressions? I can - given a template such as (x-(x>>_)>>_)+(x>>_)>>_ very quickly find constants that work but enumerating over all such 'templates' is a bit expensive...


text:
Mixed Fraction Equality
In elementary school, children learn about proper fractions, where the numerator is less than the denominator, and thus the value of the fraction is less than one. Later, they are taught about fractions where the value of the fraction is greater than one, and two different ways to express these fractions: mixed fractions and improper fractions.
Given a mixed fraction, determine if it is equivalent to the improper fraction where the integer value and the numerator are concatenated together. For example, for input 1 3/4, the improper fraction is 13/4.
Test Cases
1 3/4        -> falsey
1 3/10       -> truthy
6 6/7        -> falsey
55 55/100    -> truthy
4 9/100      -> falsey
40 9/100     -> falsey
7 49/1000    -> falsey
9 1/2        -> falsey
999 999/1000 -> truthy
1 21/200     -> falsey
1 21/101     -> falsey

For input, you may take the integer part and the fraction part as separate inputs, but you may not take the fraction as input in two pieces, and you may not take it as a decimal value. You may drop the integer part (not take it as input) if you do not need to use it.

Should or can the fraction be simplified? Like the fourth test case would be false as 54/100 simplifies to 27/50

Should output be two distinct, consistent values or any, possibly inconsistent, truthy/falsey values?

@JoKing no, and I will fix that one, should both be 55

@LuisMendo whatever meta defines as truthy falsey

This is probably inherent in the definition of mixed fractions, but just to confirm: can we assume that the fraction part of the input will have its numerator less than the denominator?

By the way, fixing the 4th test case to have 55 wouldn't change the issue would it - 55/100 can also be simplified to 11/20, so the same question @JoKing raised arises there.

@sundar I think it was two separate statements: "No simplification involved" and "I made a typo, I'll fix that"

So the second argument must be taken as a string?

"you may not take the fraction as input in two pieces" - err why? That is exactly what the / does :/

This seems to be equivalent to "given an input that doesn't matter and two numbers as a string separated by a slash, determine whether the second number equals 10 to the power of the length of the first number".

@sundar Yes, you can assume that, the fraction part will be proper. As Ourous said, no simplification involved.

@JonathanAllan the idea is that you remove the space and see if it is still equal - yes you can basically do what xnor described in his comment, but I'm not going to just give you two integers

This is probably also inherent in the definition of mixed fractions, but can we assume that the integer part is > 0? If not, most answers are probably invalid.

@wastl yes, you can make that assumption, you can also assume the numerator is > 0

MATL, 7 bytes
UsGXzU=

Input is a string. Output is 1 for truthy, 0 for falsey.
Try it online! Or verify all test cases.
Explanation
U     % Implicit input. Convert to number(s): gives a vector of two numbers
s     % Sum of that vector
G     % Push input again
Xz    % Remove spaces
U     % Convert to number
=     % Equal? Implicit display

Perl 6, 16 12 bytes
{1+$_==1~$_}

Try it online!
Takes input as a string representing the fraction. Turns out Perl 6's dynamic typing can handle strings to rational fractions, who knew? So the string "1/10" when coerced to a number, returns 0.1
The anonymous code block simply checks if the fraction plus one equals one concatenated with the fraction. Thanks to xnor's Python answer for showing me that the integer part doesn't matter.
Old solution, 27 26 bytes
{.nude[0]==.Int~[%] .nude}

Try it online!
Takes input as a rational mixed fraction, and returns true or false. Returns false for the fourth test case because it can be simplified.
Explanation:
.nude returns a list of [numerator, denominator].
{                        } # Anonymous code block
 .nude[0]    # Check if the numerator of the mixed fraction
         ==  # Is equal to
           .Int  # The integer part of the fraction
               ~ # Concatenated to
                [%] .nude  # The numerator modulo the denominator
                           # And return implicitly

I'm guessing that .nude is named for numerator + denominator, but someone probably took great pleasure in being able to call it that.

I was going to go with something that took it as a single string '1 3/10' {S/\s//==.words.sum}

Husk, 8 bytes
§·=r¤+r+

Try it online!
Explanation
§(·=r)(¤+r)(+)  -- example arguments: "1" "3/10"
§               -- fork both arguments
      (¤ r)     -- | read both: 1 3/10
      ( + )     -- | and add them: 13/10
           (+)  -- | concatenate: "13/10"
                -- and do
 (· r)          -- | read the second argument: 13/10
 ( = )          -- | and compare: 13/10 == 13/10
                -- : 1

slightly different 8 bytes

Retina 0.8.2, 17 16 bytes
(.)+/1(?<-1>0)*$

Try it online! Requires just the fraction part, so the linked test suite removes the integer from the test cases. Explanation: The improper concatenation is equal to the mixed number only if the denominator is a power of 10 and the numerator has one digit for every zero in the denominator. .NET's balancing groups are used to verify that sufficient digits exist. Edit: Saved 1 byte thanks to @sundar.

Doesn't work for 1 11/10. It seems to be a problem with your implementation, not the method

Note that " You may drop the integer part (not take it as input) if you do not need to use it." - so the leading space may be unnecessary if you change the input to have only the fraction.

@H.PWiz I don't think we have to deal with inputs where the numerator is greater than the denominator (since these are supposed to be mixed fractions with only the non-integral decimal part expressed as a fraction). But I'll ask the OP to confirm that.

@sundar I'd have to change it to ^ instead, so it doesn't help.

The / makes it unambiguous what you're matching, so I don't think you need the anchor there (going by usual regex matching rules, no Retina expertise here). Seems to work anyway: Try it online!.

@sundar Ah, of course, because I want to match the whole numerator anyway, so it's easier if I don't have the integer part getting in my way, thanks!

R, 78 65 bytes
function(n,e=function(a)eval(parse(t=sub(" ",a,n))))e("")==e("+")

Try it online!
-13 bytes thanks to both Giuseppe and JayCe!

Just sub is fine here. Also, you can use t= instead of text=

What can I say? Brilliant! it simplifies nicely to 65 bytes

@JayCe Glad to see I was on the right page! Thanks!

You can try porting xnor's Python 3 answer for probably 20 bytes...

@JayCe one of your favorite tricks!

@Giuseppe really nice!

Python 2, 43 bytes
lambda k:k.split('/')[1]==`10**k.find('/')`

Try it online!

Stax, 5 bytes
╡ÄLσ`

Run and debug it
Explanation:
+yj$e= Full program, implicit input
+      Add integer and fraction part
 y     Push unparsed input
  j$   Split on spaces and flatten, i.e. Remove spaces
    e  Evaluate
     = Check for equality

Brachylog, 15 bytes
ḍ{lᵛ&ht¬ị&t↔ị1}

Try it online!
Takes the fractional part alone as a string input.
Indirectly uses the same idea as my Julia answer - "the denominator is 10^{length of numerator}" can be said as "the denominator is a power of ten, and the length of the denominator is equal to the length of the numerator + the length of "/" (i.e. 1).
ḍ                   % split the input in half
 {            }     % and verify that
  lᵛ                % each half has the same length (i.e. the string had even length)
    &ht¬ị           % and the last character of the first half is
                    %  not a number (it should be "/")
         &t↔ị1      % and the second half when reversed is the number 1
                    %  i.e. the denominator should be a power of 10

Older answer:
15 20 bytes
a₀ᶠịˢtl;10↺^.&a₁ᶠịˢh

Try it online!
(-1 byte thanks to @Fatalize, but unfortunately +6 bytes since I discovered bugs in the older method.)
Same idea as my Julia answer.

You can shorten it by 1 byte by replacing variable A with the output variable . (and thus remove the last A because the output variable is implicitely there at the end)

@Fatalize Thanks, I forget that the output is pretty much available as a free variable in these decision problems. Unfortunately I found bugs in the code I had: since it only asked for any numeric prefix and any numeric suffix, it was passing things like 61/10 (using just 6 as the numerator/prefix) 2/110 (using just 10 as the denominator/suffix). I've tried to fix it, not sure if this is the best way to do it though.

I'm not sure I can help you because I don't understand the specs of this challenge at all, even after reading it 3 times. I don't know what "mixed fractions and improper fractions" are called in my country, or if it's even taught in elementary schools here.

@Fatalize Fair enough. Do you have interest in reviving the chat room? I have a bunch of questions to pester you with, if you're interested and have the time.

Sure, just ask a mod to revive the room and tag me when you ask questions

Python 3, 26 bytes
lambda k:eval(k+'+1==1'+k)

Try it online!
For example, input 3/4 gives 3/4+1==13/4. Instead of taking the whole part of the fraction, we just set it to 1 to test the mixed fraction equality. Test cases from Chas Brown.

Java 10, 107 70 67 57 bytes
f->new Long(f.split("/")[1])==Math.pow(10,f.indexOf("/"))

Welcome to the world without eval..
-40 bytes by creating a port of @ChasBrown's Python 2 answer.
-10 bytes thanks to @Shaggy (I should have read @ChasBrown's answer better and his use of find (indexOf)..)
Try it online.
Explanation:
f->                         // Method with String parameter and boolean return-type
  new Long(f.split("/")[1]) //  Take the denominator as integer
  ==Math.pow(10,            //  And check whether it is equal to 10 to the power of:
                f.indexOf("/"))
                            //   the length of the numerator-String

57 bytes

@Shaggy Ah, Chas Brown even has the same in the Python 2 answer that I linked.. Not sure why I didn't already use that.. Thanks!

05AB1E, 7 bytes
'/¡ćg°Q

Only takes the fractions as input.
Try it online or verify all test cases.
Explanation:
'/¡        # Split the input by '/'
           #  i.e. '3/10' → ['3', '10']
   ć       # Head extracted:
           #  i.e. ['3', '10'] → 10 and 3
    g      # Take the length of the numerator
           #  i.e. '3' → 1
     °     # Take 10 to the power of this length
           #  1 → 10**1 → 10
      Q    # Check if that value equals the denominator
           #  10 and 10 → 1 (truthy)

Or a more general explanation:
We have to validate two things:

Is the denominator a factor 10 (1, 10, 100, 1000, etc.)?
Does the length of the numerator + 1 equal the length of the denominator?

This second part is done by checking if the denominator as is, is equal to 10 to the power of the length of the numerator, which saves 2 bytes

PS: If we could take the numerator and denominator as separated inputs, just 3 bytes would have been enough: g°Q.

Clean, 57 bytes
import StdEnv,Text
$b#[u,v:_]=split"/"b
=v==""<+10^size u

Try it online!
This one is a little shorter but breaks for large numerator/denominators.
Clean, 77 61 60 58 bytes
-1 thanks to OMᗺ's tip on my other answer
import StdEnv,Text
$b#[u,v:_]=split"/"b
=1<+[48\\_<-:u]==v

Try it online!
This uses Neil's method, it's a bit shorter than doing it directly.
There's some trickery with conversion overloading, where 1<+[48\\_<-:u] converts [Int] to [Char] and then to {#Char} (:== String), but Int directly to String.
Clean, 91 89 bytes
import StdEnv,Text
t=toInt
$a b#[b,c:_]=map t(split"/"b)
#d=t(a<+b)
=d/c==t a&&d-d/c*c==b

Try it online!
Defines a function $ :: String String -> Bool which extracts the numerator and denominator, string-concatenates the integer part and the numerator, and checks equivalence.

JavaScript, 26 bytes
Takes input in currying syntax (f(x)(y)) where x is the integer and y is the fraction as a string.
x=>y=>x==eval(x+y)-eval(y)

Try it online

Julia 0.6, 29 bytes
r->10^ndigits(num(r))==den(r)

Try it online!
Based on the idea that the output should be true only when the denominator is a power of ten with as many zeros as there are digits in the numerator. Takes input as a Rational type, checks that the denominator is equal to 10 raised to the number of digits in the numerator.

Haskell, 47 40 bytes
-7 thanks to OMᗺ
f b|(u,v)<-span('/'<)b="/1"++('0'<$u)==v

Try it online!
A port of my Clean answer using Neil's method.

Perl 5 -p, 23 bytes
$_=eval=~s/..//r eq$_+0

Try it online!
Takes the fractional part alone as input (as allowed by OP), outputs 1 for true and nothing for false.
$_=       # assign to be printed by -p
eval      # evaluate fraction to get 0.something, for eg. 0.54
=~s/..//r # remove the 0. part, giving 54
 eq       # string equality check
$_+0      # after first coercing input to number to remove / and denominator

The decimal part taken by itself would be exactly equal to the numerator only when the denominator is the immediate next power of ten greater than the numerator, which is the condition we need to check for.

Noether, 17 bytes
I#I"/"^WL1-%WL_=P

Try it online!
Explanation
So how does this work? Well, if you look at the test cases, the only true cases are when the denominator is a power of ten, \$10^a\$, where \$a\$ is the length of the numerator plus one (\$a = \lfloor \log_{10} n \rfloor + 1\$, where \$n\$ is the numerator and \$\lfloor x \rfloor\$ represents the flooring function).
I#                - Push the first input then pop it off the stack
  I"/"^           - Push the second input and split the string at "/"
       W          - Convert the top (the denominator) of the stack from a string to a number
        L1-       - Take the log 10 of the top of the stack and subtract 1 (a)
           %      - Rotate the stack
            WL_   - Convert the top of the stack (the numerator) to a number, take the log10 and floor the result (b)
               =  - Check if a and b are equal
                P - Print the top of the stack

C (gcc), 67 56 55 bytes

Saved eleven bytes thanks to O.O.Balance.
Saved a byte thanks to ceilingcat.

m;x(char*_){for(m=1;*_++;m*=10)*_*=*_^47;m=m==atoi(_);}

Try it online!

64 bytes: https://tio.run/##ZY7BToNAEIbP8BQ4hmSXTgPbQhE3a08@ALFHL5NlUSIFunAxTZ8dKVWD8fLP5Jtvkl@v37Qex5JZJNRcv5MNSJ7L1jKtBJKyMqDVSupAiYgHFKiA7lScSq1oaCtGXCktL@N9YcqqMd7h@eXAPvCEhveD1d0ny/HEZWerZigZ@NvC8x96b/3k@YW3V9dkfs9fG8DrV8lyjmYeSpk9dNT3poBHKKmqp4VL90hVw/jZdeauuTpSXbeaZdl0c1xnLiAQtmEMGPElEBGg@CE7hF2YLpQkQUiSSVpaMUJ2Q79eHP1nKUI8syXMEES4WYJsQlN8i2JRbjOZf55vTERiZpfxCw

Actually, do you even need r? https://tio.run/##ZY5BboMwEEXXcAo6FZLtTAROIJRablY9AGqW3VjGtKgECLCpopydOqStXHXzZ/TmjfT1@k3rea6IQk31uxqYEueqG4iWXDC1WgnNJI8pU0wydSeTTGippq4mikqpxWW@L01VtyY4PL8cyAee0NBxGnT/SQo8UdEPdTtVBMJtGYQPY7B@CsIy2MtrknCkry3g9asiBUWzDCnNHno1jqaER6hU3diFCv@o6pbQs@8tPQt5VE3TaZLn9ub53lKAI2yjBDCmLuAxIP8hO4RdlDlKmiKkqZVcK0HIb@jXS@L/LENIFubCHIFHGxfkFtn4FrlTbmPNP883xmO@sMv8BQ

@O.O.Balance No I do not. Thank you.

TeaScript, 25 bytes
First input is the fraction, second is the integer.
I just started in TeaScript so it might be golfed down a lot
s"/")▒⌐ep(xs"/")░.n

Try it online!

R, 53 bytes
function(n,x=el(strsplit(n,"/")))x[2]==10^nchar(x[1])

Try it online!
Takes only the fractional part as input. As mentioned by xnor in a comment:

This seems to be equivalent to "given an input that doesn't matter and
  two numbers as a string separated by a slash, determine whether the
  second number equals 10 to the power of the length of the first
  number".

Robert S.'s answer is less golfy but much more interesting than mine.

Excel, 52 bytes
=10^FIND("/",B1)/10-MID(B1,FIND("/",B1)+1,LEN(B1))=0

Ignores the Integer input. Basically: IS Denominator = 10^LEN(Numerator)

For denominators limited to <10^9:  48 bytes:
=10^FIND("/",B1)/10-MID(B1,FIND("/",B1)+1,1E9)=0

Bulk of logic is splitting on /.  If input could be taken separately, 16 bytes:
=10^LEN(B1)-C1=0

Elixir, 81 bytes
fn b->[n,d]=String.split b,"/";String.to_integer(d)==:math.pow 10,byte_size n end

Try it online!
Might be able to get somewhere with {n,"/"<>d}=Integer.parse b, but not sure how.

C (gcc/clang), 59 49 47 bytes
f(a,b){a=atoi(b=strchr(a,47)+1)==pow(10,b+~a);}

Port of Chas Brown's Python 2 answer. Try it online here.
Ignores the integer part of the input. Thanks to Jonathan Frech for golfing 2 bytes.
Ungolfed:
f(a, b) { // function returning an int and taking a string as input; also declaring another string variable
          // this abuses the parameters as much as possible, omitting the type int and implicitly converting it to char *
    a =                             // return a truthy or falsey value based on
        atoi(b = strchr(a, 47) + 1) // the denominator (as integer; 47 is the ASCII code for '/')
        == pow(10, b + ~a);         // is equal to 10 to the power of the length of the numerator-string
}

'/' can most likely be 47.

Possible 47 bytes.

You are welcome. I think you forgot to update your header to reflect the new byte count.

Suggest index() instead of strchr()

2DFuck, 86 bytes
..!x..!...,,,,[>,,,,,,,,],,,,,,,,,[v!],[v!],[v!],![v!],,,[,,[v!],[v!],[v!],[v!]<,,,]r.

Try it online!
Takes input without integer part.

ForceLang, 86 78 bytes
set a io.readnum()
set b io.readnum()
set d number.parse a+b+""
io.write d=a+b