Rewiring a charger power lead
The best way to do it is with a multimeter. 

First of all, turn the power off to make it safe. Then strip the wires. Attach one to the red lead of a multimeter and one to the black lead. Make sure your multimeter is in the correct range. Make sure the wires are not touching and turn the power on.

If you get a positive reading, then the wire on the RED lead is positive and the wire on the BLACK lead is negative.

If you get a negative reading, the wire on the RED lead is negative and the wire on the BLACK lead is positive.

If you need help on how to measure voltage with a multimeter, follow this LINK. 

Also, what do you mean charging up your computer? It may help to provide the picture of both the lead and the 'computer' you want to charge.