How do I calculate the power required to climb a hill at a given cadence?
You don't quite supply enough information in your specific question (that is, "50RPM for 10 minutes with 39x23 with 10% hill") to provide a full answer in absolute terms but, if we assume you're riding a standard sized 700c bike there's enough information to make a good estimate in relative terms.

First I'll give a short answer, then a rule of thumb that's easy to calculate and will put you within about 10%, then a longer more detailed answer. 

The short answer to your question, in relative terms, is ~ 3 watts/kg of total mass. To convert that to total absolute watts, you just multiply 3 watts/kg * total mass (in kg) for you, your bike, and all the equipment you're carrying. For example, if you weigh 70 kg and your bike and all its equipment together weigh an additional 10 kg, it will take approximately 3 * (70+10) = 240 watts. If you weigh 70 kg, that would mean you would need to produce 240/70 = ~ 3.4 watts/kg of body mass.  To put that into context, 3.4 watts/kg for 10 minutes is not a bad amount of power output for a casual recreational cyclist; on a normal walk on flat level ground people average around 1 watt/kg, while a pro cyclist might be able to average in excess of 5 watts/kg for an hour. It has been estimated that Lance Armstrong produced slightly over 6 watts/kg for 40 minutes in climbing Alpe d'Huez during the Tour de France. 

A rule of thumb to use to convert speed to power on steep hills is this: On a steep hill, multiply the hill's gradient by your speed in km/h, then by ~ 3. If you measure your speed in mph, multiply by 5 rather than 3. That will give you a ballpark estimate of the watts/kg you need to produce. For example, if you are climbing a 10% hill in a 39/23 gear ratio at 50 rpm on a standard sized bike, you're traveling at ~ 11 km/h (or around 6.5 mph). So 10% * 11 km/h = 1.1, and 1.1 * 3 = 3.3 watts/kg. Alternatively, if you measure speed in mph, 10% * 6.5 mph = .65, and .65 * 5 = 3.25 watts/kg. Basically, all you have to remember for this rule of thumb is the number 3 if you measure speed in km/h, or 5 if you measure speed in mph. 

How did I convert your cadence in a particular gear to speed? On a standard normal-sized bike, the "700c" rear wheel has a circumference ~ 2100mm (= ~ 2.1 meters). If you were pedaling at 50 rpm through a 39/23 gear, then (50 rpm) * (39/23) * (60 minutes/hour) * (2.1 meters) = ~ 10700 meters/hour, or 10.7 km/h, or 6.6 mph.

And now, the fuller explanation. The equation to convert speed to power is well-understood. Total power demanded has four parts:

Total power = power needed to overcome rolling resistance + 
              power needed to overcome aerodynamic resistance + 
              power needed to overcome changes in speed (kinetic energy) + 
              power needed to overcome changes in elevation (potential energy)


Of these, the simplest piece is the power needed to overcome changes in elevation which, fortunately in this case, is what you were asking. On a steep hill, your speed is low and the aerodynamic and other resistance forces tend to be small relative to the climbing part. The power needed to account for the change in potential energy is straightforward: 

watts(PE) = slope * speed in meters/sec * total mass * 9.8 m/sec^2

or 

watts/kg = slope * speed in meters/sec * 9.8 m/sec^2

So, all we need is to get speed in m/s. If you have a cyclecomputer that reads in km/h, you need to divide km/h by 3.6 to get m/s and multiply by 9.8. If your cyclecomputer reads in mph, divide mph by 2.25 and multiply by 9.8. If you do this, you'll see that the resulting constants are approximately 3 (for km/h) and 5 (for mph), as stated in the rule of thumb above.