When any portion of a sidewalk is not in good repair and condition and the Director of Public Works has knowledge thereof, it shall be his duty to notify the owner of the property immediately adjacent thereto, to repair the same. Such notice shall be written and may be given by delivery personally or by mailing of notice, either by letter or postal card, postage prepaid, to his last known address, as the same appears on the last assessment rolls of the City and County of San Francisco. Immediately after mailing any such notice, the Director of Public Works shall cause a copy thereof, printed on a card of not less than eight inches by ten inches in size, to be posted in a conspicuous place on said property.