Stability and instability of standing waves for nonlinear Schrödinger equations