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
/* | |
* Please add your Valuable comments in between the codes where there is a need of modification | |
* So that I can have a clear goal. | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; |
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; | |
using System.Web; | |
using Microsoft.AspNet.SignalR.Hubs; | |
using System.Threading.Tasks; | |
using System.Collections.Concurrent; | |
namespace serverNameExample | |
{ |
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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="serverNameExample._default" %> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
<script src="Scripts/jquery-1.8.2.js" type="text/javascript"></script> | |
<script src="Scripts/jquery.signalR-1.0.0-alpha2.min.js" type="text/javascript"></script> | |
<!-- If this is an MVC project then use the following --> | |
<!-- <script src="~/signalr/hubs" type="text/javascript"></script> --> |
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; | |
using System.Web; | |
using Microsoft.AspNet.SignalR.Hubs; | |
namespace serverNameExample | |
{ | |
public class User | |
{ |
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
//Added References | |
/* | |
* jquery-1.6.4.min.js | |
* jquery.signalR-1.0.0-alpha2.min.js | |
*/ | |
var showChatName = new Boolean(); | |
showChatName = true; | |
var chatUsername = window.prompt("Enter Username:", ""); |
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
#chat-outline | |
{ | |
background-color: gray; | |
width: 16%; | |
height: 50%; | |
min-height: 300px; | |
min-width: 200px; | |
max-height: 450px; | |
max-width: 300px; | |
position: fixed; |
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 getDate(time) { | |
// Refer: http://stackoverflow.com/a/10589791/1577396 | |
// Refer: http://stackoverflow.com/a/1353711/1577396 | |
if(!time) { | |
return false; | |
} | |
var dateTime = new Date(time); | |
// Valid date | |
if(Object.prototype.toString.call(dateTime) === "[object Date]" && !isNaN(dateTime.getTime())){ | |
return dateTime; |
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 doSum(a, b){ | |
var aLen = ("" + a).length, bLen = ("" + b).length; | |
var large = Math.max(aLen, bLen); | |
var dummyZeroes = ""; | |
for(var j = 0; j < large; j++) { | |
dummyZeroes += "0"; | |
} | |
a = (dummyZeroes + a).slice(-large); | |
b = (dummyZeroes + b).slice(-large); | |
var result = ""; |
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 rev(s){ | |
var l = s.length, r=Array(l); | |
for(var i=l-1;i>=0;i--) | |
r[i]=s[l-1-i]; | |
return r.join(''); | |
} |
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 sb = (function () { | |
var eventObject = {}; | |
document.body.addEventListener('click', function(e){ | |
var el = e.target; | |
var parent = el.parentElement; | |
while(parent !== document.body){ | |
for(var item in eventObject){ | |
var elements = document.querySelectorAll(item); | |
for(var i = 0, ilen = elements.length; i < ilen; i++){ | |
if(el === elements[i]){ |
OlderNewer