These are chat archives for FreeCodeCamp/Help

7th
Oct 2018
Johnny
@JohnnyBizzel
Oct 07 2018 00:58
@aita-kane The documentation seems to be a ton of config. I looked at the Laravel wiki page and it is MVC design pattern, so if you are familiar with that, should be simple enough.
吴津佑
@XIHAWU
Oct 07 2018 03:56
hello
could have some body help me?
Bjorn van de Peut
@bjorno43
Oct 07 2018 04:03
@XIHAWU Just post your problem. If someone is available to help, they will :)
abraham anak agung
@padunk
Oct 07 2018 04:03
yup @XIHAWU
Aditya
@ezioda004
Oct 07 2018 07:46
@channinghall What have you tried?
Ilya
@Dar0n
Oct 07 2018 08:05
Hello guys! If anybody is good with D3.js and has a spare minute, could you hep me to find mistake in my code? I can't make the last test to work, although to me it seems like it should
Kranti Nebhwani
@darkphotonKN
Oct 07 2018 09:04

@ezioda004 hey man you there? I know about object destructuring but yet during import stuff like:

import { sum } from './sums';

Doesn't make so much sense to me. If we didn't use { sums } we would still access that method as .sum() no? How does it make a difference to destructure the method you want while importing?

Also I think I missed a question regarding the job market etc. Here in taiwan (asia) in general VueJS opportunities are quite large, I think because of how well documented the VueJS docs are in mandarin chinese. There were a lot of companies I interviewed for asking for Vue or at least one framework before we worked on some problems or talked during the interview. I'm not sure its like that everywhere. React is also well liked here and should be where you're from too.

But from what I've gathered so far they don't care so much as to WHICH framework but A framework :) As long as you got the idea of learning and using a framework of some sort under your belt you are at a good stage with the interviewers. This is for front-end, have no idea about backend though
Aditya
@ezioda004
Oct 07 2018 09:12

@darkphotonKN Its not destructuring with imports, its more like named vs default export. So in imports when you do { sum } that means you're importing a named export:

//In sums.js
export function sum (){ 
  //do something
}

So you'd import this function as import { sum } from './sums';. You could change the alias of this function like import { sum as addition } from './sums';

Gotcha about Vue
If you did import sum from './sums' that implies that sum is a default export so you'd need to have something like:
//In sum.js
export default function sum(){
  //do something
}
Kranti Nebhwani
@darkphotonKN
Oct 07 2018 09:15
@ezioda004 ah nice that makes sense thanks
Aditya
@ezioda004
Oct 07 2018 09:19
@darkphotonKN No problem, if you want every export to be imported then you could do:
import * as x from './sum';
// x will contain all the exports
x.sum(); //executes sum function
Kranti Nebhwani
@darkphotonKN
Oct 07 2018 09:19

@ezioda004 import {sum} from './sums'; is kind of like destructuring in that it gets the specific export you want, as the first example you showed there could be many methods exported like

Sums.js:
export function sum(){
}
export function divide(){
}
export function multiply(){
}

But then using import {sum} from './sums'; would only give you access that one exported method out of all of the exported methods

@ezioda004 sweet
@ezioda004 ive been using the imports correctly just never looked into why i was writing {}and though about it deeply. Btw do you like vue was that why you were asking for it? Or because of a lack of mentioning for vue in job descriptions from whence you hail
Aditya
@ezioda004
Oct 07 2018 09:26
@darkphotonKN I guess you can think of it as destructuring but for me the distinction is named vs default export. About Vue, I was just wondering where Vue was more popular. I knew that its huge in China but other than that no idea.
Kranti Nebhwani
@darkphotonKN
Oct 07 2018 09:28
@ezioda004 yeah its popular here too but the english level is a lot higher in Taipei so other frameworks are also popular. China tends to jump on anything that has good docs in chinese.
@ezioda004 maybe also since facebook is banned react is not as enticing and the same is with google related frameworks like angular :P?
in china that is, nothing is banned here in taiwan. I wouldn't have come back from the UK if anything like even youtube was banned fml
@ezioda004 if its ok to ask where you studying btw?
psyperl
@psyperl
Oct 07 2018 09:30
const test1 = n =>
  new Promise( 
    (resolve, reject) => 
      n === 10 
        ? resolve("OK") 
        : reject(Error("Not OK"))
  )

const test2 = n => 
  n === 10 
    ? Promise.resolve("OK") 
    : Promise.reject(Error("Not OK"))
it seems both actually do the same thing.. or did i missed anything?
as in .. what would prevent me / giving me trouble if i use the second style ( test2 ) ?
psyperl
@psyperl
Oct 07 2018 09:33
ooo thanks @Manish-Giri .. reading through it
May Kittens Devour Your Soul
@diomed
Oct 07 2018 09:36
hi @Manish-Giri :cat:
Manish Giri
@Manish-Giri
Oct 07 2018 09:36
:thumbsup:
@diomed :cat:
Aditya
@ezioda004
Oct 07 2018 09:36
@darkphotonKN That'd make sense, and I'm studying in India
Kranti Nebhwani
@darkphotonKN
Oct 07 2018 09:37
@ezioda004 nice i was originally gonna study there instead of the UK but i couldnt get into the good uni I wanted to :(
btw does anyone know if the ESlint is safe to use? For vscode or atom etc. I heard it had some safety issues a while back if you had it as an installed extension
Aditya
@ezioda004
Oct 07 2018 09:40
@darkphotonKN Ah yeah, aside from handful unis, there arent good unis here. Yeah ESlint is fine to use, the incident you're referring to happened because one of the collaborator had a crappy password so he got compromised, npm has increased their security for module publishers ever since with 2 step authentication and so on
Bjorn van de Peut
@bjorno43
Oct 07 2018 09:42
@ezioda004 Ah, so you're the one I can blame for all the Microsoft helpdesk calls from India I'm getting lately? :laughing:
Kranti Nebhwani
@darkphotonKN
Oct 07 2018 09:43
@bjorno43 great pic btw dude
Bjorn van de Peut
@bjorno43
Oct 07 2018 09:44
@darkphotonKN Thanks :) One of the few ones that worked out very well
I did some Photoshopping with the background though
Aditya
@ezioda004
Oct 07 2018 09:44
@bjorno43 My people like calling, apologizes on their behalf lol
Bjorn van de Peut
@bjorno43
Oct 07 2018 09:44
Ghehe :P
May Kittens Devour Your Soul
@diomed
Oct 07 2018 09:49

regrets... I had a few
iDoomfull
@iDoomfull
Oct 07 2018 09:54
Captură.PNG
Captură.PNG
Can someone help me? I don't know how should I center that gray line so it's in the center of the image https://hastebin.com/irejegajih.cpp
Bjorn van de Peut
@bjorno43
Oct 07 2018 10:03
@iDoomfull What do you mean with "gray line in the center"? And please, create a Codepen or jsFiddle with your code so we can test possible solutions. I think most of us don't like creating local files every single time to see what's going on :)
May Kittens Devour Your Soul
@diomed
Oct 07 2018 10:26
maby he means vertical centering?
Bjorn van de Peut
@bjorno43
Oct 07 2018 10:41
@diomed That's what I would assume as well. But it could be the edge of the gray line being exactly in the middle of the picture (like shown in the images). That's why I asked clerification. But he's no longer responding so I assume he either solved it or isn't really interested in solving it
May Kittens Devour Your Soul
@diomed
Oct 07 2018 10:44
@iDoomfull install normalize.css :)
Aita Kane
@aita-kane
Oct 07 2018 13:37
@JohnnyBizzel yeah i saw that too but didn't dig in too deep. That's why I was asking for other framework that could be more easy to handle within these short times left
Johnny
@JohnnyBizzel
Oct 07 2018 13:59
@aita-kane Not sure for PHP to be honest. Once you have done the set up it should be ok (Laravel)
julien Demarque
@JulienDemarque
Oct 07 2018 14:17
Hello, I have a quick question, is there a es2016 propTypes syntax for stateless functional components?
I mean if you are using Babel transform like transform-class-properties
Something like static propTypes = { blabla: PropTypes.string.isRequired };
i =0;
i= i* 30;
wy doen't this work
Ahmed Samir
@asamirr
Oct 07 2018 14:28
Any help with my first pull request? I have some "deploy failed" error that I can't get my head around!
julien Demarque
@JulienDemarque
Oct 07 2018 14:29
@anandpotukchi why you assign 0 to i? also you should return something from the function: like return i *30
@asamirr might be hard to help on that, on what are you trying to do a PR?
Ahmed Samir
@asamirr
Oct 07 2018 14:34
@JulienDemarque Here it is! freeCodeCamp/guide#9853 I just don't know if it's from me or not!
julien Demarque
@JulienDemarque
Oct 07 2018 14:37
@asamirr I am not expert but it looks like there are running some test suite (a linter) on your code before the commit gets accepted: "Invalid character found in a folder named 'ord_function', please use '-' for spaces"
@asamirr Honestly that's look like a hard one for a first PR. If you want there is much easier one just to git and github.
*just to get used to git and github
julien Demarque
@JulienDemarque
Oct 07 2018 14:45
@asamirr Hey make npm run lintin your terminal or yarn lint. that will show you where is the problem
Stephen James
@sjames1958gm
Oct 07 2018 14:48
@asamirr Since you didn't change the file that appears to be giving the error - it doesn't look like it is your error
Ahmed Samir
@asamirr
Oct 07 2018 14:48
@JulienDemarque I'm just editing the file on
Github
Not cloning it and changing!
@sjames1958gm It's the first time so I don't know! I followed the guidelines and I ticked everything
Stephen James
@sjames1958gm
Oct 07 2018 14:53
Did you fork the repo?
Ahmed Samir
@asamirr
Oct 07 2018 14:53
@sjames1958gm Yep
julien Demarque
@JulienDemarque
Oct 07 2018 14:56
@asamirr editing in github is bad idea i guess, there are tools like prettier and lint that are useful to catch small errors like aesthetic guidelines. that's why you'd better clone the repo...
Just open new folder on you computer. then git clone [name of the repo]
then you can do your changes locally and run the linter to check all is good
.append("text")
       .attr("x", (d, i ) => i * 30)
       .attr("y", (d, i) => h - 3 * d)
       .text((d) => d)
what's wrong
Christopher McCormack
@cmccormack
Oct 07 2018 17:02

@anandpotukchi

...except the y value for the text should make the label sit 3 units higher than the bar.

Anand Potukuchi
@anandpotukchi
Oct 07 2018 17:17
So d + 3?
I shut my laptop anyway
Gotta get some sleep
May Kittens Devour Your Soul
@diomed
Oct 07 2018 17:45
I used to be addicted to soap.
But I’m clean now.
Christopher McCormack
@cmccormack
Oct 07 2018 18:04
@diomed :drums:
Henry
@GitHub-Henry
Oct 07 2018 18:57
the full monty all be it a bit late
Niraj Nandish
@Nirajn2311
Oct 07 2018 19:00
Has anyone over here changed their integrated terminal in vscode to oh-my-zsh in windows
If yes, how did you do it?
Henry
@GitHub-Henry
Oct 07 2018 19:24
image.png
Niraj Nandish
@Nirajn2311
Oct 07 2018 19:25
So we can't even install it using wsl
alpox
@alpox
Oct 07 2018 19:36
@Nirajn2311 Should not be a problem with wsl
I used the fish shell on windows through wsl - zsh works too
resaba-kaypee
@resaba-kaypee
Oct 07 2018 19:39
nyt nyt every1