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
using System; | |
using System.Net; | |
using System.IO; | |
using System.Web; | |
/// <summary> | |
/// Minify js | |
/// Dependancy - PostSubmitter class = http://geekswithblogs.net/rakker/archive/2006/04/21/76044.aspx, can easily be replaced with native http post | |
/// </summary> | |
public partial class Crown_GoogleClosure : System.Web.UI.Page |
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
public string DisplayGSTPortion { get { return string.Format("{0:C}", (Decimal)(this.TotalPriceAsDollars - (this.TotalPriceAsDollars / (decimal)1.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
<asp:DropDownList ID="ddlCountryOrigin" runat="server"> | |
<asp:ListItem Selected="true">Select Country</asp:ListItem> | |
<asp:ListItem>United States</asp:ListItem> | |
<asp:ListItem>Afghanistan</asp:ListItem> | |
<asp:ListItem>Albania</asp:ListItem> | |
<asp:ListItem>Algeria</asp:ListItem> | |
<asp:ListItem>American Samoa</asp:ListItem> | |
<asp:ListItem>Andorra</asp:ListItem> | |
<asp:ListItem>Angola</asp:ListItem> | |
<asp:ListItem>Anguilla</asp:ListItem> |
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 patt = @"^\d{2}:\d{2} (AM|PM)$"; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Security.Permissions; | |
using Microsoft.SharePoint; | |
using Microsoft.SharePoint.Administration; | |
using Microsoft.SharePoint.Security; | |
namespace Client.Project.Infrastructure.EventReceiver |
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
New Height | |
original height / original width * new width = new height | |
New Width | |
orignal width / orignal height * new height = new width |
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
var lazyLoadImages = function ($item) { | |
/// <summary>Loop over image(s) element(s) and test for data-src attribute and preload image</summary> | |
$item.find('img.pre-loader').each(function (index) { | |
var jQuerypreloaderImg = $(this); | |
var src = jQuerypreloaderImg.attr('data-src'); | |
var alt = jQuerypreloaderImg.attr('alt'); | |
var propertyImg = new Image(); | |
$(this).hide(); |
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
$.fn.enterKey = function (fnc) { | |
/// <summary>Power Search: Enter Key press</summary> | |
/// http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes | |
return this.each(function () { | |
$(this).keypress(function (ev) { | |
var keycode = (ev.keyCode ? ev.keyCode : ev.which); | |
if (keycode == 13) { | |
fnc.call(this, ev); | |
} | |
}) |
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
jQuery.expr[':'].icontains = function (a, i, m) { | |
///<summary>Extend jQuery with case insentive contains selector</summary> | |
return jQuery(a).text().toUpperCase() | |
.indexOf(m[3].toUpperCase()) >= 0; | |
}; |
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
GRANT ALL PRIVILEGES ON {tablename}.* TO {username}@"{ipaddress}" IDENTIFIED BY "{password}" | |
e.g | |
GRANT ALL PRIVILEGES ON tableFoo.* TO wordpressuser@"192.168.1.%" IDENTIFIED BY "secure123" |
OlderNewer