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
CamperBot
@camperbot
:cookie: 239 | @candlefish |http://www.freecodecamp.com/candlefish
Paul
@candlefish
@johnmeredith95 I ran into the same problem and agree with you that Bootstrap should resize images to fit columns by default.
Hamza Saleemi
@Azmah21
hey guys!
@Azmah21
could someone help me with adding an HTML5, CSS3 and Jquery logo to my portfolio page?
https://codepen.io/Azmah21/pen/gRbQrX
I'm trying to add it in the languages I know section
Nikki L.R.
@nikkilr88
Could anyone help me with React? I am working on the Recipe Box project, and I can't figure out how to take array items from state and output them as list items.
Roxroy
@roxroy
@nikkilr88 , the map function would be useful in this case for example,
{props.recipe.ingredients.map(ingredient =>
<li key={id++}>{ingredient}</li>
)}
Nikki L.R.
@nikkilr88
@roxroy Ah, you messaged me here too. So, like I said... I'm not doing this in render, so I'm not sure what to do.
I have a for loop and when I console.log it, everything looks fine, but it shows up as "[object HTMLUListElement]"
Roxroy
@roxroy
@nikkilr88 , let me see the code, what is the link?
Ashley Owens
@yelhsa
@Azmah21 that looks amazing!
Nikki L.R.
@nikkilr88
@roxroy I think I got it, but it seems kind of messy... Haha. One sec
Hamza Saleemi
@Azmah21
@yelhsa thanks
Roxroy
@roxroy
@nikkilr88 , Although it works, you should create a separate component to render the ingredients, instead of directly handling and manipulating the DOM
 var ul = document.createElement("ul");
    for (var i = 0; i < this.state.ingredientsArr.length; i++ ) {
        var li = document.createElement("li");
        li.innerHTML = this.state.ingredientsArr[i];
        ul.appendChild(li);    }
Nikki L.R.
@nikkilr88
@roxroy I'm still pretty new at this... slowly figuring things out. I don't know how to do that and have it repeat over for each recipe.
Can I render an instance of a component with an onClick function?
Riley
@Riley1435
My temperature convert button isn't working and i am have trouble sourcing the problem.
Andrew Hickman
@ahickman3
how would i access one of the quotes? cant seem to figure that out
should be a simple solution i assume
Roxroy
@roxroy

@nikkilr88 , in your RecipeBox, pass the recipe as a prop , then loop over the li to print the ingredients. Eg {props.recipe.ingredients.map(ingredient =>

<li key={id++}>{ingredient}</li>
)}

Paul
@candlefish
@Geek-Killer I'm not exactly sure what you want, but here's some suggestions for your FreeCodeCamp codepen project. You should take out all the <br> tags in your paragraphs. If you use good CSS, everything will wrap nicely. Try using text-align: justify in your CSS for the p tag. Immediately after your jumbotron closing div, add a <div class="container"> and put the closing </div> at the very end of your html. In your CSS, give the container class a max-width of something like 800px. This will be nice for readability. Also, by default, the Bootstrap container class will put a small margin on the left and right of everything so your text and images don't go all the way to the edges of the screen. Hope this helps a little.
Moisés Man
@moigithub
quotes is an array...of objects
using the object name + the key property.. u access the values... @fullmetal7777
Roxroy
@roxroy
@Riley1435 , you should use just 1 $(document).ready for the page. Remove the one from $("#weatherGrab")
Andrew Hickman
@ahickman3
@moigithub havnt done much with objects, so if something doesnt look right, its probably because im only slightly sure of what im doing lol
Nikki L.R.
@nikkilr88
@roxroy Yeah, I know how to use map and render li elements. I don't understand how to make this repeat whenever the user adds a new recipe. I don't know if I am explaining myself well enough. Sorry.
Andrew Hickman
@ahickman3
@moigithub bascially, need to access each name individually, and each name will have multiple quotes. So itl be a random number, and thatl determine the name. Then another random number determining qhich quote is picked
Moisés Man
@moigithub
to access arrays elements.. u use brackets and some number/index
arr[0] will access the first element.. on ur quotes case.. this is an object with a single property named "mario"
@fullmetal7777
once u have the object.. using this property u can access its value (which is an array of strings)
teevik
@teevik
The render() method gets run every time state is changed @nikkilr88
Andrew Hickman
@ahickman3
i can get the name + the quotes, its getting a specific quote for the name that i cant do. Ive done quotes[1].1, quoted[1][1], etc and notta
Roxroy
@roxroy
@Riley1435 , also, the document-ready function is not being used correctly, refer to https://learn.jquery.com/using-jquery-core/document-ready/. Use just one for the page and embed the functions within it.
Riley
@Riley1435
@roxroy okay, anything else you notice?
Nikki L.R.
@nikkilr88
@teevik I got that... This project just isn't clicking, though. I really don't know how to explain it.
Andrew Hickman
@ahickman3
@moigithub mind typing out how i would exactly? still not sure what you mean
Nikki L.R.
@nikkilr88
Do I have to set up localStorage first?
Moisés Man
@moigithub
@fullmetal7777 to access ARRAYS u use brackets and some index
to access OBJECTS u use the object name + the key/property using dot or bracket notation
arrays is one thing.. object is another thing
arrays are identified by [] :point_left: squaare brackets
objects are identified by { } :point_left: curly brackets
Andrew Hickman
@ahickman3
@moigithub so, im able to access the object that i want.
teevik
@teevik
@nikkilr88 If you want it to change when the user adds a new recipe, you can just update state with all the recipes as the user inputs them, and the render method will be automatically run if needed
Andrew Hickman
@ahickman3
@moigithub so basically ive created a object that contained an array of objects, which each object containing an array or quotes right?
array of quotes*
Nikki L.R.
@nikkilr88
It's just not clicking... I know it re-renders when the state changes, but I don't get how to have the previously added recipe to remain in the RecipeBox after re-rendering.
Moisés Man
@moigithub
@fullmetal7777 u created this
quotes = [ ... ] <-- see squares there ? thats an array
this quotes contains {}
like this quotes = [ {...}, {...} ] <-- objects inside the array
soo to access objects values.. FIRST u need to get the array element (which is an object)
THEN once u have the object.. u can access its values
Andrew Hickman
@ahickman3
@moigithub im pretty familiar with te basics of programming, i use c a bunch in my major, but objects is the only thing that is somewhat new to me
@moigithub i took a java class, but its been like 2 years lol
teevik
@teevik
@nikkilr88 When you update the props of something, it also re renders
Roxroy
@roxroy
@Riley1435 , $("#weatherGrab").on("click", its not being called. But it should work after addressing the document ready issue.
Riley
@Riley1435
i deleted the $(document).ready() before the function