Apple, Oracle rise as tech stocks try for gains