Hydrodynamic and hydromagnetic instabilities that arise either from velocity shear or double diffusive convection