An earnings beat and increased guidance sent shares surging, even as revenue and earnings are still expected to decline.