These are chat archives for FreeCodeCamp/Help

28th
Nov 2015
apekearo
@apekearo
Nov 28 2015 00:00
return val % val>=5; ?
Blauelf
@Blauelf
Nov 28 2015 00:00
return val<=5;
That modulo operator was just there to get the even values, that's a completely unrelated question.
apekearo
@apekearo
Nov 28 2015 00:02
var newArray = oldArray.filter(fuction(val) {
return val <=5;}); am i missing something?
I got it
its weird with that % being in the example, but they don't explain it.
Fennek
@fennekbe
Nov 28 2015 00:08

Guys, I want to put a text on my homepage 'Quality Full-Stack Webdevelopment & Design'

https://www.qbyte.be/#home

Anyone has any idea of how I could to that? I've tried some things but they all look odd, not good.

Julie Myers
@BlueOceanView
Nov 28 2015 00:09
@fennekbe ummm...could you clarify some? Right now I'm thinking open the .html file....
Blauelf
@Blauelf
Nov 28 2015 00:09
@apekearo doing %2 and comparing to either 0 or 1 is a common way of checking for even or odd numbers.
Fennek
@fennekbe
Nov 28 2015 00:10
@BlueOceanView oh, eh.. I'm not talking about the code. Just pure design. How would you add text to this page? It's either unreadable or looking goofy
Julie Myers
@BlueOceanView
Nov 28 2015 00:10
@fennekbe Oh, you want design advice? Like where should you put the text so it looks good?
Fennek
@fennekbe
Nov 28 2015 00:10
Yeah @BlueOceanView
Julie Myers
@BlueOceanView
Nov 28 2015 00:11
I wish more then anything that I had good design skills. :)
Fennek
@fennekbe
Nov 28 2015 00:11
Haha don't we all
CompGeekGirl
@LisaRamos
Nov 28 2015 00:11

while(i < 4) {
ourArray.push(i);
i++;
}

The instructions on the JS exercise 33 say this:

-You should be using a while loop for this.
-myArray should equal [0,1,2,3,4].

Is there anything I'm doing wrong here. How can I fix this problem?

Fennek
@fennekbe
Nov 28 2015 00:11
@BlueOceanView You like how I made the nav bar?
Julie Myers
@BlueOceanView
Nov 28 2015 00:12
@fennekbe the nav bar is kind of cool.
Fennek
@fennekbe
Nov 28 2015 00:12
Kind of? :D
Julie Myers
@BlueOceanView
Nov 28 2015 00:12
@LisaRamos What results are you getting?
Fennek
@fennekbe
Nov 28 2015 00:13
@lisa try <= instead of <
Julie Myers
@BlueOceanView
Nov 28 2015 00:14
@fennekbe I have no design skills, but I do have a pretty good eye for design. It's missing something or maybe the bear is out of proportion to the rest of it...something like that.
Fennek
@fennekbe
Nov 28 2015 00:14
And make sure you say i = 0 just before the while loop
@BlueOceanView It used to have a gap underneat, you think it will look better? Wait
CompGeekGirl
@LisaRamos
Nov 28 2015 00:15
@BlueOceanView I'm getting a "Program Execution Failure" message.
Fennek
@fennekbe
Nov 28 2015 00:15
@BlueOceanView Reload the page and check again
Julie Myers
@BlueOceanView
Nov 28 2015 00:15
@fennekbe I have no idea. :P There are a few people on FCC with design skills. It may help to ask that question in the main chat room.
Fennek
@fennekbe
Nov 28 2015 00:15
heh, will do
@LisaRamos If you're getting that error, we will need some more of your code
CompGeekGirl
@LisaRamos
Nov 28 2015 00:16

@fennekbe Here's my code.

var myArray = [];

// Only change code below this line.

while(i < 4) {
ourArray.push(i);
i++;
}

// Only change code above this line.

if(typeof(myArray) !== "undefined"){(function(){return myArray;})();}

Manish Giri
@Manish-Giri
Nov 28 2015 00:17
@LisaRamos while(i<=4)
and var i = 0 before the while
Fennek
@fennekbe
Nov 28 2015 00:17
i is undefined
@LisaRamos Basicly the program doesn't know where to store I, so you need to tell it where to store it with var
@LisaRamos Likewise if you use a for loop, however in a for loop you usually do this inside the condition eg for(var i = 0; i < 10; i++)
CompGeekGirl
@LisaRamos
Nov 28 2015 00:19

I got it fixed and here's what I did:

var myArray = [];

// Only change code below this line.

var i = 0;

while(i < 5) {
myArray.push(i);
i++;
}

// Only change code above this line.

if(typeof(myArray) !== "undefined"){(function(){return myArray;})();}

I kinda misunderstood the exercise.

thanks
Fennek
@fennekbe
Nov 28 2015 00:20
@LisaRamos no problem
Arash D
@ArashDai
Nov 28 2015 00:27
hey is anyone here comfortable with React
Matthew
@matthewmullins
Nov 28 2015 00:28

can some one help me change the h2 element to red and also have the class .red-text<style>

.red-text {

color: red;

}

</style>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<style>

.red-text {

color: red;

}

</style>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

Manish Giri
@Manish-Giri
Nov 28 2015 00:28
@matthewmullins <h2 class="red-text">...</h2>
Matthew
@matthewmullins
Nov 28 2015 00:28
i cannot do inline..
Manish Giri
@Manish-Giri
Nov 28 2015 00:29
you've defined the style rule for the class red-text, now you have to put the class in the <h2> element
@matthewmullins that is not inline style
Matthew
@matthewmullins
Nov 28 2015 00:30
oh ok
i see now!
Mason
@reivax49
Nov 28 2015 00:30
Hey guys! I'm on a resize your image waypoint and I can't figure out how to apply a css class to the cat image
Julie Myers
@BlueOceanView
Nov 28 2015 00:30
@matthewmullins In order for CSS to style an element it needs to target it somehow. By putting <h2 class="red-text"> says to CSS, "Hey! I want you to style me using the red-text class."
Matthew
@matthewmullins
Nov 28 2015 00:31
makes so much sense now
!
Mason
@reivax49
Nov 28 2015 00:31
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }
  .smaller-image {width: 100px;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img src="https://bit.ly/fcc-relaxing-cat"
CompGeekGirl
@LisaRamos
Nov 28 2015 00:32

var flip = Math.floor(Math.random() * (1 - 0 + 1)) + 0;

function myFunction() {

// Only change code below this line.

if (0 === 1) {
return heads;
} else {
return tails;
}

// Only change code above this line.

}

var result = myFunction();if(typeof(flip) !== "undefined" && typeof(flip) === "number" && typeof(result) !== "undefined" && typeof(result) === "string"){(function(y,z){return 'flip = ' + y.toString() + ', text = ' + z;})(flip, result);}

The instructions on JS exercise 37 say:

-Create a new if statement.
-Created a new else statement.
-myFunction should either return heads or tails.
-myFunction should return heads when flip equals 0 and tails when flip equals 1

I don't understand what I'm doing here and I get this "tails is not defined" message. Is there any way to solve this?

Julie Myers
@BlueOceanView
Nov 28 2015 00:32
@reivax49
<img class="className" src="https://bit.ly/fcc-relaxing-cat">
DJ
@qualitymanifest
Nov 28 2015 00:33
@LisaRamos heads and tails are strings so need to be contained in quotation marks
@LisaRamos also you need to fix your if statement to be comparing flip to something since that is what contains the math.
Julie Myers
@BlueOceanView
Nov 28 2015 00:33
@reivax49 To apply styling to any HTML element you either add the class attribute or the id attribute.
CompGeekGirl
@LisaRamos
Nov 28 2015 00:34
@qualitymanifest I get it. I misread everything on the exercise. Thanks
CamperBot
@camperbot
Nov 28 2015 00:34
lisaramos sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 464 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Mason
@reivax49
Nov 28 2015 00:36
@BlueOceanView that makes much more sense than what I was initially trying to do. thank you!
CamperBot
@camperbot
Nov 28 2015 00:36
reivax49 sends brownie points to @blueoceanview :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for blueoceanview
Julie Myers
@BlueOceanView
Nov 28 2015 00:38
@reivax49 you're welcome.
cabrala
@cabrala
Nov 28 2015 00:44
i need help guys! im trying to comment out p element s that it is not visible on my page? it wont respond to my answer though
if anyone can help a fellow coder out :)
Julie Myers
@BlueOceanView
Nov 28 2015 00:45
@cabrala which waypoint are you doing? Or is this your own coding?
cabrala
@cabrala
Nov 28 2015 00:45
im doing comment out HTML
no, not my own coding.
Jordan Bourne
@JordanBourne
Nov 28 2015 00:45
npm dist-tag add <pkg>@<version> [<tag>] what am I supposed to put in place of <pkg> ?
Julie Myers
@BlueOceanView
Nov 28 2015 00:46
@cabrala could you give the url to the waypoint?
Julie Myers
@BlueOceanView
Nov 28 2015 00:47
@cabrala If it makes you feel any better, I had to read the instructions 3 times over before I understood what they wanted with the code.
@cabrala Basically, they want you to finish the comment coding.
cabrala
@cabrala
Nov 28 2015 00:48
lol this is my first day ever learning code, its a bit overwhelming.
Julie Myers
@BlueOceanView
Nov 28 2015 00:48
You create an HTML comment like this:
<!-- I am commented out.  -->
@cabrala Ahhh...you will want to learn coding from other places as well. this place only teaches you so much, which is true with most resources. Do a google search for free html and css tutorials.
cabrala
@cabrala
Nov 28 2015 00:50
oh wow, sometimes the answer is right in front of you! thanks so much @BlueOceanView
CamperBot
@camperbot
Nov 28 2015 00:50
cabrala sends brownie points to @blueoceanview :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for blueoceanview
Julie Myers
@BlueOceanView
Nov 28 2015 00:50
@cabrala you're welcome
Andrea Pickens
@andpickens
Nov 28 2015 00:52
Hi! I just joined and I'm very excited. I have experience coding and I'm can't wait to learn more. I work as an email designer & website graphic designer. I'm trying to transition into a web development position. I have 2 young daughters so I'll be working on my coding after the kiddos go to bed.
Manish Giri
@Manish-Giri
Nov 28 2015 00:52
@andpickens Welcome! And good luck on the journey ahead!!
Andrea Pickens
@andpickens
Nov 28 2015 00:53
Thanks. I heard about freecodecamp on the codenewbie podcast. I can't wait to learn more.
N-Jin
@KaShinjin
Nov 28 2015 01:11
Wonder why if change width"smaller-image" to 100px, the image shrinks, but if "smaller-image" it wont shrink? haha this is fun!
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>

  .smaller-image 
  { width: 100px;}

  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

</style>

<h2 class="red-text">CatPhotoApp</h2>

<img width="smaller-image" src="https://bit.ly/fcc-relaxing-cat">
kevin barrows
@kmbgolf
Nov 28 2015 01:16

srry it didnt post correctly
Waypoint: Style Text Inputs as Form Controls
You can add the fa-paper-plane Font Awesome icon by adding <i class="fa fa-paper-plane"></i> within your submit button element.

Give your form's text input field a class of form-control. Give your form's submit button the classes btn btn-primary. Also give this button the Font Awesome icon of fa-paper-plane.

Run tests (ctrl + enter)
Reset Help Bug
Give the submit button in your form the classes btn btn-primary.
Add a <i class="fa fa-paper-plane"></i> within your submit button element.
Give the text input in your form the class form-control.
Make sure each of your i elements has a closing tag.
</div>
</div>
<input type="text"class="btn btn-primary" placeholder="cat photo URL" required>
<button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i>Submit</button>
</form>
</div>

How do I post correctly to get help?
N-Jin
@KaShinjin
Nov 28 2015 01:21
@kmbgolf on the type box click the "M↓" icon on its right, then check out the last part saying "var code" , you need to type the ['''] first, then another after your post.
CamperBot
@camperbot
Nov 28 2015 01:21
:bulb: to format code use backticks! ``` more info
N-Jin
@KaShinjin
Nov 28 2015 01:23
about my question, i got it! haha 100px is a width, but "smaller-text" is a class. missing one small thing, can really pumped us up , once we figure it
CamperBot
@camperbot
Nov 28 2015 01:23
you need to ask about @someone!
kevin barrows
@kmbgolf
Nov 28 2015 01:24
''' </div>
</div>
<input type="text"class="btn btn-primary" placeholder="cat photo URL" required>
<button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i>Submit</button>
</form>
</div>
CamperBot
@camperbot
Nov 28 2015 01:24
:bulb: to format code use backticks! ``` more info
kevin barrows
@kmbgolf
Nov 28 2015 01:24
''' </div>
</div>
<input type="text"class="btn btn-primary" placeholder="cat photo URL" required>
<button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i>Submit</button>
</form>
</div> '''
CamperBot
@camperbot
Nov 28 2015 01:24
:bulb: to format code use backticks! ``` more info
kevin barrows
@kmbgolf
Nov 28 2015 01:25
srry
N-Jin
@KaShinjin
Nov 28 2015 01:25
must skip the first line with shift+enter, then the post, then another [```] at the end, use the key beside "1" (one)
kevin barrows
@kmbgolf
Nov 28 2015 01:25
ty
''' </div> </div> <input type="text"class="btn btn-primary" placeholder="cat photo URL" required> <button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i>Submit</button> </form> </div>
CamperBot
@camperbot
Nov 28 2015 01:26
:bulb: to format code use backticks! ``` more info
kevin barrows
@kmbgolf
Nov 28 2015 01:26
oh lord
N-Jin
@KaShinjin
Nov 28 2015 01:26
almost there, just add another [```] at the end
kevin barrows
@kmbgolf
Nov 28 2015 01:26
''' </div> </div> <input type="text"class="btn btn-primary" placeholder="cat photo URL" required> <button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i>Submit</button> </form> </div>
CamperBot
@camperbot
Nov 28 2015 01:26
:bulb: to format code use backticks! ``` more info
kevin barrows
@kmbgolf
Nov 28 2015 01:27
''' </div> </div> <input type="text"class="btn btn-primary" placeholder="cat photo URL" required> <button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i>Submit</button> </form> </div>
CamperBot
@camperbot
Nov 28 2015 01:27
:bulb: to format code use backticks! ``` more info
N-Jin
@KaShinjin
Nov 28 2015 01:28
that's the apostrophe.. we need to use instead the backticks character, its different, on a keyboard, from upper left corner, below the esc key
kevin barrows
@kmbgolf
Nov 28 2015 01:28
Iput them in the end and they dont come out
''' </div> </div> <input type="text"class="btn btn-primary" placeholder="cat photo URL" required> <button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i>Submit</button> </form> </div>
CamperBot
@camperbot
Nov 28 2015 01:28
:bulb: to format code use backticks! ``` more info
N-Jin
@KaShinjin
Nov 28 2015 01:28
the same key on "~"
kevin barrows
@kmbgolf
Nov 28 2015 01:28
im using these
Alex Maday
@alexmaday
Nov 28 2015 01:28
Right under the ESC key @kmbgolf
Elliott McNary
@bighitbiker3
Nov 28 2015 01:29
@kmbgolf use the backticks next to the 1 key. Put them before and after your code
kevin barrows
@kmbgolf
Nov 28 2015 01:29
im trying...lol
Elliott McNary
@bighitbiker3
Nov 28 2015 01:29
like this
kevin barrows
@kmbgolf
Nov 28 2015 01:29
I shift enter
Elliott McNary
@bighitbiker3
Nov 28 2015 01:29
This message was deleted
This message was deleted
This message was deleted
kevin barrows
@kmbgolf
Nov 28 2015 01:30
use the back ticks under the esc key copy paste then add three more am=nd the las 3 dont show'
Alex Maday
@alexmaday
Nov 28 2015 01:30
What about this
N-Jin
@KaShinjin
Nov 28 2015 01:30
testing
Herman Fassett
@HermanFassett
Nov 28 2015 01:30
```
//shift+enter
//code here
//to send ctrl+enter
```
kevin barrows
@kmbgolf
Nov 28 2015 01:30
testing
N-Jin
@KaShinjin
Nov 28 2015 01:30
@kmbgolf are you using a physical keyboard?
Alex Maday
@alexmaday
Nov 28 2015 01:30
123
kevin barrows
@kmbgolf
Nov 28 2015 01:31
testing
yes
N-Jin
@KaShinjin
Nov 28 2015 01:31
@kmbgolf do you see the esc key on the upper left corner of it?
kevin barrows
@kmbgolf
Nov 28 2015 01:31
well im stuck on this .....Waypoint: Style Text Inputs as Form Controls
Give the text input in your form the class form-control.
testing
sometimes you just want to quit.....But I never quit..lol
I was trying to directly insert the graphic that I've seen @camperbot do before
kevin barrows
@kmbgolf
Nov 28 2015 01:36
      </div>
    </div>
    <input type="text"class="btn btn-primary" placeholder="cat photo URL" required>
    <button  type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i>Submit</button>
  </form>
</div>
yay shift enter after each one ,thank you
N-Jin
@KaShinjin
Nov 28 2015 01:38
@kmbgolf cheers! :+1:
kevin barrows
@kmbgolf
Nov 28 2015 01:39
this is what im lost on,,Give your form's text input field a class of form-control.
so class="form-control"
twomicro
@twomicro
Nov 28 2015 01:39
I just signed up-- saying hi.
iamgreig
@iamgreig
Nov 28 2015 01:40
function myFunction() {

  // Only change code below this line.

  return 0;

  // Only change code above this line.
}

(function(){return myFunction();})();
Can anyone help me on this one ?
N-Jin
@KaShinjin
Nov 28 2015 01:40
testing.. CatAppinfo
alt
DJ
@qualitymanifest
Nov 28 2015 01:40
@iamgreig what are you supposed to return
iamgreig
@iamgreig
Nov 28 2015 01:41
@qualitymanifest myFunction should return a random number
Alex Maday
@alexmaday
Nov 28 2015 01:41
Hi @twomicro
DJ
@qualitymanifest
Nov 28 2015 01:41
@iamgreig between 0 and 1?
iamgreig
@iamgreig
Nov 28 2015 01:41
@qualitymanifest I assume anything , It says "instead of 0"
DJ
@qualitymanifest
Nov 28 2015 01:42
@iamgreig post a link to this waypoint
N-Jin
@KaShinjin
Nov 28 2015 01:42
welcome @twomicro , im on day 1 of the course too, partially signed up 3 days ago though :)
twomicro
@twomicro
Nov 28 2015 01:42
thanks
twomicro
@twomicro
Nov 28 2015 01:42
anyone in here from Columbia, SC?
DJ
@qualitymanifest
Nov 28 2015 01:43
@iamgreig use the method they suggest, Math.random()
twomicro
@twomicro
Nov 28 2015 01:43
i know it's not exactly a computer science hub...
kevin barrows
@kmbgolf
Nov 28 2015 01:44
or is it <input class="form-control"
Alex Maday
@alexmaday
Nov 28 2015 01:45
@kmbgolf Yes that's it:-)
kevin barrows
@kmbgolf
Nov 28 2015 01:45
does it go on same line?
Alex Maday
@alexmaday
Nov 28 2015 01:46
BTW, elements can be part of more that one class, this input field probably doesn't need to be classed as either btn or btn-default - remove those
kevin barrows
@kmbgolf
Nov 28 2015 01:46
im very new I have been up a while doing these.I have a bit of 0.C.D.
Alex Maday
@alexmaday
Nov 28 2015 01:46
Yeah, same line.
iamgreig
@iamgreig
Nov 28 2015 01:47
@qualitymanifest sorry, I had a total brain fart and though I had to keep the return 0 in the code. Thanks !
CamperBot
@camperbot
Nov 28 2015 01:47
iamgreig sends brownie points to @qualitymanifest :sparkles: :thumbsup: :sparkles:
:star: 465 | @qualitymanifest | http://www.freecodecamp.com/qualitymanifest
Alex Maday
@alexmaday
Nov 28 2015 01:47
NP @kmbgolf
kevin barrows
@kmbgolf
Nov 28 2015 01:47
So I just replace the btn and btn-prime
Synthia Beauvais
@sbeauvais34
Nov 28 2015 01:48

Hi everyone. Why do I have to use 3 equal signs? Got this way point right but I want to know the purpose of 3 equal signs.

```

```
Alex Maday
@alexmaday
Nov 28 2015 01:48
Yeah, btn and btn-primary in this case aren't made for text inputs (though they might work, i'm guessing FCC will flag as error?)
Synthia Beauvais
@sbeauvais34
Nov 28 2015 01:49
if(flip===0)
  {
    return "heads";    
  }
  else
    {
      return "tails";
    }
Hi everyone. Why do I have to use 3 equal signs? Got this way point right but I want to know the purpose of 3 equal signs.
kevin barrows
@kmbgolf
Nov 28 2015 01:50
It says to do this also
Give the submit button in your form the classes btn btn-primary.
Alex Maday
@alexmaday
Nov 28 2015 01:51
Yes, the submit buttons will be classed with btn and btn-primary, but your input element should only be classed with form-control
kevin barrows
@kmbgolf
Nov 28 2015 01:51
Thank you very much
Alex Maday
@alexmaday
Nov 28 2015 01:52
You are more than welcome @kmbgolf , we are all here to learn
kevin barrows
@kmbgolf
Nov 28 2015 01:52
Hopefully my next question will be a little cleaner.
Manish Giri
@Manish-Giri
Nov 28 2015 01:56
@sbeauvais34 === is a stricter form of ==. If you do "1"==1 you'll get true because of coercion, but "1"===1 will return false, as this checks for both the type and the value of the variable. While value of the string 1 may be equal to the number 1, the type isn't, so === will return false.
Synthia Beauvais
@sbeauvais34
Nov 28 2015 01:57
ahhhh. Thank you for the explanation @Manish-Giri :-)
CamperBot
@camperbot
Nov 28 2015 01:57
sbeauvais34 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 238 | @manish-giri | http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Nov 28 2015 01:58
@sbeauvais34 np! all the best!
Alex Maday
@alexmaday
Nov 28 2015 01:59
Can anybody help me figure out why my array.filter() waypoint isn't passing? The instructions say I need to "Use filter to remove all elements from array that are greater than 5."
My understanding is they want the newArray to be [1,2,3,4]
Manish Giri
@Manish-Giri
Nov 28 2015 02:00
@Arekkusu44 check the function you've used as callback
Alex Maday
@alexmaday
Nov 28 2015 02:00
```
var oldArray = [1,2,3,4,5,6,7,8,9,10];

// Only change code below this line.

var newArray = oldArray.filter(function(val) {
  return val < 5;
});

// Only change code above this line.


var newArray = oldArray.filter(function(val) {
  return val < 5;
});
Don't know why my filter pasted twice lol
My result is [1,2,3,4] which is what I thought it wants?
Manish Giri
@Manish-Giri
Nov 28 2015 02:02
you have to remove all elements greater than 5, not 5 too @Arekkusu44
return val <= 5;
Alex Maday
@alexmaday
Nov 28 2015 02:03
OMG, I swear I tried that - it's like when yo take the car to the mechanic smh! Thanks very much @Manish-Giri
CamperBot
@camperbot
Nov 28 2015 02:03
arekkusu44 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 239 | @manish-giri | http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Nov 28 2015 02:04
lol, it happens!
Alex Maday
@alexmaday
Nov 28 2015 02:04
D'oh and double D'oh
lol
Isaac Calvo
@Icalvo1
Nov 28 2015 02:39
is there a way to add multiple conditions to check a single parameter/variable for a conditional statement? without having to restate the parameter/variable for ex:
if(num !== false && num !== null && num !== 0 && num !== NaN && num !== undefined){return "do this";}
if(num !== null,false,0,"",undefined,NaN){return "do this";}
i know second if statement is wrong, but I want to know if there is another way instead of adding values into an array and looping through.
Carlos E Silva
@carlosesilva
Nov 28 2015 02:43
@Icalvo1 not that I know of
Synthia Beauvais
@sbeauvais34
Nov 28 2015 02:46
I am not sure what I am missing here. Waypoint: Make Instances of Objects with a Constructor Function. The property nickname of myCar should be a string.
var Car = function() {
  this.wheels = 4;
  this.engines = 1;
  this.seats = 1;
};

// Only change code below this line.

var myCar = new Car();
Isaac Calvo
@Icalvo1
Nov 28 2015 02:47
myCar.nickname = "string";
Synthia Beauvais
@sbeauvais34
Nov 28 2015 02:49
Thank you! @Icalvo1
CamperBot
@camperbot
Nov 28 2015 02:49
sbeauvais34 sends brownie points to @icalvo1 :sparkles: :thumbsup: :sparkles:
:star: 299 | @icalvo1 | http://www.freecodecamp.com/icalvo1
Pranav Doshi
@pranavdoshi
Nov 28 2015 02:53
wassup guys good morning
Isaac Calvo
@Icalvo1
Nov 28 2015 02:58
@sbeauvais34 np
Justin Zuchowski
@jzuchowski
Nov 28 2015 02:59
@sbeauvais34 we're on the same one, glad I checked here when I did, I'll see if that works for me.
Synthia Beauvais
@sbeauvais34
Nov 28 2015 03:00
@jzuchowski Cool Beans :-) Worked for me. Taped my foredhead on that one. lol
Marko Krajina
@markuss92
Nov 28 2015 03:00
Hello, any1 got a second to see whats wrong with my code ( jquery) http://prntscr.com/97sy6t
Synthia Beauvais
@sbeauvais34
Nov 28 2015 03:01
Which way point is that @markuss92
Manish Giri
@Manish-Giri
Nov 28 2015 03:02
@markuss92 you're supposed to keep the text same
so <i>#target4</i>
you're missing the #
Marko Krajina
@markuss92
Nov 28 2015 03:03
gonna try that , chrome crashed ^^
Thanks @Manish-Giri it works
CamperBot
@camperbot
Nov 28 2015 03:04
markuss92 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 240 | @manish-giri | http://www.freecodecamp.com/manish-giri
Marko Krajina
@markuss92
Nov 28 2015 03:04
LOL didn't see that the text had # in it
wow
Manish Giri
@Manish-Giri
Nov 28 2015 03:05
LOL, sometimes the devil is in the details :smile:
Justin Zuchowski
@jzuchowski
Nov 28 2015 03:17
It's funny sometimes when you look at some code for 15 minutes and finally go "oh... yea... duh". Story of FCC for me the past few days! :smile:
Qstreet
@Qstreet
Nov 28 2015 03:29
help
CamperBot
@camperbot
Nov 28 2015 03:29

Hi, I'm CamperBot! I can help you in this chatroom :smile:

Basic Commands:

  • find TOPIC find all entries about topic. ex: find js
  • wiki TOPIC show contents of topic page
  • thanks @username send brownie points to another user
  • about @username shows info on that user
  • bonfire BONFIRENAME info on a bonfire

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

Qstreet
@Qstreet
Nov 28 2015 03:29
find zipline
CamperBot
@camperbot
Nov 28 2015 03:29

find zipline

:zero: zipline use the twitchtv json api

Qstreet
@Qstreet
Nov 28 2015 03:29
help pomodoro
CamperBot
@camperbot
Nov 28 2015 03:29
no wiki entry for: pomodoro
:pencil: click here to create one now!after creating your page type update to reload it here
Qstreet
@Qstreet
Nov 28 2015 03:30
help zipline
CamperBot
@camperbot
Nov 28 2015 03:30

:point_right: zipline use the twitchtv json api [wiki]

If you're trying to tackle this challenge with jQuery's $.getJSON() method, chances are you'll get an error message concerning Cross-Origin Resource Sharing (CORS).

The easiest way to resolve this is to use jQuery's JSONP capabilities. From the Twitch API's readme page:

All API methods support JSON-P by providing a callback parameter with the request.

Also the jQuery documentation states:

If the URL includes the string "callback=?" (or similar, as defined by the server-side API), the request is treated as JSONP instead.

Here's an example call to fetch Free Code Camp's Twitch channel data:

$.getJSON('https://api.twitch.tv/kraken/streams/freecodecamp?callback=?', function(data) {
  console.log(data);
});

JSONP is considered insecure according to Wikipedia, but should be sufficient for our purposes. For a detailed discussion on Twitch's CORS restriction, please read justintv/Twitch-API#133 on the Twitch-API repository.
:pencil: read more about zipline use the twitchtv json api on the FCC Wiki

Qstreet
@Qstreet
Nov 28 2015 03:30
help
CamperBot
@camperbot
Nov 28 2015 03:30

Hi, I'm CamperBot! I can help you in this chatroom :smile:

Basic Commands:

  • find TOPIC find all entries about topic. ex: find js
  • wiki TOPIC show contents of topic page
  • thanks @username send brownie points to another user
  • about @username shows info on that user
  • bonfire BONFIRENAME info on a bonfire

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

Qstreet
@Qstreet
Nov 28 2015 03:32
find pair programming
Jagadeeswara Reddy Yaramala
@yjags03
Nov 28 2015 03:45
find js
Isaac Calvo
@Icalvo1
Nov 28 2015 03:52
stuck for over an hour and solution was one liner xD
arr.filter(Boolean);
Reinier Rodríguez González
@rrgonzalez
Nov 28 2015 03:56
@Icalvo1 where are you from?
here in Cuba we say xD too
Isaac Calvo
@Icalvo1
Nov 28 2015 03:59
oregon, us
Reinier Rodríguez González
@rrgonzalez
Nov 28 2015 03:59
what do you mean by xD
we mean "por Dios" in spanish means Oh my god!
Isaac Calvo
@Icalvo1
Nov 28 2015 04:00
in us its an emoticon
Reinier Rodríguez González
@rrgonzalez
Nov 28 2015 04:00
lol
Reinier Rodríguez González
@rrgonzalez
Nov 28 2015 04:00
i didn't knew
Grafton Gressmen
@GmanJoe
Nov 28 2015 04:05
"The row class is applied to a div" how do I do this?
Isaac Calvo
@Icalvo1
Nov 28 2015 04:06
<div class="row">
or "div.row" then press tab for emmet
Grafton Gressmen
@GmanJoe
Nov 28 2015 04:06
I did that, then I did the <div class="col-xs-4> but it didnt like it..
Reinier Rodríguez González
@rrgonzalez
Nov 28 2015 04:07
you missed a quote
Grafton Gressmen
@GmanJoe
Nov 28 2015 04:07
No i even put both qutoes in.. but it still didn't like that
Reinier Rodríguez González
@rrgonzalez
Nov 28 2015 04:08
Which challenge is that one?
Grafton Gressmen
@GmanJoe
Nov 28 2015 04:08
Waypoint: Use the Bootstrap Grid to Put Elements Side By Side
kevin barrows
@kmbgolf
Nov 28 2015 04:10
Just got to the Jquery section and was wondering if I just should push through or find some more begginer stuff before tackling this section?
Isaac Calvo
@Icalvo1
Nov 28 2015 04:10
make sure all buttons are nested inside <div class="row"> and they each have class col-xs-4
Reinier Rodríguez González
@rrgonzalez
Nov 28 2015 04:10
maybe you should wait two or three challenges in order to the app looks better
Isaac Calvo
@Icalvo1
Nov 28 2015 04:11
  <div class="row">
 <div class="col-xs-4"> <button class="btn btn-block btn-primary">Like</button></div>
  <div class="col-xs-4"><button class="btn btn-block btn-info">Info</button></div>
  <div class="col-xs-4"><button class="btn btn-block btn-danger">Delete</button></div>
    </div>
Grafton Gressmen
@GmanJoe
Nov 28 2015 04:11
ok, that makes more sense, thanks
Isaac Calvo
@Icalvo1
Nov 28 2015 04:12
@kmbgolf Quicy the founder says its best to complete curriculum in order
but personally I skipped around a bit so its up to you
kevin barrows
@kmbgolf
Nov 28 2015 04:13
Yes I am and I am on the Jquery section but I am a bit baffled starting it.
Manish Giri
@Manish-Giri
Nov 28 2015 04:15
@kmbgolf have you tried codeacademy?
kevin barrows
@kmbgolf
Nov 28 2015 04:15
I have it opened on the other page...lol
Maybe go through that first?
Manish Giri
@Manish-Giri
Nov 28 2015 04:16
yeah, it's fairly helpful if done first
kevin barrows
@kmbgolf
Nov 28 2015 04:16
Thank you
I'll be back
RMarti10
@RMarti10
Nov 28 2015 04:18
help
CamperBot
@camperbot
Nov 28 2015 04:18

Hi, I'm CamperBot! I can help you in this chatroom :smile:

Basic Commands:

  • find TOPIC find all entries about topic. ex: find js
  • wiki TOPIC show contents of topic page
  • thanks @username send brownie points to another user
  • about @username shows info on that user
  • bonfire BONFIRENAME info on a bonfire

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

RMarti10
@RMarti10
Nov 28 2015 04:18
me
Waypoint: Use a CSS Class to Style an Element
Reinier Rodríguez González
@rrgonzalez
Nov 28 2015 04:19
don't you understand anything?
what help do you need?
RMarti10
@RMarti10
Nov 28 2015 04:21
I am not sure on what I have to do because most of it is done but there is this one part here it says that my style sheet should declare a red-text class and have its color set to red
literally the only thing I am missing
Manish Giri
@Manish-Giri
Nov 28 2015 04:23
@RMarti10 you need to have a class declared in your <style>which would set the color of the element's font to red
you declare a class in <style>like this:
.className {
property: value;
}
where className is the class's name - in this case, red-text, property is the property you want to alter, in this case font-color, and value is the value you want the property to have, in this case red
RMarti10
@RMarti10
Nov 28 2015 04:35
<style>
.red-text {
color : red;}

</style>
Manish Giri
@Manish-Giri
Nov 28 2015 04:36
@RMarti10 make sure you've applied the class on the required element, like <h2 class="red-text">...</h2>
RMarti10
@RMarti10
Nov 28 2015 04:37
I did
Reinier Rodríguez González
@rrgonzalez
Nov 28 2015 04:37
check that you don't put the dot
in class="class-name"
unlike this: class=".class-name"
RMarti10
@RMarti10
Nov 28 2015 04:38
i did not
Reinier Rodríguez González
@rrgonzalez
Nov 28 2015 04:38
please show us your code
complete
RMarti10
@RMarti10
Nov 28 2015 04:38

<style>
.red-text {
color : red;}

</style>

<h2 class ="red-text">CatPhotoApp</h2>

Manish Giri
@Manish-Giri
Nov 28 2015 04:39
@RMarti10 what's the error you have now?
Reinier Rodríguez González
@rrgonzalez
Nov 28 2015 04:39
<style> tag should be inside <head> tags
RMarti10
@RMarti10
Nov 28 2015 04:39
Your stylesheet should declare a red-text class and have its color set to red.
Manish Giri
@Manish-Giri
Nov 28 2015 04:39
post your code
RMarti10
@RMarti10
Nov 28 2015 04:40
@rrgonzalez what does that look like?
guess what
all I did was put a random letter inbetween < and /h2>
delta94
@delta94
Nov 28 2015 04:46
<style>
.smaller-image {
width: 100px;
}
</style>
not smaller?
Manish Giri
@Manish-Giri
Nov 28 2015 04:51
@delta94 what's the problem
VIMAL SINGH
@vestronv
Nov 28 2015 04:56
@Manish-Giri can you please tell me where I can get some resumes of guys who got selected in Amazon, Microsoft ?
@Manish-Giri I have been trying to build my resume but I think its not that good.
THANKS
CamperBot
@camperbot
Nov 28 2015 04:57
vestronv sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 241 | @manish-giri | http://www.freecodecamp.com/manish-giri
Nathan
@N-Upchurch
Nov 28 2015 04:57
Hey guys, anyone know why this might not be working in the nesting section? <p>View more <a href="http://freecatphotoapp.com">cat photos</a></p>
Adrian
@Adrian95
Nov 28 2015 04:57
how do i add more than one class to my img?
Nathan
@N-Upchurch
Nov 28 2015 04:57
just use a space
Adrian
@Adrian95
Nov 28 2015 04:58
<img class="smaller-image" "thick-green-border" src="https://bit.ly/fcc-relaxing-cat">
whats wrong?
Nathan
@N-Upchurch
Nov 28 2015 04:58
don't put the quotes between them
only one set of quotes
Adrian
@Adrian95
Nov 28 2015 04:58
ty
Nathan
@N-Upchurch
Nov 28 2015 04:58
sure
Adrian
@Adrian95
Nov 28 2015 04:59
sometimes, the really obvious fails me :P
Nathan
@N-Upchurch
Nov 28 2015 04:59
Yea, I'm stuck right now and it feels like it will be something silly
Adrian
@Adrian95
Nov 28 2015 05:00
i started today. so i fell on fire doing easy html and css
Nathan
@N-Upchurch
Nov 28 2015 05:00
ha, I know what you mean
Anyone able to help here: Nest an Anchor Element within a Paragraph?
Jordan Bourne
@JordanBourne
Nov 28 2015 05:02
What's the problem?
h4r1m4u
@h4r1m4u
Nov 28 2015 05:02
@N-Upchurch post your code?
Nathan
@N-Upchurch
Nov 28 2015 05:02
this is my code: <p>View more <a href="http://freecatphotoapp.com">cat photos</a></p>
it's not letting me pass :[
Jordan Bourne
@JordanBourne
Nov 28 2015 05:02
Which waypoint is it?
nvm
h4r1m4u
@h4r1m4u
Nov 28 2015 05:03
@N-Upchurch could you post everything you have in your code pane? that looks correct to me
Nathan
@N-Upchurch
Nov 28 2015 05:03

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>View more <a href="http://freecatphotoapp.com">cat photos</a></p>

<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

h4r1m4u
@h4r1m4u
Nov 28 2015 05:03
oh hang on
the link should include www
Jordan Bourne
@JordanBourne
Nov 28 2015 05:04
Yeah it's the www
Nathan
@N-Upchurch
Nov 28 2015 05:04
I'm slapping my forehead right now.
thanks so much.
VIMAL SINGH
@vestronv
Nov 28 2015 05:04
:D
Jordan Bourne
@JordanBourne
Nov 28 2015 05:04
The amount of times a simple thing like that has confused me for hours on end is countless
h4r1m4u
@h4r1m4u
Nov 28 2015 05:05
no problem. always check the checkpoints in the sidebar. it usually gives you a hint as to what's wrong
Nathan
@N-Upchurch
Nov 28 2015 05:05
will do :]
:)
Jeff Zinger
@fejj182
Nov 28 2015 05:07
Do people find note taking particularly useful whilst they are completing the waypoints? Usually helps it sink in better for me but aware that it's a longgg program haha
Nathan
@N-Upchurch
Nov 28 2015 05:08
I did that when going over JQuery at codecademy. It did help, and I had a quick reference.
h4r1m4u
@h4r1m4u
Nov 28 2015 05:09
@greatburnside21 whatever works for you. i prefer to just work with code and learn stuff through doing. it sinks in better. if i can't remember something (syntax, what exactly some function returns), it's usually one google search away
but some people learn better when taking notes, so really, it boils down to your personality and preferences
Jeff Zinger
@fejj182
Nov 28 2015 05:11
I think that's the only thing convincing me not to bother, the fact that everything is so easily accessible online anyway, that's pretty much what you're going to be doing at every stage of being a programmer anyway right
I can't believe any programmer takes notes of new syntax every time they learn it!
Nathan
@N-Upchurch
Nov 28 2015 05:11
I think it helps it stick
Jeff Zinger
@fejj182
Nov 28 2015 05:12
I find it just helps me slow down and take it in easier though no doubt about it
Decisions...
MIN
@una720302
Nov 28 2015 05:12

does anyone know how i can change it====>Note: We omit the second and third arguments since we only need the value

array = array.filter(function(val) {

return val % 2 === 0;

});

Use filter to remove all elements from array that are greater than 5. please and thank you.

Adrian
@Adrian95
Nov 28 2015 05:12
well programing feels more about learning the process and getting efficent at it, than always knowing what to do.
h4r1m4u
@h4r1m4u
Nov 28 2015 05:12
pretty much. it's not unusual to not remember syntax. developers frequently switch between different languages and it's hard to remember everything. understanding and remembering concepts and general ways of achieving something is more important. the details you can always google.
MIN
@una720302
Nov 28 2015 05:13
This message was deleted
Nathan
@N-Upchurch
Nov 28 2015 05:13
Really? Huh. That's good to know, I've been afraid that I could never be proficient enough to sell my time as a coder without the syntax memorised.
DJ
@qualitymanifest
Nov 28 2015 05:13
@una720302 return values less than or equal to 5
MIN
@una720302
Nov 28 2015 05:13
This message was deleted
@qualitymanifest in the example do this====>
array = array.filter(function(val) {

  return val % 2 === 0;

})
Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:17
Hi guys
canu solve dis one

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}

</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>

Jeff Zinger
@fejj182
Nov 28 2015 05:17
@N-Upchurch Yeah i've always imagined it would be embarrassing if you got asked something like that in an interview and just mind-blanked...I would think if you had the portfolio/mindset then that would be more important to show evidence of though
MIN
@una720302
Nov 28 2015 05:17

@qualitymanifest i don't know where is the 2 from. is the formula? SO i did this==>

var newArray = oldArray.filter(function(val){
  return val % 2===>5;
});

which is not making any sense because the 2 is not equl to 5 or greater than 5.

Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:17
Give your div element the class gray-background.
Your div element should have a gray background.
h4r1m4u
@h4r1m4u
Nov 28 2015 05:20
@IMUTAKER by now you should know how to assign a class to an HTML element and how to create a CSS rule for the class. it was covered in the previous waypoints
what have you tried?
Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:21
they mentioned div element should be in style in created
but, it is not coming
h4r1m4u
@h4r1m4u
Nov 28 2015 05:22
what have you tried?
MIN
@una720302
Nov 28 2015 05:23
can anyone help please?
Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:24
<style>
<div>
.gray-background {

background-color: gray;

}</div>
</style>
@h4r1m4u dis one i mentioned
h4r1m4u
@h4r1m4u
Nov 28 2015 05:24
@IMUTAKER you're mixing your HTML and CSS. the class is defined correctly in the CSS, but remove the <div> and </div> tags from there
then you just need to apply the class to the div in the HTML part
do you know how to apply a class to an HTML element?
Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:25
yes, can u please tell how?
t odo
h4r1m4u
@h4r1m4u
Nov 28 2015 05:26
it's been covered in the previous waypoints. i'd suggest you look it up. i could tell you, but you'll remember it better if you look it up
Kelly
@Kchesney
Nov 28 2015 05:26
Hi all. I'm stuck and could use some help. This is what I have...

<div class="container-fluid">
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
</div>

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}```




</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<div class="container-fluid">
<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>
</div>

<p>Things cats love:</p>

<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>

<p>Top 3 things cats hate:</p>

<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>

Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:26
ok
Kelly
@Kchesney
Nov 28 2015 05:27

To get started, we should nest all of our HTML in a div element with the class container-fluid.

Run tests (ctrl + enter)
Reset Help Bug
Your div element should have the class container-fluid.
Make sure each of your div elements has a closing tag.
Make sure you have nested all HTML elements in .container-fluid.

h4r1m4u
@h4r1m4u
Nov 28 2015 05:27
Kelly
@Kchesney
Nov 28 2015 05:27
I'm lost.
h4r1m4u
@h4r1m4u
Nov 28 2015 05:27
@Kchesney you only nested the <a> and <img> in the .fluid-container <div>. you need to nest ALL your HTML in it
Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:28
but, dis s for specific header or paragraph.
here we have to create a overall background @h4r1m4u
h4r1m4u
@h4r1m4u
Nov 28 2015 05:28
@IMUTAKER it doesn't matter whether it's a heading, paragraph or div. you apply the class all HTML elements the same way:
<someelement class="some-class"></someelement>
so first you define what the class should be doing in your CSS (in between <style> and </style>) and then you apply the class to the element in HTML
texttospeech
@texttospeech
Nov 28 2015 05:30
hey guys, having trouble with "waypoint: add font awesome icons to our buttons"
Kelly
@Kchesney
Nov 28 2015 05:30
@h4r1m4u Ah! I see what you mean. Thank you.
CamperBot
@camperbot
Nov 28 2015 05:30
kchesney sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 751 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
texttospeech
@texttospeech
Nov 28 2015 05:30
where do you actually nest the i element inside of
h4r1m4u
@h4r1m4u
Nov 28 2015 05:30
@Kchesney no problem
texttospeech
@texttospeech
Nov 28 2015 05:30
i tried nesting it before class, but that just made the button class part of the actual text
nesting it after class messes it up as well
and I don't think it works after the <button> next to the Like?
h4r1m4u
@h4r1m4u
Nov 28 2015 05:31
@texttospeech it's nested in the element itself: <button class="..."><i class="..."></i> button text</button>
texttospeech
@texttospeech
Nov 28 2015 05:31
@h4r1m4u thanks!
CamperBot
@camperbot
Nov 28 2015 05:31
texttospeech sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 752 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
delta94
@delta94
Nov 28 2015 05:38
Nest your text input element within a form element.?

<input type="text" placeholder="cat photo URL">

<form action="/submit-cat-photo"></form>

Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:38

@IMUTAKER
sorry bro @h4r1m4u
i didn't get to solve that one but i tried
its not coming

<style>
<div class="gray-background">
.gray-background{
background-color: gray;
}
</div>
</style>

delta94
@delta94
Nov 28 2015 05:39
help me
CamperBot
@camperbot
Nov 28 2015 05:39

:point_right: adding environment variables [wiki]

In Windows

Via GUI

  1. Download Varpanel.
  2. Open Varpanel.
  3. In PATH variable, add the relevant path (for example).

:pencil: read more about adding environment variables on the FCC Wiki

delta94
@delta94
Nov 28 2015 05:39
Nest your text input element within a form element.
???
Abdirizak Mohamed
@ascppl
Nov 28 2015 05:40
@delta94 I'm having the same issue!
im stuck as well
MIN
@una720302
Nov 28 2015 05:42
which one is that? the name please.
Abdirizak Mohamed
@ascppl
Nov 28 2015 05:42
Waypoint: Create a Form Element
Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:42
@h4r1m4u you there
delta94
@delta94
Nov 28 2015 05:43

my code: <input type="text" placeholder="cat photo URL">

<form action="/submit-cat-photo"></form>

Ronald Yau
@ronaldyau
Nov 28 2015 05:44
by "nest" it means to wrap it around or to sandwich it

So it would look something like

<form action="/submit-cat-photo">
<input type="text" placeholder="cat photo URL">
</form>

Qstreet
@Qstreet
Nov 28 2015 05:45
help pair
CamperBot
@camperbot
Nov 28 2015 05:45

:point_right: bonfire dna pairing [wiki]

Problem Explanation:

  • You will get a DNA strand sequence and you need to get the pair and return it as a 2D array of the base pairs. Keep in mind that the provided strand should be first always.

:pencil: read more about bonfire dna pairing on the FCC Wiki

Dorian
@SimpliiD
Nov 28 2015 05:46
Can anyone help, I'm trying to understand jQuery .target selector. I'm on Waypoint: Target a Specific Child of an Element Using jQuery, I don't understand how the .target works. My srtipt is below. If select the 1st child, the first child element within each of my wells bounce, but these are not the first html elements. Why doesn't the h4 element bounce, which appearst to be the first child of the h3 element? (sorry if the code doesn't appear in a window below, still figuring out how to do that):

<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove();
    $("#target2").appendTo("#right-well");
    $("#target5").clone().appendTo("#left-well");
    $("#target1").parent().css("background-color", "red");
    $("#right-well").children().css("color", "green");
    $(".target:nth-child(1)").addClass("animated bounce");
  });
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="target3">#target3</button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target" id="target4">#target4</button>
        <button class="btn btn-default target" id="target5">#target5</button>
        <button class="btn btn-default target" id="target6">#target6</button>
      </div>
    </div>
  </div>
</div>
Abdirizak Mohamed
@ascppl
Nov 28 2015 05:46
@ronaldyau thanks
CamperBot
@camperbot
Nov 28 2015 05:46
ascppl sends brownie points to @ronaldyau :sparkles: :thumbsup: :sparkles:
:star: 28 | @ronaldyau | http://www.freecodecamp.com/ronaldyau
Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:47
@ronaldyau help
can u solve dis please
Ronald Yau
@ronaldyau
Nov 28 2015 05:49
@IMUTAKER what do you need help with?
Jason Jones
@jasonsjones
Nov 28 2015 05:49
@SimpliiD If I understand your question correctly it is because you are selecting only the first element from the ones with the "target" class.
Dorian
@SimpliiD
Nov 28 2015 05:49
Are children only the lowest level within the html tree (sorry for inventing my own description)
MIN
@una720302
Nov 28 2015 05:50
can anyone help please?
question===>You should have removed all the values from the array that are greater than 5.
var newArray = oldArray.filter(function(val){
  return val % 2 === 5;
});
Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:51
Waypoint: Give a Background Color to a Div Element
@ronaldyau
Jason Jones
@jasonsjones
Nov 28 2015 05:52
@SimpliiD No worries. The html DOM (Document Object Model) has an hierarchy. Elements can be children of some and parents of others. In your example the first h3 is a child of the div with class container-fluid.
Ronald Yau
@ronaldyau
Nov 28 2015 05:52
@SimpliiD h4 appears to be the first child of the h3 element, but it isn't. You see the closing </h3> in the same line. The h3 element therefore has no children
Dorian
@SimpliiD
Nov 28 2015 05:53
@jasonjones You mean where i wrote 'target' within the button class? I thought .target was a kind of global selector, and it was only coincidence that I used 'target' within the button class. I should go back to tthe waypoint where I put the "target" class in...thanks for pointing me in this direction
CamperBot
@camperbot
Nov 28 2015 05:53
simpliid sends brownie points to @jasonjones :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jasonjones
Dorian
@SimpliiD
Nov 28 2015 05:53
oops, i meant @jasonsjones
Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:54
i have stuck der
@ronaldyau
Ronald Yau
@ronaldyau
Nov 28 2015 05:55
@IMUTAKER which part?
Synthia Beauvais
@sbeauvais34
Nov 28 2015 05:55
Can I get some help on Bonfire: Return Largest Numbers in Arrays:
function largestOfFour(arr){
    var largest = 0;
    var biggestArray = [];
    for(i = 0; i<arr.length;i++){
        for(h=0; h<arr[i].length;h++){
                if(largest< arr[i][h]){
                largest = arr[i][h];
            }
        biggestArray[i] = largest;    
        }
    }
    return biggestArray;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
CamperBot
@camperbot
Nov 28 2015 05:55
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Jason Jones
@jasonsjones
Nov 28 2015 05:55
@SimpliiD I think you got it now... When you selected #(".target:nth-child(1)") you were selecting the first child of the element that specifically has the "target" class which in your case is the buttons.
Synthia Beauvais
@sbeauvais34
Nov 28 2015 05:56
I am getting a red x on largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]) should return [27,5,39,1001].
Manish Giri
@Manish-Giri
Nov 28 2015 05:56
@una720302 return val <= 5;
VIMAL SINGH
@vestronv
Nov 28 2015 05:56
bonfire name
CamperBot
@camperbot
Nov 28 2015 05:56
no, type part of the name of the bonfire! eg bonfire roman
Mohammed Imran A
@IMUTAKER
Nov 28 2015 05:56

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}

</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>

<style>
<div class="gray-background">
.gray-background{
background-color: gray;
}
</div>
</style>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>

MIN
@una720302
Nov 28 2015 05:57
@Manish-Giri i tried this code before but it didn't work
@camperbot need a help
VIMAL SINGH
@vestronv
Nov 28 2015 05:58
@sbeauvais34 set largest to arr[i][0] after first for loop
as after each iteration the largest should be largest in that array :D
Dorian
@SimpliiD
Nov 28 2015 06:00
@jasonsjones @ronaldyau Thanks!
CamperBot
@camperbot
Nov 28 2015 06:00
simpliid sends brownie points to @jasonsjones and @ronaldyau :sparkles: :thumbsup: :sparkles:
:star: 210 | @jasonsjones | http://www.freecodecamp.com/jasonsjones
:star: 29 | @ronaldyau | http://www.freecodecamp.com/ronaldyau
Manish Giri
@Manish-Giri
Nov 28 2015 06:00
@una720302 post your code, what you have so far
VIMAL SINGH
@vestronv
Nov 28 2015 06:00
@IMUTAKER please dont paste such big codes here... try to give link of your code
Manish Giri
@Manish-Giri
Nov 28 2015 06:00
or post the link to your question
MIN
@una720302
Nov 28 2015 06:01
@Manish-Giri if i typed 2===5 will run but will have one error like this===> You should have removed all the values from the array that are greater than 5.
@Manish-Giri this is my code====>
var oldArray = [1,2,3,4,5,6,7,8,9,10];

// Only change code below this line.

var newArray = oldArray.filter(function(val){
  return val % 2 === 5;
});

// Only change code above this line.

(function() { return newArray; })();
VIMAL SINGH
@vestronv
Nov 28 2015 06:02
@una720302 this condition is never satisfied
Manish Giri
@Manish-Giri
Nov 28 2015 06:02
@una720302 the question asks you to remove values greater than 5, I assume. Why then are you doing this: val % 2 === 5
VIMAL SINGH
@vestronv
Nov 28 2015 06:02
as val%2 is either 0 or 1
Ronald Yau
@ronaldyau
Nov 28 2015 06:03
@IMUTAKER looks like you created a div tag with that class. You didn't need to do that. You need to add the .gray-background in the style element that starts at line 2. Then you add the gray-background the the existing div tag above the "Things cats love" element.
Manish Giri
@Manish-Giri
Nov 28 2015 06:03
precisely
VIMAL SINGH
@vestronv
Nov 28 2015 06:03
var newArray = oldArray.filter(function(val){
return val >5;
});
Manish Giri
@Manish-Giri
Nov 28 2015 06:04
@vestronv think it should be the other way around
J Lee
@SoYuMatic
Nov 28 2015 06:04

hi guys~~~ I need help on the first bonfire.

function reverseString(str) {
  var trs= str.split("").reverse().join("");

  return trs;
}

It's bonfire:reverse a string and on ones active in the channel.

Manish Giri
@Manish-Giri
Nov 28 2015 06:04
filter() will keep the elements which pass the provided check in the callback
@SoYuMatic what's the problem
J Lee
@SoYuMatic
Nov 28 2015 06:05
i have to reverse a string. I thought my code would work
MIN
@una720302
Nov 28 2015 06:05
@vestronv @Manish-Giri this val%2 is from the example, so i don't know it is a formula to use or .... i know it doesn't make sense, so i need a help
VIMAL SINGH
@vestronv
Nov 28 2015 06:06
@Manish-Giri i don't know JS but I think he should just enumerate over all elements and simply return all those greater than 5. 'sounds easy'
Manish Giri
@Manish-Giri
Nov 28 2015 06:06
@una720302
var newArray = oldArray.filter(function(val){
  return val <=5;
});
J Lee
@SoYuMatic
Nov 28 2015 06:06
like if i did reverseString("Hello") it needs to return "olleH"
Mohammed Imran A
@IMUTAKER
Nov 28 2015 06:06
@ronaldyau can you please tell how to do
VIMAL SINGH
@vestronv
Nov 28 2015 06:06
@Manish-Giri he needs val>5 , right ?
Manish Giri
@Manish-Giri
Nov 28 2015 06:06
@vestronv I'm not exactly sure what the question is, but I think it says to remove elements greater than 5
@una720302 could you specify what the question is
@SoYuMatic what's the error you're getting
MIN
@una720302
Nov 28 2015 06:08
@Manish-Giri so i don't have to put %2? it was in the example.
J Lee
@SoYuMatic
Nov 28 2015 06:08
reverseString("Hello") still returns "Hello"
Ronald Yau
@ronaldyau
Nov 28 2015 06:08
@IMUTAKER I think you need to review "Waypoint: Use a CSS Class to Style an Element" and "Waypoint: Nest an Anchor Element within a Paragraph"
J Lee
@SoYuMatic
Nov 28 2015 06:08
and I... just look at my code and am very ????
MIN
@una720302
Nov 28 2015 06:08
@Manish-Giri thank you.
CamperBot
@camperbot
Nov 28 2015 06:08
una720302 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 242 | @manish-giri | http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Nov 28 2015 06:08
@vestronv return val > 5 will keep elements starting at 6
@una720302 no you don't need %2
VIMAL SINGH
@vestronv
Nov 28 2015 06:08
is it like "hello baby" -> "baby hello"
Manish Giri
@Manish-Giri
Nov 28 2015 06:09
@una720302 the example given must have used %2 to solve the problem mentioned in that example only.
your question was to simply remove values greater than 5, so you don't really need to find remainder (%)
@SoYuMatic your code works fine at my end:
reverseString("Hello");
"olleH"
MIN
@una720302
Nov 28 2015 06:12
@Manish-Giri thank you so much
CamperBot
@camperbot
Nov 28 2015 06:12
una720302 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:warning: una720302 already gave manish-giri points
Manish Giri
@Manish-Giri
Nov 28 2015 06:12
@una720302 np! Good luck ahead!
VIMAL SINGH
@vestronv
Nov 28 2015 06:16
Can 0.0.0.1 be a valid IP address ?
James
@Andrale
Nov 28 2015 06:19
How would I add a ID to this? $("button").addClass("animated bounce");
Rex Schrader
@SaintPeter
Nov 28 2015 06:21
@Andrale The selector is $("") - the bit inside the quotes is what needs to be the ID. You specify an id with a #, so #anID in the quotes would find an element with an id of anID
Manish Giri
@Manish-Giri
Nov 28 2015 06:21
@SaintPeter the saint returns!
SaintPeter @SaintPeter has been heads down on the Basic Javascript Revamp
Rex Schrader
@SaintPeter
Nov 28 2015 06:22
I'm about half way through it
Manish Giri
@Manish-Giri
Nov 28 2015 06:24
you're from Roseville I see. I was just there this September.
Rex Schrader
@SaintPeter
Nov 28 2015 06:25
Nice place to live, but I can't imagine coming to visit :D
MIN
@una720302
Nov 28 2015 06:25
@Manish-Giri could you please help me on this one? ===>Use split to create an array of words from string and assign it to array.
Manish Giri
@Manish-Giri
Nov 28 2015 06:26
I was visiting a friend out there, and then I had family in Cupertino. Worlds apart, I must say.
@una720302 what have you tried so far, the code I mean?
var arrayOfLetters = "jamesbond".split("");
arrayOfLetters
["j", "a", "m", "e", "s", "b", "o", "n", "d"]
here's an example
MIN
@una720302
Nov 28 2015 06:28

@Manish-Giri in the example i learned how to split an array at every s character, but i don't know how to create an space in every array.
```var string = "Split me into an array";

// Only change code below this line.

var array = string.split('');

// Only change code above this line.

(function() {return array;})();
```

Manish Giri
@Manish-Giri
Nov 28 2015 06:29
@una720302 you mean you are supposed to split the words based on the spaces?
just add a space in the split() method then, like:
var arr = string.split(" ");
MIN
@una720302
Nov 28 2015 06:30
@Manish-Giri sorry i meant ===>split the string by its spaces.
Manish Giri
@Manish-Giri
Nov 28 2015 06:30
var string = "Split me into an array";
var arr = string.split(" ");
arr
["Split", "me", "into", "an", "array"]
like I said, use what you want to split by in the parantheses of the split(), earlier you split on every character, so it was split(""), now you want to split on spaces, so add a space - split(" ")
MIN
@una720302
Nov 28 2015 06:34
@Manish-Giri thank you for the explanation. it is way easier to understand.
CamperBot
@camperbot
Nov 28 2015 06:34
una720302 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:warning: una720302 already gave manish-giri points
Manish Giri
@Manish-Giri
Nov 28 2015 06:34
@una720302 happy to help!
Abdirizak Mohamed
@ascppl
Nov 28 2015 06:40
blob
what am i doing wrong?
blob
the instruction were: Give your form element the id cat-photo-form
Manish Giri
@Manish-Giri
Nov 28 2015 06:42
@ascppl look closely, you now have two <form> elements
you don't need to create a new form element, just give the required id to the existing form element in the opening tag: <form id="" action="">
Solehjon
@Solehjon
Nov 28 2015 07:07

@Solehjon
Guys what should I do,
"Construct JavaScript Objects with Functions"
these are my codes
var Car = function() {
this.wheels = 4;
this.engines = 1;
this.seats = 1;
};

var myCar = new Car();

// Only change code below this line.

var MotorBike = function() {
wheels = 4;
engines = 1;
seats = 1;

};
myMotorBike should have a engines attribute set to a number.
myMotorBike should have a wheels attribute set to a number.
myMotorBike should have a seats attribute set to a number.

Manish Giri
@Manish-Giri
Nov 28 2015 07:08
@Solehjon see what the provided example is doing, especially the use of this
Solehjon
@Solehjon
Nov 28 2015 07:09
@Manish-Giri I used but it doesn't work
Manish Giri
@Manish-Giri
Nov 28 2015 07:10
@Solehjon the name should be myMotorBike not MotorBike
Hans van Riet
@hansinla
Nov 28 2015 07:11
@Solehjon
 this.wheels = 4;
  this.engines = 1;
  this.seats = 1;
Solehjon
@Solehjon
Nov 28 2015 07:12
@Manish-Giri it says "Program Execution Failure"
Hans van Riet
@hansinla
Nov 28 2015 07:12
@Manish-Giri he shouldn’t change the name of the constructor
@Solehjon domn’t change the name of the constructor, the tests will fail.
Solehjon
@Solehjon
Nov 28 2015 07:12
@hansinla it works thanks
CamperBot
@camperbot
Nov 28 2015 07:12
solehjon sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 650 | @hansinla | http://www.freecodecamp.com/hansinla
Manish Giri
@Manish-Giri
Nov 28 2015 07:12
@hansinla I already advised him about this
Hans van Riet
@hansinla
Nov 28 2015 07:13
@Solehjon great
Abdirizak Mohamed
@ascppl
Nov 28 2015 07:13
blob
like that
still not working
Hans van Riet
@hansinla
Nov 28 2015 07:14
@ascppl what’s the question?
Manish Giri
@Manish-Giri
Nov 28 2015 07:14
check what you've typed in the ID
it's cat-photo-form
or at least that's what you told me the ID was in your last code
Abdirizak Mohamed
@ascppl
Nov 28 2015 07:15
OMG
thank you
this was giving me headaches
Jagadeeswara Reddy Yaramala
@yjags03
Nov 28 2015 07:16
@ascppl And also there should be gap between "id" and "action" attributes of form
MIN
@una720302
Nov 28 2015 07:17
@Manish-Giri how should i do with this please?=====>factorialize(5) should return 120.
@Manish-Giri i switched to bonfire chat room. thank you
CamperBot
@camperbot
Nov 28 2015 07:18
una720302 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star: 243 | @manish-giri | http://www.freecodecamp.com/manish-giri
Cheng Yanan
@mrcheng0910
Nov 28 2015 07:26
help!!,"This is slightly different from a normal CSS declaration, because the CSS property and its value are in quotes, and separated with a comma instead of a colon." what is the meaning of the sentence?
NoRestrictions
@NoRestrictions
Nov 28 2015 07:31
Hi guys!
John Alex
@JhonnyAl
Nov 28 2015 07:32
Hi
NoRestrictions
@NoRestrictions
Nov 28 2015 07:33
need help on Waypoint: Target the same element with multiple jQuery Selectors. i am stuck
John Alex
@JhonnyAl
Nov 28 2015 07:34
Sure, whats the problem?
Cheng Yanan
@mrcheng0910
Nov 28 2015 07:35
selecting multiple elements at the same time @NoRestrictions
NoRestrictions
@NoRestrictions
Nov 28 2015 07:35
yes
@mrcheng0910
Cheng Yanan
@mrcheng0910
Nov 28 2015 07:36
eg. $("button"),it means , to select all buttons. sorry for my poor English
:)
NoRestrictions
@NoRestrictions
Nov 28 2015 07:36
I still have a red X on editor.match(...) is null and Only use jQuery to add these classes to the element, but others are green tick marks.
ok. Nothing wrong with the English...
h4r1m4u
@h4r1m4u
Nov 28 2015 07:38
@NoRestrictions could you post your code?
alan1001110
@alan1001110
Nov 28 2015 07:39
On GitHub, should I be cloning the staging branch as opposed to the master, for contribuing to FreeCodeCamp?
NoRestrictions
@NoRestrictions
Nov 28 2015 07:39
ok. Everything @h4r1m4u
h4r1m4u
@h4r1m4u
Nov 28 2015 07:39
@NoRestrictions yeah. use the code formatting
wiki format
CamperBot
@camperbot
Nov 28 2015 07:39

:point_right: code format [wiki]

Inline code

This an inline `<paste code here>` code formatting with a single backtick(`) at start and end around the code.

Code Block

``` ⇦ Type 3 backticks and then press [shift + enter ⏎]

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

How to Code

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code format on the FCC Wiki

h4r1m4u
@h4r1m4u
Nov 28 2015 07:39
:point_up:
NoRestrictions
@NoRestrictions
Nov 28 2015 07:40
Alright. Will do that
Ian Walker
@tonesfrommars
Nov 28 2015 07:41
@mrcheng0910 , the sentence you pasted means that when you set a css property with jquery like so $(".foo").css("color","red"); it's a different syntax from a stylesheet in CSS syntax.
alan1001110
@alan1001110
Nov 28 2015 07:41
Going to assume yes.
Ian Walker
@tonesfrommars
Nov 28 2015 07:42
You're actually passing the 'property' and 'value' as arguments to a function (as strings).
NoRestrictions
@NoRestrictions
Nov 28 2015 07:42
<script>
  $(document).ready(function() {
   $("button").addClass(animated);
   $(".btn").addClass(shake);
   $("#target1").addClass();
  });
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default btn-primary animated shake target" id="target1">#target1</button>
        <button class="btn btn-default shake animated target" id="target2">#target2</button>
        <button class="btn btn-default shake animated target" id="target3">#target3</button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default shake animated target" id="target4">#target4</button>
        <button class="btn btn-default shake animated target" id="target5">#target5</button>
        <button class="btn btn-default shake animated target" id="target6">#target6</button>
      </div>
    </div>
  </div>
</div>
h4r1m4u
@h4r1m4u
Nov 28 2015 07:44
@NoRestrictions you should only be adding the extra classes using jQuery (the part between the <script> and </script> tags). so remove the classes that you added directly into the HTML:
<button class="btn btn-default shake animated target" id="target4">#target4</button>
TheRealCoder
@TheRealCoder
Nov 28 2015 07:44
Add a div element with the class well inside each of your div elements with the class "col-xs-6"
h4r1m4u
@h4r1m4u
Nov 28 2015 07:44
the button shouldn't have the shake and animated class added directly
TheRealCoder
@TheRealCoder
Nov 28 2015 07:44
<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">

</div>
<div class="col-xs-6">

</div>
</div>
</div>
i need help
h4r1m4u
@h4r1m4u
Nov 28 2015 07:45
@TheRealCoder how would you create a <div> element with a class 'well'?
type it out
NoRestrictions
@NoRestrictions
Nov 28 2015 07:45
ok. Thanks @h4r1m4u . Wld try that now
CamperBot
@camperbot
Nov 28 2015 07:45
norestrictions sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 753 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Cheng Yanan
@mrcheng0910
Nov 28 2015 07:45
$("#target1").addClass(); ,it should be $("#target1").addClass("btn-primary");@NoRestrictions
NoRestrictions
@NoRestrictions
Nov 28 2015 07:47
ok. @mrcheng0910 . Thanks
CamperBot
@camperbot
Nov 28 2015 07:47
norestrictions sends brownie points to @mrcheng0910 :sparkles: :thumbsup: :sparkles:
:star: 119 | @mrcheng0910 | http://www.freecodecamp.com/mrcheng0910
Cheng Yanan
@mrcheng0910
Nov 28 2015 07:48
:)@NoRestrictions
@TheRealCoder ,<div class="well"></div>
h4r1m4u
@h4r1m4u
Nov 28 2015 07:51
@mrcheng0910 do you think the best way to help somebody learn is to hand them the solution directly? or is there a more effective approach to teaching?
Cheng Yanan
@mrcheng0910
Nov 28 2015 07:53
@h4r1m4u ,i understand,:), i do something wrong...
h4r1m4u
@h4r1m4u
Nov 28 2015 07:55
@mrcheng0910 not wrong. it's great that you're trying to help and much appreciated. i just think that it's better to point people towards the solution and help them figure it out themselves. that way they'll not only have the sense of accomplishment, but will also more easily remember how they solved the problem.
Akram
@niwox
Nov 28 2015 07:58
Hello guys,
Can someone check if this is working
http://codepen.io/FreeCodeCamp/full/avqvgJ
h4r1m4u
@h4r1m4u
Nov 28 2015 07:58
@niwox works for me
Alex Bykov
@tomkallen
Nov 28 2015 07:59
blob
what is supposed to be inside of the left box?
h4r1m4u
@h4r1m4u
Nov 28 2015 08:00
@tomkallen it should be your location/city
Alex Bykov
@tomkallen
Nov 28 2015 08:01
@niwox also tempertature is way off
ah, may be because i am behind a firewall + ip shadowing, could not read my real location
Akram
@niwox
Nov 28 2015 08:02
screenshot.35.jpg
@tomkallen @h4r1m4u not showing much here
h4r1m4u
@h4r1m4u
Nov 28 2015 08:03
@alan1001110 i think you should be forking the master branch. that's the latest, stable code actually deployed into production. the staging branch is for new features and pull requests. not all the code in that branch is 100% certain to make it into the master branch in the end (at least i think that's how it works)
@niwox that's strange. do you get any errors if you check the console in the web development tools
?
Akram
@niwox
Nov 28 2015 08:05
Apparently uBlock is blocking ipinfo
h4r1m4u
@h4r1m4u
Nov 28 2015 08:06
ah, that explains it then
the app uses ipinfo to get your ipaddress. it's where it gets your location from
Akram
@niwox
Nov 28 2015 08:07
@h4r1m4u thank you, it makes sens
CamperBot
@camperbot
Nov 28 2015 08:07
niwox sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 754 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Elliott McNary
@bighitbiker3
Nov 28 2015 08:36
Okay guys…I don’t understand this. If I use arr. length which is equal to 4 in the if statement it doesn’t work. But if I use the number 4 it does?
function drop(arr, func) {
  console.log(arr.length);
  for(var i =0; i < arr.length; i++)
  if(!func(arr[0])) {
      arr.shift();
    }


  return arr;
}

 drop([1, 2, 3, 4], function(n) {return n > 5;});
Aleksandar B.
@aleksandar-b
Nov 28 2015 08:39
@bighitbiker3 because you are using shift which changes the length of arr
Try to cashe arr length in a variable outside for loop and use it in for loop
Rishav Kumar
@rishav171
Nov 28 2015 08:45
Title Case a Sentence - how do i proceed
Floris Warmenhoven
@FlorisWarmenhoven
Nov 28 2015 09:07
Question: Any people here that use a VPS or Dedicated Server to connect to, for their programming environment?
h4r1m4u
@h4r1m4u
Nov 28 2015 09:09
@FlorisWarmenhoven i don't use it for development (i do that locally), but i do use dedicated servers to run/host some of my actual projects/sites
Floris Warmenhoven
@FlorisWarmenhoven
Nov 28 2015 09:09
@h4r1m4u Hmm, I see. I was interesting in renting a VPS or Dedicated Server for a programming environment. A place where I can code, upload it to Git, do web browsing.
h4r1m4u
@h4r1m4u
Nov 28 2015 09:36
@FlorisWarmenhoven any reason why you can't do the same on your local machine and save the money?
Floris Warmenhoven
@FlorisWarmenhoven
Nov 28 2015 09:37
@h4r1m4u I am on the move a lot, and I use different computers/laptops. It's quite a hassle to keep setting up my coding environment. I don't mind dishing out a couple of bucks a month. I'll just go to the StarBucks a bit less :>
h4r1m4u
@h4r1m4u
Nov 28 2015 09:38
@FlorisWarmenhoven ah, ok, in that case it might be worth it
unless you need a powerful machine, you could use the amazon ec2. the lowest tier instance is free for a year, i believe
digitalocean is pretty affordable too
@FlorisWarmenhoven
Floris Warmenhoven
@FlorisWarmenhoven
Nov 28 2015 09:42
@h4r1m4u Missed your message. Hmm, can I run Ubuntu on Amazon's servers?
h4r1m4u
@h4r1m4u
Nov 28 2015 09:43
@FlorisWarmenhoven yup, they have a large selection of distros, ubuntu being one of them
Floris Warmenhoven
@FlorisWarmenhoven
Nov 28 2015 09:45
@h4r1m4u I'll try them out, thank you!
CamperBot
@camperbot
Nov 28 2015 09:45
floriswarmenhoven sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 757 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Nov 28 2015 09:45
my pleasure
Floris Warmenhoven
@FlorisWarmenhoven
Nov 28 2015 09:46
@h4r1m4u It says I have 5 gigabytes of storage. Is that enough for Ubuntu?
h4r1m4u
@h4r1m4u
Nov 28 2015 09:48
@FlorisWarmenhoven yeah, it is. i don't know how much space it'll leave you with for your projects, but if you're only looking to code, you won't need that much space. plus you can always create another volume and mount it to your instance. great thing about the cloud hosting
gotta step away for a bit now, but if you have more questions, leave me a message and i'll get back to you when i'm back
Jordan Disch
@JordanDDisch
Nov 28 2015 09:53
Hey I just started FreeCodeCamp. I have a lot of prior experience with front end development. I am very proficient at responsive web dev(HTML CSS). I am some what proficient at angular and node, as I have built some small scale websites with both. Where is the best place to start for someone at my level?
Chetan jay
@chetuzz
Nov 28 2015 09:58

why is this not working? <style>
h2 {color: Blue;}
</style>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

Alex Bykov
@tomkallen
Nov 28 2015 09:58
Hello @JordanDDisch I think you should start at chapter 10 or 12 of 800 Hours of Practice. Previous bonfires will just bore you I suppose.
@chetuzz because you have no h2 header in your html?
Kumar Bittu
@kumarb2u
Nov 28 2015 09:59
keep <h2> tag outside or inside the <p> tag
like this .........<p><h2>your statement</h2></p>
Chetan jay
@chetuzz
Nov 28 2015 10:00
thanks tom and kumar
Ken
@phanlinhkhuong
Nov 28 2015 10:05

var oldArray = [1,2,3,4,5];

// Only change code below this line.

var newArray = oldArray.map(function(value){
return value + 3;
})

// Only change code above this line.

(function() {return newArray;})();

help me
CamperBot
@camperbot
Nov 28 2015 10:05

:point_right: adding environment variables [wiki]

In Windows

Via GUI

  1. Download Varpanel.
  2. Open Varpanel.
  3. In PATH variable, add the relevant path (for example).

:pencil: read more about adding environment variables on the FCC Wiki

Ken
@phanlinhkhuong
Nov 28 2015 10:05
Use the map function to add 3 to every value in the variable oldArray.

@phanlinhkhuong
var oldArray = [1,2,3,4,5];

// Only change code below this line.

var newArray = oldArray.map(function(value){
return value + 3;
})

// Only change code above this line.

(function() {return newArray;})();
help me

oh I found out. I missed semicolon ;
Elliott McNary
@bighitbiker3
Nov 28 2015 10:08
@samosale aahhh thank you! didn’t realize the loop would take that into account
CamperBot
@camperbot
Nov 28 2015 10:08
bighitbiker3 sends brownie points to @samosale :sparkles: :thumbsup: :sparkles:
:star: 479 | @samosale | http://www.freecodecamp.com/samosale
Adrian
@Adrian95
Nov 28 2015 10:13
To get started, we should nest all of our HTML in a div element with the class container-fluid.
what does this mean?
i put all my html in <div></div> but thats not enough i need ".container-fluid
nvm i mind i fixed it :)
Chetan jay
@chetuzz
Nov 28 2015 10:24

<style>
h2 {color: blue;} /h2
</style>

<p> Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

i have problem here

<style>
h2 {color: blue;}
</style>

<p> Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

how to add css style element
Kumar Bittu
@kumarb2u
Nov 28 2015 10:26

<style>
h2 {color: blue;}
</style>

<p> Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<h2>statement</h2>
add this and then run it
Chetan jay
@chetuzz
Nov 28 2015 10:27
Thanks @kumarb2u
CamperBot
@camperbot
Nov 28 2015 10:27
chetuzz sends brownie points to @kumarb2u :sparkles: :thumbsup: :sparkles:
:star: 21 | @kumarb2u | http://www.freecodecamp.com/kumarb2u
Chetan jay
@chetuzz
Nov 28 2015 10:28
i missed the last <h2> element
Matthew Barber
@Honno
Nov 28 2015 10:38
function findYInc() {
  console.log("Start function");
  var cells = [["Y (1)"], ["N"], ["-"]];
  var count = 0;
  for(var i = 0; i < cells.length; i++) {
    console.log("Start iteration");
    console.log("i = " + i);
    console.log("cells[i] =" + cells[i]);
    var cell = [cells][i][0];
    console.log("cells[i][0] = " + cells[i][0]);
    console.log("End iteration");
  }                     
  return count;
}
Why does this work fine for the cells[1], but when i = 1 the function can't read cells[1][0]?
"TypeError: Cannot read property '0' of undefined"
Manish Giri
@Manish-Giri
Nov 28 2015 10:49
@Honno don't you mean cells[i][0]?
4th statement in your loop
Matthew Barber
@Honno
Nov 28 2015 10:50
@Manish-Giri ... I'm an idiot
Thank you so much lol
Alexander Køpke
@alexanderkopke
Nov 28 2015 10:54
There are no idiots here. Just people learning to program. :-)
danmunyi
@danmunyi
Nov 28 2015 10:58
hi there .i need help
WP Change Text Inside an Element Using jQuery
raw1211
@raw1211
Nov 28 2015 11:07
@danmunyi post ur code
Elliott McNary
@bighitbiker3
Nov 28 2015 11:09
@danmunyi in here :)
Waypoint: Change Text Inside an Element Using jQuery
damnit camperbot
danmunyi
@danmunyi
Nov 28 2015 11:10
$("#target4").text(i);
raw1211
@raw1211
Nov 28 2015 11:11
$("#target4").text("<i>#target4</i>");
danmunyi
@danmunyi
Nov 28 2015 11:13
@raw1211 it doesnt work
raw1211
@raw1211
Nov 28 2015 11:15
@danmunyi use .html instead of .text
basedHokage
@mojo706
Nov 28 2015 11:15
@camperbot is asleep
raw1211
@raw1211
Nov 28 2015 11:15
bot
CamperBot
@camperbot
Nov 28 2015 11:15

Hi, I'm CamperBot! I can help you in this chatroom :smile:

Basic Commands:

  • find TOPIC find all entries about topic. ex: find js
  • wiki TOPIC show contents of topic page
  • thanks @username send brownie points to another user
  • about @username shows info on that user
  • bonfire BONFIRENAME info on a bonfire

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

raw1211
@raw1211
Nov 28 2015 11:15
bot status
CamperBot
@camperbot
Nov 28 2015 11:15
no wiki entry for: status
:pencil: click here to create one now!after creating your page type update to reload it here
raw1211
@raw1211
Nov 28 2015 11:16
This message was deleted
CamperBot
@camperbot
Nov 28 2015 11:16
sorry raw1211, you can't send brownie points to yourself! :sparkles: :sparkles:
danmunyi
@danmunyi
Nov 28 2015 11:17
@raw1211 it worked.thank you
CamperBot
@camperbot
Nov 28 2015 11:17
danmunyi sends brownie points to @raw1211 :sparkles: :thumbsup: :sparkles:
:star: 337 | @raw1211 | http://www.freecodecamp.com/raw1211
raw1211
@raw1211
Nov 28 2015 11:17
about @Blauelf
CamperBot
@camperbot
Nov 28 2015 11:17
:star: 561 | @blauelf | http://www.freecodecamp.com/blauelf
Morgryyn
@Morgrynn
Nov 28 2015 11:26
i need help with waypoint: Use Responsive Design with Bootstrap Fluid Containers. i can
i cant seem to "Make sure you have nested all HTML elements in .container-fluid."
h4r1m4u
@h4r1m4u
Nov 28 2015 11:30
@JordanDDisch if you're after the certificate, you'll need to complete all the waypoints, bonfires and ziplines, regardless of your previous experience
raw1211
@raw1211
Nov 28 2015 11:34
@Morgrynn <div class="container-fluid"> all html elements here</div>
softcreeper
@softcreeper
Nov 28 2015 11:35
having trouble giving the div element a gray background everytime i try putting it in I type class as a text
Morgryyn
@Morgrynn
Nov 28 2015 11:36
@raw1211 thanks
CamperBot
@camperbot
Nov 28 2015 11:36
morgrynn sends brownie points to @raw1211 :sparkles: :thumbsup: :sparkles:
:star: 338 | @raw1211 | http://www.freecodecamp.com/raw1211
Pranav Doshi
@pranavdoshi
Nov 28 2015 11:36
@softcreeper can u post ur entire code
softcreeper
@softcreeper
Nov 28 2015 11:36
ok

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style> .gray-background {background-color: gray;}
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat"></a>

<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>

basedHokage
@mojo706
Nov 28 2015 11:37
bonfire Truncate a string
CamperBot
@camperbot
Nov 28 2015 11:37

:fire:Bonfire: Truncate a string :link:

function truncate(str, num) {
  // Clear out that junk in your trunk
  return str;
}

truncate('A-tisket a-tasket A green and yellow basket', 11);

Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a '...' ending.

more info:  bf details | bf links | hint

Pranav Doshi
@pranavdoshi
Nov 28 2015 11:38
@softcreeper which div also post link to the waypoint
raw1211
@raw1211
Nov 28 2015 11:39
@softcreeper u haven'r provided class
to ur div
<div class="gray-background">
softcreeper
@softcreeper
Nov 28 2015 11:40
ahh
now i understand
raw1211 thanks
that helps alot
raw1211
@raw1211
Nov 28 2015 11:41
np
mudi thareja
@tharejamudit
Nov 28 2015 11:46
Waypoint: Target the same element with multiple jQuery Selectors
raw1211
@raw1211
Nov 28 2015 11:46
@tharejamudit post ur code
mudi thareja
@tharejamudit
Nov 28 2015 11:47

<script>
$(document).ready(function() {
$("button").addClass("animated");
$(".btn").addClass("shake");
$("#target1").addClass("animated shake btn-primary");


});
</script>

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

raw1211
@raw1211
Nov 28 2015 11:49
@tharejamudit
<script>
$(document).ready(function() {
$("button").addClass("animated");
$(".btn").addClass("shake");
$("#target1").addClass("btn-primary");


});
</script>
Mohammed Mayar Fddo
@Mayarfddo
Nov 28 2015 11:50
I have the same problem with "Waypoint: Target the same element with multiple jQuery Selectors"
mudi thareja
@tharejamudit
Nov 28 2015 11:50
stuck in this part
raw1211
@raw1211
Nov 28 2015 11:50
@Mayarfddo check the above code
mudi thareja
@tharejamudit
Nov 28 2015 11:51
Q:Only add one class with each of your three selectors. @raw1211
Mohammed Mayar Fddo
@Mayarfddo
Nov 28 2015 11:51
I have written this code before
mudi thareja
@tharejamudit
Nov 28 2015 11:51
even i wrote this before
Mohammed Mayar Fddo
@Mayarfddo
Nov 28 2015 11:51
Only add one class with each of your three selectors.
Your #target1 element should have the classes animated‚ shake and btn-primary.
Only use jQuery to add these classes to the element.
raw1211
@raw1211
Nov 28 2015 11:51
@tharejamudit u added 3 classes at a time...look at ur code
Mohammed Mayar Fddo
@Mayarfddo
Nov 28 2015 11:51
those three issues reported

<script>

$(document).ready(function() {
$("button").addclass("animated");
$(".btn").addclass("shake");
$("#target1").addclass(" btn-primary");

});
</script>

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

raw1211
@raw1211
Nov 28 2015 11:53
@Mayarfddo $("#target1").addClass("btn-primary");
use this
mudi thareja
@tharejamudit
Nov 28 2015 11:54
yup
raw1211
@raw1211
Nov 28 2015 11:54
@Mayarfddo addClass is written like this
Mohammed Mayar Fddo
@Mayarfddo
Nov 28 2015 11:55
@raw1211 Thank you
CamperBot
@camperbot
Nov 28 2015 11:55
mayarfddo sends brownie points to @raw1211 :sparkles: :thumbsup: :sparkles:
:star: 341 | @raw1211 | http://www.freecodecamp.com/raw1211
raw1211
@raw1211
Nov 28 2015 11:56
There is no issue is any wapoint
mudi thareja
@tharejamudit
Nov 28 2015 11:58
mine is still not going through
<script>
$(document).ready(function() {
$("button").addClass("animated");
$(".btn").addClass("shake");
$("#target1").addClass("btn-primary");
});
</script>
yup went through
Kumar Bittu
@kumarb2u
Nov 28 2015 13:06
can anybody help me out to that how can I fetch the complete google news search description content...??
I am using this url to search any keyword ..http://news.google.de/news?pz=1&cf=all&ned=de&hl=de&as_maxm=2&q=obama&as_drrb=b&as_mind=27&as_minm=2&cf=all&as_maxd=28&output=rss
and its returing the title, guid, link and description...but discription content hhaving the aprrox lenth 255 char..I want to fetch complete news content.
Cezar
@Cezar13
Nov 28 2015 13:42
hy all.can u please help with this Known Issue? :) Give the text input in your form the class form-control.
noob here :D
raw1211
@raw1211
Nov 28 2015 13:43
@Cezar13 <input type="text" class="form-control">
Cezar
@Cezar13
Nov 28 2015 13:44
thank you very much!
worked
raw1211
@raw1211
Nov 28 2015 13:44
np
Aimoré Sá Costa
@aimore
Nov 28 2015 13:48
someone from Brazil?
Ngaosathe
@ThekhoN
Nov 28 2015 13:53
Can some one please help explain this solution for the bonfire-where-art-thou
CamperBot
@camperbot
Nov 28 2015 13:53
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Ngaosathe
@ThekhoN
Nov 28 2015 13:53
function where(collection, source) {

  var srcKeys = Object.keys(source);

  // filter the collection
  return collection.filter(function (obj) {
    for(var i = 0; i < srcKeys.length; i++) {
      if(!obj.hasOwnProperty(srcKeys[i]) || obj[srcKeys[i]] !== source[srcKeys[i]]) {
        return false;
      }
    }
    return true;
  });
}
camazinglabs
@camazinglabs
Nov 28 2015 14:36
I am at Waypoint Target a Specific Child of an Element Using jQuery.. as my code i have : $(".target:nth-child(2)").addClass("bounce");
.. Is this not right?
Kumar Bittu
@kumarb2u
Nov 28 2015 14:39
correct..
raw1211
@raw1211
Nov 28 2015 14:40
@camazinglabs $(".target:nth-child(2)").addClass("animated bounce");
this is the correct one
Hans van Riet
@hansinla
Nov 28 2015 14:41
@camazinglabs Add the animated class as well.
Kumar Bittu
@kumarb2u
Nov 28 2015 14:41
you can add any class name based on your requirment....
it maybe anything ..any class name which you want to add.
kevin barrows
@kmbgolf
Nov 28 2015 14:58
<script>
  $(document).ready(function() {
    $("button").addClass("animated bounce");
    $(".well").addclass("animated shake");
  });
</script>
Use the jQuery addClass() function to give the classes animated and shake to all your elements with the class well.
Anyone see my problem?
h4r1m4u
@h4r1m4u
Nov 28 2015 14:59
@kmbgolf it's .addClass, not .addclass
case matters
kevin barrows
@kmbgolf
Nov 28 2015 14:59
thank you
segio
@sergiowlotts
Nov 28 2015 15:09
Hey guys. How are you doing?

Stuck at Waypoint: Make Instances of Objects with a Constructor Function
CODE IN EDITOR:
var Car = function() {
this.wheels = 4;
this.engines = 1;
this.seats = 1;
};

// Only change code below this line.

var myCar;
INSTRUCTIONS:
In the editor, use the Car constructor to create a new instance and assign it to myCar.

Then give myCar a nickname property with a string value.

What am i supposed to do?
Ronald Yau
@ronaldyau
Nov 28 2015 15:21
@sergiowlotts read the part after "To use a constructor function we call it with the new keyword in front of it like:"
let me know if you're still stuck
Clive Bunting
@clive-bunting
Nov 28 2015 15:23
Hi everyone. Just started doing the first bonfire. At the end I get the option to share the code as a gist. When I do it goes onto github as an anonymous post, rather than as my github account? Any ideas why? I'm logged onto FreeCodeCamp via my github account.
segio
@sergiowlotts
Nov 28 2015 15:24
Thanks @ronaldyau
CamperBot
@camperbot
Nov 28 2015 15:24
sergiowlotts sends brownie points to @ronaldyau :sparkles: :thumbsup: :sparkles:
:star: 35 | @ronaldyau | http://www.freecodecamp.com/ronaldyau
Robert Richey
@0x0936
Nov 28 2015 15:26
Is anyone available to answer a couple questions in regards to setting up FCC locally?
h4r1m4u
@h4r1m4u
Nov 28 2015 15:28
@clive-bunting i "think" that's the way it's set up. it works for me that way too. why that is the case is beyond me
a simple solution is to copy the code and create the gist under your account manually
Clive Bunting
@clive-bunting
Nov 28 2015 15:29
OK thanks @h4r1m4u - thought I had set something up wrong :)
h4r1m4u
@h4r1m4u
Nov 28 2015 15:30
no worries. and yeah, it's not a user error in this case :)
ogunoye adebamigbe john
@adebamigbejohn
Nov 28 2015 15:33
little help here please
Robert Richey
@0x0936
Nov 28 2015 15:35
@adebamigbejohn what problem are you working on? what is your question?
ogunoye adebamigbe john
@adebamigbejohn
Nov 28 2015 15:37
Use a CSS Class to Style an Element
got problem with that
Robert Richey
@0x0936
Nov 28 2015 15:39
@adebamigbejohn ok, show your code please
ogunoye adebamigbe john
@adebamigbejohn
Nov 28 2015 15:43

<style>
.red-text {
color: red;

}
.red-text

<h2 class="red- text">catPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

Rick
@RedNixTV
Nov 28 2015 15:44
Your style class should be closed </style>
there is no need for the second .red-text
ogunoye adebamigbe john
@adebamigbejohn
Nov 28 2015 15:46
"style closed" what line
Rick
@RedNixTV
Nov 28 2015 15:47
right after you declared the .red-text class: <style> .red-text{color: red;} </style>
ogunoye adebamigbe john
@adebamigbejohn
Nov 28 2015 15:49
not working
Rick
@RedNixTV
Nov 28 2015 15:50
post what you got again
ogunoye adebamigbe john
@adebamigbejohn
Nov 28 2015 15:50

<style>
.red-text {color: red;}
</style>

<h2 class="red- text">catPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

Rick
@RedNixTV
Nov 28 2015 15:51
is there a space between your ted-text in the h2 element?
I mean it seems like there is an extra space there
Robert Richey
@0x0936
Nov 28 2015 15:53
yep. there's a space after the hyphen in red- text.
Rick
@RedNixTV
Nov 28 2015 15:54
it should not be there
plus is your assignement only asking to have a red text for h2 only or is it asking for your paragraph to be red also?
Rick
@RedNixTV
Nov 28 2015 15:57
0x0936 are you having issue also?
ogunoye adebamigbe john
@adebamigbejohn
Nov 28 2015 15:57

<style>
.red-text {color: red;}
</style>

<h2class="red-text">catPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

Rick
@RedNixTV
Nov 28 2015 15:59

<style>
.red-text {color: red;}
</style>

<h2 class="red- text">catPhotoApp</h2>

adebamigbejohn: did it work?

Robert Richey
@0x0936
Nov 28 2015 15:59
@RedNixTV nope. just showing you the link to the waypoint, because you were asking if the paragraph should also be red
Rick
@RedNixTV
Nov 28 2015 16:00
@0x0936 it seems like you are refering to a different task then the one he is doing
how to get them next t o each other , i am not able to figure out
Hendrik
@Henne37
Nov 28 2015 16:02
What does editor.match(...) is null mean?
Robert Richey
@0x0936
Nov 28 2015 16:05
@RedNixTV this is what he said he's working on :point_up: November 28, 2015 8:37 AM
Rick
@RedNixTV
Nov 28 2015 16:07
@0x0936 good catch thanks
CamperBot
@camperbot
Nov 28 2015 16:07
rednixtv sends brownie points to @0x0936 :sparkles: :thumbsup: :sparkles:
:star: 404 | @0x0936 | http://www.freecodecamp.com/0x0936
Rebecca
@ponsr
Nov 28 2015 16:10
hey all I'm at waypoint: declare string variables with javascript

I'm supposed to change the var firstName and lastName to my name to get it to work, but it's not. what's wrong with this? var firstName = "rebecca";
var lastName = "pons";

// Only change code above this line.

if(typeof(myFirstName) !== "undefined" && typeof(myLastName) !== "undefined"){(function(){return myFirstName + ', ' + myLastName;})();}

nevermind, looks like i wasn't adding "my" on the variable
Aimoré Sá Costa
@aimore
Nov 28 2015 16:23
somone can tell me what can I improve on my website http://codecommunity.info/
I think the twitter button is slowing down when the page is reloaded
Robert Richey
@0x0936
Nov 28 2015 16:27

@ponsr try reading this part again:

Now let's create two new string variables: myFirstName and myLastName and assign them the values of your first and last name, respectively.

boetiusj
@boetiusj
Nov 28 2015 16:27
Hi,
First visit here...
Robert Richey
@0x0936
Nov 28 2015 16:27
hi @boetiusj
info @0x0936
help
CamperBot
@camperbot
Nov 28 2015 16:29

Hi, I'm CamperBot! I can help you in this chatroom :smile:

Basic Commands:

  • find TOPIC find all entries about topic. ex: find js
  • wiki TOPIC show contents of topic page
  • thanks @username send brownie points to another user
  • about @username shows info on that user
  • bonfire BONFIRENAME info on a bonfire

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

RedPandaLeader
@RedPandaLeader
Nov 28 2015 16:29
about @0x0936
CamperBot
@camperbot
Nov 28 2015 16:29
:star: 404 | @0x0936 | http://www.freecodecamp.com/0x0936
boetiusj
@boetiusj
Nov 28 2015 16:29
Thanks. Hit Enter when didn't intend to :) duh - I'm at Waypoint Filter Arrays with filter. My code reads:
codeAndJustCode
@codeAndJustCode
Nov 28 2015 16:29
find topic
CamperBot
@camperbot
Nov 28 2015 16:29

find topic

:zero: topic

Snailsloth
@Snailsloth
Nov 28 2015 16:30
find Unexpected identifier
CamperBot
@camperbot
Nov 28 2015 16:30
find unexpected identifier
nothing found
RedPandaLeader
@RedPandaLeader
Nov 28 2015 16:30
@boetiusj about
boetiusj
@boetiusj
Nov 28 2015 16:30
Start over: Waypoint: Filter Arrays with filter - my code reads: var newArray = oldArray.filter(function(val) {
return val >5;
}); - Any thoughts?
RedPandaLeader
@RedPandaLeader
Nov 28 2015 16:30
about @boetiusj
CamperBot
@camperbot
Nov 28 2015 16:30
:star: 176 | @boetiusj | http://www.freecodecamp.com/boetiusj
Robert Richey
@0x0936
Nov 28 2015 16:31
@RedPandaLeader do you have a specific question?
Aleksander Gębicki
@Takumar
Nov 28 2015 16:31
@boetiusj do you know how filter() works?
Snailsloth
@Snailsloth
Nov 28 2015 16:31
find Waypoint: Target the same element with multiple jQuery Selectors
CamperBot
@camperbot
Nov 28 2015 16:31

find waypoint target the same element with multiple jquery selectors

:zero: waypoint target the same element with multiple jquery selectors

RedPandaLeader
@RedPandaLeader
Nov 28 2015 16:31
Snailsloth
@Snailsloth
Nov 28 2015 16:31
find Unexpected
CamperBot
@camperbot
Nov 28 2015 16:31
find unexpected
nothing found
Aleksander Gębicki
@Takumar
Nov 28 2015 16:32
@boetiusj you have to put into newArray values which are not greater than 5. Yes?
Robert Richey
@0x0936
Nov 28 2015 16:32

@RedPandaLeader

  • Step 1: In the editor, use the Car constructor to create a new instance and assign it to myCar.

  • Step 2: Then give myCar a nickname property with a string value.

RedPandaLeader
@RedPandaLeader
Nov 28 2015 16:32
Step 1: In the editor, use the Car constructor to create a new instance and assign it to myCar.
How do i do this
kevin barrows
@kmbgolf
Nov 28 2015 16:32
Just wondering Im on the Jquery section and it,s slowly starting to click.But should I be taking notes on definitions of .prop and .appendTo or will I be using them enough that they will just be in my head?
Robert Richey
@0x0936
Nov 28 2015 16:33

@RedPandaLeader in the description, it gives an example:

To use a constructor function we call it with the new keyword in front of it like:

var myCar = new Car();

boetiusj
@boetiusj
Nov 28 2015 16:34
@Takumar - No, need values that ARE greater than 5
Aleksander Gębicki
@Takumar
Nov 28 2015 16:34
@boetiusj Your callback function should return true for values which should be putted to newArray and false for values which should not exist in new array.
When you put value 3 to your function it will return false because 3 > 5 is false. So the value of 3 will not be putted to newArray. So think again about condition in your return expression.
Robert Richey
@0x0936
Nov 28 2015 16:35
@boetiusj filter out all the values that are greater than 5, will return a new array with values <= 5
RedPandaLeader
@RedPandaLeader
Nov 28 2015 16:35
@0x0936 got it, did it
Robert Richey
@0x0936
Nov 28 2015 16:35
@RedPandaLeader :)
Marc Fogleman
@MFogleman
Nov 28 2015 16:39
function palindrome(str) {

  str = str.toLowerCase();
  str = str.replace(' ','');
  str = str.replace(/([^A-Za-z0-9])/g,'');
  original = str;

  return (str = str.split('').reverse().join('') == original);

}


palindrome("eye");
So, this works, but being new I have this constant fear that "Wow, this is a janky way of doing this, there is a way better way' using \W in the regex fails to disregard the - in one of the tests. Other then that, am I missing an easier /less stupid way to do this?
texttospeech
@texttospeech
Nov 28 2015 16:41
hey guys, i'm having some weird stuff in "line up form elements reponsively with bootstrap"
i tabbed everything correctly with the divs and nested the input and button in a div row
Aleksander Gębicki
@Takumar
Nov 28 2015 16:41
@CangosGit you don't need this line: str = str.replace(' ','');
texttospeech
@texttospeech
Nov 28 2015 16:41
This message was deleted
<div class="col-xs-7"
    <input type="text" class="form-control" placeholder="cat photo URL" required>
      </div>
      <div class="col-xs-5">
    <button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i> Submit</button>
      </div>
    </div>
Robert Richey
@0x0936
Nov 28 2015 16:42
@CangosGit
str = str.toLowerCase.replace(/\W|_/g, '');
return str === str.split('').reverse().join('');
texttospeech
@texttospeech
Nov 28 2015 16:42
er wait
i didnt paste the whole thing
Hans van Riet
@hansinla
Nov 28 2015 16:42
@CangosGit You can lose this line str = str.replace(' ','’);
texttospeech
@texttospeech
Nov 28 2015 16:42
<div class="row">
      <div class="col-xs-7"
    <input type="text" class="form-control" placeholder="cat photo URL" required>
      </div>
      <div class="col-xs-5">
    <button type="submit" class="btn btn-primary"><i class="fa fa-paper-plane"></i> Submit</button>
      </div>
    </div>
there
that's fixed
why does it not detect the div with the class row, and the div with the class col-xs-7?
boetiusj
@boetiusj
Nov 28 2015 16:43
@0x0936 Here's my code: var newArray = oldArray.filter(function(val) {
return val >5;
});
RedPandaLeader
@RedPandaLeader
Nov 28 2015 16:43

var oldArray = [1,2,3,4,5];

// Only change code below this line.

var newArray = oldArray.map(function(val){
return val * 3;

});

// Only change code above this line.

(function() {return newArray;})();

I dont understand how this is wrong
texttospeech
@texttospeech
Nov 28 2015 16:44
pfft im dumb i didnt put an end angle on the col-xs-7 starting div tag
Hans van Riet
@hansinla
Nov 28 2015 16:44
@texttospeech Did you add jQuery and Bootstrap to your project?
Aleksander Gębicki
@Takumar
Nov 28 2015 16:44
@boetiusj have you read my comments about filter()?
RedPandaLeader
@RedPandaLeader
Nov 28 2015 16:44
@0x0936 thx
CamperBot
@camperbot
Nov 28 2015 16:44
redpandaleader sends brownie points to @0x0936 :sparkles: :thumbsup: :sparkles:
:star: 405 | @0x0936 | http://www.freecodecamp.com/0x0936
Hans van Riet
@hansinla
Nov 28 2015 16:45
@RedPandaLeader Because it said add three not multiply by 3
RedPandaLeader
@RedPandaLeader
Nov 28 2015 16:45
dang it, thanks @hansinla
CamperBot
@camperbot
Nov 28 2015 16:45
redpandaleader sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 654 | @hansinla | http://www.freecodecamp.com/hansinla
SwapnilSShinde
@SwapnilSShinde
Nov 28 2015 16:46
<script>
$(document).ready(function() {});
$("button").addClass("animated bounce");
</script>
i m stuck at this
it gives me this error "Use the jQuery addClass() function to give the classes animated and bounce to your button elements".
boetiusj
@boetiusj
Nov 28 2015 16:46
@Takumar Yes, I have read your comments and appreciate your patience - I'm new to all of this. My code returns values greater than 5 (6,7,8,9,10, - like it should) but get an error: "You should have removed all the values from the array that are greater than 5." What's up?
Hans van Riet
@hansinla
Nov 28 2015 16:46
@SwapnilSShinde Your code should go between { and }
Rebecca
@ponsr
Nov 28 2015 16:47

var firstNameLength = 0;
var lastNameLength = 0;
var firstName = "Ada";

firstNameLength = firstName.length;

var lastName = "Lovelace";
lastNameLength = lastName.length;

// Only change code below this line.

lastNameLength = lastName;

// Only change code above this line.

if(typeof(lastNameLength) !== "undefined"){(function(){return lastNameLength;})();}

hey all I'm very confused how to get length here.
can someone help please
Robert Richey
@0x0936
Nov 28 2015 16:47

@boetiusj

Use filter to remove all elements from array that are greater than 5.

When using filter, it gets passed a function with the current element as an argument. If this function returns true, the current element will be added to the new array. If false is returned, the current element will not be added to the new array.

Aleksander Gębicki
@Takumar
Nov 28 2015 16:47
@boetiusj you have answer in your error message. I tried to tell you the same that you have to remove all values greater than 5 not keep them.
SwapnilSShinde
@SwapnilSShinde
Nov 28 2015 16:48
like this ?"$("button").addClass({"animated bounce"});" @hansinla
Hans van Riet
@hansinla
Nov 28 2015 16:48

@ponsr

lastNameLength = lastName.length;
// Only change code below this line.
lastNameLength = lastName;

the first line goes where the last line is. You overwrite it after you calculated the length

boetiusj
@boetiusj
Nov 28 2015 16:48
@Takumar I'm embarrassed to have made such a dumb mistake. Thank you!
CamperBot
@camperbot
Nov 28 2015 16:48
boetiusj sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 898 | @takumar | http://www.freecodecamp.com/takumar
Hans van Riet
@hansinla
Nov 28 2015 16:48
@SwapnilSShinde No.
<script>
  $(document).ready(function() {
$("button").addClass("animated bounce”);
});

</script>
SwapnilSShinde
@SwapnilSShinde
Nov 28 2015 16:49
@hansinla ohkies..thanks
CamperBot
@camperbot
Nov 28 2015 16:49
swapnilsshinde sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 655 | @hansinla | http://www.freecodecamp.com/hansinla
Rebecca
@ponsr
Nov 28 2015 16:50
@hansinla thank you i didn't know where to put the code!
CamperBot
@camperbot
Nov 28 2015 16:50
ponsr sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 656 | @hansinla | http://www.freecodecamp.com/hansinla
Robert Richey
@0x0936
Nov 28 2015 16:50
Does anyone here have experience with setting up FCC locally? I have a question or two, regarding the .env file
Aleksander Gębicki
@Takumar
Nov 28 2015 16:50
@boetiusj it happens to the best :-)
Hans van Riet
@hansinla
Nov 28 2015 16:51
@ponsr This is usually a great hint
// Only change code below this line.
Rebecca
@ponsr
Nov 28 2015 16:51
@hansinla yeah you would think! I'm just not reading everything like i should be
@hansinla thanks again
CamperBot
@camperbot
Nov 28 2015 16:51
ponsr sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:warning: ponsr already gave hansinla points
Hans van Riet
@hansinla
Nov 28 2015 16:53
@ponsr no problem :-)
Prafull Kumar
@gulzaar
Nov 28 2015 16:54
Stuck in Cannot read property 'length' of null on Waypoint: Target the same element with multiple jQuery Selectors
Robert Richey
@0x0936
Nov 28 2015 16:56
@gulzaar show us your code please
Prafull Kumar
@gulzaar
Nov 28 2015 16:57
@0x0936 whole html or javascript code huh??
Aleksander Gębicki
@Takumar
Nov 28 2015 16:57
@gulzaar only jQuery part should be enough.
Prafull Kumar
@gulzaar
Nov 28 2015 16:57
<script>
$(document).ready(function() {
$("button").addClass("animated bounce");
$(".btn").addClass("animated bounce");
$("#target1").addClass("animated shake btn-primary");

});
</script>
Aleksander Gębicki
@Takumar
Nov 28 2015 16:58
@gulzaar add only one class at a time.
First add the animated class to all elements with type button.
Not animated and bounce.
Please read instruction carefully.
Prafull Kumar
@gulzaar
Nov 28 2015 16:58
but i can't figure out the job : Cannot read property 'length' of null
Robert Richey
@0x0936
Nov 28 2015 16:59
@gulzaar ignore that error - it's a bad description. @Takumar is right to only add one class with each selector
Prafull Kumar
@gulzaar
Nov 28 2015 17:00
@0x0936 @Takumar Thanks
CamperBot
@camperbot
Nov 28 2015 17:00
gulzaar sends brownie points to @0x0936 and @takumar :sparkles: :thumbsup: :sparkles:
:star: 406 | @0x0936 | http://www.freecodecamp.com/0x0936
:star: 899 | @takumar | http://www.freecodecamp.com/takumar
Robert Richey
@0x0936
Nov 28 2015 17:00
:)
boetiusj
@boetiusj
Nov 28 2015 17:02
@Takumar I've gone back to this incomplete Waypoint: Target the same element with multiple jQuery selectors - my coed: <script>
$(document).ready(function() {
$("button").addClass(animated);
$(".btn").addClass(shake);
$("#target1").addClass(shake animated btn-primary);
});
</script> and I get this error: "missing ) after argument list" - any suggestions?
raw1211
@raw1211
Nov 28 2015 17:03
@boetiusj $("#target1").addClass("btn-primary");
it should be like this and put animated and bounce inside " "
Robert Richey
@0x0936
Nov 28 2015 17:05
@boetiusj class names must be quoted
boetiusj
@boetiusj
Nov 28 2015 17:09
@0x0936 Thanks, class names quoted, still get same error ("missing ) after argument list") - here's the code now: <script>
$(document).ready(function() {
$("button").addClass("animated");
$(".btn").addClass("shake"");
$("#target1").addClass("shake animated btn-primary");
});
</script>
Matt Leonard
@matty22
Nov 28 2015 17:10
@boetiusj There's an extra " in your .addClass("shake"); line
Nookx
@Nookx
Nov 28 2015 17:12
Hey Guys im stuck on an html bootstrap excersize here is my code: <div class="row">
<button class="btn btn-block btn-primary">Like</button>
<div class="col-xs-4">
<button class="btn btn-block btn-info">Info</button>
<div class="col-xs-4">
<button class="btn btn-block btn-danger">Delete</button>
<div class="col-xs-4">
The error im getting is Make sure each of your div elements has a closing tag.
any help would be appreciated
Matt Leonard
@matty22
Nov 28 2015 17:13
@Nookx To close a div you use the closing </div> tag.
boetiusj
@boetiusj
Nov 28 2015 17:13
@matty22 Got it! Thanks very much! The lesson: Read carefully, type carefully.
CamperBot
@camperbot
Nov 28 2015 17:13
boetiusj sends brownie points to @matty22 :sparkles: :thumbsup: :sparkles:
:star: 258 | @matty22 | http://www.freecodecamp.com/matty22
Matt Leonard
@matty22
Nov 28 2015 17:13
@boetiusj I believe that the jQuery section also taught me that lesson! :P
Nookx
@Nookx
Nov 28 2015 17:14
Matty Do i do it to all of them like this? <div class="row">
<button class="btn btn-block btn-primary">Like</button>
<div class="col-xs-4"/>
<button class="btn btn-block btn-info">Info</button>
<div class="col-xs-4"/>
<button class="btn btn-block btn-danger">Delete</button>
<div class="col-xs-4"/>
ogunoye adebamigbe john
@adebamigbejohn
Nov 28 2015 17:14
plesae how can you make use of a font monospace
Matt Leonard
@matty22
Nov 28 2015 17:15
@Nookx Like this:
<div class="col-xs-4"> 
     <button blah blah blah></button>
</div>
Fennek
@fennekbe
Nov 28 2015 17:16
jQuery: How can I apply a style to EVERY child (also children of children) with jquery? Google is providing no useful information
Matt Leonard
@matty22
Nov 28 2015 17:17
You want to nest your buttons inside the opening <div> and closing </div>
Nookx
@Nookx
Nov 28 2015 17:17
Thanks Matty22 I got it now.
Matt Leonard
@matty22
Nov 28 2015 17:17
:thumbsup:
ogunoye adebamigbe john
@adebamigbejohn
Nov 28 2015 17:18
please need little help here
Matt Leonard
@matty22
Nov 28 2015 17:18
Go for it @adebamigbejohn
ogunoye adebamigbe john
@adebamigbejohn
Nov 28 2015 17:18

<style>
.red-text {
color: red;
}

p {
font-size: 16px;
}
h2 {font-family: monospace;}
</style>

<h2 class="red-text">CatPhotoApp </h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Matt Leonard
@matty22
Nov 28 2015 17:19
What's the problem?
raw1211
@raw1211
Nov 28 2015 17:19
@adebamigbejohn font-family:Monospace;
ogunoye adebamigbe john
@adebamigbejohn
Nov 28 2015 17:20
i want the p element to use the monospace font
raw1211
@raw1211
Nov 28 2015 17:20
@adebamigbejohn use M instead of m
Aleksander Gębicki
@Takumar
Nov 28 2015 17:21
@boetiusj @adebamigbejohn but it is called Monospace not "monospace".
Hans van Riet
@hansinla
Nov 28 2015 17:21

@adebamigbejohn add

font-family: Monospace;

to your p style

ogunoye adebamigbe john
@adebamigbejohn
Nov 28 2015 17:23
still not working
Bo Sanders
@Biletnikoff
Nov 28 2015 17:23
whats the code paste command ```?
Robert Richey
@0x0936
Nov 28 2015 17:23
wiki format
CamperBot
@camperbot
Nov 28 2015 17:23

:point_right: code format [wiki]

Inline code

This an inline `<paste code here>` code formatting with a single backtick(`) at start and end around the code.

Code Block

``` ⇦ Type 3 backticks and then press [shift + enter ⏎]

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

How to Code

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code format on the FCC Wiki

Hans van Riet
@hansinla
Nov 28 2015 17:24
@adebamigbejohn show your code and when you say it’s not working, what errors do you get?
raw1211
@raw1211
Nov 28 2015 17:24
@Biletnikoff use ``` above and below ur code
Aimoré Sá Costa
@aimore
Nov 28 2015 17:24
hello @Takumar @matty22 @raw1211 @matty22 @fennekbe how can I make the twitter share the random quote generated by the js command:
http://codepen.io/aimore/pen/VvoLjz
Bo Sanders
@Biletnikoff
Nov 28 2015 17:24
function each(collection,callback){
  for(var i = 0;i<collection.length;i++)
        callback(collection[i]);
}
function filter(collection,test){
  result = [];
    each(collection,function(x){
      if(test(x))
      result.push(x);
    })
}
cool
is that the right manual filter?
i forgot return result
Charles Mitchell
@cmansetmitchell
Nov 28 2015 17:25
having some trouble splitting a string by its spaces. here is the code i have. var newArray = oldArray.filter(function(val){
return val < 5;
});
Nookx
@Nookx
Nov 28 2015 17:25
Anyone know the hotkey to get rid of overtype in the text-editor? on freecodecamp
Hans van Riet
@hansinla
Nov 28 2015 17:25
@aimore Google twitter intent, that’s the easiest way to go
raw1211
@raw1211
Nov 28 2015 17:25
This message was deleted
Charles Mitchell
@cmansetmitchell
Nov 28 2015 17:25
whoops sorry here is what i have var array= string.split();
@raw1211 not sure I understand why that would work
raw1211
@raw1211
Nov 28 2015 17:26
@cmansetmitchell what u do u want to do?
Aimoré Sá Costa
@aimore
Nov 28 2015 17:26
@hansinla can I make a button to display the random quote?
Charles Mitchell
@cmansetmitchell
Nov 28 2015 17:26
split a string by its spaces
Aimoré Sá Costa
@aimore
Nov 28 2015 17:26
if yes how?
raw1211
@raw1211
Nov 28 2015 17:26
@cmansetmitchell why are u using filter then..
Robert Richey
@0x0936
Nov 28 2015 17:27
@cmansetmitchell split takes an argument of what you want to split by. if by spaces, pass in a string literal space, " "
Charles Mitchell
@cmansetmitchell
Nov 28 2015 17:27
sorry please disregard my first post. this is the code i have ---- var array = string.split();
raw1211
@raw1211
Nov 28 2015 17:27
@cmansetmitchell to split by spaces use var newarr=string.split(" ");
@cmansetmitchell put space inside
Charles Mitchell
@cmansetmitchell
Nov 28 2015 17:27
ah ok thank you so much that is very simple
raw1211
@raw1211
Nov 28 2015 17:27
haha
Hans van Riet
@hansinla
Nov 28 2015 17:28
@aimore I’m not sure what you’re asking, your twitter button already works, just make sure that when your page loads, you generate a quote so that text field has content, and then use document.getElementById('output’).text() to get the content
Aimoré Sá Costa
@aimore
Nov 28 2015 17:30
@hansinla $('a').attr('href', 'http://twitter.com?status=' + quoteList[store]);
```$('a').attr('href', 'http://twitter.com?status=' + quoteList[store]);````
$('a').attr('href', 'http://twitter.com?status=' + quoteList[store]);
Fennek
@fennekbe
Nov 28 2015 17:54

jQuery: I have multiple buttons names Toggle1 to toggle10.
Is there a way to adress more than 1 toggle button at the same time?
Example below:

$(".toggle1").click(function(){

Could I do something like this?

$(".toggle1 .toggle2 .toggle3").click(function(){

toggle 1, 2 and 3 should have the same click function, but I don't want to copy paste my code 3 times

Aleksander Gębicki
@Takumar
Nov 28 2015 18:02
@fennekbe maybe your buttons should have different IDs and the same class toogle, so you could work on it using just $(".toogle").click(function() ...
Fennek
@fennekbe
Nov 28 2015 18:03
@Takumar The thing is that eventually they should have slightly different functions. This is just for testing purposes
Aleksander Gębicki
@Takumar
Nov 28 2015 18:04
@fennekbe and you cannot access them using id? $("#toogle1").click(...
<button id="toogle1" class="toogle">
Fennek
@fennekbe
Nov 28 2015 18:04
@Takumar I guess I could, but wont the result be the same?
Aleksander Gębicki
@Takumar
Nov 28 2015 18:05
@fennekbe oh, I haven't noticed that you want to assign click() to only three first buttons.
@fennekbe try separating them with commas.
$(".toogle1, .toogle2, .toogle3").click...
Fennek
@fennekbe
Nov 28 2015 18:07
@Takumar Someone from the other room suggested that, but didn't work unfortunately
Aleksander Gębicki
@Takumar
Nov 28 2015 18:09
@fennekbe try:
$("button.toogle1, button.toogle2, button.toogle3").click...
Fennek
@fennekbe
Nov 28 2015 18:09
@Takumar They actually aren't buttons, rather just <a>
Aleksander Gębicki
@Takumar
Nov 28 2015 18:10
@fennekbe so a.toogle1 just element.name_of_class
Fennek
@fennekbe
Nov 28 2015 18:11
@Takumar Tried, didn't work, and broke first button too :(
Aleksander Gębicki
@Takumar
Nov 28 2015 18:21

@fennekbe I just tried to write some code:

<!doctype html>
  <head>
    <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
  </head>
  <body>
    <a href="#" class="toogle1">link 1</a>
    <a href="#" class="toogle2">link 2</a>
    <a href="#" class="toogle3">link 3</a>
   <script>
    $(document).ready(function() {
      $("a.toogle1, a.toogle2").click(function() { alert("Ok"); });
    });
  </script>
  </body>
</html>

And guess what? It works for me ;-)

Fennek
@fennekbe
Nov 28 2015 18:22
@Takumar I'm too afraid to tell at this point
Someone from the other group figured it out a moment ago
Aleksander Gębicki
@Takumar
Nov 28 2015 18:22
@fennekbe there was an error in other place?
Fennek
@fennekbe
Nov 28 2015 18:22
I wrote .toggle in my class. I'm retarded as fuck
Aleksander Gębicki
@Takumar
Nov 28 2015 18:22
@fennekbe ;-) It happens.
Fennek
@fennekbe
Nov 28 2015 18:23
I was completely puzzled as to why my inspect element would say a..toggle2
instead of just a.toggle2
Aleksander Gębicki
@Takumar
Nov 28 2015 18:24
@fennekbe what a pity, that you didn't show your code.
Fennek
@fennekbe
Nov 28 2015 18:25
@Takumar I didn't because I was sure it was just an error in my jquery. I'm supposed to be good at html and css already
Shame on me
Aleksander Gębicki
@Takumar
Nov 28 2015 18:26
@fennekbe ok, thanks, I also learned something, I haven't tried adding function to many classes before.
CamperBot
@camperbot
Nov 28 2015 18:26
takumar sends brownie points to @fennekbe :sparkles: :thumbsup: :sparkles:
:star: 221 | @fennekbe | http://www.freecodecamp.com/fennekbe
Michael Chandler
@MMChandler
Nov 28 2015 18:28
@fennekbe Everyone makes mistakes like that sometimes, even experienced coders. I wouldn't worry about it. Chalk it up to wisdom gained.
Fennek
@fennekbe
Nov 28 2015 18:28
Haha for sure. I won't make that mistake again @MMChandler
Aleksander Gębicki
@Takumar
Nov 28 2015 18:34
@fennekbe although it would be nice if you would give me a brownie for my time :-)
Fennek
@fennekbe
Nov 28 2015 18:34
haha ofcourse, thanks @Takumar
Robert Richey
@0x0936
Nov 28 2015 18:34
Does anyone here have experience setting up FCC locally? I have some questions about the .env file, and I'm giving away brownie points for help.
Fennek
@fennekbe
Nov 28 2015 18:34
@Takumar thank
CamperBot
@camperbot
Nov 28 2015 18:34
fennekbe sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 901 | @takumar | http://www.freecodecamp.com/takumar
CompGeekGirl
@LisaRamos
Nov 28 2015 18:40

I've solved the issue with exercise 3 of OOP and Functional programming but I don't get the bottom instruction of the exercise. Here are the instructions:

-The property wheels should still be 4 in the object constructor.
-There should not be a property nickname in the object constructor.
-The property wheels of myCar should equal 4.
-The property nickname of myCar should be a string

And here's my new code:

var Car = function() {
this.wheels = 4;
this.engines = 1;
this.seats = 1;
};

// Only change code below this line.

var myCar = new Car();

What does it mean by nickname?

Andrew Bechini
@powhunter158
Nov 28 2015 18:41
Screen Shot 2015-11-28 at 1.40.31 PM.png
The result of myFunction should be a whole number.
having trouble with this step
raw1211
@raw1211
Nov 28 2015 18:45
@powhunter158 return Math.floor(Math.random()*10);
Robert Uivarosi
@URobert
Nov 28 2015 18:45
@LisaRamos You have to add a new property (called nickname) to myCar object
raw1211
@raw1211
Nov 28 2015 18:45
@LisaRamos myCar.nickname="audi";
Michael Chandler
@MMChandler
Nov 28 2015 18:46
@LisaRamos Hmm, if i remember the exercise correctly it's something like myCar.nickname = "someName";
Robert Uivarosi
@URobert
Nov 28 2015 18:46
@raw1211 mate, I don't think spoon feeding is that great
raw1211
@raw1211
Nov 28 2015 18:47
@URobert yaa...my mistake
CompGeekGirl
@LisaRamos
Nov 28 2015 18:47
@MMChandler I got it. Thanks.
CamperBot
@camperbot
Nov 28 2015 18:47
lisaramos sends brownie points to @mmchandler :sparkles: :thumbsup: :sparkles:
:star: 209 | @mmchandler | http://www.freecodecamp.com/mmchandler