The Approximate Solution of Parabolic Initial Boundary Value Problems by Weighted Least-Squares Methods