Electrical Wire, is this to code? Running wire strait from the panel to a receptacle a couple foot...
Running wire strait from the panel to a receptacle a couple foot away, not inside a wall, just dangling? :) Of course the breaker, receptacle, and cable will all be the correct stuff. Also, is it ok to hold an indoor outlet hanging out of the wall as long as it is inside a completely sheltered receptacle? Also these questions are one and only for 1 month of use, for Christmas lights, thanks contained by advance.
Answers: No none of i.e. to code. I see stuff like that adjectives the time though, I am amazed that there are not more house fires.
Just run BX cable from the breaker to the outlet box and mount the outlet box on the surface. Make sure you use the proper connectors and you will be to code. This is solely for interior use.
If your breaker box is outside you will need to use weather tite conduit and box. You will also have need of an exterior outlet cover.
Also depending on what state/county/city you live in you may obligation a permit to do any electrical work.
Don;t believe any one are to code.