Biocides, pest repellants or attractants, or plant growth regulators containing heterocyclic compounds