Apple was the latest to post surprisingly good profits on strong sales of Mac computers and iPhones , giving its stock a lift in after-hours trade that could help the Nasdaq extend its longest winning streak in 12 years .