Text this: Spectral Theory of Localized Resonances and Applications