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
body { | |
text-align: justify; | |
} | |
code, pre { | |
font-family: "DejaVuSansMono", monospace; | |
} | |
h1, h2, h3, h4, h5, h6 { | |
text-align: left; |
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
/* AngularJS string.Format filter | |
* | |
* This filter provides string variable replacement similar to C# string.Format("{0}", "something"); | |
* | |
* Usage: {{ "From model: {0}; and a constant: {1};" | format:model.property:"constant":...:... }} | |
*/ | |
(function (angular) { | |
angular |
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
/* Based on | |
* - EGM Mathematical Finance class by Enrique Garcia M. <[email protected]> | |
* - A Guide to the PMT, FV, IPMT and PPMT Functions by Kevin (aka MWVisa1) | |
*/ | |
var ExcelFormulas = { | |
PVIF: function(rate, nper) { | |
return Math.pow(1 + rate, nper); | |
}, |
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
String.prototype.removeAccents = function(){ | |
var t = this, | |
a = { | |
'œ' : 'oe', | |
'Œ' : 'Oe', | |
'æ' : 'ae', | |
'Æ' : 'Ae', | |
'[ÀÁÂÃÄÅĀĂǍẠẢẤẦẨẪẬẮẰẲẴẶǺĄ]' : 'A', | |
'[àáâãäåāăǎạảấầẩẫậắằẳẵặǻą]' : 'a', | |
'[ÇĆĈĊČ]' : 'C', |
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
function getElementsByAttribute(tag, name, value) { | |
var elements = (tag == "*" && document.all) ? document.all : document.getElementsByTagName(tag), | |
matches = [], | |
re = (typeof name !== "undefined") ? new RegExp("(^|\\s)" + value + "(\\s|$)", "i") : null, | |
current, | |
attribute; | |
for (var i = 0; i < elements.length; i++) { | |
current = elements[i]; | |
attribute = current.getAttribute && current.getAttribute(name); |