Weighted resampling of martingale difference arrays with applications