These are chat archives for FreeCodeCamp/Help

4th
Oct 2017
Justin25
@Justin25
Oct 04 2017 00:00
Thank you so much for the help, saved me 2 hours of code @korzo
CamperBot
@camperbot
Oct 04 2017 00:00
justin25 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 572 | @korzo |http://www.freecodecamp.com/korzo
korzo
@korzo
Oct 04 2017 00:00
@Justin25 Yes, that's it
@Justin25 Glad it helped
David Chen
@Obiwan777
Oct 04 2017 00:13
hi guys. anyone familiar with desktop view and mobile view switch?
I have 2 html file, one is desktop version. one is mobile version
anyone know how to add links to both page to make the switch happen by clicking the link or button
Alexander Køpke
@alexanderkopke
Oct 04 2017 00:20
@Obiwan777 usually one controls the switch from desktop to mobile via css.
David Chen
@Obiwan777
Oct 04 2017 00:21
@alexanderkopke i have been trying to google an example
but haven't find a good one
Alexander Køpke
@alexanderkopke
Oct 04 2017 00:22
@Obiwan777 do the pages look very different or do they both have css that makes it look different?
David Chen
@Obiwan777
Oct 04 2017 00:23
so desktop version, css on it is simple and straight forward
mobile version css is inherited template from jquery.mobile example
so 2 different css
more specifically one is made by myself, one is link from internet
Alexander Køpke
@alexanderkopke
Oct 04 2017 00:25
@Obiwan777 https://www.w3schools.com/css/css_rwd_mediaqueries.asp you can use media queries to make the shift. Determine when the screen should go to mobile and make that max-width in media queries, then enter css code there
David Chen
@Obiwan777
Oct 04 2017 00:26
@alexanderkopke ill look into it now. thx!
CamperBot
@camperbot
Oct 04 2017 00:26
obiwan777 sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star2: 1661 | @alexanderkopke |http://www.freecodecamp.com/alexanderkopke
Derek B. McIntire
@derekbmcintire
Oct 04 2017 00:47
Hey all, I am going through the ES6 challenges in the beta and am having trouble understanding this one about destructuring. The example given is destructuring an object which looks pretty straight forward, but then the challenge is to use destructuring to get the length of a string... https://beta.freecodecamp.org/en/challenges/es6/use-destructuring-assignment-to-assign-variables-from-objects
korzo
@korzo
Oct 04 2017 00:57
@derekbmcintire String is also object
const {length} = greeting;
Olga C
@Octopinky
Oct 04 2017 01:10

Hello everyone. Does anyone know how to open a new tab onclick in google extension from the javasript file.
As of right now, the code looks like this

function(tab) { chrome.tabs.executeScript(tab.id, {file: "content.js"}, function() { });
and it runs the code in the content.js file.
Instead of content.js file, an html file needs to be called so it would display the content.

korzo
@korzo
Oct 04 2017 01:16
@Octopinky I don't know about Chrome as build only FF extensions, but there should be tabs.create()
And you can use HTML file from extension folder
Derek B. McIntire
@derekbmcintire
Oct 04 2017 01:17
@korzo Okay... I see. that only works because length is a property of the string object. Seems like destructuring wouldn't be too useful for strings otherwise.
Olga C
@Octopinky
Oct 04 2017 01:18
@korzo oh, so, instead of using chrome.tabs.executeScript, use chrome.tabs.create, right?
Jan Shah
@JanShah
Oct 04 2017 01:18
@daddycardona I haven't used bare servers. usually i'll get cpanel and whm and do the server admin from there
korzo
@korzo
Oct 04 2017 01:18
@Octopinky Yes, and pass url to your local html
@derekbmcintire Well, maybe turn string to array [...'abc']
But that's all I can thing about right now
Olga C
@Octopinky
Oct 04 2017 01:20
@korzo going to give it a try now. Thank you.
CamperBot
@camperbot
Oct 04 2017 01:20
octopinky sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 576 | @korzo |http://www.freecodecamp.com/korzo
korzo
@korzo
Oct 04 2017 01:20
@Octopinky I use it in FF to open option page
Olga C
@Octopinky
Oct 04 2017 01:41
Yeah, that did not work. There must be some other internal command
piteto
@piteto
Oct 04 2017 01:55
@Octopinky That's the correct way to do it chrome.tabs.create, maybe some properties missing in your code? https://developer.chrome.com/extensions/tabs#method-create
Nick Ross
@codecampNick
Oct 04 2017 01:58
Hi all! I’m working on the Wikipedia viewer challange and I’m having trouble solving an issue.
I have an “<input>” hidden on page load. using Jquery, I toggle this to allow it to show. trouble is when I click enter in the text field the element is hidden again
anyone run into this before?
piteto
@piteto
Oct 04 2017 02:02
@codecampNick If your <input> is inside a <form>, use preventDefault() to prevent it from refreshing the page on submit (when you hit enter):
$('form').on('submit', function(e) {
  e.preventDefault();
});
By default, a form will send data to a server and refresh the page when you press Enter in an input field, or click a button inside the form. Here's some more info on the preventDefault() method: https://www.w3schools.com/jquery/event_preventdefault.asp
Nick Ross
@codecampNick
Oct 04 2017 02:03
thanks @piteto ! Excellent help! I’ll take a look at the documentation! :)
CamperBot
@camperbot
Oct 04 2017 02:03
:cookie: 188 | @piteto |http://www.freecodecamp.com/piteto
codecampnick sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
piteto
@piteto
Oct 04 2017 02:04
Good luck!
Alex
@cyberpunk1971
Oct 04 2017 02:05
hello all
I need some help
is there anyone around?
Nick Ross
@codecampNick
Oct 04 2017 02:06
Hey @cyberpunk1971 what’s up?
Alex
@cyberpunk1971
Oct 04 2017 02:07
Hi Nick, I am having some trouble getting an image to display from my css file
can i link a snippet for you to look at?
Nick Ross
@codecampNick
Oct 04 2017 02:07
maaaaaaybe I can help. I’d be happy to take a look!
Alex
@cyberpunk1971
Oct 04 2017 02:08
ok thx, gimme one sec to snip it
Nick Ross
@codecampNick
Oct 04 2017 02:08
no problem
Alex
@cyberpunk1971
Oct 04 2017 02:10
image.PNG
i'm not sure of the file path I need
I've tried everything
Prabu Rangki
@praburangki
Oct 04 2017 02:10
where is your css file located?
Nick Ross
@codecampNick
Oct 04 2017 02:11
maybe you need to set the width also?
Alex
@cyberpunk1971
Oct 04 2017 02:11
I set to 100%, still no good
@praburangki I have two css files. I'm using postcss
so what i save in my main css, gets created in a temp folder with another css file in it
Prabu Rangki
@praburangki
Oct 04 2017 02:12
check your developer tools console, if it says can't find the image then the path is not correct
Alex
@cyberpunk1971
Oct 04 2017 02:12
i checked dev tools
in the css section it shows whatever path I type
Prabu Rangki
@praburangki
Oct 04 2017 02:14
is it showing any errors in the console?
Alex
@cyberpunk1971
Oct 04 2017 02:14
ahhh yes
it is
files not found
sry
when i mouse over the error, it shows a path, is that what i need?
or is that what's wrong?
Prabu Rangki
@praburangki
Oct 04 2017 02:16
if you declare background-image: url('./app') then your css files needs to be the same level directory with the app directory
Nick Ross
@codecampNick
Oct 04 2017 02:17
cant figure out why pressing enter makes the text box disappear. https://codepen.io/codecampNick/pen/ZXXpXq
any help would be great!
Prabu Rangki
@praburangki
Oct 04 2017 02:18
@codecampNick because it enters the form and reload the page
Olga C
@Octopinky
Oct 04 2017 02:18
@piteto Yes, I have seen the document. Here is what I currently have chrome.tabs.create({url: "http://google.com"}, function(tab) { chrome.tabs.executeScript({file: "content.js"}, function() { }); });
Nick Ross
@codecampNick
Oct 04 2017 02:19
even with .preventDefault();?
Olga C
@Octopinky
Oct 04 2017 02:20
@piteto and what the code does, it opens a new tab, goes to google.com, then runs a script content.js. I would like the new tab when it opens to display the index.html file. Does that make sense?
Prabu Rangki
@praburangki
Oct 04 2017 02:20
@codecampNick you can make the form to be an ajax call
Nick Ross
@codecampNick
Oct 04 2017 02:21
okay, I’ll look into that. Man, the learning never stops! :)
Alex
@cyberpunk1971
Oct 04 2017 02:22
@praburangki can you help me figure out what path to write? i'm at a loss
will running postcss mess it up?
Prabu Rangki
@praburangki
Oct 04 2017 02:22
@cyberpunk1971 where is your css file located, maybe in the screenshot you can display it
Eric Miller
@ericmiller777
Oct 04 2017 02:22
hey guys
What do you think about this?
Alex
@cyberpunk1971
Oct 04 2017 02:24
filetree.PNG
@praburangki there is the full tree
Prabu Rangki
@praburangki
Oct 04 2017 02:25
@cyberpunk1971 maybe you can try url('../assets/images/image.png')
or url('./images/image.png')
Henry
@GitHub-Henry
Oct 04 2017 02:27
VS Code Users customize away!
I recommend adding the comments as well
Alex
@cyberpunk1971
Oct 04 2017 02:28
hmmm. when i moust over the error in console, it shows it going thru the temp file
i'm wondering if this is a postcss issue
Gersho
@Gersho
Oct 04 2017 02:39
@ericmiller777 hi, haven't checked yet but i love the url
looks great, not a big fan of your font choice
Henry
@GitHub-Henry
Oct 04 2017 02:45
@cyberpunk1971 to go up a directory use ../ so perhaps try "../../images/cactussunset-large.png"
does that work?
Olga C
@Octopinky
Oct 04 2017 02:47
For my google extension the index.html page is called from the background.js file:
chrome.tabs.create({'url': chrome.extension.getURL('index.html')}, function(tab) { });
And the scripts in the index.html do not run.
Alex
@cyberpunk1971
Oct 04 2017 02:48
@GitHub-Henry hi Henry, unfortunately it doesn't. When I mouse over the error in the console, it looks like it's trying to go through the temp folder I have.
I have two css folders
files i mean
Henry
@GitHub-Henry
Oct 04 2017 02:48
@cyberpunk1971 did you use ../../?
Alex
@cyberpunk1971
Oct 04 2017 02:49
i did
Eric Miller
@ericmiller777
Oct 04 2017 02:50
@Gersho its easy to change, thanks, ive owned the url for a long time
CamperBot
@camperbot
Oct 04 2017 02:50
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 504 | @gersho |http://www.freecodecamp.com/gersho
Henry
@GitHub-Henry
Oct 04 2017 02:51
so you need to find out what's going on, here's how, open chrome devtools click on network, press F5, find 404 error, click on it. that will tell you what directory you are looking in, then adjust appropriately until you hit your target. hope this helps
@cyberpunk1971
korzo
@korzo
Oct 04 2017 02:51
@Octopinky No error in console?
Alex
@cyberpunk1971
Oct 04 2017 02:52
the error in console is file not found. It's trying to go through the temp folder I have even though I don't set that as part of the file path. I'm thinking that postcss might be causing this
Henry
@GitHub-Henry
Oct 04 2017 02:53
@cyberpunk1971 i didn't say console, follow the directions
Olga C
@Octopinky
Oct 04 2017 02:53
@korzo lol. Checking.
@korzo Geez, Getting some errors : index.html:1 Refused to load the script 'https://www.gstatic.com/firebasejs/4.4.0/firebase.js' because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:".
violates the Content Security Policy
hmm.
korzo
@korzo
Oct 04 2017 02:56
@Octopinky yep, CSP sucks in extension. By default, everything is forbidden except local script
Gersho
@Gersho
Oct 04 2017 02:56
i'm thinking of setting up a VM to start learning server side stuff, but i don't really know what OS to pick
or should i go for something online ?
Henry
@GitHub-Henry
Oct 04 2017 02:56
@Gersho what are your options
i use vms
Olga C
@Octopinky
Oct 04 2017 02:57
@korzo So, the content.js would be the local script? And jquery could not be used either?
Gersho
@Gersho
Oct 04 2017 02:57
@GitHub-Henry i don't really know any apart from ubuntu server so that why i'm asking :p
korzo
@korzo
Oct 04 2017 02:58
@Octopinky Yes. To load scripts from external resources, you need change CSP. but I'm not sure how to make it in Chrome
Olga C
@Octopinky
Oct 04 2017 02:58
Well,if it is an extension to be used for others, then they would also need to change their CSP's. @korzo
Henry
@GitHub-Henry
Oct 04 2017 02:58
there may be vm software that have setup environments ready to go, look for those, see if they meet your needs
or you can just make a custom vm environment
your choice
@Gersho
korzo
@korzo
Oct 04 2017 02:59
@Octopinky And according to this page, it should be the same in Chrome
Gersho
@Gersho
Oct 04 2017 03:00
@GitHub-Henry yeah i prefer to build it myself (you don't really learn anything otherwise, and i already know how to use virtual box and ubuntu anyway)
Henry
@GitHub-Henry
Oct 04 2017 03:00
@Gersho you may want to see what potential employers are using and simulate their environments, this can be done by job listing
Gersho
@Gersho
Oct 04 2017 03:01
@GitHub-Henry nice idea, thanks
CamperBot
@camperbot
Oct 04 2017 03:01
gersho sends brownie points to @github-henry :sparkles: :thumbsup: :sparkles:
:cookie: 365 | @github-henry |http://www.freecodecamp.com/github-henry
Gersho
@Gersho
Oct 04 2017 03:01
time for some googling
Olga C
@Octopinky
Oct 04 2017 03:01
@korzo I am looking for the one that will allow everything. Like inline code and code from other resources. Thank you gor being helpful. I think I am wrapping my mind around this.
CamperBot
@camperbot
Oct 04 2017 03:01
octopinky sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 577 | @korzo |http://www.freecodecamp.com/korzo
Alex
@cyberpunk1971
Oct 04 2017 03:05
@GitHub-Henry i didn't see a 404 error
Henry
@GitHub-Henry
Oct 04 2017 03:07
@cyberpunk1971 then look for the line where your picture is referenced. on that line a status of 200 means it found the picture. a status of 404 means the picture wasn't found. what status code is returned for your picture. either it found the picture or didn't or there was a server error.
Alex
@cyberpunk1971
Oct 04 2017 03:08
i dont see anything like that in the network section
of devtools
ok wait
Henry
@GitHub-Henry
Oct 04 2017 03:09
scroll until you do
Alex
@cyberpunk1971
Oct 04 2017 03:09
lol sry
i was in images
i want css right?
Henry
@GitHub-Henry
Oct 04 2017 03:09
what is the status of your picture?
Alex
@cyberpunk1971
Oct 04 2017 03:10
failed
status
Henry
@GitHub-Henry
Oct 04 2017 03:10
with status?
Alex
@cyberpunk1971
Oct 04 2017 03:10
yeah
it shows up on ALL tab
under ALL tab
Henry
@GitHub-Henry
Oct 04 2017 03:11
keep poking around the network tab, and let me know what status code was returned by your picture
Olga C
@Octopinky
Oct 04 2017 03:11
@korzo I think I need to allow inline code only. Oh, wait. It said to download the jquery.min.js and include it with the package. Hmmm
Alex
@cyberpunk1971
Oct 04 2017 03:12
status failed
Henry
@GitHub-Henry
Oct 04 2017 03:14
@cyberpunk1971 what is the status code NUMBER
the number tells you what happened
Alex
@cyberpunk1971
Oct 04 2017 03:14
it doesn't have one, it says FAILED in red, under status
Henry
@GitHub-Henry
Oct 04 2017 03:15
expand the network tab page and send a picture of it
Alex
@cyberpunk1971
Oct 04 2017 03:15
"type" is blank as well
not sure if that means anything
Henry
@GitHub-Henry
Oct 04 2017 03:15
make sure the picture is easily seen when you take the picture
Alex
@cyberpunk1971
Oct 04 2017 03:16
i even moved to pic file into the main folder and it didn't show with just "image".png
Henry
@GitHub-Henry
Oct 04 2017 03:16
to make things easy put the image in the css folder then simply use the picture name
easy peasy
korzo
@korzo
Oct 04 2017 03:18
@Octopinky I solved it using webpack.
Alex
@cyberpunk1971
Oct 04 2017 03:18
i have two css folders
lol
i write the css in the main, and it gets piped to the temp css
then displayed
at least that's the idea
Henry
@GitHub-Henry
Oct 04 2017 03:19
why
Alex
@cyberpunk1971
Oct 04 2017 03:19
i'm using postcss
it's a processor
like less
Henry
@GitHub-Henry
Oct 04 2017 03:19
why use postcss?
Alex
@cyberpunk1971
Oct 04 2017 03:22
i want to use a little js in my project
Henry
@GitHub-Henry
Oct 04 2017 03:22
why do you need postcss to do that?
korzo
@korzo
Oct 04 2017 03:22
@Octopinky But if you have only jQuery, it's easier to download and put inside extension's folder or use Bower for easier updates
Alex
@cyberpunk1971
Oct 04 2017 03:22
well, it has other plugin also
autoprefixer
Henry
@GitHub-Henry
Oct 04 2017 03:23
i never heard of postcss, but almost Everyone has heard of gulp and webpack, those are much better since they are industry standards
you might consider those instead
i use gulp-autoprefixer
Alex
@cyberpunk1971
Oct 04 2017 03:25
i'm using gulp as well
for tasks
Henry
@GitHub-Henry
Oct 04 2017 03:26
so why not use gulp to do those things for you
Olga C
@Octopinky
Oct 04 2017 03:26
@korzo There is jquery, underscore and firebase for scripts. And then bootstrap for the css. Thats going to be a huge extention. Well, maybe for the purpose of practise I can try downloading all those and packing them intoo 1 extension. I would imagine that the extention would be byte-heavy.
Henry
@GitHub-Henry
Oct 04 2017 03:27
you can simply add a pipe to your css processing and shazam it's done
ok you need to do an install and a few other things
still don't understand why you need postcss, especially if you are using gulp
korzo
@korzo
Oct 04 2017 03:30
@Octopinky That's why I use Webpack. I have a lot of scripts, templates, SASS...
It's easier to maintain and build.
I would not be afraid of extension's size.
Most extensions have a lot of files.
Alex
@cyberpunk1971
Oct 04 2017 03:30
postcss is a preprocessor
i'm new ok
i don't know it all yet
i think it also help for older browsers that can't read all the new css things
Henry
@GitHub-Henry
Oct 04 2017 03:31
@cyberpunk1971 you are doubling up, it's like having two hammers, one will do. Gulp and Webpack are industry standards so it's better to use one of those, Gulp has a lower learning curve. Gulp has an autoprefixer called gulp-autoprefixer
Alex
@cyberpunk1971
Oct 04 2017 03:32
too late now haha
i'm already into it
Henry
@GitHub-Henry
Oct 04 2017 03:32
@cyberpunk1971 it's all part of learning
korzo
@korzo
Oct 04 2017 03:32
@GitHub-Henry PostCSS is quite popular.
Advantage is that it has own plugin system to manipulate CSS
Henry
@GitHub-Henry
Oct 04 2017 03:33
@korzo I'm learning today, what is a plugin system to manipulate CSS
Olga C
@Octopinky
Oct 04 2017 03:34
Thank you @korzo . You have been very helpful. I will try to implement the changes tomorrow.
CamperBot
@camperbot
Oct 04 2017 03:34
octopinky sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
api offline
Henry
@GitHub-Henry
Oct 04 2017 03:34
@korzo i guess i can google that
korzo
@korzo
Oct 04 2017 03:36
@GitHub-Henry Advantage when creating plugin is, that CSS is already parsed and you get rule as parameter to plugin.
It has like 200 different plugins...
@Octopinky Glad to help. Happy coding
Henry
@GitHub-Henry
Oct 04 2017 03:40
@korzo I googled postcss plugins, now i get it, there is premade js that can manipulate css easily, got it
korzo
@korzo
Oct 04 2017 03:41
@GitHub-Henry yeah. Also it has loaders/runners for all build tools.
@GitHub-Henry Also I think it's easier to use for people not familiar with Gulp/webpack
Henry
@GitHub-Henry
Oct 04 2017 03:44
@korzo @cyberpunk1971 thanks for introducing me to postcss, looks interesting
CamperBot
@camperbot
Oct 04 2017 03:44
github-henry sends brownie points to @korzo and @cyberpunk1971 :sparkles: :thumbsup: :sparkles:
:cookie: 578 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 211 | @cyberpunk1971 |http://www.freecodecamp.com/cyberpunk1971
Alex
@cyberpunk1971
Oct 04 2017 03:44
thx @GitHub-Henry
Henry
@GitHub-Henry
Oct 04 2017 03:44
@korzo how did you learn webpack
@cyberpunk1971 np
@cyberpunk1971 you never sent the pic of the network tab, did you get it working
Alex
@cyberpunk1971
Oct 04 2017 03:45
i didn't
i even moved the file into the root folder and it still doesn't work
i think postcss is messing it up, or rather, the way i have things set up
korzo
@korzo
Oct 04 2017 03:46
@GitHub-Henry I used it in one project, mostly trial/error, google and documentation :)
Alex
@cyberpunk1971
Oct 04 2017 03:46
i can get it to show if I place it html using img src
but it's getting late and i've been at this for awhile
Henry
@GitHub-Henry
Oct 04 2017 03:47
@cyberpunk1971 good luck, gn
Alex
@cyberpunk1971
Oct 04 2017 03:47
thanks everyone good night
Henry
@GitHub-Henry
Oct 04 2017 03:47
@korzo did you mention webpack uses less space than gulp
cuz of the plugins
korzo
@korzo
Oct 04 2017 03:48
@GitHub-Henry No and I don't think so
If we are talking about size of node_modules
Henry
@GitHub-Henry
Oct 04 2017 03:51
by the time you transpile, sourcemap autoprefix, concat files, minify css, provide for error processing, move to build folders, then do similar to js, and html the number of plugins begin to add up
and space for several projects begins to add up
i wondered if webpack did all that with less space than gulp
Darren
@DarrenfJ
Oct 04 2017 03:52
thanks to the regulars @daddycardona @Gersho @khaduch @piteto @DarrenfJ @Manish-Giri @longnt80 @GitHub-Henry
CamperBot
@camperbot
Oct 04 2017 03:52
darrenfj sends brownie points to @daddycardona and @gersho and @khaduch and @piteto and @manish-giri and @longnt80 and @github-henry :sparkles: :thumbsup: :sparkles:
:cookie: 189 | @piteto |http://www.freecodecamp.com/piteto
:cookie: 368 | @daddycardona |http://www.freecodecamp.com/daddycardona
:cookie: 505 | @gersho |http://www.freecodecamp.com/gersho
:cookie: 581 | @longnt80 |http://www.freecodecamp.com/longnt80
:cookie: 366 | @github-henry |http://www.freecodecamp.com/github-henry
:star2: 3336 | @khaduch |http://www.freecodecamp.com/khaduch
:star2: 6616 | @manish-giri |http://www.freecodecamp.com/manish-giri
Darren
@DarrenfJ
Oct 04 2017 03:52
@cyberpunk1971 night brutha :D
Henry
@GitHub-Henry
Oct 04 2017 03:52
@DarrenfJ hi there
Darren
@DarrenfJ
Oct 04 2017 03:52
@GitHub-Henry hey man.. how goes it?
Long Nguyen
@longnt80
Oct 04 2017 03:53
@DarrenfJ ty
CamperBot
@camperbot
Oct 04 2017 03:53
longnt80 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2078 | @darrenfj |http://www.freecodecamp.com/darrenfj
Henry
@GitHub-Henry
Oct 04 2017 03:53
@DarrenfJ it goes, how about you
Darren
@DarrenfJ
Oct 04 2017 03:53
il marche as well
oh forgot to thank @heroiczero as well
CamperBot
@camperbot
Oct 04 2017 03:53
darrenfj sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1813 | @heroiczero |http://www.freecodecamp.com/heroiczero
Henry
@GitHub-Henry
Oct 04 2017 03:53
@DarrenfJ ty for the brownies
@DarrenfJ thanks
CamperBot
@camperbot
Oct 04 2017 03:54
github-henry sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2079 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Oct 04 2017 03:54
:D no worries
trying to thank people who regularly come in here and help out even now when it's so sparse :D
Manish Giri
@Manish-Giri
Oct 04 2017 03:54
@DarrenfJ @heroiczero ty :cookie:
CamperBot
@camperbot
Oct 04 2017 03:54
manish-giri sends brownie points to @darrenfj and @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 2080 | @darrenfj |http://www.freecodecamp.com/darrenfj
:star2: 1814 | @heroiczero |http://www.freecodecamp.com/heroiczero
Manish Giri
@Manish-Giri
Oct 04 2017 03:55
@DarrenfJ :wave:
korzo
@korzo
Oct 04 2017 03:55
@GitHub-Henry Well, you don't have to have all projects installed, if space is a problem.
Clone + install, when your are going to work on project, then commit, push and delete.
I do it like this with most of the projects I don't work on daily
Henry
@GitHub-Henry
Oct 04 2017 03:55
@DarrenfJ i got original star trek playing in the background today, so fun
Kyle Holm
@thekholm80
Oct 04 2017 03:56
@DarrenfJ :wave:
Henry
@GitHub-Henry
Oct 04 2017 03:56
@korzo yup, good practice
Darren
@DarrenfJ
Oct 04 2017 03:56
hey guys :D
@GitHub-Henry that's cool. Haven;t seen the new one (discovery) but a local comedy improv is person is a klingon in it.. so it's all the buzz
plus there's a troup that does a star trek night here
Henry
@GitHub-Henry
Oct 04 2017 03:59
@DarrenfJ check out Star Trek Continues
a group of Trekies continued the story, and did a descent job
Ken Haduch
@khaduch
Oct 04 2017 03:59
@DarrenfJ - thanks for adding a little life to the place. :) It used to be a really active and fun interaction with coding and helping. It seems to be picking up a little bit lately - but definitely a big change from the "good old days"...
CamperBot
@camperbot
Oct 04 2017 03:59
khaduch sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2081 | @darrenfj |http://www.freecodecamp.com/darrenfj
Long Nguyen
@longnt80
Oct 04 2017 04:02
@khaduch because FCC removed the link to here?
Darren
@DarrenfJ
Oct 04 2017 04:02
@GitHub-Henry cool thanks for the link
CamperBot
@camperbot
Oct 04 2017 04:02
darrenfj sends brownie points to @github-henry :sparkles: :thumbsup: :sparkles:
api offline
Darren
@DarrenfJ
Oct 04 2017 04:03
@khaduch yah defnitely miss the ole days of helping 10 15 people out in an hour
thanks for the kudos :D @khaduch
CamperBot
@camperbot
Oct 04 2017 04:03
darrenfj sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
api offline
Long Nguyen
@longnt80
Oct 04 2017 04:04
even the camperbot left us
Gersho
@Gersho
Oct 04 2017 04:04
:wave: everyone
Henry
@GitHub-Henry
Oct 04 2017 04:05
@Gersho hey there
Kyle Holm
@thekholm80
Oct 04 2017 04:05
@Gersho :wave:
Darren
@DarrenfJ
Oct 04 2017 04:07
@Gersho hey buddy!
and super funny too.. in a hip hop improv troupe
Gersho
@Gersho
Oct 04 2017 04:08
oh yeah heard about the new Trek series, i'm more of a Stargate fan
i'll watch if there's some Borg story arc
Darren
@DarrenfJ
Oct 04 2017 04:10
i haven't seen it yet either.. but looking forward to it
Gersho
@Gersho
Oct 04 2017 04:16
...this is the third time i have to restart an ubuntu install because i wasn't paying attention properly
Henry
@GitHub-Henry
Oct 04 2017 04:33
@Gersho you must have a fast machine
Gersho
@Gersho
Oct 04 2017 04:35
ubuntu server isn't really heavy (and i messed up in the initial config so the install never completed)
Henry
@GitHub-Henry
Oct 04 2017 04:47
@Gersho so is ubuntu your new vm?
Gersho
@Gersho
Oct 04 2017 04:47
yep
Henry
@GitHub-Henry
Oct 04 2017 04:48
@Gersho what was the deciding factor?
Gersho
@Gersho
Oct 04 2017 04:48
i don't really know yet where i plan to apply to trying to use their method was not possible
so i went for the do it yourself rather than a prepackaged whatever
Henry
@GitHub-Henry
Oct 04 2017 05:15
@Gersho do you use multiple monitors
Gersho
@Gersho
Oct 04 2017 05:17
i do, haven't really set a good workflow with them yet tho, but that's rather irrelevant for my server since i connect to it via ssh
but haven't really done anything with it yet, still reading django doc
Henry
@GitHub-Henry
Oct 04 2017 05:19
@Gersho any problems getting to your desired monitor configuration?
with the vms
actually, sounds like that may not actually be an issue since you connect via ftp
nvm
Gersho
@Gersho
Oct 04 2017 05:20
haven't really tried, i try to act as if it is a remote server so i didn't really use the vm screen after sudo passwd and openssh install
but since i have a 4/3 and a 16/9 it could prove troublesome
i've heard of gpu passthrough to allow the gpu to be used directly and only by the vm (the guy used that for games)
Henry
@GitHub-Henry
Oct 04 2017 05:24
@Gersho i use both (i don't use gpu passthrough), it may not be a problem
4/3 and 16/9 normal use here
@Gersho actually, no problem once it gets going, i seem to need to fiddle with it for a bit before it works, that's what i was going to ask, do you get it to work immediately, or do you have to fiddle with it to get it working?
Gersho
@Gersho
Oct 04 2017 05:28
the screen size or the vm in general ?
Henry
@GitHub-Henry
Oct 04 2017 05:29
@Gersho the vm
@Gersho the screens work fine, but getting the vms to use them as desired takes some tweaking before the work correctly
Gersho
@Gersho
Oct 04 2017 05:30
had already used virtualbox before, had to google how to set up the network card because i couldn't remember but apart from that no issue
Henry
@GitHub-Henry
Oct 04 2017 05:30
@Gersho ok thanks
CamperBot
@camperbot
Oct 04 2017 05:30
github-henry sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 506 | @gersho |http://www.freecodecamp.com/gersho
Gersho
@Gersho
Oct 04 2017 05:30
oh you mean it doesn't save what screen the vm is supposed to be, it's size, stuff like that ?
Henry
@GitHub-Henry
Oct 04 2017 05:31
@Gersho yeah, for some reason my vm reverts to one screen, and i need to tweek the use of multiple screens before the vm get's it right
Gersho
@Gersho
Oct 04 2017 05:32
i think this also depends on the host OS, for exemple, some will remember your setting when you plug a second screens others won't
and if you have multiple VM, maybe virtual box only remembers one window position ?
Henry
@GitHub-Henry
Oct 04 2017 05:33
@Gersho thanks, i'll need to play around with the settings a bit more, perhaps i can get it to work the way i'd like
CamperBot
@camperbot
Oct 04 2017 05:33
github-henry sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
api offline
Gersho
@Gersho
Oct 04 2017 05:34
i don't remember what they are since i never use them, but there's some cool keyboard shortcuts to switch a window from a screen to another, resize it, etc
or maybe setup a script to open your vm at a specific place
Henry
@GitHub-Henry
Oct 04 2017 05:35
good ideas to consider
Gersho
@Gersho
Oct 04 2017 05:35
tho i have no idea how to do them :P
Henry
@GitHub-Henry
Oct 04 2017 05:38
@Gersho it's a minor issue, so it'll probably be a while before i get to it, kinda like a mosquito buzzing in your ear, a pest you'd rather not have a round
Gersho
@Gersho
Oct 04 2017 05:39
oh yeah the minor issues...i have plenty of those too
Irons
@IronsYoung
Oct 04 2017 06:22
I don‘t know how to do it
aaaaaa
Gersho
@Gersho
Oct 04 2017 06:22
bbb
Gersho
@Gersho
Oct 04 2017 06:38
good night everyone
Irons
@IronsYoung
Oct 04 2017 06:42
emm,good afternoon。。。
Hi,where you are?
Irons
@IronsYoung
Oct 04 2017 07:05
Good quiet。。
ok,,I might as well continue to brush course
Darren
@DarrenfJ
Oct 04 2017 07:59
@Gersho night buddy :D
Darren
@DarrenfJ
Oct 04 2017 08:10
I'm also off to bed.. night everyone.. and code on :D
thanks @Manish-Giri @daddycardona @Gersho @khaduch @piteto @Manish-Giri @longnt80 @GitHub-Henry @heroiczero night guys :D
CamperBot
@camperbot
Oct 04 2017 08:11
darrenfj sends brownie points to @manish-giri and @daddycardona and @gersho and @khaduch and @piteto and @longnt80 and @github-henry and @heroiczero :sparkles: :thumbsup: :sparkles:
:cookie: 507 | @gersho |http://www.freecodecamp.com/gersho
:cookie: 190 | @piteto |http://www.freecodecamp.com/piteto
:cookie: 583 | @longnt80 |http://www.freecodecamp.com/longnt80
:cookie: 369 | @daddycardona |http://www.freecodecamp.com/daddycardona
:star2: 3337 | @khaduch |http://www.freecodecamp.com/khaduch
:cookie: 367 | @github-henry |http://www.freecodecamp.com/github-henry
:star2: 1815 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 6617 | @manish-giri |http://www.freecodecamp.com/manish-giri
Henry
@GitHub-Henry
Oct 04 2017 08:32
@DarrenfJ gn, thanks for the brownies
CamperBot
@camperbot
Oct 04 2017 08:32
:star2: 2082 | @darrenfj |http://www.freecodecamp.com/darrenfj
github-henry sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
Long Nguyen
@longnt80
Oct 04 2017 08:51
@DarrenfJ night, ty for :cookie: :star2:
CamperBot
@camperbot
Oct 04 2017 08:51
longnt80 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2083 | @darrenfj |http://www.freecodecamp.com/darrenfj
Long Nguyen
@longnt80
Oct 04 2017 08:56
question about react/jsx:
<div className="default">
how can add extra class in here using js, something like this:
<div className="default {extravariable}">
heroiczero
@heroiczero
Oct 04 2017 10:25
@DarrenfJ @Manish-Giri @GitHub-Henry @korzo @Gersho @longnt80 @thekholm80 TY for keep visiting and helping people :)
CamperBot
@camperbot
Oct 04 2017 10:25
heroiczero sends brownie points to @darrenfj and @manish-giri and @github-henry and @korzo and @gersho and @longnt80 and @thekholm80 :sparkles: :thumbsup: :sparkles:
:cookie: 579 | @korzo |http://www.freecodecamp.com/korzo
:star2: 2084 | @darrenfj |http://www.freecodecamp.com/darrenfj
:star2: 1497 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:cookie: 368 | @github-henry |http://www.freecodecamp.com/github-henry
:cookie: 508 | @gersho |http://www.freecodecamp.com/gersho
:star2: 6618 | @manish-giri |http://www.freecodecamp.com/manish-giri
:cookie: 584 | @longnt80 |http://www.freecodecamp.com/longnt80
Zach Berwaldt
@zberwaldt
Oct 04 2017 11:44
@Gersho Thank you! There are QR codes, but I've never seen one on a business card before.
CamperBot
@camperbot
Oct 04 2017 11:44
zberwaldt sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 509 | @gersho |http://www.freecodecamp.com/gersho
Stephen James
@sjames1958gm
Oct 04 2017 11:45
@longnt80
maybe this or create a different variable
<div className="{"default " + extravariable}">

@longnt80
var c = "default " + extravariable;

<div className="{c}">

Long Nguyen
@longnt80
Oct 04 2017 11:46
@sjames1958gm yes I did something like the former you showed
thanks btw
CamperBot
@camperbot
Oct 04 2017 11:46
longnt80 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8509 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Oct 04 2017 11:48
@longnt80 :+1:
santhoshbalaguru001
@santhoshbalaguru001
Oct 04 2017 13:02
did anyone has done inventory project?
Tiago Correia
@tiagocorreiaalmeida
Oct 04 2017 13:08
@santhoshbalaguru001 link=
can't remember it
santhoshbalaguru001
@santhoshbalaguru001
Oct 04 2017 13:09
@tiagocorreiaalmeida haha Thank you
CamperBot
@camperbot
Oct 04 2017 13:09
santhoshbalaguru001 sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 378 | @tiagocorreiaalmeida |http://www.freecodecamp.com/tiagocorreiaalmeida
Tiago Correia
@tiagocorreiaalmeida
Oct 04 2017 13:10
what do you mean? asked for the link to try to help?
santhoshbalaguru001
@santhoshbalaguru001
Oct 04 2017 13:12
Im not asking a link , i need model to do inventory web application , thats why I ASKED
@tiagocorreiaalmeida
Tiago Correia
@tiagocorreiaalmeida
Oct 04 2017 13:14
the only thing that talks about inventoryits and avdavanced algorithm from fcc
its that or?
santhoshbalaguru001
@santhoshbalaguru001
Oct 04 2017 13:15
ya i m still not completed my fcc, for my project purpose am asking
Altin Rrahmani
@DevKosov
Oct 04 2017 13:16
@santhoshbalaguru001 what project are you asking for?
santhoshbalaguru001
@santhoshbalaguru001
Oct 04 2017 13:17
inventory project , its not under fcc
@DevKosov
Tiago Correia
@tiagocorreiaalmeida
Oct 04 2017 13:18
can you give me a link or something?
Altin Rrahmani
@DevKosov
Oct 04 2017 13:19
i dont understand you @santhoshbalaguru001
can you be more specific?
santhoshbalaguru001
@santhoshbalaguru001
Oct 04 2017 13:21
while running in local im getting error
Screenshot (16).png
Tiago Correia
@tiagocorreiaalmeida
Oct 04 2017 13:23
that's php mate
santhoshbalaguru001
@santhoshbalaguru001
Oct 04 2017 13:23
php mate means can you tellme clearly
i don't know php
@tiagocorreiaalmeida
Tiago Correia
@tiagocorreiaalmeida
Oct 04 2017 13:27
?
santhoshbalaguru001
@santhoshbalaguru001
Oct 04 2017 13:28
yes
Tiago Correia
@tiagocorreiaalmeida
Oct 04 2017 13:30
fcc is not related to php you didnt mention before it was about php so I tried to help, dont knwo whart you expect, hope someone can help you gl
Mario Madrigal
@jrmadrigal
Oct 04 2017 13:54
Hello world!
Razvan
@razvanlikespizza
Oct 04 2017 14:00
Hello universe!
Stephen James
@sjames1958gm
Oct 04 2017 14:03
@razvanlikespizza Hello
@jrmadrigal Hello
Razvan
@razvanlikespizza
Oct 04 2017 14:04
@sjames1958gm How's your day going so far?
Stephen James
@sjames1958gm
Oct 04 2017 14:04
Great! getting stuff to work
Sandeep Chary
@dsandeepchary
Oct 04 2017 14:45
Hello guys!
Razvan
@razvanlikespizza
Oct 04 2017 14:47
@sjames1958gm Great!
Hi there
Stephen James
@sjames1958gm
Oct 04 2017 14:48
@dsandeepchary Hello
Sandeep Chary
@dsandeepchary
Oct 04 2017 14:49
Whats up?
Razvan
@razvanlikespizza
Oct 04 2017 14:49
Just finished homework I can code now, damnn...<3
Sandeep Chary
@dsandeepchary
Oct 04 2017 14:49
Oh great!
Razvan
@razvanlikespizza
Oct 04 2017 14:49
How was your day? @dsandeepchary
Sandeep Chary
@dsandeepchary
Oct 04 2017 14:49
Here and there!
how was yours?
Razvan
@razvanlikespizza
Oct 04 2017 14:51
Any coding today? @dsandeepchary
It was oke.
Sandeep Chary
@dsandeepchary
Oct 04 2017 14:55
I code everyday.
Razvan
@razvanlikespizza
Oct 04 2017 14:58
Oh really? How do you manage to do that?
Sandeep Chary
@dsandeepchary
Oct 04 2017 14:58
I am a junior dev.
so, If I don't code, they will fire me. :D . Simple.
Razvan
@razvanlikespizza
Oct 04 2017 15:03
You have a job?
Pethaf
@Pethaf
Oct 04 2017 15:32
@razvanlikespizza You do C++?
Razvan
@razvanlikespizza
Oct 04 2017 15:42
@Pethaf No...what made you think that? : )
Pethaf
@Pethaf
Oct 04 2017 15:53
Never mind.
I think this cold is making me write things without thinking first.
Sorry.
Razvan
@razvanlikespizza
Oct 04 2017 16:06
How to make a button that changes itself when its clicked?
@Pethaf You dont have to feel bad, its just a simple question. No problem
Pethaf
@Pethaf
Oct 04 2017 16:07
@razvanlikespizza Changes in what way?
Razvan
@razvanlikespizza
Oct 04 2017 16:07
Like a swtich button, on/off @oetkenr
piteto
@piteto
Oct 04 2017 16:11
@razvanlikespizza Here's a tutorial for a toggle switch: https://www.w3schools.com/howto/howto_css_switch.asp
Kyle Holm
@thekholm80
Oct 04 2017 16:29
@razvanlikespizza here is a toggle switch i made using canvas https://codepen.io/thekholm80/pen/dRPyOR
Joshua Arnett
@josha5
Oct 04 2017 16:38
     var targets = [("#0"), ("#1"), ("#2"), $("#3"), $("#4"), $("#5"), $("#6"), $("#7")
                   , $("#8")];
   $(cells).on("click", function() {
      $(this).text(humanPlayer);
        if($(targets[0]) === humanPlayer && $(targets[1]) === humanPlayer && $(targets[2]) === humanPlayer) {
            $("#win").text("You Won!")
           }
   });
Why isn't this working? I'm building a tic tac toe game and I made an array with my target IDS. If 3 items in a row are equal to the human Player I want to show the text "You Win" on the screen.
Alexander Køpke
@alexanderkopke
Oct 04 2017 16:42
@josha5 what are you selecting with $(cells) ?
Joshua Arnett
@josha5
Oct 04 2017 16:43
Ill paste my codepen
Razvan
@razvanlikespizza
Oct 04 2017 16:50
@thekholm80 woah, thats advanced, hardcore. but thanks
CamperBot
@camperbot
Oct 04 2017 16:50
razvanlikespizza sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1498 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Razvan
@razvanlikespizza
Oct 04 2017 16:50
@piteto thanks, let me take a look
CamperBot
@camperbot
Oct 04 2017 16:50
razvanlikespizza sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 193 | @piteto |http://www.freecodecamp.com/piteto
Alexander Køpke
@alexanderkopke
Oct 04 2017 16:50
@josha5 $(targets[0]) isn't equal to the text of the cell. You'll need $(targets[0]).text() to have access to it
Joshua Arnett
@josha5
Oct 04 2017 16:52
@alexanderkopke Thank you!
CamperBot
@camperbot
Oct 04 2017 16:52
josha5 sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star2: 1662 | @alexanderkopke |http://www.freecodecamp.com/alexanderkopke
Aita Kane
@aita-kane
Oct 04 2017 17:22
hello i found a code snippet on a slideshow the pen : https://codepen.io/StephenScaff/pen/dWmJxj but i can't resize the image of the class velo-slide__figure so please can someone help me please
Igor
@flipmotion
Oct 04 2017 17:49
I looking for job on react redux, any can help where search?
Alex
@alexandrupintilei
Oct 04 2017 18:35
Can someone help me to configurate VSC so i can debug?js
Manish Giri
@Manish-Giri
Oct 04 2017 18:38
@DarrenfJ @heroiczero ty, fellow code warriors
CamperBot
@camperbot
Oct 04 2017 18:38
manish-giri sends brownie points to @darrenfj and @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1819 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 2085 | @darrenfj |http://www.freecodecamp.com/darrenfj
Dušan Todorović
@krckyboy
Oct 04 2017 19:07
How much would hosting cost per month if you were to upload videos to your website of 1080p quality? I know it's a vague question, but I really don't know how much would it cost me to run a website with the idea of having quite a few videos there, and keep uploading and whatnot. Any links or directions would be appreciated. Thanks in advance!
Tiago Correia
@tiagocorreiaalmeida
Oct 04 2017 19:09
@krckyboy how about upload them to youtube and pick the link then insert into the website?
Dušan Todorović
@krckyboy
Oct 04 2017 19:10
@tiagocorreiaalmeida I would want to secure it so only premium members are able to see it, and to secure it from downloading / piracy.
Gersho
@Gersho
Oct 04 2017 19:11

@tiagocorreiaalmeida and to secure it from downloading / piracy.

good luck with that ^^

artbohr
@artbohr
Oct 04 2017 19:39
Guys, can you suggest a good editing method for the current project state? Not a modal method.
https://codepen.io/artbohr/pen/GvXxwY?editors=0010
by editing method I mean: a way to edit the recipe
Gersho
@Gersho
Oct 04 2017 19:43
a button next to the recipe, clicking it would open a form where the field would already be filled the current recipe data, the user can edit them and then click confirm, the content of the form then replace the previous recipe (sorry i don't know what modal means xD)
artbohr
@artbohr
Oct 04 2017 19:45
@gersho not very helpful tbh :D
piteto
@piteto
Oct 04 2017 19:52
@artbohr what do you have against modals?
you can make them inline, I suppose - nav tabs for an image, title, ingredients. inline forms for quantity + ingredient
only tune for recipes rather than a store checkout
Check this link for some best practices: https://webapphuddle.com/inline-edit-design/
@Gersho modal = dialog, like an error message, or one of these in bootstrap: https://getbootstrap.com/docs/3.3/javascript/#modals-examples
Gersho
@Gersho
Oct 04 2017 19:56
oh i'll call that "please disable adblock"
^^
thanks @piteto
CamperBot
@camperbot
Oct 04 2017 19:56
gersho sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 195 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Oct 04 2017 19:56
lol, roughly the same thing @Gersho :)
It's called a "Modal" because it creates a mode that disables the main window
Really bad ads do that too
Gersho
@Gersho
Oct 04 2017 19:57
but your suggestion is more or less the same than mine so he won't like it :p
i kinda like the screenshot, think i'll do something like that when i start the recipe app
artbohr
@artbohr
Oct 04 2017 19:57
@piteto nothing in special, just was curious about what other tecniques may be applied to this problem, also one little caveat with modals in this project is, my add recipe button uses a simple form, so I wasn't looking to change that, so not sure yet If I should (to make it more alike the add and edit options) thanks!
CamperBot
@camperbot
Oct 04 2017 19:57
:cookie: 196 | @piteto |http://www.freecodecamp.com/piteto
artbohr sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
Gersho
@Gersho
Oct 04 2017 19:58

Really bad ads do that too

no really bad ads capture the whole window, you click wherever and you get more ads xD

piteto
@piteto
Oct 04 2017 19:58
@artbohr Good opportunity to play around with some fun UX
And play sounds @Gersho :joy:
warning! warning! your computer is infected!
click here and download this tool to clean your computer!
Gersho
@Gersho
Oct 04 2017 19:59
remember back on IE6 when they could trigger multiple window open when you window close ?
it never ended
piteto
@piteto
Oct 04 2017 19:59
yes lol
task manger -> kill iexplore.exe
Alex Brown
@webtechalex
Oct 04 2017 20:24
Hi Guys. Not directly FCC related, but I’m trying to access the Codewars API using fetch in a React component. I’m getting an ‘Unexpected end of input’ error in the Chrome console. Any ideas? Here is the componentDidMount() method that is making the call:
  componentDidMount() {
    fetch('https://www.codewars.com/api/v1/users/webtechalex', {mode: 'no-cors'})
      .then(response => response.json())
      .then(json => this.setState({data: json}));
  }
It’s weird because I have used this method to make API calls in FCC projects, and other projects for that matter, but it doesn’t work with this particular API.
Gersho
@Gersho
Oct 04 2017 20:26
i don't know sorry, but i think codewars has gitter rooms too
piteto
@piteto
Oct 04 2017 20:30
@webtechalex They don't support CORS, so you'd need to use a proxy: https://cors-anywhere.herokuapp.com/https://www.codewars.com/api/v1/users/webtechalex
This works:
fetch('https://cors-anywhere.herokuapp.com/https://www.codewars.com/api/v1/users/webtechalex')
  .then(res => res.json())
  .then(console.log)
  .catch(console.error);
Alex Brown
@webtechalex
Oct 04 2017 20:31
amazing! Thanks @piteto
CamperBot
@camperbot
Oct 04 2017 20:31
webtechalex sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 197 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Oct 04 2017 20:32
No problem - I've had mixed results with that proxy server, best to set up your own if you can :)
Alex Brown
@webtechalex
Oct 04 2017 20:32
How does that affect a real deployment? You have to use a proxy when building and depolying a real application that uses the CW API?
piteto
@piteto
Oct 04 2017 20:33
For a production-level deployment, you'd want to set up the proxy
The software is reliable and fairly easy to set up: https://github.com/Rob--W/cors-anywhere/
Just a matter of appending the appropriate headers - can't be done from the client/front end
Or...maybe you can get whitelisted by the folks at codewars?
Ygor Dantas
@ygordantas
Oct 04 2017 21:46
hey guys does anybody know why do I keep getting this error ? On my text
editor everthing works fine, but when I try on the FCC website it says error
Screen Shot 2017-10-04 at 4.44.53 PM.png
korzo
@korzo
Oct 04 2017 21:49
@ygordantas I think problem is that you don't check for existence of prop in 2.else if
Ygor Dantas
@ygordantas
Oct 04 2017 21:50
but it does not make any sense why it works on my text editor and It does not work on the fcc website ?
korzo
@korzo
Oct 04 2017 21:50
@ygordantas and you are accessing .length on undefined
Ygor Dantas
@ygordantas
Oct 04 2017 21:51
yes but if I console log .length it shows 3. So its not undefined :/
@korzo Yo it worked! Man these things are so annoying lol. Thank you
CamperBot
@camperbot
Oct 04 2017 21:53
ygordantas sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 582 | @korzo |http://www.freecodecamp.com/korzo
Henry
@GitHub-Henry
Oct 04 2017 22:39
@heroiczero thanks for the brownies
CamperBot
@camperbot
Oct 04 2017 22:39
github-henry sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1820 | @heroiczero |http://www.freecodecamp.com/heroiczero
Yaroslav
@YariPL
Oct 04 2017 23:12
hello everybody. what is exactly SEO and SEM (PPC) ?
Gersho
@Gersho
Oct 04 2017 23:21
SEO is all the dirty tricks to get a good place in google search
SEM is a company that does that
PPC is pay per click, one of the pricing method for such thing
Eric Miller
@ericmiller777
Oct 04 2017 23:37
hey guys
got the welcome to react thing started
no idea wtf to do now :P im watching a tutorial series, any recommendations?
Gersho
@Gersho
Oct 04 2017 23:40
i did the one on code academy, people often recommend the official doc
:wave:
i'd start with the leaderboard, i think it's easier than markdown
Eric Miller
@ericmiller777
Oct 04 2017 23:55
@Gersho thanks
CamperBot
@camperbot
Oct 04 2017 23:55
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 511 | @gersho |http://www.freecodecamp.com/gersho