OK...I took a deep breath and looked at your earlier posting about potty training....you got some WONDERFUL advise...
http://www.yorkietalk.com/forums/showthread.php?t=33629
Please remember ...he is still VERY YOUNG. I had posted to you the last time you asked for help and did share I have 2 girls. ONE took 2 weeks to train....the other took TEN MONTHS.
So please re-read all the help you've received here and try to remember how young he is when you feel you're losing your temper and PLEASE do not hit him again....you will make that problem so much worse and end up with a very submissive terrified sad little yorkie...who may never be trained because he's so fearful.
There are some great posts to you.....maybe also try TWO or 3 pads stacked on top of each other if he likes carpet so much.....but remember...PATIENCE and consistency....you just have to look at it like training a HUMAN BABY.....and HUMANS take up to 3 YEARS to train.....