Is prayer nullified by having thoughts while performing it?
Prayer isn`t nullified by having thoughts while performing it, provided that the praying person offers all of its pillars and meets all of its conditions. However, the reward decreases significantly in the absence of reverence since a praying person is rewarded according to the attentiveness of his/her heart during prayer.
Does passing wind from the anus affect ritual purity?
Ablution is nullified by the passing of wind from the anus, but washing the anus is not required as wind leaves no impurity.
Is wearing a cap permissible for boys, or girls?
All Perfect Praise is due to Allah, The Lord of The Worlds.
In principle, anything is permissible sol long as there is no Sharia evidence prohibiting it, thus wearing the cap by boys is permissible as long as it isn`t done in imitation of the disbelievers. Moreover, a Muslim woman should avoid all that which attracts the attention of men because whatever leads to the forbidden is forbidden. And Allah Knows Best.
Is it permissible for the father to give the Zakat of his money to his poor married son?
It is permissible for the father to give part of the Zakat to his poor son, if the latter was sound and healthy, because in this case the father isn't obliged to spend on his young son, even though; he is considered one of the Muslims poor. And Allah Knows Best.