QA: Preview HTML: Unexpected Error / Pasting Acts Odd
-
While improving a QA question, I saw this message in the preview area:
Unexpected error when attempting to retrieve preview HTML.
Here's a snapshot of the HTML I was working with:
Question
write a program to convert given year into roman ewquivalent of decimalDecimal 1 5 10 50 100 500 1000
Roman i v x l c d mexample
Roman equivalent of 1988 is mdccclxxxviii
roman equivalent of 1525 is mdxxvmy program
<pre lang="C++"> #include<stdio.h>
#include<conio.h>
int main(){
clrscr();
int yr,i,j=0;
char roman[20];
printf("Enter Year : ");
scanf("%d",&yr);
if(yr/1000>=0)
{
for(i=0;i<(yr/1000);i++)
{
roman[j]='m';
j++;
}
yr = yr - (i+1)*1000;
}
if(yr/500>=0)
{
for(i=0;i<(yr/500);i++)
{
roman[j]='d';
j++;
}
yr = yr - (i+1)*500;
}
if(yr/100>=0)
{
for(i=0;i<(yr/100);i++)
{
roman[j]='c';
j++;
}
yr = yr - (i+1)*100;
}
if(yr/50>=0)
{
for(i=0;i<(yr/50);i++)
{
roman[j]='l';
j++;
}
yr = yr - (i+1)*50;
}
if(yr/10>=0)
{
for(i=0;i<(yr/10);i++)
{
roman[j]='x';
j++;
}
yr = yr - (i+1)*10;
}
if(yr/5>=0)
{
for(i=0;i<(yr/5);i++)
{
roman[j]='v';
j++;
}
yr = yr - (i+1)*5;
}
if(yr/1>=0)
{
for(i=0;i<(yr/1);i++)
{
roman[j]='i';
j++;
}
}
printf("year in roman : ");
for(i=0;i<=j;i++)
printf("%c",roman[i]);
getch();
}</pre>But it only prints "m"
can anyone help me to sort this problem?
Also, when I select "allow HTML" and paste, less than and greater than signs get HTML encoded anyway. When I select "escape HTML", the text I paste gets wrapped in a PRE block. It might depend on if "Ignore HTML in text (good for code snippets)" is also selected or if I try to paste inside a PRE block that I've already typed out... not sure.
-
While improving a QA question, I saw this message in the preview area:
Unexpected error when attempting to retrieve preview HTML.
Here's a snapshot of the HTML I was working with:
Question
write a program to convert given year into roman ewquivalent of decimalDecimal 1 5 10 50 100 500 1000
Roman i v x l c d mexample
Roman equivalent of 1988 is mdccclxxxviii
roman equivalent of 1525 is mdxxvmy program
<pre lang="C++"> #include<stdio.h>
#include<conio.h>
int main(){
clrscr();
int yr,i,j=0;
char roman[20];
printf("Enter Year : ");
scanf("%d",&yr);
if(yr/1000>=0)
{
for(i=0;i<(yr/1000);i++)
{
roman[j]='m';
j++;
}
yr = yr - (i+1)*1000;
}
if(yr/500>=0)
{
for(i=0;i<(yr/500);i++)
{
roman[j]='d';
j++;
}
yr = yr - (i+1)*500;
}
if(yr/100>=0)
{
for(i=0;i<(yr/100);i++)
{
roman[j]='c';
j++;
}
yr = yr - (i+1)*100;
}
if(yr/50>=0)
{
for(i=0;i<(yr/50);i++)
{
roman[j]='l';
j++;
}
yr = yr - (i+1)*50;
}
if(yr/10>=0)
{
for(i=0;i<(yr/10);i++)
{
roman[j]='x';
j++;
}
yr = yr - (i+1)*10;
}
if(yr/5>=0)
{
for(i=0;i<(yr/5);i++)
{
roman[j]='v';
j++;
}
yr = yr - (i+1)*5;
}
if(yr/1>=0)
{
for(i=0;i<(yr/1);i++)
{
roman[j]='i';
j++;
}
}
printf("year in roman : ");
for(i=0;i<=j;i++)
printf("%c",roman[i]);
getch();
}</pre>But it only prints "m"
can anyone help me to sort this problem?
Also, when I select "allow HTML" and paste, less than and greater than signs get HTML encoded anyway. When I select "escape HTML", the text I paste gets wrapped in a PRE block. It might depend on if "Ignore HTML in text (good for code snippets)" is also selected or if I try to paste inside a PRE block that I've already typed out... not sure.
Also, here was the question in... uh... question.
-
While improving a QA question, I saw this message in the preview area:
Unexpected error when attempting to retrieve preview HTML.
Here's a snapshot of the HTML I was working with:
Question
write a program to convert given year into roman ewquivalent of decimalDecimal 1 5 10 50 100 500 1000
Roman i v x l c d mexample
Roman equivalent of 1988 is mdccclxxxviii
roman equivalent of 1525 is mdxxvmy program
<pre lang="C++"> #include<stdio.h>
#include<conio.h>
int main(){
clrscr();
int yr,i,j=0;
char roman[20];
printf("Enter Year : ");
scanf("%d",&yr);
if(yr/1000>=0)
{
for(i=0;i<(yr/1000);i++)
{
roman[j]='m';
j++;
}
yr = yr - (i+1)*1000;
}
if(yr/500>=0)
{
for(i=0;i<(yr/500);i++)
{
roman[j]='d';
j++;
}
yr = yr - (i+1)*500;
}
if(yr/100>=0)
{
for(i=0;i<(yr/100);i++)
{
roman[j]='c';
j++;
}
yr = yr - (i+1)*100;
}
if(yr/50>=0)
{
for(i=0;i<(yr/50);i++)
{
roman[j]='l';
j++;
}
yr = yr - (i+1)*50;
}
if(yr/10>=0)
{
for(i=0;i<(yr/10);i++)
{
roman[j]='x';
j++;
}
yr = yr - (i+1)*10;
}
if(yr/5>=0)
{
for(i=0;i<(yr/5);i++)
{
roman[j]='v';
j++;
}
yr = yr - (i+1)*5;
}
if(yr/1>=0)
{
for(i=0;i<(yr/1);i++)
{
roman[j]='i';
j++;
}
}
printf("year in roman : ");
for(i=0;i<=j;i++)
printf("%c",roman[i]);
getch();
}</pre>But it only prints "m"
can anyone help me to sort this problem?
Also, when I select "allow HTML" and paste, less than and greater than signs get HTML encoded anyway. When I select "escape HTML", the text I paste gets wrapped in a PRE block. It might depend on if "Ignore HTML in text (good for code snippets)" is also selected or if I try to paste inside a PRE block that I've already typed out... not sure.
Seems to work fine here. Tested in Chrome, Firefox, IE7/8. Are you able to reproduce the problem?
-
Seems to work fine here. Tested in Chrome, Firefox, IE7/8. Are you able to reproduce the problem?
Nope, can't reproduce either. Hamsters must have been off somewhere storing food in their cheeks or something. They appear to be on their well-oiled wheels again.