Computer Immune System for Intrusion and Virus Detection: Adaptive detection mechanisms and their implementation