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; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Data.Entity; | |
using System.Linq; | |
using System.Linq.Expressions; | |
namespace FCM.Web.Tests.TestHelpers | |
{ |
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
[Test] | |
public void GetSimilarity_SpaceInTarget_NotZero() | |
{ | |
var matcher = new SimMetricsMetricUtilities.JaroWinkler(); | |
var target = " 1 main"; | |
var candidate = "1 main st"; | |
var similarity = matcher.GetSimilarity(candidate, target); | |
var message = string.Format("Expect similarity {0} to be > .9", similarity); | |
Assert.IsTrue(similarity > .90, message); |
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 ngGridObj = [ { | |
"entity" : { | |
'date' : '2013-09-23 23:23:23', | |
'amt' : 4.5, | |
'name' : 'Mike' | |
} | |
}, { | |
"entity" : { | |
'date' : '2013-09-26 23:23:23', | |
'amt' : 6.5, |
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
/** | |
* @method | |
* @public | |
* @description Take an array of objects and convert to an array of pairs whose | |
* xCol are grouped and yCol values are aggregated somehow. If | |
* grouping by day or month, dates must be in ZULU format strings! | |
* Original implementation returned an object with keys = xCol and | |
* values = yCol. It worked great but js maps(objects) cannot be | |
* sorted! | |
* @param {array} |
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 fs = require('fs'); | |
var exec = require('child_process').exec, child; | |
// Inputs | |
var inputDir = './developer/test/unit/data/input/'; | |
var expectedDir = './developer/test/unit/data/expected/'; | |
var outputDir = './developer/test/unit/data/output/'; | |
var parserA = './server/load-it/logax-a-parser.js'; | |
var parserB = './server/load-it/logax-b-parser.js'; | |
var inputFiles = new Array(3); |
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
namespace My.Models.BaseModels | |
{ | |
public class AuditableEntity | |
{ | |
public int Id { get; set; } | |
public DateTime CreatedDt { get; set; } | |
public string CreatedBy { get; set; } | |
public DateTime RevisedDt { get; set; } | |
public string RevisedBy { get; set; } | |
} |
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
[HttpPost] | |
public ActionResult ConfirmLink(string id) | |
{ | |
try | |
{ | |
var confirmationMessage = SomeRepo.ConfirmLink(id); | |
return Json(new { confirmationMessage = confirmationMessage }, JsonRequestBehavior.AllowGet); | |
} | |
catch (Exception ex) | |
{ |
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
object FileName = tempFilePath; | |
object FileFormat = msWord.WdSaveFormat.wdFormatFilteredHTML; | |
object LockComments = false; | |
object Password = System.Reflection.Missing.Value; | |
object AddToRecentFiles = false; | |
object WritePassword = System.Reflection.Missing.Value; | |
object ReadOnlyRecommended = false; | |
object EmbedTrueTypeFonts = false; | |
object SaveNativePictureFormat = System.Reflection.Missing.Value; | |
object SaveFormsData = false; |
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.addEventListener('load', function(e) { | |
var trees = new Array(3); | |
trees[0] = {}; // 0 0 | |
trees[1] = {a : {}}; // 1 1 | |
trees[2] = {a : {}, b: {a : {}, b: {a : {}, b: {}}}}; // 6 3 | |
var nodes = function(tree) { | |
var count = 0; | |
var nodes2 = function(tree) { |
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.Globalization; | |
using System.Threading; | |
using System.Web.Helpers; | |
namespace Custom.Utils | |
{ | |
class CustomJson | |
{ |