Even Newton knew that party trick. The centrifugal force has to at least equal gravity when the glass is upside down, so F/m=w^2r=g. If r (the distance from the axis of revolution is about a metre, then w (the angular velocity) is roughly sqrt(10)/second. In more familiar terms that's about 30 rpm. Anything rotating that fast will be able to keep all its water in the glass.