17

This question was posted with just a block of code. Entire body text of question below:

import javax.swing.JOptionPane;
public class Result
{
public static void main (String[] args)
for(int i=0;i<Result.length;i++)
{
    String num1 = JOptionPane.showInputDialog(null,"Insert 1st Number: ");
    String num2 = JOptionPane.showInputDialog(null,"Insert 2nd Number: ");
}
{
    int max=Result[0];
    for(int i=0;i<Result.length;i++)
    if(num1+num2>=10){
        System.out.println(" congratulations ");
    }
    else if(num1+num2<=10){
        System.out.println(" the sum is less than 10 ");
    }
    else{
        System.out.println(" exit ");
        for(int i=0;i<Score.length;i++)
        output=output+Result[i]+" ";
    }
}
}

How did they get around the filter that stops people from posting just a wall of code?

4
  • Confused by the "support" tag... And, I guess, the question. You want the work-around to be documented? I would rather think you'd want it removed...
    – Shog9
    Oct 6, 2011 at 2:52
  • 2
    @Shog9 I want it removed too Oct 6, 2011 at 2:53
  • Well, now that the original question has been deleted, it's hard to say... Oct 6, 2011 at 7:14
  • 3
    This will be plugged in the next build; please award the tick to yourself - you were right on the money. Oct 6, 2011 at 18:57

2 Answers 2

20

I think I found the loophole:

Code that's been indented with tabs rather than four spaces apparently is not considered "code" by the algorithm, allowing me to posts questions like this one.

It also doesn't seem like it matters where the tab indented code is. Code indented with tabs intermingled with code indented with 4 spaces is not considered "code" either.

2
  • 2
    Thanks, that'll be it. That should be trivial to fix later today. Oct 6, 2011 at 16:04
  • @marc ah, we need to normalize from tabs to spaces for this check (Markdown does this, actually, but I think this check is before the raw post is "cooked"). Oct 6, 2011 at 21:55
13

Indeed, that copy is blocked (whether formatted or unformatted). Our best guess is that there was a grace-period edit, from some artificial random text, that was then replaced with this.... wall. Consequently, we shall be amending the new-user rules for self-edits to ensure that the quality checks are still applied in this scenario.


Update; hmmm... while trying to "fix" this, it turns out that it is already immune to this - i.e. when I tried this as a self-edit locally, it told me where to go. The hunt continues!

3
  • 12
    I can only say it again: It's fascinating how resourceful people are.
    – Pekka
    Oct 6, 2011 at 8:49
  • 2
    If you can't work it out, you could try luring the secret out of him with the promise of the first hacker badge. Oct 6, 2011 at 11:53
  • @Marc See my answer. Oct 6, 2011 at 14:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .