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
IF OBJECT_ID (N'dbo.parseJSON') IS NOT NULL | |
DROP FUNCTION dbo.parseJSON | |
GO | |
CREATE FUNCTION dbo.parseJSON( @JSON NVARCHAR(MAX)) | |
RETURNS @hierarchy TABLE | |
( | |
element_id INT IDENTITY(1, 1) NOT NULL, /* internal surrogate primary key gives the order of parsing and the list order */ | |
parent_ID INT,/* if the element has a parent then it is in this column. The document is the ultimate parent, so you can get the structure from recursing from the document */ | |
Object_ID INT,/* each list or object has an object id. This ties all elements to a parent. Lists are treated as objects here */ |
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 IQueryable<TEntity> WhereIn<TEntity, TValue> | |
( | |
this ObjectQuery<TEntity> query, | |
Expression<Func<TEntity, TValue>> selector, | |
IEnumerable<TValue> collection | |
) | |
{ | |
if (selector == null) throw new ArgumentNullException("selector"); | |
if (collection == null) throw new ArgumentNullException("collection"); | |
ParameterExpression p = selector.Parameters.Single(); |
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
{ | |
// Path to the jslint jar. | |
// Leave blank to use bundled jar. | |
"jslint_jar": "", | |
// Options pass to jslint. | |
"jslint_options": "--node --browser --white --sloppy --nomen --undef --unparam --vars", | |
// Ignore errors, regex. | |
"ignore_errors": |
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
/* Product Detail Right Gutter */ | |
function PD_RIGHT_zp(a, b, c, d, e, f, g, h, i, j) { | |
var builder = new ZoneBuilder(); | |
var template = "upsellNarrowTemplate"; | |
var divTarget = "upsell-right"; | |
var categoryId = '5001'; | |
var upsellCount = 12; | |
if (showNewProductWebsite === "true") { | |
template = "upsellNarrowTemplate2"; |
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
<script id="upsellTemplate" type="text/x-jquery-tmpl"> | |
<li class="upsell-container"> | |
<table border="1" width="250" height="440" > | |
<tr><td> | |
<p id="item-image"> | |
<a href="${productUrl}" title="${name.replace("�", "™")}"><img src="${productImage}" alt="${name.replace("�", "™")}" /></a></p> | |
{{if reviewStars > 0}} | |
<p><img src="${reviewUrl}" /><a href="${productUrl}" class="blue">${parseInt(reviewStars)} Reviews </a> </p> | |
{{else}} | |
<p><img src="http://images.vitaminimages.com/pp/images/ratings_0.jpg" /> <a href="${productUrl}" class="blue" >Write the first review </a></p> |
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
'************ Moovweb Mobile Redirect -BEGIN*********** | |
Dim endOfProtocol, endofDomain, currentPath | |
endOfProtocol = InStr(Request.ServerVariables("CACHE_URL"),"//") | |
endOfHost = InStr(endOfProtocol + 2, Request.ServerVariables("CACHE_URL"),"/") | |
currentPath = Mid(Request.ServerVariables("CACHE_URL"), endOfHost) | |
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 Machine.Specifications; | |
using Moq; | |
using NBTY.Core.DTO.Puritan; | |
using NBTY.Core.Enums; | |
using Puritan.Web.Services.Catalog; | |
using Puritan.Web.Services.Marketing; | |
using Puritan.Web.Services.Session; | |
using Puritan.Web.Services.ShoppingCart; |
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 NBTY.Core.DTO.Puritan; | |
using ServiceStack.CacheAccess; | |
using ServiceStack.ServiceHost; | |
using ServiceStack.ServiceInterface; | |
using ServiceStack.ServiceInterface.ServiceModel; | |
namespace Puritan.Web.Services.Catalog.ServiceStack | |
{ | |
[RestService("/category/{LegacyId}")] |
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
// Ben Bederson | |
// June 2012 | |
// www.cs.umd.edu/~bederson | |
$(function() { | |
var svg_w = 550, | |
svg_h = 400, | |
node_w = 70, | |
node_h = 20, | |
node_active_h = 50, |
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 App = new Marionette.Application(); | |
App.addRegions({ | |
"content": "#content", | |
"navigation": "#navigation", | |
}); | |
App.on("initialize:after", function() { | |
Backbone.history.start(); | |
}); |