If it's online, I'm much more patient with people. If it's online, I'll usually be willing to entertain the discussion for some time but eventually I'll just walk away if the person is really that unwilling to co-operate or budge even the slightest in their opinion. I'm not interested in having arguments online anymore. Discussions, yes, but when it turns into an argument I am done. It's not worth getting worked up over someone who is probably just a troll.
Offline, I'll usually just ignore the situation altogether. The world is absolutely brimming with idiots and it's almost impossible to have a real give and take discussion with many of them, so I just don't bother. They can continue to think whatever they want to think or say what they want to say, just leave me alone.
Of course, I have had my moments where I can't take it anymore and I verbally snap and unload on them, but those are few and far between.
If it's something that is going to affect your life negatively, then I'd go around them when it becomes clear they're just going to be a frustrating obstacle. If it's something you really don't have to deal with, then just don't. There's enough in life to get stressed out over anyway, no reason to put yourself through it if you really don't have to.