The correct answer is (a) Har Prasad V/s Shiva Dayal (1876) 31A 259.
In this case, the judge had personal knowledge of the fact that the defendant had been convicted of a crime in the past. However, the judge was not allowed to take this fact into account when making his decision in the case, as it was not evidence that had been presented in court.
The other options are incorrect because they do not involve cases where a judge has personal knowledge of a fact. In (b), the judge did not have personal knowledge of the fact that the defendant was a member of a gang. In (c), the judge did not have personal knowledge of the fact that the defendant had been drinking alcohol. In (d), the judge did not have personal knowledge of the fact that the defendant had been threatening the victim.
The rule that a fact in personal knowledge of the judge cannot be taken in evidence is based on the principle that the judge should be impartial and should not be influenced by any personal knowledge that they may have of the case. This rule is designed to ensure that the defendant receives a fair trial.