Neighbors in a wealthy Manhattan neighborhood won a temporary victory in their fight against a controversial homeless shelter, with a judge granting a temporary restraining order blocking its opening.