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
+ let previousTransactions = localStorage.previousTransactions ? JSON.parse(localStorage.previousTransactions) : [], | |
+ amountByCount = previousTransactions.reduce(function(memo, transaction) { | |
+ var current = memo[transaction.value]; | |
+ if (!current) { | |
+ current = { | |
+ value: transaction.amount, | |
+ currencyCode: transaction.currencyCode, | |
+ currencySymbol: transaction.currencySymbol, | |
+ count: 0 | |
+ }; |
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(e){function t(e,n,i,r,o,a){i>a.largestDepth&&(a.largestDepth=i);var l,d,c={children:[],childElementCount:e.childElementCount,attributes:{},depth:i,end:o,start:r,tagName:e.tagName,parentNode:n,__nodeRef:e.__nodeRef||e},u=e.attributes;if(u instanceof NamedNodeMap){l=u.length||0;for(var s=0;l>s;s++)d=u[s],c.attributes[d.name]=d.value}else c.attributes=e.attributes;e.id&&(c.id=e.id,a.ids[e.id]=c),m[e.tagName]&&m[e.tagName](c,e,a);for(var h,f,p=i+1,g=e.childElementCount,b=(o-r)/g,s=0;g>s;s++)f=r+s*b,h=t(e.children[s],c,p,f,f+b,a),c.children.push(h);return c}function n(e,n,i){var r={body:null,head:null,documentElement:null,ids:{},links:[],images:[],scripts:[],forms:[],largestDepth:0},o=t(e,null,0,n,i,r),a=Object.assign({},o,r);return a}function i(e,t,n){var r=t.tagName,o=t.start+(t.end-t.start)/2,a=t.depth*n+20;t.children.forEach(function(t){var r=t.start+(t.end-t.start)/2,l=t.depth*n+20;e.beginPath(),e.moveTo(o,a),e.lineTo(r,l),e.stroke(),e.closePath(),i(e,t,n)}),e.beginPath(),e.fillStyle=p[r]?p[r]:p.def |
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 fibo(n) { | |
if (n <= 1) return n; | |
return fibo(n-1) + fibo(n-2); | |
} | |
function tailFibo(n, tail) { | |
if (n <= 1) return n; | |
if (tail[n]) return tail[n]; | |
tail[n] = tailFibo(n-1, tail) + tailFibo(n-2, tail); |
OlderNewer