These are chat archives for FreeCodeCamp/HelpFrontEnd

26th
Jun 2017
Noor Kareem
@noorkareem
Jun 26 2017 00:01
thanks a lot @MCTwoDigitZero !!! appreciate your feedback ..really...am a beginner so am sort of unsure of how to get things done in front end programming.. your guidance will help appreciably...thanks again for the great work..!!
CamperBot
@camperbot
Jun 26 2017 00:01
noorkareem sends brownie points to @mctwodigitzero :sparkles: :thumbsup: :sparkles:
:cookie: 335 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
CallMeOrange
@EgnaroDev
Jun 26 2017 00:01
No problem
Sunny Wong
@swong194
Jun 26 2017 00:06
hey guys
just a question
does javascript allow for negative array index?
Noor Kareem
@noorkareem
Jun 26 2017 00:07
btw how do i compile the PEN into a FULL version ?
right i guess showing with the code..
right now*
Sunny Wong
@swong194
Jun 26 2017 00:08
@noorkareem do u mean export?
Johnny
@jtan3
Jun 26 2017 00:08
@noorkareem you mean change the view?
Sunny Wong
@swong194
Jun 26 2017 00:09
^that was a better guess ahaha
Noor Kareem
@noorkareem
Jun 26 2017 00:09
probably export ?
oh its change view > Full
thanks @swong194
CamperBot
@camperbot
Jun 26 2017 00:12
noorkareem sends brownie points to @swong194 :sparkles: :thumbsup: :sparkles:
:cookie: 290 | @swong194 |http://www.freecodecamp.com/swong194
Johnny
@jtan3
Jun 26 2017 00:13
@swong194 :thumbsup: lol
Sunny Wong
@swong194
Jun 26 2017 00:15
LOL please thank @jtan3 @noorkareem
CamperBot
@camperbot
Jun 26 2017 00:15
swong194 sends brownie points to @jtan3 and @noorkareem :sparkles: :thumbsup: :sparkles:
:cookie: 116 | @noorkareem |http://www.freecodecamp.com/noorkareem
:cookie: 427 | @jtan3 |http://www.freecodecamp.com/jtan3
Sunny Wong
@swong194
Jun 26 2017 00:15
oh i gotchu both
hahaha
CallMeOrange
@EgnaroDev
Jun 26 2017 00:17
@swong194 gimme one too!
:shipit:
Hamza Saleemi
@Azmah21
Jun 26 2017 00:18
hey guys!
is it okay to reuse code from older projects if you're a beginner?
or will that prevent you from learning the concepts?
CallMeOrange
@EgnaroDev
Jun 26 2017 00:18
Dont please, I dont deserve it :D
@Azmah21 Yeah that will prevent you from learning new things
Sunny Wong
@swong194
Jun 26 2017 00:18
@MCTwoDigitZero thanks!
CamperBot
@camperbot
Jun 26 2017 00:18
swong194 sends brownie points to @mctwodigitzero :sparkles: :thumbsup: :sparkles:
:cookie: 337 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
CallMeOrange
@EgnaroDev
Jun 26 2017 00:18
You should try it yourself then ask us for help if you have trouble
@swong194 oh well, thanks
CamperBot
@camperbot
Jun 26 2017 00:19
mctwodigitzero sends brownie points to @swong194 :sparkles: :thumbsup: :sparkles:
:cookie: 291 | @swong194 |http://www.freecodecamp.com/swong194
CallMeOrange
@EgnaroDev
Jun 26 2017 00:19
@Azmah21 You're not allowed to copy exactly same project but you might look at some of code to see how they did it, but you should try to figure it out by yourself or ask us
Sunny Wong
@swong194
Jun 26 2017 00:20
@Azmah21 i think you should look at ur old code, if uve learned more maybe uve improved and could make it more efficient.... if you want to use the same one just recode it again for practice
CallMeOrange
@EgnaroDev
Jun 26 2017 00:20
@swong194 I thought he meant different projects that is not his?
Well he said he is a beginner so I thought it is about different projects
Sunny Wong
@swong194
Jun 26 2017 00:21
@MCTwoDigitZero he said his older projects XD
Curtis Turner
@curtis-turner
Jun 26 2017 00:21
@Pagnito alright so i changed everything i still can get the api call to happen
CallMeOrange
@EgnaroDev
Jun 26 2017 00:21
@curtis-turner he isn't here
Sunny Wong
@swong194
Jun 26 2017 00:22
@curtis-turner hi curits paste ur codepen and maybe i can help
CallMeOrange
@EgnaroDev
Jun 26 2017 00:22
You can just type @ to see who is on
Thats right.. I forgot to use pythontutor to show how my code works
Will be back then
Curtis Turner
@curtis-turner
Jun 26 2017 00:24
@swong194 alright thanks
CamperBot
@camperbot
Jun 26 2017 00:24
curtis-turner sends brownie points to @swong194 :sparkles: :thumbsup: :sparkles:
:cookie: 292 | @swong194 |http://www.freecodecamp.com/swong194
Hamza Saleemi
@Azmah21
Jun 26 2017 00:24
@MCTwoDigitZero @swong194 it's code from projects I built on freecodecamp and teamtreehouse
so had a lot of help with them
Curtis Turner
@curtis-turner
Jun 26 2017 00:24
@swong194 https://codepen.io/cnote_100/pen/WORoGz this is very simple im just trying to get the api part down i know how to post it to twitter already
CallMeOrange
@EgnaroDev
Jun 26 2017 00:24
@Azmah21 oh.. you might look at your own projects then..
Sunny Wong
@swong194
Jun 26 2017 00:25
@Azmah21 try ur best to understand everything in that case, review ur projects if u had a lot of help
Hamza Saleemi
@Azmah21
Jun 26 2017 00:25
@MCTwoDigitZero @swong194 thanks guys!
I'll try to do it by myself a couple times but if I can't I'll use my older code as a reference point
CamperBot
@camperbot
Jun 26 2017 00:25
azmah21 sends brownie points to @mctwodigitzero and @swong194 :sparkles: :thumbsup: :sparkles:
:cookie: 338 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
:cookie: 293 | @swong194 |http://www.freecodecamp.com/swong194
CallMeOrange
@EgnaroDev
Jun 26 2017 00:26
@Azmah21 Sure, no problem
Whats the difference between while and for loops?
They seems same but different writing
Sunny Wong
@swong194
Jun 26 2017 00:28
@MCTwoDigitZero they have the same function, i haven't encountered differences so far
CallMeOrange
@EgnaroDev
Jun 26 2017 00:28
Hm
I will look it up later then
I think there should be differences between them because if not then while loop shouldn't exist..
Nickey Pickorita
@Pickorita
Jun 26 2017 00:29
Hello everyone
CallMeOrange
@EgnaroDev
Jun 26 2017 00:29
@Pickorita hi
Nickey Pickorita
@Pickorita
Jun 26 2017 00:29
Could someone help me please?
CallMeOrange
@EgnaroDev
Jun 26 2017 00:30
@Pickorita With what?
Nickey Pickorita
@Pickorita
Jun 26 2017 00:30
I have a problem with css and float
could you please check it?
I can send 2 screenshots
CallMeOrange
@EgnaroDev
Jun 26 2017 00:30
@Pickorita I can try
@Pickorita is it in codepen?
if so, just post the url here
Sunny Wong
@swong194
Jun 26 2017 00:31
@MCTwoDigitZero for loop is more specific if u know the number of iterations you want to go through, while loop u do it until a condition is satisfied
Nickey Pickorita
@Pickorita
Jun 26 2017 00:31
@Pickorita
I'm practicing code by making a website and I have a problem
I'm sending 2 screenshots
http://prntscr.com/fo4ow8
http://prntscr.com/fo4p3a
Here
Not sure how to get rid of white space
when I use clear both it gets messed up as well
not sure where I made a mistake
^here
3rd screenshot is how it should look
Curtis Turner
@curtis-turner
Jun 26 2017 00:32
@swong194 any luck looking at my codepen??
Sunny Wong
@swong194
Jun 26 2017 00:32
@curtis-turner still looking sorry XD im not a pro
CallMeOrange
@EgnaroDev
Jun 26 2017 00:32
@Pickorita sorry its hard for me to debug, could you put all of your code in codepen or github so I can debug
Nickey Pickorita
@Pickorita
Jun 26 2017 00:33
yes give me a sec
Curtis Turner
@curtis-turner
Jun 26 2017 00:33
@swong194 no worries neither am i. i dont understand why this api thing is giving me such a headache.
Sunny Wong
@swong194
Jun 26 2017 00:33
@curtis-turner i can tell u that ur button is fine
@curtis-turner and the api url that u have works
CallMeOrange
@EgnaroDev
Jun 26 2017 00:34
@curtis-turner Well fCC made us to use API so fCC could give us a headache :(
Johnny
@jtan3
Jun 26 2017 00:34
@curtis-turner https://cors-anywhere.herokuapp.com/ add this in front of your api url.
DarrylJLTolentino
@DarrylJLTolentino
Jun 26 2017 00:35
Hi all. I'm working on the Local Weather app right now and I'm having trouble figuring out why my call for the weather using the Dark Sky API isn't working. I do have the geolocation working, so I don't think thats the issue https://codepen.io/darryljltolentino/pen/VWMMGV
CallMeOrange
@EgnaroDev
Jun 26 2017 00:35

@jtan3 Hey, do you know whats the difference between while and for loops besides

for loop is more specific if u know the number of iterations you want to go through, while loop u do it until a condition is satisfied

Well forget it, I can just look it up already
:computer: :eyes:
:o
Sunny Wong
@swong194
Jun 26 2017 00:38
@curtis-turner did adding the herokuapp help?
CallMeOrange
@EgnaroDev
Jun 26 2017 00:38
Great.. Im working on Profile Lookup :worried:
Nickey Pickorita
@Pickorita
Jun 26 2017 00:39
@MCTwoDigitZero I can't send via codepen
can I send you index.html and style.css somehow?
CallMeOrange
@EgnaroDev
Jun 26 2017 00:39
@Pickorita Try asking someone else, even if I could debug it, I couldn't :/
Nickey Pickorita
@Pickorita
Jun 26 2017 00:39
why not? :/
CallMeOrange
@EgnaroDev
Jun 26 2017 00:40
Well Im not a pro
Nickey Pickorita
@Pickorita
Jun 26 2017 00:40
any pro coder here?
Curtis Turner
@curtis-turner
Jun 26 2017 00:40
@swong194 hang on let me try it out thanks
CamperBot
@camperbot
Jun 26 2017 00:40
curtis-turner sends brownie points to @swong194 :sparkles: :thumbsup: :sparkles:
:warning: curtis-turner already gave swong194 points
Pedro Pineda
@pedropda
Jun 26 2017 00:41
My modal has a serious bug, it darkens the page when click × dismiss symbol. Also can't figure out how to display form inline, please help
<div id="loginModal" class="modal fade" role="dialog">
      <div class="modal-dialog">
        <!-- Modal content -->
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">&times;</button>
            <h4 class="modal-title">Login</h4>
          </div>
          <div class="modal-body">
            <form    class="form-inline">
                <div    class="form-group">
                    <label class="sr-only" for="email">Email address</label>
                    <input type="email" class="form-control" id="email"    placeholder="Email">
                </div>
                <div    class="form-group">
                    <label    class="sr-only"    for=”password">Password</label>
                    <input    type="password"    class="form-control"    id=”password"    placeholder="Password">
                </div>
                <div    class="checkbox">
                    <label>    <input    type="checkbox">    Remember    me</label>
                </div>
                <button    type="submit"    class="btn btn-info">Sign    in</button>
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">Cancel</button>
            </form>

          </div>
        </div>
      </div>
    </div>
Sunny Wong
@swong194
Jun 26 2017 00:41
@curtis-turner it should work, please thank @jtan3
CamperBot
@camperbot
Jun 26 2017 00:41
swong194 sends brownie points to @curtis-turner and @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 266 | @curtis-turner |http://www.freecodecamp.com/curtis-turner
:warning: swong194 already gave jtan3 points
Curtis Turner
@curtis-turner
Jun 26 2017 00:42
@jtan3 thanks alot man i preciate it
CamperBot
@camperbot
Jun 26 2017 00:42
curtis-turner sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 428 | @jtan3 |http://www.freecodecamp.com/jtan3
Nickey Pickorita
@Pickorita
Jun 26 2017 00:42
could someone please help me?
Sunny Wong
@swong194
Jun 26 2017 00:42
@Pickorita post ur code buddy
Nickey Pickorita
@Pickorita
Jun 26 2017 00:42
I need someone to help me with CSS, a bit advanced issue
Sunny Wong
@swong194
Jun 26 2017 00:43
please post ur code XD
Nickey Pickorita
@Pickorita
Jun 26 2017 00:43
CallMeOrange
@EgnaroDev
Jun 26 2017 00:43
I-I-I'm dying..
Sunny Wong
@swong194
Jun 26 2017 00:43
@Pickorita nice site
Nickey Pickorita
@Pickorita
Jun 26 2017 00:43
@swong194 when I float logo space disappears but it gets bugged
I need to get rid of white space somehow
Curtis Turner
@curtis-turner
Jun 26 2017 00:43
@swong194 omg thank you! and @jtan3 you guys just prevented me from pulling my hair out wow!
CamperBot
@camperbot
Jun 26 2017 00:43
curtis-turner sends brownie points to @swong194 and @jtan3 :sparkles: :thumbsup: :sparkles:
:warning: curtis-turner already gave jtan3 points
:warning: curtis-turner already gave swong194 points
Nickey Pickorita
@Pickorita
Jun 26 2017 00:44
@swong194 thanks, I'm making it for practice
will probably upload code and everything somewhere for people to check for free
just need to fix this issue first somehow
Sunny Wong
@swong194
Jun 26 2017 00:44
@Pickorita can u upload to codepen, u can just copy html and and css into the codepen
@Pickorita since u have everything organized
Nickey Pickorita
@Pickorita
Jun 26 2017 00:44
@swong194 I tried but I can't
because it has bootstrap CSS as well
Sunny Wong
@swong194
Jun 26 2017 00:45
what bootstrap are u using
codepen has 3 and 4
its ok
just paste it and send and i can add bootstrap on my side
Nickey Pickorita
@Pickorita
Jun 26 2017 00:45
Bootstrap v3.3.7
just html and css
to codepen?
how do I share codepen here?
Sunny Wong
@swong194
Jun 26 2017 00:46
paste url
CallMeOrange
@EgnaroDev
Jun 26 2017 00:47
Yeah paste url then it will show up right here
michaelcmelton
@michaelcmelton
Jun 26 2017 00:47
First time using jQuery, APIs, and JSON. Can anyone help me figure out why the raw JSON isn't populating in my pen?
CallMeOrange
@EgnaroDev
Jun 26 2017 00:47
@michaelcmelton move inside script tags to JavaScript
Nickey Pickorita
@Pickorita
Jun 26 2017 00:48
@swong194 its not working
I need pro account for images.. :(
CallMeOrange
@EgnaroDev
Jun 26 2017 00:48
Then remove script tags and you already have jQuery added to JavaScript so it should work
@Pickorita no.. just paste url here
No need for screenshot
Nickey Pickorita
@Pickorita
Jun 26 2017 00:48
problem is when I post html and css
its not working because I used images for the site
CallMeOrange
@EgnaroDev
Jun 26 2017 00:48
@Pickorita Just paste url so we can look at them
Sunny Wong
@swong194
Jun 26 2017 00:49
images? O__O
Nickey Pickorita
@Pickorita
Jun 26 2017 00:49
<iframe height='265' scrolling='no' title='BarberSite' src='//codepen.io/pickorita/embed/yXzPNo/?height=265&theme-id=0&default-tab=html,result&embed-version=2' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'>See the Pen <a href='https://codepen.io/pickorita/pen/yXzPNo/'>BarberSite</a> by Nickey Pickorita (<a href='https://codepen.io/pickorita'>@pickorita</a>) on <a href='https://codepen.io'>CodePen</a>.
</iframe>
michaelcmelton
@michaelcmelton
Jun 26 2017 00:49
Still nothing. See?
CallMeOrange
@EgnaroDev
Jun 26 2017 00:49
just URl
Nickey Pickorita
@Pickorita
Jun 26 2017 00:49
damn I'm dumb
michaelcmelton
@michaelcmelton
Jun 26 2017 00:49
@MCTwoDigitZero
CallMeOrange
@EgnaroDev
Jun 26 2017 00:50
Sorry @michaelcmelton that is all I can do
After it is fixed then it should work
michaelcmelton
@michaelcmelton
Jun 26 2017 00:50
@MCTwoDigitZero Thanks for the help, anyways!
CamperBot
@camperbot
Jun 26 2017 00:50
michaelcmelton sends brownie points to @mctwodigitzero :sparkles: :thumbsup: :sparkles:
:cookie: 341 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
Nickey Pickorita
@Pickorita
Jun 26 2017 00:51
CallMeOrange
@EgnaroDev
Jun 26 2017 00:51
@Pickorita its fine I can post it for you
@swong194 here
Nickey Pickorita
@Pickorita
Jun 26 2017 00:51
how to share it?
Johnny
@jtan3
Jun 26 2017 00:51
@michaelcmelton if you look at your browser's console you'll get a mixed content error. You can add https://cors-anywhere.herokuapp.com/ in front of your api url.
michaelcmelton
@michaelcmelton
Jun 26 2017 00:51
mixed content error?
CallMeOrange
@EgnaroDev
Jun 26 2017 00:52
@michaelcmelton meaning http and https links is mixed
should be all http or https
michaelcmelton
@michaelcmelton
Jun 26 2017 00:53
Ahhh....
CallMeOrange
@EgnaroDev
Jun 26 2017 00:53
have faith in @jtan3
Johnny
@jtan3
Jun 26 2017 00:53
@michaelcmelton it should be all HTTPS. Codepen requires HTTPS.
Nickey Pickorita
@Pickorita
Jun 26 2017 00:53
@swong194
CallMeOrange
@EgnaroDev
Jun 26 2017 00:53
@jtan3 no http?
Nickey Pickorita
@Pickorita
Jun 26 2017 00:53
did you manage to take a look at it?
Sunny Wong
@swong194
Jun 26 2017 00:54
@Pickorita looking at it now sorry
CallMeOrange
@EgnaroDev
Jun 26 2017 00:54
@Pickorita for now, add Bootstrap 3 or 4 to CSS
Setting>CSS>Quick-Add>Bootstrap 3/4
Nickey Pickorita
@Pickorita
Jun 26 2017 00:54
its too long
michaelcmelton
@michaelcmelton
Jun 26 2017 00:55
Luckily the API URL was served in HTTPS too! Thanks @jtan3!
CamperBot
@camperbot
Jun 26 2017 00:55
michaelcmelton sends brownie points to @jtan3 :sparkles: :thumbsup: :sparkles:
:cookie: 429 | @jtan3 |http://www.freecodecamp.com/jtan3
Nickey Pickorita
@Pickorita
Jun 26 2017 00:55
@MCTwoDigitZero codepen is confusing
CallMeOrange
@EgnaroDev
Jun 26 2017 00:55
@Pickorita Sorry :p
Nickey Pickorita
@Pickorita
Jun 26 2017 00:55
I was using dreamweaver for this one
CallMeOrange
@EgnaroDev
Jun 26 2017 00:55
You should get used to it
Sunny Wong
@swong194
Jun 26 2017 00:55
@Pickorita ok so codepen lets u reference stuff "behind the scenes"
CallMeOrange
@EgnaroDev
Jun 26 2017 00:56
Yes like style tags or script tags for example
Nickey Pickorita
@Pickorita
Jun 26 2017 00:56
yea I should get used to it
Sunny Wong
@swong194
Jun 26 2017 00:56
@Pickorita so all ur headings and stuff with bootstrap and jquery can be done iwth a click of a button, take time to explore that
Nickey Pickorita
@Pickorita
Jun 26 2017 00:56
so I could share bugs
Sunny Wong
@swong194
Jun 26 2017 00:56
@Pickorita yep
Nickey Pickorita
@Pickorita
Jun 26 2017 00:56
I could share my site files
Sunny Wong
@swong194
Jun 26 2017 00:56
sorry can u restate ur issue
its fine u have place holders
Nickey Pickorita
@Pickorita
Jun 26 2017 00:56
but not sure if I'm allowed to do that here
Sunny Wong
@swong194
Jun 26 2017 00:56
ur files are on ur computer im guessing
Nickey Pickorita
@Pickorita
Jun 26 2017 00:56
yes
everything's on my computer, I used dreamweaver as code editor
Sunny Wong
@swong194
Jun 26 2017 00:57
wut was the issue again?
Nickey Pickorita
@Pickorita
Jun 26 2017 00:57
blank space
CallMeOrange
@EgnaroDev
Jun 26 2017 00:57
what about the images?
Nickey Pickorita
@Pickorita
Jun 26 2017 00:57
between logo and header image
and when I use float it gets messed up
CallMeOrange
@EgnaroDev
Jun 26 2017 00:57
images is not fixed in codepen yet right?
Nickey Pickorita
@Pickorita
Jun 26 2017 00:57
also when i use clear
Here ^^^
This is how it was supposed to look like
I made photoshop file first
then started coding
but I couldn't make that logo look like that
Not really sure how to fix this
I guess I'll have to practice more till I learn to code better..
Sunny Wong
@swong194
Jun 26 2017 01:02
@Pickorita sorry what are u floating
Nickey Pickorita
@Pickorita
Jun 26 2017 01:02
logoimage
Sunny Wong
@swong194
Jun 26 2017 01:02
@Pickorita im having trouble figuring out where everything is i see a white space
you want it
centered?
Nickey Pickorita
@Pickorita
Jun 26 2017 01:02
yea I want it centered
and without white space
John
@AnonymousLords
Jun 26 2017 01:04
Guys how to make a navigation bar?
CallMeOrange
@EgnaroDev
Jun 26 2017 01:05
@John-freeCodeCamp make an element with class fixed-top
Have div element around it with that class too if needed, if so add that class to div element only
<div class="fixed-top">
<h2>About</h2>
</div>
Make sure to add bootstrap
John
@AnonymousLords
Jun 26 2017 01:37
Hello guys, i am using bootstrap 3 for my codepen. Their is a bug where the styling isnt working, but that can be fixed if you add the plug " https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css." Now do i add that in the settings under my bootstrap 3 or at the top? Heres my codepen: https://codepen.io/Mike-was-here123/pen/dRVVLw
I got this from a Tutorial https://www.youtube.com/watch?v=2klCZXwfvLs
Private message will be best...
styling is at 6:40
John
@AnonymousLords
Jun 26 2017 01:42
j patrict, can you help?
Nvm ill try another chat
Egan1572
@Egan1572
Jun 26 2017 01:47
Hello. I finished the Tribute Page project, no probs. The Portfolio project is another story. After 4 hrs I looked at the example code and wth? There is a lot of code there that FCC has yet to teach me. So I think I will start java then go back and do the Portfolio project. Has anybody else done it this way?
Sunny Wong
@swong194
Jun 26 2017 01:47
@John-freeCodeCamp add it in settings
@John-freeCodeCamp it will be boostrap 3 i tihnk
@Egan1572 you do not need javascript for your portfolio, you can do it with css and html
@Egan1572 you can go back to any of ur challenges whenever you are comfortable, try general assembly dash, they might guide u a bit better in terms of making a portfolio (try the blog one)
but just dive into it, u will be surprised how much u learn by the end
Egan1572
@Egan1572
Jun 26 2017 01:49
@swong194 Okay, I'll try it, thanks
CamperBot
@camperbot
Jun 26 2017 01:49
egan1572 sends brownie points to @swong194 :sparkles: :thumbsup: :sparkles:
:cookie: 294 | @swong194 |http://www.freecodecamp.com/swong194
Sunny Wong
@swong194
Jun 26 2017 01:51
any1 got some hints for the roman numeral challenge ? XD
or do i just brute force it
CallMeOrange
@EgnaroDev
Jun 26 2017 01:53
@swong194 Hey can you help me with Profile Lookup?
John
@AnonymousLords
Jun 26 2017 01:53
@swong194 I tried that under the boostrap 3 link, and it does nothing
+
Sunny Wong
@swong194
Jun 26 2017 01:54
@MCTwoDigitZero i can try
CallMeOrange
@EgnaroDev
Jun 26 2017 01:54
@swong194 Im working on both if statements
I think its not correct yet but Im trying to fix it

//Setup
var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];


function lookUpProfile(firstName, prop){
  if (firstName!==firstName) {
    return "No such contact"; 
  } else if (prop!==prop) {
    return "No such property";
  }



}

lookUpProfile("Akira", "likes");
Sunny Wong
@swong194
Jun 26 2017 01:55
@John-freeCodeCamp try adding as external css? not sure
CallMeOrange
@EgnaroDev
Jun 26 2017 01:56
function lookUpProfile(firstName, prop){
  if (firstName!==contacts.firstName) {
    return "No such contact"; 
  } else if (prop!==contacts.prop) {
    return "No such property";
  }
Oh I see whats wrong with last statement... Lemme try to fix it :/
Sunny Wong
@swong194
Jun 26 2017 01:57
ur not lopping yet right?
looping*
Egan1572
@Egan1572
Jun 26 2017 01:57
@swong194 Two minutes in and general assembly dash is helping to fill in the blanks left by fcc. Thanks a lot! :0)
CamperBot
@camperbot
Jun 26 2017 01:57
egan1572 sends brownie points to @swong194 :sparkles: :thumbsup: :sparkles:
:warning: egan1572 already gave swong194 points
Sunny Wong
@swong194
Jun 26 2017 01:57
@Egan1572 np!
CallMeOrange
@EgnaroDev
Jun 26 2017 01:57
@swong194 Not yet
I need to do something about these statements first
Sunny Wong
@swong194
Jun 26 2017 01:58
@MCTwoDigitZero so the way ur calling first name is incorrect
@MCTwoDigitZero u need to say contacts["firstName"]
to access the first name
CallMeOrange
@EgnaroDev
Jun 26 2017 01:58
how? I use if statement to test if contacts has same value (firstname)
Sunny Wong
@swong194
Jun 26 2017 01:59
woops didnt see that sorry
CallMeOrange
@EgnaroDev
Jun 26 2017 01:59
@swong194 Doesnt it matter? :/ contact.firstname work same way right?
Oh lol
Sunny Wong
@swong194
Jun 26 2017 01:59
sorry LOL
CallMeOrange
@EgnaroDev
Jun 26 2017 01:59
That statement is fine so Im fixing on last statement
This is what I have
} else if (prop!==contacts.hasOwnProperty[prop]) {
    return "No such property";
  }
oh... for that method need () not []
} else if (prop!==contacts.hasOwnProperty(prop)) {
    return "No such property";
  }
I can just do else statement instead.. but I want to do that somehow
ksbox
@ksbox
Jun 26 2017 02:02
hey so what happens after i submit challenges like the tribute page and portfolio page to fcc? do i get some kind of feedback or something?
CallMeOrange
@EgnaroDev
Jun 26 2017 02:02
@ksbox Nope
ksbox
@ksbox
Jun 26 2017 02:03
ok
CallMeOrange
@EgnaroDev
Jun 26 2017 02:03
Thats it, but you have to follow all rules
ksbox
@ksbox
Jun 26 2017 02:03
just wondering
CallMeOrange
@EgnaroDev
Jun 26 2017 02:03
Because if you dont, certification might get invalid
ksbox
@ksbox
Jun 26 2017 02:03
cool
Sunny Wong
@swong194
Jun 26 2017 02:03
@MCTwoDigitZero so hasOwnProperty returns a boolean value u need to check if its true or false i think not compare with prop ?
ksbox
@ksbox
Jun 26 2017 02:03
thanks @MCTwoDigitZero
CamperBot
@camperbot
Jun 26 2017 02:03
ksbox sends brownie points to @mctwodigitzero :sparkles: :thumbsup: :sparkles:
:cookie: 342 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
CallMeOrange
@EgnaroDev
Jun 26 2017 02:03
@swong194 thats right...
You said boolean so I immediately remembered lol
Sunny Wong
@swong194
Jun 26 2017 02:04
@MCTwoDigitZero so less say contacts.hasOwnProperty(prop) [lets say true]
@MCTwoDigitZero then ur else if would be coparing prop!==true
CallMeOrange
@EgnaroDev
Jun 26 2017 02:04
coparing?
Sunny Wong
@swong194
Jun 26 2017 02:04
comparing*
so in the case that is always not true unless ur prop is the boolean value true
CallMeOrange
@EgnaroDev
Jun 26 2017 02:05
oh I see what you are saying
Sunny Wong
@swong194
Jun 26 2017 02:05
so ur not comparing the right things there as of that "else if" statement
CallMeOrange
@EgnaroDev
Jun 26 2017 02:05
} else if (contacts.hasOwnProperty(prop)!==true) {
    return "No such property";
  }
Thought that would work :/
Sunny Wong
@swong194
Jun 26 2017 02:06
might be better to see if contact prop returns null
CallMeOrange
@EgnaroDev
Jun 26 2017 02:06
ah
You mean to change true to null?
fdemaa
@fdemaa
Jun 26 2017 02:06
you dont have to use hasowproperty and true
just this
} else if (contacts.hasOwnProperty(prop)
 if (contacts[i].hasOwnProperty(prop)) {
CallMeOrange
@EgnaroDev
Jun 26 2017 02:07
but how do I test it if it have same value or not?
fdemaa
@fdemaa
Jun 26 2017 02:07
why do you want to do that ?
CallMeOrange
@EgnaroDev
Jun 26 2017 02:08
well..
If prop does not correspond to any valid properties then return "No such property"
Because of that instruction?
Sunny Wong
@swong194
Jun 26 2017 02:09
@MCTwoDigitZero contacts[i].hasOwnProperty(prop) [if this statement returns true, it will execute whatever is inside]
fdemaa
@fdemaa
Jun 26 2017 02:09

if firstname property is an actual firstname, and the one if put you, is true, then it will return concats[i][prop]

if all that its not true, and the loop finish, just put and else with "No such property";

CallMeOrange
@EgnaroDev
Jun 26 2017 02:10
alright
I will work on loop then
Sunny Wong
@swong194
Jun 26 2017 02:10
@MCTwoDigitZero i think you just need to check the value in first name, but you just need to see if the property given by "prop" exists
CallMeOrange
@EgnaroDev
Jun 26 2017 02:10
yeah Im trying to do that
fdemaa
@fdemaa
Jun 26 2017 02:11
you are almost there ;)
go for it man
CallMeOrange
@EgnaroDev
Jun 26 2017 02:11
@fdemaa with that statement?
Sunny Wong
@swong194
Jun 26 2017 02:11
@swong194 yeh theres multiple layers to this challenge, u have the right idea but it needs a lil more work
CallMeOrange
@EgnaroDev
Jun 26 2017 02:12
lol
Talking to yourself?
Sunny Wong
@swong194
Jun 26 2017 02:12
@MCTwoDigitZero
woops
XD
im trying to cheer myself on
i guess
CallMeOrange
@EgnaroDev
Jun 26 2017 02:13
I'll try to create a loop
Hold on
This message was deleted
Sunny Wong
@swong194
Jun 26 2017 02:14
yes
CallMeOrange
@EgnaroDev
Jun 26 2017 02:14
:/

var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];


function lookUpProfile(firstName, prop){
  for (var i = 0; i < contacts; i++) {

  }


  if (firstName!==contacts[i].firstName) {
    return "No such contact"; 
  } else {
    return "No such property";
  }



}

lookUpProfile("Akira", "likes");
now both statements is completed..
fdemaa
@fdemaa
Jun 26 2017 02:15
check your inbox
dude
@MCTwoDigitZero
CallMeOrange
@EgnaroDev
Jun 26 2017 02:16
@fdemaa oh sorry lol, already did all that :/
what do you mean another if statement for contacts[i].hasOwnProperty?
fdemaa
@fdemaa
Jun 26 2017 02:18
This message was deleted

Actually no, my bad, lol

You can make it like this;

if ( whatever && whatever2 )

or

if( whatever)
if(whatever2)

@MCTwoDigitZero
CallMeOrange
@EgnaroDev
Jun 26 2017 02:22
Well thanks for all of your hints but I want to figure this out by myself @fdemaa
CamperBot
@camperbot
Jun 26 2017 02:22
mctwodigitzero sends brownie points to @fdemaa :sparkles: :thumbsup: :sparkles:
:cookie: 291 | @fdemaa |http://www.freecodecamp.com/fdemaa
shivam gupta
@shivamg11000
Jun 26 2017 02:22
@MachineVision2020 the url you want is not possible, it can't be lokeshdudigollar.github.io, you have to use your username instead of lokeshdudigollar , or buy a domain
michaelcmelton
@michaelcmelton
Jun 26 2017 02:23
How do I solve the 'Access-Control-Allow-Origin' error thrown by my browser from my pen?
ajax request instead of json?
shivam gupta
@shivamg11000
Jun 26 2017 02:23
@michaelcmelton use
?callback=?
at the end of your api url
michaelcmelton
@michaelcmelton
Jun 26 2017 02:25
Awesome thanks! @shivamg11000
CamperBot
@camperbot
Jun 26 2017 02:25
michaelcmelton sends brownie points to @shivamg11000 :sparkles: :thumbsup: :sparkles:
:cookie: 319 | @shivamg11000 |http://www.freecodecamp.com/shivamg11000
shivam gupta
@shivamg11000
Jun 26 2017 02:25
@michaelcmelton you will not ask why this worked?
michaelcmelton
@michaelcmelton
Jun 26 2017 02:28
I am curious. Please do tell.
shivam gupta
@shivamg11000
Jun 26 2017 02:28
@michaelcmelton google it topics like 'same origin policy' , 'cors' , 'jsonp'
michaelcmelton
@michaelcmelton
Jun 26 2017 02:29
Got it. Now the browser console is returning 403 errors.
shivam gupta
@shivamg11000
Jun 26 2017 02:29
@michaelcmelton send the link
michaelcmelton
@michaelcmelton
Jun 26 2017 02:30
shivam gupta
@shivamg11000
Jun 26 2017 02:31
your url is worng , it has https:// two times written @michaelcmelton
what the endpoint url
@michaelcmelton use this
http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=?
remove the crossorigin link from it
CallMeOrange
@EgnaroDev
Jun 26 2017 02:35
it was required because of mixed content @shivamg11000
At least someone said it
michaelcmelton
@michaelcmelton
Jun 26 2017 02:36
haha! Thanks, MC. So I got the API to pull a single quote. But it won't refresh with a new one...
shivam gupta
@shivamg11000
Jun 26 2017 02:37
@michaelcmelton use this
http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=?
Its working for me
Jerard Delrosario
@jrardd
Jun 26 2017 02:37
Hey guys, just finished my Portfolio and wanted to know if anyone could give me some feedback. I just started learning HTML and CSS last week on FreeCodeCamp. I know my code is very unorganized and could be condensed to be more efficient, so some advice would be nice... If anyone has the time, it would be much appreciated!
https://codepen.io/jrard/pen/VWMYrW
CallMeOrange
@EgnaroDev
Jun 26 2017 02:37
@jrardd hey looks great
I was thinking you should move id about to About in that light gray background but i think its fine
shivam gupta
@shivamg11000
Jun 26 2017 02:38
@jrardd Its great , better use black color to the navbar fields
CallMeOrange
@EgnaroDev
Jun 26 2017 02:38
I was going to say that lol
Its not designed for mobile support but not bad for beginner
@jrardd why didnt you add Tribute page to projects section?
@jrardd Oh one more thing, I would recommend add alt attribute to all of image elements just in case they are not working
zburchett
@zburchett
Jun 26 2017 02:40
@jrardd looks great compared to my first portfolio site. I'm a beginner also.
CallMeOrange
@EgnaroDev
Jun 26 2017 02:40
@zburchett Might I see your?
Jerard Delrosario
@jrardd
Jun 26 2017 02:41
@MCTwoDigitZero @shivamg11000 @zburchett Thanks for the feedback!
@MCTwoDigitZero And ok I will do that, thanks
CamperBot
@camperbot
Jun 26 2017 02:42
jrardd sends brownie points to @mctwodigitzero :sparkles: :thumbsup: :sparkles:
:cookie: 343 | @mctwodigitzero |http://www.freecodecamp.com/mctwodigitzero
CallMeOrange
@EgnaroDev
Jun 26 2017 02:43
@zburchett hey looks nice, so you are back end developer?
Jerard Delrosario
@jrardd
Jun 26 2017 02:43
@zburchett That looks awesome haha
CallMeOrange
@EgnaroDev
Jun 26 2017 02:43
I think Back end have database involved not sure..
zburchett
@zburchett
Jun 26 2017 02:44
I actually currently make stand alone database applications using Microsoft Access. A lot of coding I guess though is similar to what back end web devs would use from what i have seen thus far. The SQL that is.
CallMeOrange
@EgnaroDev
Jun 26 2017 02:44
I see
fdemaa
@fdemaa
Jun 26 2017 02:45
@jrardd looks good man!
you should make it responsive maybe
if you want
michaelcmelton
@michaelcmelton
Jun 26 2017 02:52
It's WORKING NOW!!! YES!!! Thank you to all who helped!
Benny
@BenYoshi
Jun 26 2017 02:58
what api have you guys used for the weather app?
codeandrew
@codeandrew
Jun 26 2017 03:11

hello guys I'm very new at react, I've got some nodejs tutorial online to help me back up at my react. but it gives me error
Failed to compile.

Error in ./~/react-dom/lib/ReactDOMNullInputValuePropHook.js Module not found: 'react/lib/ReactComponentTreeHook' in /home/icarus/Documents/javascript/reactjs/tictactoe/my-app/node_modules/react-dom/lib @ ./~/react-dom/lib/ReactDOMNullInputValuePropHook.js 13:29-72

while following this
https://facebook.github.io/react/tutorial/tutorial.html

CallMeOrange
@EgnaroDev
Jun 26 2017 03:33
@BenYoshi I used Dark Sky
Good API and has https://
Gulsvi
@gulsvi
Jun 26 2017 03:36
@michaelcmelton You will need to circumvent cache to get a new quote each time. You can add a random number to the end of the URL or use the disable: cache setting in jQuery.
CallMeOrange
@EgnaroDev
Jun 26 2017 03:36
@SkyC0der Hey... You got on...
Gulsvi
@gulsvi
Jun 26 2017 03:36
Also, this &_jsonp=? should not be part of your URL..that's for the forismatic api :p
CallMeOrange
@EgnaroDev
Jun 26 2017 03:36
Im on Profile Lookup :/
Gulsvi
@gulsvi
Jun 26 2017 03:36
Hi @MCTwoDigitZero
CallMeOrange
@EgnaroDev
Jun 26 2017 03:36
Yo
Too late I resetted my code :/
My code was messed up and thought some statements are not working properly
So only two if/else if statements and a for loop right?
Gulsvi
@gulsvi
Jun 26 2017 03:38
Yeah, pretty much
CallMeOrange
@EgnaroDev
Jun 26 2017 03:38
I was close tho
so I was going to rewrite new code but since you are here
I think this is like before I reset

//Setup
var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];


function lookUpProfile(firstName, prop){
// Only change code below this line
for (var i = 0; i < contacts; i++) {  
}
  if (firstName!==contacts[i].firstName) {
    return "No such contact";
  } else {
    return "No such property";
}
// Only change code above this line
}

// Change these values to test your function
lookUpProfile("Akira", "likes");
@SkyC0der well?
Gulsvi
@gulsvi
Jun 26 2017 03:42
@MCTwoDigitZero This is a problem, because nothing is running inside your for() loop:
for (var i = 0; i < contacts; i++) {  
}
CallMeOrange
@EgnaroDev
Jun 26 2017 03:42
Hm..
Gulsvi
@gulsvi
Jun 26 2017 03:42
The first if looks good, but you need to check another condition too
CallMeOrange
@EgnaroDev
Jun 26 2017 03:42
Yeah... Im running on empty.. no idea what to put inside
@SkyC0der so else statement is not good?
Gulsvi
@gulsvi
Jun 26 2017 03:43
The for loop goes through the object, so you go through each item in the object and test with your if statements
Ken Haduch
@khaduch
Jun 26 2017 03:43
@MCTwoDigitZero - a hint: when you write a for loop to iterate over a list, what is the normal thing to use for the loop control where you have i < contacts in your for loop line? (Hint: something to do with length...)
There are other problems, but start with that basic part of the code.
CallMeOrange
@EgnaroDev
Jun 26 2017 03:44
I tried .length before
But it didnt work for some reason, let me try it
Gulsvi
@gulsvi
Jun 26 2017 03:44
That's very good advice from Ken. Try to start with a for loop that console.logs everything inside the object
Ken Haduch
@khaduch
Jun 26 2017 03:45
@MCTwoDigitZero - I see that @Sky is helping you, I won't confuse the issue with added comments... good luck!
CallMeOrange
@EgnaroDev
Jun 26 2017 03:45
@khaduch thanks
CamperBot
@camperbot
Jun 26 2017 03:45
mctwodigitzero sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3039 | @khaduch |http://www.freecodecamp.com/khaduch
Gulsvi
@gulsvi
Jun 26 2017 03:45
I suck at these to be honest @khaduch :) may ask for your help soon :p
CallMeOrange
@EgnaroDev
Jun 26 2017 03:45
@SkyC0der so I used length but didnt work
Gulsvi
@gulsvi
Jun 26 2017 03:46
What did you put inside the for loop?
CallMeOrange
@EgnaroDev
Jun 26 2017 03:47
Nothing yet..
I should try console.log like you said
for (var i = 0; i < contacts.length; i++) { 
  console.log(contacts[i]);
}
Gulsvi
@gulsvi
Jun 26 2017 03:48
Yeah, start with:
for (var i = 0; i < contacts.length; i++) {
  console.log(contacts[i])
}
CallMeOrange
@EgnaroDev
Jun 26 2017 03:48
lol
Too bad
Gulsvi
@gulsvi
Jun 26 2017 03:48
lol :)
I forgot a semi colon
CallMeOrange
@EgnaroDev
Jun 26 2017 03:48
So output is empty
@SkyC0der I see even if you post it first, I would get it correct
Is this a bug? why is output empty..
Gulsvi
@gulsvi
Jun 26 2017 03:49
Output is not empty, it lists all four objects, one at a time
CallMeOrange
@EgnaroDev
Jun 26 2017 03:49
Its empty for me
I should try it in codepen :?
Gulsvi
@gulsvi
Jun 26 2017 03:49
Yes, in codepen
image.png
CallMeOrange
@EgnaroDev
Jun 26 2017 03:50
Yeah I saw
So a list at a time
so say contact[0] is that first list?
What should I call it? a list?
Gulsvi
@gulsvi
Jun 26 2017 03:50
It's an object
CallMeOrange
@EgnaroDev
Jun 26 2017 03:51
well yeah
Gulsvi
@gulsvi
Jun 26 2017 03:51
with properties (firstName, lastName, etc.) and values for those properties
CallMeOrange
@EgnaroDev
Jun 26 2017 03:51
So a object at a time
Gulsvi
@gulsvi
Jun 26 2017 03:51
Yes
CallMeOrange
@EgnaroDev
Jun 26 2017 03:51
So for loop is all good?
Gulsvi
@gulsvi
Jun 26 2017 03:52
Yup
CallMeOrange
@EgnaroDev
Jun 26 2017 03:52
Im gonna write if statement for "No such contact"
if (firstName!==contacts[i].firstName) {
return "No such contact";
}
I wrote it on my own :/
Looks good to me
So how do I run console in codepen?
Gulsvi
@gulsvi
Jun 26 2017 03:53
Think about the for loop now, it will check the first one and then return "no such contact" before checking the rest of them
CallMeOrange
@EgnaroDev
Jun 26 2017 03:54
Oh I see
A question... contacts[0].firstName is Akira correct?
Gulsvi
@gulsvi
Jun 26 2017 03:55
Yes, that´s correct
CallMeOrange
@EgnaroDev
Jun 26 2017 03:55
If I say .firstName it will give the property of "first name"
Ok then
Gulsvi
@gulsvi
Jun 26 2017 03:55
yes
CallMeOrange
@EgnaroDev
Jun 26 2017 03:56
Hm, this time I will always test console.log when I make a loop
So I will be able to work further
Gulsvi
@gulsvi
Jun 26 2017 03:56
That will be helpful
CallMeOrange
@EgnaroDev
Jun 26 2017 03:56
Can I just write else statement for "No such property"?
Never mind, I want to write else if for it instead
} else if (firstName.prop!==contacts[i].firstname.prop) {
 return "No such property";
}
oh spelled firstName wrong
Gulsvi
@gulsvi
Jun 26 2017 03:59
You want to think positively for your if statements
CallMeOrange
@EgnaroDev
Jun 26 2017 03:59
wrong upper case actually..
Im not sure what to think... I think if statement is perfectly fine
It just check if each object has firstName , if not then return "No such contact"
Gulsvi
@gulsvi
Jun 26 2017 04:01

start like they say in the instructions:

The function should check if firstName is an actual contact's firstName and the given property (prop) is a property of that contact.
If both are true, then return the "value" of that property.

CallMeOrange
@EgnaroDev
Jun 26 2017 04:01
hm..
I see..
if ( firstname && prop) {
return?
}
Thats just an example
Gulsvi
@gulsvi
Jun 26 2017 04:03
Yeah, good pseudo code. If the first name exists and it has the property we want, return the property value
CallMeOrange
@EgnaroDev
Jun 26 2017 04:03
Yeah but I dont know what to return
Gotta think about it...
Maybe contacts[i].firstName.prop
Gulsvi
@gulsvi
Jun 26 2017 04:04
contacts[i].firstName gives you the first name of everyone
There is no contacts[i].firstName.prop
CallMeOrange
@EgnaroDev
Jun 26 2017 04:05
@SkyC0der oh right..
I could've say it if I didnt leave lol
Sydney
@SydneyWarren
Jun 26 2017 04:06
i'm trying to make the gets results drop into the <li>
CallMeOrange
@EgnaroDev
Jun 26 2017 04:06
Sorry I should've say "Brb"
Brb
Sydney
@SydneyWarren
Jun 26 2017 04:06
am i going about it correctly with the JS?
Gulsvi
@gulsvi
Jun 26 2017 04:07
@SydneyWarren arr should be data in your JS
You have assigned the array the variable name data in your callback function: function(data)
Sydney
@SydneyWarren
Jun 26 2017 04:09
@SkyC0der once i switch it to data is everything good to go?
Gulsvi
@gulsvi
Jun 26 2017 04:09
@SydneyWarren No, you also need to write your data to your page
Like in the weather app, you took data returned from the API and displayed it on the page
Sydney
@SydneyWarren
Jun 26 2017 04:10
in my console it also says Uncaught ReferenceError: myFunction is not defined
at HTMLButtonElement.onclick
i haven't been able to figure it out for a couple days whats wrong there
@SkyC0der yes i remember how to do that with the weather app, but how would i make it drop into the <li>
Gulsvi
@gulsvi
Jun 26 2017 04:12
@SydneyWarren In the weather app, you used .text() which writes text to the page. To write HTML to the page, use .html() instead
So, $('myElement').html('<li>my html list item</li>');
CallMeOrange
@EgnaroDev
Jun 26 2017 04:13
@SkyC0der How do I run console in codepen?
There is no way to run console?
langtson
@langtson
Jun 26 2017 04:15
in the bottom left corner there is a button that says console @MCTwoDigitZero
CallMeOrange
@EgnaroDev
Jun 26 2017 04:15
yeah but how do you run it?
Gulsvi
@gulsvi
Jun 26 2017 04:15
Ctrl +Shift+5
Sydney
@SydneyWarren
Jun 26 2017 04:15
Uncaught ReferenceError: myFunction is not defined
at HTMLButtonElement.onclick
what does that mean?
CallMeOrange
@EgnaroDev
Jun 26 2017 04:15
If I changed something in console.log, what if it doesnt update?
@SkyC0der thanks
CamperBot
@camperbot
Jun 26 2017 04:15
:star2: 1829 | @skyc0der |http://www.freecodecamp.com/skyc0der
mctwodigitzero sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
langtson
@langtson
Jun 26 2017 04:15
fun it what do you mean?
run*
Gulsvi
@gulsvi
Jun 26 2017 04:16
@SydneyWarren That means that myFunction is out of scope
Is that in the codepen you just shared?
Sydney
@SydneyWarren
Jun 26 2017 04:16
no thats from my chrome dev
how do i put the myFunction back in scope then?
i also dont understand why it would be out of scope
Gulsvi
@gulsvi
Jun 26 2017 04:17
I don't see that error in Chrome in your latest codepen
Sydney
@SydneyWarren
Jun 26 2017 04:18
i work on it in atom with a live server
CallMeOrange
@EgnaroDev
Jun 26 2017 04:18
//Setup
var contacts = [
  {
    firstName: "Akira",
    lastName: "Laine",
    number: "0543236543",
    likes: ["Pizza", "Coding", "Brownie Points"]
  },
  {
    firstName: "Harry",
    lastName: "Potter",
    number: "0994372684",
    likes: ["Hogwarts", "Magic", "Hagrid"]
  },
  {
    firstName: "Sherlock",
    lastName: "Holmes",
    number: "0487345643",
    likes: ["Intriguing Cases", "Violin"]
  },
  {
    firstName: "Kristian",
    lastName: "Vos",
    number: "unknown",
    likes: ["Javascript", "Gaming", "Foxes"]
  }
];

function lookUpProfile(firstName, prop) {
  // Only change code below this line
  for (var i = 0; i < contacts.length; i++) {
   console.log(contacts[i]);
  }
  if (firstName !== contacts[i].firstName) {
    return "No such contact";
  } else if (prop !== contacts[i].hasOwnProperty(prop)) {
    return "No such property";
  }
  // Only change code above this line
}

// Change these values to test your function
lookUpProfile("Akira", "likes");
Sydney
@SydneyWarren
Jun 26 2017 04:18
and then i post it to codepen after
CallMeOrange
@EgnaroDev
Jun 26 2017 04:18
I know that hasOwnProperty only return true or false
Is it alright?
It still test the property
Gulsvi
@gulsvi
Jun 26 2017 04:19
If the first name exists and it has the property we want, return the property value
CallMeOrange
@EgnaroDev
Jun 26 2017 04:19
Alright
Gulsvi
@gulsvi
Jun 26 2017 04:20

You're saying:

if the first name does not exist return no such contact else if property is not equal to the property we want, return no such property

CallMeOrange
@EgnaroDev
Jun 26 2017 04:20
function lookUpProfile(firstName, prop) {
  // Only change code below this line
  for (var i = 0; i < contacts.length; i++) {
   console.log(contacts[i]);
  }
  if (firstName !== contacts[i].firstName) {
    return "No such contact";
  } else if (prop === contacts[i].hasOwnProperty(prop)) {
    return prop;
  } else if (prop !== contacts[i].hasOwnProperty(prop)) {
    return "No such property";
  }
  // Only change code above this line
}
Gulsvi
@gulsvi
Jun 26 2017 04:20
if (firstName !== contacts[i].firstName) {
CallMeOrange
@EgnaroDev
Jun 26 2017 04:20
Yeah I need to fix that
Gulsvi
@gulsvi
Jun 26 2017 04:21
It's also all outside of your for loop
CallMeOrange
@EgnaroDev
Jun 26 2017 04:21
it says fi
@SkyC0der They are supposed to be inside loop block?
Gulsvi
@gulsvi
Jun 26 2017 04:21
Yeah, you need to test every single object
CallMeOrange
@EgnaroDev
Jun 26 2017 04:22
oh... but why does [i] work then?
Gulsvi
@gulsvi
Jun 26 2017 04:22
It shouldn't work...
CallMeOrange
@EgnaroDev
Jun 26 2017 04:22
oh...
alright
Gulsvi
@gulsvi
Jun 26 2017 04:22
i is only defined inside your for loop
CallMeOrange
@EgnaroDev
Jun 26 2017 04:22
I see
You are right
So.. let works on first else if statement
Hold on, I think Im not paying attention to instructions
Let me reread it
Gulsvi
@gulsvi
Jun 26 2017 04:23
check if firstName is an actual contact's firstName
CallMeOrange
@EgnaroDev
Jun 26 2017 04:24
yeah..
Curtis Turner
@curtis-turner
Jun 26 2017 04:25
alright so i think i finished meeting the user stories for the random quote machine challenge. can anyone take a look and see if they think it meets them as well.
Adit
@adittyagi
Jun 26 2017 04:31
good morning
:)
CallMeOrange
@EgnaroDev
Jun 26 2017 04:32
@adittyagi Good Afternoon
jdaquino
@jdaquino
Jun 26 2017 04:37
@r1chard5mith thanks, it let me advance a lot
CamperBot
@camperbot
Jun 26 2017 04:37
jdaquino sends brownie points to @r1chard5mith :sparkles: :thumbsup: :sparkles:
:cookie: 558 | @r1chard5mith |http://www.freecodecamp.com/r1chard5mith
CallMeOrange
@EgnaroDev
Jun 26 2017 05:01
This message was deleted
if i wanna pull out just the first thing in each array how should the syntaxs look?
CallMeOrange
@EgnaroDev
Jun 26 2017 05:07
@SkyC0der you on?
ethanbhuang
@ethanbhuang
Jun 26 2017 05:13
@SydneyWarren
function pullFirst(arr) {
var newArray = [];
var newArrayCounter = 0;
for (i=0;i<arr.length;i++) {
newArray[newArrayCounter] = arr[i][0];
newArrayCounter += 1;
}
return newArray;
}
Sorry if this isn't what you were looking for. First time.
Adit
@adittyagi
Jun 26 2017 05:20
@adittyagi
Hey, how to set background image ?
Like I am building my portfolio, so how to set the background ?
CallMeOrange
@EgnaroDev
Jun 26 2017 05:21
@adittyagi
body {
background-image: url("url here");
}
Adit
@adittyagi
Jun 26 2017 05:22
ohh okay thank you
css property right ?
Konnor Timmons
@KonnorTimmons1297
Jun 26 2017 05:27
Hello everyone!
Adit
@adittyagi
Jun 26 2017 05:27
Hey..
Konnor Timmons
@KonnorTimmons1297
Jun 26 2017 05:28
I just completed the Tribute project page, would someone mind taking a look at it and telling me where i could improve?
Adit
@adittyagi
Jun 26 2017 05:31
@anikan1297 Good..maybe you can add border to your image
Konnor Timmons
@KonnorTimmons1297
Jun 26 2017 05:32
Thanks! I appreciate the feedback!
Adit
@adittyagi
Jun 26 2017 05:33
:+1:
Marius Nicolae
@bytao7mao
Jun 26 2017 05:34
@anikan1297 border to image and maybe some space to 'breath' from the top
Adit
@adittyagi
Jun 26 2017 05:36
How fix my navigation bar in a webpage ?
How to
iso
@iso1048
Jun 26 2017 05:38
@adittyagi link your pen. i may be able to help
Adit
@adittyagi
Jun 26 2017 05:39
Damn I don't want to see the code
ohh no
iso
@iso1048
Jun 26 2017 05:41
@adittyagi could apply css property position: fixed
Adit
@adittyagi
Jun 26 2017 05:41
by using class ?
iso
@iso1048
Jun 26 2017 05:44
yeah i guess
Baibhav Gautam
@baibhavx
Jun 26 2017 05:52
Guys I am doing the pomodoro clock project. In order to tick the clock down I am trying to use setTimeout inside a while loop but its not working and the browser freezes. Anyone know whats going on?
Nitin Chandran Nair
@NitinNair89
Jun 26 2017 06:05
probably an infinite loop issue
@baibhavx
Baibhav Gautam
@baibhavx
Jun 26 2017 06:10
@NitinNair89 Thanks but it was not an infinite loop, I used setInterval instead of setTimeout and it worked
CamperBot
@camperbot
Jun 26 2017 06:10
baibhavx sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 448 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Jun 26 2017 06:22
:)
davidjoliver86
@davidjoliver86
Jun 26 2017 06:35
Random Chuck Norris quote generator: https://codepen.io/davidjoliver86/full/wereRq/
Jonah Branch
@JonahBranch
Jun 26 2017 07:11
Hi I have a quick question about the portfolio. I've done cool experiments in three js before joining free code camp, such as a simple generated planet. Would it be appropriate to add these to my portfolio under projects? Should I include a paragraph explaining each one? Or should I keep it simple and brief?
I was thinking about adding them in the page. None of them are on codepen or github either
Jim Tryon
@jimtryon
Jun 26 2017 07:17
@JonahBranch I think it would be a cool portfolio piece to use three.js but explain the project and what solution did it solve if any. A nice size paragraph is good
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 07:21
how can I add a fade in effect to body on loading? codepen link-https://codepen.io/Kshitijaa/pen/PjJzzZ
Jonah Branch
@JonahBranch
Jun 26 2017 07:21
Thanks @jimtryon !
CamperBot
@camperbot
Jun 26 2017 07:21
jonahbranch sends brownie points to @jimtryon :sparkles: :thumbsup: :sparkles:
:cookie: 257 | @jimtryon |http://www.freecodecamp.com/jimtryon
Sarada
@saradasutar
Jun 26 2017 07:23

@saradasutar
Sir, I am new to programming, while learning in freecodecamp I am facing problem in "Use Responsive Design with Bootstrap Fluid Containers" Your div element should have the class container-fluid.
Make sure you have nested all HTML elements in .container-fluid.

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<div> class="container-fluid">

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

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. "></a>

<p>Things cats love:</p>

<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>

<p>Top 3 things cats hate:</p>

<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</div>
I could not understand how to solve it move forward, pl guide

Nathan
@clarken1996
Jun 26 2017 07:24
he does anyone know why my icon will not change size?
Jerard Delrosario
@jrardd
Jun 26 2017 07:24
@KshitijaaJaglan You can use Jquery.
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 07:25
I tried. Can you explain how @jrardd
I have written that code in the js window, but it doesn't work
Jonah Branch
@JonahBranch
Jun 26 2017 07:26
@KshitijaaJaglan I'm not too sure how either but this codepen seems to do a fade in with text. Using keyframes?
Nathan
@clarken1996
Jun 26 2017 07:26
@KshitijaaJaglan sorry what exactly do you want to happen?
there's the codepen I forgot to link. It's not mine
Sarada
@saradasutar
Jun 26 2017 07:26

@saradasutar
Sir, I am new to programming, while learning in freecodecamp I am facing problem in "Use Responsive Design with Bootstrap Fluid Containers" Your div element should have the class container-fluid.
Make sure you have nested all HTML elements in .container-fluid.

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<div> class="container-fluid">

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

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. "></a>

<p>Things cats love:</p>

<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>

<p>Top 3 things cats hate:</p>

<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</div>
I could not understand how to solve it move forward, pl guide

Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 07:27
@clarken1996 I am trying the body to have a smooth fade in effect on loading
@JonahBranch not using keyframes
Baugrems
@Baugrems
Jun 26 2017 07:28
On codepen, how do I tie css styles in? Use the CSS window instead of doing style on html side?
Jerard Delrosario
@jrardd
Jun 26 2017 07:29
@KshitijaaJaglan Did you install Jquery on the Javascript Settings
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 07:29
tried, but didn't help
Jonah Branch
@JonahBranch
Jun 26 2017 07:29
@KshitijaaJaglan have you checked out this page? https://www.abeautifulsite.net/a-clean-fade-in-effect-for-webpages
Baugrems
@Baugrems
Jun 26 2017 07:30
@saradasutar your first div should be above all the other code I think
Jim Tryon
@jimtryon
Jun 26 2017 07:30
@Baugrems CSS window
@Baugrems Codepen separates HTML/CSS/JS
Baugrems
@Baugrems
Jun 26 2017 07:31
Ok, for some reason it doesn't seem to be affecting my page then
Jim Tryon
@jimtryon
Jun 26 2017 07:32
@Baugrems Can you link me to the pen?
Baugrems
@Baugrems
Jun 26 2017 07:36
thanks @jimtryon
CamperBot
@camperbot
Jun 26 2017 07:36
baugrems sends brownie points to @jimtryon :sparkles: :thumbsup: :sparkles:
:cookie: 258 | @jimtryon |http://www.freecodecamp.com/jimtryon
Jim Tryon
@jimtryon
Jun 26 2017 07:36
there you go :)
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 07:37
thanks @JonahBranch thanks @jrardd
CamperBot
@camperbot
Jun 26 2017 07:37
kshitijaajaglan sends brownie points to @jonahbranch and @jrardd :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @jonahbranch |http://www.freecodecamp.com/jonahbranch
:cookie: 123 | @jrardd |http://www.freecodecamp.com/jrardd
Sarada
@saradasutar
Jun 26 2017 07:38
@Baugrems tried by taking div to first line but still it fails to progress, thanks for response
CamperBot
@camperbot
Jun 26 2017 07:38
saradasutar sends brownie points to @baugrems :sparkles: :thumbsup: :sparkles:
:warning: @baugrems's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
Jerard Delrosario
@jrardd
Jun 26 2017 07:39
@KshitijaaJaglan Oh did you figure it out?
Nathan
@clarken1996
Jun 26 2017 07:40
hey guys anyone know why my icon is not bigger? https://codepen.io/ClarkeN/pen/pwWaoo
kirbyedy
@kirbyedy
Jun 26 2017 07:43
@clarken1996 check the image
Screen Shot 2017-06-26 at 10.42.44.png
Jim Tryon
@jimtryon
Jun 26 2017 07:43
@clarken1996 I don’t see anywhere in your code where you made the icon bigger
kirbyedy
@kirbyedy
Jun 26 2017 07:43
he actually made it smaller in that .btn :D
with font-size: 14px
Nathan
@clarken1996
Jun 26 2017 07:44
@jimtryon this should make it bigger <i class= "btn fa fa-4x fa-search animated fadeIn" id="sIcon"><
fa-4x
@kirbyedy .btn is not in my css?
Jim Tryon
@jimtryon
Jun 26 2017 07:44
@clarken1996 Are you reading that from the font awesome documentation?
Nathan
@clarken1996
Jun 26 2017 07:45
yep
@jimtryon usually works that way
Jim Tryon
@jimtryon
Jun 26 2017 07:45
never increased icon size that way, always used css
Nathan
@clarken1996
Jun 26 2017 07:45
@jimtryon it was much bigger until I did something to mess it up
does font-sie effect icon size?
kirbyedy
@kirbyedy
Jun 26 2017 07:45
.btn class is a default bootstrap class, if you dont change it yourself in css it will use the default
which is 14px as I can see
Jim Tryon
@jimtryon
Jun 26 2017 07:46
@clarken1996 Oh, I think I might see it
kirbyedy
@kirbyedy
Jun 26 2017 07:46
you see that I just disabled it, and your icon became much bigger
Nathan
@clarken1996
Jun 26 2017 07:46
@kirbyedy okayyy, I understand
Jim Tryon
@jimtryon
Jun 26 2017 07:46
ok, you need fa-4x as the last class for it to work
also adjust line-height property in CSS
Nathan
@clarken1996
Jun 26 2017 07:48
@kirbyedy so ho do I disable it while keeping is at a button?
@jimtryon does not change if I move the fa-4x
kirbyedy
@kirbyedy
Jun 26 2017 07:49
I was just inspecting the element in the console, and there you can see all the attributes applied to your button element
Jim Tryon
@jimtryon
Jun 26 2017 07:50
I just got it @clarken1996
kirbyedy
@kirbyedy
Jun 26 2017 07:50
you have to assign the size you want in the css section to override the default behaviour
Jim Tryon
@jimtryon
Jun 26 2017 07:50
 <i class= "fa fa-search animated fadeIn fa-4x" id="sIcon"></i>
That code works
Ehsan Shadmehri
@ehsansh
Jun 26 2017 07:51
Hi, I want to do a project with vue-cli and express. Should I separate the back-end and front-end codes? How is the project scaffolding?
Nathan
@clarken1996
Jun 26 2017 07:51
@jimtryon I know that will work.. but it will stop it being a button
@jimtryon @kirbyedy font-size: 100%; works if you place it in the body{}
kirbyedy
@kirbyedy
Jun 26 2017 07:54
@clarken1996 thats just a quick fix, what if you have other buttons in your page that need to be different size ?
Nathan
@clarken1996
Jun 26 2017 07:55
.btn{
font-size: 5em;
}
@kirbyedy
kirbyedy
@kirbyedy
Jun 26 2017 07:55
there you go :)
Jim Tryon
@jimtryon
Jun 26 2017 07:56
you basically have to imitate a button
kirbyedy
@kirbyedy
Jun 26 2017 07:56
and if you want to be more accurate you can use your id sIcon
Jim Tryon
@jimtryon
Jun 26 2017 07:56
to get it to work with font awesome library
Nathan
@clarken1996
Jun 26 2017 07:56
@kirbyedy and if I wanted to add button I would just do #sIcon{
font-size: 5em;
}
kirbyedy
@kirbyedy
Jun 26 2017 07:56
exactly
Nathan
@clarken1996
Jun 26 2017 07:56
add another button^*
Jerard Delrosario
@jrardd
Jun 26 2017 07:57
@KshitijaaJaglan I got it to fade out. But fadeIn doesn't seem to work for me.
Oh well lol

But here it is if you want it

$(document).ready(function() {
$("body").fadeOut("slow");
});

Nathan
@clarken1996
Jun 26 2017 07:58
but there should be a better way really @kirbyedy @jimtryon
kirbyedy
@kirbyedy
Jun 26 2017 07:59
sorry I am not a pro, thats the best I know, and what other way you think would be better ?
Jerard Delrosario
@jrardd
Jun 26 2017 08:02

@KshitijaaJaglan I solved it! Lol

$(document.body).hide();
$(document.body).ready(function() {
$("body").fadeIn("slow");
});

John Ernest Santos
@johsnan1230
Jun 26 2017 08:10
hi im new
im doing "Build a Personal Portfolio Webpage"i dont know where to start
kirbyedy
@kirbyedy
Jun 26 2017 08:12
@johsnan1230 you can start searching the internet for portfolio examples, and try to build something similar
also youtube is very helpful if you search for build portfolio in html
Baugrems
@Baugrems
Jun 26 2017 08:16
I am doing the same one. Just trying to make my own thing with it for now
John Ernest Santos
@johsnan1230
Jun 26 2017 08:24
i know that they recommend not to see the source code of the example page but i notice that on the example code they set the HTML preprocessor to PUG and the CSS to postcss, What are these preprocessors? do i need to do it also?
@kirbyedy thanks for the tip.
CamperBot
@camperbot
Jun 26 2017 08:26
johsnan1230 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 2104 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Baugrems
@Baugrems
Jun 26 2017 08:26
I don't think they expect us to make that exact thing, just something similar
kirbyedy
@kirbyedy
Jun 26 2017 08:27
@johsnan1230 no just use html and css for start, and maybe a bit of jquery
second no one expects you to know all the code from the scratch straight away, you will end up seeing other peoples code, so inspect it analyse it, but dont just copy paste it...
John Ernest Santos
@johsnan1230
Jun 26 2017 08:29
@Baugrems @kirbyedy alright, thanks for the responses. I just got shocked when I browse the example codes. ahaha maybe for now I'll try to make my own even if it is simple.
CamperBot
@camperbot
Jun 26 2017 08:29
johsnan1230 sends brownie points to @baugrems and @kirbyedy :sparkles: :thumbsup: :sparkles:
:cookie: 120 | @baugrems |http://www.freecodecamp.com/baugrems
:warning: johsnan1230 already gave kirbyedy points
Jerard Delrosario
@jrardd
Jun 26 2017 08:31
@johsnan1230 It is a different template of writing HTML with different syntax, kind of like a shortcut for more experienced coders. Like instead of <p>Hello world</p> it would be
p Hello world
Redoy
@redoy786
Jun 26 2017 08:33
@johsnan1230 i have made my portfolio yesterday. Without viewing my source code you can get an idea how i made it without any javascript
Jerard Delrosario
@jrardd
Jun 26 2017 08:33
kaya mo yan pre haha
John Ernest Santos
@johsnan1230
Jun 26 2017 08:34
@jrardd mas maikli ano, ok for now doon muna ako sa basic. thanks par
CamperBot
@camperbot
Jun 26 2017 08:34
johsnan1230 sends brownie points to @jrardd :sparkles: :thumbsup: :sparkles:
:cookie: 124 | @jrardd |http://www.freecodecamp.com/jrardd
John Ernest Santos
@johsnan1230
Jun 26 2017 08:35
@redoy786 ok i'll try to browse it when i get stuck
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 08:35
@jrardd one more help please. Can you please tell why the collapse button is not working here https://codepen.io/Kshitijaa/pen/PjJzzZ when I reduce the screen size
there is the button
but does not expand on clicking
Jerard Delrosario
@jrardd
Jun 26 2017 08:37
@KshitijaaJaglan Ok I'll check it out. Did you see my fix to your fadeIn problem by the way?
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 08:37
ya i did it.
Jerard Delrosario
@jrardd
Jun 26 2017 08:37
Ok awesome
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 08:37
thanks 4 it
Jerard Delrosario
@jrardd
Jun 26 2017 08:46
@KshitijaaJaglan it doesn't look like you coded a dropdown-toggle
and the button over there is working perfectly.
Jerard Delrosario
@jrardd
Jun 26 2017 08:47
so the first toggled you coded was the "collapse"

You have this line:

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">

But there's another one if you scroll down
for "dropdown"
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 08:48
oh thanks a lot @jrardd
CamperBot
@camperbot
Jun 26 2017 08:48
kshitijaajaglan sends brownie points to @jrardd :sparkles: :thumbsup: :sparkles:
:cookie: 125 | @jrardd |http://www.freecodecamp.com/jrardd
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 08:49
no wait
that dropdown is for the page 1
the page 1 link
@jrardd
Kamal
@kpbro
Jun 26 2017 08:59
hello.. i need help in quote machine design
i am using a random quote api, but everytime i click button, it gives only same quote and not random.
abdullahdiriye
@abdullahdiriye
Jun 26 2017 09:17
hi guys
what do u think about my project
Marius Nicolae
@bytao7mao
Jun 26 2017 09:20
@abdullahdiriye looks nice
Adit
@adittyagi
Jun 26 2017 09:32
@abdullahdiriye great
simple and sober
Marius Nicolae
@bytao7mao
Jun 26 2017 09:34
@abdullahdiriye the text overlaps the footer altough, and you should set the text width higher...
Baibhav Gautam
@baibhavx
Jun 26 2017 09:35
Almost done with my Pomodoro Clock project. Can I please get some feedback/suggestions? I want to do a similar animation like the given example where the circle slowly fills up with another color as time ticks by. I have no idea how to do that. Can someone point me to the right direction?
https://codepen.io/baibhavx/pen/KqXBwW
Long Nguyen
@longnt80
Jun 26 2017 09:37
@baibhavx hey man
@baibhavx how do you draw the circle?
Baibhav Gautam
@baibhavx
Jun 26 2017 09:37
hey buddy
border-radius: 100%
on a div
makes it a circle
Long Nguyen
@longnt80
Jun 26 2017 09:38
@baibhavx do you mean fill up the circle like this: https://longnt80.github.io/Pomodoro-clock/
Baibhav Gautam
@baibhavx
Jun 26 2017 09:38
yeah that looks cool too
how did you do that?
Adit
@adittyagi
Jun 26 2017 09:39
What is meta ?
Long Nguyen
@longnt80
Jun 26 2017 09:40
@baibhavx the circle is also just border
Baibhav Gautam
@baibhavx
Jun 26 2017 09:40
but how do you make it to slowly fill up as time ticks?
Long Nguyen
@longnt80
Jun 26 2017 09:40
@baibhavx I use clip to hide half of it
Baibhav Gautam
@baibhavx
Jun 26 2017 09:41
clip?
Long Nguyen
@longnt80
Jun 26 2017 09:41
@baibhavx clip path clip: rect(0, 30em, 30em, 15em);
Baibhav Gautam
@baibhavx
Jun 26 2017 09:41
thanks @longnt80 I'll play around with this
CamperBot
@camperbot
Jun 26 2017 09:41
baibhavx sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 406 | @longnt80 |http://www.freecodecamp.com/longnt80
Adit
@adittyagi
Jun 26 2017 09:42
What is meta ? Completed challenges till portfolio but didn't read meta anywhere.
shivam gupta
@shivamg11000
Jun 26 2017 09:47
can anyone give implementation of shunting yard algorithm in js
Sweet Coding :)
@SweetCodingInc
Jun 26 2017 09:56
// Shunting Yard
Array.prototype.clean = function() {
    for(var i = 0; i < this.length; i++) {
        if(this[i] === "") {
            this.splice(i, 1);
        }
    }
    return this;
}


3
String.prototype.isNumeric = function() {
    return !isNaN(parseFloat(this)) && isFinite(this);
}

function MathSolver() {

    this.infixToPostfix = function(infix) {
        var outputQueue = "";
        var operatorStack = [];
        var operators = {
            "^": {
                precedence: 4,
                associativity: "Right"
            },
            "/": {
                precedence: 3,
                associativity: "Left"
            },
            "*": {
                precedence: 3,
                associativity: "Left"
            },
            "+": {
                precedence: 2,
                associativity: "Left"
            },
            "-": {
                precedence: 2,
                associativity: "Left"
            }
        }
        infix = infix.replace(/\s+/g, "");
        infix = infix.split(/([\+\-\*\/\^\(\)])/).clean();
        for(var i = 0; i < infix.length; i++) {
            var token = infix[i];
            if(token.isNumeric()) {
                outputQueue += token + " ";
            } else if("^*/+-".indexOf(token) !== -1) {
                var o1 = token;
                var o2 = operatorStack[operatorStack.length - 1];
                while("^*/+-".indexOf(o2) !== -1 && ((operators[o1].associativity === "Left" && operators[o1].precedence <= operators[o2].precedence) || (operators[o1].associativity === "Right" && operators[o1].precedence < operators[o2].precedence))) {
                    outputQueue += operatorStack.pop() + " ";
                    o2 = operatorStack[operatorStack.length - 1];
                }
                operatorStack.push(o1);
            } else if(token === "(") {
                operatorStack.push(token);
            } else if(token === ")") {
                while(operatorStack[operatorStack.length - 1] !== "(") {
                    outputQueue += operatorStack.pop() + " ";
                }
                operatorStack.pop();
            }
        }
        while(operatorStack.length > 0) {
            outputQueue += operatorStack.pop() + " ";
        }
        return outputQueue;
    }

}

var ms = new MathSolver();
console.log(ms.infixToPostfix("5 + 3 * 6 - ( 5 / 3 ) + 7"));
salmanshahidau
@salmanshahidau
Jun 26 2017 10:46
Hey, I'm stuck on a exercise where I'm trying to return a value from an object in JavaScript. There is one particular line not working. Here's the full script: https://pastebin.com/BtYzzvgh Essentionally, return contacts[i].prop; //broken here -- i can't return property.
prop is a string input into the function
Silke Frank
@Silkefrank
Jun 26 2017 10:51
I have problems with returning json. For the quote machine i got just one api to work. And now for the weather app I can't get any API to return json. In fact, I don't see if the api returns anything. Code seems to be ok. Because when I enter the url from the quote API it returns json. Any ideas where I can start looking?
Long Nguyen
@longnt80
Jun 26 2017 10:55

@salmanshahidau

return contacts[i].prop;

this is wrong, you have to use bracket notation

salmanshahidau
@salmanshahidau
Jun 26 2017 11:40
@longnt80 Thanks, I got it to work with:
return contacts[i][prop]
I'm not sure if that was the problem though because what was actually happening was that it was returning before completing the full for loop..
CamperBot
@camperbot
Jun 26 2017 11:40
salmanshahidau sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 407 | @longnt80 |http://www.freecodecamp.com/longnt80
Josh Daniell
@joshdaniell
Jun 26 2017 11:47
Anyone got some advice on how I can fix the toCelfunction? I think I'm inadvertently calling it twice (lines 49 and 54), and therefore getting the wrong number. But I'm not sure how to get the temperature variable out of the getWeather function without calling toCel the first time. I'm sure there's a simple way to do this, but I'm a rookie... https://codepen.io/joshdaniell/pen/OggaEO?editors=1010
Ken Haduch
@khaduch
Jun 26 2017 12:01
@joshdaniell - you aren't really calling your toCel function unless you write toCel().
And you don't have a "toggling" function so that you can click and go back to degrees F and back to degrees C.
Kaushal Malkan
@kaushalmalkan
Jun 26 2017 12:19
Can anyone please tell me why my .getJSON function is not working
Ali Abbas
@Abbas-000
Jun 26 2017 12:20
Hi can anyone help me i'm stuck in weather challenge and i am using dark sky weather api and here is the error message i got from the console
XMLHttpRequest cannot load https://api.darksky.net/forecast/2d27af68aae59f3bd5c6e28a4b7ebd85/30.186874099999997,66.96216799999999. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://s.codepen.io' is therefore not allowed access.
Kamal
@kpbro
Jun 26 2017 12:20
hey guys, i need some help . my div element is touching the right edge of screen even after i set margin-right property
Stephen James
@sjames1958gm
Jun 26 2017 12:23
@Abbas-000 If you are using jquery you can add ?callback=? to your URL to tell jquery to use jsonp feature to circumvent cross origin problems
Ken Haduch
@khaduch
Jun 26 2017 12:24
@joshdaniell - I brought it up on the big screen instead of my phone. It looks like you have the initial display of the temperature set up correctly. You are taking the value from data.currently.temperature and writing it to the temperature div. What you're doing after that is not working. What you want to do is save that temperature value (and possibly a different variable where you have converted it to degrees C) as well as a variable that you can use to indicate which of the two you are currently displaying. You have to save those in a "global" variable that will be accessible outside of the getWeather function. Then when the conversion link is clicked, you can select the appropriate value and display it in the temperature div on the screen.
Ali Abbas
@Abbas-000
Jun 26 2017 12:26
@sjames1958gm you mean i should add ?callback=? to the end of URL?
Ken Haduch
@khaduch
Jun 26 2017 12:26
@kaushalmalkan - you are getting an error Mixed Content: The page at 'https://codepen.io/kaushalmalkan/pen/YQrJqa' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.openweathermap.org/data/2.5/weather?lat=18.5670912&lon=73.9548676&appid=cd540e9da9c1bd3171d98b4bfad79fd2'. This request has been blocked; the content must be served over HTTPS. (anonymous) because you are attempting to access the weather API using an http:// url, and CodePen is now forcing https:// access for all pages, so the browser rejects the attempt to open the non-secure page.
There is a recommendation to use the darksky.net API now, because that allows https:// access without a paid account (openweather does support https:// but you have to pay.)
Stephen James
@sjames1958gm
Jun 26 2017 12:27
@kaushalmalkan With codepen going exclusively https, using openweather is problematic because it only provide http free of charge.
Many are switching to darksky API instead
@Abbas-000 Yes after the lat,long
Amal
@AmalReji
Jun 26 2017 12:45
hi, i'm working on challenge 82 and i don't understand what the "i" class is and where to put it. Can anyone help???
Eric Weiss
@eweiss17
Jun 26 2017 12:48
The challenges aren't numbered, that's just how many brownie points you have
Amal
@AmalReji
Jun 26 2017 12:48
oh sorry
Kaushal Malkan
@kaushalmalkan
Jun 26 2017 12:49
@sjames1958gm @khaduch I tried Darksky, but this still isn't working
Amal
@AmalReji
Jun 26 2017 12:49
thanks for telling me though
Stephen James
@sjames1958gm
Jun 26 2017 12:50
@kaushalmalkan if you look at the developer console you will see cross origin errors since you are using jquery you can add ?callback=? to your URL to tell jquery to use jsonp feature to circumvent cross origin problems
@AmalReji Just give the name of the challenge.
Amal
@AmalReji
Jun 26 2017 12:51
@sjames1958gm Thanks, its "Style Text Inputs as Form Controls"
CamperBot
@camperbot
Jun 26 2017 12:51
amalreji sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 7903 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Eric Weiss
@eweiss17
Jun 26 2017 12:51
Are you using fa icons?
Stephen James
@sjames1958gm
Jun 26 2017 12:52
@AmalReji i is an element or tag <i> which means icon
Amal
@AmalReji
Jun 26 2017 12:52
Im just having trouble putting the icon tag into where it says to put it
Like i don't undertand where it wants me to place the line
Kaushal Malkan
@kaushalmalkan
Jun 26 2017 12:53
@sjames1958gm I added it, still no luck
Ali Abbas
@Abbas-000
Jun 26 2017 12:54
@sjames1958gm can you provide link for more information on ?callback=?
Stephen James
@sjames1958gm
Jun 26 2017 12:54
@kaushalmalkan Wow - it is just because there is an extra space after the ?callback=?
@kaushalmalkan delete the space after the last ? and try
Kaushal Malkan
@kaushalmalkan
Jun 26 2017 12:55
@sjames1958gm that's embarrassing. awkwardly walks away
Stephen James
@sjames1958gm
Jun 26 2017 12:56
@kaushalmalkan Well, I wouldn't have imagined that that would have caused any issues . . .
Kaushal Malkan
@kaushalmalkan
Jun 26 2017 12:56
@sjames1958gm thanks though
Ali Abbas
@Abbas-000
Jun 26 2017 12:56
@sjames1958gm site can't be reached i got...
Stephen James
@sjames1958gm
Jun 26 2017 12:56
@kaushalmalkan :+1:
@Abbas-000 I did google on jquery jsonp
Eric Weiss
@eweiss17
Jun 26 2017 12:57
@AmalReji '...within your submit button element.'
this is the directions
Give your form's text input field a class of form-control. Give your form's submit button the classes btn btn-primary. Also give this button the Font Awesome icon of fa-paper-plane.
Ali Abbas
@Abbas-000
Jun 26 2017 12:58
@sjames1958gm :thumbsup:
Amal
@AmalReji
Jun 26 2017 12:59
@eweiss17 is it like this <button type="submit" class="btn btn-primary"<i class="fa fa-paper-plane"></i>>Submit</button>
Eric Weiss
@eweiss17
Jun 26 2017 12:59
you didn't close out the first button
I think that is correct beyond that
Amal
@AmalReji
Jun 26 2017 13:04
Didn't i close it after the i close the icon tag?
Ali Abbas
@Abbas-000
Jun 26 2017 13:04
@kaushalmalkan :+1:
Amal
@AmalReji
Jun 26 2017 13:05
@eweiss17 ^^^^
Ravi Kishore Thella
@ravikishorethella
Jun 26 2017 13:06
@AmalReji missing the > for the <button> tag
@AmalReji <button type = "" class=""><i class=""></i></button>
Amal
@AmalReji
Jun 26 2017 13:07
@ravikishorethella Oh i see
@eweiss17 @ravikishorethella Thanks guys, it worked
CamperBot
@camperbot
Jun 26 2017 13:08
amalreji sends brownie points to @eweiss17 and @ravikishorethella :sparkles: :thumbsup: :sparkles:
:cookie: 498 | @eweiss17 |http://www.freecodecamp.com/eweiss17
:cookie: 852 | @ravikishorethella |http://www.freecodecamp.com/ravikishorethella
Ravi Kishore Thella
@ravikishorethella
Jun 26 2017 13:08
@AmalReji :+1:
Ali Abbas
@Abbas-000
Jun 26 2017 13:12
#123
shivam gupta
@shivamg11000
Jun 26 2017 13:26
can anyone help me with solving a reverse polish notation( postfix expression)
in js
pabloboo
@pabloboo
Jun 26 2017 13:40
Can someone explain me how to make a top menu?
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 13:47
My font Amatic SC is not working here. https://codepen.io/Kshitijaa/pen/PjJzzZ Can anyone please tell me why?
Elliot S.
@SwarmSE
Jun 26 2017 13:52
@KshitijaaJaglan try it without SC in the css
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 13:53
@SwarmSE it didn't work
Eric Weiss
@eweiss17
Jun 26 2017 13:53
what you you mean amatic
it's a font style? mm
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 13:54
thanks @SwarmSE it worked when putting .content h1 instead of .content in the css.
CamperBot
@camperbot
Jun 26 2017 13:54
kshitijaajaglan sends brownie points to @swarmse :sparkles: :thumbsup: :sparkles:
:cookie: 284 | @swarmse |http://www.freecodecamp.com/swarmse
Eric Weiss
@eweiss17
Jun 26 2017 13:55
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 13:56
thanks @eweiss17 its a good reference
CamperBot
@camperbot
Jun 26 2017 13:56
kshitijaajaglan sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 499 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Elliot S.
@SwarmSE
Jun 26 2017 13:56
@KshitijaaJaglan oh ok, good.
@KshitijaaJaglan I usually add them in the HTML <head>
Eric Weiss
@eweiss17
Jun 26 2017 13:57
yes, same
Mohamed Mohamed Said
@MohamedMohamedSaid
Jun 26 2017 13:58
hello everybody
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 13:58
ohhhh
Mohamed Mohamed Said
@MohamedMohamedSaid
Jun 26 2017 13:59
what does <meta charset= "utf-8"> mean?
Eric Weiss
@eweiss17
Jun 26 2017 14:01
it's the set of characters
utf-8 is standard
from google
UTF-8 is a character encoding capable of encoding all possible Unicode code points. The encoding is defined by the Unicode standard, and was originally designed by Ken Thompson and Rob Pike. The encoding is variable-length and uses 8-bit code units.
Ravi Kishore Thella
@ravikishorethella
Jun 26 2017 14:01
@MohamedMohamedSaid check this https://www.w3schools.com/tags/tag_meta.asp
Eric Weiss
@eweiss17
Jun 26 2017 14:02
UTF-8 has been the dominant character encoding for the World Wide Web since 2009, and as of May 2017 accounts for 89.1% of all Web pages.
cumibulat
@cumibulat
Jun 26 2017 14:05
hi all.. i'm working on wikipedia viewer project.. from the sample, it will showing a search result and a short description from the content, is that directly gotten from the API or i should cut the full description into a shorter one ?
Eric Weiss
@eweiss17
Jun 26 2017 14:08
you get it from the api
Trevor Wood
@Tromo21
Jun 26 2017 14:11
When using CodePen, are we supposed to add Bootstrap 3 and 4, or only one or the other?
I added both, which is why I'm asking.
Stephen James
@sjames1958gm
Jun 26 2017 14:12
@Tromo21 Only one or the other, they are mutually exclusive
Ken Haduch
@khaduch
Jun 26 2017 14:12
@Tromo21 - only add one of the two - Bootstrap 3 is what the lessons are based on, I would say use that.
Trevor Wood
@Tromo21
Jun 26 2017 14:12
OK, thanks!
Ken Haduch
@khaduch
Jun 26 2017 14:13
@Tromo21 - you can use Bootstrap 4, but it is in "alpha" release, and you have to take note of the changes that have been made, there are many. A document for the changes is here: https://v4-alpha.getbootstrap.com/migration/
@Tromo21 - it's interesting to just take a look at that document to see what kind of things have changed - as they said it is a "major rewrite"...
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 14:14
can anyone help me out with the parallax effect. Its not working. https://codepen.io/Kshitijaa/pen/PjJzzZ
Trevor Wood
@Tromo21
Jun 26 2017 14:14
Huh, thanks for the info!
Ken Haduch
@khaduch
Jun 26 2017 14:15
@KshitijaaJaglan - misspelling here: background-attachement:fixed;
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 14:16
phew!
thanks @khaduch
CamperBot
@camperbot
Jun 26 2017 14:16
kshitijaajaglan sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3040 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Jun 26 2017 14:17
@KshitijaaJaglan - here is a tip - there is an option "Analyze CSS" (as well as for HTML and JS) on each panel's dropdown at the top right. It will help with some things like that. Also, the "Tidy" options help with indentation, etc. Useful tools to have.
You're welcome!
@Tromo21 - you're welcome...
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 14:19
oooh...
Eric Weiss
@eweiss17
Jun 26 2017 14:27
you can google search for Your language code formatter and paste it in a box to have it come out nice and pretty, very useful
Ken Haduch
@khaduch
Jun 26 2017 14:31
https://codebeautify.org/ - that's a good site for all kinds of languages and other utilities.
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 14:38
how do we vertically align text in center? https://codepen.io/Kshitijaa/pen/PjJzzZ
Eric Weiss
@eweiss17
Jun 26 2017 14:39
i will guess
display: flex;
justify-content: center;
text-align: center;
didn't even look at the pen, I just always see that working
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 14:41
@eweiss17 it aligns it horizontally, but I am trying to vertically align it.
with the code you wrote
Eric Weiss
@eweiss17
Jun 26 2017 14:49
oh, my bad
vertical-align: middle?
instead of the text align
least now you know how to horizontally align
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 14:54
vertical-align:middle! Didn;t help!
Eric Weiss
@eweiss17
Jun 26 2017 14:54
which text is the one u want
hello people or the I'm
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 14:57
the I'm one
@eweiss17 it worked with dis-
display: flex;
height: 100vh;
flex-start: center;
align-items: center;
thanks @eweiss17
CamperBot
@camperbot
Jun 26 2017 14:59
kshitijaajaglan sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 500 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Eric Weiss
@eweiss17
Jun 26 2017 15:00
That is what you wanted?
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 15:00
yup
Eric Weiss
@eweiss17
Jun 26 2017 15:01
thought yo uwanted it to be in the middle
it's still coming from the left
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 15:01
no I just wanted to vertically align it
by d way tnx
Eric Weiss
@eweiss17
Jun 26 2017 15:02
alright. Well the people in /freecodecamp were right, FlexBox is very useful, keep a tab open of it to see when it can help
Kshitijaa Jaglan
@KshitijaaJaglan
Jun 26 2017 15:03
ya those guys resolved it
Varun Pandey
@varun30300
Jun 26 2017 15:18
hey guys , i can solve a rubix cube within 60 sec and my best time is 29 sec , so should i put this in my portfolio ?
AnonimoProgrammatore
@AnonimoProgrammatore
Jun 26 2017 15:23
Hello, why codepen.io ignore my dropdowns?
I tried the code on w3school and there it works
Ken Haduch
@khaduch
Jun 26 2017 15:26
@AnonimoProgrammatore - is there some external library, like jquery or some CSS library that you should be loading to get this to work? w3schools might have things loaded that you aren't loading in codepen.
what is the link to the w3schools page that you are looking at (which lesson)?
Eric Weiss
@eweiss17
Jun 26 2017 15:27
if you can explain how solving a rubix cube relates to programming then go ahead
Nick Sladic
@Nickadiemus
Jun 26 2017 15:30
Has Anybody here completed the FCC Leaderboard project?
Ken Haduch
@khaduch
Jun 26 2017 15:33
@Nickadiemus - I haven't but you should ask your question and those of us here can take a look and try to help...
AnonimoProgrammatore
@AnonimoProgrammatore
Jun 26 2017 15:33
@khaduch thank you, I guess I didn't import jquery
CamperBot
@camperbot
Jun 26 2017 15:33
anonimoprogrammatore sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3041 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Jun 26 2017 15:34
@AnonimoProgrammatore - you're welcome - you have to make sure to get the setup that is required. Glad that you got it to work!
Nick Sladic
@Nickadiemus
Jun 26 2017 15:36
@khaduch It's probably a simple question that I simply cannot figure out but does anybody know how to pass down data from one component to another in React?
AnonimoProgrammatore
@AnonimoProgrammatore
Jun 26 2017 15:36
@khaduch OK, resolved (I was using bootstrap's css but not js)
Toiya
@Toiya
Jun 26 2017 15:36
format?
Nick Sladic
@Nickadiemus
Jun 26 2017 15:36
Or maybe have a child component inherit a function from a parent
Ken Haduch
@khaduch
Jun 26 2017 15:37
@Toiya - what are you asking for - the code formatting syntax?
Ali Abbas
@Abbas-000
Jun 26 2017 15:37
Hi can anyone help me I am on weather challenge and I used dark sky weather api and how to detect location of the user by dark sky api?
Toiya
@Toiya
Jun 26 2017 15:37
var hello = "Hello world";
Ken Haduch
@khaduch
Jun 26 2017 15:38
@Toiya - looks like you got it - the forum article is here: https://forum.freecodecamp.com/t/markdown-code-formatting/18391
Toiya
@Toiya
Jun 26 2017 15:38
//html
<div id="aboutPage"></div>
<div class="container-fluid">
  <div class="page-header">
    <nav class="navbar navbar-default">
      <a href="#aboutPage" class="btn btn-default">About</a>
      <a href="#" class="btn btn-default">Portfolio</a>
      <a href="#" class="btn btn-default">Contact</a>
    </nav>
    <h1>Laurin</h1>
  </div>
</div>

//css
.page-header {
  border: solid 1px #000;
  margin: 1.2em;
  background-color: #000;
  opacity: 0.6;
  color: #fff;
  font-family: Quicksand, sans-serif;
  padding: 1.2em;
  overflow: hidden;
  position: fixed;
  width: 94%;
  display: inline-block;
}

.page-header > h1 {
  float: left;
  border: solid 1px red;
}

.container-fluid {
  padding: 1.2em;
  background-image: url(https://cdn.pixabay.com/photo/2017/04/12/19/06/lighthouse-2225445_960_720.jpg);
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 100%;
  height: 800px;
}

.navbar {
  border: solid 1px #00f;
  width: 50%;
  margin-left: 50%;
  float: right;
  display: inline;
  text-align: center;
}

.navbar > a {

}
Hello, I'm working on my personal portfolio but I'm having some problems. I want the "logo" and the buttons on the right in the navbar to stay on the same height, but I just can't make it work (Also the codepen is here: https://codepen.io/Johju/pen/dXaBxd?editors=1100)
Nick Sladic
@Nickadiemus
Jun 26 2017 15:38
@Abbas-000 Have you figured out how to ask permission for geolocation
Toiya
@Toiya
Jun 26 2017 15:39
Yeah, thanks @khaduch :)
CamperBot
@camperbot
Jun 26 2017 15:39
toiya sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3042 | @khaduch |http://www.freecodecamp.com/khaduch
Ali Abbas
@Abbas-000
Jun 26 2017 15:40
@Nickadiemus I used the geolocation but i don't understand its json format
Nick Sladic
@Nickadiemus
Jun 26 2017 15:41
@Abbas-000 So you have successfully made the API call and it is return the JSON format?
Ali Abbas
@Abbas-000
Jun 26 2017 15:41
Yeah @Nickadiemus
@Nickadiemus check out the link .... I didn't see the location in json
Nick Sladic
@Nickadiemus
Jun 26 2017 15:46
@Abbas-000 So what I would suggest is where ever you made the ajax call. Console log the data that is returned and then figure out where in the JSON file you need to navigate for your information you need
does that ake sense?
*make
@Abbas-000 do you make a ajax request?
Ken Haduch
@khaduch
Jun 26 2017 15:48
@Toiya - I would recommend
  • switch to Bootstrap 3 (that is what the lessons are based on)
  • go to the Bootstrap documentation pages and get the sample code for the navbar, and use that to start, modify it as you need. https://getbootstrap.com/components/#navbar is the page.
Ali Abbas
@Abbas-000
Jun 26 2017 15:49
@Nickadiemus everything is fine but what I want is that I want to see my current location like (json.location = my current location)
Mohamed Mohamed Said
@MohamedMohamedSaid
Jun 26 2017 15:52
what does meta charset=utf8 mean?
Shawn Kelly
@stuffedmunkey
Jun 26 2017 15:58
please help me, my quote generator is not grabbing from the api properly, says request has been blocked
Nick Sladic
@Nickadiemus
Jun 26 2017 15:59
@Abbas-000 I'm not seeing it either in the example callback they give. Do you have your codepen?
Ali Abbas
@Abbas-000
Jun 26 2017 16:00
@stuffedmunkey your first mistake is that you forgot to put (#) before your button id in jQuery
Shawn Kelly
@stuffedmunkey
Jun 26 2017 16:02
@Abbas-000 are these the lines you are refering too? $(document).ready(function() {
$("#butt").on("click", function(){
Ali Abbas
@Abbas-000
Jun 26 2017 16:06
@stuffedmunkey Oh sorry I meant that $(".quote")...... you forgot to put a (.)
Nick Sladic
@Nickadiemus
Jun 26 2017 16:07
@Abbas-000 Did you figure it out?
Ken Haduch
@khaduch
Jun 26 2017 16:08
@stuffedmunkey - you have an error: (unknown) Mixed Content: The page at 'https://codepen.io/Stuffedmunkey/pen/YQNYpg' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback='. This request has been blocked; the content must be served over HTTPS. Try to use https:// for your access to the quote API.
Ali Abbas
@Abbas-000
Jun 26 2017 16:10
@Nickadiemus still not. If I use json.timezone is will return an other city name in my country
Ken Haduch
@khaduch
Jun 26 2017 16:11
@stuffedmunkey - then you have to use $('.quote') to load the quote - but still something else that isn't working there. (Originally had #quote, but then I noticed you had that as a class, so $(".quote") works then.)
Nickunj Chopra
@nickunjchopra
Jun 26 2017 16:19

Hey guys! https://codepen.io/nickunjchopra/pen/aWroLV

I need some help with the Twitch.tv API project, and I've been scratching my head thinking what's gone wrong for the better part of 2 days. I've searched Google and read up on as many Stack Overflow questions I could find, but to no avail.

As far as I know, my app is working fine, but I'm getting Cross Origin errors. I'm using the URL provided in the challenge (https://wind-bow.gomix.me/) but I'm getting the error -

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://wind-bow.gomix.me/twitch-api/channels/ESL_SC2?_=1498493464143. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

If someone could please point me in the right direction as to what is causing this, and how I could possibly solve it, I'd be more than glad to follow up on it.

EDIT: Please open the CodePen in a separate window and check the console to see the errors. I'm using Firefox 54.0 (32-bit). :)

Toiya
@Toiya
Jun 26 2017 16:21
Thanks again @khaduch
CamperBot
@camperbot
Jun 26 2017 16:21
toiya sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: toiya already gave khaduch points