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
// String.IsNullOrEmpty implementation | |
String.IsNullOrEmpty = function(value){ | |
if(value){ | |
if( typeof( value ) == 'string' ){ | |
if( value.length > 0 ) | |
return false; | |
} | |
if( value != null ) | |
return false; | |
} |
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
// string.StartWith implementation | |
String.prototype.StartsWith = function(prefix,ignoreCase) { | |
if( !prefix ) return false; | |
if( prefix.length > this.length ) return false; | |
if( ignoreCase ) { | |
if( ignoreCase == true ) { | |
return (this.substr(0, prefix.length).toUpperCase() == prefix.toUpperCase()); | |
} | |
} |
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
// Utility Sort functions - useful for sorting lists | |
// accending sort | |
function asc_sort(a, b) { | |
return ($(b).text()) < ($(a).text()) ? 1 : -1; | |
} | |
// decending sort | |
function dec_sort(a, b) { | |
return ($(b).text()) > ($(a).text()) ? 1 : -1; |
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
if (/*@cc_on!@*/false && document.documentMode === 10) { | |
document.documentElement.className+=' ie10'; | |
} |
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 class ErrorController : Controller | |
{ | |
// GET: Error | |
public ActionResult Index() | |
{ | |
//Deal with aspxerrorpath | |
if (!string.IsNullOrEmpty(Request.QueryString["aspxerrorpath"])) | |
{ | |
return RedirectToAction("Index"); | |
} |
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
// Copyright John Leitch 2010 [email protected] | |
var destination = null; | |
var useClone = false; | |
var cloneSource = null; | |
var cloneDelay = 1000; | |
function hookInputs() { | |
var frame = document.getElementById('overlayFrame'); | |
var keyPressScript = |
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
/* Compiled CSS (with default Foundation breakpoints) - http://stackoverflow.com/questions/30310667/no-right-floating-for-small-state-in-foundation-framework/30319607#30319607 */ | |
@media only screen and (max-width: 40em) { | |
.small-only-right { | |
float: right !important; | |
} | |
} | |
@media only screen { | |
.small-right { | |
float: right !important; |
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
using System; | |
namespace CSharpVitamins | |
{ | |
/// <summary> | |
/// Represents a globally unique identifier (GUID) with a | |
/// shorter string value. Sguid | |
/// </summary> | |
public struct ShortGuid | |
{ |
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
//kendo validation is required for validation of kendo controls to work properly. | |
$("form").kendoValidator({ | |
errorTemplate: "", //remove the additions kendo places to the right of each field. | |
validate: function (e) { | |
//Bizarrely, Kendo dropdowns require special attention. | |
//Span with k-dropdown are kendo dropdown controls. They contain an input, which is used to store the value, | |
//and another span (which has .k-input-wrap) that controls the actual presentation. | |
// | |
//The problem is that k-invalid is placed on the input, which isn't even visible. So, we have to |
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
Submitted on 2012/06/19 at 12:32 am | |
Hello, just wanted to mention, I enjoyed this blog post. It was practical. Keep on posting! | |
What’s up, I just wanted to mention, you’re wrong. Your point doesn’t make any sense. | |
Hello, how’s it going? Just shared this post with a colleague, we had a good laugh. | |
Incredible points. Great arguments. Keep up the amazing effort. | |
This text is worth everyone’s attention. Where can I find out more? |