This file contains 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
// Instantiate global variable to house timeout object | |
var animationTimeout; | |
function recalculateDiscount() { | |
// Get previous discount | |
var previousDiscount = parseInt(totalDiscount); | |
// Get current discount | |
totalDiscount = parseInt(calculateDiscount()); | |
// If previous and current differ, update | |
if (previousDiscount != totalDiscount) { |
This file contains 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
if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) | |
{ | |
// Do something for iPhone / iPad / iPod here | |
} |
This file contains 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
Regex.Replace(stringValue, "((?<=[a-z])[A-Z]|[A-Z](?=[a-z]))", " $1") |
This file contains 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
-- Get all the current SPID's | |
EXEC sp_who2 | |
-- Kill a given SPID | |
KILL <SPID> | |
-- Set database offline | |
ALTER DATABASE <DATABASENAME> SET OFFLINE WITH NO_WAIT |
This file contains 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
[drive:]\Users\[username]\[textfile].txt .gitignore |
This file contains 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
[Oo]bj | |
[Bb]in | |
*.user | |
*.suo | |
*.[Cc]ache | |
*.bak | |
*.ncb | |
*.log | |
*.DS_Store | |
[Tt]humbs.db |
This file contains 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
git config --global core.excludesfile ~/.gitignore |
This file contains 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
((Literal)e.Item.FindControl("ltDay")).Text = "<span class='weekend'>" + string.Format("<input type='text' " + weekend + " autocomplete='off' size='3' value='{0}' tabindex='{3}' onclick='this.select()' onblur='GuruAllocator.Allocation.checkTime(this)' id='Day_{1}_{2}' name='Day${1}${2}' {4} style='{5}' {6}/>", (ta.Hours > 0 ? ta.Hours.ToString("0.#") : ""), weekIndex, e.Item.ItemIndex, tabIndexNumber, strDisabled, strStyleDisabled, strOnKeyPressEvent) + "</span>"; |
This file contains 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 fileName = Path.GetFileName(UploadedFile.PostedFile.FileName); | |
Attachment attachment = new Attachment(UploadedFile.FileContent, fileName); | |
myMailMessage.Attachments.Add(attachment); | |
SmtpClient mySmtpClient = new SmtpClient(); | |
mySmtpClient.Send(myMailMessage); |
OlderNewer