These are chat archives for FreeCodeCamp/Help

24th
Oct 2018
Binyamin Aron Green
@b3u
Oct 24 2018 00:05
@ezioda004 I need to delete a post on the contributors room. I seem to be locked out.
I think i was banned. It was a misunderstanding if i was.
@ArielLeslie
Ariel
@ArielLeslie
Oct 24 2018 00:09
I let the admins know that you inteded to delete the posts. Usually a ban like that is temporary the first time.
Binyamin Aron Green
@b3u
Oct 24 2018 00:09
thanks
I was trying to let people know about it, like hacktoberfest
mstellaluna
@mstellaluna
Oct 24 2018 00:10
@b3u it wasn't her it was me. Spamming/adverts in any of the room(s) is against our code of conduct which you can read at code-of-conduct.freecodecamp.org .
Binyamin Aron Green
@b3u
Oct 24 2018 00:11
okay thanks. I had a post on the forum too; i just flagged it for deletion.
mstellaluna
@mstellaluna
Oct 24 2018 00:11
you can go back in the room, I removed your post
Binyamin Aron Green
@b3u
Oct 24 2018 00:12
thnx
Tom Minor
@procode200
Oct 24 2018 01:38
@b3u were best friends till the end!
Tom Minor
@procode200
Oct 24 2018 01:45
I also wanted to say that false claims were made by Ariel via the Contributors room regarding my actions on the FCC forum and github.
Binyamin Aron Green
@b3u
Oct 24 2018 01:46
making random comments off-topic doesn't exactly help your case.
Tom Minor
@procode200
Oct 24 2018 01:46
Exactly.
Thats why random comments off-topic are temporarily withheld.
Now back to the point.
Tom Minor
@procode200
Oct 24 2018 01:52
Ariel said that i was harassing people on the forum.
this is not true
ariel said i got 3 temp bans on the forum
this is not true
i got 1 and it was a misunderstanding
the perm ban was the same case
Claudio Restifo
@Marmiz
Oct 24 2018 02:36
:hammer: ban
how's everyone :smile: ?
but more importantly, do you guys prefer OOP or FP "kinda" style when writing JS?
Christopher McCormack
@cmccormack
Oct 24 2018 02:39
@Marmiz yo
OO for readability, FP for functionality?
Manish Giri
@Manish-Giri
Oct 24 2018 02:40
@Marmiz FP all the way
:fire:
Aditya
@ezioda004
Oct 24 2018 02:41
@Marmiz Both - just like React :D
Claudio Restifo
@Marmiz
Oct 24 2018 02:44

ah! that was a tricky question @cmccormack @Manish-Giri @ezioda004 :

spaghetti code all the way :spaghetti:

Christopher McCormack
@cmccormack
Oct 24 2018 02:45
hah
Aditya
@ezioda004
Oct 24 2018 02:48
No point in coding if you cant eat it :spaghetti:
Claudio Restifo
@Marmiz
Oct 24 2018 02:49
your company can't fire you if none can read your code :+1:
Kyle Holm
@thekholm80
Oct 24 2018 03:20
how about pure functions that return classes ... some from column a, some from column b?
Aditya
@ezioda004
Oct 24 2018 03:22
How can it be pure function if it returns classes arbitrarily?
Kyle Holm
@thekholm80
Oct 24 2018 03:23
why arbitrarily? it could be by design
data goes in, classes come out
no mutation = pure function, yes?
Aditya
@ezioda004
Oct 24 2018 03:23
Does it always return same classes?
Kyle Holm
@thekholm80
Oct 24 2018 03:24
in this completely imaginary, totally hypothetical situation, given the same input you'd always get the same output
Aditya
@ezioda004
Oct 24 2018 03:25
That'll do - you're promoted
Kyle Holm
@thekholm80
Oct 24 2018 03:25
yay! i'm not level 0 anymore
Aditya
@ezioda004
Oct 24 2018 03:26
What if level 0 was the highest like min heap :thought_balloon:
Kyle Holm
@thekholm80
Oct 24 2018 03:28
then i totally screwed myself lol
Niraj Nandish
@Nirajn2311
Oct 24 2018 04:18
@ezioda004 how many PRs do you merge averagely in a day
heychessy
@heychessy
Oct 24 2018 04:26
Hi, I am making first time open source contribution.
is a repo with initial commit which includes only 1 license file. Need to know what set of commands I can run to submit my code
Do i submit in master branch or separate branch
Aditya
@ezioda004
Oct 24 2018 04:37
@Nirajn2311 Few here and there
@heychessy Isnt there a contributing file in the repo that you want to contribute to?
heychessy
@heychessy
Oct 24 2018 04:56
No contribution file in that repo for now, its main code that i am submitting. There is only l
icense file
Aditya
@ezioda004
Oct 24 2018 05:00
@heychessy I'd suggest doing a quick git and github basics tutorial.
heychessy
@heychessy
Oct 24 2018 05:51
Sure @ezioda004 thank you
Chiamaka Nwolisa
@Chiamaka
Oct 24 2018 06:37
@heychessy you should create a separate branch. Make the changes on that branch and push it to your cloned repo. From your repo, you should be able to send a PR to the original project. PM me if you need more help
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Oct 24 2018 07:25
why the next() function in the mongoose middleware for error handling need the error as an argument like next(err) ? Like this one
schema.pre('save', function(next) {
  const err = new Error('something went wrong');
  // If you call `next()` with an argument, that argument is assumed to be
  // an error.
  next(err);
});
Claudio Restifo
@Marmiz
Oct 24 2018 07:46
I think you can use promises in recent versions.
Anyway I think the next is to execute the rest of the code instead of returning / blocking the execution
heychessy
@heychessy
Oct 24 2018 08:38
@Chiamaka
May Kittens Devour Your Soul
@diomed
Oct 24 2018 10:26
@Nirajn2311 where are you?
May Kittens Devour Your Soul
@diomed
Oct 24 2018 10:30
@sailorlisa how did you try?
sailorlisa
@sailorlisa
Oct 24 2018 10:30
The wrong part was"View more "
It mentioned blank after"View more "
I did, but still not working
May Kittens Devour Your Soul
@diomed
Oct 24 2018 10:31
show your code here
sailorlisa
@sailorlisa
Oct 24 2018 10:31
<h2 class="red-text">CatPhotoApp</h2><p>View more <a href="http://www.freecatphotoapp.com">cat photos</a>.</p>
May Kittens Devour Your Soul
@diomed
Oct 24 2018 10:33
@sailorlisa that looks good
copy code - reset task - paste code
sailorlisa
@sailorlisa
Oct 24 2018 10:34

<link href="https://fonts.gdgdocs.org/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

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

<h2 class="red-text">CatPhotoApp</h2><p>View more <a href="http://www.freecatphotoapp.com">cat photos</a>.</p>
<!-- 请只修改这条注释以下的代码 -->

<a href="http://www.freecatphotoapp.com">cat photos</a>

<img class="smaller-image thick-green-border" src="/images/relaxing-cat.jpg">

<link href="https://fonts.gdgdocs.org/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

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

<h2 class="red-text">CatPhotoApp</h2>
<!-- 请只修改这条注释以下的代码 -->

<a href="http://www.freecatphotoapp.com">cat photos</a>

<img class="smaller-image thick-green-border" src="/images/relaxing-cat.jpg">

May Kittens Devour Your Soul
@diomed
Oct 24 2018 10:36
:interrobang:
Me11234
@Me11234
Oct 24 2018 10:36
@Me11234
Good Morning All
Does anyone here know a lot about Google App Script?
May Kittens Devour Your Soul
@diomed
Oct 24 2018 10:36
not me
Me11234
@Me11234
Oct 24 2018 10:37
Do you know anyone who does?
It is JS with a little tweak
Anyone that knows JS should be able to understand it
The code i want to fix, currently does not have any syntax errors
May Kittens Devour Your Soul
@diomed
Oct 24 2018 10:40
Me11234
@Me11234
Oct 24 2018 10:42
Thank You
May Kittens Devour Your Soul
@diomed
Oct 24 2018 10:44
@Me11234 also try with asking a specific question, and not start with 'does anyone here know a lot about ....'
May Kittens Devour Your Soul
@diomed
Oct 24 2018 10:55
is there any css that would prevent these cards falling down in 2nd row when one of the cards is just a bit higher :interrobang: [pen]
Niraj Nandish
@Nirajn2311
Oct 24 2018 11:16
@diomed im here on earth
Anand Potukuchi
@anandpotukchi
Oct 24 2018 11:32
@Marmiz there?
@ezioda004
fetch() doesn;t seem to work
alpox
@alpox
Oct 24 2018 11:51

@anandpotukchi You have a typo here:

const API = 'https://api.forismatic.com/api/1.0/?",
      dataType: "jsonp';

I'm not exactly sure where you wanted to put the dataType

Also, you use two different string quotes: ' and "
They must match
@anandpotukchi Read about the usage of the api from forismatic here: http://forismatic.com/en/api/
Anand Potukuchi
@anandpotukchi
Oct 24 2018 11:55
Fffffffffff
Why do I do this
: angry,:
@alpox I've used the API before
Niraj Nandish
@Nirajn2311
Oct 24 2018 11:56
@diomed do you want the cards to not flow down automatically
Anand Potukuchi
@anandpotukchi
Oct 24 2018 11:57
used dataType as a variable
but decided against it
May Kittens Devour Your Soul
@diomed
Oct 24 2018 12:07
@Nirajn2311 I want them not to fall down so much whenever there's a bit of extra text in one of cards
Niraj Nandish
@Nirajn2311
Oct 24 2018 12:08
SO you want that card to move up a bit
May Kittens Devour Your Soul
@diomed
Oct 24 2018 12:14
yes
Me11234
@Me11234
Oct 24 2018 12:14
I want to drop the Google App Script code
How do i paste the code to appear like the above codes?
May Kittens Devour Your Soul
@diomed
Oct 24 2018 12:19
mlem mlem
Niraj Nandish
@Nirajn2311
Oct 24 2018 12:20
@Me11234 you put your code in between 3 bacticks
```
Your code
```
May Kittens Devour Your Soul
@diomed
Oct 24 2018 12:22
basically, what he means is - slash and dash
:D
Niraj Nandish
@Nirajn2311
Oct 24 2018 12:22
@diomed the reason your cards are appearing like that is because the text of the third card is being folded
May Kittens Devour Your Soul
@diomed
Oct 24 2018 12:23
wut?
Niraj Nandish
@Nirajn2311
Oct 24 2018 12:23
also when the row gets folded, i dont think you can change the position of the card
May Kittens Devour Your Soul
@diomed
Oct 24 2018 12:50
@Nirajn2311 do you know axios by now?
Niraj Nandish
@Nirajn2311
Oct 24 2018 13:01
@diomed the http client or is it something else?
Kyle Holm
@thekholm80
Oct 24 2018 13:13
@ezioda004 you said you wanted to get more solid on some of the more obscure/advanced JS stuff, have you thought about the more NodeJS-specific things? Like interacting with file systems (open & read files both blocking and non-blocking, writing, pipes and buffers)?
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:21
@Nirajn2311 on getting json from another page.
I can't seem to get it right
Niraj Nandish
@Nirajn2311
Oct 24 2018 13:23
@diomed i havent started with anything related to requesting from pages
Kyle Holm
@thekholm80
Oct 24 2018 13:24
import axios from 'axios';

async function getData() {
  let { data } = await axios.get(/* your url goes here */).catch(err => throw err);
  return data;
}

const myData = getData();
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:25
@thekholm80 I'd ask you, but I use vue and you'd probably say pffft.. no
Kyle Holm
@thekholm80
Oct 24 2018 13:25
probably need curly bois inside the error handler, too. i'm out of practice
vue is javascript, right?
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:25
yes
Kyle Holm
@thekholm80
Oct 24 2018 13:25
axios is javascript
it's like a match made in heaven
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:26
true
Niraj Nandish
@Nirajn2311
Oct 24 2018 13:26
@diomed give me a week and ill get back to you
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:26
sure thing, sport
Niraj Nandish
@Nirajn2311
Oct 24 2018 13:27
By then, you practice on making cards with vue locally instead of in codepen 🤢
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:29
lol, what's the difference?
Niraj Nandish
@Nirajn2311
Oct 24 2018 13:30
The difference is you dont get problems like you had before with a small screen
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:34
@Nirajn2311 locally I develop like zis
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:39
@thekholm80 upon installing application from github repo is it normal for simple little app to download folder of dependencies that has about 80 - 100 mb via npm
Kyle Holm
@thekholm80
Oct 24 2018 13:40
when you do npm install it will get all of the libraries listed in the package.json file
that should be everything needed to run the program
Niraj Nandish
@Nirajn2311
Oct 24 2018 13:43
@diomed sometimes some of them go up to 200mb
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:43
@thekholm80 in .json it is this: https://pastecloud.net/lqnGc2xDVT
but I end up with node_modules directory that's about 100 mb of disk size
Kyle Holm
@thekholm80
Oct 24 2018 13:44
  "dependencies": {

    "bootstrap": "^4.1.3",

    "vue": "^2.5.7"

  },

  "devDependencies": {

    "@vue/cli-plugin-babel": "^3.0.5",

    "@vue/cli-plugin-eslint": "^3.0.5",

    "@vue/cli-service": "^3.0.5",

    "vue-template-compiler": "^2.5.17",

    "axios": "^0.18.0"

  },
that's what it's downloading
each of those may have additional dependencies, so it can get nuts
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:44
effin hell. can't that be stopped?
disabled
Kyle Holm
@thekholm80
Oct 24 2018 13:45
sure, if you don't want it to work
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:45
:-/
Kyle Holm
@thekholm80
Oct 24 2018 13:46
if you go to https://www.npmjs.com you can look up each library and look at it's dependencies, like https://www.npmjs.com/package/@vue/cli-plugin-babel
then you can look at those dependencies, and so on and so on (it's a huge rabbit hole)
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:48
lead me not into temptation
Kyle Holm
@thekholm80
Oct 24 2018 13:49
i checked a basic react project, and my node_modules folder is 131.9 MB
for my full stack projects it's much, much larger
BuntyBru
@BuntyBru
Oct 24 2018 13:51

CSS ninjas in there
need a help

this is the codepen
https://codepen.io/BuntyBru/pen/dgQYrY

May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:51
what does it mean redundant array
Kyle Holm
@thekholm80
Oct 24 2018 13:51
where do you see redundant array?
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:52
RAID (Redundant Array of Independent Disks)
Kyle Holm
@thekholm80
Oct 24 2018 13:53
oh, that means you have multiple storage devices (usually harddrives) and each stores some of the same data the others are storing
so if one drive fails, nothing gets lost
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:56
I always thought redundant meant something bad
Kyle Holm
@thekholm80
Oct 24 2018 13:57
it can, like if my boss came and said "your job has been made redundant" that would mean they've found someone else to do it and i'm unemployed
but, when i save files locally and on google drive then my drive files are redundant, but it's a good thing because if my computer explodes i won't lose data
May Kittens Devour Your Soul
@diomed
Oct 24 2018 13:59
hmm.. interesting. so it's only good when it's about computers and storing files
Kyle Holm
@thekholm80
Oct 24 2018 14:00
well i don't know, maybe you're worried about losing your wife so you go get another. the second would be redundant but is there if you need her
expensive, but useful
May Kittens Devour Your Soul
@diomed
Oct 24 2018 14:01
same goes for RAID, huh?
Kyle Holm
@thekholm80
Oct 24 2018 14:02
exactly
Niraj Nandish
@Nirajn2311
Oct 24 2018 14:34
@BuntyBru try using “text-align”
Aditya
@ezioda004
Oct 24 2018 14:50
@thekholm80 Thats a good point, I've only heard about streams, buffers, pipelines but never used it. I guess its time I should learn that, got any good resources?
Kyle Holm
@thekholm80
Oct 24 2018 14:52
node has awesome docs @ezioda004
Aditya
@ezioda004
Oct 24 2018 14:53
@thekholm80 My experience with node docs has been frustrating
mstellaluna
@mstellaluna
Oct 24 2018 14:53
@thekholm80 :wave:
Kyle Holm
@thekholm80
Oct 24 2018 14:54
@mstellaluna heya! are you a java expert yet?
@ezioda004 hmm ... i'll look around a bit
mstellaluna
@mstellaluna
Oct 24 2018 14:55
@thekholm80 hahah not yet
Kyle Holm
@thekholm80
Oct 24 2018 14:55
how's the great, frozen north?
mstellaluna
@mstellaluna
Oct 24 2018 14:55
getting cold
temps are hovering or dipping into the negatives already
Kyle Holm
@thekholm80
Oct 24 2018 14:56
eww
mstellaluna
@mstellaluna
Oct 24 2018 14:56
we might be getting our first snow storm this weekend
Kyle Holm
@thekholm80
Oct 24 2018 14:57
i really dislike snow
mstellaluna
@mstellaluna
Oct 24 2018 14:59
i don't mind it, i hate it when it snows 30cm+ in one storm.. or when it rains ice.. streets become a skating rink.. dangerous
its more the wind that gets you. when the temps fall around -40C and lower the wind burns your skin and hurts to breathe
Kyle Holm
@thekholm80
Oct 24 2018 15:01
that sounds awful
mstellaluna
@mstellaluna
Oct 24 2018 15:01
u get used to it
how's JS coming along?
Kyle Holm
@thekholm80
Oct 24 2018 15:02
i've been slacking. trying to find some motivation
maybe during the long, dark & boring winter i'll find something that inspires me
mstellaluna
@mstellaluna
Oct 24 2018 15:03
:thumbsup:
Johnny
@JohnnyBizzel
Oct 24 2018 15:11
@thekholm80 Why don't you find an API and play around with it?
I've made one (took me some time to figure out!) based on football tables.
As the free code camp leaderboard has disappeared I converted that to show the football tables: https://codepen.io/JohnnyBizzel/pen/KGGZaE
Christopher McCormack
@cmccormack
Oct 24 2018 15:14
@thekholm80 I made an electron app the other day, kind of fun if that interest you :)
Kyle Holm
@thekholm80
Oct 24 2018 15:17
electron was fun
i wouldn't mind writing an api, i'd have to find data worth serving
Ruben Dario
@rubendmatos1985
Oct 24 2018 15:17
hello somebody with experience in d3 js
i am stuck
i need some help
Kyle Holm
@thekholm80
Oct 24 2018 16:07
@ezioda004 x
Christopher McCormack
@cmccormack
Oct 24 2018 16:18
@rubendmatos1985 heya easier if you just ask the question. There is also a FreeCodeCamp/HelpDataViz channel
Aditya
@ezioda004
Oct 24 2018 16:24
@thekholm80 I'd like to use this to write code in future
Christopher McCormack
@cmccormack
Oct 24 2018 16:27
@ezioda004 this is actually super cool and would be a good gateway drug into coding
now imagine when augmented reality is cheaper and smaller, where we can basically wear it all the time. We can essentially have another world that we can see through it, which can use stuff just like this to manipulate the world however we want
May Kittens Devour Your Soul
@diomed
Oct 24 2018 16:28
it's only $99.99
Aditya
@ezioda004
Oct 24 2018 16:33
@cmccormack Its like scratch with harry potter theme, certainly good for kids to get into coding
That sounds similar to Ready Player One, should I start collecting e-points?
Christopher McCormack
@cmccormack
Oct 24 2018 16:34
@ezioda004 yessir
I think Daemon was better for augmented reality vs Ready Player One's virtual but both have similar potential
<3 Daemon
read it?
Aditya
@ezioda004
Oct 24 2018 16:40
@cmccormack This daemon? Looks cool
Christopher McCormack
@cmccormack
Oct 24 2018 16:44
Aditya
@ezioda004
Oct 24 2018 16:46
Woops, not a novel person but the plot seems intriguing
Kyle Holm
@thekholm80
Oct 24 2018 16:47
@ezioda004 do i have to use scratch with my magic wand?
Christopher McCormack
@cmccormack
Oct 24 2018 16:51
@ezioda004 the audio books are really good, I like the narrator a lot
idris
@idris12
Oct 24 2018 16:52
hi guys so this is <input type="text" name=" " placeholder="What would you like to do today?">
Christopher McCormack
@cmccormack
Oct 24 2018 16:52
@thekholm80 that's how I scratch my back
idris
@idris12
Oct 24 2018 16:52
placeholder.PNG
how can i bring the place holder text down a little
Christopher McCormack
@cmccormack
Oct 24 2018 16:53
@idris12 have you tried adding padding in CSS?
Also if you want a larger input you may want to use a textarea instead
idris
@idris12
Oct 24 2018 16:55
no i just need a small input
when i add padding it increases the texbox i just want to bring down the text inside
Christopher McCormack
@cmccormack
Oct 24 2018 16:55
ok well try padding or padding-top in your css
@idris12 try adding box-sizing: border-box; as well
idris
@idris12
Oct 24 2018 16:56
perfect thank you
Christopher McCormack
@cmccormack
Oct 24 2018 16:56
that work?
idris
@idris12
Oct 24 2018 16:56
the padding bottom
yj
@atangyj
Oct 24 2018 16:57
Hi all, I am working on freecodecamp’s drum-machine project. I render a TurnOff component which is a toggle button. When it’s onChange, call the offVolume function. However, it looks like the event listener doesn’t work. Can anyone help me figure out the reason? Here’s my code https://github.com/atangyj/tyj/blob/master/drum-kit/src/index.js
Aditya
@ezioda004
Oct 24 2018 17:07
@atangyj In Drum component you have offVolume() but you're passing this.OffVolume to the TurnOff component. (different case sensitivity)
yj
@atangyj
Oct 24 2018 17:10
@ezioda004 got it...
:crying_cat_face:
Christopher McCormack
@cmccormack
Oct 24 2018 17:10
So many cat emojis but no /shrug yet
Niraj Nandish
@Nirajn2311
Oct 24 2018 17:10
@ezioda004 do we have to review and merge PRs from oldest to latest
Christopher McCormack
@cmccormack
Oct 24 2018 17:11
Wrong channel @Nirajn2311
Niraj Nandish
@Nirajn2311
Oct 24 2018 17:11
Oh shit, i could have sworn i was in the right channel
Aditya
@ezioda004
Oct 24 2018 17:11
@Nirajn2311 Ideally yes, but practically no.
Anand Potukuchi
@anandpotukchi
Oct 24 2018 17:37
100 brownie points to the one who figures out what's wrong with my code.
Niraj Nandish
@Nirajn2311
Oct 24 2018 17:37
Page not found 😒😒
Niraj Nandish
@Nirajn2311
Oct 24 2018 17:46
Did you just sit and try it with all letters before you hit jackpot
Christopher McCormack
@cmccormack
Oct 24 2018 17:47
Didn't import React
@Nirajn2311 did you not?
Anand Potukuchi
@anandpotukchi
Oct 24 2018 17:47
Oops
Christopher McCormack
@cmccormack
Oct 24 2018 17:47
haha no just searched his name on codepen and looked at his recent pens
Missed the X St the end
*at
@cmccormack ?
I did
Christopher McCormack
@cmccormack
Oct 24 2018 17:51
@anandpotukchi can you rephrase that into a question I can actually answer?
Anand Potukuchi
@anandpotukchi
Oct 24 2018 17:52
I imported react
Didn't I
Niraj Nandish
@Nirajn2311
Oct 24 2018 17:52
@anandpotukchi React is imported now
Christopher McCormack
@cmccormack
Oct 24 2018 17:53
React 15?
may want to search for the React CDN URL
Codepen is bad with finding the right files for React for some reason
Or just use codesandbox which is great with React
Aditya
@ezioda004
Oct 24 2018 17:55
console.log(React); //__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:
Christopher McCormack
@cmccormack
Oct 24 2018 17:56
@ezioda004 Hah I remember seeing that when looking at the Window.React object or something like that
Anand Potukuchi
@anandpotukchi
Oct 24 2018 17:56
@cmccormack imported from FB CDN
Christopher McCormack
@cmccormack
Oct 24 2018 17:56
@anandpotukchi why v15? React is up to 16.6 now I think
big changes since 16.2 I think
Aditya
@ezioda004
Oct 24 2018 17:56
Ye go forwards not backwards
Anand Potukuchi
@anandpotukchi
Oct 24 2018 17:57
I didn't know that
But is the version the problem?.
Christopher McCormack
@cmccormack
Oct 24 2018 17:57
I don't know
all I've done is complain about the version :)
@anandpotukchi it appears to be working fine, you just don't have anything stored in your variables you're rendering
so maybe a fetch issue
Anand Potukuchi
@anandpotukchi
Oct 24 2018 17:59
@cmccormack working fine for you?
Christopher McCormack
@cmccormack
Oct 24 2018 18:00
@anandpotukchi I don't know if that API you're using supports json calls
Anand Potukuchi
@anandpotukchi
Oct 24 2018 18:00
It does
Used it before
Christopher McCormack
@cmccormack
Oct 24 2018 18:00
locally or from another service?
it has cors enabled I believe
Anand Potukuchi
@anandpotukchi
Oct 24 2018 18:00
but not in react
In jQuery
Christopher McCormack
@cmccormack
Oct 24 2018 18:00
in codepen?
Anand Potukuchi
@anandpotukchi
Oct 24 2018 18:01
Yes
You can check my other version
My jQuery version
It's working fine there
Christopher McCormack
@cmccormack
Oct 24 2018 18:03
@anandpotukchi log log log
TypeError: Failed to execute 'fetch' on 'Window': The provided value 'use-cors' is not a valid enum value of type RequestMode.
Niraj Nandish
@Nirajn2311
Oct 24 2018 18:04
@cmccormack which console are you using as I dont see that error in both codepen and chrome console
Christopher McCormack
@cmccormack
Oct 24 2018 18:05
@Nirajn2311 had to add a log to the .catch
Anand Potukuchi
@anandpotukchi
Oct 24 2018 18:05
Removed the line
@cmccormack
Christopher McCormack
@cmccormack
Oct 24 2018 18:07
please save
Anand Potukuchi
@anandpotukchi
Oct 24 2018 18:09
Did
Christopher McCormack
@cmccormack
Oct 24 2018 18:09
@anandpotukchi can you link your jquery version? I bet you're using jsonp
@cmccormack Yes
But tried changing it to JSON
Still works
Christopher McCormack
@cmccormack
Oct 24 2018 18:13
show me
Anand Potukuchi
@anandpotukchi
Oct 24 2018 18:15
Shared link
Christopher McCormack
@cmccormack
Oct 24 2018 18:15
show me it working with json
Anand Potukuchi
@anandpotukchi
Oct 24 2018 18:17
How
Open the pen and and check
Christopher McCormack
@cmccormack
Oct 24 2018 18:17
jquery is still passing along a jsonp callback even with your dataType set to json
Anand Potukuchi
@anandpotukchi
Oct 24 2018 18:18
:worried:
So
formismatic.com
Wait
Aditya
@ezioda004
Oct 24 2018 18:19
Forismatic supports JSON I think
Anand Potukuchi
@anandpotukchi
Oct 24 2018 18:20
@ezioda004 it does
Christopher McCormack
@cmccormack
Oct 24 2018 18:21
it does but not from cross-origin
he's coming from codepen so forismatic would have to add codepen to the allowed list, or allow all using *
Aditya
@ezioda004
Oct 24 2018 18:21
Ah only on HTTP?
Christopher McCormack
@cmccormack
Oct 24 2018 18:22
don't believe http has cross origin does it?
Aditya
@ezioda004
Oct 24 2018 18:22
Http -> Https cross origin
Christopher McCormack
@cmccormack
Oct 24 2018 18:22
domain to domain is cross origin isn't it?
are you sure http works?
can't use http in codepen so you would have to test from something that is http that isn't local
Aditya
@ezioda004
Oct 24 2018 18:24
@cmccormack No, I meant the API is in http and codepen is in https so thats case of mixed content
Christopher McCormack
@cmccormack
Oct 24 2018 18:25
I think it supports both in that case
but it's still cross origin from codepen
because JSONP is just sending a callback it can be used, provided the server supports it, which it appears to
Aditya
@ezioda004
Oct 24 2018 18:25
Pretty sure browser blocks those requests
Anand Potukuchi
@anandpotukchi
Oct 24 2018 18:26
Good that you see. the point
I've been asking this for two days
So what do I do now
Christopher McCormack
@cmccormack
Oct 24 2018 18:27
Do you know how to use JSONP?
Anand Potukuchi
@anandpotukchi
Oct 24 2018 18:27
Can learn
Christopher McCormack
@cmccormack
Oct 24 2018 18:27
I would recommend using an api that support cross origin personally
but maybe I can help one sec
@anandpotukchi this api supports json cross origin fyi - https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1
@anandpotukchi made this a while back to help better understand JSONP https://codepen.io/cmccormack/pen/qmgezK
you could probably copy the getJSONP function and use it in your code if you wanted
Anand Potukuchi
@anandpotukchi
Oct 24 2018 18:36
@cmccormack
Thanks
Good night.
See ya in the morning
Christopher McCormack
@cmccormack
Oct 24 2018 18:44
see ya
Nicolas Ramirez
@kamatheuska
Oct 24 2018 18:49
hey everyone! I am working on a group of components to signup, login and logout from an app
I would really appreciate some feedback: https://vue-auth-components.herokuapp.com/
There is the frontend
here is the repo with the Vue based components https://github.com/kamatheuska/proto-vue-auth
Aditya
@ezioda004
Oct 24 2018 19:26
@Nirajn2311 You here?
@Nirajn2311 Does this PR https://github.com/freeCodeCamp/freeCodeCamp/pull/27119/files doesnt need to fixed in other language guide?
Niraj Nandish
@Nirajn2311
Oct 24 2018 20:21
@ezioda004 I think it is better to fix in other languages also as if it did not work in English then it wont work in other languages
i think there is a pr for it already
Aditya
@ezioda004
Oct 24 2018 20:22
@Nirajn2311 So it all needs to be done manually, right?
Niraj Nandish
@Nirajn2311
Oct 24 2018 20:22
Yeah, you have to rename each file
the above PR has changed the file for all languages
Good night everyone
Aditya
@ezioda004
Oct 24 2018 20:24
Welp, I guess I'll close mine
See ya
idris
@idris12
Oct 24 2018 20:55
hi how can i add font awesome to this code it doesnt seem to work
$("ul").append("<li>"+ todo +" <i class="fas fa-trash"> </i> </li> <hr>");
Aditya
@ezioda004
Oct 24 2018 20:58
@idris12 Use single quotes inside i so like:
$("ul").append("<li>"+ todo +" <i class='fas fa-trash'> </i> </li> <hr>");
idris
@idris12
Oct 24 2018 21:02
Thank you