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 service(name, constructor) { | |
return factory(name, ['$injector', function($injector) { | |
return $injector.instansiate(constructor); | |
}]); | |
} |
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 factory(name, factoryFn, enforce) { | |
return provider(name, { | |
$get: enforce != false ? enforceReturnValue(name, factoryFn) : factoryFn | |
}); | |
} |
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
<time itemprop="openingHours" datetime="Mo,Fr 08:00-16:00">Monday Through Friday 8-6pm</time> | |
/*Logo*/ | |
ImageObject = | |
priceRange = "$$$" | |
paymentAccepted = "Cash, Credit,Paypal" |
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
public static string RandomString(int length) | |
{ | |
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | |
var random = new Random(); | |
return new string(Enumerable.Repeat(chars, length) | |
.Select(s => s[random.Next(s.Length)]).ToArray()); | |
} |
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
//This example creates a big list with a nested list for each item on the page, each with all of the property names used in that item. | |
var outer = document.createElement('ul'); | |
var items = document.getItems(); | |
for (var item = 0; item < items.length; item += 1) { | |
var itemLi = document.createElement('li'); | |
var inner = document.createElement('ul'); | |
for (var name = 0; name < items[item].properties.names.length; name += 1) { | |
var propLi = document.createElement('li'); | |
propLi.appendChild(document.createTextNode(items[item].properties.names[name])); |
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
<tr data-bind="css: {rowAlt: $data.isActive() && ($index() % 2 == 1), rowInactive: $data.isActive() == false}"> |
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
// Detect local storage on client computer | |
function localStorageSupported() { | |
try { | |
return "localStorage" in window && | |
window["localStorage"] !== null; | |
} | |
catch (e) | |
{ | |
return false; | |
} |
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
[Service Contract] | |
public interface ImathService | |
{ | |
[Operational Contract] | |
Int32 Sum(Int32 a, Int32 b); | |
[Operational Contract] | |
Int32 Difference(Int32 a, Int32 b); | |
[Operational Contract] | |
Int32 Product(Int32 a, Int32 b); | |
[Operational Contract] |
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
// Fires function(s) on pageload | |
function() { | |
setTimeout("timerFinished()", 5000); | |
} | |
// Method called after time | |
function timerFinished() { | |
alert("5 Seconds Have Passed!"); | |
} | |
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
// Add an image | |
function createImage() { | |
// Add to bottom of page(s) | |
var img = document.CreateElement('img'); | |
img.setAttribute("src", "/images/image.png"); | |
("id", ); | |
("width", "250"); | |
("height", "250"); | |
("style", ""); | |
// Adds to bottom of page(s) |