Numerical Simulations Of Nonlinear Waves And Their Stability: Stokes Waves And Nonlinear Schroedinger Equation