in reply to Beware the Trolls!
You were saying these questions were for homework/academic purposes but they were both posted on the 27th of December obviously break time for ANY student. The only student that would have work over break are high school students.
And like many other students i pick up extra curricular studies while on break, in fact i'm teaching myself perl over break simply because it fascinates me and i don't have room for it in my studies of graphic arts. And many times i have simple stupid questions that i have no idea of how to go about solving simply because my background isn't in CS but in graphics instead.
I do agree with the comments about help by point them towards useful resources. but i like seeing code because well i just don't think in code...yet ;) well anyway i do agree with the post about feeling used, i think there isn't an easy way to figure if someone is posting a straight forward homework questions or real questions they ran into while coding, or doin homework