But, in this modern throw away society, most of us will have a few orphaned power supplies ( plug packs, wall warts ) that are no longer used. These power supplies are usually switch-mode, efficient, fused and in a safe little box.
Below is an example, its from a long dead laptop computer. A closer look at its tag shows a output voltage of 20v and maximum current rating of 4500ma ( 4.5A ). Now that's more than enough for our variable power supply. Using either of the circuits above would work to give me a 1.2 to 17volt variable power supply.
You can also connect more than one orphaned power supplies in series for a higher voltage, eg two 12v supplies in series would give a 24v supply, but note, the maximum current will only be as good as the power supply with the lowest amp rating.
Its also a good idea to add a volt and amp meter to the power supply, the articles below should get you started.