Stack Exchange network consists of 180 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn moreYou can use the code I've posted on StackOverflow and other StackExchange sites under CC0 license (or alternatively under MIT or ISC, if CC0 is not suitable in your situation).
Basically this means that you can freely copy it and paste into your open-source or proprietary project without any consequences. You don't have to put my name anywhere. However, I recommend you put links to relevant pages for future reference.
Your privacy
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.