Formation of detonation waves in flowing hydrogen-oxygen and methane-oxygen mixtures.