These are chat archives for FreeCodeCamp/Help

3rd
Oct 2015
Alessandro Metta
@n0f3
Oct 03 2015 00:55
hi all
Rex Schrader
@SaintPeter
Oct 03 2015 00:56
hey hey
Alessandro Metta
@n0f3
Oct 03 2015 00:56
trying to retrieve a number of channels from the stream GET url, but having trouble with it
according to the documentation, it should return objects for all the channels, but the streams array in the response is empty for whatever reason
not really sure why
Rex Schrader
@SaintPeter
Oct 03 2015 00:57
@n0f3 I don't think you can retrieve multiple streams at once. I know that in mine and in every one I've ever looked at, you have to make 2 API calls per channel.
@n0f3 One to get the channel/user info and one to get the stream info (assuming they are streaming)
Alessandro Metta
@n0f3
Oct 03 2015 00:58
Screen Shot 2015-10-02 at 5.58.09 PM.png
why do they have that in the documentation then
cause it's really confusign
in their example they have a number of channels and it returns a proper array
then you try and it's empty...
i could also be misunderstanding their API
Sage C
@scharolia87
Oct 03 2015 01:05
I'm getting a program execution error in this one.

function factorialize(num) {
var fact = num;
//var sum = num;
if num == 0
{
return 1;
}
else
{
while(num>0)
{
fact=fact*num-1;
num--;
}
return fact;
}
}

factorialize(5, '');

Any ieas?
Alessandro Metta
@n0f3
Oct 03 2015 01:06

you can do instead of

fact=fact*num-1;
num--;

just fact *= --num;
if(num===0)
Herman Fassett
@HermanFassett
Oct 03 2015 01:07
A for loop would be best
Alessandro Metta
@n0f3
Oct 03 2015 01:08
the while is fine
factorialize(5)
no need for the additional param
Sage C
@scharolia87
Oct 03 2015 01:08
Oh ok
Alessandro Metta
@n0f3
Oct 03 2015 01:08
other than that it's good
Sage C
@scharolia87
Oct 03 2015 01:08
It was parenthesis around num==0
Alessandro Metta
@n0f3
Oct 03 2015 01:08
oh gotcha, sorry didn't show in the message :)
Sage C
@scharolia87
Oct 03 2015 01:09
If (num==0) works to run the code
But its not passing all the tests
Alessandro Metta
@n0f3
Oct 03 2015 01:10
when you compare the value you want to do === so it's strictly equal
otherwise it may give you back some false positives
Sage C
@scharolia87
Oct 03 2015 01:10
Oh k
Alessandro Metta
@n0f3
Oct 03 2015 01:10
i.e. object == string
(i think, someone can correct me if i'm mistaken there)
Herman Fassett
@HermanFassett
Oct 03 2015 01:11

Something like

function factorialize(num) {
  var result = 1;
  for (var i = 1; i <= num; i++)
    result = result*i;
  return result;
}
factorialize(5);

would be easier imho

Alessandro Metta
@n0f3
Oct 03 2015 01:11
could be easier to read yeah, but her logic is sound
Sage C
@scharolia87
Oct 03 2015 01:12
His* lol
Alessandro Metta
@n0f3
Oct 03 2015 01:12
yeah was gonna ask
sorry lol
i'm not familiar with the name sage, wasn't sure of gender
my apologies
what's it failing on?
Sage C
@scharolia87
Oct 03 2015 01:13
Giving me wrong answer. I'll look at it some more. And herman that for loop looks good. I just wanted to try it with while.
Alessandro Metta
@n0f3
Oct 03 2015 01:15
oh i know what's wrong
while(num>=1)
you can skip the last one, since it just multiplies with 1, and --num will make it so that you get zero before the while gets to check for the value once more, resulting in a return of 0
hope it makes sense
Sage C
@scharolia87
Oct 03 2015 01:18
Yes that makes sense to save it from doing that extra wrok.
Im gettin 566 for the answer
for 5!
Alessandro Metta
@n0f3
Oct 03 2015 01:19
try to console.log(fact) and console.log(num) to make sure that they are being decremented/incremented properly
Hans van Riet
@hansinla
Oct 03 2015 01:28
@scharolia87 Look at what is happening here: fact=fact*num-1; the first time it runs through the loop.
Sage C
@scharolia87
Oct 03 2015 01:31
fact=20?
Hans van Riet
@hansinla
Oct 03 2015 01:35
@scharolia87 You set fact to num which is 5. Then you multiply 5*5 and subtract 1 which is 24. Your num— needs to go somewhere else in your while loop and then your multiplicfation becomes cleaner. As suggested before when dbugging your code, use console.log a lot to see what’s going on in your code.
Alessandro Metta
@n0f3
Oct 03 2015 01:36
fact*=--num;
fact = fact * --num;
as you had it, order of operation actually matters, as @hansinla said, when you write fact = fact * num - 1, what do you think happens?
Sage C
@scharolia87
Oct 03 2015 01:38
Ok. I see it. But why would it be doing 5*5 if its subtracting 1 at num-1?
Alessandro Metta
@n0f3
Oct 03 2015 01:38
@scharolia87 compare fact = fact (num-1); with fact = fact num - 1;
Hans van Riet
@hansinla
Oct 03 2015 01:38
@n0f3 It’s doing the multiplication first, following math rules.
Alessandro Metta
@n0f3
Oct 03 2015 01:38
order of operation
yeah
multiplications and divisions execute first from left to right
Sage C
@scharolia87
Oct 03 2015 01:39
I tried it with parenthesis too but it didnt make a difference
Alessandro Metta
@n0f3
Oct 03 2015 01:39
if you do with parenthesis, it would wait until num -1 finished, before multiplying the result
so it would be 5 * (5 - 1)
Hans van Riet
@hansinla
Oct 03 2015 01:39
@scharolia87 if the parenthesis are at the right place, it would work.
Alessandro Metta
@n0f3
Oct 03 2015 01:39
5 * 4
fact = fact * (num - 1);
num--;
while(num >= 1)
or simplier, fact = fact * (--num);
Hans van Riet
@hansinla
Oct 03 2015 01:40
@scharolia87 or
num--;
fact = fact * num;
Alessandro Metta
@n0f3
Oct 03 2015 01:41
yeah, as mentioned above, can be inlined as well, up to you :)
--num executes the subtraction right away
num-- will do it on the following line
pre vs post increment subtleties
Hans van Riet
@hansinla
Oct 03 2015 01:43
@scharolia87 but you’ll have to change the while condition slightly.
Sage C
@scharolia87
Oct 03 2015 01:43
var fact = num;
//var sum = num;
if (num === 0)
{
return 1;
}
else
{
while(num>=1)
{
fact*=--num;
}
return fact;
}
}
Idid this and now its giving me -
0
Does it mean theres no way to do this with While loop?
Got it!!!
Thank you guys
CamperBot
@camperbot
Oct 03 2015 01:47
if you want to thank someone, put an @ before their name!
Sage C
@scharolia87
Oct 03 2015 01:47
Thank you @hansinla @n0f3 @HermanFassett
CamperBot
@camperbot
Oct 03 2015 01:47
scharolia87 sends brownie points to @hansinla and @n0f3 and @hermanfassett :sparkles: :thumbsup: :sparkles:
:star: 241 | @n0f3 | http://www.freecodecamp.com/n0f3
:star: 404 | @hansinla | http://www.freecodecamp.com/hansinla
:star: 283 | @hermanfassett | http://www.freecodecamp.com/hermanfassett
Alessandro Metta
@n0f3
Oct 03 2015 01:48
@scharolia87 while > 1
sorry
Sage C
@scharolia87
Oct 03 2015 01:48
My final while loop
while(num>1)
{
fact=fact*(num-1);
num--;
}
Alessandro Metta
@n0f3
Oct 03 2015 01:48
strictly greater
yeah
:)
you don't need the final multiply anyway
:)
Sage C
@scharolia87
Oct 03 2015 01:48
Yea
What should i do with it?, should we use jquery? because it says that we have to store to slotTwo, slotThree, slotOne
Alessandro Metta
@n0f3
Oct 03 2015 01:51
no need for jquery
Yosafat Ariel
@yoskakomba
Oct 03 2015 01:52
please give me a simple hints or explanation, thanks
CamperBot
@camperbot
Oct 03 2015 01:52
if you want to thank someone, put an @ before their name!
Yosafat Ariel
@yoskakomba
Oct 03 2015 01:52
@n0f3 thanks
CamperBot
@camperbot
Oct 03 2015 01:52
yoskakomba sends brownie points to @n0f3 :sparkles: :thumbsup: :sparkles:
:star: 242 | @n0f3 | http://www.freecodecamp.com/n0f3
Alessandro Metta
@n0f3
Oct 03 2015 01:52
var slotOne;
var slotTwo;
var slotThree;
those are the variables, they are already initalized for you
front end is handled for you
you just need to fill in those with numbers
// Only change code below this line.
// Only change code above this line.
so you use the formula given to you
to generate three numbers
which then you need to store in the aforementioned variables
Yosafat Ariel
@yoskakomba
Oct 03 2015 01:54
oh okay so it will be var slotOne =
Alessandro Metta
@n0f3
Oct 03 2015 01:54
no need for repeating var again
that's only for initial declaration
so it would be something like slotOne = [insert math random function here];
Yosafat Ariel
@yoskakomba
Oct 03 2015 01:55
with each slot?
Alessandro Metta
@n0f3
Oct 03 2015 01:55
yeah
Yosafat Ariel
@yoskakomba
Oct 03 2015 01:55
okay, I got it now
Alessandro Metta
@n0f3
Oct 03 2015 01:55
same repeat for slotTwo =, slotThree=
:)
Yosafat Ariel
@yoskakomba
Oct 03 2015 01:55
thanks alot @n0f3
CamperBot
@camperbot
Oct 03 2015 01:55
yoskakomba sends brownie points to @n0f3 :sparkles: :thumbsup: :sparkles:
:warning: yoskakomba already gave n0f3 points
Alessandro Metta
@n0f3
Oct 03 2015 01:56
yeah np
Yosafat Ariel
@yoskakomba
Oct 03 2015 02:01
Hello guys, what is the best mobile browser to learn at freecodecamp, because I am addicted to this and I want to learn it via smartphone while I am away from my laptp
thepang
@thepang
Oct 03 2015 02:02
iOs hasn't been that great. I tried to use my ipad, but I can't seem to submit stuff by pressing the "run test" button.
Yosafat Ariel
@yoskakomba
Oct 03 2015 02:03
my phone is android
gitter on phone too
using uc browser I can't type code
now I am trying firefox
bitbybit42
@bitbybit42
Oct 03 2015 02:08
Can anyone give me a hint for Bonfire: Factorialize a Number? I've been trying to crack it for days.
I think I'm struggling with the math itself more than how to write the code
Alexandrix Ikechukwu
@SpaghettiThots
Oct 03 2015 02:10
@bitbybit42 Do you know factorails?
*factorials
bitbybit42
@bitbybit42
Oct 03 2015 02:12
I mean I get the principle I just can't get it to loop properly
Jason
@Jauble
Oct 03 2015 02:12
Is there a way to find out if someone is in one of these chat rooms? I'm gonna tell a friend about FCC, and I want him to be able to find me, and vice versa.
thepang
@thepang
Oct 03 2015 02:14
They can search in the search bar in the upper right hand corner by your username and if they click it, I think they can see if you are online
bitbybit42
@bitbybit42
Oct 03 2015 02:16
Sorry I'm being so vague. Here's a screenshot http://postimg.org/image/y5x25h45l/
I know the code in the while loop is wrong, I just can't figure out what would work
Jason
@Jauble
Oct 03 2015 02:18
@thepang Do you know what the add does?
When you search for someone
I noticed there's a lock by your name. I'm guessing that add tells them you want to add them as a friend
thepang
@thepang
Oct 03 2015 02:23
@Jauble Not sure, I don't really use the feature myself. I tried searching for you and clicked on your name and it added you on the column on the left so I could quickly send you a private text if I wanted to, which is probably good enough for you and your friend
Jason
@Jauble
Oct 03 2015 02:25
@thepang True. I noticed that everyone's dot seems to be orange and mine is green. I'm guessing that if they add me, they would be able to tell if I'm online too. I'll just tell them to search for me and add me. Thanks
CamperBot
@camperbot
Oct 03 2015 02:25
jauble sends brownie points to @thepang :sparkles: :thumbsup: :sparkles:
:star: 196 | @thepang | http://www.freecodecamp.com/thepang
thepang
@thepang
Oct 03 2015 02:26
@bitbybit42 There seem to be a few things that look off with your code. I think the biggest issue is it looks like your while loop will never end.
bitbybit42
@bitbybit42
Oct 03 2015 02:34
I think I need it to perpetually reassign num to num-- while multiplying it all together
But I have no clue how to express that
thepang
@thepang
Oct 03 2015 02:36
@bitbybit42 How about a different variable? Trying to do everything with "num", is I think why you might be having some issues.
Like if you walk through your code with five, the first time around, it will skip the first two if statements, and enter the while loop since 5 > 1, the first line will then set num to 20 (since 5 x 4), it will check the while statement and see that 20 is greater than 1 and then will set num to whatever 20 x 19 is (since it entered the while statement with num = 20) and now you can see that it's clearly stuck in a loop that doesn't do what you are expecting it to do
Adam Doyle
@Adoyle2014
Oct 03 2015 02:39
anyone working on pairwise that would want to pair up. I have 2 tests passed but am starting to confuse myself :confused:
thepang
@thepang
Oct 03 2015 02:43
@bitbybit42 Hope that helps. I have to go.
bitbybit42
@bitbybit42
Oct 03 2015 02:51
thanks @thepang I'll keep poking at it
CamperBot
@camperbot
Oct 03 2015 02:51
bitbybit42 sends brownie points to @thepang :sparkles: :thumbsup: :sparkles:
:star: 197 | @thepang | http://www.freecodecamp.com/thepang
Anyone else unable to move their cursor past the "<" on line 30 here: http://www.freecodecamp.com/challenges/waypoint-make-dead-links-using-the-hash-symbol
OverTheNeptune
@OverTheNeptune
Oct 03 2015 02:59
@bitbybit42 thepang pretty much nailed why you're code isn't working. Declare another variable for storing your result and your code should work. var result = 1;. Then use that inside your loop result = result * num--;
tva10
@tva10
Oct 03 2015 02:59
@leedmurdock It works normal for me
leemurdock
@leemurdock
Oct 03 2015 03:01
Thanks for the response @tva10 . I'll try it a seventh time.
CamperBot
@camperbot
Oct 03 2015 03:01
leedmurdock sends brownie points to @tva10 :sparkles: :thumbsup: :sparkles:
:star: 282 | @tva10 | http://www.freecodecamp.com/tva10
tva10
@tva10
Oct 03 2015 03:03
@leedmurdock if you cannot' edit code there, try to reset task, or clear cache
Sage C
@scharolia87
Oct 03 2015 03:15
@bitbybit42 I just finished doing this one. You're on the right track but everytime you run num =num*num-- you're changing the number and you're not going down.
Jay Patel
@jaypatel815
Oct 03 2015 03:35
I'm unable to give my div element the background color gray http://freecodecamp.com/challenges/waypoint-give-a-background-color-to-a-div-element
Hugo
@hugoender
Oct 03 2015 03:38
@jaypatel815 post your code here so we can review it and help you figure it out
help format
CamperBot
@camperbot
Oct 03 2015 03:38

:point_right: code formatting [wiki]

Inline code

alt text

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 ⏎]

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

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

Jay Patel
@jaypatel815
Oct 03 2015 03:42
@camperbot what do you mean I send the code to you?
Hugo
@hugoender
Oct 03 2015 03:43
@jaypatel815 lol no I asked him to show the formatting guide to pasting code in this chat so that you could see how to paste the code in here
@jaypatel815 the back ticks are the ones located above the tab key on your keyboard
Jay Patel
@jaypatel815
Oct 03 2015 03:45
.gray-background {background-color: gray; }
@hugoender there you go
Hugo
@hugoender
Oct 03 2015 03:47
@jaypatel815 that looks good
so now did you add that class to your div element?
Jay Patel
@jaypatel815
Oct 03 2015 03:48
yea but it doesn't work
Hugo
@hugoender
Oct 03 2015 03:48
and I am assuming you placed that line of code inside your <style>
Jay Patel
@jaypatel815
Oct 03 2015 03:48
yea
Hugo
@hugoender
Oct 03 2015 03:48
@jaypatel815 how about you paste all of your code
Jay Patel
@jaypatel815
Oct 03 2015 03:48
from my style element?
Hugo
@hugoender
Oct 03 2015 03:48
@jaypatel815 EVERYTHING
Jay Patel
@jaypatel815
Oct 03 2015 03:48
okay
Hugo
@hugoender
Oct 03 2015 03:49
@jaypatel815 select all of it and copy and paste it
we will have you on your way to your next waypoint in no time! :)
Jay Patel
@jaypatel815
Oct 03 2015 03:49
<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>
thanks
CamperBot
@camperbot
Oct 03 2015 03:50
if you want to thank someone, put an @ before their name!
Hugo
@hugoender
Oct 03 2015 03:50
@jaypatel815 I do not see your .gray-background class in there
@jaypatel815 and i dont see it inside your div element either
Jay Patel
@jaypatel815
Oct 03 2015 03:51
ohh I deleted because I thought it was wrong
let me put it in again
Hugo
@hugoender
Oct 03 2015 03:51
@jaypatel815 lol well put it back in and then copy and paste everything again
@jaypatel815 code with confidence! you’re not wrong…the website is wrong!
;)
@jaypatel815 just as an FYI… if you click on someone’s name in the chat it will automatically copy it into your text box. This notifies the person you are talking to that you said their name (in case they have the window minimized or are in another chatroom)
Jay Patel
@jaypatel815
Oct 03 2015 03:54
@hugoender ohh thanks
CamperBot
@camperbot
Oct 03 2015 03:54
jaypatel815 sends brownie points to @hugoender :sparkles: :thumbsup: :sparkles:
:star: 213 | @hugoender | http://www.freecodecamp.com/hugoender
Jay Patel
@jaypatel815
Oct 03 2015 03:55
@hugoender lol what is browine points
Hugo
@hugoender
Oct 03 2015 03:55
help brownie points
CamperBot
@camperbot
Oct 03 2015 03:55

:point_right: brownie points [wiki]

The number beside your picture on Free Code Camp tells you how many Brownie Points you have.

A user profile picture next to a with Brownie Points score

There are three ways you can get Brownie Points:

  1. Complete challenges - you get one point per challenge you complete
  2. Post relevant links on Camper News - you get 1 point for posting a link, and another point for each upvote your link gets
  3. Help other campers in chat - each time you help another camper and they thank you (by typing "thanks @yourname"), you will get a point

Brownie Points help you look like the kind of person who codes a lot, shares relevant links, and helps people.

They also add to your Streak.
:pencil: read more about brownie points on the FCC Wiki

Jay Patel
@jaypatel815
Oct 03 2015 03:55
brownie*
ohh yea
Hugo
@hugoender
Oct 03 2015 03:56
@jaypatel815 alright lets see that code of yours! need to go to bed
wife is getting angry lol
Jay Patel
@jaypatel815
Oct 03 2015 03:56
okay

```<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;
}

div .gray-background {
background-color: gray;
}
</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>
<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>

```

<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;
  }

  div .gray-background {
    background-color: gray;
  }
</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>
<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>
Hugo
@hugoender
Oct 03 2015 04:00
@jaypatel815 technically you do not need to put div in front of .gray-background in the style section
@jaypatel815 but its okay. what you are missing is assigning the .gray-background class to the div element tag
Jay Patel
@jaypatel815
Oct 03 2015 04:00
yea I tried both putting div and without it but still didn't work
ohhh I see
Hugo
@hugoender
Oct 03 2015 04:01
@jaypatel815 so in the <style> section you created the class and gave it it’s properties. Now in the <div> tag you need to specify what class the <div> element should have
Jay Patel
@jaypatel815
Oct 03 2015 04:02
okay
Hugo
@hugoender
Oct 03 2015 04:02
@jaypatel815 ONWARDS TO THE NEXT WAYPOINT!
Jay Patel
@jaypatel815
Oct 03 2015 04:02
thanks for the help
CamperBot
@camperbot
Oct 03 2015 04:02
if you want to thank someone, put an @ before their name!
Hugo
@hugoender
Oct 03 2015 04:02
no problem
now its time for bed. good night
Jay Patel
@jaypatel815
Oct 03 2015 04:02
goodnight
OverTheNeptune
@OverTheNeptune
Oct 03 2015 04:04
@jaypatel815 You get it working?
vere perrot
@perrot
Oct 03 2015 04:11
Hi,
When I study the unit "Waypoint: Store Data in MongoDB", I get an error message "MongoError: server localhost:27017 sockets closed" in the learning item '17. Complete "Find"'. And how to fix this problem? Thanks.
CamperBot
@camperbot
Oct 03 2015 04:11
if you want to thank someone, put an @ before their name!
Chris Phillips
@christoph-phillips
Oct 03 2015 04:12
Hi guys can anyone point me to where I can get help on making the tweet button for the random quote generator to tweet out the specific quote I have displayed?
Risle
@Risle
Oct 03 2015 04:13
@christoph-phillips twitter documentation help me out a lot if you haven't tried that already.
the last link is generator, may be that help you
Chris Phillips
@christoph-phillips
Oct 03 2015 04:15
thanks guys
CamperBot
@camperbot
Oct 03 2015 04:15
if you want to thank someone, put an @ before their name!
Chris Phillips
@christoph-phillips
Oct 03 2015 04:16
thanks @tva10
CamperBot
@camperbot
Oct 03 2015 04:16
christoph-phillips sends brownie points to @tva10 :sparkles: :thumbsup: :sparkles:
:star: 283 | @tva10 | http://www.freecodecamp.com/tva10
Rex Schrader
@SaintPeter
Oct 03 2015 04:16
@christoph-phillips I strongly advise against using their javascript to generate a button - it creates an iframe which cannot be modified after it has been created.
tva10
@tva10
Oct 03 2015 04:22
@SaintPeter ou, sorry, really don't know this about Iframe
vere perrot
@perrot
Oct 03 2015 04:32
Hi,When I study the unit "Waypoint: Store Data in MongoDB", I get an error message "MongoError: server localhost:27017 sockets closed" in the learning item '17. Complete "Find"'. And how to fix this problem? This is my code:
var mongo = require('mongodb').MongoClient
console.log(process.argv[2]);
mongo.connect('mongodb://localhost:27017/learnyoumongo', function(err, db) {
// db gives access to the database
var c=db.collection('parrots');
//{ age: { $gt: parseInt(process.argv[2]) } }
c.find().toArray(function(err, documents) {
console.log(err);
})
db.close()
})
tva10
@tva10
Oct 03 2015 04:34
@perrot Is mongoDB process started without issues?
vere perrot
@perrot
Oct 03 2015 04:36
Yes, there are no error message . I start mongoDB process by the command 'mongod --port 27017 --dbpath=./data --nojournal'
tva10
@tva10
Oct 03 2015 04:43
@perrot soooo may be you close db after answer of c.find()
I think you need to try remove db.close() and put it in to your call back.
or remove it all, and may be mongoclient close it automatically
@perrot
var mongo = require('mongodb').MongoClient
console.log(process.argv[2]);
mongo.connect('mongodb://localhost:27017/learnyoumongo', function(err, db) {
// db gives access to the database
var c=db.collection('parrots');
//{ age: { $gt: parseInt(process.argv[2]) } }
c.find().toArray(function(err, documents) {
console.log(err);
db.close();
});
//db.close(); // that excec earlier than c.find callback
});
M Used
@mildused
Oct 03 2015 04:45
Hi can someone help me with Node? I want to start a project.
tva10
@tva10
Oct 03 2015 04:48
@mildused If you whant to make hello world there, make js file and exec them nodejs file.js
M Used
@mildused
Oct 03 2015 04:48
Umm. Not hello world lol
tva10
@tva10
Oct 03 2015 04:48
@mildused If you want more look in waypoint's tasks
M Used
@mildused
Oct 03 2015 04:48
An actual project with authentication and other features
Wait... I wanted to look for a partner to help me with the backend because I'm using ReactJS for the frontend and need help with Node passport
Jason
@Jauble
Oct 03 2015 04:50
Anyone know how I can improve this?
function where(arr, num) {
  var newArray = arr.sort(function(a,b) {
    return a-b;
  });
  for (var i = 0; i < newArray.length; i++) {
    if (i === 0 && newArray[i] > num) {
      return num = i;
    }
    else if (newArray[i] === num) {
      return num = i;
    }
    else if (newArray[i] < num && newArray[i+1] > num) {
      return num = i+1;
    }
    else if (i === newArray.length - 1) {
      return num = i+1;
    }
  }
}

where([5, 3, 20, 3], 3, "");
tva10
@tva10
Oct 03 2015 04:51
@Jauble I prefer to use .reduce() there
@mildused so can't help you now. I'm not started this waypoint yet//
M Used
@mildused
Oct 03 2015 04:52
It's not a waypoint though
It's an outside project I want to work on
For me
never mind
tva10
@tva10
Oct 03 2015 04:53
@mildused I never used Node js before for projects
for real project
Jason
@Jauble
Oct 03 2015 04:53
Hmm... i'm not familiar with reduce
I'll check it out. Thanks @tva10
CamperBot
@camperbot
Oct 03 2015 04:54
jauble sends brownie points to @tva10 :sparkles: :thumbsup: :sparkles:
:star: 284 | @tva10 | http://www.freecodecamp.com/tva10
tva10
@tva10
Oct 03 2015 04:55
@Jauble I think you can make this loop easier like this:
arr.sort(....)
for(var i=0, n=arr.length;i<n;i++){
    if(num<=arr[i]) return i;
  }
  return i;
vere perrot
@perrot
Oct 03 2015 05:01
@tva10 Thank you so much.
I remove "db.close();", then test my program by the command "node solution.js 10".
It prints [] then hangs in the terminal.
var mongo = require('mongodb').MongoClient;
//console.log(process.argv[2]);
    mongo.connect('mongodb://localhost:27017/learnyoumongo', function(err, db) {
      // db gives access to the database
      var c=db.collection('parrots');
      //
      c.find({ age: { $gt: parseInt(process.argv[2]) } }).toArray(function(err, documents) {
    //console.log(documents);
    });
    });
    //db.close();
CamperBot
@camperbot
Oct 03 2015 05:01
perrot sends brownie points to @tva10 :sparkles: :thumbsup: :sparkles:
:star: 285 | @tva10 | http://www.freecodecamp.com/tva10
Jason
@Jauble
Oct 03 2015 05:03
@tva10 thanks
CamperBot
@camperbot
Oct 03 2015 05:03
jauble sends brownie points to @tva10 :sparkles: :thumbsup: :sparkles:
:warning: jauble already gave tva10 points
tva10
@tva10
Oct 03 2015 05:09
@perrot I have same problem too (but basic problem was max amount of open connections), also I read that this native mongoClient automatically open near 5-7 connections and close them automatically if there are problems or timeout....
but that's just my opinion, as I have done this a long time ago
DTing
@dting
Oct 03 2015 05:18
@perrot you want the db.close() inside the callback function of the toArray.
vere perrot
@perrot
Oct 03 2015 05:27
@tva10 @dting thank you. I already pass the course. by putting db.close() inside the callback function of the to Array.
CamperBot
@camperbot
Oct 03 2015 05:27
perrot sends brownie points to @tva10 and @dting :sparkles: :thumbsup: :sparkles:
:warning: perrot already gave tva10 points
:star: 1300 | @dting | http://www.freecodecamp.com/dting
Jason
@Jauble
Oct 03 2015 05:52
Anyone know of a good place to learn Bootstrap for free?
Besides what they have on here
Luis Felipe López G.
@luishendrix92
Oct 03 2015 05:57
Youtube and practising a lot.
Jason
@Jauble
Oct 03 2015 06:09
Ya, I'm gonna check out youtube and the tutorial on w3schools.com. I was just hoping I could find something else.
on top of those
Are you pretty familiar with Bootstrap @luishendrix92 ?
Risle
@Risle
Oct 03 2015 06:12
@Jauble There's always the free Code Academy (https://www.codecademy.com/courses/web-beginner-en-yjvdd/0/1) or the inexpensive code school (https://www.codeschool.com/courses/blasting-off-with-bootstrap). The first takes you through exercises and the latter I find to be a bit more in depth and has video
Jason
@Jauble
Oct 03 2015 06:14
Codecademy doesn't have bootstrap do they? I've gone through all of their main courses. That was a while back though. I'm planning on checking out Code School or Treehouse once I get through all of the good free stuff I can find.
@Risle are you pretty familiar with Bootstrap?
Luis Felipe López G.
@luishendrix92
Oct 03 2015 06:16
@Jauble Nah I just started, I have Dash installed on my computer so whenever I need to check the documentation I just search for what I'm interested in. Grids are pretty straight-forward and the components too. However, you need to practise and maybe watch some tutorials to grasp it fully.
Jason
@Jauble
Oct 03 2015 06:22
There's 4 different classes: xs, sm, md, or lg. I don't get how that works. Are you supposed to make separate pages for each, or use media queries or something?
Risle
@Risle
Oct 03 2015 06:23
@Jauble The codeacademy link I gave was to their bootstrap course. And no, I use bootstrap mostly just for their row and column layout and navbar. I haven't gotten into their javascript functionality.
@Jauble The different sizes are so you can define the columns according the viewport width of the device being used.
@Jauble Eeach class is for that size and above. So if you wanted an element to take up full width on a cellphone but just half the width of a desktop, you can combine the classes like this: class="col-xs-12 col-lg-6"
Risle
@Risle
Oct 03 2015 06:29
@Jauble You'd also probably want to center the desktop one, so you can add columns to the left: class="col-xs-12 col-lg 6 col-lg-offset-3"
@Jauble (This is the only thing I know so I had to go on about it :) So no, not separate pages. They already have media queries to define the columns, but you can add a query if you want to change additional stuff.
Jason
@Jauble
Oct 03 2015 06:32
@Risle Sorry, should've clicked the link. Totally forgot about that course, I went through it a long time ago. I'll probably go back through it again. I was hoping for something a little more in-depth though.
@Risle Oh, you combine classes. That makes sense
@Risle Thanks for the help
CamperBot
@camperbot
Oct 03 2015 06:33
jauble sends brownie points to @risle :sparkles: :thumbsup: :sparkles:
:star: 205 | @risle | http://www.freecodecamp.com/risle
Risle
@Risle
Oct 03 2015 06:33
@Jauble Yep. That's the magic. np
zac247
@zac247
Oct 03 2015 06:53
@Jauble codeschool has a free beginner level tutorial.
Jason
@Jauble
Oct 03 2015 07:06
@zac247 for Bootstrap?
DJ
@qualitymanifest
Oct 03 2015 07:12
@Jauble when you make a website, try using XS, SM, MD, & LG and manually resizing the page. you will see how it works
vere perrot
@perrot
Oct 03 2015 07:18
Hi,
I study the unit "Waypoint: Store Data in MongoDB". At the check item '19. Complete "Insert"'. I get a message "Could not find undefined" from my terminal after I command "learnyoumongo verify solution.js". And how to fix this? Thanks.
Here is my code:
var mongo = require('mongodb').MongoClient;
    mongo.connect('mongodb://localhost:27017/learnyoumongo', function(err, db) {
      // db gives access to the database
      var collection=db.collection('users');
      //var data={firstName:'Jenny',lastName:'KO'};

      collection.insert({firstName:process.argv[2],lastName:process.argv[3]}, function(err, res) {
        if(err) {
            //console.log(err);
        }
        else {
            console.log(JSON.stringify(res));

        }
        db.close() ;
    });   });
Kevin J. Ortiz Rios
@Kevin3026
Oct 03 2015 07:25
Hi everyone
Michael Green
@MichaelGreenNZ
Oct 03 2015 07:25
@Kevin3026 Hello
Kevin J. Ortiz Rios
@Kevin3026
Oct 03 2015 07:30
Anyone knows about other pages that work as good as this. ?
Michael Green
@MichaelGreenNZ
Oct 03 2015 07:39
@Kevin3026 ??
Kevin J. Ortiz Rios
@Kevin3026
Oct 03 2015 07:39
what?
Michael Green
@MichaelGreenNZ
Oct 03 2015 07:39
other pages as in? Chat rooms? or websites like FCC?
Kevin J. Ortiz Rios
@Kevin3026
Oct 03 2015 07:40
websites like FCC
Michael Green
@MichaelGreenNZ
Oct 03 2015 07:40
Kevin J. Ortiz Rios
@Kevin3026
Oct 03 2015 07:40
yes but it is to elemental compared with this
Michael Green
@MichaelGreenNZ
Oct 03 2015 07:42
As far as i’m aware, FCC is the only one of this style, that is free/ gets you working on non-profit projects at the end.
Kevin J. Ortiz Rios
@Kevin3026
Oct 03 2015 07:43
yes im pretty sure this is the best right now
Im working with all my challenges
Ian Wang
@ianw3214
Oct 03 2015 07:48
Hey can you guys help me out with my twitch app? I'm stuck and I can't seem to figure out what's not working.
I just want to know why the streamer names aren't being pushed into their corresponding arrays
Aayush Kapoor
@aayushkapoor206
Oct 03 2015 07:48
Hello World
CamperBot
@camperbot
Oct 03 2015 07:48

welcome to FreeCodeCamp @aayushkapoor206!

Kevin J. Ortiz Rios
@Kevin3026
Oct 03 2015 07:49
@ianw3214 i havent code on JS yet. So i cant help. Sorry
@aayushkapoor206 Welcome
Tim Bell
@MindfulBell
Oct 03 2015 07:51
How come str.charCodeAt(//a white space character) == 48? isnt 48 for zero?
Michael Green
@MichaelGreenNZ
Oct 03 2015 07:55

@ianw3214 Where in your code are you pushing the JS to the various Columns? I’ve had a read through, with my basic JS knowledge.. it doesn’t look like you’ve ever told your JS which <div>’s you want each stream to be sent to.

I could be wrong, I’m not that advanced with my JS knowledge.

Ian Wang
@ianw3214
Oct 03 2015 07:56
@MichaelGreenNZ I haven't been pushing the js to the actual html part yet, I'm using the console to test if I'm getting the data first but the streamer names aren't even getting pushed into the arrays
Michael Green
@MichaelGreenNZ
Oct 03 2015 08:00
ah, ok. sorry beyond my knowledge! best of luck.
Ian Wang
@ianw3214
Oct 03 2015 08:02
Thanks anyways! I think it's something to do with my placement of my code but even after moving it around nothing seems to have changed :/
CamperBot
@camperbot
Oct 03 2015 08:02
if you want to thank someone, put an @ before their name!
Aleksandar B.
@aleksandar-b
Oct 03 2015 08:03
@ianw3214 that is because ajax is asynchronous. Ajax is not blocking the execution of code like other code. So, when you do ajax call it takes time to get result, in the meantime javascript is not waiting for that code to be finished, it procedes on the next code and put that ajax call on event loop- when ajax is finished than it pushes results in array. But your code on that array is already executed
@ianw3214 the solution is to put your code in ajax callback function.
Michael Green
@MichaelGreenNZ
Oct 03 2015 08:05
have you looked at your code on jshint?
Aleksandar B.
@aleksandar-b
Oct 03 2015 08:07
@ianw3214 so, you can not use online array in your showContent function bc JS executes that function before ajax is finished.
vere perrot
@perrot
Oct 03 2015 08:09

Hi eveyone,
I study the unit "Waypoint: Start a Nodejs Server". At the check item '19. Complete "Make it Modular"'. I get a error message "Your additional module file [mymodule.js] did not return an Array with the correct number of elements as the second argument of the callback" in my terminal after I command "learnyounode verify program.js".
Here is my code:
mymodule.js

var ext='';
 module.exports= function (path,extenstion,callback ){ 

     var fs = require('fs');

ext=extenstion;
fs.readdir(path,callback);


 }

program.js

var mymodule = require('./mymodule.js')
mymodule(process.argv[2],process.argv[3],callback);

function callback (err, list) { 
    //console.log(err);
    var arr=[];
    if(!err){
        var p = require('path');
        for(var i=0;i< list.length;i++){
            //console.log(p.extname(list[i]));
            if(p.extname(list[i])==='.'+process.argv[3]){
                console.log(list[i]);
                arr.push(list[i])
            }
        }
    }
    list=arr;
    };
Tim Bell
@MindfulBell
Oct 03 2015 08:10
Why is this not passing tests??
function binaryAgent(str) {
  var binaryChunk = ''
  var myUniCode = '';
  var myString = '';

  for (i=0; i<str.length; i++) {

    if (str[i] !== ' ') {
      binaryChunk += str[i];

    }
    else {
      myString += String.fromCharCode(parseInt(binaryChunk, 2));
      binaryChunk = '';
    }
  }
  return myString;
}

binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111');
Tim Bell
@MindfulBell
Oct 03 2015 08:18
NM got it
Ian Wang
@ianw3214
Oct 03 2015 08:41
@samosale Thanks for explaining that! I would have been stuck on that for a long time :P
CamperBot
@camperbot
Oct 03 2015 08:41
ianw3214 sends brownie points to @samosale :sparkles: :thumbsup: :sparkles:
:star: 303 | @samosale | http://www.freecodecamp.com/samosale
Gary Wong
@gary-w
Oct 03 2015 09:02
Question.. What are the differences between != and !== I notice that both can be interchangeable but I was taught !== is the right way
tva10
@tva10
Oct 03 2015 09:09
@gary-w != or == use type conversion for two elements ('1' == 1 -- true)
!== or === don't use type conversion for two (different types)elements ('1'===1 -- false), if types are same (1===1 -- true)
Gary Wong
@gary-w
Oct 03 2015 09:12
ah… i see… thanks @tva10 didn’t know !== is the positive equivelant of ===
CamperBot
@camperbot
Oct 03 2015 09:12
gary-w sends brownie points to @tva10 :sparkles: :thumbsup: :sparkles:
:star: 286 | @tva10 | http://www.freecodecamp.com/tva10
Gary Wong
@gary-w
Oct 03 2015 09:12
negative equivalent*
George Volokitin
@saintgeo23
Oct 03 2015 10:12
Hey! How to check "0_0 (: /-\ :) 0-0" if it is palindrome? it has to return true
Jérémy Diallo
@jeremyid
Oct 03 2015 10:14
you should loop through your string in the opposite direction and add the characters to a new string and compare the new string with the old
be careful, you should be using a separate variable
Jason
@Jauble
Oct 03 2015 10:15
@saintgeo23 you need to use regex for that one I think
@Experience111 Have you ever been experienced?
Jérémy Diallo
@jeremyid
Oct 03 2015 10:20
@Jauble I'm being experienced at least once a week
Jason
@Jauble
Oct 03 2015 10:20
@Experience111 lol
Jérémy Diallo
@jeremyid
Oct 03 2015 10:20
@Jauble maybe you can help me ?
Jason
@Jauble
Oct 03 2015 10:21
@Experience111 What do you need help with?
Jérémy Diallo
@jeremyid
Oct 03 2015 10:21
@Jauble I'm trying to create a table using Js, but my code doesn't work
Jason
@Jauble
Oct 03 2015 10:22
@Experience111 I don't think I've ever created a table with js. What does your code look like?
Jérémy Diallo
@jeremyid
Oct 03 2015 10:22
@Jauble here are the first steps :
function buildTable(data) {
    var table = document.createElement("table");
    for (var i = 0; i <= data.length; i++) {
        var tr = document.createElement("tr");
        table.appendChild(tr);
    }
    console.log("tr tags properly created");
    rows = document.querySelectorAll("tr");
      for (var i = 0; i<=2; i++) {
        var th = document.createElement("th");
        rows[0].appendChild(th);
    }
return table;
}

document.body.appendChild(buildTable(MOUNTAINS));
@Jauble MOUNTAINS is an array of objects.
the error returned by the console states that rows[0] is not defined
@Jauble while when I try to comment out the part of the function that concerns rows and define it via the console, it creates a proper nodelist and the call to rows[0] doesn't cause any error
Jason
@Jauble
Oct 03 2015 10:26
@Experience111 I think you need to declare rows
var rows
Jérémy Diallo
@jeremyid
Oct 03 2015 10:26
I tried but it doesn't work either
Alexandrix Ikechukwu
@SpaghettiThots
Oct 03 2015 10:27
Hello
Needing help with this.
Passing only first two tests
Jérémy Diallo
@jeremyid
Oct 03 2015 10:27
@Jauble I tried but it doesn't work either. Everything works fine if I comment out the rows part, and a table tags containing the rows is placed in the HTML doc
Alexandrix Ikechukwu
@SpaghettiThots
Oct 03 2015 10:27
function palindrome(str) {
  // Good luck!
  str.toLowerCase();
  str.replace(/[\W_]/g, "");

  var palin = str.split("").reverse();
  palin = palin.join(""); //join() does not mutate an array.

  if(str === palin){
    return true;
  }
}

palindrome("eye");
Jérémy Diallo
@jeremyid
Oct 03 2015 10:28
@Jauble but at the very moment the program calls the querySelectorAll method, something goes wrong
Jason
@Jauble
Oct 03 2015 10:30
So you tried: var rows = document.querySelectorAll("tr"); ?
@Experience111 that's all I can think of
Jérémy Diallo
@jeremyid
Oct 03 2015 10:32
@Jauble yes, it's running me crazy
Saicharan N
@saicharannivarthi
Oct 03 2015 10:35
hey guyz, can anyone help me for the "Bonfire: Reverse a String"
CamperBot
@camperbot
Oct 03 2015 10:35
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Jason
@Jauble
Oct 03 2015 10:36
@Experience111 Sorry. Wish I knew what it was
George Volokitin
@saintgeo23
Oct 03 2015 10:38
how to remove spaces, dots and commas from string?
Jason
@Jauble
Oct 03 2015 10:38
@IshMary I think you need to change your regex
@saintgeo23 do you know how to use regex?
George Volokitin
@saintgeo23
Oct 03 2015 10:39
i tried
is it str.replace(/\s.\,/g, '') ?
azaleas
@azaleas
Oct 03 2015 10:40
help bonfire make a person
Jason
@Jauble
Oct 03 2015 10:40
you got the \s right
CamperBot
@camperbot
Oct 03 2015 10:40

:point_right: bonfire make a person [wiki]

Explanation:

When I started the program I figured I just had to create the six functions mentioned in the details. However, it was not that simple. Creating them as a function was not the right way, I had to create them in a different way to make them a key.

There is also a tricky part as you need six keys no more or less, so at first I had the variable that store the original name as a key too which was wrong.

As for the usage of array, that is optional, you could also create new variable to hold the separated string if you wish but an array is easier to deal with as strings are immutable.

Read the instructions carefully, it is always a good hint in itself to run the code and check what the test results were so you know what to expect but do not fixate yourself on that. Once you understand what you need to do, this problem is very easy and straightforward.

:pencil: read more about bonfire make a person on the FCC Wiki

George Volokitin
@saintgeo23
Oct 03 2015 10:40
str.replace(/\s.\,/g, '')
Jason
@Jauble
Oct 03 2015 10:41
@saintgeo23 you got the \s right. The comma doesn't need to be escaped, so no \
George Volokitin
@saintgeo23
Oct 03 2015 10:41
bot helps? i try
CamperBot
@camperbot
Oct 03 2015 10:41
no wiki entry for: helps i try
:pencil: click here to create one now!after creating your page type update to reload it here
Jason
@Jauble
Oct 03 2015 10:41
A period does need to be escaped, so .
.
George Volokitin
@saintgeo23
Oct 03 2015 10:41
help Bonfire Check for Palindromes
CamperBot
@camperbot
Oct 03 2015 10:41

:point_right: bonfire check for palindromes [wiki]

Explanation:

You have to check if the string you get as an input is a palindrome and return true if it is, and false otherwise.

:pencil: read more about bonfire check for palindromes on the FCC Wiki

Jason
@Jauble
Oct 03 2015 10:41
'.'
\.
Jason
@Jauble
Oct 03 2015 10:44
@saintgeo23 I believe you also need to remove () _ and -
George Volokitin
@saintgeo23
Oct 03 2015 10:44
hm, that's idea. thx
CamperBot
@camperbot
Oct 03 2015 10:44
if you want to thank someone, put an @ before their name!
Jason
@Jauble
Oct 03 2015 10:44
parentheses underscores and hyphens
Jérémy Diallo
@jeremyid
Oct 03 2015 10:44
@Jauble I posted a question on a forum, I'll keep you posted
George Volokitin
@saintgeo23
Oct 03 2015 10:45
@Jauble thx
CamperBot
@camperbot
Oct 03 2015 10:45
saintgeo23 sends brownie points to @jauble :sparkles: :thumbsup: :sparkles:
:star: 193 | @jauble | http://www.freecodecamp.com/jauble
Jason
@Jauble
Oct 03 2015 10:45
Ok cool. If you try back here earlier tomorrow, I'm sure someone will probably be able to help
@Experience111
George Volokitin
@saintgeo23
Oct 03 2015 10:47
str.replace(/[\s,.()_-]/gi, ''); ?
Jason
@Jauble
Oct 03 2015 10:47
@saintgeo23 You need to escape the . by putting a \ in front of it
George Volokitin
@saintgeo23
Oct 03 2015 10:48
i did it. it was not showed in chat
Jason
@Jauble
Oct 03 2015 10:48
The i after the g isn't necessary either
Oh ok, that happened to me too
George Volokitin
@saintgeo23
Oct 03 2015 10:49
how to show code here?
Jason
@Jauble
Oct 03 2015 10:50
Three backtaps (the character below the escape key usually) then enter, then post your code, then enter, then three more backtaps
code help
I forget how to call the help for it
George Volokitin
@saintgeo23
Oct 03 2015 10:51
@Jauble thx again
CamperBot
@camperbot
Oct 03 2015 10:51
saintgeo23 sends brownie points to @jauble :sparkles: :thumbsup: :sparkles:
:warning: saintgeo23 already gave jauble points
Jason
@Jauble
Oct 03 2015 10:52
@saintgeo23 No problem. Glad to help
George Volokitin
@saintgeo23
Oct 03 2015 10:52
function palindrome(str) {
  // Good luck!
  str = str.toLowerCase();
  var str1 = '';
  var str2 = str.replace(/\W_/g, '');

  for (var i = str2.length-1; i >=0; i--) {
      str1 += str2.charAt(i);
    };
  };


  return str1 === str2;

};
Jason
@Jauble
Oct 03 2015 10:52
try this
/[\s\.,()_-]/g;
ivanprihhodko
@ivanprihhodko
Oct 03 2015 10:53
hello guys
George Volokitin
@saintgeo23
Oct 03 2015 10:53
hey
Jason
@Jauble
Oct 03 2015 10:53
Hey @ivanprihhodko
ivanprihhodko
@ivanprihhodko
Oct 03 2015 10:53
can anyone help me with Quote Machine HttpRequest
George Volokitin
@saintgeo23
Oct 03 2015 10:54
illegal return statement
Jason
@Jauble
Oct 03 2015 10:54
I think that's probably a little over my head
ivanprihhodko
@ivanprihhodko
Oct 03 2015 10:54
I made array based solution, but I dont know how to make it work with API
no prob
anyone ?)
George Volokitin
@saintgeo23
Oct 03 2015 10:55
@Jauble made it. thx)
CamperBot
@camperbot
Oct 03 2015 10:55
saintgeo23 sends brownie points to @jauble :sparkles: :thumbsup: :sparkles:
:warning: saintgeo23 already gave jauble points
Jason
@Jauble
Oct 03 2015 10:55
@saintgeo23 Sweet
ivanprihhodko
@ivanprihhodko
Oct 03 2015 10:57
my code is:
$("#external").click(function(){
$.getJSON("http://api.forismatic.com/api/1.0/", function(result){
$("#exquote").text(result);
});
});
and it doesnt work)
Jason
@Jauble
Oct 03 2015 10:58
@ivanprihhodko That's definitely over my head. Sorry
Aleksandar B.
@aleksandar-b
Oct 03 2015 11:00
@ivanprihhodko can you put a link to your codepen?
@ivanprihhodko that url is not correct
rit39
@rit39
Oct 03 2015 11:53
Hello, I am new to code camp and have only done small amounts of coding, mostly with a web page builder. I am having trouble with the <p></p> I am supposed to place a holder text inside there, but when i test it, it does not work. It says put first few words of kitty ipsum in there.
Lionel Croes
@lionelx1
Oct 03 2015 11:58
Hey rit39 what challenge are you on? Myabe i can help you out
rit39
@rit39
Oct 03 2015 11:58

this is the one in full: Waypoint: Fill in the Blank with Placeholder Text
Web developers traditionally use lorem ipsum text as placeholder text. It's called lorem ipsum text because those are the first two words of a famous passage by Cicero of Ancient Rome.

lorem ipsum text has been used as placeholder text by typesetters since the 16th century, and this tradition continues on the web.

Well, 5 centuries is long enough. Since we're building a CatPhotoApp, let's use something called kitty ipsum text.

Replace the text inside your p element with the first few words of this kitty ipsum 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.

its is like the third or fourth one of waypoint
Lionel Croes
@lionelx1
Oct 03 2015 12:01
Dit you try to remove the first first <p> paragraph</p> ?
did*
rit39
@rit39
Oct 03 2015 12:01
no I did not
Lionel Croes
@lionelx1
Oct 03 2015 12:01
Try that one for size
Let me know if it worked
Amiyanshu
@Amiyanshu
Oct 03 2015 12:05
Hiii
i am stocked in " Set the Font Family of an Element"
Any one if know where and how to add Font in the HTML5 , please help me out
rit39
@rit39
Oct 03 2015 12:06
no it did not work
Lionel Croes
@lionelx1
Oct 03 2015 12:06
hi amiya, let me go to bcc map to see\
rit39. leave the <p></p> copy and paste the
Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
paste inside the <p></p>
It should look like this <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>
Hey amiyanshu, it really simple.
Amiyanshu
@Amiyanshu
Oct 03 2015 12:10
thanks @lionelx
CamperBot
@camperbot
Oct 03 2015 12:10
if you want to thank someone, put an @ before their name!
Lionel Croes
@lionelx1
Oct 03 2015 12:10
yes, you have to add the font-family: monospace; below the font-size:family 16;
or on top doesn’t really matter
p {
font-size: 16px;
font-family: monospace;
}
should look like that
Amiyanshu
@Amiyanshu
Oct 03 2015 12:11
ok let me try
Lionel Croes
@lionelx1
Oct 03 2015 12:12
but it can also look like :
p {
font-family: monospace;
}
with the font-family: 15px below it
@rit39 did it work for you?
rit39
@rit39
Oct 03 2015 12:13
Thank you, why did it say first few words if it wanted all of it. lol derpity derp, i even thoght of trying it but figured I was wrong
CamperBot
@camperbot
Oct 03 2015 12:13
if you want to thank someone, put an @ before their name!
rit39
@rit39
Oct 03 2015 12:13
@lionelx1 Thank you, why did it say first few words if it wanted all of it. lol derpity derp, i even thoght of trying it but figured I was wrong
CamperBot
@camperbot
Oct 03 2015 12:13
rit39 sends brownie points to @lionelx1 :sparkles: :thumbsup: :sparkles:
:star: 4 | @lionelx1 | http://www.freecodecamp.com/lionelx1
Lionel Croes
@lionelx1
Oct 03 2015 12:15
No problem I am going to be actice for the couple of hours so if you are stuck. Just ask.
Just try everything. Don’t be afraid of being wrong. You learn when fail. You know why it doesn’t work
Did it work @Amiyanshu ?
Amiyanshu
@Amiyanshu
Oct 03 2015 12:23
Yes , Thanks a lot @lionelx1
CamperBot
@camperbot
Oct 03 2015 12:23
amiyanshu sends brownie points to @lionelx1 :sparkles: :thumbsup: :sparkles:
:star: 5 | @lionelx1 | http://www.freecodecamp.com/lionelx1
Jonathan Coleman
@jondcoleman
Oct 03 2015 12:24
Hi, anyone here who can help with Waypoint manage packages with NPM?
I'm getting an 'auth required for publish' error but have already done npm adduser
help npm
CamperBot
@camperbot
Oct 03 2015 12:26
no wiki entry for: npm
:pencil: click here to create one now!after creating your page type update to reload it here
Jonathan Coleman
@jondcoleman
Oct 03 2015 12:26
help manage packages
CamperBot
@camperbot
Oct 03 2015 12:26
no wiki entry for: manage packages
:pencil: click here to create one now!after creating your page type update to reload it here
Abhisek Pattnaik
@abhisekp
Oct 03 2015 12:27
@Jauble @saintgeo23 this is correct regex for palindrome /[\W_]/gi. You just had to wrap it in a character class or this also works /\W|_/gi
Jonathan Coleman
@jondcoleman
Oct 03 2015 12:28
nm, got help from this issue npm/how-to-npm#25
bitbybit42
@bitbybit42
Oct 03 2015 12:41
thank you @OverTheNeptune ! That really helped
CamperBot
@camperbot
Oct 03 2015 12:41
bitbybit42 sends brownie points to @overtheneptune :sparkles: :thumbsup: :sparkles:
:star: 216 | @overtheneptune | http://www.freecodecamp.com/overtheneptune
DTing
@dting
Oct 03 2015 12:57
/\W|_/g without the ignore case flag should be sufficient since \W excludes both upper and lower case
jai12345
@jai12345
Oct 03 2015 12:57
Can any one explain me below code how it works i am new to java script
any one explain me below code how it works var myName = "k"
if(typeof(myName)!=="not a string"){(function(v){return v;})(myName);}
DTing
@dting
Oct 03 2015 13:02
that second line is basically how they are testing your answer. it isn't really significant to the challenge but it calls a function (typeOf) on your "myName" variable and if that function doesnt return "not a string" it invokes a IIFE that returns the value of myName
Oleg Cherkasky
@gunrunners-paradise
Oct 03 2015 13:15
Hey, can I get help with getting started building the pomodoro app?
I know that the setInterval() function should be used, I'm testing it now, but have no idea what next.
Michael Bomholt
@bomholtm
Oct 03 2015 13:37
does someone know stuff about image preloading.. dont even know if its the right word for it lol
Abhisek Pattnaik
@abhisekp
Oct 03 2015 13:39
Michael Bomholt
@bomholtm
Oct 03 2015 13:41
@abhisekp yea i didnt found stuff i was looking for
that why i also said im not sure its called image preloading
Abhisek Pattnaik
@abhisekp
Oct 03 2015 13:42
@bomholt so what you looking for ... could you describe in detail?
Michael Bomholt
@bomholtm
Oct 03 2015 13:42
@abhisekp sure i read a article about this topic a month ago
basically the normal way a images load on a website seems to be from top to bottom right?
and the article described some other ways to load images
Abhisek Pattnaik
@abhisekp
Oct 03 2015 13:43
@bomholt do you want progressive img loading?
Michael Bomholt
@bomholtm
Oct 03 2015 13:44
one for example was the image appeared instant in full size but was blurry
and then sharpened over time
Abhisek Pattnaik
@abhisekp
Oct 03 2015 13:44
yep that's it
Michael Bomholt
@bomholtm
Oct 03 2015 13:44
instead of getting bigger over time
Abhisek Pattnaik
@abhisekp
Oct 03 2015 13:44
Michael Bomholt
@bomholtm
Oct 03 2015 13:45
so its called progressive img loading?
Abhisek Pattnaik
@abhisekp
Oct 03 2015 13:45
yep
Michael Bomholt
@bomholtm
Oct 03 2015 13:45
is it a good thing? i only realize it with a slow connection.. the top to bottom thingy
Abhisek Pattnaik
@abhisekp
Oct 03 2015 13:46
@bomholt it's something how you have to save the img. There should be a option to save it in progressive
Michael Bomholt
@bomholtm
Oct 03 2015 13:46
but i have a page where some elements size is defined by the picture in it
Abhisek Pattnaik
@abhisekp
Oct 03 2015 13:46
@bomholt IMO, I like the progressive thing better than top to bottom
Michael Bomholt
@bomholtm
Oct 03 2015 13:46
and if the connection is bad not only the picture changes while loading
azaleas
@azaleas
Oct 03 2015 13:47
help bonfire pairwise
CamperBot
@camperbot
Oct 03 2015 13:47

:point_right: bonfire pairwise [wiki]

Explanation:

The program should look for the numbers in the array which would add to make the number from the arg. Then instead of adding those numbers up, you will add their indices which is the reason why you get 11 on the example from detail.

Remember that arrays start at index 0 and go from there so from [1,4,2,3,0,5] if we switch to their indices it would be [0,1,2,3,4,5] then we add indices 1 + 2 + 3 + 5 and we get 11. That is what we need to return.

:pencil: read more about bonfire pairwise on the FCC Wiki

Michael Bomholt
@bomholtm
Oct 03 2015 13:47
the element does too
so i though it would be great to have the right size right away
@abhisekp thanks a lot
CamperBot
@camperbot
Oct 03 2015 13:47
bomholt sends brownie points to @abhisekp :sparkles: :thumbsup: :sparkles:
:star: 529 | @abhisekp | http://www.freecodecamp.com/abhisekp
Abhisek Pattnaik
@abhisekp
Oct 03 2015 13:48
Michael Bomholt
@bomholtm
Oct 03 2015 13:50
@abhisekp there seem to be more than one method to achieve this
azaleas
@azaleas
Oct 03 2015 13:51
@gunrunners-paradise check out help ziplines chat
Michael Bomholt
@bomholtm
Oct 03 2015 13:51
did you ever used progressive loading for a project?
Abhisek Pattnaik
@abhisekp
Oct 03 2015 13:51
@bomholt not yet. But i save any img. to progressively load.
Michael Bomholt
@bomholtm
Oct 03 2015 13:53
@abhisekp ah okay so its a thing you can choose in gimp and stuff
Abhisek Pattnaik
@abhisekp
Oct 03 2015 13:53
yep!
Michael Bomholt
@bomholtm
Oct 03 2015 13:53
i found stuff about using javascript or jquery for progressive loading
Abhisek Pattnaik
@abhisekp
Oct 03 2015 13:54
nice! :+1:
Graham Whitley
@lotusgraham
Oct 03 2015 14:03
hey, i'm using considering using an IDE code editor like Atom. I figure it will be helpful for the bonfires and also get me used to what to expect later on. I'm having trouble with console.log and getting to show in an output. I'm such a newbie i don't really know what to ask here, but how to get things to show in an output so i can test?
CamperBot
@camperbot
Oct 03 2015 14:03
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
Graham Whitley
@lotusgraham
Oct 03 2015 14:04
anyone have experience with Atom?
Abhisek Pattnaik
@abhisekp
Oct 03 2015 14:04
@lotusgraham why not use the online ones?
Graham Whitley
@lotusgraham
Oct 03 2015 14:05
it seems the online ones are good, but when i go testing outputs they don't always show me what i want to see. it feels like i am missing something
oh THOSE online ones, i thought you meant the ones in the bonfire challenges...
what's the advantage of using those vs Atom or Sublime text?
Abhisek Pattnaik
@abhisekp
Oct 03 2015 14:08
@lotusgraham Atom and Sublime doesn't show console outputs
You've to manually add the script in a pg. and then load it in browser and check the console in the browser
@lotusgraham but these online editors are really nice. Just have a look. They're so beautiful.
Hugo
@hugoender
Oct 03 2015 14:09
@lotusgraham i used repl.it a lot in the beginning but once i started the ziplines i began using brackets.io
brackets is similar to atom and sublime but i found it easier for me
it lets you generate a preview in your browser that is live as you code so you can see what is going on
Abhisek Pattnaik
@abhisekp
Oct 03 2015 14:10
@hugoender i guess @lotusgraham doesn't want any previews. Just the console outputs.
Hugo
@hugoender
Oct 03 2015 14:10
and then if you are using a browser like chrome you can use the dev tools to see whats going on
Abhisek Pattnaik
@abhisekp
Oct 03 2015 14:10
that's real herculean work!!
Hugo
@hugoender
Oct 03 2015 14:11
@abhisekp well using a text editor is the path he’s eventually going to have to take…might as well start learning how to use one and how to use browser dev tools
its made my life a lot easier
@lotusgraham but for the bonfires, repl.it will suffice
or you can use cloud9 (c9.io). it basically runs a small server for you with terminal and everything
im using cloud9 to learn ruby on rails
Abhisek Pattnaik
@abhisekp
Oct 03 2015 14:13

@lotusgraham Brackets has powerful preview features but these are also good online editors. (For previewing)

It also let's you share! too (bonus)

@lotusgraham And as @lotusgraham suggested above, C9 is a complete environment. (like an OS) where you can work in your projects with consoles and all that.
Graham Whitley
@lotusgraham
Oct 03 2015 14:14
okay thanks for the clarification guys! soo much info out there when i search these newbie questions i go all over the place
CamperBot
@camperbot
Oct 03 2015 14:14
if you want to thank someone, put an @ before their name!
Graham Whitley
@lotusgraham
Oct 03 2015 14:14
thanks @abhisekp @hugoender
CamperBot
@camperbot
Oct 03 2015 14:14
lotusgraham sends brownie points to @abhisekp and @hugoender :sparkles: :thumbsup: :sparkles:
:star: 530 | @abhisekp | http://www.freecodecamp.com/abhisekp
:star: 214 | @hugoender | http://www.freecodecamp.com/hugoender
Abhisek Pattnaik
@abhisekp
Oct 03 2015 14:14
@lotusgraham and one more option would be installing Node.JS.
You can just write your script in script.js files and then run node script.js to show the output.

@lotusgraham you can also use nodemon script.js to watch any changes and reload your script on save to show the output.

nodemon is an npm pkg

Graham Whitley
@lotusgraham
Oct 03 2015 14:15
i think i did that yesterday when i installed Atom
Abhisek Pattnaik
@abhisekp
Oct 03 2015 14:16
nice :+1:
Graham Whitley
@lotusgraham
Oct 03 2015 14:16
lol, i know i will need an IDE text editor, but i don't understand how to use the advantages it provides at this point
so i will stick to the online ones with a console built in for now, they seem to be a good stepping stone?
Abhisek Pattnaik
@abhisekp
Oct 03 2015 14:18
@lotusgraham I use the following atom addons for basic development.
  • atom-beautify
  • atom-material-syntax
  • atom-material-ui
  • autohide-tree-view
  • blame
  • bottom-dock
  • docblockr
  • editorconfig
  • emmet
  • file-icons
  • file-types
  • fixmyjs
  • git-log
  • indent-guide-improved
  • language-babel
  • linter
  • linter-csslint
  • linter-eslint
  • linter-htmlhint
  • linter-jsonlint
  • linter-manager
  • live-archive
  • merge-conflicts
  • minimap
  • symbols-tree-view
  • sync-settings
  • wakatime
vere perrot
@perrot
Oct 03 2015 14:19

Hi my friends,
I don't understand. What is the smallest common multiple?
I think the example like this:

Least Common Multiple of 1 and 5:
List the Multiples of each number,

The multiples of 1 are 1, 2, 3, 4, 5 , ... etc
The multiples of 5 are 5, 10, 15, 20, 25, ... etc
Find the first Common (same) value: 5

But the unit "Bonfire: Smallest Common Multiple". The test case smallestCommons([1, 5]) shows the answer: 60.
Maybe I misunderstand "the smallest common multiple". Right?

Hugo
@hugoender
Oct 03 2015 14:19
@lotusgraham i did not know how to use any text editor either so i just picked one that i felt comfortable with (i tried them all) and then started using it. you won’t learn until you start using them
sublime is one of the most popular ones but i found it confusing as hell
brackets is not as popular but i found it super easy and nice
Abhisek Pattnaik
@abhisekp
Oct 03 2015 14:22
Brackets will die out ones Atom comes with it's own preview in as Brackets
Brackets has very powerful preview features!! I <3 it
Hugo
@hugoender
Oct 03 2015 14:22
@abhisekp doubtful since brackets is open source and free while github plans to make atom cost money
Graham Whitley
@lotusgraham
Oct 03 2015 14:23
yeah i saw brackets was recommended as a more popular one for mac. I will check that one as well. lots of hype about Atom right now for sure. especially for JS? Have you guys used edity? it seems to be a chrome plugin like google docs for code editor?
Hugo
@hugoender
Oct 03 2015 14:23
and atom is not fully open source
Abhisek Pattnaik
@abhisekp
Oct 03 2015 14:23
:'(
Hugo
@hugoender
Oct 03 2015 14:23
@lotusgraham i would stick with the big players for now… don’t want to learn an editor just to have them go under or have a potential employer be like “wtf is that?"
Graham Whitley
@lotusgraham
Oct 03 2015 14:24
lol
i will check out both brackets and atom since i'm just starting
Hugo
@hugoender
Oct 03 2015 14:25
Screen Shot 2015-10-03 at 10.25.38 AM.png
thats my dock
so you see i have brackets, sublime, and atom
just try them all
Michael Bomholt
@bomholtm
Oct 03 2015 14:26
@perrot did you read the task =)?
vere perrot
@perrot
Oct 03 2015 14:27
@bomholt Yes, but I don't understand.
Michael Bomholt
@bomholtm
Oct 03 2015 14:27
and about brackets.. i think its vim sublime or atom
brackets is popular because its newbie friendly i think
Abhisek Pattnaik
@abhisekp
Oct 03 2015 14:28
@bomholt neither vim nor emacs
Michael Bomholt
@bomholtm
Oct 03 2015 14:28
@perrot you have to find the LCM of the provided RANGE
not the provided numbers
LCM of 1, 2, 3, 4, 5 is 60
you did understand LCM correctly but you didnt read the task carefully =)
vere perrot
@perrot
Oct 03 2015 14:35
@bomholt thank you so much.
CamperBot
@camperbot
Oct 03 2015 14:35
perrot sends brownie points to @bomholt :sparkles: :thumbsup: :sparkles:
:star: 314 | @bomholt | http://www.freecodecamp.com/bomholt
Michael Bomholt
@bomholtm
Oct 03 2015 14:36
@perrot haha no problem but i think its a hard one
took me some time =)
Lasynsec
@Lasynsec
Oct 03 2015 14:43
Hello World
CamperBot
@camperbot
Oct 03 2015 14:43

welcome to FreeCodeCamp @Lasynsec!

Lasynsec
@Lasynsec
Oct 03 2015 14:44
i need any advice on DNA Pairing
Hugo
@hugoender
Oct 03 2015 14:44
@Lasynsec hello!
@Lasynsec can’t help you with that but hopefully someone else can
Lasynsec
@Lasynsec
Oct 03 2015 14:44
Hello @hugoender
Here is my little code
function pair(str) 
{
  var pairList = [["A","T"],["T","A"],["C","G"],["G","C"],["A","T"]];

  var output = [];

   var adnArray = str.split("");

   for(var i = 0; i < pairList.length; i++)
   {

      if(adnArray.indexOf(pairList[i][0]) !== -1) //OK
      {
          output.push(pairList[i]);
      }

   }

  return output;
}

$(document).ready(function() {

    $(".test").html(pair("GCG"));
});
Hugo
@hugoender
Oct 03 2015 14:46
@Lasynsec not sure if you can put the pair() function inside the html(). maybe try and assign the return value of the pair() function to a variable and THEN put that variable in html()?
@Lasynsec at the very least that will help you debug because then you can include console.log(variable) to see what it is that your pair() function is returning
Lasynsec
@Lasynsec
Oct 03 2015 14:48
Thanks , but that wasn't the issue. putting the pair() functin inside the html() works well
CamperBot
@camperbot
Oct 03 2015 14:48
if you want to thank someone, put an @ before their name!
Hugo
@hugoender
Oct 03 2015 14:48
assuming you are using something that gives you access to console (like http://repl.it)
@Lasynsec so what’s the issue?
Lasynsec
@Lasynsec
Oct 03 2015 14:50
I have no idea how to succeed this exercise. My code doesn't work as excepted.
in your opinion , what is the best way to do this
Hugo
@hugoender
Oct 03 2015 14:52
@Lasynsec then i suggest you start adding console.log(somethingInHere) to check where stuff is not working as expected
Lasynsec
@Lasynsec
Oct 03 2015 14:53
Ok, let's do that. Thanks @hugoender .
CamperBot
@camperbot
Oct 03 2015 14:53
lasynsec sends brownie points to @hugoender :sparkles: :thumbsup: :sparkles:
Hugo
@hugoender
Oct 03 2015 14:53
@Lasynsec you can use the chrome dev tools to add breakpoints but thats a bit more involved so another way to do it is to add console.log() in different sections so that you can see in the console what different variable values are along the way
CamperBot
@camperbot
Oct 03 2015 14:53
:star: 215 | @hugoender | http://www.freecodecamp.com/hugoender
mnm135
@mnm135
Oct 03 2015 14:53
Hi guys, I'm new here and I have a quick question. I've just finished my first zipline. Are those ziplines checked anyhow and can be rejected if code is poor or something is not working correctly? Do I get any feedback from moderators or something like that?
Hugo
@hugoender
Oct 03 2015 14:53
@Lasynsec let me know if you get it working
@mnm135 no
@mnm135 honor system ;)
mnm135
@mnm135
Oct 03 2015 14:54
@hugoender thanks :)
CamperBot
@camperbot
Oct 03 2015 14:54
mnm135 sends brownie points to @hugoender :sparkles: :thumbsup: :sparkles:
:star: 216 | @hugoender | http://www.freecodecamp.com/hugoender
Hugo
@hugoender
Oct 03 2015 14:54
@mnm135 i suggest you do your best and move on so you can continue learning new things
as long as you meet the User story criteria you’re golden
@mnm135 i also suggest you do the bonus stories… a lot of times the most learning comes from those
mnm135
@mnm135
Oct 03 2015 14:56
@hugoender Sure, I'm doing my best. I was just curious if I should wait for feedback.
Craig Morrison
@frogmorton
Oct 03 2015 14:56
Anyone care to answer a bootstrap question for me?
Hugo
@hugoender
Oct 03 2015 14:56
@frogmorton i can try ;)
@mnm135 nope…no waiting. ONWARDS!
Craig Morrison
@frogmorton
Oct 03 2015 14:59
@hugoender Are any media queries active straight out of the box?
or do I have to add them, if I wish to use them
Hugo
@hugoender
Oct 03 2015 15:00
@frogmorton Copy and paste the bootstrap link into your browser and then copy and paste all the css code into codepen and hit the “tidy” button at the top right so that it reformats it so you can read it
Johnathan Brown
@Legend28469
Oct 03 2015 15:01
Hi, I have a question. How do I read a json file from another website? Would I have to “download” it every time? Or is there a function
Hugo
@hugoender
Oct 03 2015 15:01
@frogmorton then you can do a search for media
@frogmorton so the short answer: i think bootstrap may already have media queries…but you can double check by looking at their code
Craig Morrison
@frogmorton
Oct 03 2015 15:02
in the bootstrap.min.css file, i guess
Hugo
@hugoender
Oct 03 2015 15:03
@Legend28469 you use $.getJSON to retrieve the JSON file and then use the callback function specified in the .getJSON arguments to read the different parts of the json file
@frogmorton yes
Johnathan Brown
@Legend28469
Oct 03 2015 15:04
@hugoender oh, I’ll try that out right now. Thanks a ton
CamperBot
@camperbot
Oct 03 2015 15:04
legend28469 sends brownie points to @hugoender :sparkles: :thumbsup: :sparkles:
Hugo
@hugoender
Oct 03 2015 15:04
@frogmorton if you have a text editor of choice, you can paste it in there and have the text editor tidy it up for you
CamperBot
@camperbot
Oct 03 2015 15:04
:star: 217 | @hugoender | http://www.freecodecamp.com/hugoender
Hugo
@hugoender
Oct 03 2015 15:04
@frogmorton then select all and collapse all so that you can just look at the different classes and such
and expand the ones you want to look into
@Legend28469 no problem. let me know if you run into problems
Craig Morrison
@frogmorton
Oct 03 2015 15:05
@hugoender I'll take a look, hugo. I tend to use Sublime Text
Hugo
@hugoender
Oct 03 2015 15:06
@frogmorton im sure sublime can do that stuff…i just dont know if you need a plugin for it or not. I use brackets
for sure you can copy and paste into codepen and have it tidy it for you
and then copy and paste it from there to sublime
Craig Morrison
@frogmorton
Oct 03 2015 15:09
Thanks man @hugoender
CamperBot
@camperbot
Oct 03 2015 15:09
frogmorton sends brownie points to @hugoender :sparkles: :thumbsup: :sparkles:
:star: 218 | @hugoender | http://www.freecodecamp.com/hugoender
Hugo
@hugoender
Oct 03 2015 15:09
@frogmorton no problem!
Matthias Kern
@matthiaskern
Oct 03 2015 15:19
bonfire convert html entities
CamperBot
@camperbot
Oct 03 2015 15:19

:fire:Bonfire: Convert HTML Entities :link:

function convert(str) {
  // &colon;&rpar;
  return str;
}

convert('Dolce & Gabbana');

Convert the characters "&", "<", ">", '"' (double quote), and "'" (apostrophe), in a string to their corresponding HTML entities.

more info:  bf details | bf links | hint

Matthias Kern
@matthiaskern
Oct 03 2015 15:19
hint
CamperBot
@camperbot
Oct 03 2015 15:19
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
Rajendra kadam
@raju249
Oct 03 2015 15:20
Has anyone Completed Node and Express Challenges
?
Hugo
@hugoender
Oct 03 2015 15:21
@raju249 give me a few weeks and then ask again ;)
Rajendra kadam
@raju249
Oct 03 2015 15:21
Sure
Do these challenges to write server side code?
I have experience writing Python at server Side
@hugoender
Hans van Riet
@hansinla
Oct 03 2015 15:22
@raju249 Yes, I didn’t enjoy it very much. Little in the way of explanation to be honest.
Rajendra kadam
@raju249
Oct 03 2015 15:23
@hansinla Problem statement is not clear though
Hans van Riet
@hansinla
Oct 03 2015 15:23
@raju249 Agreed
Hugo
@hugoender
Oct 03 2015 15:24
@raju249 i can’t help you since im not there yet
Rajendra kadam
@raju249
Oct 03 2015 15:24
No problem @hugoender
:)
Hugo
@hugoender
Oct 03 2015 15:24
@raju249 thats why i said…give me a few weeks ;)
Elizabeth Hatleli
@TheHighPriestess
Oct 03 2015 15:24
I'm on Bonfire Symmetric Difference and after watching the video I thought I understood what to do. HOWEVER, for some reason it's not working for two tests:
function sym(args){

    var arr = [];
    var argslength = arguments.length;

    if(argslength === 1){
        arr = arguments[0];
        difference(arr);
        return good;
    }
    else if (argslength === 2){
        arr = arguments[0].concat(arguments[1]);
        difference(arr);
        return good;
    }
    else if (argslength === 3){
        arr = arguments[0].concat(arguments[1]);
        difference(arr);
        arr = good.concat(arguments[2]);
        difference(arr);
        return good;
    }

    //function to find the symmetric difference between two arrays
    function difference(arr){

    var discarded = [];
    good = [];
    var test;

    while (test = arr.pop())
     if (arr.indexOf(test) > -1){
         discarded.push(test);
         continue;
     } 
     else if(discarded.indexOf(test) == -1){
         good.push(test);
     }
}
}

//sym([1, 2, 3], [5, 2, 1, 4]);
sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]);
//sym([1, 2, 5], [2, 3, 5], [3, 4, 5]);
//sym([1, 1])
Rajendra kadam
@raju249
Oct 03 2015 15:24
I am at "Make it modular" @hugoender where are you though
Elizabeth Hatleli
@TheHighPriestess
Oct 03 2015 15:25
From what I saw in the video..the answer SHOULD be 4...but the BOnfire says no.
Hugo
@hugoender
Oct 03 2015 15:25
@raju249 im not finding that…is that a zipline or what?
Rajendra kadam
@raju249
Oct 03 2015 15:25
No
@hugoender
It is in Node And Express challenges
Hugo
@hugoender
Oct 03 2015 15:26
im not seeing a waypoint named “make it modular"
Rajendra kadam
@raju249
Oct 03 2015 15:26
I mean Start a node.js server
on map
@hugoender
Hugo
@hugoender
Oct 03 2015 15:26
oh okay
yeah i see that one
you’ve done everything before that!?
Rajendra kadam
@raju249
Oct 03 2015 15:26
Yeah :smile:
Hugo
@hugoender
Oct 03 2015 15:27
wow
hugoender @hugoender claps
Hugo
@hugoender
Oct 03 2015 15:27
@raju249 im at Basic Front End Zipline: Show the Local Weather
LOL
@raju249 when did you start?
Rajendra kadam
@raju249
Oct 03 2015 15:27
All the best @hugoender
I don't remember exactly
But may be in June 2015
Elizabeth Hatleli
@TheHighPriestess
Oct 03 2015 15:28
@raju249 it should say on your profile map
Hugo
@hugoender
Oct 03 2015 15:29
@raju249 yeah I started September 19th
Rajendra kadam
@raju249
Oct 03 2015 15:29
Yea @TheHighPriestess
Hugo
@hugoender
Oct 03 2015 15:29
@raju249 i need to go faster if i want to keep the same pace as you
Rajendra kadam
@raju249
Oct 03 2015 15:30
But I didn't finish the last three ziplines LOL
@hugoender
:XD
Elizabeth Hatleli
@TheHighPriestess
Oct 03 2015 15:32
Ok, I think I see my problem on calculating the symmetric difference. Question....if anyone knows....
If you have this: [1, 1, 2, 5], [2, 2, 3, 5]
the first array has two 1
so, I'm assuming that the symmetric difference would be....1,3....NOT 1,1,3
That's my mistake...not taking into account the fact that I might have duplicates
So I just answered my own question lol
Stefan Stokic
@StefanStokic
Oct 03 2015 15:35
How long did it take you guys to do a bonfire on average?
Elizabeth Hatleli
@TheHighPriestess
Oct 03 2015 15:35
@KingInTheNorth depends on the bonfire
I've done some in an hour...and others took me a few days to finally figure out
and that's in the same level
Some I've need assistance with....others not at all.
vere perrot
@perrot
Oct 03 2015 15:50
Hello,
I try to solve the unit "Bonfire: Pairwise". I don't understand this paragraph "For example, pairwise([1, 4, 2, 3, 0, 5], 7) should return 11 ". Why the value will return 11? And what is the smallest sum? Thank you.
CamperBot
@camperbot
Oct 03 2015 15:50
if you want to thank someone, put an @ before their name!
Aleksandar B.
@aleksandar-b
Oct 03 2015 16:02
@perrot 11 is the sum of index position of numbers in array that can be pair with one other number to form 7
vere perrot
@perrot
Oct 03 2015 16:03
Thank you for your informationi @samosale . :)
CamperBot
@camperbot
Oct 03 2015 16:03
perrot sends brownie points to @samosale :sparkles: :thumbsup: :sparkles:
:star: 306 | @samosale | http://www.freecodecamp.com/samosale
phaseshifters
@phaseshifters
Oct 03 2015 16:05
Hey everyone, I'm having trouble with falsy bouncer waypoint. I'm trying to check if a value of an array element is null by arr[i] === null but this doesn't work. Is this the correct way to test for a null?
mnm135
@mnm135
Oct 03 2015 16:08
I'm trying to start quote generator project and I don't understand how to use this API, anyone could help? http://forismatic.com/en/api/
Tommy Izen
@TommyIzen
Oct 03 2015 16:09
bonfire Return Largest Numbers In Arrays
CamperBot
@camperbot
Oct 03 2015 16:09

:fire:Bonfire: Return Largest Numbers in Arrays :link:

function largestOfFour(arr) {
  // You can do this!
  return arr;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

Return an array consisting of the largest number from each provided sub-array. For simplicity, the provided array will contain exactly 4 sub-arrays.

more info:  bf details | bf links | hint

Tommy Izen
@TommyIzen
Oct 03 2015 16:09
bf details
CamperBot
@camperbot
Oct 03 2015 16:09

:fire:Bonfire: Return Largest Numbers in Arrays :link:

function largestOfFour(arr) {
  // You can do this!
  return arr;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
Return an array consisting of the largest number from each provided sub-array. For simplicity, the provided array will contain exactly 4 sub-arrays.
Remember, you can iterate through an array with a simple for loop, and access each member with array syntax arr[i] .
If you are writing your own Chai.js tests, be sure to use a deep equal statement instead of an equal statement when comparing arrays.
Remember to use RSAP if you get stuck. Try to pair program. Write your own code.
links:
Tommy Izen
@TommyIzen
Oct 03 2015 16:09
bf links
CamperBot
@camperbot
Oct 03 2015 16:09
Tommy Izen
@TommyIzen
Oct 03 2015 16:10
hint
CamperBot
@camperbot
Oct 03 2015 16:10
:construction: Spoilers are only in the Bonfire's Custom Room :point_right:
DTing
@dting
Oct 03 2015 16:23
@phaseshifters you might want to not use a strict comparison
there is a very big hint in this section of the mdn docs of array.filter
filter() calls a provided callback function once for each element in an array, and constructs a new array of all the values for which callback returns a true value or a value that coerces to true.
Pratik Ratnaparkhi
@pratikr1593
Oct 03 2015 16:25

Bonfire: Reverse a String
Reverse the provided string.

You may need to turn the string into an array before you can reverse it.

Your result must be a string.

Remember to use Read-Search-Ask if you get stuck. Write your own code.

Here are some helpful links:

Global String Object
String.split()
Array.reverse()
Array.join()

CamperBot
@camperbot
Oct 03 2015 16:25
Sorry, can't find a bonfire called reverse a stringreverse the provided stringyou may need to turn the string into an array before you can reverse ityour result must be a stringremember to use read-search-ask if you get stuck write your own codehere are some helpful linksglobal string objectstringsplitarrayreversearrayjoin. [ Check the map? ]
Pratik Ratnaparkhi
@pratikr1593
Oct 03 2015 16:26
can anyone assist me?
DTing
@dting
Oct 03 2015 16:26
what do you have so far?
phaseshifters
@phaseshifters
Oct 03 2015 16:27
@dting thank you I will have a look!
CamperBot
@camperbot
Oct 03 2015 16:27
phaseshifters sends brownie points to @dting :sparkles: :thumbsup: :sparkles:
:star: 1301 | @dting | http://www.freecodecamp.com/dting
Pratik Ratnaparkhi
@pratikr1593
Oct 03 2015 16:28
This message was deleted
function reverseString(str) {
  return str;


function reverseString(str) {
    var hello = str;
    var arr = hello.reverse();
    hello = arr  // convert back to string
    return hello;
}
  return str();
DTing
@dting
Oct 03 2015 16:29
reverse is an array function
you are trying to call it on a string at the moment
bf reverse
CamperBot
@camperbot
Oct 03 2015 16:29

:fire:Bonfire: Reverse a String :link:

function reverseString(str) {
  return str;
}

reverseString('hello');

Reverse the provided string.

more info:  bf details | bf links | hint

DTing
@dting
Oct 03 2015 16:29
bf links
DTing
@dting
Oct 03 2015 16:29
String.split() // String function 
Array.reverse() // Array function
Array.join() // Array function
Tommy Izen
@TommyIzen
Oct 03 2015 16:44
How can I access a subarray? When I try using array[][] it doesn't work
function largestOfFour(arr) 
{
  var comp = 0;
  var arr1 = arr;
  var arr2 = null;
  var arr3 = null;
  for (var i = 0; i < arr.length; i++)   
  {
    comp = arr1[i][i]
    return comp
  }
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]], "");
if I use arr1[i] it just returns the first sub array
i left off the semi-colons because you don't need them in for loops or in functions really
Been stuck on this bonfire forever
Coira Ellison
@Coira
Oct 03 2015 16:47
@TommyIzen array[][] should work. if you console.log comp inside your for loop, you'll see it's value is 4, which is the first element of the first array
Tommy Izen
@TommyIzen
Oct 03 2015 16:48
right, but that doesn't allow me to get past the first array
Coira Ellison
@Coira
Oct 03 2015 16:48
but you have a return statement right after
which returns comp, and will also end the function
Tommy Izen
@TommyIzen
Oct 03 2015 16:48
I've console logged it as well with the same result
it never goes past the first array
sub array i mean
Coira Ellison
@Coira
Oct 03 2015 16:49
oh i see, you need two for loops
Tommy Izen
@TommyIzen
Oct 03 2015 16:49
ugh
Coira Ellison
@Coira
Oct 03 2015 16:49
for (var i ... etc) {
    for (var j ... etc) {
        comp = arr[i][j]
       // do more stuff
   }
}
Tommy Izen
@TommyIzen
Oct 03 2015 16:50
i just console logged it and it did go past the first sub array
I did it before and it gave me an undefined
urgh
Coira Ellison
@Coira
Oct 03 2015 16:50
sometimes browsers are weird like that
Tommy Izen
@TommyIzen
Oct 03 2015 16:50
yeah
thanks @Coira
CamperBot
@camperbot
Oct 03 2015 16:50
tommyizen sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:star: 255 | @coira | http://www.freecodecamp.com/coira
Coira Ellison
@Coira
Oct 03 2015 16:50
np :)
Tommy Izen
@TommyIzen
Oct 03 2015 16:51
I wish FCC's coding would store on each profile and not just the browser...I like to switch from pc to laptop
I'm greedy I know
Coira Ellison
@Coira
Oct 03 2015 16:52
yeah that's a nice idea, it'd be handy
they've only just implemented storing code in browser (the number of times I accidently shut my browser and lost all my work, grrr!)
maybe they'll get to that later
Tommy Izen
@TommyIzen
Oct 03 2015 16:54
with everything I pay for all this you'd think they'd have it by now
lol\
Coira Ellison
@Coira
Oct 03 2015 16:55
ha! i thought you were serious there for a second, totally confused
Tommy Izen
@TommyIzen
Oct 03 2015 16:55
nope, sorry
Coira Ellison
@Coira
Oct 03 2015 16:55
:p
Tommy Izen
@TommyIzen
Oct 03 2015 16:55
that would be frightening if i was serious
haha
Jason Wood
@catapixel
Oct 03 2015 16:59
@TylerMoeller nice job getting your tooltip to hide. I didn't scroll back but it looks like you just need to change tooltip("close") to tooltip("hide") is that correct?
Abhisek Pattnaik
@abhisekp
Oct 03 2015 17:41
bf palindrome
CamperBot
@camperbot
Oct 03 2015 17:41

:fire:Bonfire: Check for Palindromes :link:

function palindrome(str) {
  // Good luck!
  return true;
}



palindrome("eye");

Return true if the given string is a palindrome. Otherwise, return false.

more info:  bf details | bf links | hint

Abhisek Pattnaik
@abhisekp
Oct 03 2015 17:41
bf details
CamperBot
@camperbot
Oct 03 2015 17:41

:fire:Bonfire: Check for Palindromes :link:

function palindrome(str) {
  // Good luck!
  return true;
}



palindrome("eye");
Return true if the given string is a palindrome. Otherwise, return false.
A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing.
You'll need to remove punctuation and turn everything lower case in order to check for palindromes.
We'll pass strings with varying formats, such as "racecar", "RaceCar", and "race CAR" among others.
Remember to use RSAP if you get stuck. Try to pair program. Write your own code.
links:
Abhisek Pattnaik
@abhisekp
Oct 03 2015 17:41
explain palindrome
CamperBot
@camperbot
Oct 03 2015 17:41

:point_right: bonfire check for palindromes [wiki]

Explanation:

You have to check if the string you get as an input is a palindrome and return true if it is, and false otherwise.

:pencil: read more about bonfire check for palindromes on the FCC Wiki

Aayush Kapoor
@aayushkapoor206
Oct 03 2015 17:45
Hi
Craig Morrison
@frogmorton
Oct 03 2015 17:56
there is an interesting extension to font-awesome called font-mfizz... http://fizzed.com/oss/font-mfizz To use the IT-related vector icons, you have to download and have the main css file's path in your html file, just like you would link to font awesome. The trouble? I can't seem to find an online version of this library to link to, and I don't know how I could include the file locally to be used in codepen... anyone care to comment?
Elliott Maas
@elliottmaas
Oct 03 2015 18:00
Can anyone help me with the Javascript slot machine, waypoint 138?
Aris Huynh
@arishuynhvan
Oct 03 2015 18:02
blob
blob
Hi, could anyone help me check why my code cannot return the correct result according to the test cases' results for Bonfire steamroller? I managed to get the right result appear in the output box, but my code couldn't pass any test cases. An example is in the screen shot
Kevin Diem
@kgdiem
Oct 03 2015 18:15
@frogmorton is there a minimized download version?
Herman Fassett
@HermanFassett
Oct 03 2015 18:16

@arishuynhvan Try putting

if (Array.isArray(arr[i]))
      result = result.concat(steamroller(arr[i]));
else
      result.push(arr[i]);

On the inside part

Craig Morrison
@frogmorton
Oct 03 2015 18:23
@kgdiem hey, thanks!
CamperBot
@camperbot
Oct 03 2015 18:23
frogmorton sends brownie points to @kgdiem :sparkles: :thumbsup: :sparkles:
:star: 232 | @kgdiem | http://www.freecodecamp.com/kgdiem
Craig Morrison
@frogmorton
Oct 03 2015 18:25
There's a GNU zipped archive with the file extension .gz
I was having trouble trying to open it, to be honest
Tommy Izen
@TommyIzen
Oct 03 2015 19:11
just type gunzip then the filename
once you're in the directory of the file
Kevin Diem
@kgdiem
Oct 03 2015 19:18
@frogmorton np, if you have a AWS account you could just upload whatever library you'd like that isn't hosted and just link to that
aws.amazon.com -- its free, you host in S3, make sure permissions are set to everyone
duan walker
@duanwalker
Oct 03 2015 19:39
good afternoon everyone!
so i got this prob...

<p data-height="268" data-theme-id="0" data-slug-hash="WQRJBv" data-default-tab="result" data-user="thecomputertutor" class='codepen'>See the Pen <a href='http://codepen.io/thecomputertutor/pen/WQRJBv/'>FCC Local Weather Application</a> by duan walker (<a href='http://codepen.io/thecomputertutor'>@thecomputertutor</a>) on <a href='http://codepen.io'>CodePen</a>.</p>

<script async src="//assets.codepen.io/assets/embed/ei.js"></script>

uh oh. how do you paste a code pen? the same way as BF?
<p data-height="268" data-theme-id="0" data-slug-hash="WQRJBv" data-default-tab="result" data-user="thecomputertutor" class='codepen'>See the Pen <a href='http://codepen.io/thecomputertutor/pen/WQRJBv/'>FCC Local Weather Application</a> by duan walker (<a href='http://codepen.io/thecomputertutor'>@thecomputertutor</a>) on <a href='http://codepen.io'>CodePen</a>.</p>
<script async src="//assets.codepen.io/assets/embed/ei.js"></script>
oops thats not it either
Anthony Albertorio
@tesla809
Oct 03 2015 19:42
Hey guys!
I have some issues with my personal page
duan walker
@duanwalker
Oct 03 2015 19:43
ok there we go
@tesla809 hey! post your code
Anthony Albertorio
@tesla809
Oct 03 2015 19:44
how do i make the Divs responsive so that when I resize the page, they look better
sure, thanks @duanwalker
CamperBot
@camperbot
Oct 03 2015 19:44
tesla809 sends brownie points to @duanwalker :sparkles: :thumbsup: :sparkles:
:star: 211 | @duanwalker | http://www.freecodecamp.com/duanwalker
Anthony Albertorio
@tesla809
Oct 03 2015 19:44
here is the codepen.io
duan walker
@duanwalker
Oct 03 2015 19:45
@tesla809 have you added bootstrap?
@duanwalker yea, its not resizing the way I'd like
@duanwalker the circle divs on the my projects part are not property resizing when I make the webpage smaller
Notice divs under the "Below is some of my most recent work"
Maybe I am doing something wrong in the CSS?
duan walker
@duanwalker
Oct 03 2015 19:49
@tesla809 youre expecting 2 rows of 2 circles then 1 row of one circle correct?
Anthony Albertorio
@tesla809
Oct 03 2015 19:50
@duanwalker yup,
I believe the problem is in the css, perhaps i am missing a media query somewhere, but I can't get it to work
Hans van Riet
@hansinla
Oct 03 2015 19:52

@duanwalker what is your problem? If I call this

console.log(JSON.stringify(conditions));

in your get call, I see all the correct data. You just have to parse it into the html.

Ademola Adegbuyi
@ooade
Oct 03 2015 19:52
@tesla809 change ur <div class="col-md-6 col-small"> to <div class="col-xs-6 col-small">
Anthony Albertorio
@tesla809
Oct 03 2015 19:53
lets see @marhyorh
hopefully it works. thanks @marhyorh for the suggestion
CamperBot
@camperbot
Oct 03 2015 19:53
tesla809 sends brownie points to @marhyorh :sparkles: :thumbsup: :sparkles:
:star: 299 | @marhyorh | http://www.freecodecamp.com/marhyorh
duan walker
@duanwalker
Oct 03 2015 19:53
@tesla809 usually when this happens its because something in the CSS is taking precedence over bootstrap. i agree. id chk the CSS
Anthony Albertorio
@tesla809
Oct 03 2015 19:53
should i delete some css then?
thats a good suggestion @duanwalker
duan walker
@duanwalker
Oct 03 2015 19:54
@tesla809 uh...wait a min. comment out b4 deleting.
Anthony Albertorio
@tesla809
Oct 03 2015 19:55
oooo @marhyorh you are a genius
Ademola Adegbuyi
@ooade
Oct 03 2015 19:55
@tesla809 you need to check on bootstrap grid system to know what style to use there are col-lg-$num ,col-md-$num, col-xs-$num,col-sm-$num
Anthony Albertorio
@tesla809
Oct 03 2015 19:56
@duanwalker thank I will do so
CamperBot
@camperbot
Oct 03 2015 19:56
tesla809 sends brownie points to @duanwalker :sparkles: :thumbsup: :sparkles:
:warning: tesla809 already gave duanwalker points
duan walker
@duanwalker
Oct 03 2015 19:56
@hansinla please explain?
Anthony Albertorio
@tesla809
Oct 03 2015 19:56
@marhyorh it works. What do you mean?
Greg Smith
@PortableStick
Oct 03 2015 19:56
has anyone got a handy way of making API calls from a Codepen site while keeping their API key a secret?
Anthony Albertorio
@tesla809
Oct 03 2015 19:56
@marhyorh I should just read the docs more in-depth. My aversion to them is waning
Ademola Adegbuyi
@ooade
Oct 03 2015 19:57
@tesla809 yeah.. check http://getbootstrap.com/css/#grid
kaushalmathpal
@kaushalmathpal
Oct 03 2015 20:01
var myArray = ["a", "1"];
Alexander Griswold
@AlexGriswold
Oct 03 2015 20:01
Anyone have any clues on the bouncer algorithm? It keeps returning null values even thought I tell is specifically not to...
kaushalmathpal
@kaushalmathpal
Oct 03 2015 20:01
need to do one string and one number
whts wrong with this var myArray = ["a", "1"];
Hans van Riet
@hansinla
Oct 03 2015 20:03
@duanwalker What is your issue exactly? That your dat doesn’t show up in your DOM? the data is there, just check it with console.log(). Now you have to figure out have to get that data object and convert it into a format that works in your html file.
@kaushalmathpal They are both strings, because of your quotation marks.
kaushalmathpal
@kaushalmathpal
Oct 03 2015 20:05
@hansinla thank got it
CamperBot
@camperbot
Oct 03 2015 20:05
kaushalmathpal sends brownie points to @hansinla :sparkles: :thumbsup: :sparkles:
:star: 405 | @hansinla | http://www.freecodecamp.com/hansinla
Tommy Izen
@TommyIzen
Oct 03 2015 20:05
Why is this code returning undefined?
function largestOfFour(arr) 
{
  var arr1 = arr;
  var arr2 = null;
  var arr3 = null;
  for (var i = 0; i < arr.length; i++)   
  {
    var comp = 0;
    arr2 = arr1[i][0]
    if(comp < arr2)
    {
     arr3 = arr2[i]
     comp = arr3;
     return(comp)
    }
  }
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]], "");
duan walker
@duanwalker
Oct 03 2015 20:06
@PortableStick thanks for reminding me about that API key. hell...i was wondering why i wasnt getting any data bk...
CamperBot
@camperbot
Oct 03 2015 20:06
duanwalker sends brownie points to @portablestick :sparkles: :thumbsup: :sparkles:
:star: 268 | @portablestick | http://www.freecodecamp.com/portablestick
duan walker
@duanwalker
Oct 03 2015 20:07
@hansinla well my first prob was i had forgot to set up my API key.
dont know what the prob is now...
Tommy Izen
@TommyIzen
Oct 03 2015 20:08
probably needs more cowbell...
Hans van Riet
@hansinla
Oct 03 2015 20:10

@TommyIzen An array of arrays is passed as argument. You need to find the largest value in each array. With this code

 arr2 = arr1[i][0]

you hard-code to only look at the first value [0] of each array.

Herman Fassett
@HermanFassett
Oct 03 2015 20:11
@TommyIzen when I did this bf, I had a for loop inside a for loop :P
Hans van Riet
@hansinla
Oct 03 2015 20:11
@duanwalker Like I said use console.log to look at what you’re getting back now, then figure out how to use it.
Ademola Adegbuyi
@ooade
Oct 03 2015 20:12
@TommyIzen check on sort function for arrays. @HermanFassett i looped once during mine
Herman Fassett
@HermanFassett
Oct 03 2015 20:12
AH yes sort would help
Hans van Riet
@hansinla
Oct 03 2015 20:13
@TommyIzen You probably want to look at Math.max. No need to sort the array.
Herman Fassett
@HermanFassett
Oct 03 2015 20:14
:P Many ways to do it
Ademola Adegbuyi
@ooade
Oct 03 2015 20:15
Well said @HermanFassett . Sort docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
Hint: Sort each arrays , push the first index.
Alexandrix Ikechukwu
@SpaghettiThots
Oct 03 2015 20:16
@Jauble what will your regex be in this case?
Hans van Riet
@hansinla
Oct 03 2015 20:22
@HermanFassett I didn’t say that you couldn’t use sort(). I just said that you don’t need it.
DTing
@dting
Oct 03 2015 20:26
Sort not only mutates the input arrays but is n log n time complexity. Using array.max with function apply is linear time, making it the slightly prefered method for solving the particular challenge.
Jordan Bourne
@JordanBourne
Oct 03 2015 21:38
How would I pass live text in an input field into a jquery function?
I've tried a couple things with .on() and it's not working for me
Nuno Pires
@ziriab
Oct 03 2015 21:39
blob
Ihab Baghdadi
@ijb87
Oct 03 2015 21:39
can anyone help me with jQuery in HTML?
Nuno Pires
@ziriab
Oct 03 2015 21:40
Bonfire: Reverse a String
reverseString("hello", "");
why do we need the 2nd parameter "" ?
CamperBot
@camperbot
Oct 03 2015 21:40
Sorry, can't find a bonfire called reverse a stringreversestringhello why do we need the 2nd parameter . [ Check the map? ]
Jordan Bourne
@JordanBourne
Oct 03 2015 21:40
I might be able to if it's simple @ijb87 , what do you need?
@ziriab I don't think it's needed at all, I didn't use it at all in my answer
Nuno Pires
@ziriab
Oct 03 2015 21:43
@JordanBourne good to know, thanks.
CamperBot
@camperbot
Oct 03 2015 21:43
ziriab sends brownie points to @jordanbourne :sparkles: :thumbsup: :sparkles:
:star: 201 | @jordanbourne | http://www.freecodecamp.com/jordanbourne
Ihab Baghdadi
@ijb87
Oct 03 2015 21:46
@JordanBourne the script tag that should be added at the top of the html page
with $(document).ready(function() {
what should be typed exactly?
in order to start using jQuery
Jordan Bourne
@JordanBourne
Oct 03 2015 21:49
@ijb87 not sure to be honest, I use codepen which includes it automatically, sorry
Ihab Baghdadi
@ijb87
Oct 03 2015 21:49
@JordanBourne alright, thanks for offering the help anyway
CamperBot
@camperbot
Oct 03 2015 21:49
ijb87 sends brownie points to @jordanbourne :sparkles: :thumbsup: :sparkles:
:star: 202 | @jordanbourne | http://www.freecodecamp.com/jordanbourne
Jordan Bourne
@JordanBourne
Oct 03 2015 21:53
The general FreeCodeCamp chat is more active and it's fine to ask questions there if you're still stuck though, sorry couldn't be more of a help @ijb87
Ademola Adegbuyi
@ooade
Oct 03 2015 21:54
@ijb87 in order to start using jQuery, call your jquery script after your body, then you can write jQuery syntax at the head or within the body
This message was deleted
Ihab Baghdadi
@ijb87
Oct 03 2015 21:55
@marhyorh yes, but the problem is that I don't know how to call it exactly
Ademola Adegbuyi
@ooade
Oct 03 2015 21:56
@ijb87 example <script type="text/javascript" src="../js/jquery-2.1.4.js"></script>
Ihab Baghdadi
@ijb87
Oct 03 2015 21:57
@marhyorh do you have any idea about this: $(document).ready(function() {
which is included in the script element
Ademola Adegbuyi
@ooade
Oct 03 2015 21:58
you can implement it like this
<script type="text/javascript" src="../js/jquery-2.1.4.js"></script><!-- jQuery file -->
<script type="text/javascript" src="../main.js"></script><!--your file -->
Ihab Baghdadi
@ijb87
Oct 03 2015 21:59
@marhyorh alright, thank you for your help
Ademola Adegbuyi
@ooade
Oct 03 2015 22:00
@ijb87 yeah, Any code written within d document.ready() will only run once the page is ready for JavaScript code to execute
flameofsearch
@flameofsearch
Oct 03 2015 22:06
How does FreeCodeCamp compare with Modern Developer and programming bootcamps like Hack Reactor
Derek Frankel
@TuvyaYis
Oct 03 2015 22:36
Hey i've spent a lil time away, reviewing and since FCC has changed slightly...

How do i call the following variable ```js
var ourArray = [];

for(var i = 0; i < 5; i++) {

ourArray.push(i);

}

```
Herman Fassett
@HermanFassett
Oct 03 2015 22:39
Explain
CamperBot
@camperbot
Oct 03 2015 22:39
usage:
wiki $topic info on that topic
topics for a list of topics
Derek Frankel
@TuvyaYis
Oct 03 2015 22:40
Nor do i remember the new backtick post
Well i can't pass the Problem on the Basic JS Map now
Aleksander Gębicki
@Takumar
Oct 03 2015 22:40
@TuvyaYis what do you want to ask? You have now an array full [0, 1, 2, 3, 4] so you can print it to console. console.out(ourArray);
@TuvyaYis you cannot pass a waypoint? Which waypoint it is?
coreydbentley
@coreydbentley
Oct 03 2015 22:42
Has anyone else gotten a 'message' error when doing activity "Waypoint: Create a JavaScript Slot Machine"? I added slotOne = Math.floor(Math.random() (3 - 1 + 1) + 1);
slotTwo = Math.floor(Math.random()
(3 - 1 + 1) + 1);
slotThree = Math.floor(Math.random() * (3 - 1 + 1) + 1);
Derek Frankel
@TuvyaYis
Oct 03 2015 22:42
The Waypoint won't let me continue... though yes,,, im reviewing + originally passed this about 1 - 2 mts ago
Waypoint: JS For Loops
Michael Green
@MichaelGreenNZ
Oct 03 2015 22:43
@TuvyaYis They may have discovered a fault with the test, so What you did to pass last time is wrong now
can you post your code?
Aleksander Gębicki
@Takumar
Oct 03 2015 22:44
@TuvyaYis so you have to put the same numbers but to the array: myArray
@TuvyaYis you have an example code on ourArray and you need to prepare similiar (identical) code to ourArray.
Derek Frankel
@TuvyaYis
Oct 03 2015 22:45
OMG'sh... geez, yeh: myArray worked
every challenge i've passed... has become very frustrating to revisit
Where as this was not the case before the FCC updates
Paul Calabrese
@pacalabre
Oct 03 2015 22:46
can someone help me access my returned data from the open weather API, I have been stuck on this for days
coreydbentley
@coreydbentley
Oct 03 2015 22:47
nevermind i fixed it
Derek Frankel
@TuvyaYis
Oct 03 2015 22:47
it just basically makes me feel crazy in this noob stage of almost "getting it"
Aleksander Gębicki
@Takumar
Oct 03 2015 22:47
@coreydbentley you have forgotten multiplication.
Derek Frankel
@TuvyaYis
Oct 03 2015 22:47
jsbin is good for review as well
@Takumar console.out??? haven't heard nor am i using it correctly? console.log?
coreydbentley
@coreydbentley
Oct 03 2015 22:50
@Takumar Thanks, for some reason the multiplication symbol didn't paste into the chat room but I did have it included...it turns out I just had my parenthesis wrong. I was adding 1 to the random result before 'flooring' and not after like I should have been. Thanks for the response though!
CamperBot
@camperbot
Oct 03 2015 22:50
coreydbentley sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 378 | @takumar | http://www.freecodecamp.com/takumar
Aleksander Gębicki
@Takumar
Oct 03 2015 22:51
@TuvyaYis console.log("Your text" + variable); Of course it is: console.log() function. I'm too tired I think I need some sleep. Sorry.
Derek Frankel
@TuvyaYis
Oct 03 2015 22:52
how do you use it here: ```js
```
var myArray = [];

for(i = 0; i < 5; i++) {

  myArray.push(i);
}
cool no worries... thx i can look it up its no sweat... have a good sleep
CamperBot
@camperbot
Oct 03 2015 22:53
if you want to thank someone, put an @ before their name!
Aleksander Gębicki
@Takumar
Oct 03 2015 22:53
@TuvyaYis thats correct additional code for this waypoing.
Derek Frankel
@TuvyaYis
Oct 03 2015 22:54
@Takumar thx
CamperBot
@camperbot
Oct 03 2015 22:54
tuvyayis sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star: 379 | @takumar | http://www.freecodecamp.com/takumar
M Used
@mildused
Oct 03 2015 22:55
Anyone need help with anything?
Paul Calabrese
@pacalabre
Oct 03 2015 22:57
i do
i need help accessing the data in my returned json from open weather
M Used
@mildused
Oct 03 2015 22:58
Sure!
Can I see a repo for it or something
Paul Calabrese
@pacalabre
Oct 03 2015 22:59

$(function(){
var $weather = $('#weather');

var weatherReturned = $.getJSON('http://api.openweathermap.org/data/2.5/weather?q=Seattle');
console.log(json);
})

peopleblazin
@peopleblazin
Oct 03 2015 22:59
<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;
  }
  img {
    .smaller-image { width: 100px; }
  }

</style>

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

<img 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>
What have I done wrong?
M Used
@mildused
Oct 03 2015 23:00
can you both pm me?
Paul Calabrese
@pacalabre
Oct 03 2015 23:00
thats what I have for it so far.. i can't figure out what to console.log... I've tried things like - json.weather[0]
yes
peopleblazin
@peopleblazin
Oct 03 2015 23:02
```
Aleksander Gębicki
@Takumar
Oct 03 2015 23:02
@peopleblazin which waypoint it is?
Ademola Adegbuyi
@ooade
Oct 03 2015 23:02
@pacalabre
sample:
$.getJSON("http://api.openweathermap.org/data/2.5/weather?lat="+latitude+"&amp;lon="+longitude,function(data){
      var city = data.name;
      var temp = data.main.temp;
      var tempCelc = (data.main.temp-273.15).toFixed(2);
      var tempFahren = (data.main.temp*(9/5)-459.7).toFixed(2);
      var wd = data.weather.shift(); //wd {Weather Data}
      var icon = wd.icon;
      var desc = wd.description;
      var speed = data.wind.speed;
      var direction = direx(data.wind.deg);
});
peopleblazin
@peopleblazin
Oct 03 2015 23:02
<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;
  }
  img {
    .smaller-image { width: 100px; }
  }

</style>

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

<img 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>
What did i do wrong?
I have to make the IMG element smaller to 100px
Herman Fassett
@HermanFassett
Oct 03 2015 23:03
Your img style is wrong
Well
Is this the one through class?
peopleblazin
@peopleblazin
Oct 03 2015 23:03
Yes
Herman Fassett
@HermanFassett
Oct 03 2015 23:04
remove the img {} part so you just have the .smaller-image {} class style
Aleksander Gębicki
@Takumar
Oct 03 2015 23:04
@peopleblazin @HermanFassett already told you. You have to create only class .smaller-image and assign it to <img> tag in HTML section.
Herman Fassett
@HermanFassett
Oct 03 2015 23:05
then add that class to your img tag
Boris
@boris-in-london
Oct 03 2015 23:06
hi all
whos got time for a silly question?
Aleksander Gębicki
@Takumar
Oct 03 2015 23:06
Hello @boris-in-london
It depends how silly it is :-)
Boris
@boris-in-london
Oct 03 2015 23:07
function bouncer(arr) {

  function killFalsy(it) {
    if(it !== false || 
       it !== null || 
       it !== 0 || 
       it !== "" || 
       it !== undefined ||
       it !== NaN) {
       return true;
    }
  }
  return arr.filter(killFalsy);
}

bouncer([7, "ate", "", false, 9], "");
lol pretty silly
so i'm trying to all the 'falsy' elements in my if statement filtered out
M Used
@mildused
Oct 03 2015 23:08
it's actually pretty simple boris
Boris
@boris-in-london
Oct 03 2015 23:08
lol yeah i know... smh
,<
M Used
@mildused
Oct 03 2015 23:08
there is easier way
Boris
@boris-in-london
Oct 03 2015 23:08
dont do this to me @mildused you mean to say i've been on this for an hour for no reason
a hint would go a long way
Herman Fassett
@HermanFassett
Oct 03 2015 23:08
Boolean?
Aleksander Gębicki
@Takumar
Oct 03 2015 23:09
@HermanFassett too short :-) too quick and too easy.
Herman Fassett
@HermanFassett
Oct 03 2015 23:09
:P
Boris
@boris-in-london
Oct 03 2015 23:09
hmmm i'll look it over again
thanks all...
CamperBot
@camperbot
Oct 03 2015 23:10
if you want to thank someone, put an @ before their name!
Herman Fassett
@HermanFassett
Oct 03 2015 23:10
Yeah, Boolean makes it a pretty short 1 liner :P
Karolis
@Luomint
Oct 03 2015 23:11
This message was deleted
hmm, or rather why is
["last"] == ["last"]
false?
Karolis
@Luomint
Oct 03 2015 23:16
I guess I'll just
["last"].toString() == ["last"].toString();
for now, that seems to fix this problem
Herman Fassett
@HermanFassett
Oct 03 2015 23:16
Would the previous way be comparing the values stored in last?
Karolis
@Luomint
Oct 03 2015 23:16
when I type it in consule it returns me the same value though
or return ["last"] .. returns ["last"].toString() == ["last"].toString();
but yea probably that's why
somekind of inconsistency
just tried ["last"] == ["last"], returns true just fine in ruby
anyway they both shuold return values then an it should be true anyway
Boris
@boris-in-london
Oct 03 2015 23:26
@HermanFassett i'm still getting an empty array. i don't see the one line bool.
function bouncer(arr) {
  //debugger;
  function killFalsy(it) {
   it !== false || 
   it !== null || 
   it !== 0 || 
   it !== "" || 
   it !== undefined ||
   it !== NaN   
  }
  return arr.filter(killFalsy);
}

bouncer([7, "ate", "", false, 9], "");
Herman Fassett
@HermanFassett
Oct 03 2015 23:27
Your killFalsy function only needs one short line which is returning something use the Boolean() function
Boris
@boris-in-london
Oct 03 2015 23:28
do you mean stop repeating it and just line up the || one after the other?
Boris
@boris-in-london
Oct 03 2015 23:28
lol i had no idea there was a boolean function
Rex Schrader
@SaintPeter
Oct 03 2015 23:29
@boris-in-london It's linked in the problem description. Always follow the links. :D
DTing
@dting
Oct 03 2015 23:29

@boris-in-london the mdn for array.filter has a big hint

filter() calls a provided callback function once for each element in an array, and constructs a new array of all the values for which callback returns a true value or a value that coerces to true.

Boris
@boris-in-london
Oct 03 2015 23:29
thanks all
CamperBot
@camperbot
Oct 03 2015 23:29
if you want to thank someone, put an @ before their name!
M Used
@mildused
Oct 03 2015 23:32
@boris-in-london haha
I wish you figured it out though
Adam Sickmiller
@progmacattack
Oct 03 2015 23:38
struggling with the "no repeats" algorithm. i can't figure out how to apply permutations principles with the repeating letters. any thoughts that might help?
Boris
@boris-in-london
Oct 03 2015 23:39
@mildused lol return Boolean(wateva) yeah it worked.
i'm so ashamed.
lol
DTing
@dting
Oct 03 2015 23:40
if you are going to have an anonymous function you don't need the Boolean function. you can just return the variable
Herman Fassett
@HermanFassett
Oct 03 2015 23:40
:)
Rex Schrader
@SaintPeter
Oct 03 2015 23:41
@progmacattack This is one that, if you actually know how permutation is supposed to work, you'll do more poorly at. Imagine that repeated letters are like twins - they look the same but are different people. So if you treat each letter as "unique" for the purposes of permuting, but identical for the purposes of comparison.
@progmacattack Also: Heap's Algorithm is your friend.
Adam Sickmiller
@progmacattack
Oct 03 2015 23:43
@SaintPeter That is really helpful. I can tell it is different from thinking about repeating letters in a word like "loose" but i'm having trouble conceptualizing precisely how. You really helped with that.
SaintPeter @SaintPeter bows
Adam Sickmiller
@progmacattack
Oct 03 2015 23:45
:) thanks. I'll let you know when i figure it out. Gotta give the kids baths for the next 30 minutes then back at it
CamperBot
@camperbot
Oct 03 2015 23:45
if you want to thank someone, put an @ before their name!