Gateway 2000 Inc. overtook Cupertino-based Apple Computer Inc. in the second quarter as the No. 1 provider of desktop and portable computers in the U.S. educational market, according to Computer Intelligence, a market research firm. North Sioux City, S.D.-based Gateway, which sells solely through mail order, commanded 22.4% of the educational market in the quarter. Apple had 11.6% and International Business Machines Corp. had 7.7%. Shares of Gateway 2000 rose 31 cents to close at $40.31 on the New York Stock Exchange. Apple rose 19 cents to close at $24.63 on Nasdaq.