I have asked a question outside Stack Exchange (in other forums). Should I just provide that URL as a question here? I do not want to create duplicate content on the web.
If you are going to ask a question on a Stack Exchange site, you need to enter the text of the question. You cannot enter a link to another question asked on another site.
The reason is the same for which a link-only answer is not considered an answer: What would happen if the linked page is temporary unavailable because problems with the server, or permanently not available because that page is deleted? With a question is even worst because nobody would see the question being asked, while with an answer, the question and the other answers would still be useful to future users.
My instinct is a resounding no. StackExchange is a standalone site that shouldn't rely on other sites content. What if the link goes down?
A question consisting of only a link is probably going to be closed as low quality, if the quality filter even lets it through. If you want to post here, repost the entire question you have--including all relevant code--so that it doesn't rely on anything else.