Scalar conservation laws and Hamilton-Jacobi equations in one-space variable