These are chat archives for FreeCodeCamp/Help

8th
Mar 2018
Manish Giri
@Manish-Giri
Mar 08 2018 02:49
@Marmiz :wave:
I tried a few approaches, like binary numbers and signed 2's complement.. neither worked
did you crack it
Claudio Restifo
@Marmiz
Mar 08 2018 02:50
@Manish-Giri :wave: :wavy_dash:
I'm the John Snow of Java, I know nothing
Manish Giri
@Manish-Giri
Mar 08 2018 02:51
lol
I think it's got to do something with decimals and floating point numbers
Claudio Restifo
@Marmiz
Mar 08 2018 03:25
I'm honestly puzzled on that one
artbohr
@artbohr
Mar 08 2018 05:27
I have some weird problems with my app, it's not updating on state change, I was looking for an answer in google, but can't figure the reason
here is the code: https://github.com/artbohr/voting-app
here is the demo: http://vote-app-000.herokuapp.com/
it only updates if I manually refresh the page in the browser
artbohr
@artbohr
Mar 08 2018 05:56
nvm, solved it
gishy1
@gishy1
Mar 08 2018 08:37
hello world !!
how can i impelement javascript on code pen?
please get back to me asao
asap
Manish Giri
@Manish-Giri
Mar 08 2018 08:44
@gishy1 you write your JS code in the JS window on the far right
no need to add script tags
gishy1
@gishy1
Mar 08 2018 08:44
hmmmm how will it print out ?
will i have to load anything to settings?
Manish Giri
@Manish-Giri
Mar 08 2018 08:45
console.log() to print to console
if you want to load external libraries, yes, you do it via the settings tab
gishy1
@gishy1
Mar 08 2018 08:46
give me an example of some simple code i can impelement so i can see the result
@Manish-Giri sorry bro i am trying to wrap my head around it
Manish Giri
@Manish-Giri
Mar 08 2018 08:46
no problem
here's a simple pen that writes a few numbers to the screen
gishy1
@gishy1
Mar 08 2018 08:47
hmmm let me implement and get back to you
yes thats showing at the bottom of my page
Manish Giri
@Manish-Giri
Mar 08 2018 08:49
:+1:
gishy1
@gishy1
Mar 08 2018 08:49
say i want to intergrate it with my button in html
how would i connect the two?
Manish Giri
@Manish-Giri
Mar 08 2018 08:50
many ways
gishy1
@gishy1
Mar 08 2018 08:50
and how can i get it to show somewhere else on the page?
Manish Giri
@Manish-Giri
Mar 08 2018 08:50
maybe create a button in html with an id
<button id="myButton">Click</button>
gishy1
@gishy1
Mar 08 2018 08:50
yes
Manish Giri
@Manish-Giri
Mar 08 2018 08:50
then use it in the JS
var button = document.getElementById("myButton");
gishy1
@gishy1
Mar 08 2018 08:51
so declare my button?
Manish Giri
@Manish-Giri
Mar 08 2018 08:51
you can
you can also use it directly
document.getElementById("myButton").someAction
gishy1
@gishy1
Mar 08 2018 08:54
what would this be called ?
what you just did ?
need to do some research more on it
Manish Giri
@Manish-Giri
Mar 08 2018 08:54
um
selecting an HTML element, maybe?
not sure what you mean
gishy1
@gishy1
Mar 08 2018 09:01
i think thats it
gishy1
@gishy1
Mar 08 2018 09:19
@Manish-Giri for the random qoutd machine can i have the qoutes in a list in html then have them looped through in javascript?
Manish Giri
@Manish-Giri
Mar 08 2018 09:20
you mean in a list in JS?
you can have the quotes in an array in js, loop through them and produce an unordered/ordered list li in HTML, if that's what you mean
gishy1
@gishy1
Mar 08 2018 10:29
@Manish-Giri no i mean list in html then somehow loop it in js
does that make sense?
Sweet Coding :)
@SweetCodingInc
Mar 08 2018 10:29
@gishy1 you can
Fabien SHAN
@X140hu4
Mar 08 2018 10:30
So you want to show your quote on the page?
Sweet Coding :)
@SweetCodingInc
Mar 08 2018 10:30
I'd advise against it, but you can
gishy1
@gishy1
Mar 08 2018 10:30
@X140hu4 yes i do
@SweetCodingInc why bro?
is it better to list in js?
Fabien SHAN
@X140hu4
Mar 08 2018 10:31
I meant, all your quotes?
gishy1
@gishy1
Mar 08 2018 10:31
then connect that to the button?
@X140hu4 yes bro
Sweet Coding :)
@SweetCodingInc
Mar 08 2018 10:31
@gishy1 it's heavy DOM manipulation. Assuming you have 10 quotes in one li and you want only 1 quote to be visible. So you will show one quote and hide rest of the 9 li items
gishy1
@gishy1
Mar 08 2018 10:31
where would it be best to list them
Sweet Coding :)
@SweetCodingInc
Mar 08 2018 10:31
and this will happen on each randomization
are you going to do it with jquery or with plain js?
gishy1
@gishy1
Mar 08 2018 10:33
@SweetCodingInc i wanted to do only with js as I perefer to get more comfortable with js
Sweet Coding :)
@SweetCodingInc
Mar 08 2018 10:34
@gishy1 alright
gishy1
@gishy1
Mar 08 2018 10:34
i want to be excellent in one thing than ok at 10 things
@SweetCodingInc i would need jquery to hide the rest of the qoutes not so?
Sweet Coding :)
@SweetCodingInc
Mar 08 2018 10:35
@gishy1 not necessary
you can do so with plain js as well
gishy1
@gishy1
Mar 08 2018 10:40
why were you advising against listing bro?
Sweet Coding :)
@SweetCodingInc
Mar 08 2018 10:41
:point_up: March 8, 2018 4:01 PM @gishy1
Take a look at this small demo
gishy1
@gishy1
Mar 08 2018 10:42
bro please tell me this isnt another random qoute machine dont want to cheat
gishy1
@gishy1
Mar 08 2018 10:52
@SweetCodingInc the moment the code loaded i just switched to the full view
sorry i want to have no influence
gishy1
@gishy1
Mar 08 2018 11:01
@SweetCodingInc seen it bro
how can i target the list i have made
should i give it an id
?
Stephen James
@sjames1958gm
Mar 08 2018 11:14
@gishy1 You can give your list an id or a unique class, then you can use document.querySelector("#myid") or document.querySelector("#myclass") to get to the list
(replace myid or myclass with the actual class)
Sweet Coding :)
@SweetCodingInc
Mar 08 2018 11:34
@gishy1 do you have codepen?
Jennifer R Fraser
@Fraser67
Mar 08 2018 13:11
I just built the personal website on the Atom instead of CodePen. I wonder if I can transfer there. CodePen does not work well when I built one. Atom can. I dont use CodePen. Let me know.
gishy1
@gishy1
Mar 08 2018 14:01
@SweetCodingInc yes bro
gishy1
@gishy1
Mar 08 2018 14:18
https://codepen.io/gishy1/pen/MQdyqQ
my pen guys have a look im ssuck
Manish Giri
@Manish-Giri
Mar 08 2018 14:25
@gishy1 what's the problem
gishy1
@gishy1
Mar 08 2018 14:25
stuck
i wanted to hide using strictly js
is it possible ?
Manish Giri
@Manish-Giri
Mar 08 2018 14:25
yup
give your ul an id - <ul id="quotes">
then in the js -
document.getElementById("quotes").style.visibility = "hidden";
gishy1
@gishy1
Mar 08 2018 14:36
you mean targeting the id first
?
@Manish-Giri have a look at my jquery
been forced to go jquery as js not making sense to me
Manish Giri
@Manish-Giri
Mar 08 2018 14:39
see this is wrong
    $("#listlick(function(){
        $("p").hide();
    });
the syntax is -
$("selector").event(callback)
so that would be -
  $("#list").click(function(){
        $("p").hide();
    });
It looks like you're rushing into things, if JS isn't making sense to you, try doing the JS challenges on FCC in-order, they start from the basics and cover everything, even jQuery
don't rush into the projects directly
gishy1
@gishy1
Mar 08 2018 14:42
ya i did do the basic algorithm scripting
Manish Giri
@Manish-Giri
Mar 08 2018 14:44
okay
Jasmina Čuješ
@Mincica
Mar 08 2018 15:06
hej! Could someone help me, I've been away from FCC for las than a month and now I can't continue with my challenges, I've came to number 222, and when I click on it to continue my learning all I get is a solution but I can't proceed :/
Darren
@DarrenfJ
Mar 08 2018 15:54
morning fCC
hensn5250
@hensn5250
Mar 08 2018 15:55
hello all
Darren
@DarrenfJ
Mar 08 2018 15:55
@Mincica is it giving you any kind of warning? also what's the name of the challenge? We can search by name and not number.. want to check it out on my own
@hensn5250 :wave:
hensn5250
@hensn5250
Mar 08 2018 15:56
Anyone at/completed Advance Algoritm Scripting? Need some help with a RegEx problem
Never mind... by trying to provide details for the problem I just solved the issue.
Kyle Holm
@thekholm80
Mar 08 2018 16:01
@hensn5250 i love when that happens
@DarrenfJ hiya
hensn5250
@hensn5250
Mar 08 2018 16:01
@thekholm80 #MeToo
...Actually I didn't solve it.
The problem if the Validate US Telephone Numbers challenge.
You are suppose to validate telephone number entered based on the format below:
555-555-5555
(555)555-5555
(555) 555-5555
555 555 5555
5555555555
1 555 555 5555

The issue: telephoneCheck("(6505552368)") should return false

The above entry should return false but it matches this valid entry:
5555555555

oh crap I see it.... its the ( ) 's
hensn5250
@hensn5250
Mar 08 2018 16:07
@thekholm80 guess it's a happy ending after all
Kyle Holm
@thekholm80
Mar 08 2018 16:08
@hensn5250 i don't think i used regex for those, i'm absolutely garbage at regex
i've tried several times to learn but i think i'm just dumb
hensn5250
@hensn5250
Mar 08 2018 16:10
@thekholm80 well then check this out https://regexr.com/ . I'm was bad with regex's too until someone mentioned this site
you can test your RegEx out pretty easily . Saves ton of time. Plus the reference is easy to understand
@thekholm80 Later
Darren
@DarrenfJ
Mar 08 2018 16:29
@thekholm80 hey buddy :D
thanks @thekholm80 for being a regular.. always glad to see yah hanging out :D
CamperBot
@camperbot
Mar 08 2018 16:30
darrenfj sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1714 | @thekholm80 |http://www.freecodecamp.org/thekholm80
dmac0505
@dmac0505
Mar 08 2018 16:30
hey Darren - hows the github noobie project coming along
Darren
@DarrenfJ
Mar 08 2018 16:30

@hensn5250 perfect way to solve a problem :D

Never mind... by trying to provide details for the problem I just solved the issue.

@dmac0505 pretty good actually...
dmac0505
@dmac0505
Mar 08 2018 16:31
nice, i'm in there - in drew mac :)
Darren
@DarrenfJ
Mar 08 2018 16:31
:D
dmac0505
@dmac0505
Mar 08 2018 16:33
thats really cool - i was trying to understand how we are able to access it as a website now instead of local - i guess its pointing to the hosted version on github?
gishy1
@gishy1
Mar 08 2018 16:35
@Manish-Giri bro i used the get element method and tried to console log no reponse
what am i doing wrong?
Darren
@DarrenfJ
Mar 08 2018 16:35
@dmac0505 yah Romchy moved it into something viewable
it's better that way so people can see what they build :D
dmac0505
@dmac0505
Mar 08 2018 16:36
@DarrenfJ cool i knew it was possible to host websites there - is it through github pages? i was thinking that was the web hosting part of github
gishy1
@gishy1
Mar 08 2018 16:37
any one can help by the way !!
targeted the list by the element method
Darren
@DarrenfJ
Mar 08 2018 16:38
@dmac0505 I think so yah...
just checked and yah that's the typical url for github hosted pages
…and you're done! Fire up a browser and go to http://username.github.io/repository.
hey @dmac0505 thanks for contributing :D it's muchly appreciated
CamperBot
@camperbot
Mar 08 2018 16:40
darrenfj sends brownie points to @dmac0505 :sparkles: :thumbsup: :sparkles:
:cookie: 157 | @dmac0505 |http://www.freecodecamp.org/dmac0505
dmac0505
@dmac0505
Mar 08 2018 16:40
@DarrenfJ no problem, thanks to you guys for getting it together - git seems like a very valuable skill to have these days
CamperBot
@camperbot
Mar 08 2018 16:40
dmac0505 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2417 | @darrenfj |http://www.freecodecamp.org/darrenfj
Darren
@DarrenfJ
Mar 08 2018 16:42
@dmac0505 defintiely.. and we wanted to make something easy for people to add stuff to to at least get the basics on forking, cloning and doing a basic PR
dmac0505
@dmac0505
Mar 08 2018 16:42
@gishy1 sorry i don't know the answer
gishy1
@gishy1
Mar 08 2018 16:42
@dmac0505 itsok bro
dmac0505
@dmac0505
Mar 08 2018 16:43
@DarrenfJ right thats great stuff - i'll have to work on doing another PR
@DarrenfJ how much web development experience do you have - have you completed the FCC program?
Darren
@DarrenfJ
Mar 08 2018 16:46
i've done all the exercises and many of the projects but not claimed anything in terms of certs.. actually waiting for the beta to go live to finish it off...
i've been working peripherally in software It forever: BA, PM, QA, Data junk...
before that when i did any coding it was to work out engineering simulations for stuff like radio propagation back in my old life in electronics/radio tech junk...
gishy1
@gishy1
Mar 08 2018 16:48
hello why isnt the console.log(listed ); not printing ?
ViscoseSole
@ViscoseSole
Mar 08 2018 16:49
printing where? it prints it in dev console
dmac0505
@dmac0505
Mar 08 2018 16:51
@DarrenfJ i see, so are you doing FCC as a hobby or are you intending to switch to web development?
Darren
@DarrenfJ
Mar 08 2018 16:52
I always seem to get swallowed up into Management tbh, but want to build and work on open source junk in my spare time... dev people prefer their PMs/product managers to actually know what they're talking about rather than being a check-list robot
maybe some day i'll start something fun/interesting on my own.. you know, other than this git for noobs project :D
me 'n manish have one we keep meaning to work on but we're both too busy with life
dmac0505
@dmac0505
Mar 08 2018 16:55
@DarrenfJ lol i understand - im hoping to build up a portfolio and convince myself that i would be skilled enough to become employed in web development
Darren
@DarrenfJ
Mar 08 2018 16:59
I mean it's really just about keeping at it.. I also recommend the learn to code with me podcasts.. lots of interviews with people who started with non CS backgrounds and work in coding now.. worth the listen for the motivation if nothing else..
Kyle Holm
@thekholm80
Mar 08 2018 17:02
@DarrenfJ build me a crypto-blockchain-ML-other_buzzword-app
we'll be rich
dmac0505
@dmac0505
Mar 08 2018 17:06
@DarrenfJ thanks i'll give that a look
CamperBot
@camperbot
Mar 08 2018 17:06
dmac0505 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
api offline
Darren
@DarrenfJ
Mar 08 2018 17:11
@thekholm80 I wanted to add blockchain to our scrynet project.. something like when you give out brownies here.. but there it's contributing to an idea/project or getting kudos for devil's advocating or putting a second set of eyes on something... we track it with an actual registery so if a project ever makes money (think kickstarter promo junk) you can dish out the coin to your minions
just haven't a) figured out blockchain enough b) figured out exactly what I mean by the above c) built anything ;)
Kyle Holm
@thekholm80
Mar 08 2018 17:12
just the minor details
as they say in the film industry, "you can fix that in post"
Darren
@DarrenfJ
Mar 08 2018 17:13
i can edit it out
;)
Kyle Holm
@thekholm80
Mar 08 2018 17:13
:)
Darren
@DarrenfJ
Mar 08 2018 17:14
ok back to testing blech
DarrenfJ @DarrenfJ sneaks off
Ismail Hozain
@ismailhozain
Mar 08 2018 22:24

hey guys i got a quick question here.
<?xml version="1.0" standalone="no"?>

I started working with svg and this appeared in my face , any clue what it means?

Kyle Holm
@thekholm80
Mar 08 2018 22:24
you've been hacked!
Ismail Hozain
@ismailhozain
Mar 08 2018 22:27
thanks @thekholm80 but an error appears https://codepen.io/ismailhozain/pen/BradXY
CamperBot
@camperbot
Mar 08 2018 22:27
ismailhozain sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1715 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Kyle Holm
@thekholm80
Mar 08 2018 22:28
move the stuff in your js box to the html box
Ismail Hozain
@ismailhozain
Mar 08 2018 22:28
another question; does the XML declaration affect the behavior of my javascript text-editor (in codepen)
never mind
thanks @thekholm80
CamperBot
@camperbot
Mar 08 2018 22:29
ismailhozain sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
api offline
<ParentComponent>
            <ChildComponent /> 
 </ParentComponent>
Kyle Holm
@thekholm80
Mar 08 2018 23:20
you shouldn't have the <ParentComponent> in there
where it says to write your code you just put in the child component part
the way your code is written your asking ParentComponent to render itself inside itself
Nazar
@IsaakNazar
Mar 08 2018 23:22
@thekholm80 Ok, now i understand :smile: thanx
CamperBot
@camperbot
Mar 08 2018 23:22
isaaknazar sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1716 | @thekholm80 |http://www.freecodecamp.org/thekholm80