Swear loudly, then continue. I rarely watch movies, and I haven't been reading as much since I've started writing, but even if I see an idea similar to mine, I keep going, telling myself "great minds think alike". Unless it's identical (which would be a huge coincidence), at which point I would probably make alterations.