(a)to demolish, secure or repair within eight days from the date of service of the notice in such manner as it deems necessary any building, or portion of a building, wall or other structure or anything affixed thereto which appears to it to be in a ruinous condition or dangerous to inmates, if any, passers-by or other property, or