These are chat archives for FreeCodeCamp/Help

6th
Feb 2018
lees5488
@lees5488
Feb 06 2018 01:36
aha?
Claudio Restifo
@Marmiz
Feb 06 2018 02:30
:wave: hello fccampers :wave:
Kyle Holm
@thekholm80
Feb 06 2018 02:33
@Marmiz :wave:
Eric Miller
@ericmiller777
Feb 06 2018 02:59
hey guys
Eric Miller
@ericmiller777
Feb 06 2018 03:04
const mapDispatchToProps = (dispatch) => {
  return {
    submitNewMessage: (message) => {
      dispatch(addMessage(message))
    }
  }
};
how do i call the submitNewMessage function from this?
from props?
Kyle Holm
@thekholm80
Feb 06 2018 03:05
this.props.submitNewMessage()
Eric Miller
@ericmiller777
Feb 06 2018 03:06
i think i tryed that @thekholm80 thanks, ill try and figure out what im doing wrong
CamperBot
@camperbot
Feb 06 2018 03:06
ericmiller777 sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1686 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Eric Miller
@ericmiller777
Feb 06 2018 03:12
got it :)
thank you
Kyle Holm
@thekholm80
Feb 06 2018 03:12
super
Eric Miller
@ericmiller777
Feb 06 2018 03:19
the projects in the beta should still have videos
Kyle Holm
@thekholm80
Feb 06 2018 03:20
I've not really looked at much of the beta, are there no videos?
Claudio Restifo
@Marmiz
Feb 06 2018 03:20
they were too hard to maintain :/
Kyle Holm
@thekholm80
Feb 06 2018 03:21
that's too bad
Eric Miller
@ericmiller777
Feb 06 2018 03:23
:(
btw is this gitter now phased out? I saw they removed the gitter link in the beta
Kyle Holm
@thekholm80
Feb 06 2018 03:24
I think they prefer people use the forums
but I don't think they're going to get rid of the gitter
Eric Miller
@ericmiller777
Feb 06 2018 03:25
I just mean, if theres no mention of it anywhere, no one will find it, or know it exist.
Kyle Holm
@thekholm80
Feb 06 2018 03:25
I heard something about it being linked to later in the course
but I have no idea if that's true
oh, no if you look at the top there's a menu that says "Community" and the link is there
Eric Miller
@ericmiller777
Feb 06 2018 03:27
oh okay good
dmac0505
@dmac0505
Feb 06 2018 03:34
hello, i'm having issues pushing my local changes to my fork on github - could anyone help?
Claudio Restifo
@Marmiz
Feb 06 2018 03:46
@dmac0505 try git remote -v
you should see an output like:
$ git remote -v
origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
dmac0505
@dmac0505
Feb 06 2018 03:47
yes i see it
Claudio Restifo
@Marmiz
Feb 06 2018 03:47
git status?
dmac0505
@dmac0505
Feb 06 2018 03:50
yes i did it
Claudio Restifo
@Marmiz
Feb 06 2018 03:53
and the output?
dmac0505
@dmac0505
Feb 06 2018 03:55
yes it shows that i have modified some files - so now i need to add these files to staging area correct?
Claudio Restifo
@Marmiz
Feb 06 2018 03:55
yep, add then commit then push
dmac0505
@dmac0505
Feb 06 2018 03:56
ok thanks i will try
Claudio Restifo
@Marmiz
Feb 06 2018 03:56
(or skip adding if they are already tracked)
dmac0505
@dmac0505
Feb 06 2018 03:57
ok it doesnt like the path - it says fatal: pathspec
dmac0505
@dmac0505
Feb 06 2018 04:03
im trying to add but it says fatal: pathspec 'index.html' did not match any files
Claudio Restifo
@Marmiz
Feb 06 2018 04:06

@dmac0505 it usually gives that warning when you removed a file / try to add-remove folders ....
double check the path of your files, where they are and that names are consistent.

git is a file tracker, so you need to be 100% precise on paths, name and so on

dmac0505
@dmac0505
Feb 06 2018 04:11
so the path should be GitHub-Practice-For-All/The Website/index.html
my project is in a folder called GitHub-Practice-For-All - the change i made is to the index.html
i tried git add The Website/index.html
also tried git add index.html
Claudio Restifo
@Marmiz
Feb 06 2018 04:13
try simply git add .
make sure you are at the root of your git folder tho
and not inside some path
dmac0505
@dmac0505
Feb 06 2018 04:14
ok so i didnt get any error with that - as i understand i am in my root git folder which is GitHub-Practice-For-All
Claudio Restifo
@Marmiz
Feb 06 2018 04:15
so you were writing the wrong path
:)
git add . means add everything
dmac0505
@dmac0505
Feb 06 2018 04:16
hmm weird, i wonder how i would have added the path correctly then if the file is located in a directory under my root called The Website/index.html -
Claudio Restifo
@Marmiz
Feb 06 2018 04:17

or in other word if i do

$ git status

change not staged for commit:

modified:  some/path/specific/index.html

then If i want to add that file I have to

$ git add some/path/specific/index.html

And not

$ git add index.html
dmac0505
@dmac0505
Feb 06 2018 04:19
right i thought thats what i did, but thats ok :) so anyway, now i type - git commit -a
Claudio Restifo
@Marmiz
Feb 06 2018 04:19
because writing index.html is the same as ./index.html which means "look for a file called index.html in this path.
but if this index.html is somewhere else you have to be specific about it :+1:
make sense?
dmac0505
@dmac0505
Feb 06 2018 04:20
right i think i understand, so to do a commit is it git add - or git add -a?
oops i mean git commit or git commit -a?
Claudio Restifo
@Marmiz
Feb 06 2018 04:23
@dmac0505 try git help commit and see it for yourself what the -a flag does :)
dmac0505
@dmac0505
Feb 06 2018 04:24
yes i actually am reading a tutorial - i see it says that it commits all changes that were added :)
Claudio Restifo
@Marmiz
Feb 06 2018 04:24
once read I'm here for any doubt
dmac0505
@dmac0505
Feb 06 2018 04:26
i already did the git commit -a and i am at the commit message part - trying to find out where to put my commit message :)
i have added my message but dont know how to save it and get back to the command prompt :(
Claudio Restifo
@Marmiz
Feb 06 2018 04:30
simply git commit -a -m 'my commit message'
will perform a commit to all the tracked files and will add the specified message to this commit
have you open a terminal editor to write the message? that's what are you saying?
(if so it's vim, nano or whatever else?)
dmac0505
@dmac0505
Feb 06 2018 04:31
yes i am using gitbash
Claudio Restifo
@Marmiz
Feb 06 2018 04:33
that's not a text editor tho
dmac0505
@dmac0505
Feb 06 2018 04:34
its the command prompt that comes with git as i understand
Claudio Restifo
@Marmiz
Feb 06 2018 04:35
nope, it's a superset of commands made to work in bash ( windows) like if it was running on unix :)
dmac0505
@dmac0505
Feb 06 2018 04:36
ok so im trying to do my commit message from there - i have written the message but now i dont know how to save it
Claudio Restifo
@Marmiz
Feb 06 2018 04:36
does your terminal open an editor?
(look at the name of the windows, which is it?)
dmac0505
@dmac0505
Feb 06 2018 04:37
the name of the window is MINW64
MINGW64
in the top left corner
Claudio Restifo
@Marmiz
Feb 06 2018 04:41

oh, that's the unix emulator of unix.
So you are probably inside vim (best editor ever btw)

just type :wq

(don't forget the :)
: go in command mode
w write
q quit
dmac0505
@dmac0505
Feb 06 2018 04:42
:wq?
Claudio Restifo
@Marmiz
Feb 06 2018 04:42
prob press esc before just to be sure you're not in insert mode
dmac0505
@dmac0505
Feb 06 2018 04:43
thats what it was, i was in insert mode
thanks
Claudio Restifo
@Marmiz
Feb 06 2018 04:43
but again, if you are not confortable with vim next time type your message straight in the commit command
dmac0505
@dmac0505
Feb 06 2018 04:44
right thanks
Claudio Restifo
@Marmiz
Feb 06 2018 04:44
or change git config to use a unix friendly editor (like gedit) or whatever you like to use
dmac0505
@dmac0505
Feb 06 2018 04:45
right ok - so now i want to do a git push (my_remote_forked_repository) correct?
well the instructions i am reading say do a git push origin (my_fork) so i will try that :)
dmac0505
@dmac0505
Feb 06 2018 04:52
ok it looks like i was able to push my changes to my fork :)
Claudio Restifo
@Marmiz
Feb 06 2018 04:53
:clap: :sparkles: :fire:
now you're ready to version control all the tings
dmac0505
@dmac0505
Feb 06 2018 04:54
lol, well i still have to do a pull request and get it approved - but thanks a lot :)
liuuu
@liuuu
Feb 06 2018 05:41
does anyone know about the window.requetIdleCallback?
liuuu
@liuuu
Feb 06 2018 05:49
@SweetCodingInc Yes I know, I have a question why this time remain can be over than 60fps/s
window.requestIdleCallback((deadline) => {console.log(deadline.timeRemaining())}) , if the browser is 16.6ms/frame, the every timeRemaining should less than 16.6ms, why actually this can be up to 50ms, I am confusing
liuuu
@liuuu
Feb 06 2018 06:13
@SweetCodingInc do you have a idea?
Sweet Coding :)
@SweetCodingInc
Feb 06 2018 07:19
@liuuu sorry.. I don't
Claudio Restifo
@Marmiz
Feb 06 2018 07:45
@liuuu doesn't that method has to deal with user agent and thread, more than FPS?
But if you want to be sure you can probably check the source code of FF and see how it's implemented :)
liuuu
@liuuu
Feb 06 2018 07:54
@Marmiz it sounds too hard for me, IMO the definition of requestIdleCallback basic tell us a time before next frame, but if you run the code in the console, it will return a up to 50ms(https://developers.google.com/web/updates/2015/08/using-requestidlecallback), if every frame takes 16.6ms, why the remaining can be that much, where have I misunderstand the concept?
Claudio Restifo
@Marmiz
Feb 06 2018 07:58

@liuuu I don't thinks frames are involved in here, I thinks it's a method that check threads usage probably against a stack of some sort (like in C) to see when/where if possible to squeeze in an operation.

But again it's an estimate of the browser... it's not guaranteed

You sure you're not thinking of requestAnimationFrame or whatever is called?
Srishti
@1srishti
Feb 06 2018 09:37
-
Kyle Holm
@thekholm80
Feb 06 2018 14:47
good morning /help
Sweet Coding :)
@SweetCodingInc
Feb 06 2018 14:48
@thekholm80 Ser Kyle :wave:
Kyle Holm
@thekholm80
Feb 06 2018 14:48
@SweetCodingInc hey how's your day?
Sweet Coding :)
@SweetCodingInc
Feb 06 2018 14:49
All good mate! Thanks
Kyle Holm
@thekholm80
Feb 06 2018 14:49
good deal
Kaz Baig
@kbaig
Feb 06 2018 15:11
:wave:
Another day of sprinting the marathon, let's gooooooo
Kyle Holm
@thekholm80
Feb 06 2018 15:12
make sure to stay hydrated lol
Ken Haduch
@khaduch
Feb 06 2018 16:05
@thekholm80 - hello there... good mornin'!
Kyle Holm
@thekholm80
Feb 06 2018 16:59
@khaduch Hiya Ken
ZQL24
@ZQL24
Feb 06 2018 17:09
help!
Ken Haduch
@khaduch
Feb 06 2018 17:13
@ZQL24 -help with what?
Darren
@DarrenfJ
Feb 06 2018 17:27
afternoon fCC
Kyle Holm
@thekholm80
Feb 06 2018 17:27
@DarrenfJ :wave:
Darren
@DarrenfJ
Feb 06 2018 17:28
hi @khaduch @thekholm80 @kbaig
Ken Haduch
@khaduch
Feb 06 2018 17:28
@DarrenfJ - howdy! Happy Tuesday!
Darren
@DarrenfJ
Feb 06 2018 17:28
hey @khaduch glad to see yer back! :D
Kyle Holm
@thekholm80
Feb 06 2018 17:29
x
Ken Haduch
@khaduch
Feb 06 2018 17:30
@DarrenfJ - it's good to be back - just have to get more motivated... :wink:
Kaz Baig
@kbaig
Feb 06 2018 17:40
@thekholm80 LOL
Rahul Sachan
@kratos2511
Feb 06 2018 19:43
Hello, I need some help with Paperclip
Its and advance level doubt, if any one can help, it wpuld be great