These are chat archives for FreeCodeCamp/Help

25th
Oct 2017
Eunice Park
@eunicode
Oct 25 2017 00:38
@longnt80 thanks for the reply. SCSS compiles successfully when I use Atom instead of VSCode. From what I've read, my best guess is that my hard drive is slow at writing, so while the scss file is being saved, the scss file is inaccessible, resulting in a failure to be compiled. I think Atom works bc it has a different saving method than VSCode. I think the solution is to edit chokidar(?) to wait temporarily until the file is done being saved before processing it.
CamperBot
@camperbot
Oct 25 2017 00:38
eunipa sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 608 | @longnt80 |http://www.freecodecamp.com/longnt80
Long Nguyen
@longnt80
Oct 25 2017 01:04

@eunipa

to wait temporarily until the file is done being saved before processing it.

That was the solution I found on StackOverflow and from node-sass github page

Jill Lee
@jill-lee
Oct 25 2017 02:42
How much should i charge for 2 construction companies ....looking for a rough ballpark estimate of cost. All pics, writing and info has already been put together and will be provided before commencement of work. The websites would consist of main page, about us page, contact us page and a few pages with different categories & pics and testimonials from customers
gigi
@zqzxy
Oct 25 2017 03:15
why the pictures in the codepen on google can not display?
图片.png
on googlechrome broswer
korzo
@korzo
Oct 25 2017 03:23
@phoenix-burn hourly rate * time spent
Mike
@MikeJSchorah
Oct 25 2017 03:25
What would someone charge to add 200 products into WooCommerce?
korzo
@korzo
Oct 25 2017 03:27
@phoenix-burn if you settle for fixed price, you'll end up in endless loop of revisions
@MikeJSchorah There is no option to import products to Woocommerce?
Kaz Baig
@kbaig
Oct 25 2017 03:30
Hey guys im trying to change the color of an input's outline when you're focused on it and also add a transition. Can't figure out why it turns black before turning yellow
https://codepen.io/kbaig/pen/jGjvaQ?editors=1100
korzo
@korzo
Oct 25 2017 03:33
@kbaig you need also target input:hover
Kaz Baig
@kbaig
Oct 25 2017 03:34
@korzo huh. why is that?
korzo
@korzo
Oct 25 2017 03:35
@kbaig because black is default color
Kaz Baig
@kbaig
Oct 25 2017 03:36
@korzo I guess I'm just confused as to why there's a default hover outline to begin with
Mike
@MikeJSchorah
Oct 25 2017 03:36
@korzo What exactly do you mean by "import products"? Does this save alot of time?
Kaz Baig
@kbaig
Oct 25 2017 03:36
@korzo oh well, thanks!
CamperBot
@camperbot
Oct 25 2017 03:36
kbaig sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 661 | @korzo |http://www.freecodecamp.com/korzo
korzo
@korzo
Oct 25 2017 03:36
@kbaig best way is to define outline color and with 0 for input and then change width for focus/active/hover
@MikeJSchorah Yes, especially if you have some source of products (information system, feed from supplier..)
If not, it's faster to write data in excel and import it then fill every product then save
I don't use WooCommerce so I don't know thou @MikeJSchorah
Mike
@MikeJSchorah
Oct 25 2017 03:41
Does anyone here use WooCommerce?
heroiczero
@heroiczero
Oct 25 2017 04:01
@korzo @longnt80 @DarrenfJ @thekholm80 @sjames1958gm @khaduch @GitHub-Henry @Manish-Giri @daddycardona A new day and TY for the being present in the Help Channel :) :sparkles:
CamperBot
@camperbot
Oct 25 2017 04:01
heroiczero sends brownie points to @korzo and @longnt80 and @darrenfj and @thekholm80 and @sjames1958gm and @khaduch and @github-henry and @manish-giri and @daddycardona :sparkles: :thumbsup: :sparkles:
:star2: 2176 | @darrenfj |http://www.freecodecamp.com/darrenfj
:star2: 1534 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:cookie: 662 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 412 | @daddycardona |http://www.freecodecamp.com/daddycardona
:cookie: 609 | @longnt80 |http://www.freecodecamp.com/longnt80
:star2: 6688 | @manish-giri |http://www.freecodecamp.com/manish-giri
:star2: 8608 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
:star2: 3404 | @khaduch |http://www.freecodecamp.com/khaduch
:cookie: 415 | @github-henry |http://www.freecodecamp.com/github-henry
Ken Haduch
@khaduch
Oct 25 2017 04:06
@heroiczero - thank you , as always, and keep up the good work here!
CamperBot
@camperbot
Oct 25 2017 04:06
khaduch sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1937 | @heroiczero |http://www.freecodecamp.com/heroiczero
Mike
@MikeJSchorah
Oct 25 2017 04:15
Wow. Steven James is almost at 10,000. I remember a year ago when he was only at 2,000. Who is in the lead?
Manish Giri
@Manish-Giri
Oct 25 2017 04:24
@heroiczero @khaduch @DarrenfJ @GitHub-Henry @diomed ty
CamperBot
@camperbot
Oct 25 2017 04:24
manish-giri sends brownie points to @heroiczero and @khaduch and @darrenfj and @github-henry and @diomed :sparkles: :thumbsup: :sparkles:
:star2: 1939 | @heroiczero |http://www.freecodecamp.com/heroiczero
:cookie: 416 | @github-henry |http://www.freecodecamp.com/github-henry
:star2: 2177 | @darrenfj |http://www.freecodecamp.com/darrenfj
:star2: 5233 | @diomed |http://www.freecodecamp.com/diomed
:star2: 3405 | @khaduch |http://www.freecodecamp.com/khaduch
Claudio Restifo
@Marmiz
Oct 25 2017 04:29
Nice to see the old team still being here <3
Henry
@GitHub-Henry
Oct 25 2017 04:36
@Manish-Giri hello, ty for the brownies
CamperBot
@camperbot
Oct 25 2017 04:36
github-henry sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6689 | @manish-giri |http://www.freecodecamp.com/manish-giri
Henry
@GitHub-Henry
Oct 25 2017 04:41
@Marmiz hello
korzo
@korzo
Oct 25 2017 04:41
@heroiczero Hello and thanks
CamperBot
@camperbot
Oct 25 2017 04:41
korzo sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1940 | @heroiczero |http://www.freecodecamp.com/heroiczero
Henry
@GitHub-Henry
Oct 25 2017 04:43
@heroiczero hello and thanks for the brownies
CamperBot
@camperbot
Oct 25 2017 04:43
github-henry sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1941 | @heroiczero |http://www.freecodecamp.com/heroiczero
Henry
@GitHub-Henry
Oct 25 2017 04:47
@korzo hello
Darren
@DarrenfJ
Oct 25 2017 04:50
evening fCC
hey @Marmiz :D
:wave:
and thanks @Marmiz
CamperBot
@camperbot
Oct 25 2017 04:51
darrenfj sends brownie points to @marmiz :sparkles: :thumbsup: :sparkles:
:star2: 1063 | @marmiz |http://www.freecodecamp.com/marmiz
Darren
@DarrenfJ
Oct 25 2017 04:51
my usual thanks back at everyone
thanks @heroiczero @khaduch @GitHub-Henry @diomed @daddycardona @heroiczero
CamperBot
@camperbot
Oct 25 2017 04:51
darrenfj sends brownie points to @heroiczero and @khaduch and @github-henry and @diomed and @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 417 | @github-henry |http://www.freecodecamp.com/github-henry
:star2: 3406 | @khaduch |http://www.freecodecamp.com/khaduch
:star2: 1942 | @heroiczero |http://www.freecodecamp.com/heroiczero
:cookie: 413 | @daddycardona |http://www.freecodecamp.com/daddycardona
:star2: 5234 | @diomed |http://www.freecodecamp.com/diomed
Darren
@DarrenfJ
Oct 25 2017 04:52
thanks @sjames1958gm @thekholm80 @longnt80 @korzo @faraco
CamperBot
@camperbot
Oct 25 2017 04:52
darrenfj sends brownie points to @sjames1958gm and @thekholm80 and @longnt80 and @korzo and @faraco :sparkles: :thumbsup: :sparkles:
:cookie: 663 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 610 | @longnt80 |http://www.freecodecamp.com/longnt80
:cookie: 389 | @faraco |http://www.freecodecamp.com/faraco
:star2: 1535 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:star2: 8609 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Darren
@DarrenfJ
Oct 25 2017 04:53
thanks @Manish-Giri @dhcodes
CamperBot
@camperbot
Oct 25 2017 04:53
darrenfj sends brownie points to @manish-giri and @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1854 | @dhcodes |http://www.freecodecamp.com/dhcodes
:star2: 6690 | @manish-giri |http://www.freecodecamp.com/manish-giri
Darren
@DarrenfJ
Oct 25 2017 04:53
whew
Henry
@GitHub-Henry
Oct 25 2017 04:55
@DarrenfJ well howdie do
@DarrenfJ thank you for the brownies
CamperBot
@camperbot
Oct 25 2017 04:55
github-henry sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2178 | @darrenfj |http://www.freecodecamp.com/darrenfj
Dhaval
@Dhavalc2012
Oct 25 2017 05:54
@DarrenfJ @Manish-Giri @dhcodes :wave:
Jill Lee
@jill-lee
Oct 25 2017 06:40
@korzo Thanks!
CamperBot
@camperbot
Oct 25 2017 06:40
phoenix-burn sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 664 | @korzo |http://www.freecodecamp.com/korzo
gishy1
@gishy1
Oct 25 2017 11:17
hello world need help again
image.png
the arr[1][0] is not returning the array with the number specified
Manish Giri
@Manish-Giri
Oct 25 2017 11:20
@gishy1 .push() would return you the new length of the modified array
@Dhavalc2012 @DarrenfJ @heroiczero @khaduch @Marmiz @GitHub-Henry :wave: and ty
CamperBot
@camperbot
Oct 25 2017 11:21
:cookie: 359 | @dhavalc2012 |http://www.freecodecamp.com/dhavalc2012
manish-giri sends brownie points to @dhavalc2012 and @darrenfj and @heroiczero and @khaduch and @marmiz and @github-henry :sparkles: :thumbsup: :sparkles:
:star2: 1064 | @marmiz |http://www.freecodecamp.com/marmiz
:star2: 3407 | @khaduch |http://www.freecodecamp.com/khaduch
:cookie: 418 | @github-henry |http://www.freecodecamp.com/github-henry
:star2: 1943 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 2179 | @darrenfj |http://www.freecodecamp.com/darrenfj
gishy1
@gishy1
Oct 25 2017 11:22
@Manish-Giri why not the number in that position bro
?
Manish Giri
@Manish-Giri
Oct 25 2017 11:23
Return value
The new length property of the object upon which the method was called.
gishy1
@gishy1
Oct 25 2017 11:33
@Manish-Giri hmmm what do you suggest to use to push the arr[][]
Manish Giri
@Manish-Giri
Oct 25 2017 11:34
you can just delete the return
rest of the code in that line will push
gishy1
@gishy1
Oct 25 2017 11:43
@Manish-Giri its nor returning anything
Manish Giri
@Manish-Giri
Oct 25 2017 11:44
whatever you want your function to return, should be the very last line in your function, because anything below the return won't execute
so put your return statement on line 7
gishy1
@gishy1
Oct 25 2017 11:45
have a look
Manish Giri
@Manish-Giri
Oct 25 2017 11:45
if you instead want to see the current state of your variables, i'd recommend using a console.log statement
that link won't have your code
it's easier to write, test and share code here
gishy1
@gishy1
Oct 25 2017 11:50
@Manish-Giri got it bro !!!!!! thanks!!!!!!!!!!!!!!!!!!
CamperBot
@camperbot
Oct 25 2017 11:50
gishy1 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6691 | @manish-giri |http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Oct 25 2017 11:50
good job :+1:
May Kittens Devour Your Soul
@diomed
Oct 25 2017 12:19
why me? lol. I don't even go here :yum:
Mohammad Aziz
@iAziz786
Oct 25 2017 12:32

Any JavaScript developer please help me to understand this bit of code

function Employee() {
  ......
}

function WorkerBee() {
  .......
}

// Situation 1
WorkerBee.prototype = new Employee();

// Situation 2
WorkerBee.prototype = Object.create(Employee.prototype);

Does situation 1 and situation 2 are creating the same object?

gishy1
@gishy1
Oct 25 2017 12:46
hello world im back
need help
the rest of the numbers are ok
image.png
but this particular one is giving me a null
gishy1
@gishy1
Oct 25 2017 13:06
hello universe!!!
gishy1
@gishy1
Oct 25 2017 13:12
:cry:
Stephen James
@sjames1958gm
Oct 25 2017 13:23
@gishy1 Do you ever reset New back to 0 ?
Stephen James
@sjames1958gm
Oct 25 2017 13:37
@iAziz786 I don't believe there is any difference between the two
rscales02
@rscales02
Oct 25 2017 13:58
@gishy1 have you thought about doing a .forEach() instead of using for loops?
Kaz Baig
@kbaig
Oct 25 2017 13:59
@rscales02 or he could just map and Math.max(...elem)
rscales02
@rscales02
Oct 25 2017 14:00
@gishy1 , @kbaig has a better way than mine...
bilaal-s
@bilaal-s
Oct 25 2017 14:02
why is there no difference between strong and em when i run this in jsfiddle?
<p>Here is some text html in which will be present both the <strong>strong</strong> tags and the <em>em</em> tags.</p>
rscales02
@rscales02
Oct 25 2017 14:11
@bilaal-s it seems with jsfiddle you need to define the css for those tags...
it renders just fine in codepen without styling...https://codepen.io/rscales02/pen/oGKjLJ
Sorin Ruse
@sorinr
Oct 25 2017 14:18
@rscales02 think in jsfiddle its just a render problem. i associate <strong> with bold and <i>,<em> with italic
@rscales02 if you look in devtools you will see that the word strong has font-weight: bold; and em font-style: italic;
@rscales02 you can read more about this tags on MDN here
rscales02
@rscales02
Oct 25 2017 14:30
@sorinr that was what I was alluding to, although as soon as you define the css in jsfiddle it renders out like it should...
Sorin Ruse
@sorinr
Oct 25 2017 14:38
@rscales02 yep. seen this strange behaviour
@rscales02 no idea why renders like that
rscales02
@rscales02
Oct 25 2017 14:40
that makes 2 of us... I'm not really a huge fan of the fiddle from my use of it so far anyway
Sorin Ruse
@sorinr
Oct 25 2017 14:40
me neither
Mohammad Aziz
@iAziz786
Oct 25 2017 14:54
@sjames1958gm I also think so.
Victor Abeledo
@victorja
Oct 25 2017 15:35
Hi guys I need some help. I am trying to use the github api but I am having trouble concatenating the api URL with the value of the textbox (line 30 js code) Can you help me figure out why is that happening?
https://jsfiddle.net/4mLn5h77/
Barkha54
@Barkha54
Oct 25 2017 16:20
Hello, while starting the FCC project on my local machine with gulp, I'm getting an error. cannot match against undefined or null in gulpfile.js. Can someone please help me how to fix this issue?
image.png
mucyo chris
@muchristian
Oct 25 2017 16:32
i have a problem when am building my app in ionic
in linux

[WARN] Not performing Ionic build for project type: ionic1.

cordova build android
Running command: /home/chris/helloworld/hooks/after_prepare/010_add_platform_class.js /home/chris/helloworld

add to body class: platform-android
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Detected 'adb' command at /usr/bin but no 'platform-tools' directory found near.
Try reinstall Android SDK or update your PATH to include valid path to SDK/platform-tools directory.

help please

gishy1
@gishy1
Oct 25 2017 17:16
@sjames1958gm james should i set to 0 tho? what would be the rationale mate?
Stephen James
@sjames1958gm
Oct 25 2017 17:17
@gishy1 You want to find the largest of each set of 4 you need to reset it to a low value for each inner array
gishy1
@gishy1
Oct 25 2017 17:17
@sjames1958gm also could that be the reason its giving me a null value?
@sjames1958gm how do you suggest i reset ?
Stephen James
@sjames1958gm
Oct 25 2017 17:18
@gishy1 Yes. Because no value in the second array is larger than New you never set that value
New = 0 either before or after the inner loop
@muchristian Do you have the android ADK downloaded?
gishy1
@gishy1
Oct 25 2017 17:20
@sjames1958gm yes mate that worked!!! but iim still trying to understand the rationale for it being in between the loops
Stephen James
@sjames1958gm
Oct 25 2017 17:21
@gishy1 Each group is independent, so you need to reset "New" which is supposed to be lower than all values for each new set of 4
@victorja what are you trying to retrieve from the api?
Darren
@DarrenfJ
Oct 25 2017 17:25
ah some old new regulars hi thanks thanks! @Dhavalc2012 @phoenix-burn
CamperBot
@camperbot
Oct 25 2017 17:25
darrenfj sends brownie points to @dhavalc2012 and @phoenix-burn :sparkles: :thumbsup: :sparkles:
:cookie: 163 | @phoenix-burn |http://www.freecodecamp.com/phoenix-burn
:cookie: 360 | @dhavalc2012 |http://www.freecodecamp.com/dhavalc2012
sarthak0411
@sarthak0411
Oct 25 2017 17:51
I want to setup Apache server at public ip so is there any free service ?
Sorin Ruse
@sorinr
Oct 25 2017 18:09
@sarthak0411 you mean to be accessible from outside?
Sandeep Chary
@dsandeepchary
Oct 25 2017 18:13
Heyo!
Stephen James
@sjames1958gm
Oct 25 2017 18:14
@dsandeepchary :wave:
sarthak0411
@sarthak0411
Oct 25 2017 18:14
@sorinr yes
Sandeep Chary
@dsandeepchary
Oct 25 2017 18:15
I remember you @sjames1958gm
:wave:
Sorin Ruse
@sorinr
Oct 25 2017 18:15
@sarthak0411 are your apache server under a router? do u have a fixed IP?
sarthak0411
@sarthak0411
Oct 25 2017 18:17
Yes i have fixed ip @sorinr
Sorin Ruse
@sorinr
Oct 25 2017 18:19
@sarthak0411 then go to the router and instruct it for any calls on port 80 to forward your calls to the machine ip thats running the apache server
sarthak0411
@sarthak0411
Oct 25 2017 18:21
After that @sorinr
Sorin Ruse
@sorinr
Oct 25 2017 18:25
@sarthak0411 if i write your ip xx.xxx.xxx in the browser bar it should redirect me to your apache server and see the index.html/index.php page you have in there
Kyle Holm
@thekholm80
Oct 25 2017 18:28
@DarrenfJ @heroiczero @Manish-Giri ty
CamperBot
@camperbot
Oct 25 2017 18:28
thekholm80 sends brownie points to @darrenfj and @heroiczero and @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 2180 | @darrenfj |http://www.freecodecamp.com/darrenfj
:star2: 6692 | @manish-giri |http://www.freecodecamp.com/manish-giri
:star2: 1944 | @heroiczero |http://www.freecodecamp.com/heroiczero
Michael Goldspinner
@Emgo-Dev
Oct 25 2017 18:33
What is a Pull Request?
Dhaval
@Dhavalc2012
Oct 25 2017 18:44
hie @thekholm80
i see you guys r still up yeh :)
i had a f**cked up experience booking my railtickets using IRCTC
took me nearly 2 hours
Kyle Holm
@thekholm80
Oct 25 2017 18:45
@Dhavalc2012 hey buddy
good to see you
Dhaval
@Dhavalc2012
Oct 25 2017 18:46
hie @thekholm80 nice to see you too buddy :D
i would have been here earlier today
if i wasnt messing around booking some train tickets
Dhaval
@Dhavalc2012
Oct 25 2017 19:08
:wave:
Ken Haduch
@khaduch
Oct 25 2017 19:11
@Emgo-Dev - a Pull request is related to github, - you can read the docs here: https://help.github.com/articles/about-pull-requests/ (I didn't notice the previous post from @kbaig)...
artbohr
@artbohr
Oct 25 2017 19:17
I'n a local configuration with create-react-app I can't apply a style by selecting an "h1" as it is. But I can apply the style if I assign an idea to the h1 and then select the h1 by id in the css file. Anyone has an idea why this could happen?
id* not idea
artbohr
@artbohr
Oct 25 2017 19:25

Example:

Doesn't work ->

html:

<h1 id="hStyle"> Heading </h1>

css:

h1{
  color:red;
}
Works ->
html:

<h1 id="hStyle"> Heading </h1>

css:

#hStyle{
  color:red;
}
Kaz Baig
@kbaig
Oct 25 2017 19:27
@artbohr So if you init a new app, add an h1 element to the component in App.js, and add an h1 rule in index.css, does it not work?
Trying to come up with a minimum working example here since I don't have the code
artbohr
@artbohr
Oct 25 2017 19:28
render() {
    return (
      <Grid>
        <h1 id="titleText">{`${this.state.showing === "recent"
            ? "Recent"
            : "Alltime"} Campers Leaderboard`}</h1>
        <Button id="switchButton" bsStyle="default" onClick={this.switchBoard}>
          Switch Leaderboard
        </Button>
        <CamperTable camplist={this.state[this.state.showing]}/>
      </Grid>
    );
  }
}
@kbaig here is the exact code
@kbaig applying styles just by selecting h1 instead of id or class just gets ignored
Kaz Baig
@kbaig
Oct 25 2017 19:29
@artbohr I don't think you're supposed to nest elements within components. I think components are always supposed to be self-closing
artbohr
@artbohr
Oct 25 2017 19:30
@kbaig maybe you are confusing components with react-bootstrap lib? Or I'm understanding something wrong here
alpox
@alpox
Oct 25 2017 19:30
@artbohr check the devtools for if the color gets overridden by another rule. h1 is very generic as selecor whereas #something is much more specific and can override more general selectors.
Kaz Baig
@kbaig
Oct 25 2017 19:31
I am not talking about bootstrap
I am saying React components always have to be self-closing if I am not mistaken
alpox
@alpox
Oct 25 2017 19:31
@kbaig what do you mean by self-closing? If you cannot nest components in components, the components would not make sense
Kaz Baig
@kbaig
Oct 25 2017 19:31
Oh is Grid a boostrap component
artbohr
@artbohr
Oct 25 2017 19:32
:D
Kaz Baig
@kbaig
Oct 25 2017 19:32
<SelfClosingElement/>
<NotSelfClosingElem></NotSelfClosingElem>
alpox
@alpox
Oct 25 2017 19:32
@artbohr https://www.smashingmagazine.com/2007/07/css-specificity-things-you-should-know/ maybe gives you some understanding of what could have happened
@kbaig makes no difference in react as well as in html
artbohr
@artbohr
Oct 25 2017 19:33
@alpox it works in codepen but not in local setup
alpox
@alpox
Oct 25 2017 19:33
@artbohr you might have something slightly different in the local setup
Maybe a different order of the css rules?
artbohr
@artbohr
Oct 25 2017 19:35
@kbaig ye you could nest child element there and call them with "this.props.children", check this for an example with the new react 16 and portals "https://codepen.io/gaearon/pen/yzMaBd?editors=0010"
elements*
@alpox btw, in terms of end results it doesn't even matter, I just wanted to get rid of additional classes/ids since there is only one H1 and Button, or is it okay to apply extra ids/classes where is not stricly neccesary?
@alpox also, I can't find the css rules, I think create-react-app project hide most configs, if I'm not mistaken
artbohr
@artbohr
Oct 25 2017 19:41
@alpox or you mean css rules in the dev tools?
Kaz Baig
@kbaig
Oct 25 2017 19:43
@artbohr ah I didn't know about portals. Is that new? Looks super interesting
artbohr
@artbohr
Oct 25 2017 19:43
@kbaig ye, about a month or so
Kaz Baig
@kbaig
Oct 25 2017 19:44
@artbohr oh react 16
artbohr
@artbohr
Oct 25 2017 19:48

@alpox @kbaig I found the reason I think, it's because some bootstrap config overrides it, for being very generic, you can take command with "!important" tho, if you really need it

h1{
  color:red !important;
}

thank you ^^

CamperBot
@camperbot
Oct 25 2017 19:48
artbohr sends brownie points to @alpox and @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 375 | @kbaig |http://www.freecodecamp.com/kbaig
:star2: 1400 | @alpox |http://www.freecodecamp.com/alpox
Kaz Baig
@kbaig
Oct 25 2017 19:48
@artbohr Oh so you were using bootsrap. Gotcha. Gotta be it then
alpox
@alpox
Oct 25 2017 19:48
@artbohr It depends on the size of the project. But i would always go for being as specific as you need to be. This means that you evaluate things like:
Does the style apply to all h1 on the page? Does it only apply to h1 in a specific section or elements which are related to some parent in some way? Does it really only always apply to only one h1 element?
Thats the kind of questions you ask before choosing a selector
@artbohr Yes thats what i thought it would be. Thats why i said an id could work instead of h1 because the id is less general. - The article i sent you tells you how the specificy is calculated - so it tells you how specific the selector has to be to override other rules
artbohr
@artbohr
Oct 25 2017 19:50
@alpox ye, scalability and structure, but for this exact project it was only 2 items, and no shared parents or children or element of any kind and place
alpox
@alpox
Oct 25 2017 19:50
@artbohr !important should only be used if you have absolutely no other choice - or for strict utility classes
artbohr
@artbohr
Oct 25 2017 19:51
@alpox ok, it totally sounds like you shouldn't use it in a lot of cases tbh :D
gishy1
@gishy1
Oct 25 2017 20:09
@sjames1958gm need help take a look
image.png
Stephen James
@sjames1958gm
Oct 25 2017 20:10
@gishy1 you are comparing a single letter, but target can be more than one letter.
You need to figure out how to extract target.length string from end of str
gishy1
@gishy1
Oct 25 2017 20:11
@sjames1958gm i tried to use substring(str.length-4,str.length-1)
didnt work out
never returned anything when i tested
i had created another variable to store the substring then used the logical operator
let me show you
Stephen James
@sjames1958gm
Oct 25 2017 20:13
@gishy1 You should be using target.length and your second parameter is off by one
Optional. An integer between 0 and the length of the string, which specifies the offset into the string of the first character not to include in the returned substring.
The second parameter is not needed to go to end of string.
gishy1
@gishy1
Oct 25 2017 20:15
@sjames1958gm mind is in a twist
Stephen James
@sjames1958gm
Oct 25 2017 20:16
substring(str.length-4,str.length-1) the 4 here should be target.length so that any target will work.
str.length-1 will not include the last character.
substring(str.length - target.length)
gishy1
@gishy1
Oct 25 2017 21:00
@sjames1958gm mate check this
image.png
its giving me the last 2 words of the string for target.length
Stephen James
@sjames1958gm
Oct 25 2017 21:01
@gishy1 The -1 will skip the last letter
gishy1
@gishy1
Oct 25 2017 21:01
@sjames1958gm but i thought index cound starts from 0?
Daniel
@dkapexhiu
Oct 25 2017 21:02
how to make the background of a div one colour all the height and width and not only the container in bootstrap?
Stephen James
@sjames1958gm
Oct 25 2017 21:02
@gishy1 If you want the last letter and target.length is 1
substring(string.length - target.length) is the same as
substring(string.length - 1)
so you don't need string.length - 1- target.length
var d = substring(str.length - target.length)
should be enough
gishy1
@gishy1
Oct 25 2017 21:04
@sjames1958gm wait target length is 1 ?
Stephen James
@sjames1958gm
Oct 25 2017 21:05
It's just am example of why the -1 is not needed.
gishy1
@gishy1
Oct 25 2017 21:05
@sjames1958gm this is going to wind you up mate but bear with me
i thought we start counting from 0
no?
Stephen James
@sjames1958gm
Oct 25 2017 21:06
@gishy1 Yes. so if target and str are the name length.
substring(str.length - target.length) is the same as substring(0)
gishy1
@gishy1
Oct 25 2017 21:07
@sjames1958gm also should i remove the spaces with regex
Stephen James
@sjames1958gm
Oct 25 2017 21:07
You should not remove anything.
Stephen James
@sjames1958gm
Oct 25 2017 21:18
@gishy1 http://www.pythontutor.com/visualize.html#mode=edit
This site can be configured for javascript and you can visualize your code running.
Albert Cardona II
@daddycardona
Oct 25 2017 21:55
@heroiczero @korzo @longnt80 @DarrenfJ @thekholm80 @sjames1958gm @khaduch @GitHub-Henry @Manish-Giri thanks for making my coding days more enjoyable :)
CamperBot
@camperbot
Oct 25 2017 21:55
daddycardona sends brownie points to @heroiczero and @korzo and @longnt80 and @darrenfj and @thekholm80 and @sjames1958gm and @khaduch and @github-henry and @manish-giri :sparkles: :thumbsup: :sparkles:
:cookie: 611 | @longnt80 |http://www.freecodecamp.com/longnt80
:star2: 8612 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
:star2: 1536 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:cookie: 665 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 419 | @github-henry |http://www.freecodecamp.com/github-henry
:star2: 2181 | @darrenfj |http://www.freecodecamp.com/darrenfj
:star2: 3408 | @khaduch |http://www.freecodecamp.com/khaduch
:star2: 1945 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 6693 | @manish-giri |http://www.freecodecamp.com/manish-giri
Kyle Holm
@thekholm80
Oct 25 2017 21:55
@daddycardona hey thanks man
CamperBot
@camperbot
Oct 25 2017 21:55
thekholm80 sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 414 | @daddycardona |http://www.freecodecamp.com/daddycardona
Albert Cardona II
@daddycardona
Oct 25 2017 21:57
I got a question, I am still stuck on this I even tried it with for loops but now I am just feeling slow so maybe you can help or see what I am not doing that I need to add
function truthCheck(collection, pre) {
    let x = Object.keys(arguments[0]).every(function(key) {
        //console.log(collection[k])
        console.log(key)
        if (!arguments[0].hasOwnProperty(pre)) {
            return false;
        } else {
            return true;
        }
    });

    console.log(x);

    // Only change code above this line
    return x;
}
I can't get it to return the true portion
I also did this with collection
Manish Giri
@Manish-Giri
Oct 25 2017 22:02
@daddycardona challenge URL?
function truthCheck(collection, pre) {
    let x = Object.keys(collection[0]).every(function(key) {
        //console.log(collection[k])
        console.log(key);
        if (!collection[0].hasOwnProperty(pre) && !collection[0][key]) {
            return false;
        } 
    });

    console.log(x);

    // Only change code above this line
    return x;
}
should I take the [0] out of collection I think I done that already
Uriel Guzmán
@Burinson
Oct 25 2017 22:07
function spinalCase(str) {
  // "It's such a fine line between stupid, and clever."
  // --David St. Hubbins

  str = str.replace(/[^a-z\A-Z]/g, "-");
  console.log(str);

  var newStr = str.toLowerCase();
  return newStr;
}

spinalCase('AllThe-small Things');

Hey, guys. How can I insert a dash every time a lowercase letter is proceded by an uppercase? Can't figure it out.

This returns allthe-small-things

Manish Giri
@Manish-Giri
Oct 25 2017 22:13
@daddycardona you need to change this
  if (!collection[0].hasOwnProperty(pre) && !collection[0][key]) {
            return false;
        }
in fact, instead of going for Object.keys()
Albert Cardona II
@daddycardona
Oct 25 2017 22:13
you know what now that I got some much needed sleep I see that :)
Manish Giri
@Manish-Giri
Oct 25 2017 22:13
go for collection.every()
@Burinson you can use a regex to check for a lookahead
Albert Cardona II
@daddycardona
Oct 25 2017 22:14
It don't recognize this condition I was like why is it always true or always false lol
thanks @Manish-Giri you are a guru :)
CamperBot
@camperbot
Oct 25 2017 22:14
daddycardona sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
api offline
Manish Giri
@Manish-Giri
Oct 25 2017 22:14
lol
haha
Uriel Guzmán
@Burinson
Oct 25 2017 22:17
@Manish-Giri Hm... that one is new to me, lol
str = str.replace(/[^a-z\A-Z(?=A-Z)]/g, "-"); How should the syntax go?
Albert Cardona II
@daddycardona
Oct 25 2017 22:19
so basically do I need a conditional statement in every. It should return true or false, should I just be like return collection.hasOwnProperty(pre)
Manish Giri
@Manish-Giri
Oct 25 2017 22:20
@Burinson /[a-z](?=[A-Z])/g
this will match the d in - abcdAe
@daddycardona you need just a && in .every
collection.every(c => /* check if c hasOwnProperty of pre and c[pre] is truthy */)
that's all
Albert Cardona II
@daddycardona
Oct 25 2017 22:22
&& collection[pre]
oh okay because c[pre] mean collection.age or the condtion its lookin for okay
Manish Giri
@Manish-Giri
Oct 25 2017 22:23
yup
collection is an array of objects
so collection.every(c => ), here c will be each individual object
on which you can do c.hasOwnProperty() or c.age, etc
Albert Cardona II
@daddycardona
Oct 25 2017 22:25
yed
Uriel Guzmán
@Burinson
Oct 25 2017 22:25
@Manish-Giri When it matches the d, it would replace the d, right?
Kyle Holm
@thekholm80
Oct 25 2017 22:25
@Manish-Giri teach me javascript
korzo
@korzo
Oct 25 2017 22:25
@GitHub-Henry Hi
Manish Giri
@Manish-Giri
Oct 25 2017 22:25
pfffffft
Uriel Guzmán
@Burinson
Oct 25 2017 22:26
So instead of abcd-A it would return abc-A?
Victor Abeledo
@victorja
Oct 25 2017 22:26
Hi guys need some help, my js function fails to concatenate the url from the object with my value from getElementById and I don't know why(line 30)
https://jsfiddle.net/4mLn5h77/
it conctenates just the "+"
Manish Giri
@Manish-Giri
Oct 25 2017 22:27
@Burinson yes
function testLookAhead(str) {
  return str.replace(/[a-z](?=[A-Z])/g, '-');
}

console.log(testLookAhead("helloWorld"));
"hell-World"
Uriel Guzmán
@Burinson
Oct 25 2017 22:28
How could we make your code say "hello-World"?
korzo
@korzo
Oct 25 2017 22:29
@victorja You have to call event.preventDefault(), otherwise page reload every time, you click submit button
Manish Giri
@Manish-Giri
Oct 25 2017 22:30
@Burinson for that you use a "capturing group"
function testLookAhead(str) {
  return str.replace(/([a-z](?=[A-Z]))/g, '$1-');
}
now the output is "hello-World"
Albert Cardona II
@daddycardona
Oct 25 2017 22:31
so when using every it takes the array out of it and makes sure it is not an array just looks through the objecst like a for loop using collection[0] instead i will just use the the c or in my case the word key because that becomes the actual object and every already started the loop. Methods are so amazing when you really start understanding them. I see instead of collection.hasOwnProperty it should bekey.hasOwnProperty because it is the object and is looking for thru the object of key. Damn you're such a great teacher @Manish-Giri thanks for clearing that up for me took me some time to get it ;)
CamperBot
@camperbot
Oct 25 2017 22:31
api offline
daddycardona sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
Manish Giri
@Manish-Giri
Oct 25 2017 22:32
@daddycardona happy to help!
Victor Abeledo
@victorja
Oct 25 2017 22:32
@korzo thanks!!!!
CamperBot
@camperbot
Oct 25 2017 22:32
victorja sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 666 | @korzo |http://www.freecodecamp.com/korzo
Uriel Guzmán
@Burinson
Oct 25 2017 22:39
@Manish-Giri thanks
CamperBot
@camperbot
Oct 25 2017 22:39
burinson sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6694 | @manish-giri |http://www.freecodecamp.com/manish-giri
Uriel Guzmán
@Burinson
Oct 25 2017 22:42
@Burinson
var newStr = str.replace(/\s+|_+/g, '-'); After what you told me, I just put this and it worked
Albert Cardona II
@daddycardona
Oct 25 2017 22:55
nice
@Burinson that is good I am still confused with regex
now I am on the very next assignment for free codecamp and the whole thing is confusing lol
Kyle Holm
@thekholm80
Oct 25 2017 23:00
regex is horrible
Stephen James
@sjames1958gm
Oct 25 2017 23:00
@victorja Because of the nature of jsfiddle, I am not sure you can call the getSubmit function from the input element like that
as the javascript is wrapped in a window.onload=function() {} so it is not in scope.
You might want to use element.addEventListener("click", getSubmit);
@daddycardona arguments optional?
Albert Cardona II
@daddycardona
Oct 25 2017 23:02
yes @sjames1958gm the whole explanation is confusing and I was under the impression you not suppose to call on something with arguments that have none
this is very new to me lol
Stephen James
@sjames1958gm
Oct 25 2017 23:03
@daddycardona Have you done seek and destroy? Using arguments object?
Albert Cardona II
@daddycardona
Oct 25 2017 23:03
I don't know let me check that out
yes i did unfortunately it is not there to see what I have done lol
freaking FCC
Kyle Holm
@thekholm80
Oct 25 2017 23:05
why did they make it so you can't access arguments in an arrow function?
stupid js
Stephen James
@sjames1958gm
Oct 25 2017 23:06
@daddycardona In js you can call functions with more or less arguments than defined.
You have to use arguments object to determine how many were passed in argument.length
Then you can test if the ones passed are numbers
@thekholm80 arrow functions are supposed to be light weight.
Kyle Holm
@thekholm80
Oct 25 2017 23:07
they should be light-weight with access to arguments
korzo
@korzo
Oct 25 2017 23:07
@thekholm80 You can use rest syntax in parameter
Uriel Guzmán
@Burinson
Oct 25 2017 23:08
@daddycardona It is confusing :(, but you'll get it. I was once stuck trying to understand for loops for like 4 weeks, lol
Albert Cardona II
@daddycardona
Oct 25 2017 23:10
@Burinson I feel you wait to you start using the methods like reduce and map. I need to code everyday and use these things but once I start using them then I have to start using react. I see so many places using react and php it is like very confusing and then to get a job in that lol
Manish Giri
@Manish-Giri
Oct 25 2017 23:11
Imo you should take things slow
Get comfy with the language itself first
Then you can pick up react easily
Kyle Holm
@thekholm80
Oct 25 2017 23:12
I didn't really understand javascript at all until i started learning react
but it was definitely a 'sink-or-swim' kind of experience
Uriel Guzmán
@Burinson
Oct 25 2017 23:12
I don't even know what is react
I'm halfway done with intermediate algorithms tho
Manish Giri
@Manish-Giri
Oct 25 2017 23:13
@thekholm80 yest I bought stevie g’s graphql course
Stephen James
@sjames1958gm
Oct 25 2017 23:13
@Manish-Giri Stephen Grider?
Manish Giri
@Manish-Giri
Oct 25 2017 23:13
And a course on Golang
Kyle Holm
@thekholm80
Oct 25 2017 23:13
@Manish-Giri you'll have to let me know how it is
Manish Giri
@Manish-Giri
Oct 25 2017 23:13
@sjames1958gm yup
Kyle Holm
@thekholm80
Oct 25 2017 23:13
I hope he's stopped smacking his lips in the mic by now lol
Manish Giri
@Manish-Giri
Oct 25 2017 23:14
There’s a course on web dev using Go that I’ll get, after finishing the basic Go course
Stephen James
@sjames1958gm
Oct 25 2017 23:14
@Manish-Giri I am doing his react native course and bought his full stack server rendered react course
Manish Giri
@Manish-Giri
Oct 25 2017 23:14
Grider too has a course on Go
Stephen James
@sjames1958gm
Oct 25 2017 23:15
@Manish-Giri He covers a lot, a bit slowly at times.
Manish Giri
@Manish-Giri
Oct 25 2017 23:15
@sjames1958gm i finished his basic react-redux course last week, the advanced one is up next
Kyle Holm
@thekholm80
Oct 25 2017 23:15
i liked his redux course
Albert Cardona II
@daddycardona
Oct 25 2017 23:16
so you use what @Manish-Giri
web dev is that a site?
Manish Giri
@Manish-Giri
Oct 25 2017 23:16
Um
It’s just short for web development
@daddycardona
Albert Cardona II
@daddycardona
Oct 25 2017 23:17
yes I thought that was a site that you got that you bought the course from
Manish Giri
@Manish-Giri
Oct 25 2017 23:17
Oh that
Yeah it’s on udemy.com
Stephen James
@sjames1958gm
Oct 25 2017 23:17
@daddycardona Part of the challenge of coding is taking the instructions and organizing them in a logic fashion even if the instructions are haphazard.
Find the major decision points, such as one argument or two
Manish Giri
@Manish-Giri
Oct 25 2017 23:17
They have good courses on almost everything
@daddycardona
Stephen James
@sjames1958gm
Oct 25 2017 23:18
@Manish-Giri I was on their early access - review program - there are some bad ones as well.
I even review a course by a kid on how to fish.
Kyle Holm
@thekholm80
Oct 25 2017 23:18
and never pay full price @daddycardona unless you have no other choice
Stephen James
@sjames1958gm
Oct 25 2017 23:18
@thekholm80 :+1: I don't think I have paid more than $20
Kyle Holm
@thekholm80
Oct 25 2017 23:18
most udemy stuff goes on sale for $10 all the time
Manish Giri
@Manish-Giri
Oct 25 2017 23:19
@sjames1958gm I’m on their early access program too, but I’ve never actually reviewed anything yet
Albert Cardona II
@daddycardona
Oct 25 2017 23:19
nice :) I am thinking about starting treehouse but am waiting for someone to call me about a school for electronic tech stuff and have my GI bill pay for it and hopefully land a job doing something like that and have the time to study this too for this is my passion and this is the closest I have been to it ;)
Manish Giri
@Manish-Giri
Oct 25 2017 23:19
Gotta do one sometime
Stephen James
@sjames1958gm
Oct 25 2017 23:20
@daddycardona :+1: Passion will get you through the tough times learning to code.
Albert Cardona II
@daddycardona
Oct 25 2017 23:20
that is why I have not quit yet lol
I have stopped many times with being in the military and having kids and then going to college that tought me the same basics of programming I already knew in Java lol
and then if you did not understand something stackoverflow is there to answer the questions LOL
Stephen James
@sjames1958gm
Oct 25 2017 23:22
There are tons more resources for learning than just a few years ago, almost too many.
Albert Cardona II
@daddycardona
Oct 25 2017 23:23
that is why I am interested in Treehouse, they seem to have alot to help according to their site also mentors people like you guys but can give me a one on one with
Kyle Holm
@thekholm80
Oct 25 2017 23:24
I wish there was a classroom-type option between bootcamps and college. more in-depth, but not so heavy on theory
Albert Cardona II
@daddycardona
Oct 25 2017 23:29
yes I feel you @thekholm80 college is like learn this shit learn math there you go, unless it's a intro class and they want you to answer useless questions like what year was javacsctript was introduced and what was its first name. Um not important though I read it in this book and know it was like 90's or something lol
Netscape yeah yeah lol
Kyle Holm
@thekholm80
Oct 25 2017 23:30
@daddycardona right? I think it's awesome to know the different sorting algorithms but then again, i prefer to just use sort()
can't recall the last time i wrote a bubble sort algo for anything besides a demo
Albert Cardona II
@daddycardona
Oct 25 2017 23:31
lol what is a bubble sort lol
Kyle Holm
@thekholm80
Oct 25 2017 23:31
a type of sorting algorithm
it's actually really fascinating but you'd likely never use the information
Manish Giri
@Manish-Giri
Oct 25 2017 23:32
Sorting sucks
Especially when you need to write it in an interview
Quick sort, merge sort, shell sort
Albert Cardona II
@daddycardona
Oct 25 2017 23:32
i am a believer of learning stuff that is is going to help you in real life scenarios, i understand hello world intros and the basics in general but show me how the general basic stuff is going to be used on an every day website for instance :)
Manish Giri
@Manish-Giri
Oct 25 2017 23:33
Selection sort, insertion sort, bubble sort
Kyle Holm
@thekholm80
Oct 25 2017 23:33
there are a bunch of videos like this one that do a good job of explaining how the different sort algos work without getting all bogged down in code
Albert Cardona II
@daddycardona
Oct 25 2017 23:34
wow I never saw this before my colleges suck lol jk
Kyle Holm
@thekholm80
Oct 25 2017 23:34
there's a free CS50 course you can do from Harvard that covers a lot of the basic theory
the guy that teaches it is awesome
but it's not a lot of practical information
Albert Cardona II
@daddycardona
Oct 25 2017 23:36
the thing is that some of this is very easy and then you use it for something else and the one thing you do know is not even practical or efficient like it use to be lol
and everytime i learn something and use it and go to stack overflow they are like why you doing it like that, that way sucks lol
Stephen James
@sjames1958gm
Oct 25 2017 23:46
Not sure why so many people have to be dicks on SO
Kyle Holm
@thekholm80
Oct 25 2017 23:47
part of being so much smarter than everyone else is making sure everyone knows it
Albert Cardona II
@daddycardona
Oct 25 2017 23:49
I don't think they want to be dicks @sjames1958gm but they be forgetting that there is stuff they don't know and is confusing to them lol
Kyle Holm
@thekholm80
Oct 25 2017 23:50
the best way to get a good answer on SO is to either
  1. pretend you're a girl
  2. log in with another account and give a wrong answer
Albert Cardona II
@daddycardona
Oct 25 2017 23:53
lmao
Manish Giri
@Manish-Giri
Oct 25 2017 23:59
Method 1 always works