This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.ServiceModel.Syndication; | |
using System.Web.Mvc; | |
using System.Xml; | |
using System.Xml.Linq; | |
namespace MvcSiteMap.Controllers | |
{ | |
[HandleError] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
checked | |
{ | |
int x = int.MaxValue; | |
int++; | |
} | |
} | |
catch (OverflowException ex) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.Web.Mvc | |
Namespace Controllers | |
<HandleError> _ | |
Public Class HomeController | |
Inherits Controller | |
Public Function Index() As ActionResult | |
Return View() | |
End Function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create sp_UpdateStatistics | |
as | |
/* | |
This procedure will run UPDATE STATISTICS against | |
all user-defined tables within this database. | |
*/ | |
declare | |
@tablename varchar(255), | |
@tablename_header varchar(255) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' | |
' File: MortgagePaymentCalculator.vb | |
' Author: Billy Coover | |
' Date: March 11, 2011 | |
' | |
' Change request 16 from SR-mf-003. Create a VB.NET program that calculates and displays the monthly | |
' payment for a $200,000 loan at 5.75% interest for 30 years | |
' | |
' Quality Control | |
' Version 0 | 03/11/2011 | Write the program in VB.Net (not Web based) using a loan amount of $200,000 with an interest rate of 5.75% and a 30 year term. Display the mortgage payment amount. Insert comments to document the program. There is No Requirement for the user to enter values. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class Mortgage | |
Private Property LoanAmount() As [Decimal] | |
Get | |
Return m_LoanAmount | |
End Get | |
Set | |
m_LoanAmount = Value | |
End Set | |
End Property | |
Private m_LoanAmount As [Decimal] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string SourceIP = string.IsNullOrEmpty(Request.ServerVariables["HTTP_X_FORWARDED_FOR"]) ? | |
Request.ServerVariables["REMOTE_ADDR"] : | |
Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#viewerror").ajaxError(function (e, xhr, ajaxOptions, thrownError) { | |
toast(xhr.responseText); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toast(message) { | |
$(".message-info").html(message); | |
if ($(".message-info").html().length > 0) { | |
$(".notification-bar-container").show('slide', { direction: 'up' }, 1000).delay(2500).hide('slide', { direction: 'up' }, 1000); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Web.Mvc; | |
public static class GravatarExtension | |
{ | |
public static string Gravatar(this UrlHelper url, string emailAddress, int size) | |
{ | |
var baseUrl = "http://www.gravatar.com/avatar/{0}?s={1}"; |