Both tech companies beat Wall Street predictions on revenue in their second quarters