Here on Answers it's often helpful to post code in a question or an answer. When you do so, there are certain steps that should be taken to avoid being blocked by Answers' internal security mechanisms. This article describes the proper way to submit code without arousing suspicion from our threat detection software.
Some of our customers are all too familiar with the screen below after asking a question or adding a comment that includes code.
What is Cloudflare?
Cloudflare is a 3rd party threat detection software specifically designed to detect malicious code/software that may threaten a website. Once you've seen this screen above, there is no way for us to un-block you, as it is an automated 3rd party software. Unfortunately, at this point you have to wait a variable amount of time until Cloudflare decides your IP address is no longer a threat and you will again be allowed access to answers.flexsim.com.
What am I doing wrong?
This warning usually presents itself when code has been typed or pasted directly into the body of your post, like this:
How do I properly format my code?
First paste or type your code into the body of your post. Then, highlight your code and click the Code button in the toolbar. It looks like this: < >
How can I tell if my code is properly formatted?
After highlighting your code and clicking the code < > button, you will see that your code now has a border and light background:
Remember, if you have multiple blocks of code, you can select just the code you want to be grouped together in the first block, hit the code button in the toolbar, and then select the second group of code and again hit the code button to make the second code block, etc.
After you submit your post, you will see your code formatted with syntax highlighting, a mono-spaced font, and the lines numbered, like this:
Conclusion
Adding code to your post is an essential task for many of our customers. If you follow these guidelines, you should be able to avoid being blocked and ensure you have uninterrupted service on our answers site.
If you feel you have properly entered code and are still being blocked, please inform us and include the code and method of formatting you were using when you were blocked. We'll gladly look into it.
As a fallback, you can take a screenshot of your code and add it to your post as an image, but still let us know there was an issue, and we'll look into it.
Finally, if you're in a hurry and Answers troubles are keeping you from getting the help you need, remember to contact your local FlexSim representative directly by phone or email.