In addition to the excellent advice about weaponry and door jams and locks, I suggest getting a high-decibel marine whistle to wear around your neck. If it doesn't scare the intruder off--and they usually do--it will wake up the whole building and let your neighbors know you need help. Call your local boating/outdoor stores and see if they have one similar to this you can buy today: