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
private string GetRandomRelatedViewID(string viewIDList) | |
{ | |
BaseGenericList<BrandEnsemble.Framework.RelatedItems.Components.RelatedItem> riList = BrandEnsemble.Framework.RelatedItems.RelatedItems.GetAllRelatedItems(); | |
riList.Filter(new string[] { "Caption" }, string.Empty, FilterOperand.NotEquals); | |
BrandEnsemble.Framework.RelatedItems.Components.RelatedItem rri = riList.RandomItem(); | |
while (viewIDList.IndexOf(rri.ViewID) >= 0) | |
{ | |
rri = riList.RandomItem(); | |
} | |
return rri.ViewID; |
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
Date.prototype.atSomePoint = function(hours) { | |
var startHour = new Date(this.valueOf()); | |
var endHour = new Date(this.valueOf()); | |
startHour.setSeconds(0); | |
startHour.setMinutes(0); | |
endHour.setSeconds(0); | |
endHour.setMinutes(0); | |
if (hours) { | |
startHour.setHours(hours.between); | |
endHour.setHours(hours.and); |
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
/* add shadow to page */ | |
$("#body").wrap("<div id=\"body-shadow\" style=\"width:800px; margin: auto; padding: 0 4px 5px 0;\"></div>"); | |
var border = RUZEE.ShadedBorder.create( | |
{ | |
corner: 1, | |
shadow: 8, | |
border: 0, | |
borderOpacity: 0.8 | |
} | |
); |
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
/* Pushup | |
* Copyright (c) 2008 Nick Stakenburg (www.nickstakenburg.com) | |
* | |
* License: MIT-style license. | |
* Website: http://www.pushuptheweb.com | |
* | |
*/ | |
var Pushup = { | |
Version: '1.0.0.1.jquery', |
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 src="scripts/jquery.js" type="text/javascript"></script> | |
<script type="text/javascript">//<![CDATA[ | |
var js = ["scripts/jquery.dimensions.js", "scripts/shadedborder.js", "scripts/jqmodal.js", "scripts/main.js"]; | |
var $head = $("head"); | |
for (var i = 0; i < js.length; i++) { | |
$head.append("<script src=\"" + js[i] + "\" type=\"text/javascript\"></scr" + "ipt>"); | |
} | |
//]]></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
Public Shared Function GetExternalImage(ByVal url As String) As IO.Stream | |
Dim parts As String() = url.Split("."c) | |
Dim ext As String = parts(parts.Length - 1) | |
Dim path As String = HttpContext.Current.Server.MapPath("~/App_Data/rss/photogallery/") | |
If Not Directory.Exists(path) Then | |
Directory.CreateDirectory(path) | |
End If | |
Dim stream As IO.Stream = Nothing | |
If File.Exists(cacheFilePath) Then | |
stream = File.OpenRead(cacheFilePath) |
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
/** | |
* Favicons 1.0.th | |
* | |
* Prepends or appends a favicon image to all external links | |
* | |
* Usage: jQuery.favicons(); | |
* | |
* @class favicons | |
* @param {Object} conf, custom config-object | |
* |
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
// call this to reset the size to the columns | |
function setColumnsEqualHeight() | |
{ | |
// some example items to measure and resize | |
var $toMeasure = $("#content-left-shadow, #content-middle, #content-right-shadow, #secondary-nav"); | |
var $toResize = $("#content-bottom-container, #content-left-shadow, #content-middle, #content-right-shadow"); | |
setEqualHeight($toMeasure, $toResize); | |
} | |
// call the helper method for both ready and load to make sure stuff is sized as dynamically as possible |
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
XmlDocument xDoc = null; | |
string xmlPath = "~/App_Data/SomeXml.xml"; | |
if (HttpContext.Current.Cache[xmlPath] == null) { | |
string cacheFilePath = HttpContext.Current.Server.MapPath(xmlPath); | |
xDoc = new XmlDocument(); | |
xDoc.Load(cacheFilePath); | |
HttpContext.Current.Cache.Insert(xmlPath, xDoc, new CacheDependency(cacheFilePath)); | |
} else { | |
xDoc = (XmlDocument)HttpContext.Current.Cache[xmlPath]; |
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
Protected Sub DateValidator_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles DateValidator.ServerValidate | |
args.IsValid = DateTime.TryParse(args.Value, New DateTime()) | |
End Sub |
OlderNewer