/// <summary>
/// Calculate Percentage from Integer Values
/// </summary>
/// <param name="expression1">Numerator value</param>
/// <param name="expression2">Divisor value</param>
/// <returns>Calculated Percentage</returns>
public static int CalcPercent(int expression1, int expression2)
{
if (expression2 == 0)
{
return 0;
}
return (int)(100 * (long)expression1) / expression2;
}
#endregion
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
How to get the fancy borders? Which options do you choose? And shouldn't these be best be standardized? I would also propose to use the 2.0 version of syntaxhighlighter. Looks prettier.
Grz, Kris.
Read my blog | Twitter Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
Update: it seems the CSS scripts file isn't included or doesn't work. Also there's no color coding for the code that gets into the fancy layout so I guess there's also some missing external css for the color coding. I still strongly suggest that the 2.0 version
of syntaxhighlighter would be used instead of 1.5.
Grz, Kris.
Read my blog | Twitter Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
Update: it seems the CSS scripts file isn't included or doesn't work. Also there's no color coding for the code that gets into the fancy layout so I guess there's also some missing external css for the color coding.
We'll take a look at these, and once I can verify I will add these to the
known issues.
XIII
I still strongly suggest that the 2.0 version of syntaxhighlighter would be used instead of 1.5.
We had some technical difficulties getting the 2.0 version to work, and ran out of time. So we decided to deploy with 1.5, and logged a work item to move to 2.0 in the coming weeks.
mbanavige
All-Star
134971 Points
15423 Posts
ASPInsiders
Moderator
MVP
Re: Source Code examples
Jun 24, 2009 03:32 AM|LINK
I get previews too, but the code treatment doesn't kick in when previewing.
ps: bonjour from safari 4 (hack free)
tmorton
All-Star
56440 Points
9720 Posts
ASPInsiders
Moderator
Re: Source Code examples
Jun 24, 2009 04:33 AM|LINK
regex (regular expression)
ASP.NET/IIS.NET Website Manager, Neudesic
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: Source Code examples
Jun 24, 2009 05:28 AM|LINK
Code paste now works
#region " Calc Functions "
/// <summary>
/// Calculate Percentage from Decimal Values
/// </summary>
/// <param name="decExpression1">Numerator value</param>
/// <param name="decExpression2">Divisor value</param>
/// <returns>Calculated percentage</returns>
public static decimal CalcPercent(decimal decExpression1, decimal decExpression2)
{
if (decExpression2 == 0)
{
return 0;
}
return 100 * (decExpression1 / decExpression2);
}
/// <summary>
/// Calculate Percentage from Integer Values
/// </summary>
/// <param name="expression1">Numerator value</param>
/// <param name="expression2">Divisor value</param>
/// <returns>Calculated Percentage</returns>
public static int CalcPercent(int expression1, int expression2)
{
if (expression2 == 0)
{
return 0;
}
return (int)(100 * (long)expression1) / expression2;
}
#endregion
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
XIII
All-Star
182707 Points
23464 Posts
ASPInsiders
Moderator
MVP
Re: Source Code examples
Jun 24, 2009 06:59 AM|LINK
body { margin: 0; padding: 0; font-family: Arial,Helvetica,sans-serif; font-size: .88em; color: #4c4c4c; cursor: default; } html * { margin: 0; padding: 0; }Css test.
Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
XIII
All-Star
182707 Points
23464 Posts
ASPInsiders
Moderator
MVP
Re: Source Code examples
Jun 24, 2009 07:15 AM|LINK
body { margin: 0; padding: 0; font-family: Arial,Helvetica,sans-serif; font-size: .88em; color: #4c4c4c; cursor: default; } html * { margin: 0; padding: 0; }How to get the fancy borders? Which options do you choose? And shouldn't these be best be standardized? I would also propose to use the 2.0 version of syntaxhighlighter. Looks prettier.
Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
SGWellens
All-Star
126031 Points
10310 Posts
Moderator
Re: Source Code examples
Jun 24, 2009 12:26 PM|LINK
IE8. As MikeB said, the code shows in preview but it's not formatted.
My blog
SGWellens
All-Star
126031 Points
10310 Posts
Moderator
Re: Source Code examples
Jun 24, 2009 12:30 PM|LINK
Default options:
body { margin: 0; padding: 0; font-family: Arial,Helvetica,sans-serif; font-size: .88em; color: #4c4c4c; cursor: default; } html * { margin: 0; padding: 0; }My blog
XIII
All-Star
182707 Points
23464 Posts
ASPInsiders
Moderator
MVP
Re: Source Code examples
Jun 24, 2009 01:09 PM|LINK
New try with none of the checkboxes checked, CSS chosen from the list:
body { margin: 0; padding: 0; font-family: Arial,Helvetica,sans-serif; font-size: .88em; color: #4c4c4c; cursor: default; } html * { margin: 0; padding: 0; }with none of the checkboxes checked, C# chosen from list:
body { margin: 0; padding: 0; font-family: Arial,Helvetica,sans-serif; font-size: .88em; color: #4c4c4c; cursor: default; } html * { margin: 0; padding: 0; }Update: it seems the CSS scripts file isn't included or doesn't work. Also there's no color coding for the code that gets into the fancy layout so I guess there's also some missing external css for the color coding. I still strongly suggest that the 2.0 version of syntaxhighlighter would be used instead of 1.5.
Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
tmorton
All-Star
56440 Points
9720 Posts
ASPInsiders
Moderator
Re: Source Code examples
Jun 24, 2009 01:34 PM|LINK
We'll take a look at these, and once I can verify I will add these to the known issues.
We had some technical difficulties getting the 2.0 version to work, and ran out of time. So we decided to deploy with 1.5, and logged a work item to move to 2.0 in the coming weeks.
ASP.NET/IIS.NET Website Manager, Neudesic
crpietschman...
Participant
917 Points
221 Posts
Re: Source Code examples
Jun 24, 2009 10:06 PM|LINK
Yeah it seems like the "Insert code" button doesn't seem to work... hm...
body { margin: 0; padding: 0; font-family: Arial,Helvetica,sans-serif; font-size: .88em; color: #4c4c4c; cursor: default; } html * { margin: 0; padding: 0; }
Blog: http://pietschsoft.com | Web.Maps.VE - ASP.NET AJAX Bing Maps Control