These are chat archives for FreeCodeCamp/Help

3rd
Oct 2018
Kranti Nebhwani
@darkphotonKN
Oct 03 2018 04:10

does anyone know how to animate a div disappearing after you've animated it to appear. e.g. right now I have:

        .services-container 
            display: none
            margin-top: 50px
            text-align: center

            .services-container.active 
                animation: slide-out 600ms ease-in-out forwards 
                display: block
                transition: 300ms ease-in

Where .services-container is the class of the div that expands when I click a button, as I add the class .active to it on the button click. As you can see the.active adds an animation which I defined as a keyframes I define later on in the sass file. The keyframes simply transform: translateY() to increase the div height.
The problem then comes when I want to have it slide back as in remove the class (or maybe its done in another way let me know) and have another animation make the div the original size again. Right now the increase in height from the first animation simply disappears.

Anand Potukuchi
@anandpotukchi
Oct 03 2018 06:40
hi
I'm having trouble with this challenge
my code :
const REQUESTING_DATA = 'REQUESTING_DATA'
const RECEIVED_DATA = 'RECEIVED_DATA'

const requestingData = () => { return {type: REQUESTING_DATA} }
const receivedData = (data) => { return {type: RECEIVED_DATA, users: data.users} }

const handleAsync = () => {
  return function(dispatch) {
    // dispatch request action here
store.dispatch({type: ADD});
    setTimeout(function() {
      let data = {
        users: ['Jeff', 'William', 'Alice']
      }
      // dispatch received data action here
store.dispatch(receivedData(data));
    }, 2500);
  }
};

const defaultState = {
  fetching: false,
  users: []
};

const asyncDataReducer = (state = defaultState, action) => {
  switch(action.type) {
    case REQUESTING_DATA:
      return {
        fetching: true,
        users: []
      }
    case RECEIVED_DATA:
      return {
        fetching: false,
        users: action.users
      }
    default:
      return state;
  }
};

const store = Redux.createStore(
  asyncDataReducer,
  Redux.applyMiddleware(ReduxThunk.default)
);
@ezioda004
you there/
?
Aditya
@ezioda004
Oct 03 2018 06:45

@anandpotukchi

Dispatch requestingData() before the setTimeout()

dispatch(requestingData())should do it
Anand Potukuchi
@anandpotukchi
Oct 03 2018 06:47
thanks
May Kittens Devour Your Soul
@diomed
Oct 03 2018 08:39
@ezioda004 u here?
Aditya
@ezioda004
Oct 03 2018 08:40
@diomed :cat:
Nicolas Ramirez
@kamatheuska
Oct 03 2018 08:44
@ezioda004 hey man, just checked your portafolio...I know the meaning of envy now. It is amazing!
you designed by yourself? :O
Aditya
@ezioda004
Oct 03 2018 08:51
@kamatheuska Thanks and yes, around 2 weeks of researching and iterating over designs, not super fond of CSS but I do like designing my own stuff :D
May Kittens Devour Your Soul
@diomed
Oct 03 2018 08:52
@ezioda004 design my own stuff :smiling_imp:
@ezioda004 did you ever use some static content generator?
Nicolas Ramirez
@kamatheuska
Oct 03 2018 08:57
@ezioda004 I remember doing a project to have that machine typing style effect with javascript, ages ago
May Kittens Devour Your Soul
@diomed
Oct 03 2018 08:58
@kamatheuska oh you're my vue mento! hello =)
Nicolas Ramirez
@kamatheuska
Oct 03 2018 09:00
@diomed hehe miau
tomorrow I am meeting a designer I met in a meetup, I am thinking how to convince her to help me with the design of my page lol
Aditya
@ezioda004
Oct 03 2018 09:02
@diomed I have not yet
Niraj Nandish
@Nirajn2311
Oct 03 2018 11:55
Is anyone online
I need help with git
Nicolas Ramirez
@kamatheuska
Oct 03 2018 11:56
here
what do you need
?
Niraj Nandish
@Nirajn2311
Oct 03 2018 11:57
In the main FCC repo
I have the master branch locally
but i just can't seem to remember the commands to get the "next" branch
Nicolas Ramirez
@kamatheuska
Oct 03 2018 11:59
git checkout next, I would say
do git status before
Niraj Nandish
@Nirajn2311
Oct 03 2018 11:59
when you clone, it clones the default branch(which is master)
Nicolas Ramirez
@kamatheuska
Oct 03 2018 12:01
I am cloning it, let me check
yep, it works
@Nirajn2311 you can do git branch -a to list all the branches
then you can just checkout the next branch git checkout next
Niraj Nandish
@Nirajn2311
Oct 03 2018 12:06
Every time I do checkout to next it says pathspec error
So should i checkout to upstream/next
Nicolas Ramirez
@kamatheuska
Oct 03 2018 12:08
copy and paste the error
here
please

maybe one of the solutions there works for you, something like git fetch:

For further clarification, git fetch is useful when you need to synchronize your local repository with the remote repository, but you don't want to merge the changes into your working folder.

May Kittens Devour Your Soul
@diomed
Oct 03 2018 12:19
@Nirajn2311 just ask me what date it is
Niraj Nandish
@Nirajn2311
Oct 03 2018 12:29
@diomed What date is it?
May Kittens Devour Your Soul
@diomed
Oct 03 2018 12:30
October 3rd
Niraj Nandish
@Nirajn2311
Oct 03 2018 12:35
@kamatheuska solved it the remote and upstream next were clashing
@diomed 😊😊
May Kittens Devour Your Soul
@diomed
Oct 03 2018 12:37
it's official Mean Girls day
Aditya
@ezioda004
Oct 03 2018 12:37
I thought that was every day
psyperl
@psyperl
Oct 03 2018 12:39
no every day is a standard deviation girls day
Aditya
@ezioda004
Oct 03 2018 12:40
Thats enough data science for a day
May Kittens Devour Your Soul
@diomed
Oct 03 2018 12:41
@ezioda004 I hope you're wearing pink today
Aditya
@ezioda004
Oct 03 2018 12:41
@diomed Its called "salmon" color
const INCREMENT = null; // define a constant for increment action types
const DECREMENT = null; // define a constant for decrement action types

const counterReducer = (state=defaultState,action) => {
    switch (action.type) {
        case INCREMENT:
            return {counter:state.counter+1};
        case DECREMENT:
            return {counter:state.counter-1};
        default:
            return state;
    }
}; 
 // define the counter reducer which will increment or decrement the state based on the action it receives

const incAction = () => {
   return {
       type: INCREMENT
   } 
};  // define an action creator for incrementing

const decAction = () => {
   return {
       type: DECREMENT
   } 
};  // define an action creator for decrementing

const store = Redux.createStore(counterReducer); // define the Redux store here, passing in your reducers`
what's wrong
Anand Potukuchi
@anandpotukchi
Oct 03 2018 12:52
@ezioda004
any ideas
Aditya
@ezioda004
Oct 03 2018 12:57
@anandpotukchi First, you need to define the type of actions. Initialize const INCREMENT as const INCREMENT = "inc" or something

The Redux store should initialize with a state of 0.

So initialize the state with 0, in the reducer do state = 0

Not sure what you're returning from reducer, {counter:state.counter+1}; where is this object coming from?
Anand Potukuchi
@anandpotukchi
Oct 03 2018 13:37
i'm trying to increment and decrement
Aditya
@ezioda004
Oct 03 2018 13:41
I dont see any defaultState object
Anand Potukuchi
@anandpotukchi
Oct 03 2018 13:41
made a few changes
const INCREMENT = 'INCREMENT'; // define a constant for increment action types
const DECREMENT = 'DECREMENT'; // define a constant for decrement action types

const counterReducer = (state=0,action) => {
    switch (action.type) {
        case INCREMENT:
            return {counter = counter+1};
        case DECREMENT:
            return {counter = counter-1};
        default:
            return defaultState;
    }
}; 
 // define the counter reducer which will increment or decrement the state based on the action it receives

const incAction = () => {
   return {
       type: INCREMENT
   } 
};  // define an action creator for incrementing

const decAction = () => {
   return {
       type: DECREMENT
   } 
};  // define an action creator for decrementing

const store = Redux.createStore(counterReducer); // define the Redux store here, passing in your reducers`
what do you think of this
Aditya
@ezioda004
Oct 03 2018 13:46
@anandpotukchi Again, I dont see any defaultStatein your code so no idea what you're referring to. state=0 means state is 0, so to increment I'd just do return state+=1; and likewise for decrement, and for default I'd just return state
Anand Potukuchi
@anandpotukchi
Oct 03 2018 13:46
well
yup
i shpuld'nt working on this now
Anand Potukuchi
@anandpotukchi
Oct 03 2018 16:42
*shouldn't be working
Johnny
@JohnnyBizzel
Oct 03 2018 16:43
Christopher McCormack
@cmccormack
Oct 03 2018 17:10
@JohnnyBizzel that is cool! Pretty intuitive as well
Johnny
@JohnnyBizzel
Oct 03 2018 17:13
@cmccormack Found after reading this and investigating three.js https://blog.bitsrc.io/11-javascript-animation-libraries-for-2018-9d7ac93a2c59
Christopher McCormack
@cmccormack
Oct 03 2018 17:15
it's super smooth I'll have to check it out
I wonder what Google will use for Project Stream
Aditya
@ezioda004
Oct 03 2018 17:18
@cmccormack I was looking at it today, as I understood they're streaming content right? No webassembly used?
Christopher McCormack
@cmccormack
Oct 03 2018 17:21
beats me
haven't had time to dig in, only register :)
Aditya
@ezioda004
Oct 03 2018 17:22
Lucky you, its only for US people FeelsBadMan
Christopher McCormack
@cmccormack
Oct 03 2018 17:23
not like I need more games haha
but I'll let you know how it is if I get in :)
Aditya
@ezioda004
Oct 03 2018 17:24
Definitely, It could every well be a game changer
Christopher McCormack
@cmccormack
Oct 03 2018 17:31
get to use this twice this morning!
Ba Dum Tss - Imgur.gif
Johnny
@JohnnyBizzel
Oct 03 2018 17:34
:joy:
Kyle Holm
@thekholm80
Oct 03 2018 17:41
@cmccormack i like that gif
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:02
hello people! recommendations for php courses?
Christopher McCormack
@cmccormack
Oct 03 2018 18:08
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:16
I actually completed that course :)
worth mentioning, it is about nodejs, not php. I am looking for a php course now
@cmccormack
Aditya
@ezioda004
Oct 03 2018 18:18
/r/woosh
Kyle @thekholm80 might know a course or two for PHP
Christopher McCormack
@cmccormack
Oct 03 2018 18:19
@kamatheuska I know that's why the :D
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:20
you mean :V :V
Kyle Holm
@thekholm80
Oct 03 2018 18:20
this seems promising @ezioda004
Christopher McCormack
@cmccormack
Oct 03 2018 18:20
lol
Aditya
@ezioda004
Oct 03 2018 18:20
I recommend that aswell
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:20
@ezioda004 never understood the whole woosh thing
:smile:
Kyle Holm
@thekholm80
Oct 03 2018 18:21
aww yiss, the rare double woosh
woosh squared
Aditya
@ezioda004
Oct 03 2018 18:21
@kamatheuska Dont mind, its me being dum dum
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:24
dum dum? woosh woosh? please free me from my high level of nerdly ignorance :smile:
I have seen that a few times already haha
Eric Weiss
@eweiss17
Oct 03 2018 18:34
@kamatheuska do you already know another language? an object oriented language?
Ariel
@ArielLeslie
Oct 03 2018 18:36
@kamatheuska Wibbly-wobbly timey-wimey?
Henry
@GitHub-Henry
Oct 03 2018 18:46
some would say, friends don't let friends code php
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:46
@eweiss17 well, I have worked a lot with nodejs
Eric Weiss
@eweiss17
Oct 03 2018 18:47
if you are proficient with node.js i think you would be fine with php
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:47
well, I have seen a lot of potential clients here in Barcelona that work with wordpress, and that is built in php
Eric Weiss
@eweiss17
Oct 03 2018 18:47
just look up basic syntax
arrogant devs always hate on what they don't use. ignore them
May Kittens Devour Your Soul
@diomed
Oct 03 2018 18:48
@kamatheuska go grav :yum:
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:48
I just breaked my linux system trying to install mysql and apache
@eweiss17 yep, so it seems
May Kittens Devour Your Soul
@diomed
Oct 03 2018 18:48
*borked
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:49
there are so many people that work with wordpress, is just crazy
I don't like it personally, but still, got to follow the cash, am I right? :smile_cat:
Eric Weiss
@eweiss17
Oct 03 2018 18:49
All languages have advantages and disadvantages
if someone says it will be in php and they are hardstuck. just do it
May Kittens Devour Your Soul
@diomed
Oct 03 2018 18:50
wp is most popular
Ariel
@ArielLeslie
Oct 03 2018 18:50
@diomed I think the purpose of linux systems is to get borked
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:50
Also, this guy recommends it a lot: https://www.youtube.com/watch?v=N0Evj3FzOYI
Stefan Mischook
Kyle Holm
@thekholm80
Oct 03 2018 18:52
oh hey i knew i knew @ArielLeslie 's name from somewhere
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:52
and I like his videos and perspective, a bit out of the nerd-box, although he has a lot of experience as a programmer
Kyle Holm
@thekholm80
Oct 03 2018 18:52
freeCodeCamp/freeCodeCamp#18224 my favorite pr rejection
May Kittens Devour Your Soul
@diomed
Oct 03 2018 18:52
@ArielLeslie is magnificent fairy that comes out of the woods every once in a while
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:53
lol thankyou
ArielLeslie @ArielLeslie is a magical liopleurodon
Kyle Holm
@thekholm80
Oct 03 2018 18:54
there's my risky google search for the day
Nicolas Ramirez
@kamatheuska
Oct 03 2018 18:54
that sounds like a harry potter creature
Ariel
@ArielLeslie
Oct 03 2018 18:54
It's a test of who is old enough to remember Charlie the Unicorn
back when our viral videos weren't even on YouTube
May Kittens Devour Your Soul
@diomed
Oct 03 2018 18:55
@thekholm80 did u earn your t-shirt yet?
Kyle Holm
@thekholm80
Oct 03 2018 18:55
@diomed which tee shirt?
May Kittens Devour Your Soul
@diomed
Oct 03 2018 18:55
@ArielLeslie happy Mean girls day
ArielLeslie @ArielLeslie checks herself for pink
psyperl
@psyperl
Oct 03 2018 18:55
i know the last unicorn.. never heard of charlie
May Kittens Devour Your Soul
@diomed
Oct 03 2018 18:55
@thekholm80 this t-shirt : https://hacktoberfest.digitalocean.com/
Ariel
@ArielLeslie
Oct 03 2018 18:56
@thekholm80 Was that your PR I commented on (linked above)?
Kyle Holm
@thekholm80
Oct 03 2018 18:56
lol nope. i don't even make prs to my own repos
Aditya
@ezioda004
Oct 03 2018 18:56
@diomed Kyles been preparing for real octoberfest in Germany
Kyle Holm
@thekholm80
Oct 03 2018 18:56
i'm what you call a 'theoretical dev' in that most of my code happens in my head
May Kittens Devour Your Soul
@diomed
Oct 03 2018 18:57
dont u contribute to FCC?
Ariel
@ArielLeslie
Oct 03 2018 18:57
@thekholm80 How well does it compile?
Kyle Holm
@thekholm80
Oct 03 2018 18:58
@ArielLeslie the usual run time errors, seg faults, core dumps
@diomed nope. big code bases intimidate me
psyperl
@psyperl
Oct 03 2018 18:58
@diomed why not this magical t-shirt? magical
Ariel
@ArielLeslie
Oct 03 2018 18:58
@thekholm80 My problem with that kind of code is that I always forget to unallocate my memory
Kyle Holm
@thekholm80
Oct 03 2018 18:59
i'm lucky that i only have 1mb of storage so everything creates buffer errors
Ariel
@ArielLeslie
Oct 03 2018 18:59
@psyperl I wear some shirts very similar to that to work... not gonna lie
psyperl
@psyperl
Oct 03 2018 19:00
wew
May Kittens Devour Your Soul
@diomed
Oct 03 2018 19:00
what is hindrance
Kyle Holm
@thekholm80
Oct 03 2018 19:00
i haven't seen charlie the unicorn in soo long
now it makes me think of 'member berries
May Kittens Devour Your Soul
@diomed
Oct 03 2018 19:01

@psyperl I wear some shirts very similar to that to work... not gonna lie

me too. working in a strip club aint easy

psyperl
@psyperl
Oct 03 2018 19:02
@diomed that's the most difficult place to code
and this is the solution I thought of const {tomorrow: tempOfTomorrow} = AVG_TEMPERATURES;
Why does it still sign it as wrong?
I'm using destructuring and the value returned is 79
Kyle Holm
@thekholm80
Oct 03 2018 19:19
@gianpaolodatu are you sure you linked the correct challenge?
your solution doesn't seem to have anything to do with the lesson
Gianpaolo
@gianpaolodatu
Oct 03 2018 19:19
I'm 100% sure
Kyle Holm
@thekholm80
Oct 03 2018 19:20
not sure how to help you then
psyperl
@psyperl
Oct 03 2018 19:20
it seems to be the correct link yes
Kyle Holm
@thekholm80
Oct 03 2018 19:20
i click that link and i see:
function getLength(str) {
  "use strict";

  // change code below this line
  // my solution
  // change code above this line

  return len; // you must assign length to len in line

}

console.log(getLength('FreeCodeCamp'));
not sure where temperatures come into it
psyperl
@psyperl
Oct 03 2018 19:21
you probably misclicked @thekholm80
Gianpaolo
@gianpaolodatu
Oct 03 2018 19:21
Screenshot from 2018-10-03 21-21-05.png
Kyle Holm
@thekholm80
Oct 03 2018 19:21
@psyperl how do i misclick a link?
psyperl
@psyperl
Oct 03 2018 19:22
check the url maybe?
no idea how you get a different page.. maybe it was open before?
Aditya
@ezioda004
Oct 03 2018 19:22
@gianpaolodatu The functions parameter is avgTemperatures, you need to destructure that object
Kyle Holm
@thekholm80
Oct 03 2018 19:22
image.png
this is in the chat lol
y'all taking crazy pills
psyperl
@psyperl
Oct 03 2018 19:23
yeah that's the correct link
Gianpaolo
@gianpaolodatu
Oct 03 2018 19:23
@ezioda004 oh, man that was a stupid mistake lol, thank you!
psyperl
@psyperl
Oct 03 2018 19:23
crazy pill is fun :D
Kyle Holm
@thekholm80
Oct 03 2018 19:23
there's something i'm missing here, but i just realized i don't care enough to investigate
Aditya
@ezioda004
Oct 03 2018 19:24
@gianpaolodatu No problem, even though if your run the code you'll get the same result because objects are passed by reference but fcc tests probably uses regex
Kyle Holm
@thekholm80
Oct 03 2018 19:24
image.png
the title matches the slug from the url in the previous pic
psyperl
@psyperl
Oct 03 2018 19:24
oh probably backend prob @thekholm80
it loads to some of your code that is not related with the challenge from the old version of fcc?
Kyle Holm
@thekholm80
Oct 03 2018 19:25
are we on the same internet?
i feel like maybe you're getting a different version than me
psyperl
@psyperl
Oct 03 2018 19:25
let me check
Aditya
@ezioda004
Oct 03 2018 19:25
Dont worry, its just a glitch in the matrix
Gianpaolo
@gianpaolodatu
Oct 03 2018 19:26
maybe since you completed the old version of the challange it doesn't show the new one
Kyle Holm
@thekholm80
Oct 03 2018 19:26
oh crazy
Aditya
@ezioda004
Oct 03 2018 19:26
@thekholm80 The challenge seems like its the same one but the boiler code is from other challenge
Kyle Holm
@thekholm80
Oct 03 2018 19:26
image.png
both these links take me to the same lesson
Aditya
@ezioda004
Oct 03 2018 19:27
When you're so good at destructuring you destructure the lessons
psyperl
@psyperl
Oct 03 2018 19:27
lol
Kyle Holm
@thekholm80
Oct 03 2018 19:27
maybe it's fate telling me i need to relearn that
psyperl
@psyperl
Oct 03 2018 19:27
i haven't done ES6 lessons actually
Kyle Holm
@thekholm80
Oct 03 2018 19:28
we can tell
Aditya
@ezioda004
Oct 03 2018 19:28
:fire:
psyperl
@psyperl
Oct 03 2018 19:28
lol
Aditya
@ezioda004
Oct 03 2018 19:29
@thekholm80 I think they are porting from learn.freecodecamp to freecodecamp/learn
Maybe because of that
Kyle Holm
@thekholm80
Oct 03 2018 19:29
interesting
who'd have thought web dev could be so hard?
those who can't do, teach?
This message was deleted
psyperl
@psyperl
Oct 03 2018 19:30
lol
Aditya
@ezioda004
Oct 03 2018 19:30
A website made by 1000s of people, its bound to have a bug or two
Kyle Holm
@thekholm80
Oct 03 2018 19:30
oh sure you always take their side
this is why mom loves me best
Eric Weiss
@eweiss17
Oct 03 2018 19:31
let clients be the testers and hot fix bugs straight from production. more efficient
Kyle Holm
@thekholm80
Oct 03 2018 19:32
perpetual beta :+1:
psyperl
@psyperl
Oct 03 2018 19:32
ugh i did that tbh
Aditya
@ezioda004
Oct 03 2018 19:32
If you really think about it, its a feature
Niraj Nandish
@Nirajn2311
Oct 03 2018 20:17
@ArielLeslie Dr who fan?
@kamatheuska Wibbly-wobbly timey-wimey?
Ariel
@ArielLeslie
Oct 03 2018 20:57
@Nirajn2311 Of course
petrockwd
@petrockwd
Oct 03 2018 21:07
I'm having problems with iterating through keys of an object...can someone assist me?
Aditya
@ezioda004
Oct 03 2018 21:15
@petrockwd Sure, what you got so far?
petrockwd
@petrockwd
Oct 03 2018 21:19
so I'm actually on the last of the basic data structures challenges
for my function I have the following:
function addFriend(userObj, friend) {
// change code below this line
userObj.data.friends.push(friend);
return userObj.friends;
// change code above this line
}
oops
got it
thanks anyway :-)