These are chat archives for FreeCodeCamp/HelpFrontEnd

18th
Dec 2017
Riddos
@Riddos
Dec 18 2017 05:23
hey could anyone help with a quick code related problem
Linus Phan
@linusphan
Dec 18 2017 05:45
anyone have any ideas why when I set box-sizing to border box. As well as 2 inline elements to have 0 margins. WHen I set the width to 50% each, they are not on the same line
@Riddos what's your question?
this is the context btw
trying to make the search input and button be on the same line
Tiago Correia
@tiagocorreiaalmeida
Dec 18 2017 08:16
@linusphan you probably will need to float the elements but why not use.flexbox?
Display:flex
Qnd flex:0 0 50% on the elements
Linus Phan
@linusphan
Dec 18 2017 08:17
what is Qnd flex:0 0 50%?
I figured it out btw. there was white space from the font-size of the container element
once I set that to 0, the whitespace disappeared and the elements fitted perfectly
I agree floats would be another approach and so would flexbox
but I didn't want to do that for something simple as to just get rid of whitespace
xD
Zerka1982
@Zerka1982
Dec 18 2017 08:34
Hello Guys!
Could you please look at my example and tell me what I am doing wrong ... There is an extra white space at the bottom of the page when I switch to mobile version.
https://codepen.io/Zerka1982/pen/opbZxJ
Linus Phan
@linusphan
Dec 18 2017 08:48
@Zerka1982 I don't see any extra whitespace
did you just fix it?
Zerka1982
@Zerka1982
Dec 18 2017 08:48
no
Please switch to mobile version
I mean resize your browser and scroll down to see how the content looks like :/
Linus Phan
@linusphan
Dec 18 2017 08:52
i don't really see it
Deepak Manjunath
@Deepak2322
Dec 18 2017 08:52
 _queryFn(datasource, query) { 
            return datasource.filter(item => {
              if(item.Name){
                return item.Name.toLowerCase().includes(query) || item.No.startsWith(query)
              } else if(item.confidentailUser) {
                  return true
              }
            });
          }
Linus Phan
@linusphan
Dec 18 2017 08:53
down to 324px
looks fine
oh wait
i think i see it, it's when you make the screen height smaller
Zerka1982
@Zerka1982
Dec 18 2017 08:54
exactly
is it normal ?????
Deepak Manjunath
@Deepak2322
Dec 18 2017 08:54
i am using autocomplete, whenever i search using number or string, confidential user comes in between. how to avoid it. i dont want it display until i explicitly search for it.
Tiago Correia
@tiagocorreiaalmeida
Dec 18 2017 08:54
@linusphan I mean and that was a typo :D
Linus Phan
@linusphan
Dec 18 2017 08:56
@Zerka1982 take off height
for body and Html
Zerka1982
@Zerka1982
Dec 18 2017 08:56
@linusphan then ?
Linus Phan
@linusphan
Dec 18 2017 08:57
@Zerka1982 let me see..
trying to figure this out too xD
Zerka1982
@Zerka1982
Dec 18 2017 08:57
We should keep the height to 100%
Linus Phan
@linusphan
Dec 18 2017 08:57
so you want to have the background image throughout the whole page?
Zerka1982
@Zerka1982
Dec 18 2017 08:58
otherwise the background color will cover only the HTML elements of the page
Linus Phan
@linusphan
Dec 18 2017 08:58
or is it just the top part of the page?
Zerka1982
@Zerka1982
Dec 18 2017 08:58
the whole page of course
Tiago Correia
@tiagocorreiaalmeida
Dec 18 2017 08:58
you can set height: 100vh
will take the entire page
Zerka1982
@Zerka1982
Dec 18 2017 08:58
but my challenge is the white space at the bottom of the page when I switch to Mobile version
Tiago Correia
@tiagocorreiaalmeida
Dec 18 2017 08:59
change it to 100vh I dont think there will be any with space after that
Linus Phan
@linusphan
Dec 18 2017 08:59
just set the background color to body
Tiago Correia
@tiagocorreiaalmeida
Dec 18 2017 08:59
image.png
Linus Phan
@linusphan
Dec 18 2017 08:59
instead of the div
Zerka1982
@Zerka1982
Dec 18 2017 09:00
sure
thank you
Linus Phan
@linusphan
Dec 18 2017 09:00
just be cautious that 100vh limits the height
if you want the page to become longer someday it won't cover the whole page
i dont know man
haha
Zerka1982
@Zerka1982
Dec 18 2017 09:02
Well, yesterday I got confused
Linus Phan
@linusphan
Dec 18 2017 09:04
and maybe no need to put opacity
or use rgba
idk if setting opacity onto body will cause problems later
it sounds like it would..
Zerka1982
@Zerka1982
Dec 18 2017 09:11
@linusphan Now it works fine. Thank you!
CamperBot
@camperbot
Dec 18 2017 09:11
zerka1982 sends brownie points to @linusphan :sparkles: :thumbsup: :sparkles:
:cookie: 266 | @linusphan |http://www.freecodecamp.org/linusphan
Linus Phan
@linusphan
Dec 18 2017 09:31
@Zerka1982 no problem :D
@Zerka1982 thanks for a good question
CamperBot
@camperbot
Dec 18 2017 09:31
linusphan sends brownie points to @zerka1982 :sparkles: :thumbsup: :sparkles:
:cookie: 274 | @zerka1982 |http://www.freecodecamp.org/zerka1982
primuscovenant
@primuscovenant
Dec 18 2017 11:20
@heroiczero thx
CamperBot
@camperbot
Dec 18 2017 11:20
primuscovenant sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 2109 | @heroiczero |http://www.freecodecamp.org/heroiczero
Vipin Yadav
@imvpn22
Dec 18 2017 12:11
Suggest any API for random quote machine project. Will be good if it will give image link.
not sure if this gives you images as well
Vipin Yadav
@imvpn22
Dec 18 2017 12:21
I'll see that.. thanks btw
pocahontas123
@pocahontas123
Dec 18 2017 13:27
Hi somebody here?
Kannan T
@kannan007
Dec 18 2017 13:28
yes
Doug Franklin
@Imaginativeone
Dec 18 2017 13:28
yes
pocahontas123
@pocahontas123
Dec 18 2017 13:30
@Imaginativeone Please, does the challenge map work atm ? not for me
@kannan007 Please, does the challenge map work atm ? not for me
Kannan T
@kannan007
Dec 18 2017 13:30
sorry didnt get you bro
@kannan007 But nothing is loading when i'm clicking
Kannan T
@kannan007
Dec 18 2017 13:32
its loading for me bro
pocahontas123
@pocahontas123
Dec 18 2017 13:34
@kannan007 You can clic and visite anything you want from link on the left?
@kannan007 no "Something went wrong, please try again later" messages
@kannan007 Please, use beta.freecodecamp.org because the non beta work for me too
Kannan T
@kannan007
Dec 18 2017 13:36
dude i used the link which you sent me
its working for me bro
pocahontas123
@pocahontas123
Dec 18 2017 13:37
@kannan007 The link itself work. I'm talking about the left link you can click on
@kannan007 When you clic on responsive design, it show you more link and you can clic on ?
Kannan T
@kannan007
Dec 18 2017 13:38
yes
i can click
and it shows me list
pocahontas123
@pocahontas123
Dec 18 2017 13:39
@kannan007 Ok thx
CamperBot
@camperbot
Dec 18 2017 13:39
pocahontas123 sends brownie points to @kannan007 :sparkles: :thumbsup: :sparkles:
:cookie: 318 | @kannan007 |http://www.freecodecamp.org/kannan007
Danny Chan
@chandanny
Dec 18 2017 13:59
hello
creator0323
@Amasian
Dec 18 2017 14:13
@chandanny Hello :)
Danny Chan
@chandanny
Dec 18 2017 14:25
@Amasian how are you? i am new on here
Stephen James
@sjames1958gm
Dec 18 2017 14:32
@chandanny Welcome
Danny Chan
@chandanny
Dec 18 2017 15:29
@sjames1958gm thank you. how are you?
CamperBot
@camperbot
Dec 18 2017 15:29
chandanny sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8786 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
dinesh
@1532j0004kg
Dec 18 2017 15:35
C:\Users\dinesh\Desktop\wikipedia viewer
how to deploy this site?
Tiago Correia
@tiagocorreiaalmeida
Dec 18 2017 15:41
@1532j0004kg maybe on codepen?
you can copy and past there your code
dinesh
@1532j0004kg
Dec 18 2017 15:41
i want to deploy
Stephen James
@sjames1958gm
Dec 18 2017 15:45
@chandanny Good, thanks.
CamperBot
@camperbot
Dec 18 2017 15:45
sjames1958gm sends brownie points to @chandanny :sparkles: :thumbsup: :sparkles:
:cookie: 167 | @chandanny |http://www.freecodecamp.org/chandanny
Tiago Correia
@tiagocorreiaalmeida
Dec 18 2017 15:46
you will have to find then an host service
try glitch.com
or heroku
if you have it on github will be easier with glitch
dinesh
@1532j0004kg
Dec 18 2017 15:46
i will try,thanks!
Tiago Correia
@tiagocorreiaalmeida
Dec 18 2017 15:46
anytime
Danny Chan
@chandanny
Dec 18 2017 15:49
@sjames1958gm you completed 8786 challenges. so cool
Stephen James
@sjames1958gm
Dec 18 2017 15:49
@chandanny Well that is challenges plus "thanks"
Marc
@MWBauer
Dec 18 2017 15:57
Morning everyone!
Stephen James
@sjames1958gm
Dec 18 2017 16:00
@MWBauer :wave:
Marc
@MWBauer
Dec 18 2017 16:00
How is Stephen today?
Stephen James
@sjames1958gm
Dec 18 2017 16:01
@MWBauer Pretty good. You?
Marc
@MWBauer
Dec 18 2017 16:22
Relatively ok. Took a couple of days to run to Gatlinburg, TN and chill with the wife and have a good time.
Trying to get back to life now.
dinesh
@1532j0004kg
Dec 18 2017 16:40
how to host on github
Niloy513
@Niloy513
Dec 18 2017 16:43
anyone know how to only get values that are not repeated in an array?
Stephen James
@sjames1958gm
Dec 18 2017 16:45
@Niloy513
filter would be a good function to use.
I would use indexOf and lastIndexOf and if not repeated then those should be equal
Niloy513
@Niloy513
Dec 18 2017 16:50
@sjames1958gm
so let me ask this, if have an arr that has [2,3,4,4,5,6,6,6,7,8,8,8,9,9,10,10,10]
and I want it to return [2,3,5,7]
would last indexOf work? I just don't see how that can. since the last index is always 10 I feel only 10 might get deleted.
Stephen James
@sjames1958gm
Dec 18 2017 16:54
@Niloy513
if you are checking the third element the value 4 then
arr.indexOf(4) is not equal to arr.lastIndexOf(4) which means that 4 is repeated
Niloy513
@Niloy513
Dec 18 2017 16:55
@sjames1958gm Thank you
CamperBot
@camperbot
Dec 18 2017 16:55
niloy513 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8787 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Niloy513
@Niloy513
Dec 18 2017 16:55
I'm going to try to implement your idea
Stephen James
@sjames1958gm
Dec 18 2017 16:56
@Niloy513 good luck
Niloy513
@Niloy513
Dec 18 2017 17:02
You're a life saver. it worked.
Andrew Robida
@arobida
Dec 18 2017 17:07
hello having an issue with a linear gradient whenever my results pop up it makes my background do some weird repeat and it looks like shit I have already passed the challenge just want to clean up the aesthetics here is the codepen https://codepen.io/sweetnezzz86/pen/aEdomb
dinesh
@1532j0004kg
Dec 18 2017 17:08
i have a doubt
Andrew Robida
@arobida
Dec 18 2017 17:09
@1532j0004kg doubt?
Nikola
@n1x1
Dec 18 2017 17:11
I need advise...very often when I'm making a navgiation picture and buttons are making a problem when I float them, the thing is that pic and buttons cant level and background-color is just the height of the pic itself..can someone help me about this?
dinesh
@1532j0004kg
Dec 18 2017 17:11
if i add format=json it's not responding y?
but in the server of forismatic.com says that it can support various formats like xml,json,jsonp...
Andrew Robida
@arobida
Dec 18 2017 17:13
@1532j0004kg did you figure out how to deploy to github pages?
dinesh
@1532j0004kg
Dec 18 2017 17:13
no
Andrew Robida
@arobida
Dec 18 2017 17:14
do you know how to set up a remote repository?
and push your code there?
dinesh
@1532j0004kg
Dec 18 2017 17:14
yes i upload that to the repo.
just view my profile..
but i cant able to host.
Andrew Robida
@arobida
Dec 18 2017 17:16
in the settings of that repo scroll down to github pages and choose the only option you can then save it it will than give you a link that is the url of your project
but you can only host static pages
so only html css and javascript
dinesh
@1532j0004kg
Dec 18 2017 17:16
one min i will check!
Andrew Robida
@arobida
Dec 18 2017 17:17
u can use things like jquery or other frameworks but you need a cdn to do so
also your entry point must be a index.html page
dinesh
@1532j0004kg
Dec 18 2017 17:18
only option is disabled,oops
!
Andrew Robida
@arobida
Dec 18 2017 17:18
just click save and it should give you a link
dinesh
@1532j0004kg
Dec 18 2017 17:19
onlyoption is not activated for me!
Andrew Robida
@arobida
Dec 18 2017 17:19
which project on your github?
dinesh
@1532j0004kg
Dec 18 2017 17:20
Wikipedia-Viewer
which one ? there are two
never mind i got it
dinesh
@1532j0004kg
Dec 18 2017 17:22
oka,happppieeee
Andrew Robida
@arobida
Dec 18 2017 17:22
change the wiki.html name to index.html
dinesh
@1532j0004kg
Dec 18 2017 17:22
one sec
done
Andrew Robida
@arobida
Dec 18 2017 17:23
after that read the steps in the article i sent and see if that works
dinesh
@1532j0004kg
Dec 18 2017 17:24
am i right?
@arobida
Andrew Robida
@arobida
Dec 18 2017 17:25
yep as simple as that
dinesh
@1532j0004kg
Dec 18 2017 17:26
thanks a lot @arobida
CamperBot
@camperbot
Dec 18 2017 17:26
1532j0004kg sends brownie points to @arobida :sparkles: :thumbsup: :sparkles:
:cookie: 312 | @arobida |http://www.freecodecamp.org/arobida
Andrew Robida
@arobida
Dec 18 2017 17:26
np
dinesh
@1532j0004kg
Dec 18 2017 17:26
feeelllliiinnnggg happiiiieeee!!!!,,,,llllooolll
Andrew Robida
@arobida
Dec 18 2017 17:27
I usually add it in my repo description so its easier access
dinesh
@1532j0004kg
Dec 18 2017 17:27
ohhh ok
Andrew Robida
@arobida
Dec 18 2017 17:27
glad to help!
dinesh
@1532j0004kg
Dec 18 2017 17:29
nice i will be keep in touch with you !
may be tomorrow i need help of learning the node.js lol
Andrew Robida
@arobida
Dec 18 2017 17:31
thats a whole different beast
dinesh
@1532j0004kg
Dec 18 2017 17:32
u know ?
and then wich one is ur best repo?
Andrew Robida
@arobida
Dec 18 2017 17:37
I like the link voter
dinesh
@1532j0004kg
Dec 18 2017 17:37
ohh ok
Andrew Robida
@arobida
Dec 18 2017 17:37
its full stack react project with auth
dinesh
@1532j0004kg
Dec 18 2017 17:37
okokokok
Andrew Robida
@arobida
Dec 18 2017 17:38
u can create your own account and submit your own links
dinesh
@1532j0004kg
Dec 18 2017 17:38
where i want start learning the backend
i know something on frontend!
Andrew Robida
@arobida
Dec 18 2017 17:38
i would focus on one or the other
but if you are frontend know how to consume the backend
if you are backend know how to make it easy to consume
dinesh
@1532j0004kg
Dec 18 2017 17:40
ok i know frontend
what i want to learn?
for build a app
Andrew Robida
@arobida
Dec 18 2017 17:41
alot lol
dinesh
@1532j0004kg
Dec 18 2017 17:42
where i want to start?
Andrew Robida
@arobida
Dec 18 2017 17:42
i just ran through it with the link voter project and the simple todos project
do you use medium?
dinesh
@1532j0004kg
Dec 18 2017 17:43
which are all things i want to study before that?
yes!
but not for posting only for reading ,lol
that guy has great tutorials
i built my first node app because of him
dinesh
@1532j0004kg
Dec 18 2017 17:45
ohhh ok
it's paid!!!
course
Andrew Robida
@arobida
Dec 18 2017 17:49
no it was free
the front end checklist is another great resource
@1532j0004kg I got to go but i followed you on github so if u want to reach me u can do it through there good luck!
dinesh
@1532j0004kg
Dec 18 2017 17:51
sure!!!
take care...
Drew Stonebraker
@drstonebraker
Dec 18 2017 19:23
I'm trying to understand the javascript event loop. Why does putting a bunch of expensive dom rendering in a series of calls of setTimeout(fn, 0) help with performance, if rendering doesn't happen in the event loop (or does it?)
example: https://www.amazon.com/JavaScript-Frameworks-Modern-Web-Dev/dp/1484206630, pg 463-464
(you can choose 'look inside' and search for <th>Cost</th> to get to the right page)
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Dec 18 2017 19:48
@drstonebraker One can't view the example without logging in
Drew Stonebraker
@drstonebraker
Dec 18 2017 19:56
@Otto-AA I actually just finally found the answer. The event loop is actually composed of different task queues: https://stackoverflow.com/a/21558672
so they are prioritized
meaning an input or scroll event is presumably prioritized over a timer
Stephen James
@sjames1958gm
Dec 18 2017 20:28
@drstonebraker Interesting
LuxCoder26
@LuxCoder26
Dec 18 2017 20:54
Hi guys, anyone can help me, please? I am stuck at the Caesar Cypher challenge
Aditya
@ezioda004
Dec 18 2017 21:02
@LuxCoder26 Post your code
LuxCoder26
@LuxCoder26
Dec 18 2017 21:03

function rot13(str){ // LBH QVQ VG!

  var newArr = str.split("");
  var aux = [];

  for(var i = 0; i < newArr.length; i++){

    aux.push(newArr[i].charCodeAt(0));

    if(newArr[i] < 65 || newArr[i] > 90){
      aux.push(String.fromCharCode(newArr[i]));
      return aux;
    }else if(newArr[i] < 78)
      aux.push(String.fromCharCode(newArr[i] + 13));

    aux.push(String.fromCharCode(newArr[i] - 13));
  }

  return aux.join("");

}

// Change the inputs below to test
rot13("SERR PBQR PNZC");
the fromCharCode function seems not working
please ignore the return aux; inside the first ```if````
if
LuxCoder26
@LuxCoder26
Dec 18 2017 21:08
I made some amendments

function rot13(str){ // LBH QVQ VG!

  var newArr = str.split("");
  var aux = [];

  for(var i = 0; i < newArr.length; i++){

    var x = newArr[i].charCodeAt(0);

    if(x < 65 || x > 90){
      aux.push(String.fromCharCode(x));

    }else if(x < 78)
      aux.push(String.fromCharCode(x + 13));

    aux.push(String.fromCharCode(x - 13));
  }

  return aux.join("");

}

// Change the inputs below to test
rot13("SERR PBQR PNZC");
@ezioda004 resolved, thanks anyway :+1:
CamperBot
@camperbot
Dec 18 2017 21:11
luxcoder26 sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 328 | @ezioda004 |http://www.freecodecamp.org/ezioda004
Aditya
@ezioda004
Dec 18 2017 21:20
@LuxCoder26 Yeah you missed x >= 78 && x <=90 condition, debugging your own code is the best. :thumbsup: