Hecklers are the bane of every live act regardless. Possibly the less heckled are drop dead gorgeous female singers that show tons of "asset" in that the a-holes of life are too busy drooling on themselves to show off their I.Q. Outside of that equation though, you're pretty much screwed and the real secret is GROW A THICK SKIN.
As to the issue of those claiming to know something... now here is where you can put them in their place. Especially when you're just goofing off in that word will get around really fast (on campus especially) that so and so was put on the spot by you... that is to say, when jackass Bob shouts out "how" the trick works you step aside and invite him to come over and do it that way... nine times out of ten they will back down before stepping up to the plate. I can assure you, if you do this a couple of times the imbeciles of life... at least at school and those places you tend to hang at the most, will quickly lessen in abundance and consignment in that they will have been proven FOOLS and no one likes that.
Secondly, as has been pointed out, YOU need to make your presentation as well as your technique BETTER.
We tend to worry far too much about our technique sometimes and forget about the power of presentation. I've seen some horrid technicians over the years that were uncanny showmen; their enthusiasm and charisma is what generated public appreciation/cooperation... befriending! This is powerful stuff and if you were able to filter out that side of what you see in some of the top entertainers out there (in our field) you would be shocked as to just how bold and sloppy some of their moves are and yet the never get caught out.
Yes, audience management is a big thing but that is part of what happens when you allow yourself to be a genuine showman. But study the masters of the craft; not just magicians (though there are a few I can think of) but real show people/legends like Bill Cosby, George Burns, Milton Beryl and Bob Hope... these are guys that filled a stage, no matter how big it was, with their own presence and nothing other. Yet they held full and complete control over their public. I'd have to say the greatest master of this skill that I ever had the pleasure of watching work, was the late Red Skelton
Of course if you prefer the more dramatic route with things you may want to study Vincent Price or Orson Wells but I think you get the gist to what I'm saying here; find the people who command the stage when working live. Wells & Price were two who had merely to speak and people went silent, almost reverent.
One last thing... find local Improvisational Groups to work with. I know it has nothing to do with magic (directly) but everything to do with thinking on your feet and becoming an ENTERTAINER. You'll find such a background priceless.
Don't be hard on yourself when societies hemorrhoids flare up. Just take a deep breath and accept the fact that such people are generally unhappy and have the psychological need to be the focus of attention. I know it's a pain, but it's also fact.
I'm certain Dale will agree with me, it can be amusing to sit in a theater hearing all the theorists spew on as to
how things work... while you are sitting there knowing the facts and then some. As someone that worked as a Technician on grand illusions most of his life, I relish those rare moments when something is presented that leaves me befuddled. But I likewise enjoy watching any master showman do the same
tired bits of business that have been around for 100 years in that they are doing their job and ENTERTAINING their public... who, in some cases, know how some of those tricks really do work but that doesn't take away from the fun and intrigue of the encounter... I still get chills watching someone do a Thin Model Sawing or the Asrah or Broom... even the Sub Trunk IF and when they do it in a way that is practiced and entertaining.
Pardon the diatribe here, memory lane seems to be plaguing me of late

But I hope you get the point to what I'm trying to say.
