These are chat archives for FreeCodeCamp/Help

16th
May 2018
Moisés Man
@moigithub
May 16 2018 00:26
try console.log(h1)
and check IF its really an html element
(and not a nodelist .. which seems like an array, else u will need to use brackets [x] to access its elements) @idris12
idris
@idris12
May 16 2018 00:37
i checked and it showed as a node list
thanks for ur help
idris
@idris12
May 16 2018 00:43
@moigithub but how do i make everything blue then since its a node list
Moisés Man
@moigithub
May 16 2018 00:44
similarly to an array... to access first element u do something like arr[0]
soo ur variable h1 have a nodelist.. to access 1st elem should be like h1[0]
then u can h1[0].style.color="blue"
if it have multiple elemnets and u wanna style all of em.. u need a loop @idris12
Henry
@GitHub-Henry
May 16 2018 01:10
@idris12 like @moigithub said, you need a loop. Perhaps something like
Array.from(nodeList).forEach( x => x.classList.add('className'));
idris
@idris12
May 16 2018 01:11
thanks guys
Ahmad Abdolsaheb
@ahmadabdolsaheb
May 16 2018 01:27
hello everyone, code18 conf offering free tickets and accommodations for anyone who can recognize their keynote speakers from this illustration. wanna try?
Michael S
@Ohshi60
May 16 2018 01:30
Au/NZ :(
not that i have a clue who any of them are
Ahmad Abdolsaheb
@ahmadabdolsaheb
May 16 2018 01:32
:...(
Mohamed Osama Khan
@Assaonator
May 16 2018 07:23
hi when you Manage Packages with npm I tried to connect to cloud 9 with my github account but its not working... on github it says permission granted... but can't seem to login to https://c9.io/login
Henry
@GitHub-Henry
May 16 2018 07:35
@Assaonator perhaps try https://glitch.com/
Nicolas Ramirez
@kamatheuska
May 16 2018 11:08
Hey everyone! Ahy though about how much can cost a month a Heroku Hobby plan? I am not really sure how pricing works...
孙正旭
@ChinaDalianGanjingzi
May 16 2018 11:12
https://www.freecodecamp.cn/challenges/size-your-images#?solution=%3C!--%0A%3Clink%20href%3D%22https%3A%2F%2Ffonts.gdgdocs.org%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A--%3E%0A%3Cstyle%3E%0A%0A%20%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20p%20%7B%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%20%20font-family%3A%20Monospace%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%3Cimg%20src%3D%22%2Fimages%2Frelaxing-cat.jpg%22%3E%20%20%0A%3Cstyle%3E%20%0A.larger-image%20%7B%0A%20%20%20%20width%3A%20100px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%3Cp%20class%3D%22red-text%22%3E%E5%9C%A8%E5%A4%A7%E5%AE%B6%E5%BF%83%E7%9B%AE%E4%B8%AD%EF%BC%8C%E7%8C%AB%E6%98%AF%E6%85%B5%E6%87%92%E7%9A%84%E5%8F%AF%E7%88%B1%E7%9A%84%E5%8C%96%E8%BA%AB%EF%BC%8C%E5%AE%83%E5%8F%AF%E4%BB%A5%E7%9D%A1%E9%A5%B1%E4%BA%86%E5%86%8D%E8%B5%B7%E6%9D%A5%E5%90%83%E9%A5%AD%EF%BC%8C%E5%8F%AF%E4%BB%A5%E9%80%97%E8%B6%A3%E5%B0%8F%E8%80%97%E5%AD%90%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%8D%96%E5%BE%97%E4%BA%86%E8%90%8C%EF%BC%8C%E4%BD%BF%E5%BE%97%E4%BA%86%E5%9D%8F%EF%BC%8C%E8%BF%99%E6%A0%B7%E7%99%BE%E5%8F%98%E7%9A%84%E5%B0%8F%E6%80%AA%E5%85%BD%E5%B0%B1%E9%9B%86%E7%BB%93%E5%9C%A8%E4%B8%80%E5%8F%AA%E5%AE%A0%E7%89%A9%E4%B8%8A%EF%BC%8C%E6%80%8E%E8%83%BD%E4%B8%8D%E6%83%B9%E4%BA%BA%E6%80%9C%E7%88%B1%E3%80%82%3C%2Fp%3E%0A%3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%A8%E7%89%A9%E3%80%82%E5%AE%83%E4%BB%AC%E4%B8%80%E6%97%A6%E8%AE%A4%E5%AE%9A%E4%BD%A0%E4%BA%86%EF%BC%8C%E4%BD%A0%E5%B0%B1%E6%98%AF%E5%AE%83%E4%BB%AC%E7%9A%84%E4%B8%BB%E4%BA%BA%EF%BC%8C%E5%A6%82%E6%9E%9C%E4%BD%A0%E6%8A%9B%E5%BC%83%E5%AE%83%E4%BB%AC%EF%BC%8C%E5%AE%83%E4%BB%AC%E5%BF%85%E5%AE%9A%E5%BF%83%E4%B8%AD%E9%87%8D%E5%88%9B%E3%80%82%3C%2Fp%3E%0A
Who can help me ?!
Norvin Burrus
@ndburrus
May 16 2018 11:17
@kamatheuska these may be helpful: :sparkles:
Rimi.
@Codevotee
May 16 2018 11:29
HELP ME WITH JAVA.
Norvin Burrus
@ndburrus
May 16 2018 11:35
@ChinaDalianGanjingzi we need to make a couple of adjustments: :sparkles:
  • the href link (line 2) should not be commented out
  • examine and follow the class example format in the pink area below the 2nd paragraph (use smaller instead of larger in the class name)
  • only utilize one set of style tags - the new class addition can be placed inside the existing style tags
  • ensure we're using an apprpriate href link address
Stephen James
@sjames1958gm
May 16 2018 11:43
@Codevotee java or javascript?
Pavlo Rudyi
@paulcarroty
May 16 2018 11:57
@ezioda004 can you share your code?
Aditya
@ezioda004
May 16 2018 12:05
@paulcarroty add and remove are pure functions, meaning they dont modify the global array but a new one. Also, since these are pure functions, they have no side effects. If the input is same the output will always be same from them.
function add (list, bookName) {
  const newList = list.slice();
  newList.push(bookName);
  return newList;
}
function remove (list, bookName) {
  const newList = list.slice();
  if (newList.indexOf(bookName) >= 0) {
    newList.splice(newList.indexOf(bookName), 1);
    return newList;
    }
}
Nicolas Ramirez
@kamatheuska
May 16 2018 12:08
@ndburrus thanks for the links :)
CamperBot
@camperbot
May 16 2018 12:08
kamatheuska sends brownie points to @ndburrus :sparkles: :thumbsup: :sparkles:
:star2: 2220 | @ndburrus |http://www.freecodecamp.org/ndburrus
Norvin Burrus
@ndburrus
May 16 2018 12:19
@kamatheuska you're welcome! enjoy :sparkles:
@ChinaDalianGanjingzi this may be useful: :zap:
Rimi.
@Codevotee
May 16 2018 12:27
@sjames1958gm Java
Stephen James
@sjames1958gm
May 16 2018 12:30
@Codevotee If it's a quick question i can try
孙正旭
@ChinaDalianGanjingzi
May 16 2018 12:35
Rimi.
@Codevotee
May 16 2018 12:40
@sjames1958gm how can i make a loop that keeps asking for user input until their input is equal to a variable value?
@sjames1958gm e.g. "guess:", user guesses wrong, "guess:" user guesses wrong, "guess:" user guesses right, loop stops.
using the Scanner object
import java.util.Scanner;
Norvin Burrus
@ndburrus
May 16 2018 12:45
@Codevotee these may be helpful: :sparkles:
Stephen James
@sjames1958gm
May 16 2018 12:45
@Codevotee Setup two variables, one the answer you are looking for and the one that will holds the user input
Scanner sc = new Scanner(System.in);
String answer = "answer";
String guess = "";
while (answer != guess) {
   String answer = sc.nextLine();
}
@Codevotee You'll need to add a prompt to the code as well
Rimi.
@Codevotee
May 16 2018 13:16
it's not working
Pavlo Rudyi
@paulcarroty
May 16 2018 13:16
@ezioda004 thanks, man!
CamperBot
@camperbot
May 16 2018 13:16
paulcarroty sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 558 | @ezioda004 |http://www.freecodecamp.org/ezioda004
Rimi.
@Codevotee
May 16 2018 13:20
brain block :worried:
Rimi.
@Codevotee
May 16 2018 13:27
@sjames1958gm i get the user's input in another class, then i check it against the actual answer inside another class, this is what im finding difficult.
Rimi.
@Codevotee
May 16 2018 13:34
im kind of getting closer to it now
made it ask multiple times
Vivek Ranjan
@vivekranjan92
May 16 2018 13:50

Hi, Can anyone explain me the meaning of the below line???

var val = $(elem).parent().find('#media_Id').text();

Kranti Nebhwani
@darkphotonKN
May 16 2018 13:52
can someone tell me how to stop the whole background moving down if I change "position: fixed" on my #main-title css? Everything moves down to it if i remove that but i need to remove that so i can make it change dynamically depending on the size of the page
You need to make the screen larger to see the title it's near the bottom right
Ill move the title up a bit so it's clearer to see since its just for help
Vivek Ranjan
@vivekranjan92
May 16 2018 13:53
I think you have to use media query for the responsiveness.. What you are saying is related to responsiveness of a web-page
Vivek Ranjan
@vivekranjan92
May 16 2018 13:54
also make use of overflow: hidden for the body
and apply this class on the body
Kranti Nebhwani
@darkphotonKN
May 16 2018 13:55
I have used it @vivekranjan92. But if i put position: fixed for title it cannot be responsive as it's fixed there. If I remove fixed the background picture drops all the way down to the title though, so I don't know how to do both at the same time - keep the background in place and also not use position: fixed
Vivek Ranjan
@vivekranjan92
May 16 2018 13:55
I hope this should work for you
Kranti Nebhwani
@darkphotonKN
May 16 2018 13:55
@vivekranjan92 ok ill try thank you
CamperBot
@camperbot
May 16 2018 13:55
darkphotonkn sends brownie points to @vivekranjan92 :sparkles: :thumbsup: :sparkles:
:cookie: 297 | @vivekranjan92 |http://www.freecodecamp.org/vivekranjan92
Vivek Ranjan
@vivekranjan92
May 16 2018 13:57
can you please explain your question one more time? @darkphotonKN
Aditya
@ezioda004
May 16 2018 13:57
@vivekranjan92 Basically you're finding $(elem)'s parent and in that parent you're finding any descendant have '#media_Id' ID and finally extracting the text from it via text()
Vivek Ranjan
@vivekranjan92
May 16 2018 13:58
@ezioda004 Thanks buddy... Got it :)
CamperBot
@camperbot
May 16 2018 13:58
vivekranjan92 sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 559 | @ezioda004 |http://www.freecodecamp.org/ezioda004
Aditya
@ezioda004
May 16 2018 14:00
find() traverses through all the children but children() only traverses one level.
CamperBot
@camperbot
May 16 2018 14:00
find traverses through all the children but children only traverses one level
nothing found
Kranti Nebhwani
@darkphotonKN
May 16 2018 14:00
@vivekranjan92 Well my background falls down to the point of my "title" of my page if I remove position: fixed for it. I put in codepen with comment /* REMOVE THIS */ you can remove that line and try you will the backgroudn will fall. If I keep position: fixed I cannot use responsive design on the title becuse it's position is fixed.. so that's what Im stuck with right now
Vivek Ranjan
@vivekranjan92
May 16 2018 14:01
@ezioda004 so find() will go from top to bottom most??
Aditya
@ezioda004
May 16 2018 14:04

Yes, it'll go as deep as it can.
Example

<div id = "parent">
   <div class  = "children"> 
      <div> class = "some-class">
      </div>
      <div> class = "some-class">
      </div>
   </div>
    <div class  = "children"> </div>
</div>

.children() on #parent will only select .children but .find() on #parent will select .children and .some-class too.

Vivek Ranjan
@vivekranjan92
May 16 2018 14:05
@ezioda004 yes thanks got it bro :) :clap:
CamperBot
@camperbot
May 16 2018 14:05
vivekranjan92 sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
api offline
Aditya
@ezioda004
May 16 2018 14:05
:thumbsup:
Amani Jones
@AmaniJones
May 16 2018 14:06
hey guys ive got a random question
could you put a H2 inside a DIV tag?
Vivek Ranjan
@vivekranjan92
May 16 2018 14:07
@AmaniJones yes you can
Amani Jones
@AmaniJones
May 16 2018 14:07
i shouldnt tho should i ?
its given me all kinds of space inside of it cant seem to figure out why i think it might be the div
Vivek Ranjan
@vivekranjan92
May 16 2018 14:08
@AmaniJones depends on the requirements.. But yes you can easily use h2 tag inside a div tag
Amani Jones
@AmaniJones
May 16 2018 14:08
ahh ok
thanks @vivekranjan92
CamperBot
@camperbot
May 16 2018 14:08
amanijones sends brownie points to @vivekranjan92 :sparkles: :thumbsup: :sparkles:
:cookie: 298 | @vivekranjan92 |http://www.freecodecamp.org/vivekranjan92
Vivek Ranjan
@vivekranjan92
May 16 2018 14:09
@AmaniJones :+1:
Joseph
@revisualize
May 16 2018 14:58
Hello.
May Kittens Devour Your Soul
@diomed
May 16 2018 15:03
dear Gitter. I'm gonna FIGHT YOUUUUU!!!
over :D emoji
Mandeep Sharma
@mandeephub
May 16 2018 15:14
hello there needing some help with oops php
Kyle Holm
@thekholm80
May 16 2018 15:59
@diomed i do like discord's emoji better than gitter
May Kittens Devour Your Soul
@diomed
May 16 2018 16:01
@thekholm80 I don't . gitter's emoji = best emoji
coz it's AppleMoji
:yum:
Kyle Holm
@thekholm80
May 16 2018 16:01
I don't understand people's infatuation with apple
May Kittens Devour Your Soul
@diomed
May 16 2018 16:02
when @Manish-Giri finally grants me admin first I'll ban you from Discord group, then I'll add all apple emoji
hue hue hue :smiling_imp:
Kyle Holm
@thekholm80
May 16 2018 16:02
sounds like a good plan
May Kittens Devour Your Soul
@diomed
May 16 2018 16:03
my end game is to ban Manish too and then speak to myself
Kyle Holm
@thekholm80
May 16 2018 16:03
that's really the only way you can have a conversation with someone who understands what you're saying
but, you'd still have the bot to talk to
May Kittens Devour Your Soul
@diomed
May 16 2018 16:04
I'll abuse that discord group to make TO-Do list for groceries, coz IDK how to make one in react/vue
damnit I forgot about bot. it's NSA anyway.
Kyle Holm
@thekholm80
May 16 2018 16:05
i might be able to find you a to-do list tutorial
seems like someone at some point made one
May Kittens Devour Your Soul
@diomed
May 16 2018 16:05
just one, huh?
Kyle Holm
@thekholm80
May 16 2018 16:05
they're pretty rare
May Kittens Devour Your Soul
@diomed
May 16 2018 16:06
they're rare like Indian people in tech
Kyle Holm
@thekholm80
May 16 2018 16:06
lol
Norvin Burrus
@ndburrus
May 16 2018 17:50