Judge who asked horrifying question resigns