More than twice as many stocks rose within the S&P 500 than fell, but sinking technology stocks weighed on the index for a second straight day.