These are chat archives for FreeCodeCamp/Help

8th
Sep 2017
Denise Pilgrim
@godluvu22
Sep 08 2017 02:57
If anyone could check my tribute page and tell me what I am missing. I finally got everything centered except for the image. https://codepen.io/Denise22/project/editor/ZLYvRv
Gersho
@Gersho
Sep 08 2017 02:59
on my screen nothing is centered, it's to the left
Prabu Rangki
@praburangki
Sep 08 2017 03:00
make the div that is wrapping the image to have a css attribute text-align: center;
Denise Pilgrim
@godluvu22
Sep 08 2017 03:00
well on mine it isnt but a pop up says it won't let me save it. Maybe it isn't showing my latest work. Because on my full page view its all centered except for the image. How else can I share it on this help page?
Gersho
@Gersho
Sep 08 2017 03:00
https://ibb.co/dsQdoa
left is Vivaldi, right is Firefox
just1witness
@just1witness
Sep 08 2017 03:01
@godluvu22 You used col-xx-xx Offsets to center your text, have you tried using it for your pic too?
Denise Pilgrim
@godluvu22
Sep 08 2017 03:01
good plan I will try! Thanks just1witness!
Gersho
@Gersho
Sep 08 2017 03:01
so vivaldi nothing works i guess ? and firefox the grey div is centered, but the text isn't
just1witness
@just1witness
Sep 08 2017 03:01
Let me know if it works :)
Denise Pilgrim
@godluvu22
Sep 08 2017 03:01
sure!
just1witness
@just1witness
Sep 08 2017 03:03
@godluvu22 Next time you should probably use a pen, for your fcc projects. It's easier for people to help you with a pen.
Eric Miller
@ericmiller777
Sep 08 2017 03:03
hey guys
Gersho
@Gersho
Sep 08 2017 03:03
:wave: @ericmiller777
just1witness
@just1witness
Sep 08 2017 03:03
hello
Eric Miller
@ericmiller777
Sep 08 2017 03:03
so i know i can do if(arr.isArray){
check arr[1][2]
ect
but
how can i make it check if theres many arrays
without knowing how many arrays there are
nested arrays
just1witness
@just1witness
Sep 08 2017 03:05
thinking....
Eric Miller
@ericmiller777
Sep 08 2017 03:05
no rush
ill look it up
just1witness
@just1witness
Sep 08 2017 03:05
couldn't you iterate through your array of arrays and have a counter for each true you return using the first test you mentioned?
since each sub array will have it's own index
like if true count++
Eric Miller
@ericmiller777
Sep 08 2017 03:07
i see but then how do you have it look into the next array
just1witness
@just1witness
Sep 08 2017 03:07
each array has it's own index, so if you check the main array, each sub array will be index 0, 1, 2, 3 ext ext
will there be nested, nested arrays?
Eric Miller
@ericmiller777
Sep 08 2017 03:08
perhaps
just1witness
@just1witness
Sep 08 2017 03:08
like more that just subarrays, but sub-sub arrays?
Eric Miller
@ericmiller777
Sep 08 2017 03:08
yep
Gersho
@Gersho
Sep 08 2017 03:08
have you heard about recursion ?
Eric Miller
@ericmiller777
Sep 08 2017 03:08
@Gersho yes
seems like the best way of doing this
im just not sure how
Gersho
@Gersho
Sep 08 2017 03:09

well then if you did
@ericmiller777
so i know i can do if(arr.isArray){
check arr[1][2]
ect

after that, you simply do that again if it's still an array

we're talking steamroller right ?
Eric Miller
@ericmiller777
Sep 08 2017 03:09
yes
i mean i knwo i can do that but only because di know
just1witness
@just1witness
Sep 08 2017 03:10
Why are you trying to count the arrays? I thought steamroller was to flatten them all into one
Eric Miller
@ericmiller777
Sep 08 2017 03:10
how many arrays there are
what if there was 1000 arrays
this is mostly just me wondering
Gersho
@Gersho
Sep 08 2017 03:10
that's where recursion comes in (it's not mandatory, there's methods without it)
because recursion recalls the whole function, so whatever steps you did before, will be done again, so even if it's 100 arrays deeps, it'll only work that much more
just1witness
@just1witness
Sep 08 2017 03:11
@ericmiller777 Yeah, what @Gersho said
you need a recursive function, then it doesn't matter how many arrays there are
Eric Miller
@ericmiller777
Sep 08 2017 03:11
@Gersho @just1witness thanks
CamperBot
@camperbot
Sep 08 2017 03:11
ericmiller777 sends brownie points to @gersho and @just1witness :sparkles: :thumbsup: :sparkles:
:cookie: 328 | @just1witness |http://www.freecodecamp.com/just1witness
:cookie: 405 | @gersho |http://www.freecodecamp.com/gersho
Eric Miller
@ericmiller777
Sep 08 2017 03:11
so
while(arr[i].isArray){
?
just1witness
@just1witness
Sep 08 2017 03:12
reduce
Eric Miller
@ericmiller777
Sep 08 2017 03:13
thank you
just1witness
@just1witness
Sep 08 2017 03:13
use the reduce function and call the main function inside it
my pleasure
Gersho
@Gersho
Sep 08 2017 03:13
well depends how you worked it, some methods don't even use recursion (mine use recursion, concat and reduce)
find a method that makes sens to you
CamperBot
@camperbot
Sep 08 2017 03:13
find a method that makes sens to you
nothing found
Gersho
@Gersho
Sep 08 2017 03:14
sense
just1witness
@just1witness
Sep 08 2017 03:14
yeah, concat, I forgot about that one
LOL
oh, cbot
Henry
@GitHub-Henry
Sep 08 2017 03:15
cbot where is your friend eightball?
CamperBot
@camperbot
Sep 08 2017 03:15
you called?
just1witness
@just1witness
Sep 08 2017 03:16
find my mind
CamperBot
@camperbot
Sep 08 2017 03:16
find my mind
nothing found
just1witness
@just1witness
Sep 08 2017 03:16
LOLOLOL
Yup
Henry
@GitHub-Henry
Sep 08 2017 03:16
eightball can you find cbot's mind?
CamperBot
@camperbot
Sep 08 2017 03:16
@GitHub-Henry :8ball: outlook not so good :sparkles:
just1witness
@just1witness
Sep 08 2017 03:17
HAHAHA
I am so easily amused
Denise Pilgrim
@godluvu22
Sep 08 2017 03:30
is there any way to change a FCC project to a pen?
Gersho
@Gersho
Sep 08 2017 03:33
copy pasting :P
seriously i dunno tho, but that's how i get my projects made in an editor into codepen
Eric Miller
@ericmiller777
Sep 08 2017 04:33
@Gersho is there a conversion table for binary to text?
oh i think i found one
Gersho
@Gersho
Sep 08 2017 04:35
maybe i dunno, wouldn't it be better to convert it to decimal ?
what are you trying to achieve ?
Eric Miller
@ericmiller777
Sep 08 2017 04:35
probably as the way im thinking of im going to make a giant array lol
binary agents
Gersho
@Gersho
Sep 08 2017 04:36
oh
do you know about the parseInt() function ?
Eric Miller
@ericmiller777
Sep 08 2017 04:37
il;l go look it up
Eric Miller
@ericmiller777
Sep 08 2017 04:43
@Gersho thanks
CamperBot
@camperbot
Sep 08 2017 04:43
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 406 | @gersho |http://www.freecodecamp.com/gersho
Mukul Agrawal
@mukul09
Sep 08 2017 04:44
could anyone here help me with front-end. The given link is of my project.everything is fine when the size of the website is large but when i decrease the size of the window vertically the moon and the text gets overlap. how can i remove this overlap?
https://codepen.io/mukul09/pen/vJqNbP?editors=0010
Darren
@DarrenfJ
Sep 08 2017 04:46
evening fCC
Henry
@GitHub-Henry
Sep 08 2017 04:46
@DarrenfJ hello
Gersho
@Gersho
Sep 08 2017 04:46
:wave: @DarrenfJ
Henry
@GitHub-Henry
Sep 08 2017 04:46
@mukul09 try moving moon up a bit
Darren
@DarrenfJ
Sep 08 2017 04:47
:D :wave:
Mukul Agrawal
@mukul09
Sep 08 2017 04:47
@GitHub-Henry no thats not working
Henry
@GitHub-Henry
Sep 08 2017 04:50
@mukul09 if you keep moving the moon up eventually it won't be in your text
Gersho
@Gersho
Sep 08 2017 04:53
what is this symbol --> ` <--- named ? i'm trying to google some stuff but without a name that's not easy xD
Henry
@GitHub-Henry
Sep 08 2017 04:56
perhaps try arrow functions
Gersho
@Gersho
Sep 08 2017 04:57
no actually i'm looking for ` because i sometime see it used to start/end a string (same usage as ' and " ) but i wanted to know more about that
Henry
@GitHub-Henry
Sep 08 2017 04:58
perhaps single quote '
double quote "
both can enclose a string
Sandip Shrestha
@saninmersion
Sep 08 2017 05:00
@Gersho that a backtick symbol
Gersho
@Gersho
Sep 08 2017 05:00
thanks @GitHub-Henry @saninmersion
CamperBot
@camperbot
Sep 08 2017 05:00
gersho sends brownie points to @github-henry and @saninmersion :sparkles: :thumbsup: :sparkles:
:cookie: 537 | @saninmersion |http://www.freecodecamp.com/saninmersion
:cookie: 357 | @github-henry |http://www.freecodecamp.com/github-henry
Gersho
@Gersho
Sep 08 2017 05:00
i would have never guessed that name
Henry
@GitHub-Henry
Sep 08 2017 05:00
@saninmersion i didn't know a backtick could enclose a string
Gersho
@Gersho
Sep 08 2017 05:01
well i've seen it in some cases, and wanted to google to see if it was specific to some cases or worked as a valid string enclose
Sandip Shrestha
@saninmersion
Sep 08 2017 05:01
@GitHub-Henry it does not. here in gitter strings enclosed in backticks are formatted as code like code
Gersho
@Gersho
Sep 08 2017 05:03
oh aparently, they aren't strings in the case of backticks, they are Template literals
Henry
@GitHub-Henry
Sep 08 2017 05:06
so much learning to do...
Gersho
@Gersho
Sep 08 2017 05:06
haha yeah
oh they allow fancy stuff like
string text ${expression} string text
oh crap
well look at the link it shows intersting stuff
Gersho
@Gersho
Sep 08 2017 05:10
:thumbsup:
Prabu Rangki
@praburangki
Sep 08 2017 05:13
the backtick (`) was introduced in ES6 i think
Eric Miller
@ericmiller777
Sep 08 2017 05:15
Hey guys I been on these intermediatte algroitms for so long, I noticed the advanced ones are optional, is it okay to move on, and go back and do these later?
Gersho
@Gersho
Sep 08 2017 05:15
of course, you're the own master of your studies
Henry
@GitHub-Henry
Sep 08 2017 05:15
They are not required for the cert
Eric Miller
@ericmiller777
Sep 08 2017 05:16
i feel bad getting the cert and not getting them
but i feel i will be stuck forever
Henry
@GitHub-Henry
Sep 08 2017 05:16
you can always go back after the cert is done
Eric Miller
@ericmiller777
Sep 08 2017 05:16
i guess
Gersho
@Gersho
Sep 08 2017 05:16
start a project, do some other lessons, and come back to JS a bit later if you feel like you're not making progress at the moment
Prabu Rangki
@praburangki
Sep 08 2017 05:16
where is the algorithms section?
Henry
@GitHub-Henry
Sep 08 2017 05:16
of course then you'll want to start the back end cert
see the map
Gersho
@Gersho
Sep 08 2017 05:17
i haven't done my portfolio yet i'm starting react, as long as you're not slacking anything is good i guess ^^
Prabu Rangki
@praburangki
Sep 08 2017 05:17
@GitHub-Henry i forgot it was in the front-end section. got it thanks
CamperBot
@camperbot
Sep 08 2017 05:17
praburangki sends brownie points to @github-henry :sparkles: :thumbsup: :sparkles:
:cookie: 358 | @github-henry |http://www.freecodecamp.com/github-henry
Henry
@GitHub-Henry
Sep 08 2017 05:20
am i the only one using atom.io that get's an error when i try to update packages or the program?
Gersho
@Gersho
Sep 08 2017 05:20
i have atom
Henry
@GitHub-Henry
Sep 08 2017 05:21
can you update, or is it just me
Gersho
@Gersho
Sep 08 2017 05:21
give min a min i'll try updating the program
Henry
@GitHub-Henry
Sep 08 2017 05:22
when i try to update i get an error saying i can't update i'm on 1.19.7 x64
Gersho
@Gersho
Sep 08 2017 05:23
when i go into the update tab in my settings it says i'm up to date and i don't have any atom update in apt upgrade either
Henry
@GitHub-Henry
Sep 08 2017 05:24
can you update packages?
Gersho
@Gersho
Sep 08 2017 05:24
i'm on 1.12.7
i don't know it says they are already up to date
Henry
@GitHub-Henry
Sep 08 2017 05:26
so you can update without an error. i press update and just get a msg 'error fetching outdated packages' when i click the button that says show output, i get 1 word, 'undefined'
oh well
Gersho
@Gersho
Sep 08 2017 05:26
so you have old packages ?
Henry
@GitHub-Henry
Sep 08 2017 05:27
probably, but i can't update them
i tried unistalling and reinstalling
but haven't finished doing that yet
Gersho
@Gersho
Sep 08 2017 05:27
wouldn't a reinstall be the latest version ?
oh ok
Henry
@GitHub-Henry
Sep 08 2017 05:28
yeah, that's why i'm doing it
manually updating is bummer though
Gersho
@Gersho
Sep 08 2017 05:29
time to move to linux if that's how you think
Eric Miller
@ericmiller777
Sep 08 2017 05:29
@Gersho I made a really crappy portfolio for my project, then recently i took a break, and made a nicer one, but yea i might end up doing it again once i learn other frameworks
Gersho
@Gersho
Sep 08 2017 05:30
i'm waiting to have actual stuff to put in to do it
so when i'll start job hunting i guess
Eric Miller
@ericmiller777
Sep 08 2017 05:30
mines full of the projects ive done, and ill change them once i make better stuff
Henry
@GitHub-Henry
Sep 08 2017 05:30
that more projects you do the better you get
so if you wait, you'll probably end up with a nicer portfolio
also look at examples
Little Monster
@minimaliststyle
Sep 08 2017 05:52
hello,can I ask a question? how to set the font-size correctly
p{
font-size:16px;
}
Prabu Rangki
@praburangki
Sep 08 2017 05:53
that is already correct
Gersho
@Gersho
Sep 08 2017 05:53
what you have written would give a 16px font size to all the p elements
Little Monster
@minimaliststyle
Sep 08 2017 05:53
It just can't work
Gersho
@Gersho
Sep 08 2017 05:53
what are you trying to achieve ?
Little Monster
@minimaliststyle
Sep 08 2017 05:54

p{
font-size:16px;
}

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

<h2 class="red-text">我家的猫咪</h2>

<p class="red-text">在大家心目中,猫是慵懒的可爱的化身,它可以睡饱了再起来吃饭,可以逗趣小耗子,可以卖得了萌,使得了坏,这样百变的小怪兽就集结在一只宠物上,怎能不惹人怜爱。</p>
<p>养动物有的时候,就是介于爱与恨之间,当你钦羡别人萌宠这么可爱的时候,你一定没有想过,狗狗和猫猫会到处拉屎,甚至会屯老鼠,啃鞋子,用爪子爬门,你不理它,它就挠你,你要对它发脾气,它会比你更来劲。所以,狗猫慎入,没有一定的准备,切勿随便去侍养动物。它们一旦认定你了,你就是它们的主人,如果你抛弃它们,它们必定心中重创。</p>

Gersho
@Gersho
Sep 08 2017 05:54
maybe you placed it at the wrong place in your code ?
Manish Giri
@Manish-Giri
Sep 08 2017 05:54
@minimaliststyle it goes inside style tags
Gersho
@Gersho
Sep 08 2017 05:54
put it inside <style> </style>
Henry
@GitHub-Henry
Sep 08 2017 05:54
are you trying to override font size of something like bootstrap
Gersho
@Gersho
Sep 08 2017 05:54
nha that's the css lessons
Henry
@GitHub-Henry
Sep 08 2017 05:55
could be a specificity issue
hadan984
@hadan984
Sep 08 2017 05:56
.p
not p
Gersho
@Gersho
Sep 08 2017 05:56
no p is right, you use the . when you call a class
Little Monster
@minimaliststyle
Sep 08 2017 05:57
ok...thanks very much~
Henry
@GitHub-Henry
Sep 08 2017 05:57
@minimaliststyle if that's chinese you might try the chinese room https://gitter.im/FreeCodeCamp/chinese
Little Monster
@minimaliststyle
Sep 08 2017 06:03
(⊙v⊙)I see, thanks Henry.
Gersho
@Gersho
Sep 08 2017 06:04
you are welcome here too, but they might help you better there
Little Monster
@minimaliststyle
Sep 08 2017 06:09
haha,I pressed the help butten just now ,and then came here directly.
Emmanuel Akodia
@akodiaemma
Sep 08 2017 06:13
guys i need help quickly understanding why my website displays nearly everything on responsive web tool on chrome and firefox but doesnt shows something different on mobile
can anyone help me understand that please
expo2017.ug is the website
Eric Miller
@ericmiller777
Sep 08 2017 06:42
So i did arguments optional
function addTogether(num1, b){
  if(Number.isInteger(num1) == false){
     return undefined;
  }else if(typeof b === 'string' || b instanceof String){
   return undefined; 
  }else if(b != null){
      return num1 += b;
      }else{
      return function(b){
      if(Number.isInteger(b) == true){
      return num1 += b;
      }else{
        return undefined;
      }
  };
}
}

addTogether(2, "3");
is that really bad?
feel kinda bad i used if(typeof b === 'string' || b instanceof String)
but i was thinking and I think that works under all use cases?
Stephen James
@sjames1958gm
Sep 08 2017 08:53
@ericmiller777 You could use arguments.length to determine if b is a valid argument.
(arguments.length > 1 && Number.isInteger(b))
BuntyBru
@BuntyBru
Sep 08 2017 08:56
going to start YELPCAMP project
sorry wrong group
Jake
@JakeDVirus
Sep 08 2017 09:20
what is the meaning of this statement "Developers are now responsible for handling the paging offsets when polling the API."
Johnny
@JohnnyBizzel
Sep 08 2017 09:45
@NeelDVirus paging the amount of results returned from the API perhaps? Try searching Google and you will see there are different pages of results.
Jake
@JakeDVirus
Sep 08 2017 09:47
@JohnnyBizzel oh yeah this make sense
Thanks for bringing in the projection
heroiczero
@heroiczero
Sep 08 2017 09:58
@Manish-Giri ty
CamperBot
@camperbot
Sep 08 2017 09:58
heroiczero sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6514 | @manish-giri |http://www.freecodecamp.com/manish-giri
Mennaali
@MennaAly
Sep 08 2017 10:02
what does the break length suppose to do in Pomodoro Clock project ? :D
Stephen James
@sjames1958gm
Sep 08 2017 10:13
@MennaAly It is a second timer for how long the break is before the next main timer starts.
rscales02
@rscales02
Sep 08 2017 10:14
Can someone help me understand why my codepen css won't load my background image? https://codepen.io/rscales02/pen/MvMBgW
Mennaali
@MennaAly
Sep 08 2017 10:15
@sjames1958gm ok thank you :D
CamperBot
@camperbot
Sep 08 2017 10:15
mennaaly sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8450 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
heroiczero
@heroiczero
Sep 08 2017 10:16
@rscales02 try https://photos-5.dropbox.com/t/2/AABjoU2tiveLHj70OMhSMfSNITfztR5PXz5OD5aoN6pqYA/12/177772085/jpeg/32x32/3/1504882800/0/2/background.jpg/EOvgvcAFGAMgAigC/_lwxDIi2EQOMcf8_2sa3UxQGuOVYr8_9o5w6iymrOkQ?dl=0&size=1600x1200&size_mode=3
Eric Miller
@ericmiller777
Sep 08 2017 10:17
@sjames1958gm thanks
CamperBot
@camperbot
Sep 08 2017 10:17
ericmiller777 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8451 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
heroiczero
@heroiczero
Sep 08 2017 10:17
@rscales02 next time right click the image and Copy Image Location to get the link to the image.
rscales02
@rscales02
Sep 08 2017 10:20
Thanks @heroiczero !
CamperBot
@camperbot
Sep 08 2017 10:20
rscales02 sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1701 | @heroiczero |http://www.freecodecamp.com/heroiczero
John Wilfred
@ewojjowe
Sep 08 2017 11:41

@YuserahN
How long did it take you to find a job? And did you complete all the certificates on FCC, including the non-profit projects?

my answer on that question:
I didn't even have completed any certificate yet, and I'm still learning. I'm now paid to learn. :)

Jake
@JakeDVirus
Sep 08 2017 12:31
adding margin: 50px auto;to wrapper-twitch class created a margin of 50px to the whole html page but not to the block (of class wrapper-twitch).
and if i add any text in html before the placement of div with wrapper-twitchclass in html then the page is rendered as expected with the padding of 50px to wrapper-twich class block and not to the whole html page. why is this happening? and what is the solution?
https://codepen.io/neel111/pen/oerPzJ
Pethaf
@Pethaf
Sep 08 2017 12:43
@ewojjowe I completed the pomodoro timer and the calculator.
Still looking for a job.
Maybe I should put som effort into finishing the final two front-end projects.
jialu
@chancejl
Sep 08 2017 14:06

can someone help me ? i dont understand how to do the javascript word blanks .

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
var result = "";
// Your code below this line

// Your code above this line
return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");

korzo
@korzo
Sep 08 2017 14:13
@chancejl Join parameters and add some words to it.
Here is my solution
return "Your " + myAdjective + " " + myNoun + " " + myVerb + " very "+myAdverb + ".";
jialu
@chancejl
Sep 08 2017 14:18
@korzo return sentence need change? if possible,return sentence above could change?
Tiago Correia
@tiagocorreiaalmeida
Sep 08 2017 14:18
@sjames1958gm thanks for the opinion didnt knew those things existed xd, was thinking maybe about some api that I could place like in google maps and use google api to make mardowns and stuff do you have any idea of one api that returns data that could be usedo n that porpuse?
CamperBot
@camperbot
Sep 08 2017 14:18
tiagocorreiaalmeida sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8452 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
korzo
@korzo
Sep 08 2017 14:20
@chancejl You can change words in "" like
return "My " + myAdjective + " " + myNoun + " " + myVerb + " very "+myAdverb + ".";
jialu
@chancejl
Sep 08 2017 14:23
@korzo ok,thank you very much
CamperBot
@camperbot
Sep 08 2017 14:23
chancejl sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 460 | @korzo |http://www.freecodecamp.com/korzo
korzo
@korzo
Sep 08 2017 14:24
@chancejl This challenge is little bit unfortunate because it requires knowledge of English grammar
jialu
@chancejl
Sep 08 2017 14:26
@korzo ok, i konw ,thank you
CamperBot
@camperbot
Sep 08 2017 14:26
chancejl sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
api offline
Pethaf
@Pethaf
Sep 08 2017 14:52
@korzo Does that challenge accept template strings?
That could probably cut down coding by a lot.
korzo
@korzo
Sep 08 2017 14:54
@Pethaf sure. You should return string so you can use template string or string concatenation as you want
Pethaf
@Pethaf
Sep 08 2017 14:55
Template strings are an ES6 feature.
I don't know if the FCC parser supports ES6 yet.
Stephen James
@sjames1958gm
Sep 08 2017 14:55
@tiagocorreiaalmeida https://developers.zomato.com/documentation
this looks like one where it has restaurant locations.
korzo
@korzo
Sep 08 2017 15:01
@Pethaf Tests for this challenge doesn't use parser. You can use ES6 as long as your browser supports it.
Darren
@DarrenfJ
Sep 08 2017 15:13
morning fCC
Stephen James
@sjames1958gm
Sep 08 2017 15:17
@DarrenfJ :wave:
Darren
@DarrenfJ
Sep 08 2017 15:18
hey buddy! :D
Stephen James
@sjames1958gm
Sep 08 2017 15:20
@Pethaf // jshint esversion:6 use this to tell linter to not flag es6 as invalid
Morchid Chellali
@Morched23MJ
Sep 08 2017 15:33
Hey guys, I want to use Pug in my html code. How do I compile Pug, after I npm install it?
I'm coding on VS
Darren
@DarrenfJ
Sep 08 2017 15:34
nothing like an easy morning question over coffee ;)
@Morched23MJ sorry man, can't help, haven't used that in the past...
Thomson Muriyadan
@thedigitalmonk
Sep 08 2017 15:35
Are you using any task runner @Morched23MJ ?
Like gulp or grunt?
Morchid Chellali
@Morched23MJ
Sep 08 2017 15:35
Owh thanks tho, @DarrenfJ. I dont think so, @thedigitalmonk
CamperBot
@camperbot
Sep 08 2017 15:35
:cookie: 294 | @thedigitalmonk |http://www.freecodecamp.com/thedigitalmonk
:star2: 2012 | @darrenfj |http://www.freecodecamp.com/darrenfj
morched23mj sends brownie points to @darrenfj and @thedigitalmonk :sparkles: :thumbsup: :sparkles:
Thomson Muriyadan
@thedigitalmonk
Sep 08 2017 15:36
@Morched23MJ this will help - https://stackoverflow.com/questions/43001175/generate-a-local-html-file-with-pug-npm-gulp
Basically you need a task runner like gulp to watch for changes and compile
Morchid Chellali
@Morched23MJ
Sep 08 2017 15:36
Alright, I already thanked you, lol
Thomson Muriyadan
@thedigitalmonk
Sep 08 2017 15:37
Haha. doesn't matter. happy to help
Morchid Chellali
@Morched23MJ
Sep 08 2017 15:37
ty
If I use Pug in my code, then I push the code on Github to later use Github pages, will people be able to see the code as html? or pug?
Thomson Muriyadan
@thedigitalmonk
Sep 08 2017 15:42
Github pages will look for and display HTML files which should be available in your "public" folder. I would suggest you watch some getting started with pug videos to understand how this works.
Morchid Chellali
@Morched23MJ
Sep 08 2017 15:44
Alright, ty again
Stephen James
@sjames1958gm
Sep 08 2017 15:51
@Morched23MJ webpack is another option for bundler/compiler
Thomson Muriyadan
@thedigitalmonk
Sep 08 2017 15:52
Isn't webpack a little complicated for beginners?
Praveen Saraogi
@saraogipraveen
Sep 08 2017 16:18
suggest me best laptop for programming
Tiago Correia
@tiagocorreiaalmeida
Sep 08 2017 16:31
function accum(s) {
    // your code
  var final = "";
  for(let i = 0; i <s.length; i++){
    var str = "";
    str += s[i].toUpperCase();
    while(str.length < i+1){
      str +=s[i];
    }
    if(i+1 < s.length){
      str +="-";
    }
    final +=str;
  }
  return final;
}
Expected: 'M-Jj-Ttt-Kkkk-Uuuuu-Bbbbbb-Ooooooo-Vvvvvvvv-Qqqqqqqqq-Rrrrrrrrrr-Uuuuuuuuuuu', instead got: 'M-Jj-Ttt-Kkkk-Uuuuu-BBBBBB-Ooooooo-Vvvvvvvv-Qqqqqqqqq-Rrrrrrrrrr-UUUUUUUUUUU'
what im missiong?
why the last one goes all uppercase?
wait nm
had to lower case the entire string on the start
Randell Dawson
@RandellDawson
Sep 08 2017 16:37
@tiagocorreiaalmeida - what was passed into the function accum for this particular test case?
Randell Dawson
@RandellDawson
Sep 08 2017 17:20
function accum(s) {
  let final = '';
  for (i = 0; i < s.length; i++)
    final += s[i].toUpperCase() + (i > 0 ? s[i].toLowerCase().repeat(i) : '') + '-';
  return final.slice(0,-1);
}
Mike
@MikeJSchorah
Sep 08 2017 17:39
How much easier is it to use WordPress over Drupal?
Anyone has a idea how he put the image of one of his project full page?
I am still trying to get my whole report centered. I have changed so many things but the image is still to the left and now the caption etc. are not with the image because they are centered. Really appreciate you guys!/gals!
Stephen James
@sjames1958gm
Sep 08 2017 21:17
@godluvu22 Well as a start you have < id="image_div
which is missing the <div
Stephen James
@sjames1958gm
Sep 08 2017 21:26
@godluvu22 bootstrap 4 doesn't appear to have col-xs-12 - just col-12 for extra small
is the answer myVar=0; var a= 9; ?
Stephen James
@sjames1958gm
Sep 08 2017 21:37
@godluvu22 Looks like you are using bootstrap 4 include but bootstrap 3 classes.
Here is the html adjusted for bootstrap 4
https://codepen.io/silgarth/pen/LjwELM?editors=1100
@Engjell00 myVar=0 is not needed.
You might need a space before the = depending on the test rules
@Engjell00 var a = 9; is correct
Engjell Bislimi
@Engjell00
Sep 08 2017 21:39
so i don't need to write my var = 0;
Stephen James
@sjames1958gm
Sep 08 2017 21:47
@Engjell00 no,
at the beginning it's myVar = myVar; why do i need to change it for b= myVar++; to work?
thanks @sjames1958gm
CamperBot
@camperbot
Sep 08 2017 21:49
engjell00 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8453 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Sep 08 2017 21:50
@Engjell00
You replace myVar = myVar + 1 with myVar++
You don't need the b = part that just assigns the value of myVar
Engjell Bislimi
@Engjell00
Sep 08 2017 21:50
I did b= myVar++; and it work
so I need to create another variable to work?
Stephen James
@sjames1958gm
Sep 08 2017 21:51
You don't
All you need is
myVar++
++ takes the value of the variable and adds one and then puts the value back into the same variable
Engjell Bislimi
@Engjell00
Sep 08 2017 21:52
ohhh
Christopher Carr
@cacarr-pdxweb
Sep 08 2017 21:53
@MikeJSchorah I would say WordPress is quite a bit easier for someone who hasn't previously used either. WP has a larger selection of plugins, updates easier, and WordPress development is more often about customizing themes, whereas Drupal users are more likely to be developers inclined to build things more from scratch.
Engjell Bislimi
@Engjell00
Sep 08 2017 21:54
thanks @sjames1958gm I feel what i am learning at the beginning of javascript seems kinda useless..
CamperBot
@camperbot
Sep 08 2017 21:54
engjell00 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
api offline
Engjell Bislimi
@Engjell00
Sep 08 2017 21:58
i'm sorry for spamming but i'm trying to google that and cannot find it
what the hell???
Denise Pilgrim
@godluvu22
Sep 08 2017 22:06
Thanks sJames!
Kyle Holm
@thekholm80
Sep 08 2017 22:27
@Manish-Giri thanks
CamperBot
@camperbot
Sep 08 2017 22:27
thekholm80 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6515 | @manish-giri |http://www.freecodecamp.com/manish-giri
how can i put the picture side by side
display: inline-block; ?
piteto
@piteto
Sep 08 2017 22:37
@Engjell00 Yes, inline-block will work. If you want to use bootstrap instead, add the bootstrap library to your project.
Engjell Bislimi
@Engjell00
Sep 08 2017 22:39
where is the boostrap library
Engjell Bislimi
@Engjell00
Sep 08 2017 22:40
and is it the same library everytime^
Manish Giri
@Manish-Giri
Sep 08 2017 22:40
@thekholm80 ty ty
CamperBot
@camperbot
Sep 08 2017 22:40
manish-giri sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1463 | @thekholm80 |http://www.freecodecamp.com/thekholm80
piteto
@piteto
Sep 08 2017 22:41
there are multiple versions of bootstrap @Engjell00 4.0 Beta is the latest version
Engjell Bislimi
@Engjell00
Sep 08 2017 22:42
i dont understand honestly.. I know I need to import it in my <head> but which one should I take
piteto
@piteto
Sep 08 2017 22:42
In codepen, click the "settings" button, then choose which version you want from the quick-add dropdown menu
Codepen Settings >>> CSS >>> Quick-add
Engjell Bislimi
@Engjell00
Sep 08 2017 22:45
@piteto thank you so much .... it's been 2 days i'm on this portefolio project
CamperBot
@camperbot
Sep 08 2017 22:45
engjell00 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 75 | @piteto |http://www.freecodecamp.com/piteto
Engjell Bislimi
@Engjell00
Sep 08 2017 22:46
sorry last question
as you can see the picture are not sided by sided
how shoud i do
Mike
@MikeJSchorah
Sep 08 2017 22:48
Thanks @cacarr-pdxweb
CamperBot
@camperbot
Sep 08 2017 22:48
mikejschorah sends brownie points to @cacarr-pdxweb :sparkles: :thumbsup: :sparkles:
:cookie: 81 | @cacarr-pdxweb |http://www.freecodecamp.com/cacarr-pdxweb
piteto
@piteto
Sep 08 2017 22:48
@Engjell00 Try using the bootstrap grid - it's designed to put items side by side: https://getbootstrap.com/docs/4.0/layout/grid/
Engjell Bislimi
@Engjell00
Sep 08 2017 22:50
omg i am lost in my <div> wow
piteto
@piteto
Sep 08 2017 22:50
  <div class="portfolio container">
    <div class="row">
      <div class="col text-center">
        <h2>PORTFOLIO</h2>
      </div>
    </div>
    <div class="row">
      <div class="col">
        <img class="img-fluid" src="https://68.media.tumblr.com/051cb3ce5daa174b0c7b787cf5aba156/tumblr_ovr9mvsRzY1t1cy7no1_500.jpg">
      </div>
      <div class="col">
        <img class="img-fluid" src="https://68.media.tumblr.com/ef5e5a1a1e0ffb8dc741915b4281997b/tumblr_ovynr7xoPz1tojfn3o2_500.jpg">
      </div>
      <div class="col">
        <img class="img-fluid" src="https://68.media.tumblr.com/9ad18d0e3ba4120e5f4fa67798c1719f/tumblr_ovyr4eTtMN1w6zliqo1_500.jpg">
      </div>
      <div class="col">
        <img class="img-fluid" src="https://68.media.tumblr.com/5b6071b4f463b22bb7c7f3cd8a91e265/tumblr_ovyjq4PubQ1rl2y79o6_500.jpg">
      </div>
    </div>
  </div>
That's one example - experiment with the grid system and resize your browser to see how you would like to adjust it
Engjell Bislimi
@Engjell00
Sep 08 2017 22:57
wait how did you but them side by side..
did I do something wrong with the width of my other container?
is it the img-fluid?
I wil delete it all and restart again.
@piteto thank you so much
CamperBot
@camperbot
Sep 08 2017 23:01
engjell00 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
api offline
Nick Cleary
@Hijerboa
Sep 08 2017 23:29
Hey guys... I'm currently doing the smallest common multiple intermediate algorithm challenge. For some reason, my code works with three of the four test cases, but the last one it doesn't work with. My code outputs the correct number, but the thing on FCC doesn't accept it as a valid solution. Could someone please just paste my code in an see if it works for them, or if there's just something wrong with my computer.
function smallestCommons(arr) {
  var isItReally = false;
  var isItSmallest = 0;
  var arrToTest = [];
  if(arr[0] > arr[1]){
    arr[2] = arr[1];
    arr[1] = arr[0];
    arr[0] = arr[2];
    arr.splice(2,1);
  }
  for(i=arr[0]; i<=arr[1]; i++){
    arrToTest.push(i);
  }
  var counter = (arrToTest[(arrToTest.length-1)] * 2);
  while(isItReally == false){
    isItSmallest = 0;
    for(i=0; i<arrToTest.length; i++){
      if(counter % arrToTest[i] == 0){
        isItSmallest++;
      }
    }
    if(isItSmallest == (arrToTest.length)){
      isItReally = true;
    } else{
      isItReally = false;
      counter++;
    }
  }
  return counter;
}
any help would be appreciated!
just checked using two other browsers: chrome and chromium both exhibit the symptoms above, but firefox only works with two of the test cases, and doesn't work with the last two
I'm thinking its something wrong with the browsers :/