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
Rico042002
@rico042002
Tyler Moeller
@TylerMoeller
It's working for me. City, conditions, and temperature are accurate. Celsius/Fahrenheit conversion works too. Background images aren't working though because you're using imgur and they block requests from codepen.
Rico042002
@rico042002
I have been wondering why my images do not work! What is a better image hosting site?
Tyler Moeller
@TylerMoeller
Lots of people here use https://postimage.org
Also, I'm sure you also know this, but your app won't work over HTTPS (https://s.codepen.io/rico042002/pen/KamaxJ) unless you use a different location + weather API
xemexpress
@xemexpress
Hi! I am doing the personal portfolio webpage. The instruction said Bootstrap can handle all the effects shown in the demo. But I did search the Bootstrap but can't see any that can provide the animation and transition effects. Do I miss something there?
Tyler Moeller
@TylerMoeller
@xemexpress You're right, bootstrap can't do hover effects and the smooth scroll effect you get when clicking on links in the navbar. That will require some custom CSS and JavaScript. You can always implement those effects later after you go through the rest of the challenges.
Rico042002
@rico042002
@TylerMoeller My https is turned off I do not know why it would auto encrypt
Tyler Moeller
@TylerMoeller
@rico042002 Just letting you know in case someone visits your web app over HTTPS. If you want to deploy it to github, it will be HTTPS by default.
Rico042002
@rico042002
So how can I fix it? By hosting it from github?
xemexpress
@xemexpress
@TylerMoeller awesome. Simple scroll effect (I mean the transition to other sections when clicking the navbar) is still achievable in this stage? If so, how to make that??
Tyler Moeller
@TylerMoeller
@rico042002 You'll have to use a different location and weather API. The ones you have chosen only support HTTP.
@xemexpress It will require JavaScript - you might want to go through more JavaScript challenges before researching how to implement it in your portfolio (unless you're already comfortable with writing JavaScript)
xemexpress
@xemexpress
@TylerMoeller Thanks!!
CamperBot
@camperbot
:star2: 1368 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
xemexpress sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
CoryCMyers
@CoryCMyers

Since the Java help channel is pretty much dead would someone be willing to help me out?
If someone could confirm or deny my understanding of this I would be incredibly grateful.

function largestOfFour(mainArray) {
  return mainArray.map(function (subArray){
    return subArray.reduce(function (previousLargestNumber, currentLargestNumber) {
      return (currentLargestNumber > previousLargestNumber) ? currentLargestNumber : previousLargestNumber;
    }, 0);
  });
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

There are a couple methods in there I partially understand and wish to confirm. So the Map method takes the targeted Array or Subs and combines them into one main Array, and allows it to then be targeted with a function and named within that function as sub-array. Reduce says that all of the following function will be aimed at taking multiple numbers, and taking them down to one, then the function is a new way of writing an if/else statement?

Tyler Moeller
@TylerMoeller
@CoryCMyers .map() loops through the array, which returns each subarray. .reduce() then evaluates each element in the subarrays returned. Maybe an easier way to see what's going on is to add some console logging:
function largestOfFour(mainArray) {
  return mainArray.map(function (subArray) {
    console.log('map method returned: ', subArray);
    return subArray.reduce(function (previousLargestNumber, currentLargestNumber) {
      console.log('reduce method returned: ', previousLargestNumber, currentLargestNumber);
      return (currentLargestNumber > previousLargestNumber) ? currentLargestNumber : previousLargestNumber;
    }, 0);
  });
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
CoryCMyers
@CoryCMyers
Thank you @TylerMoeller Do you know of any good sites to spend time studying to learn more about Methods and Regular expressions? I find lists here and there but they do not seem to have much information on them.
CamperBot
@camperbot
corycmyers sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1369 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Ken Haduch
@khaduch
@TylerMoeller @CoryCMyers - I came up with a really good one-liner for this one today - well, someone was using ES6 arrow functions and after a couple tries, a really nice function that basically does it in one line.
Tyler Moeller
@TylerMoeller
@CoryCMyers Personally, I just went through every method on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
The example you gave uses Higher Order Functions, or FOLD: https://en.wikipedia.org/wiki/Fold_(higher-order_function)
@khaduch I've seen a short one, like the last one mentioned here: https://forum.freecodecamp.com/t/freecodecamp-algorithm-challenge-guide-return-largest-numbers-in-arrays/16042
What's the ES6 one you came up with look like?
Ken Haduch
@khaduch
@TylerMoeller - this is the basic part of it: var boo = myArray.map( subA => Math.max(...subA) ) - you'd have to put that in a function.
Tyler Moeller
@TylerMoeller
Very nice, @khaduch :)
Ken Haduch
@khaduch
@TylerMoeller - I'm just learning ES6 in conjunction with more functional programming. Neat stuff that takes a while to get your head wrapped around, and there is a lot to learn...
CoryCMyers
@CoryCMyers
@khaduch Can yo ushare the code for the one liner please?
Tyler Moeller
@TylerMoeller
@khaduch I need to do more focused learning on ES6, just have been picking it up here and there. Got the Algorithm Design Manual last week and it's been some heavy reading lol :) https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1848000693/ref=sr_1_1?s=books&ie=UTF8&qid=1485132888&sr=1-1&keywords=the+algorithm+design+manual
CoryCMyers
@CoryCMyers
Is the best way to work through and learn just keep the method list on hand and go back to re-read through them for each new problem?
I have been using https://medium.freecodecamp.com/three-ways-to-return-largest-numbers-in-arrays-in-javascript-5d977baa80a1#.dwowf5n9u these pretty heavily. I will sit down and work out an idea I have of how to solve it, then compare to the ideas and methods given there.
And try to re-read the explanations on how things work there to get my head around it, with http://pythontutor.com/live.html#mode=edit for help with visualization. I am a primarily auditory learner though, so talking through it seems to help the most even with typing it out in a conversation.
CoryCMyers
@CoryCMyers
@TylerMoeller When you say you read through the list there, do you mean every entry adn sub entry?
Ken Haduch
@khaduch
@CoryCMyers - it's up there :point_up: January 22, 2017 7:47 PM
CoryCMyers
@CoryCMyers
Yeah I have it open, just not finding a section jsut on methods.
Sunny Wong
@swong194
hi every1 im working on my portfolio
im trying to get my nav bar to stick to the top after I scroll a certain point
Tyler Moeller
@TylerMoeller
@CoryCMyers Yeah, I looked at it like a manual. I'm also kind of auditory though, so I went to meetups regularly to talk about questions with people in person.
Sunny Wong
@swong194
I know my css works because ive added it onto the ul
jacobus-brogly
@jacobus-brogly
my first webgl ))
Tyler Moeller
@TylerMoeller
@swong194 I can help you figure this out unless you just want the code :) First hint: add jQuery to your project
Second hint: Make sure you use a # in front of IDs in jQuery
Third hint: You are only checking the scroll height when the document is loaded, you'll need to check every time the user scrolls with $(window).scroll(function() {});
Sunny Wong
@swong194
@TylerMoeller THANK YOU SO MUCH!
CamperBot
@camperbot
swong194 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1370 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
@swong194 Looks great!
Sunny Wong
@swong194
i just have a question....$(document).scrollTop() tells me how much of my document I have scrolled right?