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
// Regex \[(.*?)\] | |
// Result [BinLocation] [nvarchar] | |
[BinLocation] [nvarchar](20) NOT NULL, | |
// RegEx \[([^\[]+)$ | |
// \[ matches [ | |
// [^\/[]+] Matches last occurence of [ | |
// $ matches end of line | |
// Result [nvarchar](20) NOT NULL, |
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
with cte | |
as( | |
select ID, AccountID, ItemTypeID, SourceChannelID, ntile(3) over(order by id) as tile_nr from [Item].[Item] where AccountID = 730 | |
) | |
update [item].[item] | |
set SourceChannelID = cte.tile_nr | |
from [item].[item] ii | |
inner join cte on ii.ID = cte.ID | |
where ii.AccountID = 730 |
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
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
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