Dirichlet Function is a fundamental example in Calculus where Riemann integral does not work. It is also a function which is discontinuous everywhere. The function D(x) is defined as D(x) = 1, if x is a rational number; otherwise D(x) = 0.
For more information, see for example: http://mathworld.wolfram.com/DirichletFunction.html

