Is this an independent or dependent clause?

a. It reappeared when the rain stopped.

b. I went with one of my friends.