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
| private T HandleItemCacheRetrieval<T>(string cacheKey, object cacheLock, Func<int, T> nonCachedMethod, int arg) where T : new() { | |
| T retVal = default(T); | |
| try { | |
| retVal = (T)CacheManager.Get(cacheKey); | |
| } | |
| catch (InvalidCastException ex) //it didn’t parse properly | |
| { | |
| LoggerManager.Error(ex); | |
| } |
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
| using System; | |
| using System.IO; | |
| using System.Xml; | |
| namespace FlatFileToXml | |
| { | |
| /// <summary> | |
| /// Summary description for Class1. | |
| /// </summary> | |
| class Class1 |
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
| using System.Data.Entity; | |
| using Devtalk.EF.CodeFirst; | |
| using BeerLoversOftheWorld.Models; | |
| [assembly: WebActivator.PreApplicationStartMethod(typeof(BeerLoversOftheWorld.App_Start.DontDropDbJustCreateTablesIfModelChangedStart), "Start")] | |
| namespace BeerLoversOftheWorld.App_Start { | |
| public static class DontDropDbJustCreateTablesIfModelChangedStart { | |
| public static void Start() { | |
| // Uncomment this line and replace CONTEXT_NAME with the name of your DbContext if you are |
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
| var iceWorld = new Array(); | |
| function IceWorld(){ | |
| iceWorld.length = 0; | |
| iceWorld.push(new Array()); | |
| } | |
| IceWorld.prototype.Add = function(block){ | |
| iceWorld[0].push(block); | |
| block.column = 0; |
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
| Gravity Kata | |
| Create a system that shows how stacked ice blocks behave with gravity. | |
| Here are some examples of how the ice blocks behave in this system: | |
| Adding blocks | |
| Before After | |
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
| // | |
| // Copyright 2012 barry forrest | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software |
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
| /* Scripts dealing with date operations */ | |
| // ==================================== */ | |
| $('#StartDate').addClass('datepicker'); | |
| $('#StartIcon').click(function () { | |
| $('#StartDate').datepicker('show'); | |
| }); | |
| $('#EndDate').addClass('datepicker'); | |
| $('#EndIcon').click(function () { | |
| $('#EndDate').datepicker('show'); |
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
| /* Scripts dealing with date operations */ | |
| // ==================================== */ | |
| $('#StartDate').addClass('datepicker'); | |
| $('#StartIcon').click(function () { | |
| $('#StartDate').datepicker('show'); | |
| }); | |
| $('#EndDate').addClass('datepicker'); | |
| $('#EndIcon').click(function () { | |
| $('#EndDate').datepicker('show'); |
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
| @helper Script(dynamic tempData){ | |
| <div class="container"> | |
| <div id="notifier" class="row span8"></div> | |
| </div> | |
| <script> | |
| var messages = messages || []; | |
| </script> | |
| if (tempData["message"] != null) | |
| { |
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
| if (!window.console) { | |
| (function() { | |
| var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", | |
| "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; | |
| window.console = {}; | |
| for (var i = 0; i < names.length; ++i) { | |
| window.console[names[i]] = function() {}; | |
| } | |
| }()); | |
| } |