  Using similarity transformations we construct explicit nontrivial solutions
of nonlinear Schr\"odinger equations with potentials and nonlinearities
depending on time and on the spatial coordinates. We present the general theory
and use it to calculate explicitly non-trivial solutions such as periodic
(breathers), resonant or quasiperiodically oscillating solitons. Some
implications to the field of matter-waves are also discussed.
