Methods of Electronic-Structure Calculations: From Molecules to Solids