Resistor for regulating current