How do you determine the white and black wire if they are not marked?

If you are talking about lamp cord that table lamps use, look for a raised rib on one of the parallel wires. This is the identified wire so it will be connected to the neutral (silver) blade of the plug.