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
$boxes = $(view).find(".about-content"); | |
maxHeight = Math.max.apply( | |
Math, $boxes.map(function() { | |
return $(this).height(); | |
}).get()); | |
$boxes.height(maxHeight); |
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
/// <summary> | |
/// Address | |
/// For this Domain-Model, the Address is a Value-Object | |
/// </summary> | |
public class Address | |
{ | |
/// For this Domain-Model, the Address is a Value-Object | |
/// 'sets' are private as Value-Objects must be immutable, | |
/// so the only way to set properties is using the constructor |
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
$(".nav-collapse .nav li a").on("click", function() { $(".nav-collapse").collapse("hide"); }); |
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
$element = $("<div><p>Hola</p></div><div><p>Hola</p></div><div><p>Hola</p></div>"); | |
$('<div>').append($element.clone()).html(); |
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 static IQueryable<T> IncludeMultiple<T>(this IQueryable<T> query, params Expression<Func<T, object>>[] includes) | |
where T : class | |
{ | |
if (includes != null) | |
{ | |
query = includes.Aggregate(query, | |
(current, include) => current.Include(include)); | |
} | |
return query; |
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(MyApp) { | |
// private vars and methods | |
var myprivatevar = true | |
_myprivatemethod = function() {}; | |
// public methods | |
MyApp.mypublicmethod = _myprivatemethod(); | |
})(window.MyApp = window.MyApp || { }); |
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
//Prototype | |
function Cuenta(numerocuenta, saldo) { | |
this.numerocuenta = numerocuenta; | |
this.saldo = saldo; | |
}; | |
var Contabilidad = function(cuentas) { | |
//Propiedades públicas | |
this.Cuentas = cuentas || new Array(); |
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
//Modulo | |
function Cuenta(numerocuenta, saldo) { | |
this.numerocuenta = numerocuenta; | |
this.saldo = saldo; | |
}; | |
var Contabilidad = function () { | |
var _cuentas, | |
_saldototal, |
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
//Modulo multi | |
function Cuenta(numerocuenta, saldo) { | |
this.numerocuenta = numerocuenta; | |
this.saldo = saldo; | |
}; | |
var Contabilidad = function () { | |
var _cuentas, | |
_saldototal, |
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.serializeObject=function() { | |
var json = {}; | |
jQuery.map($(this).serializeArray(), function(n, i){ | |
json[n['name']] = n['value']; | |
}); | |
return json; | |
}; | |
})( jQuery ); |