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
interface Functor { | |
fmap: (any) => any; | |
} | |
interface Monad extends Functor { | |
bind: (any) => Monad; | |
} | |
interface MaybeMatcher { | |
just: (any) => Maybe; |
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
select '[' + STUFF(( | |
select | |
',{"NumericField":' + cast([NumericField] as varchar(max)) | |
+ ',"StringField":"' + [StringField] + '"' | |
+'}' | |
from [DataBase].[dbo].[Table] | |
for xml path(''), type | |
).value('.', 'varchar(max)'), 1, 1, '') + ']' |
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 sumStrings(a,b) { | |
var n = Math.max(a.length, b.length); | |
var f = n === a.length ? a : b; | |
var s = f === a ? b : a; | |
var diff = f.length - s.length; | |
var toggler = false; | |
var c = [].slice.call(f).reduceRight(function(previous, current, index) { | |
var operand1 = +current; |
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
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
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
module("JSONP tests", { | |
setup: function() { | |
var that = this; | |
that.getLatestMockedAjaxCall = function() { | |
var calls = $.mockjax.mockedAjaxCalls(); | |
return calls[calls.length - 1]; | |
}; | |
that.originalJsonpCallback = $.ajaxSettings.jsonpCallback; | |
that.jsonpCallbackName = "jsonpCallback"; |
NewerOlder