Resonant and non-resonant high-order harmonic generation in the plasmas produced by 1 kHz picosecond and femtosecond pulses