The three major indexes posted a second day of gains as investors look to tech earnings.