US stocks end in positive territory with big gain in tech