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 globals = { | |
thingWeNeedClasses: undefined | |
}; | |
require(["/Scripts/ThingWeNeed.js", | |
function (thingWeNeedClasses) { | |
globals.thingweNeedClasses = thingWeNeedClasses; | |
}); | |
function doStuff() { |
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 void UpdateObjectChangesIfChanged<TEntity>(TEntity entity) where TEntity : EntityObject | |
{ | |
// Run Audit Log code | |
this.SavingChangesAction = new Action<ObjectContext>(AuditTableLogAction<T>); | |
//this.ObjectContext.ObjectStateManager.ChangeObjectState(entity, EntityState.Modified); | |
this.ObjectContext.SaveChanges(); | |
} | |
public void UpdateObjectChanges<TEntity>(TEntity entity) where TEntity : EntityObject | |
{ |
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 CR = { | |
bind: function (func, context) { | |
var nativeBind = Function.prototype.bind, | |
slice = Array.prototype.slice, | |
args, | |
bound, | |
ctor = function () {}; | |
if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); | |
if (!hb.isFunction(func)) throw new TypeError; |
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
window.cr = window.cr || { | |
func1: function () { | |
console.log("Test this"); | |
} | |
} |
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
<script type="text/javascript" src="http://example.com/jquery-1.7.2.js"></script> | |
<script type="text/javascript"> | |
var $j = $.noConflict(true); | |
</script> | |
<!-- load jQuery 1.3.2 --> | |
<script type="text/javascript" src="http://example.com/jquery-1.9.1.js"></script> | |
<script type="text/javascript"> | |
var $j19 = $.noConflict(true); | |
</script> |
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
.bigModal{ | |
position:fixed; | |
top:50%; | |
left:50%; | |
z-index:1050; | |
width:940px; | |
margin:-250px 0 0 -280px; | |
margin-left:-470px; | |
background-color:#fff; | |
border:1px solid #999; |
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 partial class MyWebPage { | |
public void SomeMethod() { | |
var imaginaryValues = /* Some long string array of values */ | |
Page.GetWebValueControls().ForEach(c => { | |
c._getOrSetControlValue(true, imaginaryValues[THE_CORRECT_INDEX]); | |
}); | |
} | |
} | |
public static class Extensions { |
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 static IEnumerable<T> Descendants<T>(this IEnumerable<T> source, Func<T, IEnumerable<T>> DescendBy) { | |
foreach (T value in source) { | |
yield return value; | |
foreach (T child in DescendBy(value).Descendants<T>(DescendBy)) { | |
yield return child; | |
} | |
} | |
} | |
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 Coin = Backbone.Model.extend({ | |
defaults: { | |
value: 0, | |
image: '' | |
} | |
}); | |
var Coins = Backbone.Collection.extend({ | |
model: Coin, |
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 (options) { | |
options = options ? _.clone(options) : {}; | |
if (options.parse === undefined) options.parse = true; | |
var collection = this; | |
var success = options.success; | |
options.success = function(resp, status, xhr) { | |
collection[options.add ? 'add' : 'reset'](collection.parse(resp, xhr), options); | |
if (success) success(collection, resp); | |
}; | |
options.error = Backbone.wrapError(options.error, collection, options); |
NewerOlder