  Following the original approach introduced by T. Cazenave and P.L. Lions in
\cite{CaLi} we prove the existence and the orbital stability of standing waves
for the following class of NLS: \label{intr1} i\partial_t u+ \Delta u - V(x) u
+ Q(x) u|u|^{p-2}=0, \hbox{} (t,x) \in \R\times \R^n, \hbox{} 2<p<2+\frac 4n
and \label{intr2} i\partial_t u - \Delta^2 u - V(x) u + Q(x) u|u|^{p-2}=0,
\hbox{} (t,x) \in \R\times \R^n, \hbox{} 2<p<2+\frac 8n under suitable
assumptions on the potentials $V(x)$ and $Q(x)$. More precisely we assume
$V(x), Q(x) \in L^\infty(\R^n)$ and $meas\{Q(x)>\lambda_0\}\in (0,\infty)$ for
a suitable $\lambda_0>0$. The main point is the analysis of the compactness of
minimiziang sequences to suitable constrained minimization problems related to
\eqref{intr1} and \eqref{intr2}.
