Integrated fabrication and magnetic positioning of metallic and polymeric nanowires embedded in thin epoxy slabs