article

Paul Toone avatar image
5 Likes"
Paul Toone posted Ben Wilson edited

Submitting Code and How to Avoid Being Blocked

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:

1674231874544.png

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: < >

1674231218779.png

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:

1674231552744.png

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:

1674232011303.png

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.


codeblockedanswers errorcloudflareunable to access
blocked.png (299.4 KiB)
1674231218779.png (62.6 KiB)
1674231552744.png (61.7 KiB)
1674231874544.png (54.0 KiB)
1674232011303.png (47.5 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Arun Kr avatar image Arun Kr commented ·

Thanks for the post @Paul T.

0 Likes 0 ·

Article

Contributors

ben.wilson contributed to this article phil.bobo contributed to this article matt.long contributed to this article paul.t contributed to this article

Related Articles