These are chat archives for FreeCodeCamp/Help

31st
Aug 2017
Aita Kane
@aita-kane
Aug 31 2017 00:06
hello can you guys help me please I'm just building a website and i'm having trouble with an element actually i give him the position fixed and top and left 50 % but since i did that the element is moving outside the container whenever i'm scrolling up or down . What do you guys think is causing that ?
Long Nguyen
@longnt80
Aug 31 2017 00:12
@aita-kane position fixed position the element relative to the viewport, not the parent container
try position: absolute instead
Albert Cardona II
@daddycardona
Aug 31 2017 00:18
Hello all I have a quick question it haves nothing to do with web development. Is their a site out there that can make a picture a collage. I want to use a picture and then make the rest of the pictures of him a collage of that picture. I am trying to get this done by saturday morning
and hopefully over 100 pictures
Gersho
@Gersho
Aug 31 2017 00:33
that doesn't sound like something easy to do, there's surely tools out there, but i'm unsure the automated stuff will bring a desirable result (i consider doing a face with 100+ pictures artist level stuff)
is that what you are looking for @daddycardona ?
http://mosaically.com/photomosaics
but they're cheating with overlaying the photo and playing with opacity, it gets obvious when you zoom in
Albert Cardona II
@daddycardona
Aug 31 2017 00:40
@Gersho yes thanks :)
CamperBot
@camperbot
Aug 31 2017 00:40
daddycardona sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 378 | @gersho |http://www.freecodecamp.com/gersho
Albert Cardona II
@daddycardona
Aug 31 2017 00:41
My uncle just past away and I was trying to do something special for my aunt :)
Gersho
@Gersho
Aug 31 2017 00:52
i'm sorry, i'm sure she'll like it
Albert Cardona II
@daddycardona
Aug 31 2017 01:27
thanks a gain
Mukesh Kumar Angrish
@MukeshAngrish
Aug 31 2017 01:47
I just earned my front end certificate. Can I download and print if for my wall or do I have to ask for the original? And regarding the download, I can't save the certificate. When I do, it doesn't have my name and completion date on it.
just1witness
@just1witness
Aug 31 2017 01:54
@MukeshAngrish Yay!!! Congatulations!!
I can't answer your questions though, since, while I'm very close, I haven't earned mine yet.
Uriel Guzmán
@Burinson
Aug 31 2017 02:02
$(document).ready(function(){

    var url = 'https://wind-bow.glitch.me/twitch-api/streams/';
    var streamers = ["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"];

    for (var x = 0; x < streamers.length; x++) {var streamersX = streamers[x]}
    $.getJSON(url + streamers[x], function(twitch){
console.log(twitch);


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

            if (twitch[i].stream != null) {
            $("#output").append("<a target='_blank' href=" +
                            twitch[i].stream["url"] +
                            "><div class='well'><img id = 'img' src=" +
                            twitch[i].stream["logo"] +
                            ">" +
                            "<br></br><p id = 'name'>" +
                            twitch[i].stream["display_name"] +
                            "</p><hr></hr>" + 
                            "<p id = 'status'>" +
                            twitch[i].stream["status"] +
                                "</p><hr></hr><p id = 'online'>Online</p></div></a>");
            } // End of if statement.
                    else if (twitch[i].stream === null){
                $("#output").append("<div class ='well well-md'><img id = 'img' src = 'http://versusbots.com/wp-content/uploads/twitchlogo2.png'><br></br><p id = 'name'>" +
                                twitch[i].display_name + 
                                "</p><hr></hr>" +
                                        "<p id = 'offline'>Offline</p></div>");

            }    //     End of else if statement.
        } // End of i for loop.
    }); // End of twitch getJSON function.
}); // End of document function.
Why isn't my Twitch API JS not working
:( :( :(
korzo
@korzo
Aug 31 2017 02:02
@MukeshAngrish Print it as PDF from browser or make a screenshot
Mukesh Kumar Angrish
@MukeshAngrish
Aug 31 2017 02:03
@just1witness Thanks. You'll get there easily. The API projects did require some research each. But the Advanced projects don't require that much research. It's just pure logic here.
CamperBot
@camperbot
Aug 31 2017 02:03
:cookie: 306 | @just1witness |http://www.freecodecamp.com/just1witness
mukeshangrish sends brownie points to @just1witness :sparkles: :thumbsup: :sparkles:
Moisés Man
@moigithub
Aug 31 2017 02:03
for (var x = 0; x < streamers.length; x++) {var streamersX = streamers[x]}
after that for/loops ends.. x will be = streamers.length
and
$.getJSON(url + streamers[x], <- streamers[]x will be undefined
Uriel Guzmán
@Burinson
Aug 31 2017 02:04
Uh...
Yeah, when I log it, it gives me 8 instead of 1,2,3,4,5,6,7,8
(the x)
I've always had problems with for loops
Moisés Man
@moigithub
Aug 31 2017 02:06
probably u wanna wrap ur whole getJSON inside that loop ??
check where u places ur {..}
Uriel Guzmán
@Burinson
Aug 31 2017 02:06
The x loop?
Moisés Man
@moigithub
Aug 31 2017 02:06
ye
Mukesh Kumar Angrish
@MukeshAngrish
Aug 31 2017 02:07
@korzo The screenshot method won't work as the certificate is displayed in a zoomed view that can't be zoomed out. I'll try the pdf thing when I'm near my laptop. Thanks.
CamperBot
@camperbot
Aug 31 2017 02:07
mukeshangrish sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 431 | @korzo |http://www.freecodecamp.com/korzo
Uriel Guzmán
@Burinson
Aug 31 2017 02:08
@moigithub Oh, thanks, now it iterates through the whole thing :)
CamperBot
@camperbot
Aug 31 2017 02:08
burinson sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3620 | @moigithub |http://www.freecodecamp.com/moigithub
Uriel Guzmán
@Burinson
Aug 31 2017 02:08
But it doesn't show in the html
Only in the console
$(document).ready(function(){

    var url = 'https://wind-bow.glitch.me/twitch-api/streams/';
    var streamers = ["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"];

    for (var x = 0; x < streamers.length; x++) {var streamersX = streamers[x]
    $.getJSON(url + streamers[x], function(twitch){
console.log(twitch);


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

            if (twitch[i].stream != null) {
            $("#output").append("<a target='_blank' href=" +
                            twitch[i].stream["url"] +
                            "><div class='well'><img id = 'img' src=" +
                            twitch[i].stream["logo"] +
                            ">" +
                            "<br></br><p id = 'name'>" +
                            twitch[i].stream["display_name"] +
                            "</p><hr></hr>" + 
                            "<p id = 'status'>" +
                            twitch[i].stream["status"] +
                                "</p><hr></hr><p id = 'online'>Online</p></div></a>");
            } // End of if statement.
                    else if (twitch[i].stream === null){
                $("#output").append("<div class ='well well-md'><img id = 'img' src = 'http://versusbots.com/wp-content/uploads/twitchlogo2.png'><br></br><p id = 'name'>" +
                                twitch[i].display_name + 
                                "</p><hr></hr>" +
                                        "<p id = 'offline'>Offline</p></div>");

            }    //     End of else if statement.
        } // End of i for loop.
    }); // End of twitch getJSON function.
    } // End of x for loop.
}); // End of document function.
korzo
@korzo
Aug 31 2017 02:10
@MukeshAngrish Here you go
screenshot-www.freecodecamp.org-2017-08-31-04-08-36.png
Ai rui 艾瑞
@aisolae
Aug 31 2017 02:16
congrats man
```
// Setup
var myObj = {
  "gift": "pony",
  pet: "kitten",
  bed: "sleigh"
};

function checkObj(checkProp) {




 if(myObj.hasOwnProperty(checkProp)){
   return myObj[checkProp];
 }
  else{
     return "Not Found" ;
  }




}

// Test your code by modifying these values
checkObj("gift");
i am trying to understand the use of checkProp in the above code
korzo
@korzo
Aug 31 2017 02:18
@aisolae It checks if myObj has property given as parameter, then return either the property or "not found"
@aisolae hasOwnProperty method checks if object has given property and return true or false
Jaimus
@JVeeKay
Aug 31 2017 02:20
Hello!
Ai rui 艾瑞
@aisolae
Aug 31 2017 02:20
i understand the use of hasOwnProperty but just don't understand why they had to use checkProp rather than any of the properties of the object
Jaimus
@JVeeKay
Aug 31 2017 02:21
Quick question... if some of us wanted to make a room for a group working just through algorithms together, can we make that room here? Does anyone know where I would go to find out about that?
Ai rui 艾瑞
@aisolae
Aug 31 2017 02:21
oh, i got it
@korzo thanks
CamperBot
@camperbot
Aug 31 2017 02:22
aisolae sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 432 | @korzo |http://www.freecodecamp.com/korzo
Jaimus
@JVeeKay
Aug 31 2017 02:24
Sweet thanks!
Gersho
@Gersho
Aug 31 2017 02:26
@JVeeKay since the algo challenges are in JS, what's wrong with HelpJavaScript ?
oh and if you make a new channel, send me an invite ;)
just1witness
@just1witness
Aug 31 2017 02:30
@JVeeKay Me too!
Jaimus
@JVeeKay
Aug 31 2017 02:46
Just cos there's other people that wanna do other stuff in Help JS. There's a small group of us that want to go through the whole algorithm section and possibly do Javascript 30 as well.. That way we can just focus on that. You know what i mean? I bombed a code test today for a good job and I'm not letting that happen again lol.. Apparently, there are others who are in the same boat. :) Everyone will be welcome. :) Shoot me a private message and I will definitely send you an invite. :)
It'll be here or it might be a slack channel. Whatever I can find thats free and doesn't have be babysat all day.
Gersho
@Gersho
Aug 31 2017 03:05
well since i'm done with front end apart from the advanced algorhytm, count me in, hope it'll be on glitter tho
just1witness
@just1witness
Aug 31 2017 03:07
@Gersho Yeah me too. I'm almost done with all the js algo's but I could use going through them again... and again
@JVeeKay sorry to hear about your bad day :(
Mukesh Kumar Angrish
@MukeshAngrish
Aug 31 2017 03:17
@korzo Thanks man. How'd you get that?
CamperBot
@camperbot
Aug 31 2017 03:17
mukeshangrish sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 434 | @korzo |http://www.freecodecamp.com/korzo
korzo
@korzo
Aug 31 2017 03:22
@MukeshAngrish I have little script for Phantom.js to create screenshot of webpages in full width/height
Arete83
@Arete83
Aug 31 2017 03:23
Hi folks... I don't know if this is allowed but I have homework regarding media queries and responsive webdesign... I'm not sure if I'm doing it correctly... the teacher said she wanted 3 media queries in the css file... would someone help me out?
korzo
@korzo
Aug 31 2017 03:27
@Arete83 Put your code on codepen and post link to it
Gersho
@Gersho
Aug 31 2017 03:31
telephoneCheck("1(555)555-5555") should return true.
telephoneCheck("2(757)622-7382") should return false.
telephoneCheck("555-555-5555") should return true.
...i don't understand US phone numbers, is it 10 or 11 digits ? and why should the second one return false ?
korzo
@korzo
Aug 31 2017 03:34
@Gersho I think 1 is US international call code
Gersho
@Gersho
Aug 31 2017 03:35
thanks @korzo
CamperBot
@camperbot
Aug 31 2017 03:35
gersho sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 435 | @korzo |http://www.freecodecamp.com/korzo
Ai rui 艾瑞
@aisolae
Aug 31 2017 04:14

var myMusic = [
  {
    "artist": "Billy Joel",
    "title": "Piano Man",
    "release_year": 1973,
    "formats": [ 
      "CS", 
      "8T", 
      "LP" ],
    "gold": true
  }, //use , to seperate two diff complex object
   {
     "Musician" : "De grin",
     "Date of Birth" : "August 4",
     "Music Genre" : "Akpala",
     "Popular Music": ['Pon Pon', 'Kilode', 'Check Me'],
     "Grammy Award": true
   }
];

document.write(myMusic.artist);
can anyone tell me why ths gives output of undefined
Gersho
@Gersho
Aug 31 2017 04:15
myMusic is an array that contains 2 objects
if you're looking for Billy Joel, tru myMusic[0]["artist"];
Ai rui 艾瑞
@aisolae
Aug 31 2017 04:18
@Gersho thanks
CamperBot
@camperbot
Aug 31 2017 04:18
aisolae sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 382 | @gersho |http://www.freecodecamp.com/gersho
Ai rui 艾瑞
@aisolae
Aug 31 2017 04:18
accessing it same as array
Gersho
@Gersho
Aug 31 2017 04:18
for the first step yes, but after than you're in a object
[] is array {} is objects
Darren
@DarrenfJ
Aug 31 2017 06:04
evening fCC
@Gersho :wave:
Gersho
@Gersho
Aug 31 2017 06:05
yo Darren
only portfolio left, the main problem being i don't have anything to put in it, i'm doing some of the algo challenges (i had skipped them since they weren't mandatory)
Darren
@DarrenfJ
Aug 31 2017 06:08
yah, i liked them.. made me felt i knew js
hackerrank and codewars have some good ones too
Gersho
@Gersho
Aug 31 2017 06:11
i did 2 this night already so now i'm checking the constructor one (make a Person)
but more in a "i'm just taking a look" way, trying random stuff
Darren
@DarrenfJ
Aug 31 2017 06:16
coolCool
reminds me i haven't done a coders one in a few days
Gersho
@Gersho
Aug 31 2017 06:18
i tried codewars quickly but for the moment i'm more looking for lessons and projects, and fcc is perfect for that, got a personal project too but i still don't know what tech i should be using so it's on standby for now
Tejas B N
@tejasbanga
Aug 31 2017 06:19

``

<script>
$(document).ready(function() {

$("#getMessage").on("click", function(){
// Only change code below this line.

$.getJSON("/json/cats.json", function(json) {
$(".message").html(JSON.stringify(json));
});

// Only change code above this line.
});

});
</script>

<div class="container-fluid">
<div class = "row text-center">
<h2>Cat Photo Finder</h2>
</div>
<div class = "row text-center">
<div class = "col-xs-12 well message">
The message will go here
</div>
</div>
<div class = "row text-center">
<div class = "col-xs-12">
<button id = "getMessage" class = "btn btn-primary">
Get Message
</button>
</div>
</div>
</div>
``

<script>
  $(document).ready(function() {

    $("#getMessage").on("click", function(){
      // Only change code below this line.

      $.getJSON("/json/cats.json", function(json) {
$(".message").html(JSON.stringify(json));
});

      // Only change code above this line.
    });

  });
</script>

<div class="container-fluid">
  <div class = "row text-center">
    <h2>Cat Photo Finder</h2>
  </div>
  <div class = "row text-center">
    <div class = "col-xs-12 well message">
      The message will go here
    </div>
  </div>
  <div class = "row text-center">
    <div class = "col-xs-12">
      <button id = "getMessage" class = "btn btn-primary">
        Get Message
      </button>
    </div>
  </div>
</div>
Gersho
@Gersho
Aug 31 2017 06:20
and what''s your question ?
Tejas B N
@tejasbanga
Aug 31 2017 06:20

what does the line


      $.getJSON("/json/cats.json", function(json)

do?

Gersho
@Gersho
Aug 31 2017 06:21
the get JSON "gets" content (an JSON object) from somewhere (here /json/cats.json" and then calls a function with the collected data as argument
getJSON(url, callback);
Darren
@DarrenfJ
Aug 31 2017 06:23
@tejasbanga you can then use thejson 'callback' 'variable' as an object like in many of the object exercises and using object notations do something with the data...
@Gersho i hear yah on the codewars.. when i originally saw it i wanted to wait too.. but i'm pretty much done all of the present fCC 'cept for the projects
Tejas B N
@tejasbanga
Aug 31 2017 06:25
@DarrenfJ @Gersho thanks to both of you!!!!
CamperBot
@camperbot
Aug 31 2017 06:25
tejasbanga sends brownie points to @darrenfj and @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 385 | @gersho |http://www.freecodecamp.com/gersho
:star2: 1998 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Aug 31 2017 06:25
@tejasbanga an example of this in use is the site fCC set up for the weather app.. you 'get' the JSON by a very specific url which includes your location lon and lat
and it includes an JSON 'object' that details wind speed temp etc...
Gersho
@Gersho
Aug 31 2017 06:26
well i plan to try other stuff too, i want to play around in unity3D, will get me some C# skills, always nice on a resume i heard, and maybe try to get some python skills, but i'm not a huge fan of the indented blocks
Tejas B N
@tejasbanga
Aug 31 2017 06:26
@DarrenfJ oh alright, thanks a ton!!
CamperBot
@camperbot
Aug 31 2017 06:26
tejasbanga sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:warning: tejasbanga already gave darrenfj points
Darren
@DarrenfJ
Aug 31 2017 06:26
@tejasbanga will grab a link so you can see it in action
Tejas B N
@tejasbanga
Aug 31 2017 06:27
@DarrenfJ sure that would help a lot!!!
Gersho
@Gersho
Aug 31 2017 06:28
\o/ i finished Make a Person while trying random crap
if you click that you get a webpage with the object info in JSON format
@tejasbanga i've got a chrome json plugin that converts it to a nice readable format but essentially it 'return's and object
image.png
Gersho
@Gersho
Aug 31 2017 06:34
FF does it natively
Darren
@DarrenfJ
Aug 31 2017 06:35

@Gersho virtual high five ;)

\o/ i finished Make a Person while trying random crap

i keep forgetting to use ff
Gersho
@Gersho
Aug 31 2017 06:35
and if you use a text editor, they usualy have a pretifier of some sort to sort it
Darren
@DarrenfJ
Aug 31 2017 06:35
been forever since i used it
Gersho
@Gersho
Aug 31 2017 06:35
i never moved to chrome
and now i'm using vivaldi too, but mainly to be able to separate 'work' and 'fun'
Darren
@DarrenfJ
Aug 31 2017 06:37
@tejasbanga in my case i used the variable name data for the callback so if I wanted to access the wind speed i'd use object notation data.wind.speed
i use Opera sometimes.. but mostly chrome.. and mostly cause i got used to the dev tools
but i hate.hate.hate the memory load on it
Gersho
@Gersho
Aug 31 2017 06:38
in sample code, data and json are the most used argument name ( or a, but i hate those people ^^)
Opera, wow totaly forgot it was still there xD
Darren
@DarrenfJ
Aug 31 2017 06:39
basically i think it was a privacy article i think that mentioned it has built in vpn or something...
Gersho
@Gersho
Aug 31 2017 06:40
oh, i don't use that, i'm more of a "hiding in the crowd" than "hiding real hard" type
Darren
@DarrenfJ
Aug 31 2017 06:41
@tejasbanga hope mine and @Gersho 's comments made the JSON stuff a bit clearer...
Gersho
@Gersho
Aug 31 2017 06:41
and honestly, if you don't trust your ISP or government, why would you trust some random VPN service provider ?
i'd love the algo challenge much more if there wasn't so much maths in it
Darren
@DarrenfJ
Aug 31 2017 06:44
i think it's built into Opera... isn't Opera open source? anyhoo I rarely use it
@tejasbanga and the back end of this article has some good links on learning more to support the JSON fCC stuff... https://medium.com/@P1xt/if-you-are-struggling-with-the-freecodecamp-intermediate-projects-9f7fe943601c
Darren
@DarrenfJ
Aug 31 2017 06:51
ok guys off to bed
thanks for the chat @Gersho @tejasbanga
CamperBot
@camperbot
Aug 31 2017 06:52
darrenfj sends brownie points to @gersho and @tejasbanga :sparkles: :thumbsup: :sparkles:
:cookie: 265 | @tejasbanga |http://www.freecodecamp.com/tejasbanga
:cookie: 387 | @gersho |http://www.freecodecamp.com/gersho
Gersho
@Gersho
Aug 31 2017 06:52
good night
Georgia
@georgiawang5332
Aug 31 2017 09:52
can i help me , btn my english is very bad
everyone can help me , btn my english is very bad

你还可以将 Bootstrap 的 col-xs-*用在 form 元素中。这样的话,我们的单选按钮就可以均匀地在页面上展开,不需要知道屏幕的分辨率有多宽。

将页面中的两个单选按钮放置于一个 <div class="row"> 元素中。然后,添加 <div class="col-xs-6"> 元素并分别包裹每一个单选按钮。

whats mean?
将你所有的单选按钮放置于包含 class 属性 row 的 div 元素中。
你的每一个单选按钮都分别嵌套于自己的 div 元素中,div 包含 class 属性 col-xs-6。
确保你的每个 div 元素都有一个闭合标签。

<div class="row">
<div class="col-xs12">
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>

<div class="row">
  <div class="col-xs-6">
    <button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
  </div>
  <div class="col-xs-6">
    <button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
  </div>
</div>

</div>

my code is false btn i cant find it
whats happened
Stephen James
@sjames1958gm
Aug 31 2017 10:06
col-xs12 this should be col-xs-12
Georgia
@georgiawang5332
Aug 31 2017 10:26
???
thats ok i cant find the problem
邵振南
@SZNZXT
Aug 31 2017 11:12
我说个中文看看有没有人
邵振南
@SZNZXT
Aug 31 2017 11:15
Why is it all in English?
@heroiczero
Tolu Akinnubi
@toles04
Aug 31 2017 11:18
Hello guys, I am a php developer with about 4yrs of experience using codeigniter framework and i am looking to learn something new and i need some guidance ...laravel5 or node.js with react and mongodb
heroiczero
@heroiczero
Aug 31 2017 11:19
@toles04 Welcome to the Free code camp Community :)
邵振南
@SZNZXT
Aug 31 2017 11:20
@toles04 Welcome to the Free code camp Community
Tolu Akinnubi
@toles04
Aug 31 2017 11:20
@heroiczero i am not new ..finished front-end section some months back
heroiczero
@heroiczero
Aug 31 2017 11:21
@toles04 then Welcome back :)
Tolu Akinnubi
@toles04
Aug 31 2017 11:21
i just need help in choosing what to learn.
heroiczero
@heroiczero
Aug 31 2017 11:22
@toles04 i think a MEAN stack is more popular than laravel5
Tolu Akinnubi
@toles04
Aug 31 2017 11:24
it is but i already have good background and experience with php ...javascript not so much
heroiczero
@heroiczero
Aug 31 2017 11:26
@toles04 JS is pretty fun to learn. It is not so hard.
Abdelrhman Ali
@Abdelrhmanali28299
Aug 31 2017 11:55
hi ,can any one help me in D3?
Georgia
@georgiawang5332
Aug 31 2017 11:55
@toles04 wow php its very different XD
if u can teach every i can doing first student (XD my english is very bad toobad
Machiel Van Der Toorn
@mcvdt07
Aug 31 2017 13:23
hello world
is anyone availible to help me with json on python?
Stephen James
@sjames1958gm
Aug 31 2017 13:47

@georgiawang5332

<div class="col-xs12">
this is wrong

<div class="col-xs-12">
This is correct

Alexander Køpke
@alexanderkopke
Aug 31 2017 15:27
a
Ian Hicks
@ijhicks
Aug 31 2017 15:43
so I
ve more or less got my weather project working
but need help with one small thing
for some reason the weather icon appears to the lower right of the canvas.. I can't figure out why
and i cant change it
QQ截图20170831233220.jpg
Who can tell me how to do this?
@ijhicks
@alexanderkopke
Tejas B N
@tejasbanga
Aug 31 2017 16:05
@DarrenfJ thanks
CamperBot
@camperbot
Aug 31 2017 16:05
tejasbanga sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1999 | @darrenfj |http://www.freecodecamp.com/darrenfj
Kyle Holm
@thekholm80
Aug 31 2017 16:11
@DarrenfJ thanks
CamperBot
@camperbot
Aug 31 2017 16:11
thekholm80 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2000 | @darrenfj |http://www.freecodecamp.com/darrenfj
Kyle Holm
@thekholm80
Aug 31 2017 16:11
2k baby
Dylan
@dhcodes
Aug 31 2017 16:15
mvp
@thekholm80
Kyle Holm
@thekholm80
Aug 31 2017 16:16
haha nah just an opportunist lol
CamperBot
@camperbot
Aug 31 2017 16:17
:star2: 1831 | @dhcodes |http://www.freecodecamp.com/dhcodes
Dylan
@dhcodes
Aug 31 2017 16:17
about @thekholm80
CamperBot
@camperbot
Aug 31 2017 16:17
:star2: 1457 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Darren
@DarrenfJ
Aug 31 2017 17:03
morning fCC
hey guys :wave: @dhcodes @thekholm80 :D
thanks @thekholm80 for pushing me over the edge ;) 2 K!!!
CamperBot
@camperbot
Aug 31 2017 17:04
darrenfj sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1458 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Kyle Holm
@thekholm80
Aug 31 2017 17:11
@DarrenfJ you earned it buddy
Darren
@DarrenfJ
Aug 31 2017 17:12
:D
Manish Giri
@Manish-Giri
Aug 31 2017 17:18
@DarrenfJ congrats!
I missed the magical mark
Darren
@DarrenfJ
Aug 31 2017 17:20
yup.. i can now never get anymore brownies forever
Stephen James
@sjames1958gm
Aug 31 2017 17:42
@DarrenfJ :clap:
koder3
@koder3
Aug 31 2017 17:46
do i learn Angular 1 or Angular 4
the codepen example for the wikipedia viewer uses Angular 1
but i see people saying use Angular 4
aRtoo
@artoodeeto
Aug 31 2017 19:10
guys why is it the return wont give me the sum. just the word function
heres the code: this is just a testing.
    test(1,1);
  function test(a,b) {
    return a+b;
  }

  return test;
Joseph
@revisualize
Aug 31 2017 19:14
@artoodeeto I answered you in the main chat.
aRtoo
@artoodeeto
Aug 31 2017 19:36

yow brothers from another mother. the algorithm entitled arguments optional. theres a invoke function like this. addTogether(2)(3);//should return 5.
but when i run my code.


function addTogether() {

  var sum = 0;


  if(typeof arguments[0] === 'number' && typeof arguments[1] === 'number') { 
      if(arguments.length > 1) {
          for(var i=0; i<arguments.length; i++){
            sum += arguments[i];
      }
    }else {
      var x = arguments[0];
      return function(y) {
        sum += x + y;
      };
    }
  } else {
    return undefined;
  }


  return sum;
}

it says addTogether is not a function() error is this a bug?

koder3
@koder3
Aug 31 2017 20:16
can anyone tell me if the react tutorial on freeCodeCamp beta is any good?
Kyle Holm
@thekholm80
Aug 31 2017 20:19
@koder3 I don't think it's been updated for ES6. If that's the case, you'd probably get the basic idea of React but you'd want to find another resource that's more up-to-date
just1witness
@just1witness
Aug 31 2017 20:23
@artoodeeto In the end, I had to return a function that checked the next argument. It would return the first argument (stored in a variable) if it was determined by a simple boolean check if arguments.length was greater than 1.
Razvan
@razvanlikespizza
Aug 31 2017 20:27
Can I get some jQuery help pleasee?
just1witness
@just1witness
Aug 31 2017 20:27
shoot
I'll try to help if i can
Razvan
@razvanlikespizza
Aug 31 2017 20:29
$(document).ready(function(){
  $(window).scroll(function(){
    $("arrowup").addClass("arrowupactive");
  });
  });
Its not adding the class..
just1witness
@just1witness
Aug 31 2017 20:30
can I see your class?
@razvanlikespizza
Razvan
@razvanlikespizza
Aug 31 2017 20:31
image.png
@just1witness
or
<a href="#home"><img src="img/arrow-up.png" class="arrowup wow fadeIn" width="50px" height="50px" alt=""></a>
just1witness
@just1witness
Aug 31 2017 20:31
Why do you have active?
arrowupACTIVE
Razvan
@razvanlikespizza
Aug 31 2017 20:32
I want to add it, when the user scrolls the page.
Do you understand? :/
just1witness
@just1witness
Aug 31 2017 20:32
nope
sorry
Razvan
@razvanlikespizza
Aug 31 2017 20:33
When I scroll the page, I want to add that class...anyways, Thanks @just1witness
CamperBot
@camperbot
Aug 31 2017 20:33
razvanlikespizza sends brownie points to @just1witness :sparkles: :thumbsup: :sparkles:
:cookie: 307 | @just1witness |http://www.freecodecamp.com/just1witness
just1witness
@just1witness
Aug 31 2017 20:33
from what I understand the class name goes in that field, I don't know why you would add active to the class name
This message was deleted
but Maybe I just haven't gotten to that point yet
should there be a space? Or is it supposed to be directly added to the class name?
or maybe a comma?
Razvan
@razvanlikespizza
Aug 31 2017 20:36
I solved it by targeting the element using an id.. :D
just1witness
@just1witness
Aug 31 2017 20:36
nice
koder3
@koder3
Aug 31 2017 20:38
@thekholm80 thanks
CamperBot
@camperbot
Aug 31 2017 20:38
koder3 sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1459 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Alexander Køpke
@alexanderkopke
Aug 31 2017 21:15
using an id is what id do too :laughing:
Kyle Holm
@thekholm80
Aug 31 2017 21:18
@alexanderkopke lol
Alexander Køpke
@alexanderkopke
Aug 31 2017 21:20
i know it was pretty weak but chat is so slow I had to go with it
Kyle Holm
@thekholm80
Aug 31 2017 21:22
you did good
Alexander Køpke
@alexanderkopke
Aug 31 2017 21:25
finally getting around to watch season 5 in breaking bad.
Kyle Holm
@thekholm80
Aug 31 2017 21:26
aww yeah, science son!
i wasn't a big fan of breaking bad
Alexander Køpke
@alexanderkopke
Aug 31 2017 21:30
haven't watched GoT at all. Would you recommend?
Kyle Holm
@thekholm80
Aug 31 2017 21:30
I only watched the first 2 seasons. It was entertaining
Alexander Køpke
@alexanderkopke
Aug 31 2017 21:31
cool
dyon3334
@dyon3334
Aug 31 2017 21:55
does anyone know what number.EPSILON; does ? with more explanation as on mdn because its very short and unclear to me
Nahuel Ovejero
@NahuelOvejero
Aug 31 2017 21:57
is that js ?
@dyon3334
dyon3334
@dyon3334
Aug 31 2017 21:57
@NahuelOvejero yes its a number property
but i dont know what it doe
Nahuel Ovejero
@NahuelOvejero
Aug 31 2017 21:58
its just like a static number
like you can access math.pi
you can access number.EPSILON
its represent a value of 2 ^ -52.
dyon3334
@dyon3334
Aug 31 2017 21:59
@NahuelOvejero i thi a very usefull property
@NahuelOvejero thanks a lot can you tell me when to use this property ?
CamperBot
@camperbot
Aug 31 2017 22:00
dyon3334 sends brownie points to @nahuelovejero :sparkles: :thumbsup: :sparkles:
:cookie: 796 | @nahuelovejero |http://www.freecodecamp.com/nahuelovejero
Nahuel Ovejero
@NahuelOvejero
Aug 31 2017 22:02
when you need to use epsilon, but I doubt you will
Uriel Guzmán
@Burinson
Aug 31 2017 22:34

Why is

var url = 'https://wind-bow.glitch.me/twitch-api/streams/';
    var streamers = ["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"];

    for (var x = 0; x < streamers.length; x++) {

    $.getJSON(url + streamers[x], function(twitch){
console.log(twitch);

Console logging this?

PLEASE CHECK THE IMAGE BELOW, CAN'T PASTE CONSOLE CODE :(

I want it to give me the whole API array, I want this!

{"stream":{"_id":26145881408,"game":"StarCraft II","viewers":413,"video_height":720,"average_fps":50,"delay":0,"created_at":"2017-08-31T11:00:24Z","is_playlist":false,"stream_type":"live","preview":{"small":"https://static-cdn.jtvnw.net/previews-ttv/live_user_esl_sc2-80x45.jpg","medium":"https://static-cdn.jtvnw.net/previews-ttv/live_user_esl_sc2-320x180.jpg","large":"https://static-cdn.jtvnw.net/previews-ttv/live_user_esl_sc2-640x360.jpg","template":"https://static-cdn.jtvnw.net/previews-ttv/live_user_esl_sc2-{width}x{height}.jpg"},"channel":{"mature":false,"partner":false,"status":"RERUN: jjakji vs. MaNa - EU Qualifier Stage 2 - IEM Cologne - StarCraft 2","broadcaster_language":"en","display_name":"ESL_SC2","game":"StarCraft II","language":"en","_id":30220059,"name":"esl_sc2","created_at":"2012-05-02T09:59:20Z","updated_at":"2017-08-31T19:34:07Z","delay":null,"logo":"https://static-cdn.jtvnw.net/jtv_user_pictures/esl_sc2-profile_image-d6db9488cec97125-300x300.jpeg","banner":null,"video_banner":"https://static-cdn.jtvnw.net/jtv_user_pictures/esl_sc2-channel_offline_image-5a8657f8393c9d85-1920x1080.jpeg","background":null,"profile_banner":"https://static-cdn.jtvnw.net/jtv_user_pictures/esl_sc2-profile_banner-f8295b33d1846e75-480.jpeg","profile_banner_background_color":"#050506","url":"https://www.twitch.tv/esl_sc2","views":68071998,"followers":191531,"_links":{"self":"https://api.twitch.tv/kraken/channels/esl_sc2","follows":"https://api.twitch.tv/kraken/channels/esl_sc2/follows","commercial":"https://api.twitch.tv/kraken/channels/esl_sc2/commercial","stream_key":"https://api.twitch.tv/kraken/channels/esl_sc2/stream_key","chat":"https://api.twitch.tv/kraken/chat/esl_sc2","features":"https://api.twitch.tv/kraken/channels/esl_sc2/features","subscriptions":"https://api.twitch.tv/kraken/channels/esl_sc2/subscriptions","editors":"https://api.twitch.tv/kraken/channels/esl_sc2/editors","teams":"https://api.twitch.tv/kraken/channels/esl_sc2/teams","videos":"https://api.twitch.tv/kraken/channels/esl_sc2/videos"}},"_links":{"self":"https://api.twitch.tv/kraken/streams/esl_sc2"}},"_links":{"self":"https://api.twitch.tv/kraken/streams/ESL_SC2","channel":"https://api.twitch.tv/kraken/channels/ESL_SC2"}}

Any help, please? :(

image.png
aRtoo
@artoodeeto
Aug 31 2017 23:33
damn!! im so freakin mad right now. after 3days of studying closures i got nothing so i gave up. on the algorithm challenge i answer it on my own. no closures but in a inefficient way. it is all nested if statements can you DM me ur answer fam please. want to study it. heres my ass code and i really tried my best fam:

function addTogether() {

  var sum = 0;

  console.log(arguments.length);
  console.log(typeof arguments[0]);

  if(arguments.length > 1) {
  if(typeof arguments[0] === 'number' && typeof arguments[1] === 'number') { 
          for(var i=0; i<arguments.length; i++){
            sum += arguments[i];
      }
    }else {
      return undefined;
    }



  } else if(arguments.length === 1) {
    if(typeof arguments[0] === 'number') {

      var n = arguments[0];

        return function(y) {
          if(typeof y === 'number') {
            return sum += n + y;
          } else {
            return undefined;
          }
      };


    } else {
      return undefined;
    }

  }

  return sum;
}
//addTogether(2);
//addTogether(2,3);//should return 5.
//addTogether(2)(3);//should return 5. //this is my error
//addTogether("http://bit.ly/IqT6zt");//should return undefined.
//addTogether(2, "3");//should return undefined.
addTogether(2)([3]);//should return undefined