A judge in Santa Clara County Superior Court ruled for Apple and imposed a restraining order on Julie Lee Choi, a woman who was allegedly stalking Apple CEO Tim Cook.