If the company which you work for does not allow employees to continue generating income until their resignation date, then give notice with the same lead time as they will continue to pay you if you give them notice.
If they will only pay you for the rest of the day, then give notice saying your last day is today. If they will allow you to continue to generate revenue from either working there, or paying you until the resignation date then give more notice.
Take your vacation before you resign, if they let you go, and do not pay you, file for unemployment benefits for the interim.
Bottom line is this, if you need the income for the notification period, and they will disallow this, then give no notice. You have bills to pay, and if they are going to just let you go immediatley, you do not buy them any more lead time to prepare.
Note, some new employers will offer you the option to start right away if your notice negates your employment. If so, give notice. If your employer will not deny you the revenue for the notice period, give notice.
There is no point in giving notice to an organization that will maliciously cut your revenue, by you doing so. This is a malicious act for someone who will give a bad report for not giving notice. If they will end your employment upon notice, it will not effect their business anyway.