1. Standard call the locksmith situation.
    And pay him a lot of money. Those guys know you have no choice!
  2. I've learned to leave spare keys with the neighbor.
    One of the reasons I moved to this apartment is that I know people here. So I've left keys with a neighbor/friend. And it's been convenient except for those times I've had to wake her up late at night or early in the morning. There really is no good time to get locked out.
  3. I've learned to keep an extra set of spare keys in the car.
    Saves me from having to wake up the neighbor. Except for that time I pressed the doorknob lock, closed the door behind me, walked to my car, only to realize that I had left both car keys and house keys inside the house. Woke up the neighbor.
  4. I've had said neighbor climb out to the roof and go through a window.
    This is somewhat paranormal. The sliding bolt lock on my bedroom door slipped into to latch by itself, locking me out in the living room. I called my neighbor who quickly climbed out my second-story living room window, walked across the roof to my open bedroom window, climbed through, and unlocked my bedroom door from the inside.
  5. My neighbor is my best friend, actually.