These are chat archives for FreeCodeCamp/Help

21st
Sep 2017
David
@crashCart-Coding
Sep 21 2017 01:19
I’ve wanted to ask this for awhile, but I’ve been afraid because of previous experiences in other communities. So, if I use the W3 css file, and of course reference it, can I reference a second CSS file. e.g. - The W3 CSS is great for the templating, but it seems kludgey to me to add to it. So can you reference more than one CSS file?
Frank McCroy
@fmccroy
Sep 21 2017 01:23
@crashCart-Coding I don’t know myself, but trying to find an answer for you brought me to this on TreeHouse: https://teamtreehouse.com/community/can-a-html-document-have-two-css-files
That came up doing a search for: can i reference more than one css file
Eric Weiss
@eweiss17
Sep 21 2017 01:33
@crashCart-Coding i'm going to assume yes, just be aware that the second file references will override any similarities between the two. i.e. if they share the same class, the second will be applied
korzo
@korzo
Sep 21 2017 01:44
@crashCart-Coding you can have as many css files in html document as you want.
You can even load css file inside css file using @import directive, but latter is not good practice
Final css values are calculated according to priority (file order, style tag, inline styles)
David
@crashCart-Coding
Sep 21 2017 01:48
Thank you both Frank and Eric, the first time I searched I ended up on stackoverflow and they gave an emphatic no, and that forum doesn’t really allow for requesting further input because opinions get started.
Ken Haduch
@khaduch
Sep 21 2017 03:08
@heroiczero - re: :point_up: September 20, 2017 9:38 AM thanks for the kudos and for your contributions here in the chat rooms. And @Manish-Giri , too - wow, those brownie points are way up there!
CamperBot
@camperbot
Sep 21 2017 03:08
khaduch sends brownie points to @heroiczero and @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 1756 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 6560 | @manish-giri |http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Sep 21 2017 03:34
@khaduch hey buddy, how've you been? I signed off early last night..
@khaduch brownies, ahem, thx :smile:
CamperBot
@camperbot
Sep 21 2017 03:34
manish-giri sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3304 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Sep 21 2017 03:43
@Manish-Giri - doing okay here... had a few weeks away on a wedding trip, then my Mom's home, then back here, then to Cape Cod with my wife, daughter and grandkids. Fun times! Just getting back to something kind of normal again, at least for a little while. How about you?
korzo
@korzo
Sep 21 2017 05:34
@Gersho How are you doing? Hope you are ok.
Semak
@drdextar
Sep 21 2017 08:52
@JohnnyBizzel yes was doing mistake, now i am testing whole collection in for loop.
koder3
@koder3
Sep 21 2017 08:57
anybody here familiar with React.js
is it possible to set a state to a variable?
image.png
why is my state not being set to the variable lat?
Johnny
@JohnnyBizzel
Sep 21 2017 09:39
@drdextar :+1:
@koder3 You need to use this.setState({ key: value });
Liam Docherty
@ldocherty1
Sep 21 2017 10:01

Hi, why won't my images load on my web page? If you replace the path with a URL with a pic it doesn't work either. https://jsfiddle.net/djyp74yw/4/

/* PART1 */
.main-bg {
    /* The image used */
    background-image: url('../assets/mainbackground.jpg');
    /* Full height */
    height: 100%;

    /* Create the parallax scrolling effect */
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* S2 */
.parallax2 {
    /* The image used */
    background-image: url('../assets/services.jpg');
    /* Full height */
    height: 100%;

    /* Create the parallax scrolling effect */
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

https://imgur.com/a/LQMTN
the html is fine as well I checked it.

LydaTech
@lydatech
Sep 21 2017 10:07
@ldocherty1 put the project on github
Stephen James
@sjames1958gm
Sep 21 2017 10:21
@ldocherty1 Your media query entries are not closed they have two { but only one }
@media (min-width: 992px) and (max-width: 1199px) {
  .parallax2 {
    height: 65%; }
So your .main-bg section is buried inside a media query (not even sure which one)
@ldocherty1 ^
crystalclea
@crystalclea
Sep 21 2017 13:28
Hi guys! I’m working on the task “Reverse a String”. I’ve typed the following code:
reverseString("hello").split('').reverse().join('’);
It seems to work when I run the test but I just can’t pass the challenge. Does anyone know what’s wrong with my code?
Yaroslav
@YariPL
Sep 21 2017 13:28
hi. can Factorialize a Number Algorithm be solved with for loop or just if?
Jan Shah
@JanShah
Sep 21 2017 13:31
@YariPL probably with if, you need a recursive function
Yaroslav
@YariPL
Sep 21 2017 13:33
@JanShah so it can't be done with for loop? I tried to do it but I can't and when I tried with if it worked
Jan Shah
@JanShah
Sep 21 2017 13:36
@YariPL you can do it with a for loop too I guess, it just takes longer and probably a bit more work setting it up
George Fandridis
@fandridis
Sep 21 2017 13:37
@crystalclea Inside your join('') one of your brackets is a different style. No idea if that's a problem, but I thought of mentioning it. You should make sure it works for every string, so it should reserve a variable, not just the world 'hello'. I have recently made a post about this challenge at my blog http://codepiranha.com/2017/09/19/reverse-a-string/ You can take an idea :)
Jan Shah
@JanShah
Sep 21 2017 13:38
function factorial(n) {
  if(n===1)
    return n
  else 
    return n* factorial(n-1)
}
that's one version I have
and this is another :
function factorialize(num) {
  var out = [];
  if(num===0) {return 1;}
  for(var i = 0; i<num; i++){
    out.push(i+1);
  }

  return out.reduce(function(a,b) {
    return a*b;
    });
}
@YariPL
Yaroslav
@YariPL
Sep 21 2017 13:42
@JanShah I have nearly the same but can you explain why in the first example it is necessary to use n with -1 in the return
crystalclea
@crystalclea
Sep 21 2017 13:42
@fandridis i’ve passed the challenge now! thanks for your help
CamperBot
@camperbot
Sep 21 2017 13:42
:cookie: 297 | @fandridis |http://www.freecodecamp.com/fandridis
crystalclea sends brownie points to @fandridis :sparkles: :thumbsup: :sparkles:
Yaroslav
@YariPL
Sep 21 2017 13:45
@JanShah I do not mean why "n" or something else in the place of "n" but why "-1" I can't figure out
Jan Shah
@JanShah
Sep 21 2017 13:45
@YariPL if the number is, say 10, you want to pass one less than the number every time, otherwise it will run forever
Yaroslav
@YariPL
Sep 21 2017 13:45
@JanShah thanks much for help
CamperBot
@camperbot
Sep 21 2017 13:45
yaripl sends brownie points to @janshah :sparkles: :thumbsup: :sparkles:
:cookie: 540 | @janshah |http://www.freecodecamp.com/janshah
Jan Shah
@JanShah
Sep 21 2017 13:45
the letter n doesn't matter, you can use mushypeas if you like
koder3
@koder3
Sep 21 2017 13:50
@JohnnyBizzel thanks
CamperBot
@camperbot
Sep 21 2017 13:50
koder3 sends brownie points to @johnnybizzel :sparkles: :thumbsup: :sparkles:
:star2: 1760 | @johnnybizzel |http://www.freecodecamp.com/johnnybizzel
George Fandridis
@fandridis
Sep 21 2017 13:51
@crystalclea Good job then! Good luck on next!
Rajan
@ProgramNovice
Sep 21 2017 14:33
Hi guys
I have a doubt regarding the project 'Build a Tribute Page'
are we restricted to use only html elements or can we use css elements well?
Ravi Kishore Thella
@ravikishorethella
Sep 21 2017 14:37
@ProgramNovice you are not restricted to anything. You can use css and js as well
Rajan
@ProgramNovice
Sep 21 2017 14:37
oh ok thanks :)
@ravikishorethella thanks
CamperBot
@camperbot
Sep 21 2017 14:37
programnovice sends brownie points to @ravikishorethella :sparkles: :thumbsup: :sparkles:
:star2: 1028 | @ravikishorethella |http://www.freecodecamp.com/ravikishorethella
Ravi Kishore Thella
@ravikishorethella
Sep 21 2017 14:39
@ProgramNovice :+1:
@crystalclea your code will execute only for the word hello
rscales02
@rscales02
Sep 21 2017 14:59
Does anyone know how to reset one of the challenges? I am trying to do the odd fibonacci numbers challenge and have broken the page. Every time I load that page the page loads and freezes and stays that way until Chrome offers to kill it for me. :worried:
Kyle Holm
@thekholm80
Sep 21 2017 15:09
@rscales02 i believe your code is stored in local storage, so if you clear all that then reload the page you should be good
rscales02
@rscales02
Sep 21 2017 15:13
Clearing my browsing data should fix this then?
Kyle Holm
@thekholm80
Sep 21 2017 15:14
if you're using chrome it's Settings -> Advanced -> Clear browsing data
rscales02
@rscales02
Sep 21 2017 15:15
Got it! Thanks @thekholm80 !
CamperBot
@camperbot
Sep 21 2017 15:15
rscales02 sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1479 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Greta Piliponytė
@gpiliponyte
Sep 21 2017 15:17
Can somebody please help me with their sql knowledge?
Kyle Holm
@thekholm80
Sep 21 2017 15:18
i can try
if you're doing joins and stuff like that it's beyond my ability lol
Dylan
@dhcodes
Sep 21 2017 15:46
sounds like an opportunity to learn @thekholm80
Kyle Holm
@thekholm80
Sep 21 2017 15:56
@dhcodes but learning is hard
and i'm lazy
Stephen James
@sjames1958gm
Sep 21 2017 16:00
@gpiliponyte Asking the specific question holds a better chance of getting an answer.
Darren
@DarrenfJ
Sep 21 2017 16:48
morning fCC
Alex Boquist
@aplchian
Sep 21 2017 16:49
mornnin
Stephen James
@sjames1958gm
Sep 21 2017 16:50
@DarrenfJ :wave:
Darren
@DarrenfJ
Sep 21 2017 16:50
hey hey :D @aplchian @sjames1958gm
silvanoshei
@silvanoshei
Sep 21 2017 17:05
https://codepen.io/silvanoshei/pen/WZrLBg
hey, i just started few days ago from zero and made tribute page, is it okay? can i move on to next challenge?
Alex Boquist
@aplchian
Sep 21 2017 17:06
looks good, i would move on!
Darren
@DarrenfJ
Sep 21 2017 17:08
@silvanoshei yah, yer as long as you meet the use cases you are good
@silvanoshei you submit the url, and can come back and improve the visuals later (as long as you do it via the same url).. they check them all when you submit for the certs
@silvanoshei oooOOooo there's some nice extra touches in there man :D
silvanoshei
@silvanoshei
Sep 21 2017 17:11
@DarrenfJ i'm glad you found it :D
Darren
@DarrenfJ
Sep 21 2017 17:12
I like how you sectioned it out and included vevo links
noice work :D
ok gotta run for a bit.. thanks for sharing @silvanoshei
CamperBot
@camperbot
Sep 21 2017 17:14
api offline
darrenfj sends brownie points to @silvanoshei :sparkles: :thumbsup: :sparkles:
Darren
@DarrenfJ
Sep 21 2017 17:15
thanks @silvanoshei
CamperBot
@camperbot
Sep 21 2017 17:15
darrenfj sends brownie points to @silvanoshei :sparkles: :thumbsup: :sparkles:
api offline
Darren
@DarrenfJ
Sep 21 2017 17:15
ah camperbot!
Kyle Holm
@thekholm80
Sep 21 2017 17:44
@DarrenfJ thanks
CamperBot
@camperbot
Sep 21 2017 17:44
thekholm80 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2041 | @darrenfj |http://www.freecodecamp.com/darrenfj
Kyle Holm
@thekholm80
Sep 21 2017 17:44
working as intended
first search on google
maybe this helps
Engjell Bislimi
@Engjell00
Sep 21 2017 20:44
I have a question https://www.freecodecamp.org/challenges/understanding-boolean-values ... I know what to do there to just remove false and write True instead but what's the deal with booleans
Nahuel Ovejero
@NahuelOvejero
Sep 21 2017 21:43
@Engjell00 booleans can store 2 values, True / False
they are good for conditional, logic expression,
if(myBoolean){ // do code if the var is True}
else{ //do code if myBoolean is false}
no much more
well, you can also store expression
equality = (1 == 2); so equality is false , because 1 == 2 is false
Mike
@MikeJSchorah
Sep 21 2017 22:03
Which is better for blogging as a web developer: trending topics or social media?
Nahuel Ovejero
@NahuelOvejero
Sep 21 2017 22:08
If you want your blog to be a kind of "validation" that you are a dedicated web developer, talk about techonologies related
Mike
@MikeJSchorah
Sep 21 2017 22:08
Trending topics - Blogging on them quickly to "get ahead" of the news cycle. Using tools such as Google Alerts, Feedly, and Buzzsumo to monitor trending topics in the web development industry.
Nahuel Ovejero
@NahuelOvejero
Sep 21 2017 22:08
if not, talk wathever you want @MikeJSchorah
Mike
@MikeJSchorah
Sep 21 2017 22:09
Social media - Finding out what types of content interests your clients. Finding out what types of content they like to share. I'd use Buzzsumo. It tells what type of content is popular, and therefore you can produce that content yourself.
Nahuel Ovejero
@NahuelOvejero
Sep 21 2017 22:09
yup, that sounds nice
Mike
@MikeJSchorah
Sep 21 2017 22:09
@NahuelOvejero Technologies related?
Nahuel Ovejero
@NahuelOvejero
Sep 21 2017 22:10
how to make some web related, or how it works beneath
Mike
@MikeJSchorah
Sep 21 2017 22:11
@NahuelOvejero Sounds like a good idea
@NahuelOvejero Would you recommend trending topics or social media?
Nahuel Ovejero
@NahuelOvejero
Sep 21 2017 22:12
I would preffer trending topics, but I think you can mix both
Mike
@MikeJSchorah
Sep 21 2017 22:13
That's what I thought at first
But if I'm marketing to customers, if I use social media, I can find out what interests them. Then again, if I use trending topics, I'll sound like an expert. @NahuelOvejero
Nahuel Ovejero
@NahuelOvejero
Sep 21 2017 22:15
no, you will not sounds like an expert, you will sound like someones who investigate, and get itself into it at least at the point he understand it, and can explain it
but you can do what you feel more enjoyable, or feel more confortable
Mike
@MikeJSchorah
Sep 21 2017 22:15
@NahuelOvejero So you think social media is better. I guess my overall goal would be to increase sales
Nahuel Ovejero
@NahuelOvejero
Sep 21 2017 22:15
you can talk about simple stuff also, like protocols, design, best practice ,etc
Mike
@MikeJSchorah
Sep 21 2017 22:16
opposed to spreading awareness
Nahuel Ovejero
@NahuelOvejero
Sep 21 2017 22:16
If you have the objective to increase sales, and you know that social would do it, great
Mike
@MikeJSchorah
Sep 21 2017 22:17
The thing is, I advertised on Facebook before and didn't get sales, just spreaded awareness. They say that Google is better for sales because people are actually looking for the service and ready to buy
@NahuelOvejero
Nahuel Ovejero
@NahuelOvejero
Sep 21 2017 22:18
oh, I see
well, I personally think that facebook is a bit... wierd for advert
Mike
@MikeJSchorah
Sep 21 2017 22:19
Yeah, now when I think of it. I think when people come to my website, they are looking for an experts opinion (trending topics) opposed to finding out more about what's popular (social media)
Tolu Akinnubi
@toles04
Sep 21 2017 23:15
Hello guys
please where is the best place to get web design jobs
Eric Miller
@ericmiller777
Sep 21 2017 23:27
I had a recruiter look at my resume twice, call me, say he definitely wants to do an interview, told me he'll meet me somewhere between or do a phone interview, then says he will call right back
He has not
I just wanted the interview experience
Just really weird
I don't even care if he would've called and said I wasn't qualified
Chris
@bestintown23
Sep 21 2017 23:30
How can i make my image and p element be shown inline? https://codepen.io/bestintown23/pen/eGdYov
Mike
@MikeJSchorah
Sep 21 2017 23:40
@toles04 Best place? Please define
@NahuelOvejero Now I'm thinking of social media. If my clients have low technical ability, then they might not care about the latest trends.