The Balancing of Rotating Shafts by Quadratic Programming