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
System.Web.UI.ScriptManager.RegisterStartupScript(this, this.GetType(), "name_of_function", "function()", true); | |
Note: Client side JS function must be defined in the global name space |
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
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(onBeginRequest); | |
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(onEndRequest); | |
function onBeginRequest() { | |
//initiate on start of postback | |
} | |
function onEndRequest() { | |
//initiate at end of postback | |
} |
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
Open Command Line prompt in administrator mode: | |
Type: | |
netsh http add urlacl url=http://machine_name:port_number/ user=everyone | |
where 'machine_name' is you machine(hostname) - to find this open command propmt and type 'hostname' | |
and 'port_number' is your project port binding. | |
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
document.body.contentEditable = 'true'; |
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 locations = [ | |
['Bondi Beach', '850 Bay st 04 Toronto, Ont'], | |
['Coogee Beach', '932 Bay Street, Toronto, ON M5S 1B1'], | |
['Cronulla Beach', '61 Town Centre Court, Toronto, ON M1P'], | |
['Manly Beach', '832 Bay Street, Toronto, ON M5S 1B1'], | |
['Maroubra Beach', '606 New Toronto Street, Toronto, ON M8V 2E8'] | |
]; | |
var map = new google.maps.Map(document.getElementById('map'), { | |
zoom: 10, |
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
#!/usr/bin/env ruby | |
require 'tempfile' | |
require 'fileutils' | |
# Signals | |
trap("SIGINT") { exit } | |
# Setup | |
TARGET_FOLDER = ARGV[0] | |
TARGET_URL = ARGV[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
function sleep(milliseconds) { | |
var startTime = new Date().getTime(); | |
while (new Date().getTime() < startTime + milliseconds); | |
} | |
sleep(10000); |
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
Use "Selection/Split into Lines" (Ctrl+Shift+L on Windows and Linux, Cmd+Shift+L on OS X) | |
(Shift+Alt+W) wrap lines in tag |
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
n.ToString("D2") | |
http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx |
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 c.handle contains collection.handle and c.handle != collection.handle %} | |
<li class="{{ forloop.index }}"> | |
<a href="{{ c.url }}" title="{{ c.title }}"> | |
<span class="product-border"></span> | |
<div class="img-wrap"> | |
<span class="img-wrap__inner"> | |
<img src="{{ c.image.src | collection_img_url: 'medium' }}"> | |
</span> | |
</div> |
OlderNewer