What do you do when someone asks a question on a Stack Exchange site and that person clearly has not even attempted to google the answer? Downvote it? Something different?
What I do when a question is so trivial that it can easily be googled:
Closevote, often as "Off-Topic" -> "Questions asking for code must demonstrate a minimal understanding of the problem being solved."
If it's a newbie, leave a comment along the lines of "Hi, please always remember to Google first. A simple query for
how to flobber the gargleshould give you everything you need."