Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Sean Pars
@SeanPars
Can somebody help me with a section from eloquent js
korzo
@korzo
@SeanPars Post your problem
Sean Pars
@SeanPars
f u n c t i o n r o w H e i g h t s ( rows ) {
r e t u r n rows . map ( f u n c t i o n ( row ) {
r e t u r n row . r e d u c e ( f u n c t i o n ( max , cell ) {
r e t u r n Math . max ( max , cell . m i n H e i g h t () ) ;
} , 0) ;
}) ;
}
f u n c t i o n c o l W i d t h s ( rows ) {
r e t u r n rows [0]. map ( f u n c t i o n (_ , i ) {
r e t u r n rows . r e d u c e ( f u n c t i o n ( max , row ) {
r e t u r n Math . max ( max , row [ i ]. m i n W i d t h () ) ;
} , 0) ;
}) ;
}
function rowHeights(rows) {
  return rows.map(function(row) {
    return row.reduce(function(map,cell) {
      return Math.max(max, cell.minHeight());
  }, 0);
});
}

function colWidths(rows) {
  return rows[0].map(function(_, i) {
    return rows.reduce(function(max, row) {
    return Math.max(max, row[i].minWidth());
  }, 0);
});
}
what's happening here
korzo
@korzo
@SeanPars it iterate over array rows (row.map() )
and reduce every element (I suppose it's array of arrays ) to maximal value of elements minHeight
Moisés Man
@moigithub
on first function reduce param probably the parameter name should be max instead of map
Maria Theresa Arruda
@arrudamt
please, someone tell me why the menu is not working =/
https://codepen.io/arrudamt/pen/wgVYxv?editors=1100
korzo
@korzo
@arrudamt Because logo is over menu button
Maria Theresa Arruda
@arrudamt
@korzo how can i fix it?
korzo
@korzo
@arrudamt In css on line 122 you have width 100%
Sean Pars
@SeanPars
@korzo can u explain the paramters in the .reduce()
u r right it's an array of arrays tht's being passed in
korzo
@korzo
@SeanPars First parameter is accumulator.
It's value returned from previous itteration
Maria Theresa Arruda
@arrudamt
@korzo i took it off and it didnt work
korzo
@korzo
Except for first iteration.
Then is accumulator either value passed as parameter or first element of array
@SeanPars second parameter is current element
Adel
@AdelMahjoub
@arrudamt how it is not working, I tried and it is working, what is the expected behavior
korzo
@korzo
@AdelMahjoub You can't click menu button
Adel
@AdelMahjoub
ah the hamburger icon ?
Maria Theresa Arruda
@arrudamt
@AdelMahjoub , the content doesnt hide
https://codepen.io/arrudamt/pen/wgVYxv?editors=1100
Adel
@AdelMahjoub
@arrudamt hang on :ambulance:
Adel
@AdelMahjoub
cool
@arrudamt , check @piteto link
Moisés Man
@moigithub
lot easier for me when doing bootstrap menu.. is copy/paste then modify, cuz for sure u will start with a working menu
ie.. dont have 2 nav tags... or missing class names
korzo
@korzo
@arrudamt Also you have display: block on line 130
piteto
@piteto
There are still some HTML issues, but the navbar seems sorted now - had to revert back to bootstrap defaults. Not entirely sure what "fixed" it
Adel
@AdelMahjoub
yes, I copy paste and modify it too
CallMeOrange
@EgnaroDev
:walking:
Adel
@AdelMahjoub
so it will work for sure lol
or bootstrap 3 code snippets
CallMeOrange
@EgnaroDev
about @EgnaroDev
piteto
@piteto
yeah, no one is going to memorize all of that :p
CamperBot
@camperbot
:cookie: 552 | @egnarodev |http://www.freecodecamp.com/egnarodev
Maria Theresa Arruda
@arrudamt
@AdelMahjoub @korzo @piteto thank you guys sooooo much!!!
CamperBot
@camperbot
arrudamt sends brownie points to @adelmahjoub and @korzo and @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 173 | @piteto |http://www.freecodecamp.com/piteto
:cookie: 577 | @adelmahjoub |http://www.freecodecamp.com/adelmahjoub
:cookie: 563 | @korzo |http://www.freecodecamp.com/korzo
Maria Theresa Arruda
@arrudamt
@piteto your code look such much more cleaner than mine! i'll take a time to "study" it and learn a bit =) thanks a lot again
CamperBot
@camperbot
arrudamt sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
api offline
piteto
@piteto
@arrudamt There is a menu in the upper, right-hand corner in codepen that will tidy your code.
It's all thanks to codepen
CallMeOrange
@EgnaroDev
Yeah lol
Useful
Wish repl.it have that thing
:/