I can't speak to the laptop cords, but your lamp cords are guaranteed replaceable even if they turn out not to be repairable. If the chewing happened down near the plug your job is super easy. The wikipedia electrical wiring article includes a lot of terminology that you might find helpful.
Can you cut out a length of wire and re-attach the plug assembly?
If your plug assembly isn't damaged (our dear sweet puppy seems to prefer the cable itself) you ought to be able to disassemble it (exactly how depends on the plug, but usually with a little pushing or pulling you can separate the outer casing from the innards and you'll be able to see how the wires connect.
Most 2-wire electrical cord has very subtle ribbing on the insulation on the neutral side. The hot side will be smooth. And if your plug is polarized, the neutral prong will be wider than the hot prong. So you'll connect the neutral wire (with the ribbed insulation) to the neutral side of the plug (with the wider prong).
Would it be better to take out a segment of wire near the base?
With one of the lamps that Bear chewed up, I was able to just cut the cord above his chewing and re-connect it to the same plug. Another, he chewed much closer to the base of the lamp, so I actually cut the wire, pulled it deeper into the lamp base and used twist on wire connectors to connect it to the lamp wire. Again, make sure you connect neutral to neutral and hot to hot. The ribbing on the insulation is your clue! In that case the connectors sit under the lamp base so they aren't visible.
Do you need to replace the whole wire?
If the wire is really not salvageable or would be too short after the repair, you can buy 2-wire electrical cable by the foot at any self-respecting hardware store and replace the whole wire. At the fixture end, the brass screw is hot (so connect the smooth side of the cable) and the silver screw is neutral (ribbed side). As you take the lamp apart, pay attention to how it fits together. Often there are little screws or nuts that tighten the fixture down onto the cable at various points. Loosening those will make it easier to pass the wire through. Feel free to start a new Q with pictures if you need help tackling a particular lamp.
Is the dog really done?
We retired a few lamps until Bear outgrew his cable chewing phase, and coated the cable of a few others in bitter apple. I'm sure you've thought of this already, but if you still have a chewy little puppy in the house, you might not want to put your newly wired lamp right back in his reach.
But! Unplug everything first
Finally, if it isn't patently obvious to you that you should unplug everything before you start this project, take a step back and ask a lot more questions before you start.