morphological processing : Hit or Miss shape detection
They are using the same method. The second resource is just showing the windowing function. Look at slide 12, the windowing function is shown here. 

Erosion implies you use a windowed kernel, and slide it around the entire image (as seen in this gif), so the first source doesn't mention this step. The 2nd source is explicitly stating you must pad the search space, and then slide the kernel around it.Hope that makes sense