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 expect = function(value1) { | |
return { | |
toBe: function(value2) { | |
document.getElementById('test').innerHTML += | |
"<pre>" | |
+ ((JSON.stringify(value1) === JSON.stringify(value2)) ? "Pass " : "Fail ") | |
+ "(val1: " + JSON.stringify(value1) | |
+ " val2: " + JSON.stringify(value2) | |
+ ")</pre><br\>"; | |
} |
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 Expander = (function(){ | |
var Expander = function(id) { | |
this._id = id; | |
this._elem = elem = document.getElementById(id); | |
this._step = 0; | |
this._height = 0; | |
}; | |
Expander.prototype.expand = function(incr,to) { | |
var self = this; | |
var animate = (incr>0 && this._height<to) |
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.Linq; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
DateTime a = DateTime.Now; | |
DateTime z = DateTime.Parse("2014-06-01 00:00:00"); |
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
# | |
# vi $profile | |
# C:\Users\userid\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 | |
# | |
new-alias vi "C:\Program Files\Sublime Text 2\sublime_text.exe" | |
new-alias grep select-string |
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.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Threading.Tasks; | |
// Assume .NET 4.5 | |
namespace FunAPI |
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 | |
{ |
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
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
[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
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; } | |
} |