Nonhomogeneous Boundary-Value Problems for One-Dimensional Nonlinear Schr\"odinger Equations