Homogenization of some types of Neumann and Dirichlet problems