This file contains hidden or 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 echoDataAfterTime = function(echoData, waitTime) { | |
var dfd = new $.Deferred(); | |
waitTime = waitTime || 1000 * 3; //3 second default (it's long but it proves a point) | |
console.log("Waiting for " + waitTime/1000 + " seconds"); | |
setTimeout(function () { | |
console.log("Waited for " + waitTime/1000 + " seconds to return data", echoData); | |
dfd.resolve(echoData); | |
}, waitTime); |
This file contains hidden or 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
/*jslint plusplus: true */ | |
/*jslint nomen: true*/ | |
/*global $:false, test:false, ok:false, equal:false */ | |
/* brackets-xunit: qunit */ | |
function convertStringToBudget(input) { | |
"use strict"; | |
var pointReg = /\./g, | |
commaReg = /\,/g, | |
initCurrReg = /[£$R€₹]/g, |
This file contains hidden or 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
/*! | |
* jquery-win8-deferred - jQuery $.when that understands WinJS.promise | |
* version: 0.1 | |
* author: appendTo, LLC | |
* copyright: 2012 | |
* license: MIT (http://www.opensource.org/licenses/mit-license) | |
* date: Thu, 01 Nov 2012 07:38:13 GMT | |
*/ | |
(function () { | |
var $when = $.when; |
This file contains hidden or 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 Module SessionExtensions | |
<Runtime.CompilerServices.Extension()> | |
Public Function TryGetValue(session As System.Web.SessionState.HttpSessionState, | |
sessionItemName As String, | |
ByRef result As Object) As Boolean | |
If session Is Nothing Then | |
Throw New ArgumentNullException("Session", "Session is nothing.") | |
End If |
This file contains hidden or 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
/** | |
* jQuery.bvplural | |
* Generic Pluralization Function | |
* | |
* @Author: Adam Hall | |
* @Date: 2012-02-21 | |
* @Copyright: © Brand View | |
* @Version: 1.0.0 | |
* http://www.brandview.co.uk | |
* |
This file contains hidden or 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
<ExtensionAttribute()> | |
Public Function ToMultiKeyDictionary(Of TSource, TSecKey)(ByVal source As IEnumerable(Of TSource), ByVal ParamArray func() As Func(Of TSource, TSecKey)) As IDictionary | |
'EXAMPLE USAGE | |
'dict = students.ToMultiKeyDictionary( | |
' { | |
' Function(x) x.Age, | |
' Function(x) x.Location, | |
' Function(x) x.Job, | |
' Function(x) x.Name, |
This file contains hidden or 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 RenderTemplate(template As String, list As Array) As String | |
Dim myRegexOptions As RegexOptions = RegexOptions.Multiline | |
Dim myRegex As New Regex(strRegex, myRegexOptions) | |
Dim splits = myRegex.Split(template) | |
Dim matches = myRegex.Matches(template) | |
Dim i As Integer = 0 | |
Dim swap As Boolean = False | |
Dim str As New StringBuilder | |
For Each item In list |
This file contains hidden or 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 ($) { | |
$.fn.dylanCarousel = function (options) { | |
var settings = $.extend({ | |
circular: true, | |
pageNo: 0, | |
item: "li", | |
button: { | |
next: ".nextBtn", | |
prev: ".prevBtn" | |
} |
NewerOlder