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 TinyChat = TinyChat || {}; | |
TinyChat.ConnectionID = ''; | |
TinyChat.Connection = null; | |
TinyChat.Proxy = null; | |
TinyChat.StartChat = function () { | |
TinyChat.Connection = $.hubConnection(); | |
TinyChat.Connection.logging = true; |
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 class MvcApplication : System.Web.HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
System.Diagnostics.Debugger.Launch(); | |
AreaRegistration.RegisterAllAreas(); | |
WebApiConfig.Register(GlobalConfiguration.Configuration); | |
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); | |
RouteConfig.RegisterRoutes(RouteTable.Routes); | |
BundleConfig.RegisterBundles(BundleTable.Bundles); |
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
$.connection.hub.start().done(function() { | |
$.connection.myHub.server.test(['1', '2', '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
public static class IRedisClientsManagerExtensions() | |
{ | |
public static ManagedList<T> GetManagedList(this IRedisClientsManager manager, string key) | |
{ | |
return new ManagedList<T>(manager, key); | |
} | |
} | |
public class ManagedList<T> : IList<T> | |
{ |
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
/* | |
** This exists to show differences in how to access HybridList<T> vs the standard IRedisList<T> | |
*/ | |
//Adding items | |
//IRedisList<T> | |
using(var redis = new RedisClient()) |
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
/* | |
I am using the cache here as a persistence layer, so I need to have a deterministic way at minimum | |
of knowing where to look for an object. | |
Problems that I already know exist: Currently I risk overwriting a list that has different items, perhaps I should only add and remove from teh Update section? | |
Thoughts better ways of handling the item changes from the time I fetch them from the cache until I read it from the cache. | |
Maybe instead of modifying the list I read out of the cache I should just send the update directly to the cache? |
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 quicktip(options) { | |
var verticalPercent = '0'; | |
var horizontalPercent = '0'; | |
var stick = false; | |
if(options.verticalPercent !== undefined) | |
{ | |
verticalPercent = options.verticalPercent; | |
} |
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 positionIt($element, $anchorElement, verticalPercent, horizontalPercent) | |
{ | |
if(!($localElement instanceof jQuery)) | |
{ | |
throw '$element must be a jQuery object'; | |
return; | |
} | |
if(!($anchorElement instanceof jQuery)) | |
{ |
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
//knockout.js can be found at http://www.knockoutjs.com | |
//chosen.js can be found at http://harvesthq.github.com/chosen/ | |
//jquery.js can be found at http://jquery.com | |
//Usage is data-bind="chosen: true" | |
//Want to clean this up to eventually work as | |
//data-bind="chosen: { options: SelectOptions, value: selectValue}" | |
ko.bindingHandlers.chosen = { |
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
<!DOCTYPE html> | |
<script src="http://github.com/downloads/SteveSanderson/knockout/knockout-2.0.0.js"></script> | |
<script src="https://raw.github.com/bestiejs/lodash/master/lodash.js"></script> | |
<table > | |
<tr> | |
<th>First Name</th> | |
<th>Last Name</th> | |
<th>Phones</th> | |
</tr> | |
<tbody data-bind="foreach: contacts"> |