These are chat archives for FreeCodeCamp/Help

22nd
Jul 2017
Aita Kane
@aita-kane
Jul 22 2017 00:02
i'm still a little confused about booleans
i dont even understand how to declare them. you can't do it the way they do on mozilla
korzo
@korzo
Jul 22 2017 00:06
@SydneyWarren use typeof to check, if argument is boolean
cowCrazy
@cowCrazy
Jul 22 2017 00:10
@SydneyWarren krozo way is faster I think, but this article on mozila can also help with telling the differences between the types with eauality checks
Gulsvi
@gulsvi
Jul 22 2017 00:13
@aita-kane Add jQuery to your codepen and in your CSS make your body taller so you can scroll
body {
  height: 200vh;
}
You'll also want to reverse your hide/show if you want it to reappear at the top of the window
$(displaySquare);
$(window).on("scroll", displaySquare);

function displaySquare() {
  $("#test").hide();
  if ($(window).scrollTop() < 10) $("#test").show();
}
Matt Green
@TechnoTrumpet
Jul 22 2017 00:39
Can I ask about Pantry-for-Good here?
Eric Miller
@ericmiller777
Jul 22 2017 01:04
hey
if i have
var letters = [65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90];
is there a way i can add like letters[25] + 1 = letters[0]
Manish Giri
@Manish-Giri
Jul 22 2017 01:07
uh yes?
@ericmiller777
but should be the other way
Eric Miller
@ericmiller777
Jul 22 2017 01:08
eh >.>;
@Manish-Giri like i want so that if I go over the contents of the array it looks
if i do letter[1] + 25 I get the value of letters[i] + 23
25*
I want it to go back around the array
Manish Giri
@Manish-Giri
Jul 22 2017 01:11
I have no idea what you mean
Albert Cardona II
@daddycardona
Jul 22 2017 01:14
Hello everyone how are you :)
quick question about the create your own quote machine, do I copy and paste and put my quotes on my page and hide them or am I suppose to get the quotes off a website or something?
Manish Giri
@Manish-Giri
Jul 22 2017 01:18
you can do either way
upto you
Albert Cardona II
@daddycardona
Jul 22 2017 01:20
Oh okay thanks @Manish-Giri
CamperBot
@camperbot
Jul 22 2017 01:20
daddycardona sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6296 | @manish-giri |http://www.freecodecamp.com/manish-giri
Albert Cardona II
@daddycardona
Jul 22 2017 01:21
I was just double checking because I only need three quotes and as long as I have the gist of what I am suppose to be doing. Lastly, are they asking me to be able to tweet what ever quote is in the box for the last bit of it
or get a quote from twitter?
Kyle Holm
@thekholm80
Jul 22 2017 01:41
@daddycardona you want to let your user tweet the random quote they see on your page
Albert Cardona II
@daddycardona
Jul 22 2017 01:50
ok thanks @thekholm80
CamperBot
@camperbot
Jul 22 2017 01:50
daddycardona sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1358 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Albert Cardona II
@daddycardona
Jul 22 2017 01:51
sorry i dozed off lol
Kyle Holm
@thekholm80
Jul 22 2017 01:52
lol no worries
Joseph
@revisualize
Jul 22 2017 03:07
Hey.
freecodecamp
@ChingweiYu
Jul 22 2017 03:19
hi all
chesternimitz
@chesternimitz
Jul 22 2017 03:48

Hi all, I have a question regarding coloring the inside of font-awesome icons. I am currently doing it by setting a white background behind the icon but I cant cut the background to make it so where it doesn't overlap the icon itself.

facebookIcon {

color: #3b5998;
background-color: white;
background-size: 2px;

}

relevant html
<a href = 'https://www.facebook.com/' target = '_blank'>
<i class = 'fa fa-facebook-official' id = 'facebookIcon'></i></a>

SaiChand Duppala
@saichandd
Jul 22 2017 04:06
Screen Shot 2017-07-22 at 09.33.50.png
can someone help me. My terminal is starting weird,.whats the hphproxy how did it come there.
Manish Giri
@Manish-Giri
Jul 22 2017 04:07
that's your host name
SaiChand Duppala
@saichandd
Jul 22 2017 04:09
@Manish-Giri it was never there, why is it showing up now, before it used to show the path. like users/name/desktop
Manish Giri
@Manish-Giri
Jul 22 2017 04:09
@imradioactive if you do pwd it will show you the path
SaiChand Duppala
@saichandd
Jul 22 2017 04:11
but.. it never showed that ttys005 and hphproxy thing, why is it showing up now?
@Manish-Giri i did this scutil --get HostName and it says HostName: not set
Manish Giri
@Manish-Giri
Jul 22 2017 04:13
are you on a shared network?
zhu2zhu
@zhu2zhu
Jul 22 2017 04:14
Anyone know how to make rpc between Exchange platform and token(BTC type, ETH and ERC-20 type).
SaiChand Duppala
@saichandd
Jul 22 2017 04:15
we have lan for our rooms in hostel, and i'm using a router and connected via wifi
Manish Giri
@Manish-Giri
Jul 22 2017 04:15
due to that
set it withscutil and it'll be fixed
SaiChand Duppala
@saichandd
Jul 22 2017 04:16
I used sudo scutil --set HostName 'yourHostName' and it still says hphproxy
Manish Giri
@Manish-Giri
Jul 22 2017 04:18
did you logout?
SaiChand Duppala
@saichandd
Jul 22 2017 04:18
we got a mail that there was some problem with the servers and they are being maintained, do you thing this could have happened after that
Kyle Holm
@thekholm80
Jul 22 2017 04:19
what do you want it to say?
SaiChand Duppala
@saichandd
Jul 22 2017 04:20
@Manish-Giri yay, Thanks a lot, I logged out and came back and it changed
CamperBot
@camperbot
Jul 22 2017 04:20
imradioactive sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6297 | @manish-giri |http://www.freecodecamp.com/manish-giri
Kyle Holm
@thekholm80
Jul 22 2017 04:20
@Manish-Giri thanks
CamperBot
@camperbot
Jul 22 2017 04:20
thekholm80 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6298 | @manish-giri |http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Jul 22 2017 04:20
:sunglasses:
SaiChand Duppala
@saichandd
Jul 22 2017 04:20
@thekholm80 I want it to show tht path
the*
Manish Giri
@Manish-Giri
Jul 22 2017 04:20
@imradioactive :+1:
@thekholm80 ty
CamperBot
@camperbot
Jul 22 2017 04:20
manish-giri sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1359 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Bashir Harrell
@bookofbash
Jul 22 2017 05:43
Hi Campers
I took a break from my Twitch Viewer to figure out what I wanted to do design wise. I have an idea, and made a template, but when I input the data using jSON it messes with my design. Any suggestions?
https://codepen.io/bookofbash/pen/rzBGwy?editors=0000
Gulsvi
@gulsvi
Jul 22 2017 05:50
@bookofbash I love the idea :) it's probably best for you to generate your HTML first, then populate it with names, status, etc. as you get responses in your getJSON. If you can generate the HTML + Layout you want outside of your getJSON calls first, then you're on the right track
One thing I notice is that you have the same ID created multiple times (card and online) - IDs need to be unique, so by creating your HTML in advance, you'll at least be able to rule out your asynchronous code when generating the UI you want
Bashir Harrell
@bookofbash
Jul 22 2017 05:57

@SkyC0der So if I understand this right, I would be making the HTML, and then using something like $(.name)html(something)
I thought I did have the html up...

Ok so even if I am using the IDs once, I mean I only have one originall ID, because the jSON makes more ID="name" then using an ID is incorrect? And I should make that a class?

Gulsvi
@gulsvi
Jul 22 2017 05:58
@bookofbash Yeah, things like offline and online should be classes. Each user card would have an ID = to the twitch user's name
Bashir Harrell
@bookofbash
Jul 22 2017 05:59
ok i see
Gulsvi
@gulsvi
Jul 22 2017 05:59
The other benefit of this approach is that you'll always get the cards in the same order
Bashir Harrell
@bookofbash
Jul 22 2017 06:01
Im still a bit confused about why the css i wrote, like all the borders get removed after i .append()
Bashir Harrell
@bookofbash
Jul 22 2017 06:12
@SkyC0der Oh wow it worked pretty well! Thanks
CamperBot
@camperbot
Jul 22 2017 06:12
bookofbash sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2186 | @skyc0der |http://www.freecodecamp.com/skyc0der
Morchid Chellali
@Morched23MJ
Jul 22 2017 07:35
https://codepen.io/Morched23MJ/pen/vJBKZO?editors=1000
I added a function decreaseFontSize, inside of it, a loop, normally to decrease the size of my h1 element. And gave it to another function getWeather, so that when success, the function does the job, it doesn't seem to work, please check my JS code.
Viktor Tiutiun
@vittorioVT
Jul 22 2017 07:43
@Morched23MJ you need this $.getJSON(fullUrl, function(data) {
var temp = data.main.temp;
.....................
};
Morchid Chellali
@Morched23MJ
Jul 22 2017 07:46
Can you be more specefic, please?
Viktor Tiutiun
@vittorioVT
Jul 22 2017 07:49
@Morched23MJ I see that without my edits you get all the necessary data :smile:
Morchid Chellali
@Morched23MJ
Jul 22 2017 07:49
What you mean? :smile:
Sweet Coding :)
@SweetCodingInc
Jul 22 2017 07:50

@vittorioVT You're not change the size using i. You need to change this part

("font-size", "-= ipx");

to

("font-size", "-="+i+"px");
Morchid Chellali
@Morched23MJ
Jul 22 2017 07:52
@SweetCodingInc. @vittorioVT, thank you both, it worked.
CamperBot
@camperbot
Jul 22 2017 07:52
morched23mj sends brownie points to @sweetcodinginc and @vittoriovt :sparkles: :thumbsup: :sparkles:
:cookie: 796 | @vittoriovt |http://www.freecodecamp.com/vittoriovt
:cookie: 142 | @sweetcodinginc |http://www.freecodecamp.com/sweetcodinginc
Viktor Tiutiun
@vittorioVT
Jul 22 2017 07:53
@Morched23MJ you're welcome
Morchid Chellali
@Morched23MJ
Jul 22 2017 08:13
I want to make a delay between every iteration in a loop, how?
Huỳnh Trần Khanh
@khanh2003
Jul 22 2017 08:27

I am using A-Frame and React in my project. I want to turn off React's SyntheticEvent feature because A-Frame makes use of custom events heavily. Is there any way to do that?


@Morched23MJ

var delay = 1000; // one second delay between every iteration in a loop.
for (var i = 0; i < 10; i++) {
  setTimeout(function() {
    // your code here
  }, delay * i);
}
Morchid Chellali
@Morched23MJ
Jul 22 2017 08:28
Thanks, @khanh2003
CamperBot
@camperbot
Jul 22 2017 08:28
morched23mj sends brownie points to @khanh2003 :sparkles: :thumbsup: :sparkles:
:cookie: 99 | @khanh2003 |http://www.freecodecamp.com/khanh2003
Bashir Harrell
@bookofbash
Jul 22 2017 09:06

Can't get all my 'offline' and 'online' divs to stay in the right place. Or just .append() one per card.

https://codepen.io/bookofbash/pen/rzBGwy

Please help
Alex
@alexandrupintilei
Jul 22 2017 09:44
Which HTML attribute is used to define inline styles?
heroiczero
@heroiczero
Jul 22 2017 09:51
@alexandrupintilei <h2 style=""> something like this is used for inline style
@alexandrupintilei this might show you various ways style is defined https://www.w3schools.com/html/html_css.asp
Alex
@alexandrupintilei
Jul 22 2017 10:18
@heroiczero ty
CamperBot
@camperbot
Jul 22 2017 10:18
alexandrupintilei sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1515 | @heroiczero |http://www.freecodecamp.com/heroiczero
Alex
@alexandrupintilei
Jul 22 2017 10:19
Can someone sugest me a site,where i can make some JavaScript practice?Thx
heroiczero
@heroiczero
Jul 22 2017 10:20
@alexandrupintilei codewars
Max Datsun
@datmax
Jul 22 2017 10:21
@BookWritesLLC what do you mean by standing in the right place?
heroiczero
@heroiczero
Jul 22 2017 10:21
@alexandrupintilei https://github.com/EbookFoundation/free-programming-books this is also a goood resource to use
Alex
@alexandrupintilei
Jul 22 2017 10:22
@heroiczero thx
CamperBot
@camperbot
Jul 22 2017 10:22
alexandrupintilei sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:warning: alexandrupintilei already gave heroiczero points
GeorgeII
@GeorgeII
Jul 22 2017 10:31
Hello! Does your fa fa-window-close font-awesome icon work?
Satyam kumar
@satty18
Jul 22 2017 10:38

<html>

<head>

<title>Circles</title>
enter code here<!-- Load the Paper.js library -->

<script type="text/javascript" src="paper-full.js"></script>
<!-- Define inlined PaperScript associate it with myCanvas -->

<script type="text/paperscript" canvas="myCanvas">

var path = new Path();

path.strokeColor = 'black';
var start = new Point(100, 100);

path.moveTo(start);

path.lineTo(start + [ 100, -50 ]);

</script>
</head>

<body>

not getting anything on my browser
can anyone help
?
Aita Kane
@aita-kane
Jul 22 2017 10:43
@SkyC0der thank you
CamperBot
@camperbot
Jul 22 2017 10:43
:star2: 2187 | @skyc0der |http://www.freecodecamp.com/skyc0der
aita-kane sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
madhuri soni
@sonimadhuri
Jul 22 2017 11:26
@GeorgeII yes it works .maybe you forgot to add the cdn for font awesome icons
GeorgeII
@GeorgeII
Jul 22 2017 11:44
@sonimadhuri ok ty. No, the other icons work
CamperBot
@camperbot
Jul 22 2017 11:44
georgeii sends brownie points to @sonimadhuri :sparkles: :thumbsup: :sparkles:
:cookie: 332 | @sonimadhuri |http://www.freecodecamp.com/sonimadhuri
GeorgeII
@GeorgeII
Jul 22 2017 11:48
One more question. How can I make screen class top margin in its own properties? I think I can add padding-top in content-box class but is there any way to fix it in screen? And why margin top doesn't work in this case?
https://codepen.io/GeorgeIV/pen/YxKeJB
madhuri soni
@sonimadhuri
Jul 22 2017 12:00
@GeorgeII the window close icon was included as part of the font awesome4.7 version but you were using version 4.4 so the other icons worked but not this one.
Vivek Ranjan
@vivekranjan92
Jul 22 2017 12:11
hi anyone know about kibana??
Jasper
@Jasperaine
Jul 22 2017 12:22
Hello please could somebody help me. I cant get the random search to work on my wiki API app https://codepen.io/Jasperaine/pen/RgyReB
Stephen James
@sjames1958gm
Jul 22 2017 12:27
@Jasperaine I used this window.open("http://en.wikipedia.org/wiki/Special:Random");
Jasper
@Jasperaine
Jul 22 2017 12:28
@sjames1958gm ah thank you!
GeorgeII
@GeorgeII
Jul 22 2017 12:28
@Jasperaine I this onclick="window.open('https://en.wikipedia.org/wiki/Special:Random')" in my project. You can add it as attribute to your <button>. I don't know is it depricated but it works
Jasper
@Jasperaine
Jul 22 2017 12:28
@GeorgeII thank you!
CamperBot
@camperbot
Jul 22 2017 12:28
jasperaine sends brownie points to @georgeii :sparkles: :thumbsup: :sparkles:
:cookie: 7 | @georgeii |http://www.freecodecamp.com/georgeii
Allen
@allensoberano
Jul 22 2017 12:30
Anyone: I'm working on the search box for my wiki challenge. Just trying to make sure the button works I get an error in the console and "Hello" doesn't print to console Here is my code $('form').submit(function (evt) {
evt.preventDefault();
console.log("hello");
 });
GeorgeII
@GeorgeII
Jul 22 2017 12:30
@sjames1958gm did you add this to your html or js code?
Stephen James
@sjames1958gm
Jul 22 2017 12:31
@GeorgeII I had a click handler for the button in js
Allen
@allensoberano
Jul 22 2017 12:32
ok, not sure how to do markdown in here either. hahaha sorry everyone
Stephen James
@sjames1958gm
Jul 22 2017 12:32
@allensoberano What is the error in the console?
use shift-enter to get a new line (the three tick marks need to be on their own line
```
Code
```
GeorgeII
@GeorgeII
Jul 22 2017 12:32
@allensoberano use before the code and after it
ahahaha
ok
Allen
@allensoberano
Jul 22 2017 12:34
$('form').submit(function (evt) {
       evt.preventDefault();
      console.log("hello");

     });
Thanks @sjames1958gm
CamperBot
@camperbot
Jul 22 2017 12:34
allensoberano sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8132 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Allen
@allensoberano
Jul 22 2017 12:34
Unexpected token '<'
Stephen James
@sjames1958gm
Jul 22 2017 12:36
@allensoberano Sounds like that may be preventing your code from running completely is this in codepen?
Allen
@allensoberano
Jul 22 2017 12:36
yes
Stephen James
@sjames1958gm
Jul 22 2017 12:37
share the link?
@sjames1958gm I guess I get that error even when it opens
Stephen James
@sjames1958gm
Jul 22 2017 12:40
I am not seeing that error - what I am seeing is that your search URL has no search term so the wiki page is coming back as HTML not json
Allen
@allensoberano
Jul 22 2017 12:42
But with the code, shouldn't it not even submit to anything and just print Hello to the console?
$('form').submit(function (evt) {
       evt.preventDefault();
      console.log("hello");

     });
Stephen James
@sjames1958gm
Jul 22 2017 12:42
@allensoberano You are requesting json at the bottom without a search term
Yes, I thought it should, not sure why it isn't
@allensoberano Try removing the getJSON at the bottom which doesn't work because no search term>
Then, move the two handlers outside of the function viewWiki so they get registered on page load
Allen
@allensoberano
Jul 22 2017 12:45
@sjames1958gm thanks for that. I had it all working with a default search term when requesting api, Had all that working, now was going to put in the form section and forgot to comment that out.
CamperBot
@camperbot
Jul 22 2017 12:45
allensoberano sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:warning: allensoberano already gave sjames1958gm points
Aita Kane
@aita-kane
Jul 22 2017 12:45
hello can one of you help me please so i have a code which make a div dissapear on scroll and what i want is when disappearing on scroll to do it the same way the line ''In GOOD WE TRUST '' does in this website http://www.goodorganiconly.com/

my script ```$(window).scroll(function() {

if ($(this).scrollTop()>0)
 {
    $('.cnav').fadeOut();
 }
else
 {
  $('.cnav').fadeIn();
 }

}); ```

Allen
@allensoberano
Jul 22 2017 12:46
@sjames1958gm so no error now, I just commented out the line for now and when I go back to pressing the button, I still don't get anything to the console. I'm not sure why that is.
Stephen James
@sjames1958gm
Jul 22 2017 12:47
@allensoberano $("form").submit(function(e) { this code here (and the one for "button" above it are defined
Inside of viewWiki, so they don't happen unless you call viewWiki (which you commented out)
Move these outside of that function so they happen on page load
Allen
@allensoberano
Jul 22 2017 12:49
oh snap!!!! rookie mistake. I tend to do that working in codepen opposed to an IDE where I'm able to see a lot more code on screen.
Thanks @sjames1958gm
CamperBot
@camperbot
Jul 22 2017 12:49
allensoberano sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:warning: allensoberano already gave sjames1958gm points
Allen
@allensoberano
Jul 22 2017 12:52
That's been causing me other issues for the last hour. At least it got burned in during that hour so I'll know next time. Thanks
Stephen James
@sjames1958gm
Jul 22 2017 12:52
@allensoberano Yeah, it is hard to work with much code in codepen
Shubham Sharma
@shubhamsrkdev
Jul 22 2017 12:55
What do you guys suggest, I have completed my front end certification, should I move to backend challenges (as Data visualization challenges are unavailable)?
Stephen James
@sjames1958gm
Jul 22 2017 13:03
@shubhamsrkdev I say yes, gotta keep learning. Are the React projects not available (under Data visualization?)
Shubham Sharma
@shubhamsrkdev
Jul 22 2017 13:05
Projects are there but not challenges someone suggested to try the beta site, there those challenges are available
Moisés Man
@moigithub
Jul 22 2017 13:58
use other resources to learn , then come back to do the Projects @shubhamsrkdev
Allan N Jeremy
@AllanJeremy
Jul 22 2017 14:10

@shubhamsrkdev Highly recommend Succintly books for getting up to speed quickly

for learning concepts quickly if you have base knowledge.

Here's the React.js succintly book which teaches you most things you need to get started in 100~ pages

Darren
@DarrenfJ
Jul 22 2017 14:11
morning fCC.. happy Saturday (or Sunday if yer on the other side of the blue ball)
@sjames1958gm hey buddy! :wave:
Ravi Kishore Thella
@ravikishorethella
Jul 22 2017 14:13
@DarrenfJ :wave:
good mng
Darren
@DarrenfJ
Jul 22 2017 14:14
@ravikishorethella hey buddy :D
Ravi Kishore Thella
@ravikishorethella
Jul 22 2017 14:14
how is your react course going on?
Darren
@DarrenfJ
Jul 22 2017 14:15
i've got too many courses going right now.. and just started a chingu cohort.. busyBusy
and you?
Allan N Jeremy
@AllanJeremy
Jul 22 2017 14:15
Hey to you too Darren
:3 where are you guys doing react courses from
Darren
@DarrenfJ
Jul 22 2017 14:15
@AllanJeremy heyhey :D
brb off for :coffee: , code-on roomies
Ravi Kishore Thella
@ravikishorethella
Jul 22 2017 14:15
busy with jQuery and pure DOM scripting course
Pethaf
@Pethaf
Jul 22 2017 14:18
What are these chingu cohorts?
I have heard of them.
Pethaf
@Pethaf
Jul 22 2017 14:20
Ok, is that a full time gig?
Stephen James
@sjames1958gm
Jul 22 2017 14:26
@DarrenfJ Hey
9:26am here
@AllanJeremy Udemy, watch for discounted courses
madankumar sm
@madanamigo
Jul 22 2017 14:29
Guys anyone plz tell me how get twichtv API???
Max Datsun
@datmax
Jul 22 2017 14:30
@madanamigo use the windbox thing in the description
madankumar sm
@madanamigo
Jul 22 2017 14:35
URL plz @max Datsun
Max Datsun
@datmax
Jul 22 2017 14:36
Wait a sec
It's very easy to use
Darren
@DarrenfJ
Jul 22 2017 15:01
@sjames1958gm where yah located?
@ravikishorethella yer course sounds cool... liking it?
Ravi Kishore Thella
@ravikishorethella
Jul 22 2017 15:01
yes
Kyle Holm
@thekholm80
Jul 22 2017 15:04
@DarrenfJ @ravikishorethella :wave:
Ravi Kishore Thella
@ravikishorethella
Jul 22 2017 15:04
@thekholm80 mng sir
:smile:
Kyle Holm
@thekholm80
Jul 22 2017 15:05
how's your Saturday going?
Ravi Kishore Thella
@ravikishorethella
Jul 22 2017 15:05
:sparkles:
:fire:
Darren
@DarrenfJ
Jul 22 2017 15:05
@thekholm80 buddy!
:wave:
i've got a podcast and some hashbrowns and my coffee to drink so poke back in later... but my usual kudos and trinkets for the hard working volunteers...
Ravi Kishore Thella
@ravikishorethella
Jul 22 2017 15:07
@DarrenfJ bye
Darren
@DarrenfJ
Jul 22 2017 15:07
thanks @ravikishorethella @thekholm80 @sjames1958gm @AllanJeremy @heroiczero @vittorioVT
CamperBot
@camperbot
Jul 22 2017 15:07
darrenfj sends brownie points to @ravikishorethella and @thekholm80 and @sjames1958gm and @allanjeremy and @heroiczero and @vittoriovt :sparkles: :thumbsup: :sparkles:
:star2: 1360 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:cookie: 797 | @vittoriovt |http://www.freecodecamp.com/vittoriovt
:star2: 1517 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 8133 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
:cookie: 277 | @allanjeremy |http://www.freecodecamp.com/allanjeremy
:cookie: 972 | @ravikishorethella |http://www.freecodecamp.com/ravikishorethella
Darren
@DarrenfJ
Jul 22 2017 15:07
later guys :D
Kyle Holm
@thekholm80
Jul 22 2017 15:07
@DarrenfJ thanks man!
CamperBot
@camperbot
Jul 22 2017 15:07
thekholm80 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1925 | @darrenfj |http://www.freecodecamp.com/darrenfj
Ravi Kishore Thella
@ravikishorethella
Jul 22 2017 15:07
@DarrenfJ ty
CamperBot
@camperbot
Jul 22 2017 15:07
ravikishorethella sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1926 | @darrenfj |http://www.freecodecamp.com/darrenfj
Allan N Jeremy
@AllanJeremy
Jul 22 2017 15:08
:o @DarrenfJ thanks, later
Ankit Mehta
@ankitmehta1
Jul 22 2017 17:05
body{
margin-top: 60px;
}
when i put this in css in Codepen it doesn't work, but when i put it under HTML style tag it works
what's the problem? @AllanJeremy
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:06
should work, link to your codepen?
@ankitmehta1
Ankit Mehta
@ankitmehta1
Jul 22 2017 17:07
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:10

Oh, I believe it's because of priority/specificity, bootstrap already has a margin-top set for body.

Inline css takes priority over all css

So if you want it to work in your css you can override the bootstrap margin-top by adding !important to the end like so margin-top: 60px !important

Note: you should use important with caution though but that'll fix it

@ankitmehta1
Ankit Mehta
@ankitmehta1
Jul 22 2017 17:11
@AllanJeremy it should work without that?
Timothy Javins
@timjavins
Jul 22 2017 17:11
@AllanJeremy Would a div or span tag work also in this case?
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:13

@timjavins Yes. A better approach would be to add a wrapper div and apply a margin on that

@ankitmehta1

<div class="containerf-fluid wrapper">
<!--content-->
</div>
then in css
.wrapper
{
  margin-top:60px;
}
:/ fail typing
Timothy Javins
@timjavins
Jul 22 2017 17:14
Sweet. :)
Thanks @AllanJeremy
CamperBot
@camperbot
Jul 22 2017 17:14
timjavins sends brownie points to @allanjeremy :sparkles: :thumbsup: :sparkles:
:cookie: 278 | @allanjeremy |http://www.freecodecamp.com/allanjeremy
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:14
@ankitmehta1 u sure put everything u could find in there. in your pen
problem is - u shouldn't do that
remove bootstrap4
Timothy Javins
@timjavins
Jul 22 2017 17:16
I just found out about the Style switcher for using alternate CSS sheets (two or more stylistic versions of the same site). It doesn't work for all browsers, but it's fun.
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:16
and delete boostrap 3.3.1. from HTML
playing with friends is fun.
that is just smth else than fun
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:17

No worries :)

@timjavins , style switcher? :D

@diomed I'm going to thank you just to see how many cookies you got now
CamperBot
@camperbot
Jul 22 2017 17:17
allanjeremy sends brownie points to @diomed :sparkles: :thumbsup: :sparkles:
:star2: 5181 | @diomed |http://www.freecodecamp.com/diomed
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:17
fun bar sure falls down when the older u get
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:17
Oh, cool
Wtb friends to "code"/"hangout" with while coding :3
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:18
I'd rather hang myself
Ankit Mehta
@ankitmehta1
Jul 22 2017 17:19
@diomed i removed what you said. All the effects are gone now
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:20
can anyone open images.google.com
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:20
Lol
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:20
@ankitmehta1 well I didn't say - remove bootstrap 3.3.7
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:21
I got redirected to 2nd when I visit first :sob:
Ankit Mehta
@ankitmehta1
Jul 22 2017 17:21
@diomed I didn't remove that. What you told i did
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:21
save it and send pen link again
@AllanJeremy u're the only1 who thanked me in a long time
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:23

@diomed :worried: , looks like some regex
@ankit, btw include external links using the settings tab for css?

They're currently being included inside your body

Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:23
@diomed
Oh really xD
I remember seeing you here when I joined
Timothy Javins
@timjavins
Jul 22 2017 17:23
@AllanJeremy Yeah, you just put more than one CSS link at the top of your HTML. One will berel="stylesheet" and the other is
whoops
One will be rel="stylesheet"
And the other will be rel="alternate stylesheet"
But you gotta give them titles.
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:25
@timjavins in codepen? :D enlighten me
and how do you switch between them?
Timothy Javins
@timjavins
Jul 22 2017 17:26

So it would be, for example:
`<link rel="stylesheet" title="Custom style" type="text/css" href="style.css">

<link rel="alternate stylesheet" title="Bootstrap CSS" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>`

son of a
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:26
:D fail
Timothy Javins
@timjavins
Jul 22 2017 17:26
<link rel="stylesheet" title="Custom style" type="text/css" href="style.css">
<link rel="alternate stylesheet" title="Bootstrap CSS" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:26
XD
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:26
smthng's :fish: y
@ankitmehta1
maybe @timjavins can help u
Timothy Javins
@timjavins
Jul 22 2017 17:27
I'd rather not take on troubleshooting right now. I'm working on my project. Sorry. :(
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:27

:o @timjavins , sweet

How do you switch between them?

Lol
Ankit Mehta
@ankitmehta1
Jul 22 2017 17:28
:pensive:
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:28
@timjavins Edit: Does it automatically treat the first as the primary and the latter as the secondary?
what're you working on?
Timothy Javins
@timjavins
Jul 22 2017 17:28
Switching depends on the browser.
So in IE, you'd go to View > Style > [style title]
It's like switching audio or subtitle tracks in a movie
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:29

@ankitmehta1 , for starters I'd move all my css into the css tab.

Include any external css through the css settings

Let your html file only be html

May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:29
@ankitmehta1 pm me. we'll work something out
or yeah @AllanJeremy can help u too , coz I'm a n00b
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:29
@timjavins :o really , cool, here's a cookie: thanks
CamperBot
@camperbot
Jul 22 2017 17:29
allanjeremy sends brownie points to @timjavins :sparkles: :thumbsup: :sparkles:
:cookie: 81 | @timjavins |http://www.freecodecamp.com/timjavins
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:30
@diomed , lol, sure thing, be back in a few
You're not noob though
Timothy Javins
@timjavins
Jul 22 2017 17:30
Thanks, man
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:30
which iPhone runs faster, black or white one?
John Tendik
@JohnTendik
Jul 22 2017 17:30
black
obvs
:fire:
MrSpock
@DrSpock123
Jul 22 2017 17:34
do any of you folks out there have any advice if you just happen to have a good idea for an app but are quite sure what to do next? I know html, css, bootstrap and a little jquery and javascript. Should I try to build the app myself? Should I try to hire? How do I protect my idea?
Should I learn backend and if so which route should I take for the backend?
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:35
tell me what your idea is :smiling_imp:
MrSpock
@DrSpock123
Jul 22 2017 17:35
Oh sure :-)
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:36
doesn't freeCodeCamp teach backend?
you should deffinitely check electron @DrSpock123
MrSpock
@DrSpock123
Jul 22 2017 17:36
I think so, but do they teach node.js, would that be faster?
what is electron?
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:37
MrSpock
@DrSpock123
Jul 22 2017 17:37
thanks diomed
anybody else have any good ideas about my idea?
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:38
u need to learn node, I guess
MrSpock
@DrSpock123
Jul 22 2017 17:38
how is node different from regular sql?
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:38
I have to make @thekholm80 learn electron.
4 reasons
MrSpock
@DrSpock123
Jul 22 2017 17:39
Hey, May Kittens...what is your picture of, I can't tell?
is it a book?
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:40
It's Chompy
MrSpock
@DrSpock123
Jul 22 2017 17:40
what's Chompy?
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:40
a famous goat with Nicholas Cage eyes
MrSpock
@DrSpock123
Jul 22 2017 17:40
funny
How does one protect their ideas? Anybody...do you hire an attorney?
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:41
mby
or a copyright writer will do
I am not familiar with legalities tho
MrSpock
@DrSpock123
Jul 22 2017 17:42
Which is cheaper? and what does a copyrighter do?
Let me guess, copyright.
what is mby?
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:42

back @diomed

You learnt electron? Been thinking of learning node officially recently, but php knowledge has had me making excuses as to why I won't learn it

Electron seems pretty neat

@DrSpock123 , you can't protect an "idea"
MrSpock
@DrSpock123
Jul 22 2017 17:43
what is electron?
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:43

put simply,

a way to create desktop applications using javascript & node.js

May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:43
@DrSpock123 I gave u a link why didn't u read
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:43
Lol
MrSpock
@DrSpock123
Jul 22 2017 17:43
So, Allan how do companies protect their intellectual property?
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:43
njiiiiiiiiiiiiiiiiiiii
MrSpock
@DrSpock123
Jul 22 2017 17:44
Sorry May Kittens
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:44
with copyright agreement obviously
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:44

well you have to build something or have written proof of a concept @DrSpock123 for the case to stand in a court

But you can't just go say "hey, that was my idea"

MrSpock
@DrSpock123
Jul 22 2017 17:44
OK, I'm learning a ton here.
My idea is more of a webapp, will electron help me there?
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:45
unless you'll have a desktop app version, I don't think so
MrSpock
@DrSpock123
Jul 22 2017 17:46
OK, Allan you seem very hip, do you have any advice for someone like me?
By the way this is a no troll area.
CamperBot
@camperbot
Jul 22 2017 17:47
:trollface: troll problems? notify admins here
MrSpock
@DrSpock123
Jul 22 2017 17:49
I have received several good ideas here, I thank everyone here.
Allan N Jeremy
@AllanJeremy
Jul 22 2017 17:49

@DrSpock123 I can only speak from personal experience, obviously

as for advice "depends on what you want to achieve"... Generic advice: you don't need to learn everything. Learn as you need

https://hangouts.google.com/call/ckx7rwhn2bf77chmmtmt4fqcliy

if my speech can be understood

No worries
May Kittens Devour Your Soul
@diomed
Jul 22 2017 17:55
ummm... :joy:
Allan N Jeremy
@AllanJeremy
Jul 22 2017 18:05
ummm... :joy:
:joy: :joy: :joy:
Timothy Javins
@timjavins
Jul 22 2017 18:12
I like [RocketLawyer] (http://www.rocketlawyer.com)
f*ckin markdown!
There we go!
Copyright law is a bit messy. You have to have some legal presence in the jurisdiction in which you want to protect your intellectual property. So if you want to file for copyright in the USA, you have to have a legal presence in the USA, such as a company.
Justin25
@Justin25
Jul 22 2017 18:16

Hi, I'm trying to use geolocation to get my longitude and latitude, however the code

var lat;
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
 }
}
function showPosition(position) {
lat = position.coords.latitude;
console.log(lat); // First console.log, outputs latitude correctly.
}
getLocation();
console.log(lat); // Second console.log, outputs undefined, should be latitude.

Will output the longitude in the console.log in the function showPosition, but when I set lat = to the latitude the second console.log shows undefined.

Timothy Javins
@timjavins
Jul 22 2017 18:17
Funny, because your code isn't calling the longitude variable.
Justin25
@Justin25
Jul 22 2017 18:17
How do I format the code correctly using markdown?
Allan N Jeremy
@AllanJeremy
Jul 22 2017 18:18
use these
```
and your code between them
Timothy Javins
@timjavins
Jul 22 2017 18:18
With the ` mark that is next to the ~
Allan N Jeremy
@AllanJeremy
Jul 22 2017 18:18

single line `

multiline ```

Justin25
@Justin25
Jul 22 2017 18:18
Thanks
Timothy Javins
@timjavins
Jul 22 2017 18:21
@Justin25 Have you solved it yet?
Justin25
@Justin25
Jul 22 2017 18:21
No
Timothy Javins
@timjavins
Jul 22 2017 18:23
It looks like your console.log(lat) is just to print the console log as is, and then the second time you output the log is to see that the getLocation() function is modifying the log correctly.
It's a [before function], [after function] debug attempt, right?
Disclaimer: I know Python and Ruby, so I'm not the best for this, but I'm giving you my best.
Justin25
@Justin25
Jul 22 2017 18:26
Yes, when I check the variable during the function it appears to have changed, but outside of the function it is still 0.
Timothy Javins
@timjavins
Jul 22 2017 18:26
Then it isn't modifying the global variable lat
Justin25
@Justin25
Jul 22 2017 18:28
How could I have it modify the global variable?
Timothy Javins
@timjavins
Jul 22 2017 18:28
Yeah, I'm looking it up... :)
Timothy Javins
@timjavins
Jul 22 2017 18:35
OK
Max Datsun
@datmax
Jul 22 2017 18:35
@Justin25 ill try to help you
Timothy Javins
@timjavins
Jul 22 2017 18:36
getLocation is calling the variable showPosition
Then later you actual define the function showPosition, but I don't believe getLocation is treating showPosition as a function, but rather a variable.
getLocation thinks you're calling some variable called showPosition.
Does that make sense?
Justin25
@Justin25
Jul 22 2017 18:38
But I don't call getLocation until after I defined showPosition.
Timothy Javins
@timjavins
Jul 22 2017 18:39
Right, but perhaps you should just nest showPosition within the getLocation function.
Justin25
@Justin25
Jul 22 2017 18:39
Ok I'll try that
Timothy Javins
@timjavins
Jul 22 2017 18:39
Because each function is its own space. They don't overlap unless you make that happen.
Justin25
@Justin25
Jul 22 2017 18:41
It's still coming up as undefined
Timothy Javins
@timjavins
Jul 22 2017 18:41
ok
Justin25
@Justin25
Jul 22 2017 18:42
Wait, the console.log outside the function is being executed before the one inside the function.
GeorgeII
@GeorgeII
Jul 22 2017 18:44
Hello! How can I increase equal-button height? https://codepen.io/GeorgeIV/pen/YxKeJB
Max Datsun
@datmax
Jul 22 2017 18:47
maybe you should think a better way to call the position @Justin25
Timothy Javins
@timjavins
Jul 22 2017 18:47
@GeorgeII Do you want to increase the height or would you rather fix the alignement issues?
*alignment
Maybe whiteboard it XD @Justin25
GeorgeII
@GeorgeII
Jul 22 2017 18:49
@timjavins I meant that when I increasew equal-buttom height it breaks an aligment
Timothy Javins
@timjavins
Jul 22 2017 18:50
@GeorgeII Yeah, you need 4 columns. The left 3 columns should have 5 rows and the right column need 4 rows.
Max Datsun
@datmax
Jul 22 2017 18:51
@Justin25 i fixed it
Timothy Javins
@timjavins
Jul 22 2017 18:51
Nice. What did you do?
Max Datsun
@datmax
Jul 22 2017 18:52
you use tha callback function with a parameter that you can use to get information from the object received
var pos;
var lat;
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(pos){
lat = pos.coords.latitude;
});
}
}
getLocation();
console.log(lat);
GeorgeII
@GeorgeII
Jul 22 2017 18:52
@timjavins Do I have to use bootstrap or I can make it in pure css and html?
Timothy Javins
@timjavins
Jul 22 2017 18:53
I don't know the assignment requirements, but you can use both.
GeorgeII
@GeorgeII
Jul 22 2017 18:53
@timjavins ok ty
CamperBot
@camperbot
Jul 22 2017 18:53
georgeii sends brownie points to @timjavins :sparkles: :thumbsup: :sparkles:
:cookie: 82 | @timjavins |http://www.freecodecamp.com/timjavins
Timothy Javins
@timjavins
Jul 22 2017 18:53
You can call more than one stylesheet in your HTML.
or I mean link more than one
Max Datsun
@datmax
Jul 22 2017 18:55
@Justin25
Justin25
@Justin25
Jul 22 2017 18:56
I'm still getting undefined
Timothy Javins
@timjavins
Jul 22 2017 18:57
Did you try @datmax's code yet?
Justin25
@Justin25
Jul 22 2017 18:58
Yes
Max Datsun
@datmax
Jul 22 2017 18:59
O.o i got my latitude
Can you send a screen?What browser are you using?
Justin25
@Justin25
Jul 22 2017 19:01
Chrome browser
I'm using codepen
Max Datsun
@datmax
Jul 22 2017 19:02
Open the chrome console pressig ctrl + alt + i and copy paste the code there.Then tell us if its still getting undefined
Ctrl + shift + i, sorry
Timothy Javins
@timjavins
Jul 22 2017 19:03
var pos;
var lat;
function getLocation() {
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function(pos){
            lat = pos.coords.latitude;
        });
    }
}
getLocation();
console.log(lat);
Can you confirm for me - is that proper formatting/indenting and stuff? @datmax
Manish Giri
@Manish-Giri
Jul 22 2017 19:04
lat will be undefined
put the log here instead and try
 navigator.geolocation.getCurrentPosition(function(pos){
            lat = pos.coords.latitude;
            console.log(lat);

        });
knight2
@knight2
Jul 22 2017 19:05

For React #47 - http://hysterical-amusement.surge.sh/
It says "Note: You may know that all sibling child elements created by a mapping operation like this do need to be supplied with a unique key attribute. Don't worry, this is the topic of the next challenge."

Their solution code is

        const items = this.state.toDoList.map( (item, i) => {
            return <li key={i}>{item}</li>
        });

Why is this so complicated? And in regards to their state, no, I don't know that sibling child elements created by mapping operations need to be supplied with a unique key attribute. That makes no sense to me nor was this ever presented to us before.

Why can't we just return a li for every element in the array?

        const items = this.state.toDoList.map((num) => {
            return <li>{num}</li>
        });
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:06
@Manish-Giri u have to see this if u missed it :point_up: July 22, 2017 7:55 PM
knight2
@knight2
Jul 22 2017 19:06
Is the i in the (items,i) parameter given the value of 1 and increased for each iteration the map is called on the array?
Justin25
@Justin25
Jul 22 2017 19:06
In the chrome console in returns the latitude and undefined
knight2
@knight2
Jul 22 2017 19:07
I've also never seen a <li> element being given a key attribute.
Aita Kane
@aita-kane
Jul 22 2017 19:07
Hello can someone help me i write a script so when I scroll the div move on top slowly and disappear but nothing work
im'new in coding with jquery so maybe there's an error somewhere but can you guys help me please
Manish Giri
@Manish-Giri
Jul 22 2017 19:08
@diomed wow
Max Datsun
@datmax
Jul 22 2017 19:08
@Manish-Giri no it wont be undefined because it will give a value to the global variable lat.
Aita Kane
@aita-kane
Jul 22 2017 19:08
$(window).scroll(function(){
var current_div = $(this).closest(".cnav");
if ($(this).scrollTop()>0)
{
current_div.animate({
right: '-50px',
opacity: '0.2',
top: '-80px',
margin: '0px'
}, 1996, function(){
current_div.hide();
});
}
});
</script>

_

```

knight2
@knight2
Jul 22 2017 19:08
@aita-kane transform
Aita Kane
@aita-kane
Jul 22 2017 19:08
@knight2 where is it supposed to be used
knight2
@knight2
Jul 22 2017 19:09
@aita-kane i mean key-frames
Manish Giri
@Manish-Giri
Jul 22 2017 19:09
@datmax it won't.
Timothy Javins
@timjavins
Jul 22 2017 19:09
So how should he pass the value to the global variable lat?
Justin25
@Justin25
Jul 22 2017 19:10
It must be a quirk with codepen
Aita Kane
@aita-kane
Jul 22 2017 19:10
@knight2 so with the keyframes it will make the div disappear on scrolltop then appear on scrolldown?
Max Datsun
@datmax
Jul 22 2017 19:11
@Manish-Giri then why it is working for me? :/
Manish Giri
@Manish-Giri
Jul 22 2017 19:11
@knight2 item, i -> i is the index of the current item being iterated upon..
knight2
@knight2
Jul 22 2017 19:11
@Manish-Giri Okay got it! So i starts at index 0 then?
Manish Giri
@Manish-Giri
Jul 22 2017 19:12
@knight2 yup
knight2
@knight2
Jul 22 2017 19:12
@Manish-Giri do you know why we need to give sibling child elements created by a mapping operation a unique key value?
Because it looks to work fine if I don't supply a unique key value
Manish Giri
@Manish-Giri
Jul 22 2017 19:13
@knight2 that is a requirement of React. Imagine if you have a list of 100000 elements, and you perform an operation which changes just one of the item. How will React know what item has changed? Should it go through the entire list and compare each value from what it was the last time?
Timothy Javins
@timjavins
Jul 22 2017 19:14
Key values FTW
Manish Giri
@Manish-Giri
Jul 22 2017 19:14
instead, if you give it a unique key attribute, it can use that attribute to know which element was rendered, and re-render JUST that new element onto the DOM, instead of having to go through the whole list.
that's what makes it so fast.
In fact, if you open the console, you'll see a warning saying you need to provide a key.
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:15
yes it should @Manish-Giri
:smiling_imp:
Manish Giri
@Manish-Giri
Jul 22 2017 19:15
:shipit:
@diomed ty
CamperBot
@camperbot
Jul 22 2017 19:15
manish-giri sends brownie points to @diomed :sparkles: :thumbsup: :sparkles:
:star2: 5182 | @diomed |http://www.freecodecamp.com/diomed
knight2
@knight2
Jul 22 2017 19:15
@Manish-Giri ah yeah just opened console. Was just confused because FCC didn't explain what they were doing at all. https://facebook.github.io/react/docs/lists-and-keys.html and what you said makes sense. Thanks!
CamperBot
@camperbot
Jul 22 2017 19:15
:star2: 6300 | @manish-giri |http://www.freecodecamp.com/manish-giri
knight2 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
Manish Giri
@Manish-Giri
Jul 22 2017 19:17
@knight2 :+1:
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:17
if u've done that sooner my streak wouldnt be broken :/
now I'll die sad and alone with broken streak :sob:
Timothy Javins
@timjavins
Jul 22 2017 19:19
What streak?
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:19
fcc :cookie: streak
Manish Giri
@Manish-Giri
Jul 22 2017 19:20
@diomed I didn't even kno y u broke it in the first place
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:20
me neither, coz I don't care
Justin25
@Justin25
Jul 22 2017 19:20
@datmax Do you have any thoughts on why it works in the chrome console but not in codepen?
Manish Giri
@Manish-Giri
Jul 22 2017 19:20
try to make a new streak now, next 250
:smiling_imp:
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:21
no,thanks
Manish Giri
@Manish-Giri
Jul 22 2017 19:21
y
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:22
did u know that Steven Spielberg died?
Manish Giri
@Manish-Giri
Jul 22 2017 19:23
huh
Jamie Morrow
@jamiemorrow
Jul 22 2017 19:23
Not yet
Manish Giri
@Manish-Giri
Jul 22 2017 19:24
I'm already dealing with Chester's death
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:24
ok, some1 is lying to us on twitter again. oh man.....
Manish Giri
@Manish-Giri
Jul 22 2017 19:24
not another
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:24
that dad from Home Alone died, tho
Kevin's father died. OMG
Lindsey DAngelo
@ldangelo41
Jul 22 2017 19:26
Screen Shot 2017-07-22 at 2.22.23 PM.png
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:27
@ldangelo41 send your code
Lindsey DAngelo
@ldangelo41
Jul 22 2017 19:27
Screen Shot 2017-07-22 at 2.22.10 PM.png
confused as to what im doing wrong here
Manish Giri
@Manish-Giri
Jul 22 2017 19:27
@diomed even kevin must be sooo old now
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:27
@ldangelo41 is it 225 or 255??
@Manish-Giri Kevin already died. drug overdozed
Manish Giri
@Manish-Giri
Jul 22 2017 19:28
:open_mouth:
Lindsey DAngelo
@ldangelo41
Jul 22 2017 19:28
hmm the 255 did fix some of it but its still not letting me pass
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:28
no,wait'that thieves finally killed him @Manish-Giri
Lindsey DAngelo
@ldangelo41
Jul 22 2017 19:29
nvm i got it!
@diomed thank you
CamperBot
@camperbot
Jul 22 2017 19:29
ldangelo41 sends brownie points to @diomed :sparkles: :thumbsup: :sparkles:
Manish Giri
@Manish-Giri
Jul 22 2017 19:29
:worried:
CamperBot
@camperbot
Jul 22 2017 19:29
:star2: 5183 | @diomed |http://www.freecodecamp.com/diomed
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:30
@Manish-Giri do u have anything better than this:https://gitpoint.co
Devansh Trivedi
@D3V4N5H
Jul 22 2017 19:30
/me
@d3v4n5h
how do I get my profile's link?
thanks @d3v4n5h
CamperBot
@camperbot
Jul 22 2017 19:31
sorry d3v4n5h, you can't send brownie points to yourself! :sparkles: :sparkles:
Manish Giri
@Manish-Giri
Jul 22 2017 19:33
@diomed looks cool
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:36
@Manish-Giri how is your guitar playing going?
Manish Giri
@Manish-Giri
Jul 22 2017 19:39
@diomed x
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:42
is that :cat: 's master devil himself?

that :cat: be like what the flying f are you?
Manish Giri
@Manish-Giri
Jul 22 2017 19:44
Haha
May Kittens Devour Your Soul
@diomed
Jul 22 2017 19:47
@Manish-Giri physics is wonderful
Manish Giri
@Manish-Giri
Jul 22 2017 19:50
Lol
I can imagine how The guy in the front would've landed
:smiling_imp:
May Kittens Devour Your Soul
@diomed
Jul 22 2017 20:02
12annumishra17
@12annumishra17
Jul 22 2017 20:04
@diomed hehe
Adit
@adittyagi
Jul 22 2017 20:07
@diomed lol, that is so me atm !
Kyle Holm
@thekholm80
Jul 22 2017 20:21
@diomed why electron?
aidanlearnscode
@aidanlearnscode
Jul 22 2017 20:21
Havng trouble with Storing Values with the Assignment Operator, challenge 120. Can't seem to get the very last requirement "a should be assigned to b with =" to pass the challenge
korzo
@korzo
Jul 22 2017 20:24
@aidanlearnscode There should't be quote
May Kittens Devour Your Soul
@diomed
Jul 22 2017 20:29
@thekholm80 coz that's a step up, innit?
Kyle Holm
@thekholm80
Jul 22 2017 20:29
a step up from what?
oh, i wonder if Atom is built in electron
May Kittens Devour Your Soul
@diomed
Jul 22 2017 20:31
step up from html/css/js
all that knowledge u wrap up within electron and make an app
Allan N Jeremy
@AllanJeremy
Jul 22 2017 20:32
Kyle Holm
@thekholm80
Jul 22 2017 20:32
oh wow, looks like VS Code, Atom and Discord were all made with electron
and Slack
May Kittens Devour Your Soul
@diomed
Jul 22 2017 20:32
yup
that makes it awesome
Kyle Holm
@thekholm80
Jul 22 2017 20:32
Interesting
Could be fun to make some desktop apps
May Kittens Devour Your Soul
@diomed
Jul 22 2017 20:32
so much of good stuff are built that way
Karnika
@KarnikaK
Jul 22 2017 20:45
I was doing this c program for converting binary into decimal, and for some reason the output is completely wrong. Could someone please check it? Thankyou!

//Program for converting binary into decimal numbers

include<stdio.h>

include<math.h>

int main()
{
int n, lastdigit, i=0;
int decimalno;
printf("Enter binary number: ");
scanf("%7d", &n);

while(n !=0)
   {
       lastdigit = (n%10);
       decimalno = decimalno + lastdigit*(pow(2, i));
       n = n/10;
       i++;
   }

   printf("The decimal number is:%d ", decimalno);

getch();
return 0;   

}

um sorry, idk why it pasted in this weird format. Sorry about it.
I'm doing this on dev c++ btw.
May Kittens Devour Your Soul
@diomed
Jul 22 2017 20:46
strange u'd ask here. we learn only js here
Karnika
@KarnikaK
Jul 22 2017 20:46
oh sorry, wasn't aware about that
May Kittens Devour Your Soul
@diomed
Jul 22 2017 20:47
stackoverflow has chatrooms as well
Karnika
@KarnikaK
Jul 22 2017 20:48
okay thanks
Manish Giri
@Manish-Giri
Jul 22 2017 20:52
@KarnikaK try this
#include <stdio.h>
#include <math.h>
int convertBinaryToDecimal(long long n);

int main()
{
    long long n;
    printf("Enter a binary number: ");
    scanf("%lld", &n);
    printf("%lld in binary = %d in decimal", n, convertBinaryToDecimal(n));
    return 0;
}

int convertBinaryToDecimal(long long n)
{
    int decimalNumber = 0, i = 0, remainder;
    while (n!=0)
    {
        remainder = n%10;
        n /= 10;
        decimalNumber += remainder*pow(2,i);
        ++i;
    }
    return decimalNumber;
}
Kyle Holm
@thekholm80
Jul 22 2017 20:52
oh man, i was just going to write that! you beat me again
Manish Giri
@Manish-Giri
Jul 22 2017 20:53
:smiling_imp:
i completed this challenge but i dont understand how typeof or booleans work
Karnika
@KarnikaK
Jul 22 2017 20:53
if you dont mind, could you please explain what long long does and how does it make a difference?
Sydney
@SydneyWarren
Jul 22 2017 20:54
i read this https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof and the booleans but i dont understand it
Karnika
@KarnikaK
Jul 22 2017 20:54
and why we're writing that in a bracket
Kyle Holm
@thekholm80
Jul 22 2017 20:54
@SydneyWarren a boolean can only have 1 of 2 values, true or false
Karnika
@KarnikaK
Jul 22 2017 20:54
Sorry for the trouble, I'm very new to this
Coy Sanders
@coymeetsworld
Jul 22 2017 20:54
@SydneyWarren boolean is a primitive type of value, either true or false only
Manish Giri
@Manish-Giri
Jul 22 2017 20:54
it's just a holder for really really long numbers
probably not required for this challenge, but anyway
Sydney
@SydneyWarren
Jul 22 2017 20:54
ok i'm following so far @coymeetsworld @thekholm80
Manish Giri
@Manish-Giri
Jul 22 2017 20:55
@KarnikaK
Kyle Holm
@thekholm80
Jul 22 2017 20:55
@SydneyWarren so any time you need a yes or no, true or false, on or off, kind of statement, you use a boolean
Coy Sanders
@coymeetsworld
Jul 22 2017 20:55
typeof just returns what type of value you're running it on
Karnika
@KarnikaK
Jul 22 2017 20:55
@Manish-Giri Why are we not using a for loop here?
Sydney
@SydneyWarren
Jul 22 2017 20:55
ok how is this written var x = boolean?
Karnika
@KarnikaK
Jul 22 2017 20:55
like after while, why cant we do that?
Coy Sanders
@coymeetsworld
Jul 22 2017 20:55
no
Kyle Holm
@thekholm80
Jul 22 2017 20:56
var x = true
or
var x = false
Coy Sanders
@coymeetsworld
Jul 22 2017 20:56
:point_up:
Sydney
@SydneyWarren
Jul 22 2017 20:56
@thekholm80 ok ok
Manish Giri
@Manish-Giri
Jul 22 2017 20:56
@KarnikaK why do you need for?
Screenshot 2017-07-22 16.55.54.png
@thekholm80
Sydney
@SydneyWarren
Jul 22 2017 20:56
what would that look like in use
Manish Giri
@Manish-Giri
Jul 22 2017 20:56
such blak
Kyle Holm
@thekholm80
Jul 22 2017 20:57
var x = true;

if (x) {
  console.log("x is true!");
} else {
  console.log("x is false!");
}
Karnika
@KarnikaK
Jul 22 2017 20:57
@Manish-Giri i meant, we can't write for(i=0; i<=n; i++) and then write the code for the reverse thing
and can we use a for loop under a while loop?
Sydney
@SydneyWarren
Jul 22 2017 20:58
so whatever is going into var x either true or false... how does the set look before it setting up what goes in x
Kyle Holm
@thekholm80
Jul 22 2017 20:58
if you're keeping x as just a boolean, it can only ever be true or false
Manish Giri
@Manish-Giri
Jul 22 2017 20:59

@KarnikaK

and can we use a for loop under a while loop?

technically you can, like for instance, use a for loop to iterate through a list of numbers, and for each iteration, print something a certain number of times, using while

Kyle Holm
@thekholm80
Jul 22 2017 20:59
it's a good habit not to change the data types of variables. let booleans stay booleans, arrays stay arrays, etc
Sydney
@SydneyWarren
Jul 22 2017 20:59
in what you have there by assigning true to it, does that mean you setup that variable only to accept true and false?
Manish Giri
@Manish-Giri
Jul 22 2017 20:59
but I generally use one type of loop
not both
May Kittens Devour Your Soul
@diomed
Jul 22 2017 20:59
@Manish-Giri is actually Wes Bos
Manish Giri
@Manish-Giri
Jul 22 2017 20:59
@KarnikaK
May Kittens Devour Your Soul
@diomed
Jul 22 2017 20:59
dat font gives him away :yum:
Manish Giri
@Manish-Giri
Jul 22 2017 21:00
@diomed I'm -> :smiling_imp:
also by that logic, u should be bos @diomed
Karnika
@KarnikaK
Jul 22 2017 21:00
@Manish-Giri got it, and how do you decide what loop to use, and why cant we use for loop in this case?
Kyle Holm
@thekholm80
Jul 22 2017 21:00
@SydneyWarren in JavaScript you can assign just about any value or data type to any variable, but if you want to maintain your sanity it's best to only assign something true or false once you've decided to use it as a boolean
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:00
lol, I don't use that font. it's strange
Kyle Holm
@thekholm80
Jul 22 2017 21:01
it's sexy, you don't know what you're talking about @diomed
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:01
eh, too curly 4 me
when writing code
I don't want font to be sexy
Sydney
@SydneyWarren
Jul 22 2017 21:02
ok i'm following so far @thekholm80 ... is that all?
Manish Giri
@Manish-Giri
Jul 22 2017 21:02
@KarnikaK normally you use for when you know exactly how many times your loop will be running, from a given starting point.
On the other hand, while is used more when you want to keep repeating stuff until some instruction is true..
Kyle Holm
@thekholm80
Jul 22 2017 21:02
you yurpeans have no style @diomed
Manish Giri
@Manish-Giri
Jul 22 2017 21:02
this problem is more of a while loop thing
@KarnikaK
Kyle Holm
@thekholm80
Jul 22 2017 21:03
@SydneyWarren just remember a boolean is the value assigned to the variable, and all that means is it's either true or false
Manish Giri
@Manish-Giri
Jul 22 2017 21:03
@diomed also I don't particularly like bos..I asked for a discount for one of his courses priced at $175 something
and he gave me only $15 off
:unamused:
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:03
lol, cheap bastard
Sydney
@SydneyWarren
Jul 22 2017 21:03
oh ok thanks, that's simple @thekholm80
CamperBot
@camperbot
Jul 22 2017 21:03
sydneywarren sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1361 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Kyle Holm
@thekholm80
Jul 22 2017 21:03
not just a discount, a Student Discount
Manish Giri
@Manish-Giri
Jul 22 2017 21:03
^^
Karnika
@KarnikaK
Jul 22 2017 21:03
@Manish-Giri Got it. What was the problem with my code, why does it show the wrong value as the output, is it just becasue of the long long int?
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:04
or greedy bastard?
Kyle Holm
@thekholm80
Jul 22 2017 21:04
i think udemy has the right idea. I don't want to pay more than $10 for any course
Manish Giri
@Manish-Giri
Jul 22 2017 21:05
@KarnikaK i'm not sure, maybe if you share it online
I Kyle can debug
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:06
@Manish-Giri which wes bos course do u want
Manish Giri
@Manish-Giri
Jul 22 2017 21:06
@diomed he has a course on react
it's a series of 15-20 videos
I think
Gregory Cheng
@gregorytcheng
Jul 22 2017 21:07
Having some issues with my Wikipedia viewer. When using the wikipedia API, the console throws an error saying "No 'Access-Control-Allow-Origin' header is present on the requested resource.” Anybody know why this is happening? https://codepen.io/gregorytcheng/pen/bWPVaB?editors=1010
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:10
@Manish-Giri don't u already know react
@gregorytcheng coz u have http somewhere
instead of https
Gregory Cheng
@gregorytcheng
Jul 22 2017 21:10
For me, neither http or https work. I tried both
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:10
https should work
Kyle Holm
@thekholm80
Jul 22 2017 21:11
@gregorytcheng jsonp should fix that
korzo
@korzo
Jul 22 2017 21:11
@gregorytcheng You have to add origin=* to your url
Gregory Cheng
@gregorytcheng
Jul 22 2017 21:12
where should I add origin/what should my link look like?
korzo
@korzo
Jul 22 2017 21:12
@gregorytcheng Wikipedia APi doesn't support CORS without it.
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:13
@thekholm80 have u seen this @Manish-Giri
korzo
@korzo
Jul 22 2017 21:13
@gregorytcheng to URL you call with term to search
Gregory Cheng
@gregorytcheng
Jul 22 2017 21:14
@korzo Works now. Thanks!
CamperBot
@camperbot
Jul 22 2017 21:14
gregorytcheng sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 282 | @korzo |http://www.freecodecamp.com/korzo
korzo
@korzo
Jul 22 2017 21:15
@gregorytcheng Glad to help
Manish Giri
@Manish-Giri
Jul 22 2017 21:15
@diomed oh wow I didn't see that
Kyle Holm
@thekholm80
Jul 22 2017 21:17
@diomed lol
Karnika
@KarnikaK
Jul 22 2017 21:18
@Manish-Giri thankyou for your help!
CamperBot
@camperbot
Jul 22 2017 21:18
karnikak sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6301 | @manish-giri |http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Jul 22 2017 21:29
@KarnikaK :+1:
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:31
@Manish-Giri can u come in private smth
Manish Giri
@Manish-Giri
Jul 22 2017 21:31
:open_mouth:
:confused:
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:36
?.?.?.?
Sanjay Chawla
@sanjay-chawla
Jul 22 2017 21:40
I have a pen with bootstrap(https://codepen.io/sanjay-chawla/pen/oLWjQx) and it works fine in smaller devices but when I export the pen and run it in my server bootstrap does not work.. what am I doing wrong here?
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:42
if u click on export button bootstrap SHOULD work
Lance
@texas2010
Jul 22 2017 21:43
hi
Kyle Holm
@thekholm80
Jul 22 2017 21:43
@texas2010 :wave:
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:43
@sanjay-chawla u have some errors in js
hi Lance :cat:
Sanjay Chawla
@sanjay-chawla
Jul 22 2017 21:47
@diomed thanks.. do you think that could be an issue? I mean it works with codepen result
CamperBot
@camperbot
Jul 22 2017 21:47
sanjay-chawla sends brownie points to @diomed :sparkles: :thumbsup: :sparkles:
:star2: 5184 | @diomed |http://www.freecodecamp.com/diomed
May Kittens Devour Your Soul
@diomed
Jul 22 2017 21:51
yes, it could
Jake
@JakeDVirus
Jul 22 2017 21:55

If the FIRST CODE and SECOND CODE works, then why don't the THIRD CODE works
FIRST CODE??

  var $listHTML = $('ul').html();
  $('ul').append($listHTML);

SECOND CODE

 $("ul").append( $("ul").html() );

THIRD CODE

var $listHTML = $("ul").html();
$listHTML.append($listHTML);
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 22 2017 21:56
w-why such emotional questions?
Coy Sanders
@coymeetsworld
Jul 22 2017 21:57
3rd code isn't the same as 1st and 2nd
Jake
@JakeDVirus
Jul 22 2017 22:00
@coymeetsworld how? please explain. i am not getting it
Coy Sanders
@coymeetsworld
Jul 22 2017 22:01
you're already asking on another chat, so ill let you focus there
Manish Giri
@Manish-Giri
Jul 22 2017 22:03
@diomed ty
CamperBot
@camperbot
Jul 22 2017 22:03
manish-giri sends brownie points to @diomed :sparkles: :thumbsup: :sparkles:
:star2: 5185 | @diomed |http://www.freecodecamp.com/diomed
Jake
@JakeDVirus
Jul 22 2017 22:03
@coymeetsworld my focus is on both. i waited in that channel for more than a 5min and then i shot the query here. and then someone showed up there.
but still not solved. You can add anything valid here and it will be greatly appreciated
Raj Patel
@rajp1847
Jul 22 2017 22:04
help plz
Jake
@JakeDVirus
Jul 22 2017 22:06
@rajp1847 you can add the context of help
Raj Patel
@rajp1847
Jul 22 2017 22:06
how do i make the text value in a form invisible?
Jake
@JakeDVirus
Jul 22 2017 22:08
@rajp1847 i'm not getting you. is it about the designing part?? like a text not being displayed/hidden?
Raj Patel
@rajp1847
Jul 22 2017 22:08
wait lemme show you

<style>
form > input, form > textarea, form > label {
display: block;
margin-bottom: 5px;
}
</style>

<form name="contact" method="post">
<label>Name</label>
<input type="text" name="name" />
<label>Subject</label>
<input type="text" name="subject" />
<label>Phone Number</label>
<input type="text" name="phone" />
<label>Message</label>
<textarea name="message"></textarea>

<input type="submit" name="send" value="Send Message" />
</form>

form > input, form > textarea, form > label {
    display: block;
    margin-bottom: 5px;
}
</style>

<form name="contact" method="post">
    <label>Name</label>
    <input type="text" name="name" />
    <label>Subject</label>
    <input type="text" name="subject" />
    <label>Phone Number</label>
    <input type="text" name="phone" />
    <label>Message</label>
    <textarea name="message"></textarea>

    <input type="submit" name="send" value="Send Message" />
</form>
Jake
@JakeDVirus
Jul 22 2017 22:14
@rajp1847 which text you want in the form to be invisible?
Raj Patel
@rajp1847
Jul 22 2017 22:18
i wnt the message place to say type your message here and that should be visible but invisible when you click the button
Margaret
@Margaret2
Jul 22 2017 22:20
@rajp1847 you can use a placeholder attribute, like <textarea placeholder="type message here"> or you can do it with an input element as well
Raj Patel
@rajp1847
Jul 22 2017 22:29
where do i put ti
it
Jake
@JakeDVirus
Jul 22 2017 22:33
@rajp1847 La Raya Turquesa already showed you in his code where to put that.
just add the attribute placeholder="type message here" inside your <textarea>element as shown in his code
Raj Patel
@rajp1847
Jul 22 2017 22:36
can i put placeholder attribute in my form element?
Stephen James
@sjames1958gm
Jul 22 2017 22:55
@rajp1847 No, it goes in the input or textarea elements.
Gaurav
@gauravmagan
Jul 22 2017 22:59
atom terminal isntworking
installer terminal plus atom
@NeelDVirus
@sjames1958gm @coymeetsworld
Stephen James
@sjames1958gm
Jul 22 2017 23:00
I don't use atom, sry
Jake
@JakeDVirus
Jul 22 2017 23:01
same here, i also dont use atom. try google or stackoverflow for the solution if you cant find here
Lance
@texas2010
Jul 22 2017 23:15
@thekholm80 @diomed :wave:
Kyle Holm
@thekholm80
Jul 22 2017 23:15
@gauravmagan the terminal plus package was abandoned, try platformio-ide-terminal that's the one i use
@texas2010 how's life?
Lance
@texas2010
Jul 22 2017 23:15
good and tired today.
Kyle Holm
@thekholm80
Jul 22 2017 23:16
been exercising?
Lance
@texas2010
Jul 22 2017 23:17
no. i was mow the grass today.
weather is so hot.
Kyle Holm
@thekholm80
Jul 22 2017 23:17
oh that doesn't sound fun
Lance
@texas2010
Jul 22 2017 23:18
yep
dont have a energy to read php book. oh well
Kristi Nushi
@Kristi92
Jul 22 2017 23:35
hi , is there anyone who can help me with an issue please?
Timothy Javins
@timjavins
Jul 22 2017 23:35
Depends on the issue!
Kristi Nushi
@Kristi92
Jul 22 2017 23:35

`var match;
if(target.length===1){

match=target==str.substring(str.lenrth -1, str.length);

} else{
var words = str.split(" ");

var lastWord = words[words.length -1];
match = target == lastWord;
console.log("target: " + target + " | lastWord: " + lastWord + " = match: " + match);

}
return match;

}`

here is the issue!
something is wrong
CONFIRM THE ENDING
is the title
Timothy Javins
@timjavins
Jul 22 2017 23:36
Edit your message that you just posted. Instead of the single `
Ryan Draves
@RyanDraves
Jul 22 2017 23:36
does anyone know how to get mp3 links to add audio? most sites are only letting me download the sound file, but I want a link that ends in .mp3
Timothy Javins
@timjavins
Jul 22 2017 23:36
you should put ``` in there and at the end
Wrap your whole code snippet in ```
Kristi Nushi
@Kristi92
Jul 22 2017 23:36
no, it was my mistake
but in my code it doesn't pass the level
Timothy Javins
@timjavins
Jul 22 2017 23:37
I'm saying if you edit your post, turner your single ` into the ``` then it would be legible
Kristi Nushi
@Kristi92
Jul 22 2017 23:40
@timjavins nothing again
Timothy Javins
@timjavins
Jul 22 2017 23:40
momento
var match;
if(target.length===1) {
    match=target==str.substring(str.lenrth -1, str.length);
} else {
    var words = str.split(" ");
    var lastWord = words[words.length -1];
    match = target == lastWord;
    console.log("target: " + target + " | lastWord: " + lastWord + " = match: " + match);
}
return match;
}
Is that your code?
Kristi Nushi
@Kristi92
Jul 22 2017 23:43
yes
Timothy Javins
@timjavins
Jul 22 2017 23:44
Whoops, sorry - I gotta run. I just realized I gotta go to work!
:( sorry!
Albert Cardona II
@daddycardona
Jul 22 2017 23:45
what exactly are you trying to do @Kristi92
I mean @timjavins
Timothy Javins
@timjavins
Jul 22 2017 23:46
All I did was repost @Kristi92's code in a legible format. Bye!
Kristi Nushi
@Kristi92
Jul 22 2017 23:46
@daddycardona i am trying to solve my challenge , but with what i see no one can
Albert Cardona II
@daddycardona
Jul 22 2017 23:46
okay later
what is your challenge name @Kristi92
Kristi Nushi
@Kristi92
Jul 22 2017 23:47
is there anyone who can do this code?
Confirm the Ending
Albert Cardona II
@daddycardona
Jul 22 2017 23:47
hold on
Kristi Nushi
@Kristi92
Jul 22 2017 23:49
ok
korzo
@korzo
Jul 22 2017 23:49
@Kristi92 It's easy. You have to use substr or slice method on string
Kristi Nushi
@Kristi92
Jul 22 2017 23:50
@korzo how?
Albert Cardona II
@daddycardona
Jul 22 2017 23:53
look at the example in slice and I don't think you want a statement like match = string == thisstuff here
korzo
@korzo
Jul 22 2017 23:53
@Kristi92 You have to find out length of target, then take last x letters from str , compare it and return result.
X is length of target
Albert Cardona II
@daddycardona
Jul 22 2017 23:54
if that is the case you want to compare it like if (string== this stuff here){ match = true or false;}
Kristi Nushi
@Kristi92
Jul 22 2017 23:56
@daddycardona this is not an explanation but at the end i did it.
@korzo thank you
CamperBot
@camperbot
Jul 22 2017 23:56
kristi92 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 284 | @korzo |http://www.freecodecamp.com/korzo
korzo
@korzo
Jul 22 2017 23:57
@Kristi92 Glad to help
Albert Cardona II
@daddycardona
Jul 22 2017 23:57
Happy for you
that one was wierd to me at first too took me forever @Kristi92
my son whom is 17 had to explain what I was missing in this and then I was like oh i get it lol