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
/** | |
* Defines an x,y coordinate | |
* @param {float} x coordinate | |
* @param {float} y coordinate | |
*/ | |
function Point (x, y) { | |
this.x = x; | |
this.y = y; | |
} |
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
{ | |
/** | |
* [roundedRect description] | |
* @param {Canvas Context} ctx Canvas Context | |
* @param {int} x X Coordinate | |
* @param {int} y Y Coordinate | |
* @param {int} width Width of rectangle | |
* @param {int} height Height of rectangle | |
* @param {radius} radius Radius of rectangle corners |
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
html | |
{ | |
background: url('../Images/Cloud.jpg') no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} |
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 (StreamReader sr = new StreamReader(Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "Models", "JSON") + "/Menu.json")) | |
{ | |
var response = sr.ReadToEnd(); | |
taskbar = JSON.Deserialize<Menu.Taskbar>(response.ToString()); | |
sr.Close(); | |
sr.Dispose(); | |
} |
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
height: 40px; | |
width: auto; | |
display: block; |
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
try | |
{ | |
throw new Exception(); | |
} | |
catch (Exception ex) | |
{ | |
// Get stack trace for the exception with source file information | |
var st = new StackTrace(ex, true); | |
// Get the top stack frame | |
var frame = st.GetFrame(0); |
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.mediator = (function(){ | |
var subscribe = function(channel, fn, _context){ | |
_context = (typeof _context != 'undefined') ? _context : this; | |
if (!mediator.channels[channel]) mediator.channels[channel] = []; | |
mediator.channels[channel].push({ context: _context, callback: fn }); | |
return _context; | |
}, | |
publish = function(channel){ | |
if (!mediator.channels[channel]) return false; | |
var args = Array.prototype.slice.call(arguments, 1); |
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
string.Join(",", myListOfStrings.ToArray()) |
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 JsonResult ImportCSV(HttpPostedFileBase file) | |
{ | |
if (file == null) | |
return Json(new JSON.Result() { Status = JSON.Result.StatusEnum.Failed, DisplayMessage = "No Upload File Present" }); | |
if (file.ContentLength == 0) | |
return Json(new JSON.Result() { Status = JSON.Result.StatusEnum.Failed, DisplayMessage = "File does not have Content Length" }); | |
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
/** | |
* Takes an array of keywords and turn it into a regular expression | |
* that can be tested to see if a word matches any in the array | |
* irregardless of white space and case | |
* @param {Array} arrKeywords Array of Keywords | |
* @return {RegExp} Regular Expression | |
*/ | |
function createExpression (arrKeywords) { | |
var innerExpression = ''; | |
[].forEach.call(arrKeywords, function (k, index) { |
OlderNewer