Community-based information sources (ex. Wikipedia, Stack Overflow, et al.) all seems to share a prejudice against homework help. It always seems strange to me that this is such a hot issue. If you see a so-called "homework question" you have doubts about answering, just ask yourself this simple question:
"Do I want to answer this question?"
If yes, provide the best and most complete answer you can, without reservation.
If for any reason you don't, simply move on. Don't waste energy making pompous, high-brow, and accusatory remarks about your preceptions of the poster's motivations. It's rude, and degrades the wonderful user-experience that has become Stack Overflow.
- The poster's motivations for posting are irrelevent
You may think yourself clever that you can identify classes of problems from acedemia vs. professional, but it's possible that someone might be trying to learn independently, or the class might be taken for audit (non-credit). In these cases, "academic honesty" doesn't apply. Furthermore, asking the poster if their question is homework related seems silly. Would you be satisfied if they said "no"? Would a dishonest person answer that truthfully?
- Stack Overflow is not the place to preach your morals
Even if it's obvious the poster is trying to "cheat" on homework, that's not your concern. The poster assumes all responsibility for their actions. To my knowledge, the party facilitating the "cheating" is never liable for anything. You won't get expelled/fired for helping. After all, you're just answering a question. Nothing more.
- Dishonest students only hurt themselves
Stack Overflow won't (presumably) be there when the student takes their exams. If the student is smart, they will learn from the answers they get on SO, and will be more prepared for their projects, exams, and long-term career success. The dishonest students will only be helped in the short-term, and won't be serious contenders for good jobs, etc. since they won't be able to apply what they were supposed to learn. Everything comes out in the wash, as the proverb says.