On the weights of affine-variety codes and some Hermitian codes