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
<dialog> | |
<dt class="chatTitle">Me</dt> | |
<dd class="chatMsg"> | |
<p>yo</p> | |
<span>1:39 PM</span> | |
<div class="arrow"></div> | |
<div class="arrow arrowOver"></div> | |
</dd> | |
<dt class="chatTitle reply">Expert</dt> | |
<dd class="chatMsg reply"> |
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.Web.Mvc; | |
using _8Ball.Common; | |
using TwilioSharp.MVC3.Controllers; | |
using TwilioSharp.Request; | |
public class CallController : TwiMLController | |
{ | |
[HttpPost] | |
public ActionResult New(CallRequest request) | |
{ |
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.Web.Mvc; | |
using _8Ball.Common; | |
using TwilioSharp.MVC3.Controllers; | |
using TwilioSharp.Request; | |
public class TextController : TwiMLController | |
{ | |
[HttpPost] | |
public ActionResult New(TextRequest request) | |
{ |
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
/* Author: | |
Jacob Gable, http://jacob4u2.posterous.com | |
License: | |
MS-PL | |
*/ | |
jQuery.any = function (collection, compareFunc) { | |
if (!$.isArray(collection) || !$.isFunction(compareFunc)) { | |
return false; | |
} |
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
@model MotherEffinChatSite.Models.HomeVM | |
@{ | |
Page.Title = "MVC Chat Example"; | |
} | |
@section ScriptSection { | |
<!-- The new message template... TODO: make it sexy --> | |
<script id="msgTmpl" type="text/x-jquery-tmpl"> | |
<li><p style="margin-bottom:-2px; color: black;"><strong>${user.name}</strong></p><p>${message}</p></li> |
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.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
public class ChatResponse | |
{ | |
public List<MessageInfo> messages { get; set; } | |
} |
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.Web.MVC | |
public class ChatController : AsyncController | |
{ | |
[AsyncTimeout(ChatServer.MaxWaitSeconds * 1002)] | |
public void IndexAsync() | |
{ | |
AsyncManager.OutstandingOperations.Increment(); | |
ChatServer.CheckForMessagesAsync(msgs => |
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
// Original code by Joachim Lykke Andersen; http://devtalk.dk/2011/02/16/Workaround+EF+Code+First+On+AppHabour.aspx | |
using System.Data.Entity; | |
using System.Data.Entity.Database; | |
using System.Data.Entity.Design; | |
using System.Data.Entity.Infrastructure; | |
using System.Data.Metadata.Edm; | |
using System.Data.Objects; | |
using System.Globalization; | |
using System.Linq; |
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.Windows; | |
using System.Windows.Input; | |
using System.Collections.ObjectModel; | |
using System.Collections.Generic; | |
#region TeamServices | |
/// <summary> | |
/// Our Hello response object; /Index action |
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.Collections.Generic; | |
public class HelloWorldService : JsonService<HelloWorldResponse> | |
{ | |
private static string Url = "http://localhost:59527/Team"; | |
public void GetHello(Action<HelloWorldResponse> onResult, Action<Exception> onError) | |
{ | |
StartServiceCall(Url, onResult, onError); |