These are chat archives for FreeCodeCamp/Help

30th
Sep 2018
Karma Drukpa
@coderkarma
Sep 30 2018 00:00
I have one friend who's name is Paul, he has like 10 years of experience in PHP but currently migrating into JS stuff
but PHP is good one to.
Kyle Holm
@thekholm80
Sep 30 2018 00:01
i've heard people that use php get their houses raided by cops
Karma Drukpa
@coderkarma
Sep 30 2018 00:01
@bjorno43 you're the king of PHP to.
@thekholm80 lol how ?
Kyle Holm
@thekholm80
Sep 30 2018 00:01
ask bob
jsjoe82
@jsjoe82
Sep 30 2018 00:01
And ask you if you're sure you don't have kids?
Kyle Holm
@thekholm80
Sep 30 2018 00:02
exactly
i'm just saying, it's not worth the risk for me
i'm too pretty for jail
Karma Drukpa
@coderkarma
Sep 30 2018 00:04
i was learning DOM and some JS objects models at TreeHouse. @thekholm80 @bjorno43 plus jquery, what do you folks think about jquery?
jsjoe82
@jsjoe82
Sep 30 2018 00:04
I think it's pretty. Not going to lie
Kyle Holm
@thekholm80
Sep 30 2018 00:05
react and jquery aren't friends, i've chosen my side
jsjoe82
@jsjoe82
Sep 30 2018 00:05
lol are they not? I've not gotten that far. I will likely go the route of react soon enough.
Kyle Holm
@thekholm80
Sep 30 2018 00:05
react wants to be the only one to manipulate the DOM, so jquery gets in the way
Karma Drukpa
@coderkarma
Sep 30 2018 00:06
Jquery doesn't seem complicated. I like the way we can do stuff with jQuery, calling those functions
jsjoe82
@jsjoe82
Sep 30 2018 00:06
Ah, react is a jealous one, eh?
Kyle Holm
@thekholm80
Sep 30 2018 00:06
yep
@coderkarma jquery simplifies a lot of things, it's very useful
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:07
You guys are evil..
jsjoe82
@jsjoe82
Sep 30 2018 00:07
lol
Karma Drukpa
@coderkarma
Sep 30 2018 00:07
@bjorno43 why?
jsjoe82
@jsjoe82
Sep 30 2018 00:07
Because scooters and raids
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:07
@coderkarma You'd have to read back if you want to understand that :joy:
jsjoe82
@jsjoe82
Sep 30 2018 00:07
lol
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:09
As I once said, @thekholm80 's perfect PHP code would be:
<?php

die();

?>
jsjoe82
@jsjoe82
Sep 30 2018 00:09
lol
Kyle Holm
@thekholm80
Sep 30 2018 00:09
why you want me dead, bob?
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:09
Not you, lol
Kyle Holm
@thekholm80
Sep 30 2018 00:09
been drinking that haterade
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:09
It would be the death of PHP in that context, ghehe
die() in PHP litterly means "kill the PHP script"
Karma Drukpa
@coderkarma
Sep 30 2018 00:10
@bjorno43 @thekholm80 out of topic, but I felt like i was going to pass out last night
it was very scary
Kyle Holm
@thekholm80
Sep 30 2018 00:11
did you drink too much?
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:11
I think you should ask a doctor about that, not us :P
Karma Drukpa
@coderkarma
Sep 30 2018 00:11
lol!! no
@thekholm80 @bjorno43 I did.
have you guys ever felt like passing out sometime?
Kyle Holm
@thekholm80
Sep 30 2018 00:12
not usually
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:12
I've got diabetes type 1. Passing out is part of my life, lol
Kyle Holm
@thekholm80
Sep 30 2018 00:12
bob needs a snickers
Karma Drukpa
@coderkarma
Sep 30 2018 00:12
@thekholm80 hahahaha
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:12
Nah. It's always "controlled passing out"
Kyle Holm
@thekholm80
Sep 30 2018 00:13
i shouldn't joke about diabetes
i'll probably have type 2 some day
Karma Drukpa
@coderkarma
Sep 30 2018 00:13
I don't know what type1 or type2 is ?
Kyle Holm
@thekholm80
Sep 30 2018 00:14
type 2 is what fat people who don't exercise get
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:14
I never actually passed out unless I allowed it to happen. Basicly when my bloodsugar is dangerously high, I inject the insuline I need and warn some ppl about it. Should I not contact them in 2 hours, call an ambulance. After that I set the alarm clock and pass out
Kyle Holm
@thekholm80
Sep 30 2018 00:14
type 1 people are generally born with it
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:15
Not exactly true, but close, ye
Kyle Holm
@thekholm80
Sep 30 2018 00:15
well, it's not caused by your lifestyle anyway
Karma Drukpa
@coderkarma
Sep 30 2018 00:15
@thekholm80 oh!!
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:16
Type 1 is where the immune system attacks the cells that produce insulin
Type 2 is where you either don't produce enough insulin or the insulin isn't effective enough
Karma Drukpa
@coderkarma
Sep 30 2018 00:16
@thekholm80 @thekholm80 one thing I realized when i felt like passing out. Our life is very uncertain, it does not matter whether you're young or old. we could die any time.
Kyle Holm
@thekholm80
Sep 30 2018 00:17
not me. i made a deal
Karma Drukpa
@coderkarma
Sep 30 2018 00:17
?
Kyle Holm
@thekholm80
Sep 30 2018 00:18
joking Karma
Karma Drukpa
@coderkarma
Sep 30 2018 00:18
okay.
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:19
Death is part of life. We all have to face it at some point. Worrying about it isn't going to help. Just enjoy your life every day
On the bright side: Your brains release some kind of drug when your time has come which appearently makes it quite pleasent
Karma Drukpa
@coderkarma
Sep 30 2018 00:22
@bjorno43 True. I did checked and doctor told me it is because of anxiety and stress. EKG was normal and other things were good to. but i was so scared when i felt that .
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:24
So just leave it at that. Believe me, you don't want to worrie about it too much. That can result in something far more unpleasent called hypochondria
Karma Drukpa
@coderkarma
Sep 30 2018 00:25
oh wow!! that is scary.
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:26
It is. I've been through it. I wouldn't wish that upon my worst enemies
Karma Drukpa
@coderkarma
Sep 30 2018 00:30
I didn't know what that mean until I had to lookup. You been through it. How did you able to overcome from that? worrying less?
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:32
No. I was given meds that unfortunetely didn't work for about 9 months. Then (despite my fears) I went on vacation to Greece. As crazy as it sounds, the moment I set foot out of the plane all my fears were gone and never came back. It really made no sense but ye, it happened
Karma Drukpa
@coderkarma
Sep 30 2018 00:36
woah!! that's quite strange way of getting rid of . but Happy that you able to do it. and thanks for sharing.
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:36
But ye, it was a terrible period of my life. Living every day in constant fear that you're about to die, even though you know it makes no sense. You simply have no control over it. Your body reacts to your fears and creates symptomes that aren't really there. It's really scary is hell
Karma Drukpa
@coderkarma
Sep 30 2018 00:37
yeah, @bjorno43 honestly i felt kinda same when i felt i was going to pass out. so weird feeling. But everything is normal now. thank god.
Bjorn van de Peut
@bjorno43
Sep 30 2018 00:39
Luckily most causes of "passing out" are pretty harmless :)
For some reason it doesn't seem to happen to me, no matter the situation. Unless I allow it to happen
I've been in situations where even doctors didn't understand why I was still awake and alert. Like losing over 2 liters of blood or having a bloodsugar level near 0
I can however, because of that, confirm that when your bloodsugar is that low, you'll see quite a beautiful light show :joy:
petrockwd
@petrockwd
Sep 30 2018 00:58
Hey guys...I know I haven't really commented on what you've been talking about, but I've been reading. It's nice to know there are other people out there going through hard times (i.e. that can related)
I myself am going through a difficult time...I'm an RNFA who got into narcotics. Lost everything -> Wife, family, friends, job, career, house, etc.
I'm a year clean now and recently I was sentenced to house arrest. I've been learning web design to keep myself busy and (hopefully) teach myself a new skill and career
I'm sorry to hear about your conditions, but I'm glad you're both doing well.
Bjorn van de Peut
@bjorno43
Sep 30 2018 01:07
@petrockwd Well done on getting clean. I've never been through an addiction like that, but I can imagine it's hard. May I ask why you got house arrest?
petrockwd
@petrockwd
Sep 30 2018 01:08
I stole narcotics from my place of employment
Kyle Holm
@thekholm80
Sep 30 2018 01:08
@petrockwd the good thing about getting clean is you only have to do it once
petrockwd
@petrockwd
Sep 30 2018 01:09
Last year has been the hardest in my life. But I've finally found something to be hopeful for -> a new career.
Bjorn van de Peut
@bjorno43
Sep 30 2018 01:09
Ah, that explains it. Well you can be proud of yourself for doing your best to pick up your life again :)
petrockwd
@petrockwd
Sep 30 2018 01:18
Thanks man :-)
Surgery to Coding...big difference but interesting journey nonetheless
Kyle Holm
@thekholm80
Sep 30 2018 01:18
lots less blood in coding
if you do it right
petrockwd
@petrockwd
Sep 30 2018 01:18
@thekholm80 lol
Bjorn van de Peut
@bjorno43
Sep 30 2018 01:18
Are you sure about that? :joy:
I've shared my fair share of blood over a missing ; :joy:
petrockwd
@petrockwd
Sep 30 2018 01:19
lmao
Kyle Holm
@thekholm80
Sep 30 2018 01:19
oh i thought you were going to fess up to all the sacrifices you've had to make to PHP gods
Bjorn van de Peut
@bjorno43
Sep 30 2018 01:19
Especially back in the days were we didn't have those nice IDE's to help us out :P
petrockwd
@petrockwd
Sep 30 2018 01:20
Are you guys all working in web dev?
Kyle Holm
@thekholm80
Sep 30 2018 01:20
not me
petrockwd
@petrockwd
Sep 30 2018 01:20
@thekholm80 Just a hobby?
Kyle Holm
@thekholm80
Sep 30 2018 01:20
for the most part
Bjorn van de Peut
@bjorno43
Sep 30 2018 01:20
Currently not, but ye I've worked in it. Though usually I end up in the position of "All round ICT specialist" in the companies I work for, lol
Kyle Holm
@thekholm80
Sep 30 2018 01:20
and it's nice to know it's there if i need a fallback
Stephen James
@sjames1958gm
Sep 30 2018 01:21
I work in dev, not web dev
petrockwd
@petrockwd
Sep 30 2018 01:21
Is getting a job in front end difficult
?
Bjorn van de Peut
@bjorno43
Sep 30 2018 01:22
Though best company I worked for was the one where the manager gave me an "unlimited" creditcard to get the entire company updated and with best software available
petrockwd
@petrockwd
Sep 30 2018 01:22
@bjorno43 Hardware and software
?
Bjorn van de Peut
@bjorno43
Sep 30 2018 01:22
Yups
petrockwd
@petrockwd
Sep 30 2018 01:22
Ooooooo....what'd you get?
Kyle Holm
@thekholm80
Sep 30 2018 01:23
apple 2Es
petrockwd
@petrockwd
Sep 30 2018 01:24
@thekholm80 googling...
Bjorn van de Peut
@bjorno43
Sep 30 2018 01:24
Pff, a LOT. Many, many new machines, Photoshop licenses, several other software. It was costly, but damn, it was nice when I was finished there
Also had to develop a new intranet CRM system for them. They had it evaluated and it was estimated 65.000 euro worth, lol
Too bad I didn't see any of that money myself. Just a laptop as a present xD
petrockwd
@petrockwd
Sep 30 2018 01:27
In JS, when is it best to use " vs. ' ?
Kyle Holm
@thekholm80
Sep 30 2018 01:28
i almost always use single quotes
it's largely preference
petrockwd
@petrockwd
Sep 30 2018 01:32
Okie dokie just wondering
are there any cases where they aren't interchangeable?
Bjorn van de Peut
@bjorno43
Sep 30 2018 01:33
In some languages it actually makes a huge difference
Everything inside single quotes is taken as a litteral string. While stuff between double quotes can be variables
I know Kyle doesn't like PHP, but take this example:
<?php

$var = "Hello";

echo "$var"; //Hello
echo '$var'; //$var

?>
petrockwd
@petrockwd
Sep 30 2018 01:37
I getcha...but in JS is this the case?
Bjorn van de Peut
@bjorno43
Sep 30 2018 01:40
In JS it makes no difference. It's just what you prefer. But for consistency it's best to stick to either of em. They are interchangeable, but it makes your code look bad
And of course keep what I said in mind for future reference. I highly doubt you'll be sticking to JS forever and as you see, in other languages it does make a difference
Bjorn van de Peut
@bjorno43
Sep 30 2018 01:46
Oh on a side note: If you're working with JSON, it does make a difference. Strictly speaking, JSON strings must be double quoted. Most libraries support single quoted JSON, but some don't.
petrockwd
@petrockwd
Sep 30 2018 02:03
@bjorno43 ++
thanks man :-)
Bjorn van de Peut
@bjorno43
Sep 30 2018 02:13
@petrockwd No problem :)
glitz20
@glitz20
Sep 30 2018 02:39
anybody who knows how to implement javascript in html?
Ai rui 艾瑞
@aisolae
Sep 30 2018 02:40
i am doing a small project and quit urgent that i don’t want to put much stress in it, wish frontend tech will you guys recommend?
Bjorn van de Peut
@bjorno43
Sep 30 2018 02:48
@sabin20 Gonna need a bit more context to be able to answer that. What do you want to do?
@aisolae Same goes for you. Need more context about what it is you want to do to give an answer to that.
Ai rui 艾瑞
@aisolae
Sep 30 2018 02:49
i am buiding a ecomerce site
Bjorn van de Peut
@bjorno43
Sep 30 2018 02:50
@aisolae You want to make an ecommerce website with pure front-end? That's gonna be pretty hard..
Anyway, technically it's possible. All you would need is HTML, CSS and Javascript. Depending on how complicated your project is going to be, it'll be quite heavy on the JS part though
Ai rui 艾瑞
@aisolae
Sep 30 2018 02:53
i will do the backend, i am learning backend at the moment
i was going to do frontend on pure js and backend on nodejs
and express
Bjorn van de Peut
@bjorno43
Sep 30 2018 02:54
That's probably the best way to go. If you know JS and are comfortable with it, NodeJS is the most logical next step for backend
glitz20
@glitz20
Sep 30 2018 02:54
@bjorno43 I am trying to implement the following js in my html
Ai rui 艾瑞
@aisolae
Sep 30 2018 02:54
but thought on using a frontend library/framework so it’s been hard deciding on which is better but need one which won’t cost much of my time and it will be easy for other developers to manage later
Nodes won’t be a problem i guess
Bjorn van de Peut
@bjorno43
Sep 30 2018 02:55
@aisolae In that case you're most likely looking for React or jQuery
Ai rui 艾瑞
@aisolae
Sep 30 2018 02:56
speaking of the demon, i love jquery but don’t get why people dumb that guy for react, vue and angular
how about vue, heard it’s learning curve isn’t horrible
Bjorn van de Peut
@bjorno43
Sep 30 2018 03:00
@sabin20 Basicly you have to do this:
<!DOCTYPE HTML>
<html>
    <head>
        <meta charset='utf-8'>

        <style>
        /* Your CSS goes here */
        </style>

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
        <script type="text/javascript">
        $(document).ready(function(){
            /* Your JS goes here */
        });
        </script>
    </head>
    <body>

    <!-- Your HTML goes here -->

    </body>
</html>
glitz20
@glitz20
Sep 30 2018 03:01
@bjorno43 I have seperate .js file
I have imported like this
Bjorn van de Peut
@bjorno43
Sep 30 2018 03:02
@sabin20 In that case it's the same as that jQuery link:
<script src="your_js_file.js"></script>
glitz20
@glitz20
Sep 30 2018 03:02
 </body>

    <script src="bgcolor.js"></script>

</html>
but I donot know why it is not working
Bjorn van de Peut
@bjorno43
Sep 30 2018 03:02
Did you include jQuery?
And you also need the $(document).ready(function(){ }); part
glitz20
@glitz20
Sep 30 2018 03:04
yeah I did include jquery
@bjorno43 even if I am importing?
Bjorn van de Peut
@bjorno43
Sep 30 2018 03:05
@aisolae Honestly, I have no idea why ppl hate jQuery either. I think it's more a hype-train. I have no idea about those other libraries to be honest. Never used them myself
glitz20
@glitz20
Sep 30 2018 03:05
$(window).scroll(function() {

  // selectors
  var $window = $(window),
      $body = $('body'),
      $panel = $('.panel');

  // Change 33% earlier than scroll position so colour is there when you arrive.
  var scroll = $window.scrollTop() + ($window.height() / 3);

  $panel.each(function () {
    var $this = $(this);

    // if position is within range of this panel.
    // So position of (position of top of div <= scroll position) && (position of bottom of div > scroll position).
    // Remember we set the scroll to 33% earlier in scroll var.
    if ($this.position().top <= scroll && $this.position().top + $this.height() > scroll) {

      // Remove all classes on body with color-
      $body.removeClass(function (index, css) {
        return (css.match (/(^|\s)color-\S+/g) || []).join(' ');
      });

      // Add class of currently active div
      $body.addClass('color-' + $(this).data('color'));
    }
  });    

}).scroll();
this is the js function to change the bg
Bjorn van de Peut
@bjorno43
Sep 30 2018 03:06
@sabin20 Well, normally you shouldn't if you're including the JS file at the end of your body element. But if you're not, then $body = $('body') etc will return an error because they don't exist untill the body is fully loaded
It's usually best to open your website with the console open (press F12 in your browser). It might return you an error that will tell you what's going on
Oh wait.. I think I see an issue
Your code should be:
 <script src="bgcolor.js"></script>
 </body>

</html>
glitz20
@glitz20
Sep 30 2018 03:13
But there is no any change
Bjorn van de Peut
@bjorno43
Sep 30 2018 03:14
Does the console return you any error?
glitz20
@glitz20
Sep 30 2018 03:14
no there is no any error in cosole
the js is working here though
Bjorn van de Peut
@bjorno43
Sep 30 2018 03:19
Ye I'm checking it here locally, give me a couple of mins
@sabin20 Must be something in your code that you're doing wrong. It works perfectly fine here
Bjorn van de Peut
@bjorno43
Sep 30 2018 03:25
This is the code I'm using:
<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8">

        <link rel="stylesheet" type="text/css" href="style.css">

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
    </head>
    <body>

        <!-- Your HTML -->
        <script src="bgcolor.js"></script>
    </body>
</html>
glitz20
@glitz20
Sep 30 2018 03:59
thanks @bjorno43
do you know how can we use jquery plugin in html?
Karma Drukpa
@coderkarma
Sep 30 2018 04:00
@sabin20 use cnd version of jquery in script tag
before your main js file
glitz20
@glitz20
Sep 30 2018 04:01
I am planning to use this jquery plugin
Karma Drukpa
@coderkarma
Sep 30 2018 04:04
I think you could use in script tag before your main js file
but i am not 100% sure.
since i believe that those plugin will load first before your main js file get executed .
Aditi
@aditilamkhede
Sep 30 2018 07:02
Hi
Henry
@GitHub-Henry
Sep 30 2018 07:07
hi
Rasmus Ørum Bruus
@Plimsol
Sep 30 2018 07:23
Hi all
Daniel Simeonov
@dbsimeonov
Sep 30 2018 09:15
hey guys anyone know how I can do something like router-link... :to="{name/${item.id}}" on Vue ?
seems like I can not get the syntax right
Johnny
@JohnnyBizzel
Sep 30 2018 09:23

@dbsimeonov

import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/components/Main'
import Register from '@/components/Register'
import Profile from '@/components/Profile'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Main',
      component: Main
    },
    {
      path: '/register',
      name: 'Register',
      component: Register
    },
    {
      path: '/profile',
      name: 'Profile',
      component: Profile
    }
  ]
})

This is my router file

Then in the navigation
          <ul class="right hide-on-med-and-down">
            <li><a class="modal-trigger" href="#modal1">Login</a></li>
            <li><router-link to="/register">Register</router-link></li>
            <li><router-link to="/profile">Profile</router-link></li>
          </ul>
Daniel Simeonov
@dbsimeonov
Sep 30 2018 09:25
I get that, I just need a static link like /profile + item.id from the v-if. Not sure how to explain it
Johnny
@JohnnyBizzel
Sep 30 2018 09:27
Did you try using back ticks here:to="{name/${item.id}}"
Daniel Simeonov
@dbsimeonov
Sep 30 2018 09:28
Tried it.. breaks for some reason everything without returning error
Daniel Simeonov
@dbsimeonov
Sep 30 2018 09:33
It might work, but I'm passing it as props to the parent component and returns an error :D
Johnny
@JohnnyBizzel
Sep 30 2018 09:33
Johnny
@JohnnyBizzel
Sep 30 2018 09:45
Does anyone know much about Create React App? Why does it not use babel to transpile JSX?
Aditya
@ezioda004
Sep 30 2018 09:47
It does use babel
Johnny
@JohnnyBizzel
Sep 30 2018 09:56
@ezioda004 I didn't find a reference in the package json files.
Does the worker process do it?
Aditya
@ezioda004
Sep 30 2018 09:59
Because webpack and babel config is hidden, you'd have to eject: npm run eject
Johnny
@JohnnyBizzel
Sep 30 2018 10:00
What does that do?
Aditya
@ezioda004
Sep 30 2018 10:01
Basically show you the config files that you can modify
Aditya
@ezioda004
Sep 30 2018 10:01
But its one way only, kinda like breaking the void
Johnny
@JohnnyBizzel
Sep 30 2018 10:12
All I see in the start script is react-scripts start
So how it gets transpiled is a mystery
:confounded:
Black box coding
Aditya
@ezioda004
Sep 30 2018 10:19
Why do you want to see? Unless you want to add your own preset
Johnny
@JohnnyBizzel
Sep 30 2018 10:21
@ezioda004 Cut a long story short. Some friends set up the project using front end and backend via Create react app. Fine, it works locally for them.
I prefer to work in the cloud so I was trying to get the thing working on glitch or c9
Just can't get React to work but then each folder has separate package json files
One runs the backend server, the other runs React.
I personally hate this set up although every project seems to use this
I get the separation of concerns and all that but for me it makes the thing harder to deploy
So there
Aditya
@ezioda004
Sep 30 2018 10:25
Might need to set up a proxy from frontend to backend server (since you'll be running 2 servers)
For deploying yeah, you'd have to get the build npm run build and serve that from the backend
Johnny
@JohnnyBizzel
Sep 30 2018 10:25
I prefer more customization options so I've never used Create react app
Aditya
@ezioda004
Sep 30 2018 10:26
They've abstracted that away because people mess up webpack config
Johnny
@JohnnyBizzel
Sep 30 2018 10:26
Yes the proxy is set up but React doesnt work - presumably because you need react-scripts somewhere
Aditya
@ezioda004
Sep 30 2018 10:29
Doesnt work as in? this is how I've done in the past, separate package.json file for server and client and setup a proxy in the client's package.json
Fairly straightforward
Johnny
@JohnnyBizzel
Sep 30 2018 10:31
I have exactly the same set up but react doesnt load
The last change I tried was to change "start": "concurrently \"node server.js\" \"react-scripts start\"", to use concurrently
Aditya
@ezioda004
Sep 30 2018 10:36
Does it work locally?
Johnny
@JohnnyBizzel
Sep 30 2018 10:39
I did not try but I think so for the others
Got to go now. Thanks for your help @ezioda004 :)
Aditya
@ezioda004
Sep 30 2018 10:41
@JohnnyBizzel I think its because const port = process.env.PORT || 5000;, so glitch uses whatever PORT is and proxy is hardcoded (in React's package to 5000), see ya
Johnny
@JohnnyBizzel
Sep 30 2018 10:41
Ah ok. Good spot
Mohammed Boudad
@matrixersp
Sep 30 2018 11:05
Which version of Bootstrap is used in FCC challenges?
Aditya
@ezioda004
Sep 30 2018 11:07
@matrixersp I think BS4
Mohammed Boudad
@matrixersp
Sep 30 2018 11:15
@ezioda004 The challenge I'm in now uses col-xs-* which is removed in BS4 so I think it's BS3
Aditya
@ezioda004
Sep 30 2018 11:19
No, its not removed
Mohammed Boudad
@matrixersp
Sep 30 2018 11:21
It's replace by col-*?
Aditya
@ezioda004
Sep 30 2018 11:27
Oh I see, yeah they're using BS3
Rishabh Singh
@IAmRC1
Sep 30 2018 11:39
Hey anyone here kind enough to pair program with me on pomodoro clock, fcc project on codepen? I have been stuck on it for weeks.
May Kittens Devour Your Soul
@diomed
Sep 30 2018 17:33
BS that's getting bigger every year or so... hue hue hue
Who knows how to do it?
Can anyone help me?
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:24
@qihuanlu01 seems to be in chinese :smile:
MicroLin
@qihuanlu01
Sep 30 2018 21:25
是的
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:25
noup, no idea
MicroLin
@qihuanlu01
Sep 30 2018 21:25
image.png
where i am wrong?
psyperl
@psyperl
Sep 30 2018 21:28
line 5
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:29
lol I forgot all my jQuery
psyperl
@psyperl
Sep 30 2018 21:29
Add the animated class to all elements with type button.
Add the shake class to all the buttons with class .btn.
Add the btn-primary class to the button with id #target1.
MicroLin
@qihuanlu01
Sep 30 2018 21:31
What is the correct answer?
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:33
well, I just did this and it works
  $(document).ready(function() {
    $('button').addClass('animated')
    $('.btn').addClass('shake')
    $('#target1').addClass('btn-primary')
  });
since you already added the other classes to #target1 before, you shouldn't add them again
no idea why, but the test now pass :smirk:
@qihuanlu01
psyperl
@psyperl
Sep 30 2018 21:36
/// this adds 3 classes at a time.. which is incorrect
$('#target1').addClass('animated shake btn-primary')
You should only be targeting one element and adding only one class at a time.
MicroLin
@qihuanlu01
Sep 30 2018 21:36
yes ,but i dont know why
thank you
psyperl
@psyperl
Sep 30 2018 21:39
:thumbsup:
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:40
you can add three classes at the time i think
MicroLin
@qihuanlu01
Sep 30 2018 21:40
I already know the reason.
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:40
but it just doesn't pass the challenge
MicroLin
@qihuanlu01
Sep 30 2018 21:41
Can you read Chinese?
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:41

From the docs

More than one class may be added at a time, separated by a space, to the set of matched elements, like so:

$( "p" ).addClass( "myClass yourClass" );
MicroLin
@qihuanlu01
Sep 30 2018 21:41
I am not very good at English.
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:41
@qihuanlu01 no, but google is myu best friend
我不懂中文,但我是谷歌粉丝
MicroLin
@qihuanlu01
Sep 30 2018 21:42
@kamatheuska 说的是原因
我多次第5行错了
我多次添加了class ,第5行错了
第5行$("button").removeClass("btn-default");就行,不需要添加其他的class,
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:44
你不必添加比练习要求更多的课程。 您已经在之前的行中添加了类。 检查一下,了解您的代码是学习的一部分
MicroLin
@qihuanlu01
Sep 30 2018 21:45
还是非常感谢你 Thanks
Karma Drukpa
@coderkarma
Sep 30 2018 21:45
@kamatheuska you can write chinese as well. wow... I wish i could know how to write in chinese
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:46
psyperl
@psyperl
Sep 30 2018 21:46
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:46
lol
@psyperl haha
Karma Drukpa
@coderkarma
Sep 30 2018 21:46
oh okay
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:46
still, i do speak french and german :D
Karma Drukpa
@coderkarma
Sep 30 2018 21:46
i was like what ? how can these guys are so fluent writing in chinese .
lol
MicroLin
@qihuanlu01
Sep 30 2018 21:46
image.png
Karma Drukpa
@coderkarma
Sep 30 2018 21:48
मेरो नाम कर्म हो
MicroLin
@qihuanlu01
Sep 30 2018 21:48
中文其实非常简单,和英语应该差不多的
Karma Drukpa
@coderkarma
Sep 30 2018 21:48
WOW!! This is so helpful
MicroLin
@qihuanlu01
Sep 30 2018 21:48
中文字也没有你想想的那么难写
学写汉字第一步就是学会横竖撇捺等基本汉字组成部分
就和你们的abc一样
Karma Drukpa
@coderkarma
Sep 30 2018 21:49
真正
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:49
और मेरा नाम निकोलस बुद्धिमान है, आपसे मिलकर अच्छा लगा
Karma Drukpa
@coderkarma
Sep 30 2018 21:49
hahahhahaa
MicroLin
@qihuanlu01
Sep 30 2018 21:49
一 丨丿
Karma Drukpa
@coderkarma
Sep 30 2018 21:49
that's hindi indian language
not nepali
but it's same
kinda same
Nicolas Ramirez
@kamatheuska
Sep 30 2018 21:50
google says it is 'hindu'
Karma Drukpa
@coderkarma
Sep 30 2018 21:50
hahahahah
MicroLin
@qihuanlu01
Sep 30 2018 21:52
image.png
所有的汉字都是这几个部首组成的,才8个,比英语字母还少
你如果想流利写汉字就把这几个部首练好,你也能写的非常流利