Power dissipation in a resistor