Semiconductor nanowires: the building block for next generation electronics and photonics