Computing and maximizing influence in linear threshold and triggering models