US markets: Tech, energy shares prop up Wall Street