These are chat archives for FreeCodeCamp/Help

23rd
Oct 2018
Anand Potukuchi
@anandpotukchi
Oct 23 2018 02:21
Morning
Let's take a look at my code after my jog?
@cmccormack will you be there then?
Tom Minor
@procode200
Oct 23 2018 02:27
time zone check! every body say what time it is!!!!
7:27
Anand Potukuchi
@anandpotukchi
Oct 23 2018 02:28
@procode200 say what
Tom Minor
@procode200
Oct 23 2018 02:28
say what time it is
Karma Drukpa
@coderkarma
Oct 23 2018 02:28
what's good?
Anand Potukuchi
@anandpotukchi
Oct 23 2018 02:28
7:58
Tom Minor
@procode200
Oct 23 2018 02:28
its now 7:28
??
is your clock wrong?
Anand Potukuchi
@anandpotukchi
Oct 23 2018 02:29
AM
Tom Minor
@procode200
Oct 23 2018 02:29
ah
here its 7:29 pm
from now on everybody has to say am or pm
come on people! what time is it!
ok forget
IT
ill try a diffrent room
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Oct 23 2018 03:03
what is @param in the javascript file ?
Anand Potukuchi
@anandpotukchi
Oct 23 2018 03:07
@isemaj_gitlab usually a path to symbol
Tom Minor
@procode200
Oct 23 2018 03:07
yeah
Anand Potukuchi
@anandpotukchi
Oct 23 2018 03:07
But guess you should Google it
Not that knowledgeable
Tom Minor
@procode200
Oct 23 2018 03:07
or bing it
or yahoo it
or duckduckgo it
or Baidu it
or Wolframalpha it
or kidrex it
or ask.com it
or Gigablast it
or Yandex it
or Youdao it
or Soso.com it
or Qwant it
or Exalead it
Tom Minor
@procode200
Oct 23 2018 03:12
or Groovle it
or Taganode Local Search Engine it
or all the tens of thousands of search engines
Kyle Holm
@thekholm80
Oct 23 2018 03:16
yeah maybe let's not spam
Tom Minor
@procode200
Oct 23 2018 03:17
bing alone (just one of all the tens of thousands of search engines) has 524 million users.
and that is just one other!
yahoo has 227.8 million users.
its amazing
combine all the users all of the tens of thousands of OTHER search engines that would totally TOP GOOGLE.
EVERYONE HAS TO STOP THINKING GOOGLE IS KING!!!!
it is just amazing!
Tom Minor
@procode200
Oct 23 2018 03:22
think about it!
Anand Potukuchi
@anandpotukchi
Oct 23 2018 03:25
@procode200 uh . You do realise that you're spamming don't you
Tom Minor
@procode200
Oct 23 2018 03:29
@anandpotukchi not at the mere least!
Karma Drukpa
@coderkarma
Oct 23 2018 03:57
What is going on?
Niraj Nandish
@Nirajn2311
Oct 23 2018 04:38
We have a loose penguin, send him back to Antarctica
Anand Potukuchi
@anandpotukchi
Oct 23 2018 04:55
Lol
Claudio Restifo
@Marmiz
Oct 23 2018 05:28
community opinion: you prefer IIFE or function for modularise before modules existed?
var something = function() {
    var message = 'Hello!';
    function printMessage() {
         console.log(message);
    }

    return {
         showMessage: printMessage,
    }
}();

// vs

var something = function() {
    var message = 'Hello!';
    function printMessage() {
        console.log(message);
    }
    return {
        printMessage: printMessage
    }
};
Anand Potukuchi
@anandpotukchi
Oct 23 2018 05:33
@Marmiz have you used cors in react before?
Claudio Restifo
@Marmiz
Oct 23 2018 05:43
"use cors" ?
Shabab Karim
@shabab477
Oct 23 2018 05:43
Has anyone been facing problem after they have rebased their local branch with the upstream?
I keep getting this error
Anand Potukuchi
@anandpotukchi
Oct 23 2018 05:45
@shabab477 share the error here
ONLY the error
@Marmiz yeah
Claudio Restifo
@Marmiz
Oct 23 2018 05:47
@anandpotukchi what do you mean by "use".
cors is just fetch or XML...
with a header param. What's to "use"...
like set it up on your server?
or add a header on every request automatically...
Shabab Karim
@shabab477
Oct 23 2018 05:53
I think the picture would be of much help than just pasting the error but here you go. Only the error:
/home/shabab/fcc/freeCodeCamp/client/src/components/layouts/GuideLayout.js
  37:9  error  Cannot query field "allNavigationNode" on type "Query"  graphql/template-strings
Claudio Restifo
@Marmiz
Oct 23 2018 05:53
that means that the query is broken. More specifically that param it's not a field in the Graph
Shabab Karim
@shabab477
Oct 23 2018 05:55
Ok. So how to fix it? I checked out from the master branch of FCC.
Claudio Restifo
@Marmiz
Oct 23 2018 05:56

I have no clue. Whoever committed that probably made a mistake?
The Backend is not updated?
you didn't have to checkout from master but another branch (like dev)?

There are sooooo many options here

I think there's a channel specifically for manteiner of the repo. (I haven't committed in a while), perhaps there you can find some better help
Shabab Karim
@shabab477
Oct 23 2018 05:58
ok thanks mate
Claudio Restifo
@Marmiz
Oct 23 2018 06:01
@shabab477 are you running mongo?
Shabab Karim
@shabab477
Oct 23 2018 06:02
yes
Shabab Karim
@shabab477
Oct 23 2018 06:07
yeah pretty sure the error started existing after I pulled from upstream. I went back to the head before upstream and it started working again.
Aditya
@ezioda004
Oct 23 2018 07:30
@Marmiz I like the first pattern, I guess it saves the trouble of const somethingElse = something()
Claudio Restifo
@Marmiz
Oct 23 2018 07:36
@ezioda004 yep, but I would have to anyway If i want to have multiple instances at the same time, don't I?
const someOfThis = new something();
const someOfThat = new something();
Aditya
@ezioda004
Oct 23 2018 07:40
@Marmiz You're using the pattern as factory function? That'll work, I wont use new keyword though, pretty sure it'll create a new object from something() just to throw it away
var something = function() {
    console.log(this); // instance from something constructor
    var message = 'Hello!';    
    function printMessage() {
        console.log(message);
    }
    return {
        printMessage: printMessage
    }
};
May Kittens Devour Your Soul
@diomed
Oct 23 2018 07:57

The future has landed

And there are no hoverboards or flying cars.
Just apps. Lots of mother flipping apps.

Niraj Nandish
@Nirajn2311
Oct 23 2018 07:58
@diomed https://vue-cards.herokuapp.com/ - Is this how you want your cards
May Kittens Devour Your Soul
@diomed
Oct 23 2018 08:01
ugh. I hate apps
they're the worst.
can't even see the code
to steal pics
Niraj Nandish
@Nirajn2311
Oct 23 2018 08:03
At least he has a better expression than you
May Kittens Devour Your Soul
@diomed
Oct 23 2018 08:03
that 2nd pic is me being caught stealing in the supermarket
Niraj Nandish
@Nirajn2311
Oct 23 2018 08:04
No its the first pic
Aditya
@ezioda004
Oct 23 2018 08:04
;O
Niraj Nandish
@Nirajn2311
Oct 23 2018 08:04
THe 2nd pic is when you dont understand JS
May Kittens Devour Your Soul
@diomed
Oct 23 2018 08:05
2nd pic in first pic
May Kittens Devour Your Soul
@diomed
Oct 23 2018 08:18
@ezioda004 are you son of the president
Aditya
@ezioda004
Oct 23 2018 08:20
@diomed Thats a new insult
Claudio Restifo
@Marmiz
Oct 23 2018 08:24
@ezioda004 well but without new it won't create a new object instance...or am I missing something
Aditya
@ezioda004
Oct 23 2018 08:28
@Marmiz new is only required with constructor functions, otherwise you can simply call the function therefore its a factory function. In your example using something() and new something() both will work exactly same, the only difference will be that with new something() something is being used as constructor and factory function which is a bit misleading as you only want to use it as factory function since there is no dynamism (ie no this)
Dany Din
@danydin
Oct 23 2018 08:33
someone done the qa part here? i'm stuck
Claudio Restifo
@Marmiz
Oct 23 2018 08:34

@ezioda004 Oh sorry, I see your confusion. Yeah you are right. In the example I've posted it's not even worth using a factory function.
The actual code is different.
But I see your point!

Thanks! :+1: you made me realise I've been overkilling a lot of things :)

Dany Din
@danydin
Oct 23 2018 08:34
someone done the QA part? i'm stuck
Claudio Restifo
@Marmiz
Oct 23 2018 08:35
fire away your question @danydin
Dany Din
@danydin
Oct 23 2018 08:35
@Marmiz

      /** Repetition is the mother of learning. **/
      // Try it again. This time without help !!
      test('send {surname: "da Verrazzano"}', function(done) {
        chai.request(server)
        .put('/travellers')
        .send({surname: 'da Verrazzano'})
        .end(function(err, res){
        /** place the chai-http request code here... **/

        /** place your tests inside the callback **/

        assert.equal(res.status, 200); // remove this after adding tests
        done();
      });
    });
it doesn't even test it like there's something wrong in the syntax
you want link to the challenge?
Aditya
@ezioda004
Oct 23 2018 08:37
I did this few months ago, this is /woosh to me now
Claudio Restifo
@Marmiz
Oct 23 2018 08:38
@ezioda004 thanks for your feedback! Really appreciated
Aditya
@ezioda004
Oct 23 2018 08:39
@Marmiz No problem :D
Dany Din
@danydin
Oct 23 2018 08:39
?
Claudio Restifo
@Marmiz
Oct 23 2018 08:45
@danydin link the cahllenge?
cos LGTM
what exactly do you have to test for?
Dany Din
@danydin
Oct 23 2018 08:51
@Marmiz
Claudio Restifo
@Marmiz
Oct 23 2018 08:58
looks good to me. Have you tried reloading the browser to see if the test suite jammed?
May Kittens Devour Your Soul
@diomed
Oct 23 2018 08:59

jammies!

Dany Din
@danydin
Oct 23 2018 08:59
yes still same @Marmiz
Claudio Restifo
@Marmiz
Oct 23 2018 08:59
where's my jam? :jack_o_lantern:
Dany Din
@danydin
Oct 23 2018 09:00
can you try solve it maybe see if im doing anything wrong
or missing anythin
Claudio Restifo
@Marmiz
Oct 23 2018 09:00
@danydin link your glitch file, I'll try to remix from there
(when I have time)
May Kittens Devour Your Soul
@diomed
Oct 23 2018 09:02
how many pumpkins have lost their souls in pumpkin spice late?
Dany Din
@danydin
Oct 23 2018 09:02
@Marmiz
May Kittens Devour Your Soul
@diomed
Oct 23 2018 09:03
on the night of October 31st they raise to get their revenge
Claudio Restifo
@Marmiz
Oct 23 2018 09:04
too spooky :skull:
Claudio Restifo
@Marmiz
Oct 23 2018 09:10
@danydin there's a parsing error, somewhere you have a typo. Don't ask me where tho :scream_cat:
unfortunately the message at the bottom is not very helpful
Dany Din
@danydin
Oct 23 2018 09:19
ya i realized it that though i dont know where
maybe you can try complete it?
i mean pass it
Aditya
@ezioda004
Oct 23 2018 09:20
@Marmiz @danydin Missing }) since the test is inside 2 suites
Dany Din
@danydin
Oct 23 2018 09:22
thanks god @ezioda004
Aditya
@ezioda004
Oct 23 2018 09:22
:thumbsup:
Dany Din
@danydin
Oct 23 2018 09:22
you used a program for that or manually inspected/
Aditya
@ezioda004
Oct 23 2018 09:25
Manually..I got free time
May Kittens Devour Your Soul
@diomed
Oct 23 2018 10:42
he's president's son after all :yum:
May Kittens Devour Your Soul
@diomed
Oct 23 2018 12:02
sailorlisa
@sailorlisa
Oct 23 2018 12:51
Could someone can help me? I stuck on here longtime. The img elements should conclude smaller-image class and width: 100px.
Size your Images pratice

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

<div class="smaller-image">

I tried this, but wrong.
Victor Popescu
@VicPopescu
Oct 23 2018 12:52
can u paste the challenge link please?
@sailorlisa
Eric Weiss
@eweiss17
Oct 23 2018 12:52
:thumbsup:
Victor Popescu
@VicPopescu
Oct 23 2018 12:52
ok now delete it :))
it's too long
sailorlisa
@sailorlisa
Oct 23 2018 12:53
Thank you.
Supra01
@Supra01
Oct 23 2018 12:53
Hello everyone! I'm working on the Arguments Optional algorithm. I haven't seen two arguments passed into a function like this addTogether(2)(3). Can someone point me in the right direction? Here is my code so far:
function addTogether(first,sec=0) {
    if(!Number.isInteger(first)||!Number.isInteger(sec)){
        return undefined;
    }else{
        return  first + sec;
    }
}

console.log(addTogether(2,"3"))
Victor Popescu
@VicPopescu
Oct 23 2018 12:54
@sailorlisa I think you need to apply the class to the img element, not the div
Eric Weiss
@eweiss17
Oct 23 2018 12:54
@sailorlisa your code up top looks okay, what error is it giving u
Aditya
@ezioda004
Oct 23 2018 12:54
@Supra01 addTogether(2)(3) means that the addTogether function is returning another function and you're passing 3 as argument to the returned function.
Eric Weiss
@eweiss17
Oct 23 2018 12:54
oh ya he is right
BuntyBru
@BuntyBru
Oct 23 2018 12:55
i am using data-toggle="pills" from bootstrap
The pills click are not working after 2nd click
sailorlisa
@sailorlisa
Oct 23 2018 12:56
<img src="/images/relaxing-cat.jpg" class="width: 100px"> Is this apply the class to the img element? @VicPopescu
@eweiss17 It didn't show error
Victor Popescu
@VicPopescu
Oct 23 2018 12:57
class="className"
@sailorlisa
BuntyBru
@BuntyBru
Oct 23 2018 12:57
<ul class="nav nav-tabs">
    <li class="active"><a data-toggle="tab" href="#home">Home</a></li>
    <li><a data-toggle="tab" href="#menu1">Menu 1</a></li>
    <li><a data-toggle="tab" href="#menu2">Menu 2</a></li>
    <li><a data-toggle="tab" href="#menu3">Menu 3</a></li>
  </ul>

  <div class="tab-content">
    <div id="home" class="tab-pane fade in active">
      <h3>HOME</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
    </div>
    <div id="menu1" class="tab-pane fade">
      <h3>Menu 1</h3>
      <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
    </div>
    <div id="menu2" class="tab-pane fade">
      <h3>Menu 2</h3>
      <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.</p>
    </div>
    <div id="menu3" class="tab-pane fade">
      <h3>Menu 3</h3>
      <p>Eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</p>
    </div>
  </div>
bootstrap
Aditya
@ezioda004
Oct 23 2018 12:57
@Supra01 You'd have to check if the first function is receiving 1 arguments or more, look up arguments object or rest parameter.
Eric Weiss
@eweiss17
Oct 23 2018 12:57
if you had style="" instead of class="" it would still work but fail the challenge
Victor Popescu
@VicPopescu
Oct 23 2018 12:58
@sailorlisa you can't assign a style property to a class attribute. you define your class in your stylesheet section, then apply the class name to the img element
Supra01
@Supra01
Oct 23 2018 12:58
@ezioda004 Ok I will look into the arguments object. Thank you!
Eric Weiss
@eweiss17
Oct 23 2018 12:58
@BuntyBru are you supposed to be using nav-pills?
Supra01
@Supra01
Oct 23 2018 13:05
@ezioda004 I get arguments object but I just don't know how to catch the second argument when it is in braces
Aditya
@ezioda004
Oct 23 2018 13:07
@Supra01 If the first argument is valid and no 2nd argument is passed then return a function, then do something with it, basically "currying" functions
const sum = x => y => x + y;
sum(2)(3) // 5
sailorlisa
@sailorlisa
Oct 23 2018 13:10
Thank you! I passed it!
Supra01
@Supra01
Oct 23 2018 13:12
@ezioda004 cool thank you I'll give that a shot
Victor Popescu
@VicPopescu
Oct 23 2018 13:13
@sailorlisa np, good job!
BuntyBru
@BuntyBru
Oct 23 2018 13:38
@eweiss17 issue resolved mate
Dany Din
@danydin
Oct 23 2018 19:14
someone experinced in microsoft AD?
Niraj Nandish
@Nirajn2311
Oct 23 2018 19:38
What can we really do with jQuery and is it worth learning?
Aditya
@ezioda004
Oct 23 2018 19:43
You can do animations like:
$(Aditya).fadeOut();
Christopher McCormack
@cmccormack
Oct 23 2018 19:43
@ezioda004 see ya
Aditya
@ezioda004
Oct 23 2018 19:45
@cmccormack I dont feel so goood Mr Chris..to..p ..h.e
Christopher McCormack
@cmccormack
Oct 23 2018 19:46
Aww that was sad
Niraj Nandish
@Nirajn2311
Oct 23 2018 19:47
Anything other than animations as I was thinking whether to start learning, so is it worth it?
Aditya
@ezioda004
Oct 23 2018 19:48
In 2k18? Unless your workplace uses it, I'd say you can probably learn better things than jQuery
Christopher McCormack
@cmccormack
Oct 23 2018 19:50
faded.png
I PS espert
Niraj Nandish
@Nirajn2311
Oct 23 2018 19:51
I have a long way to go before I get a job
Aditya
@ezioda004
Oct 23 2018 19:51
@cmccormack LOL
Christopher McCormack
@cmccormack
Oct 23 2018 19:52
Me too if it's in digital photo manipulation
Aditya
@ezioda004
Oct 23 2018 19:53
Not bad for 5 mins job
Christopher McCormack
@cmccormack
Oct 23 2018 19:53
like 20 seconds haha
took longer for paint.net to load
Aditya
@ezioda004
Oct 23 2018 19:54
Seems like the build is travis build is broken again?
Niraj Nandish
@Nirajn2311
Oct 23 2018 19:54
Yeah
This time its about curriculum tests
Christopher McCormack
@cmccormack
Oct 23 2018 19:55
I don't get it, isn't travis supposed to prevent this in the first place?
or with the onset of PRs are a few that show as broken still being allowed to merge unaware of the potential issues?
Aditya
@ezioda004
Oct 23 2018 19:56
I think new tests are added to travis build?
@Nirajn2311 Is there a PR to fix the build or nah
Niraj Nandish
@Nirajn2311
Oct 23 2018 19:57
Not at the moment
May Kittens Devour Your Soul
@diomed
Oct 23 2018 20:21
@ezioda004 pls send pic of you smiling
Aditya
@ezioda004
Oct 23 2018 20:24
:)
Christopher McCormack
@cmccormack
Oct 23 2018 20:24
that's not creepy
Aditya
@ezioda004
Oct 23 2018 20:25
(:
May Kittens Devour Your Soul
@diomed
Oct 23 2018 20:25
yeah, that's the creepy one
Manish Giri
@Manish-Giri
Oct 23 2018 20:38
@diomed :cat:
Karma Drukpa
@coderkarma
Oct 23 2018 20:56
👋👋👋👋
✌️✌️✌️
May Kittens Devour Your Soul
@diomed
Oct 23 2018 21:02
@Manish-Giri meow :cat:
does anyone know how to append submit button to search input in Boostrap 4?