Pairing in exotic and in stable nuclei