These are chat archives for FreeCodeCamp/HelpFrontEnd

7th
Jun 2016
JD Tadlock
@jdtdesigns
Jun 07 2016 00:00
but if someone visits with http, then it doesn't work
so you have choices, but chrome is limiting those choices for security reasons
Greg Duncan
@GregatGit
Jun 07 2016 00:01
@tuliodnw what is arr = [, , , , , , , , , ];
Eric Bezanson
@ericbezanson
Jun 07 2016 00:01
@jdtdesigns is right about everything said over the last 5 mins
Tulio Natale
@tuliodnw
Jun 07 2016 00:02
@GregatGit to check the if tie i was using arr.indexOf(undefined)!==-1, but if i start the game with arr[0], the array wont find undefined and will tie the game
Eric Bezanson
@ericbezanson
Jun 07 2016 00:02
thanks @jdtdesigns
CamperBot
@camperbot
Jun 07 2016 00:02
ericbezanson sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 446 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Tulio Natale
@tuliodnw
Jun 07 2016 00:02
@GregatGit so thats for that
Eric Bezanson
@ericbezanson
Jun 07 2016 00:02
:D
David
@Nachlawi
Jun 07 2016 00:02
@jdtdesigns Is there a way to do a check:
if (http){
  redirect to https://codepen.io/...
}
Greg Duncan
@GregatGit
Jun 07 2016 00:04
@tuliodnw it looks terrible - what aboutif (arr.length > 0) then check
Tulio Natale
@tuliodnw
Jun 07 2016 00:05
@GregatGit much better, didnt think of that one
Greg Duncan
@GregatGit
Jun 07 2016 00:06
@tuliodnw and why are you calling it arr? Give it a meaningful name usedPositions or something that makes it clear
Tulio Natale
@tuliodnw
Jun 07 2016 00:07
@GregatGit yeah i normally do that, but because its the only array , i didnt do it, fixing it
Greg Duncan
@GregatGit
Jun 07 2016 00:09
@tuliodnw to empty an arr you can go arr.length = 0;
Tulio Natale
@tuliodnw
Jun 07 2016 00:10
is arr=[]; bad? i do that allways
@GregatGit
Greg Duncan
@GregatGit
Jun 07 2016 00:11
@GregatGit I think that is ok, too
@tuliodnw arr.indexOf(undefined) ?? your passing undefined as a parameter?
Tulio Natale
@tuliodnw
Jun 07 2016 00:14
@GregatGit its to check if the button is taken if i click it again
JD Tadlock
@jdtdesigns
Jun 07 2016 00:41
@Nachlawi The problem is codepen loads the code in an iframe, so it's like a seperate page. You can't redirect the actual codepen url because of that. ;/
Daniel
@clevadani
Jun 07 2016 00:47
Still trying to figure out how to make my for loop loop through my array one after the other and not at the same time in my simon game
Greg Duncan
@GregatGit
Jun 07 2016 01:01
@clevadani they can't go at the same time - js can only run one thing at time - it might feel at the same time cause it is so quick
@clevadani Were you having a delay?
Micah Bales
@micahbales
Jun 07 2016 01:03
A little mystery I'm trying to solve. On JS lines 17-22, I'm attempting to console.log() each point in the array after a 1 second delay. Instead, it's just returning undefined. Any thoughts on where I'm going wrong? http://codepen.io/micahbales/pen/MegRqm?editors=0010
刘增辉
@liuzenghui2007
Jun 07 2016 01:08
Hi all! I encounter a strange problem when I use var audioPlayer=new Audio(); audioPlayer.play(); sometimes the brower console display "script.js:11 Uncaught (in promise) DOMException: The play() request was interrupted by a new load request."
Can some one help me?
Daniel
@clevadani
Jun 07 2016 01:10
@GregatGit no delay
Nicolas May
@hynso
Jun 07 2016 01:10
How do you store an array of JSON objects and then access them one by one? I've used this SO advice, but I'm not sure how I can use localStorage.removeItem() to remove just one object in the array after it's been stringified and parsed
Daniel
@clevadani
Jun 07 2016 01:11
@GregatGit how do I delay it?
Connor Hastey-Palindat
@cpalindat
Jun 07 2016 01:33
Can anyone help me with getting two divs side by side? http://codepen.io/cpalindat/pen/EyjeJZ
I can't get the logo and the game title side by side in this, im trying to use inline block?
Greg Duncan
@GregatGit
Jun 07 2016 01:39
@clevadani When i looped through I used a setTimeout but made sure the delay kept increasing with each loop
Daniel
@clevadani
Jun 07 2016 01:40
@GregatGit ok. Lemme try it out
Greg Duncan
@GregatGit
Jun 07 2016 01:40
@micahbales console.log(par); where is par defined?
@micahbales I see you have it working now
Greg Duncan
@GregatGit
Jun 07 2016 01:45
@ConnHurr which 2 divs
Stephen
@stephepush
Jun 07 2016 01:46
anyone want to partner up? I'm working on the return largest number in arrays algo
max77p
@max77p
Jun 07 2016 02:20
quick question
how can we call an external function inside a success json function?
can someone give me an easy example please?
soo something like this
```success: function(data) {
};```
i need to pass data into an external function sitting outside the json call
Larry Tseng
@LTSENG01
Jun 07 2016 02:42
Could someone review my web portfolio? Thanks! https://codepen.io/LTSENG01/full/LZEgNB/
Any feedback is appreciated!
Aata-allah
@Atalaa
Jun 07 2016 02:44
Hello guys i have a situation
how can i fit my picture
Larry Tseng
@LTSENG01
Jun 07 2016 02:45
@Atalaa try using width=100% (play around with values) for the css of the image
max77p
@max77p
Jun 07 2016 02:45
@Atalaa yea same as what larry said. Also what are you trying to do with the picture center it?
Aata-allah
@Atalaa
Jun 07 2016 02:46
i ts my first project i dont have to use css, only with bootstrap, i put an container-fluid class but doesnt fit
Larry Tseng
@LTSENG01
Jun 07 2016 02:48
@Atalaa css i believe is the best option in this case
max77p
@max77p
Jun 07 2016 02:50
@Atalaa you might wanna look up bootstrap documentation...remember when you using col-xs- or whatever you need a row class above that
Aata-allah
@Atalaa
Jun 07 2016 02:50
im not allowing to use css, on the solution Quency dont use css
@max77p yes i put class row now but doens work neither
check that out
@Atalaa remember to go in order, you forgot the header tags as well..get used to creating it as if you were creating from scratch on notepad or something..otherwise when you have to create from scratch in work environment you will forget the easy stuff
hope that helps, play around with it and see what works for you
Max Goodman
@maxgrok
Jun 07 2016 02:58
Hi, I'm Max. I'm new to Free Code Camp. I'm working on the Tribute Page and am having a little bit of trouble. Someone willing to help?
And/or show me their tribute page?
Aata-allah
@Atalaa
Jun 07 2016 03:00
@max77p oh shout, i forget header sorry
@Atalaa but looks like there is still the problem
max77p
@max77p
Jun 07 2016 03:00
it centered the image for me
i had to hit run though
not sure for you
Vince
@Vince33
Jun 07 2016 03:03
@Atalaa you may want to check on your image make sure it is not spilling out of its containing div
here i forked it
Aata-allah
@Atalaa
Jun 07 2016 03:04
@max77p i used jumbotron instead of header
oh i get it
@max77p thank u
CamperBot
@camperbot
Jun 07 2016 03:04
atalaa sends brownie points to @max77p :sparkles: :thumbsup: :sparkles:
:cookie: 338 | @max77p |http://www.freecodecamp.com/max77p
owenkosnen
@owenkosnen
Jun 07 2016 03:17
can someone help me with the tribute page?
I don't know how to make the bullet points align, they look messy
Also the quote and some sentences below should be aligned to the left.. don't know how to do it
Max Goodman
@maxgrok
Jun 07 2016 03:21
I used Bootstrap to align the ul. Place it into a div with a class of row, then a second div with the class of "col-md-6 col-md-offset-3". This centered the ul for me. Hope that helps.
The second div is nested inside of the div with the class of row.
You could make a separate div with class of row for the quote, nested inside another div with the class ="col-md-6 col-md-offset-3", then use text-align:left; in your CSS.
Sanchit Dhiman
@sanchit13
Jun 07 2016 03:24
If you want a navigation bar on a site to stay where it is on the screen regardless of wherever you are on the page, is that simply accomplished by setting the navigation bar's position to fixed/
?
Max Goodman
@maxgrok
Jun 07 2016 03:25
If you're using Bootstrap, here is an example of a sticky Navbar: https://getbootstrap.com/examples/navbar-fixed-top/
Justin
@jhadams82
Jun 07 2016 03:26
hello hello hello
can anybody help me with the geolocation stuff? working on the weather API, but apparently I can't do geolocation in codepen cuz it's not HTTPS?
sound familiar?
what's extra weird is i could swore it worked earlier today. now i'm gettin that console message says it's depreciated
owenkosnen
@owenkosnen
Jun 07 2016 03:29
@maxgrok I get it now, Thanks!
CamperBot
@camperbot
Jun 07 2016 03:29
owenkosnen sends brownie points to @maxgrok :sparkles: :thumbsup: :sparkles:
:cookie: 2 | @maxgrok |http://www.freecodecamp.com/maxgrok
Sorin Ruse
@sorinr
Jun 07 2016 03:32
@jhadams82 yep. it sounds familiar to me. try make all the calls https including https://codepen.io . Here is my pen for weather app: https://s.codepen.io/sorinr/debug/xOGdYz
Justin
@jhadams82
Jun 07 2016 03:33
nice! thanks @sorinr quick fix
CamperBot
@camperbot
Jun 07 2016 03:33
jhadams82 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 321 | @sorinr |http://www.freecodecamp.com/sorinr
Justin
@jhadams82
Jun 07 2016 03:34
i must've been using https earlier today and not realized =)
Sorin Ruse
@sorinr
Jun 07 2016 03:38
@jhadams82 unfortunately, if you are going to use http://openweathermap.org/ you cannot do it over https. I've quickly put a php file on my server and make the call to this file. you are free t use my "api" but you can pass only lat and lon as parameters
Justin
@jhadams82
Jun 07 2016 03:39
actually, i decided to go with weather underground
Sorin Ruse
@sorinr
Jun 07 2016 03:46
@jhadams82 i saw they have a 10 calls per minute limit for the free plan. i would recommend to save the returning json to your app until fully designed and tested and make real calls after
Justin
@jhadams82
Jun 07 2016 03:46
hm.. yeah. i wonder what happens after 10 per minute?
i never gave them any credit card info or anything. surely they just deny the request
Sorin Ruse
@sorinr
Jun 07 2016 03:49
@jhadams82 you are limited to 500 calls per day but no more then 10/minute. that's why i would grab the json from my first call and add it to a variable in my js part. then test and test and design and when everything is ready i just start making calls to that api
@jhadams82 also, check the api if its working on https
Justin
@jhadams82
Jun 07 2016 03:53

yeah, i get what you're saying. but i'm using codepen. guess i could work on it offline then copy/paste into codepen when i'm done. but that kinda defeats the purpose of codepen.

10/minute is a call ever 6 seconds. that should be plenty, right?

yeah, it's working now that i'm using https
you've got me all worried now, lol
Aata-allah
@Atalaa
Jun 07 2016 03:54
Hello boys, i dont understand why my picture is not center. And why my caption background doesnt fit my picture size please
https://codepen.io/Atalaa/pen/zBGXVo?editors=1100
My bad i just refresh and everythongs was ok
Sorin Ruse
@sorinr
Jun 07 2016 03:57
@Atalaa add this class to your img: full-width then in the css make it width:100%
Aata-allah
@Atalaa
Jun 07 2016 03:58
i think its ok i just refresh
Sorin Ruse
@sorinr
Jun 07 2016 04:00
@Atalaa you probably saw my changes. but you have to do it yourself
Aata-allah
@Atalaa
Jun 07 2016 04:02
@sorinr i didnt use your changes, i kept my code but i refresh and everythings come back to the normal, maybe somtetimes i need to refresh mores because it works in this specific case
Justin
@jhadams82
Jun 07 2016 04:03
oh wow, yeah, i'm gonna hit my limit on API calls, i bet. every time i type anything it runs... hmm....
Sorin Ruse
@sorinr
Jun 07 2016 04:04
@jhadams82 told u. grab the json from the last call and put it in a variable. then use that var for the testing
Justin
@jhadams82
Jun 07 2016 04:04
ok, i see what you mean, now. yeah, i'm gonna have to just save one of the responses in a variable. thanks @sorinr
CamperBot
@camperbot
Jun 07 2016 04:04
:warning: jhadams82 already gave sorinr points
jhadams82 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
Justin
@jhadams82
Jun 07 2016 04:05
i was afraid you meant completely offline, but i get it now
Aata-allah
@Atalaa
Jun 07 2016 04:05
Thank Sorin
Sorin Ruse
@sorinr
Jun 07 2016 04:06
@jhadams82 yep. but delete the link to the api for the moment.
Justin
@jhadams82
Jun 07 2016 04:06
gotcha
Wayne Bunch
@waynebunch
Jun 07 2016 04:24
Can someone give me an idea on how I could get this dang search bar to be used more than once? After the initial search, I can't use it again until I reload the page. I'm not finding anything, anywhere. I've tried to .remove but it just gets rid of the div's, nothing else.
http://codepen.io/waynebunch/pen/QEbaNJ
btw it does show the results in console.log, it's just not showing in the html
Sorin Ruse
@sorinr
Jun 07 2016 04:34
@waynebunch get that function out of the doc ready
skilescm
@skilescm
Jun 07 2016 04:36
@waynebunch , couldn't seem to find a f**kbutton either, did you rename in your html and not update the JS?
Wayne Bunch
@waynebunch
Jun 07 2016 04:36
haha..whoops meant to delete that
@sorinr If I move it outside it doesn't work.
rahildar
@rahildar
Jun 07 2016 04:45
This message was deleted
This message was deleted
@waynebunch simply invoke a function on go where in you make an ajax call to api and replace the content in your html
Sorin Ruse
@sorinr
Jun 07 2016 04:51
@waynebunch getInput function put it out of doc ready
Leo Sizaret
@Bungou
Jun 07 2016 04:52
Hello, I'm having trouble with my Navbar D: http://codepen.io/Bungou/pen/dXoJxm?editors=1100 when I remove .nav { color: white;
the navbar loses its other css properties...why is that?
  • the color: white; doesn't even do anything. I'm lost X_X
Wayne Bunch
@waynebunch
Jun 07 2016 04:56
@sorinr I tried that, but then the whole thing doesn't work. I'm assuming it's because my input var is out of scope
@rahildar - so you're saying I should just run my code in the success function?
rahildar
@rahildar
Jun 07 2016 05:00
@waynebunch i think the problem is with the event listner
Sanchit Dhiman
@sanchit13
Jun 07 2016 05:01
  <body>
      <div class="container-fluid" id ="backgroundImage">
        <div class="introduction">
          <h1>Hi, my name is Sanchit.</h1>
        </div>
      </div>
  </body>
#backgroundImage{
  background-image: url(https://images.unsplash.com/photo-1454897834822-1ece264a5d89?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=3a5615c0bc77123ece2a2663e2640341);
  background-position:bottom;
  background-size:cover;
  background-repeat: no-repeat;
  height:800px;
  position:relative;
}


.introduction{
  position:absolute;
  top:50%;
  left:25%;
  font-family: Raleway, sans-serif;
  color:white;
}
Wayne Bunch
@waynebunch
Jun 07 2016 05:01
@rahildar ah..I should find another way to get my input
Sanchit Dhiman
@sanchit13
Jun 07 2016 05:02
For that code, why isn't my introduction recognizing the backgroundImage div as it's parent?
whenever i try positioning the introduction div, it moves it relative to the body, not relative to the backgroundImage div.
Sorin Ruse
@sorinr
Jun 07 2016 05:02
@waynebunch why do you need doc ready? i would add an onclick="getInput" to the button and an onkeyup="myFunction()" to the input
Wayne Bunch
@waynebunch
Jun 07 2016 05:04
@sorinr good question, just thought it was necessary
@sorinr but I see where you're going with this..thank you
Sorin Ruse
@sorinr
Jun 07 2016 05:07
@waynebunch welcome
UtkarshShukla7
@UtkarshShukla7
Jun 07 2016 05:08
@sanchit13 because introduction is positioned absolute
Sanchit Dhiman
@sanchit13
Jun 07 2016 05:09
@UtkarshShukla7 it should still be relative to the parent, shouldn't it?
Sorin Ruse
@sorinr
Jun 07 2016 05:10
@waynebunch i see now's working
UtkarshShukla7
@UtkarshShukla7
Jun 07 2016 05:10
@sanchit13 no introduction shoulg have position:relative
Wayne Bunch
@waynebunch
Jun 07 2016 05:11
@sorinr the initial search still works. But if I change input and search again nothing happens. I'm still trying to think what the myFunction() would be doing on keyup
UtkarshShukla7
@UtkarshShukla7
Jun 07 2016 05:11
@sanchit13 position : absolute should place it relative to body and not backgroundImage
Sanchit Dhiman
@sanchit13
Jun 07 2016 05:12
@UtkarshShukla7 Do I need position:relative in the backgroundImage div?
Sorin Ruse
@sorinr
Jun 07 2016 05:13
@waynebunch the problem its here $('#searchFor').keypress(function(e). told you. my Function() its just a generic name. change it to your name
UtkarshShukla7
@UtkarshShukla7
Jun 07 2016 05:13
@sanchit13 yes and introduction position :relative
also try this if doesn't works backgroundImage positioned absolute and introduction position relative
@sanchit13 I have to go now sorry
Arabh Mehta
@ArabhMehta
Jun 07 2016 05:16
hello evry 1 i m new i just started learning code and i stuck
Sorin Ruse
@sorinr
Jun 07 2016 05:17
@waynebunch why not calling onkeyup your getInput function?
rahildar
@rahildar
Jun 07 2016 05:21
@waynebunch i got it ..
the new html will now get appended just little modification to get the old one replaced
hope it helps
Sorin Ruse
@sorinr
Jun 07 2016 05:24
@waynebunch and get rid off all other stuff that's preventing the behavior you want. I could fork your pen to show you how but i consider it would not help you for learning
Wayne Bunch
@waynebunch
Jun 07 2016 05:24
@rahildar good one! thanks
CamperBot
@camperbot
Jun 07 2016 05:24
:cookie: 173 | @rahildar |http://www.freecodecamp.com/rahildar
waynebunch sends brownie points to @rahildar :sparkles: :thumbsup: :sparkles:
Wayne Bunch
@waynebunch
Jun 07 2016 05:25
@sorinr I like the onkeyup=getInput idea. It stalls after I enter the first two letters though
rahildar
@rahildar
Jun 07 2016 05:25
@waynebunch clear previous html .. $('.wikiInfo').html("");
Sorin Ruse
@sorinr
Jun 07 2016 05:26
@waynebunch that's because you are overriding events. onkeyup will work as a live search
rahildar
@rahildar
Jun 07 2016 05:27
@waynebunch instead of having a key press event you can simply add event on submit button and depending upon the input in input box you can get the result so no need of key press event ..
Wayne Bunch
@waynebunch
Jun 07 2016 05:31
@rahildar works perfectly, thanks!
CamperBot
@camperbot
Jun 07 2016 05:31
waynebunch sends brownie points to @rahildar :sparkles: :thumbsup: :sparkles:
:warning: waynebunch already gave rahildar points
Wayne Bunch
@waynebunch
Jun 07 2016 05:32
@sorinr I like this keypress idea so I commented out all the extra non needed. It still freezes up while doing the live search. http://codepen.io/waynebunch/pen/QEbaNJ
Sorin Ruse
@sorinr
Jun 07 2016 05:34
This message was deleted
Sorin Ruse
@sorinr
Jun 07 2016 05:40
@waynebunch onkeyup you should clear first previous search results and after that append the new search results
Wayne Bunch
@waynebunch
Jun 07 2016 05:43
@sorinr @rahildar thanks for all your help, I see what I need to do, more or less. I need some sleep maybe it will come to me haha
CamperBot
@camperbot
Jun 07 2016 05:43
waynebunch sends brownie points to @sorinr and @rahildar :sparkles: :thumbsup: :sparkles:
:warning: waynebunch already gave rahildar points
:cookie: 322 | @sorinr |http://www.freecodecamp.com/sorinr
Le Twitch
@notalkingplz
Jun 07 2016 06:17

http://codepen.io/letwitch/pen/VjvPQw?editors=1100

Because the img has flex-shrink: 0; on it, when the browser width gets smaller, the text on the right gets pushed out of it's container. Any way to fix?

Shusil Banjade
@shusil123
Jun 07 2016 07:49
@notalkingplz , You can use media queries with max-width . I see, you did it with min-width. Instead of using flex display you can use inline-block too. I don't see why inline-block won't work...
Le Twitch
@notalkingplz
Jun 07 2016 07:53
@shusil123 The container has a min-width: 0; so that text-overflow works. The text needs to be a block element for text-overflow to work
Shusil Banjade
@shusil123
Jun 07 2016 07:57
@notalkingplz , you need to reconstruct your code to work as intended. Give display flex to the main container, which has 3 elements , image and two text blocks. Then, using media queries you can make them responsive or use, flex-wrap: wrap; ....
Justin
@jhadams82
Jun 07 2016 08:31
just "finished" the weather api project. it seems to work as intended, but boy is the code ugly. https://codepen.io/jhadams82/full/YWXbMb/
i had to go in and adjust the css positioning of the inner divs by the pixel just to get them to line up right. it was crazy, but whatever. there must be something I don't understand about positioning
what do yall think?
kirbyedy
@kirbyedy
Jun 07 2016 08:41
@jhadams82 small problems here
Screen Shot 2016-06-07 at 11.41.17.png
Shusil Banjade
@shusil123
Jun 07 2016 08:41

@jhadams82 , It's cool and the functionality is perfect. But the text "Partly cloudy" (in my location) still jumps out of the box and the box is also not aligned in line...

Otherwise, cool work...

Checked it in firefox @jhadams82
Yes, exactly like the screenshot above
Sorin Ruse
@sorinr
Jun 07 2016 08:45
@jhadams82 try to align inner holder divs to accommodate same height . use a div class row and then divs class col for your divs holding class inner holder
Yaroslav
@YVeselovskyi
Jun 07 2016 09:15
does IE 11 support getElementsByName??
chetanmahore
@chetanmahore
Jun 07 2016 09:20
hello
how do i get example text below border line
Shane
@scucow
Jun 07 2016 09:30
Screen Shot 2016-06-07 at 11.28.50 AM.png
hi Campers! My code for the Sum All Odd Fibonacci Numbers algorithm challenge is crashing my browsers, and I can't figure out why! Can anyone tell me what is going on?
Thanks in advance for the assist
Shusil Banjade
@shusil123
Jun 07 2016 09:45
@chetanmahore , Example text is below the border line, In firefox... And you are editing it.
I can see the refresh
Nate Mamman
@oiclid
Jun 07 2016 09:49
Just finished my portfolio
Look at it here
*at it here
Shusil Banjade
@shusil123
Jun 07 2016 09:50
@scucow , maybe currentNum is reset to 1 after each loop. Use for loop instead..

@oiclid , Very nice positioning . Looks cool. Maybe , add smoothscroll to different sections when clicking to nav. And the background image of landing page isn't that satisfying. Try some dark images with white text. Only my opinions, though.

Cool work...

Nate Mamman
@oiclid
Jun 07 2016 10:02
ok
@shusil123 ok. Thanks. I'll try that and see what if it looks better
CamperBot
@camperbot
Jun 07 2016 10:04
oiclid sends brownie points to @shusil123 :sparkles: :thumbsup: :sparkles:
:cookie: 352 | @shusil123 |http://www.freecodecamp.com/shusil123
Ahmad Jamaly Rabib
@rabibsust
Jun 07 2016 10:04
Hi all. How to create or get API for random quote generator?
Nguyễn Quốc Đại
@nqdai1992
Jun 07 2016 10:13
@rabibsust you can read it in link: http://quotesondesign.com/api-v4-0/
ottomahn
@ottomahn
Jun 07 2016 10:17
guys need help
I guess there is some problem with float
property
I need the buttons(4,5,6) to use the space left out by the equals button'
Shusil Banjade
@shusil123
Jun 07 2016 10:24
@ottomahn , do not use float , Use display: flex; instead. But first read the documentation about flex display. And if you want to use float, you have to give specific class to those buttons and set their width accordingly...
ottomahn
@ottomahn
Jun 07 2016 10:32
@shusil123 ok lemme check .... thanks anyways:)
CamperBot
@camperbot
Jun 07 2016 10:32
ottomahn sends brownie points to @shusil123 :sparkles: :thumbsup: :sparkles:
:cookie: 354 | @shusil123 |http://www.freecodecamp.com/shusil123
Shane
@scucow
Jun 07 2016 10:56
@shusil123 thanks, I'll try that! (As soon as I can find a way to get the challenge to load without pre-loading the code that automatically crashes the browser :/ )
CamperBot
@camperbot
Jun 07 2016 10:56
scucow sends brownie points to @shusil123 :sparkles: :thumbsup: :sparkles:
:cookie: 355 | @shusil123 |http://www.freecodecamp.com/shusil123
Shane
@scucow
Jun 07 2016 11:16
thanks @kirbyedy
CamperBot
@camperbot
Jun 07 2016 11:16
scucow sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1070 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
sentedelviento
@sentedelviento
Jun 07 2016 12:06
Hey, can anyone tell me why my Facebook link is broken?
Greg Duncan
@GregatGit
Jun 07 2016 12:14
@sentedelviento what line in the js is ment to fire when you click the button?
@sentedelviento this isn't 100% but is close
<a href="https://www.facebook.com/sharer/sharer.php?u=http://codepen.io/sentedelviento/full/wGjzZx/" target="_blank">
<button class="btn fa fa-facebook" >
</button>
</a>
Greg Duncan
@GregatGit
Jun 07 2016 12:19
I think you should have the button wrapped in the a href="facebookstuff"
Sorin Ruse
@sorinr
Jun 07 2016 12:20
@sentedelviento I would make my <a> tag class "btn fa fa-facebook" href="blabla bla" . no need for button tag. or if you want to keep button tag add an onclick="posttofb()" to your tag and in js create a function posttofb() to do whatever want
mjdude
@mjdude
Jun 07 2016 12:35
Hi everyone, quick question. Is anyone using a css framework with react. I'm finding the configuration tricky for bootstrap (webpack,react, bootstrap4)
Doomflake
@Doomflake
Jun 07 2016 12:40
Does anyone know how to get scrollspy to work right?
sentedelviento
@sentedelviento
Jun 07 2016 12:40
Thanks @sorinr
CamperBot
@camperbot
Jun 07 2016 12:40
sentedelviento sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 324 | @sorinr |http://www.freecodecamp.com/sorinr
sentedelviento
@sentedelviento
Jun 07 2016 12:41
I sort of fixed it, but now I have two twitter buttons
Sorin Ruse
@sorinr
Jun 07 2016 12:43
@sentedelviento ok. here is an explanation: for a button you have to trigger an onclick event. for an a tag you can use the href="" for a quick redirect. no need to use them both nested. you can style any of them quickly by adding the class you want to have them look the same
@sentedelviento to this:<a class="btn fa fa-twitter twitter-share-button"</a> add an href="" attribute
Algie Poole
@Soulseekers
Jun 07 2016 12:48
have a problem with my tribute page, when input my css color code it doesn't change on the preview page
sentedelviento
@sentedelviento
Jun 07 2016 12:48
I did that, I got rid of all buttons
I still have two twitter buttons on my page, lol
Sorin Ruse
@sorinr
Jun 07 2016 12:50
@sentedelviento no you don't. you have fb tw and get new cote btn. just give a run tour pen
Doomflake
@Doomflake
Jun 07 2016 12:52
@Soulseekers Got some code I can look at?
purnendutiwari
@purnendutiwari
Jun 07 2016 13:01
need help: why am i getting a scroll bar when I reduce screen width
http://codepen.io/purnendu/pen/YWXBBM?editors=1000
please help
Algie Poole
@Soulseekers
Jun 07 2016 13:02

<p data-height="265" data-theme-id="0" data-slug-hash="xOwLeg" data-default-tab="css" data-user="AlPoole" data-embed-version="2" class="codepen">See the Pen <a href="https://codepen.io/AlPoole/pen/xOwLeg/">xOwLeg</a> by Algie Poole (<a href="http://codepen.io/AlPoole">@AlPoole</a>) on <a href="http://codepen.io">CodePen</a>.</p>

<script async src="//assets.codepen.io/assets/embed/ei.js"></script>

Markus
@mneuschaefer
Jun 07 2016 13:03
need help: why does my div layout change size ?
clicking = buttons results in arbitrary shrinking (Ac resets it)
(currently no other functions here, just set up the layout)
thanks!
@Doomflake this what I have so far
purnendutiwari
@purnendutiwari
Jun 07 2016 13:06
@mneuschaefer : it isn't changing size for me
greg
@wearenotgroot
Jun 07 2016 13:06
@Soulseekers html should not be on the css section
Algie Poole
@Soulseekers
Jun 07 2016 13:06
but if i put it in the html side it doesn't change
@Doomflake
greg
@wearenotgroot
Jun 07 2016 13:07
@Soulseekers that is because there werent anything inside the that h2 with style
Algie Poole
@Soulseekers
Jun 07 2016 13:07
oh lol, yep
thanks @wearenotgroot
CamperBot
@camperbot
Jun 07 2016 13:07
soulseekers sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1100 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
greg
@wearenotgroot
Jun 07 2016 13:08
@Soulseekers :+1:
Markus
@mneuschaefer
Jun 07 2016 13:08
@purnendutiwari and when you click the equal / "=" button and then AC ? size change happens under the results box on top.
Samuel Plumppu
@Greenheart
Jun 07 2016 13:14
Hey! I've got some issues with images not showing up in the contact-section of my portfolio website. Anyone knows why this happens?
It actually works fine in my local environment
skilescm
@skilescm
Jun 07 2016 13:16
@Greenheart , are you referencing a URL in your pen?
Samuel Plumppu
@Greenheart
Jun 07 2016 13:16
I'm developing the website locally and publishing it through github pages
@skilescm So I'm referencing 'images/<image-name>'
skilescm
@skilescm
Jun 07 2016 13:18
@Greenheart I'd run dev tools on the page and inspect the image and see if it gives a reference error
Samuel Plumppu
@Greenheart
Jun 07 2016 13:20
@skilescm It seems like the images show up correctly in devtools
purnendutiwari
@purnendutiwari
Jun 07 2016 13:20
@mneuschaefer : got it, it is to accommodate the text appearing in result field
Samuel Plumppu
@Greenheart
Jun 07 2016 13:20
But somehow they don't show in view
purnendutiwari
@purnendutiwari
Jun 07 2016 13:22
@mneuschaefer :try giving width and height of result field explicitly
may be it will fix the issue
efeselgr
@efeselgr
Jun 07 2016 13:29
http://codepen.io/efeselgr/full/jrbLYd/
Hi i want my well width to be smaller,but when i do,they stay on the left side of the grid,how do i set their width to 50% but also make them stay in the middle of the grid,not on the side.
kirbyedy
@kirbyedy
Jun 07 2016 13:33
margin: 0 auto;
Frostyjayy
@Frostyjayy
Jun 07 2016 13:38
Hey guys! quick question what does this code imply:
(function($, undefined) {

;; // <-----
........so on
Cornel Cocioaba
@korn3l
Jun 07 2016 13:38
Hi. Does anyone else have
Does anyone else have problems when trying to get json on CodePen ?
It doesn't seem to work for me
Chase
@Belax8
Jun 07 2016 13:40
@korn3l I haven't had a problem with it. If you share your link, we can all check it out.
Chase
@Belax8
Jun 07 2016 13:42
@korn3l Are you having trouble getting the lat and lon?
efeselgr
@efeselgr
Jun 07 2016 13:42
@kirbyedy thanks
CamperBot
@camperbot
Jun 07 2016 13:42
efeselgr sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1074 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Chase
@Belax8
Jun 07 2016 13:44
@korn3l This is a common problem. I suggest getting the lat and lon from http://ip-api.com/ you can send a request to http://ip-api.com/json/?fields=lat,lon
Cornel Cocioaba
@korn3l
Jun 07 2016 13:44
@Belax8 I am having trouble getting the JSON from openweathermap. I updated the pen
mehmet salih bindak
@cyb3rsalih
Jun 07 2016 13:47
hi
:)
efeselgr
@efeselgr
Jun 07 2016 13:47
@cyb3rsalih hi
here my portfolio page any suggest ?
Chase
@Belax8
Jun 07 2016 13:49
@korn3l I copied your requestString url and pasted it in the browser and i got this error Invalid API key. Maybe double check that your API Key is correct
Markus
@mneuschaefer
Jun 07 2016 13:49
@purnendutiwari will try, thanks!
CamperBot
@camperbot
Jun 07 2016 13:49
mneuschaefer sends brownie points to @purnendutiwari :sparkles: :thumbsup: :sparkles:
:cookie: 121 | @purnendutiwari |http://www.freecodecamp.com/purnendutiwari
And it works for me
It isn't working for you ?
Chase
@Belax8
Jun 07 2016 13:51
@korn3l Nope. I just clicked on the link you shared and I got this {"cod":401, "message": "Invalid API key. Please see http://openweathermap.org/faq#error401 for more info."}
what do you see when you click on the link?
Cornel Cocioaba
@korn3l
Jun 07 2016 13:52
{"coord":{"lon":26.1,"lat":44.48},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"base":"cmc stations","main":{"temp":293.17,"pressure":1021,"humidity":45,"temp_min":290.93,"temp_max":295.37},"wind":{"speed":1},"clouds":{"all":0},"dt":1465304206,"sys":{"type":1,"id":5986,"message":0.0097,"country":"RO","sunrise":1465266679,"sunset":1465322296},"id":676241,"name":"Herăstrău","cod":200}
saebrabaebra
@saebrabaebra
Jun 07 2016 13:52

I really need some help. There are huge problems with this that I can't figure out. I've done so much googling!

https://codepen.io/saebra/pen/pbvQyV

Nothing is aligned/floated center, the fonts won't change, divs aren't being color blocks centered on a grey background... There's a substantial amount of code that should be making this different!
Markus
@mneuschaefer
Jun 07 2016 13:56
@purnendutiwari unfortunately explicit height and width for .results and #result did not fix it http://codepen.io/markusn/pen/vKNZyB
Chase
@Belax8
Jun 07 2016 13:57
@korn3l I'm not sure why I'm getting that error. Sorry that I couldn't be more help.
purnendutiwari
@purnendutiwari
Jun 07 2016 13:58
@mneuschaefer :worried:
saebrabaebra
@saebrabaebra
Jun 07 2016 14:02
Can someone look at my codepen?
Chase
@Belax8
Jun 07 2016 14:04
@saebrabaebra what exactly are you trying to center? the text or the whole div?
saebrabaebra
@saebrabaebra
Jun 07 2016 14:05
@Belax8 the whole div
and the text within it
Cornel Cocioaba
@korn3l
Jun 07 2016 14:05
@saebrabaebra to link a CSS it's better to add it from the settings top left of the CSS pane. Second thing is to not use <head> <body> tags.
saebrabaebra
@saebrabaebra
Jun 07 2016 14:05
@korn3l ok, thanks. Why are those tags bad?
CamperBot
@camperbot
Jun 07 2016 14:05
saebrabaebra sends brownie points to @korn3l :sparkles: :thumbsup: :sparkles:
:cookie: 265 | @korn3l |http://www.freecodecamp.com/korn3l
Markus
@mneuschaefer
Jun 07 2016 14:06
@purnendutiwari pressing the equal button still makes is smaller for some reason. I invented the shrinking calculator
Chase
@Belax8
Jun 07 2016 14:07
@saebrabaebra if you add margin: 0 auto; to your body tag in CSS, it will make all the divs align in the center
Cornel Cocioaba
@korn3l
Jun 07 2016 14:07
@saebrabaebra codePen puts them for you. And you are missing a </div> after </form>
saebrabaebra
@saebrabaebra
Jun 07 2016 14:08
@Belax8 thanks!
CamperBot
@camperbot
Jun 07 2016 14:08
saebrabaebra sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 391 | @belax8 |http://www.freecodecamp.com/belax8
saebrabaebra
@saebrabaebra
Jun 07 2016 14:08
@korn3l Ok, so I can just go into settings and change it and then take it out of the html?
Cornel Cocioaba
@korn3l
Jun 07 2016 14:08
yes. And dont put <style> tags in the CSS
mcorby17
@mcorby17
Jun 07 2016 14:09

Hey guys! So i'm working on the random quote generator and running into 2 problems: 1) How do you dynamically change the data-text attribute of the twitter button so that it holds the current quote?
2) I tried using the jQuery .fadeIn function to make each quote fade in after the button is pressed but it doesn't work

Any help/advice is greatly appreciated! Thanks :smile:
http://codepen.io/mcorby17/pen/JKdoMN/

mehmet salih bindak
@cyb3rsalih
Jun 07 2016 14:11
Hi guys, how can I change navbar color ?
like this
Chase
@Belax8
Jun 07 2016 14:12
@mcorby17 you can make a twitter url in your JS like: const twitterUrl = "http://twitter.com/home/?status=" + quotes.jsonData.quoteText + "via @" + quotes.jsonData.quoteAuthor; and then used jQuery's .wrap() to wrap the url around an image or text
Meet Mangukiya
@meetmangukiya
Jun 07 2016 14:13
local live editor for web dev?
mcorby17
@mcorby17
Jun 07 2016 14:14
@Belax8 Ok i'll try that... Will that put the quote directly in the tweet though or just set a link to it?
Chase
@Belax8
Jun 07 2016 14:16
@mcorby17 I think it would put the quote in the tweet
Cornel Cocioaba
@korn3l
Jun 07 2016 14:17
@mcorby17 I used the text parameter : https://twitter.com/intent/tweet?text=' your quote here'.
efeselgr
@efeselgr
Jun 07 2016 14:18

http://codepen.io/efeselgr/full/jrbLYd/

Hi,i want my font-awesome icons on the bottom to stay in the middle of their container blocks,margin:0 auto; does not work for them.

Cornel Cocioaba
@korn3l
Jun 07 2016 14:19
@cyb3rsalih You are setting the data-target to "#bs-example-navbar-collapse-1" but you have no element with that id
Chase
@Belax8
Jun 07 2016 14:19
@cyb3rsalih add this to your css file .navbar {background: red!important;} and then change red to the color that you want
purnendutiwari
@purnendutiwari
Jun 07 2016 14:32
https://gitter.im/FreeCodeCamp/FreeCodeCamp
I want make all buttons appear in single row alongside each other when I click the toggle button in small screen
????
Gintaras
@g1st
Jun 07 2016 14:37
Hi, I need small hint... What is the best way to make page look like in the example link (twitch app challenge)? Do I need to use tables? https://i.gyazo.com/6c69e9b87e86571b771335cca1be3e71.png
Josh
@joshweaver23
Jun 07 2016 14:40
@g1st There are probably other ways to do it, but I think a table is the most straight forward. That is how I did it
Gintaras
@g1st
Jun 07 2016 14:42
ok, I just heard a lot of stories about not to use tables when you can.
mcorby17
@mcorby17
Jun 07 2016 14:46
@korn3l @Belax8 Ok so I think i'm doing the wrap function wrong... could you guys take a look at it? Btw you have to click to switch to a quote first before it'll work but i'll fix that bug after I get the tweet box having the right text in it http://codepen.io/mcorby17/pen/JKdoMN/?editors=1010
@korn3l @Belax8 wait hold on sorry forgot to save
@korn3l @Belax8 ok here's the right one http://codepen.io/mcorby17/pen/JKdoMN/?editors=1010
I tried commenting out the twitter api javascript and the just breaks it...
Josh Belmont
@Jbelly19
Jun 07 2016 15:13
I saw both, but what are people's opinion about using an API to generate the quotes vs just using an array? about to start the random quote project
Clem
@ctataru
Jun 07 2016 15:25

hey guys. i'm currently working on the tic tac toe game, but i think i'm doing it wrong. i wrote a function for the first move, which is full of if/else statemetns, and i feel like continuing this route (writing functions for third, fourth, and fifth moves) will be an endless mess of if/else statements.
am i doing this completely wrong? should be tackling this problem differently?

http://codepen.io/wise/pen/dXbqMK?editors=0010

mcorby17
@mcorby17
Jun 07 2016 15:29
@ctataru I'd recommend trying to use switch statements
Chase
@Belax8
Jun 07 2016 15:29
@mcorby17 I'm not sure why it wont work. I built my url differently.
@Jbelly19 When I first build mine. I used an array, but later I switched to and API because I felt that was more of a challenge.
chetanmahore
@chetanmahore
Jun 07 2016 15:30
hello, how can i have two boxes along side each other in bootstrap
mcorby17
@mcorby17
Jun 07 2016 15:30
@Belax8 I think I just need to set it to open a new tab
Chase
@Belax8
Jun 07 2016 15:33
@chetanmahore put each in a div with a class of col-md-6
Clem
@ctataru
Jun 07 2016 15:36
@mcorby17 ah great idea! do you think breaking the game down into different functions for each move (first move, second move, third move, etc) is a bad idea?
mcorby17
@mcorby17
Jun 07 2016 15:38
@ctataru yeah I think that would get annoying for you to code after a while. I haven't done this challenge yet but I think if you had some universal function that you could just call for each move, that would work a bit better
Ethan Leyden
@Darksmurf
Jun 07 2016 15:38
@ctataru Doing something like that would have clunky code.
Idk what you're doing, but any game that does that has to have clunky code.
mcorby17
@mcorby17
Jun 07 2016 15:40
@Belax8 Yeah opening in another tab keeps it from crashing but it still doesn't put my quote in the tweet box :|
Clem
@ctataru
Jun 07 2016 15:40
hmmmm
Ethan Leyden
@Darksmurf
Jun 07 2016 15:40
What are you doing?
Clem
@ctataru
Jun 07 2016 15:40
the tic tac toe game
Ethan Leyden
@Darksmurf
Jun 07 2016 15:41
Oh, I just randomly placed Xs and Os as long as the space wasn't filled.
Have you googled tic-tac-toe strategies, that might help?
Clem
@ctataru
Jun 07 2016 15:41
yeah? i just figured it'd be fun to have a good "AI"
i haven't done much researching yet. i'm already pretty comfortable enough with strategies to code the game
at least i thought i so haha
Ethan Leyden
@Darksmurf
Jun 07 2016 15:42
:p There's gotta be a set way for a good strategy to guarantee winning.
Clem
@ctataru
Jun 07 2016 15:43
yeah i know of one that's pretty good
mcorby17
@mcorby17
Jun 07 2016 15:43
have either of you guys done the random quote generator?
Ethan Leyden
@Darksmurf
Jun 07 2016 15:43
Yup
mcorby17
@mcorby17
Jun 07 2016 15:44
How did you get the twitter button to work?
Ethan Leyden
@Darksmurf
Jun 07 2016 15:44
??
chetanmahore
@chetanmahore
Jun 07 2016 15:44
@Belax8 thank you
CamperBot
@camperbot
Jun 07 2016 15:44
chetanmahore sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 392 | @belax8 |http://www.freecodecamp.com/belax8
Ethan Leyden
@Darksmurf
Jun 07 2016 15:44
Hold on lemme look at the bonfire
Sorin Ruse
@sorinr
Jun 07 2016 15:44
@mcorby17 yes. take a look here: http://codepen.io/sorinr/pen/VaJKrw
Ethan Leyden
@Darksmurf
Jun 07 2016 15:45
There's different requirements than when I did it.
Ethan Leyden
@Darksmurf
Jun 07 2016 15:45
Lemme look at their API
Gerard Dawson
@gerarddawson
Jun 07 2016 15:50
I'm working on the random quote generator. I used the Quotes on Design API. I can get one quote to generate. But when I press the button again, a new copy of the same quote appears right below the first quote:
Ethan Leyden
@Darksmurf
Jun 07 2016 15:50
Here's a page that might help
Gerard Dawson
@gerarddawson
Jun 07 2016 15:51
This message was deleted
Anyone have this experience before?
mcorby17
@mcorby17
Jun 07 2016 15:55
Ok I got it working! Thanks guys... turns out I just needed to use the .attr() jQuery function
Gerard Dawson
@gerarddawson
Jun 07 2016 15:55
@mcorby17 what was your issue? I'm working on random quote now, too.
mcorby17
@mcorby17
Jun 07 2016 16:00
@gerarddawson I couldn't figure out how to get the tweet link to hold the quote
I tried using .setAttribute but turns out jQuery needs .attr
Gerard Dawson
@gerarddawson
Jun 07 2016 16:03
@mcorby17 ah ok. i get confused between different methods in javascript and jquery.
Sorin Ruse
@sorinr
Jun 07 2016 16:03
@gerarddawson $(".jumbotron").append you append instead of replace html
Gerard Dawson
@gerarddawson
Jun 07 2016 16:07
@sorinr I've changed .append to .html, and that gets a quote to show up, without having subsequent quotes be appended to the bottom
@sorinr thank you
CamperBot
@camperbot
Jun 07 2016 16:07
gerarddawson sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 325 | @sorinr |http://www.freecodecamp.com/sorinr
Gerard Dawson
@gerarddawson
Jun 07 2016 16:08
@sorinr now I just need to work on figuring out how to get a new quote every time instead of one with the same id
Sorin Ruse
@sorinr
Jun 07 2016 16:08
@gerarddawson get inspired from my code: http://codepen.io/sorinr/pen/VaJKrw
efeselgr
@efeselgr
Jun 07 2016 16:09
Is there any bootstrap pros out here?i need help with navbar.
Sorin Ruse
@sorinr
Jun 07 2016 16:10
@efeselgr not a pro but if you put the question maybe me or somebody else will give u an answer
Gerard Dawson
@gerarddawson
Jun 07 2016 16:10
@sorinr Ok, will do. Thanks and that's all for me for now. Lunch break's over
CamperBot
@camperbot
Jun 07 2016 16:10
:warning: gerarddawson already gave sorinr points
gerarddawson sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
Yagnatheja
@Yagnatheja
Jun 07 2016 16:10
hello friends, do we have to need any file get downloaded to start bootstrap coding
efeselgr
@efeselgr
Jun 07 2016 16:11

http://codepen.io/efeselgr/full/vKNWNq/

here is my portfolio page in progress,i can't make navbar to collapse open in my mobile,is there something wrong with code?

Jonathan Coleman
@jondcoleman
Jun 07 2016 16:12
@efeselgr you need to include jquery js before the bootstrap js in codepen
Yagnatheja
@Yagnatheja
Jun 07 2016 16:13
anyone there
Sorin Ruse
@sorinr
Jun 07 2016 16:14
@efeselgr add jquery library before your bootstrap.js as @jondcoleman already told u
DC
@dctor
Jun 07 2016 16:14
hey all, I am working on Twitchtv project...what's the correct api to use? i took this one but it returns null 'https://api.twitch.tv/kraken/streams/freecodecamp?callback=?'
efeselgr
@efeselgr
Jun 07 2016 16:15
@jondcoleman @sorinr thanks,it works now,not sure why jquery was needed tho
CamperBot
@camperbot
Jun 07 2016 16:15
efeselgr sends brownie points to @jondcoleman and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 784 | @jondcoleman |http://www.freecodecamp.com/jondcoleman
:cookie: 326 | @sorinr |http://www.freecodecamp.com/sorinr
Jonathan Coleman
@jondcoleman
Jun 07 2016 16:15
@efeselgr bootstrap js is dependent on jQuery
efeselgr
@efeselgr
Jun 07 2016 16:16
@jondcoleman alright
Yagnatheja
@Yagnatheja
Jun 07 2016 16:16
@jondcoleman Is there need to download any bootstrap file to start bootstrap coding
Sorin Ruse
@sorinr
Jun 07 2016 16:17
@Yagnatheja nope
Jonathan Coleman
@jondcoleman
Jun 07 2016 16:17
@Yagnatheja are you using codepen?
Yagnatheja
@Yagnatheja
Jun 07 2016 16:17
no
Jonathan Coleman
@jondcoleman
Jun 07 2016 16:17
then you either need to download it and include it in your project or you can use a link to the file from a cdn
Sorin Ruse
@sorinr
Jun 07 2016 16:17
@Yagnatheja link them
Jonathan Coleman
@jondcoleman
Jun 07 2016 16:17
Yagnatheja
@Yagnatheja
Jun 07 2016 16:19
@jondcoleman In this site it is showing to download bootstrap, source code and sass, do we need to download all??
evude
@evude
Jun 07 2016 16:19
I can't seem to get the geolocation api working on the weather app project. Does anyone have any idea what I am doing wrong? http://codepen.io/evude/pen/OXyRNz
efeselgr
@efeselgr
Jun 07 2016 16:19
Also since i got you 2 one more question,i have font awesome icons on the bottom of my page as you can see from the link,how do i center them in their columns.
Jonathan Coleman
@jondcoleman
Jun 07 2016 16:19
explain geolocation
CamperBot
@camperbot
Jun 07 2016 16:20
no wiki entry for: geolocation
Yagnatheja
@Yagnatheja
Jun 07 2016 16:20
@jondcoleman Thank uu
CamperBot
@camperbot
Jun 07 2016 16:20
yagnatheja sends brownie points to @jondcoleman :sparkles: :thumbsup: :sparkles:
:cookie: 785 | @jondcoleman |http://www.freecodecamp.com/jondcoleman
Jonathan Coleman
@jondcoleman
Jun 07 2016 16:20
explain location
CamperBot
@camperbot
Jun 07 2016 16:20

:point_right: challenge get geo location data [wiki]

Challenge Get Geo Location Data

Every browser has a built in navigator that can give us this information.

The navigator will get our user's current longitude and latitude.

You will see a prompt to allow or block this site from knowing your current location. The challenge can be completed either way, as long as the code is correct.

By selecting allow you will see the text on the output phone change to your latitude and longitude

Here's some code that does this:

```javascript
if (navigator.geolocation) {

navigator.geolocation.getCurrentPosition(function(position) {

$("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);

});
:pencil: read more about challenge get geo location data on the FCC Wiki

Jonathan Coleman
@jondcoleman
Jun 07 2016 16:21
@evude looks like that method for getting location is deprecated when not using https
evude
@evude
Jun 07 2016 16:21
The codepen I just posted seems to be working perfectly fine in the chat, but doesn't work in the a separate window.
Jonathan Coleman
@jondcoleman
Jun 07 2016 16:22
since codepen isn't https it won't work
There's a workaround though, I don't remember what it is
hang on
evude
@evude
Jun 07 2016 16:22
@jondcoleman I see. What am I supposed to be using instead?
@jondcoleman I was going off the example on the freecodecamp website.
Sorin Ruse
@sorinr
Jun 07 2016 16:23
@jondcoleman codepen is also https
Jonathan Coleman
@jondcoleman
Jun 07 2016 16:24
@sorinr true, I guess you can open it in https
That works @evude
Jonathan Coleman
@jondcoleman
Jun 07 2016 16:24
haha
Sorin Ruse
@sorinr
Jun 07 2016 16:25
@jondcoleman if you try it over http it will not work
Jonathan Coleman
@jondcoleman
Jun 07 2016 16:26
@efeselgr use text-align: center; on the columns
evude
@evude
Jun 07 2016 16:26
@jondcoleman @sorinr Thanks. It seems to work over https.
CamperBot
@camperbot
Jun 07 2016 16:26
evude sends brownie points to @jondcoleman and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 786 | @jondcoleman |http://www.freecodecamp.com/jondcoleman
:cookie: 327 | @sorinr |http://www.freecodecamp.com/sorinr
lalith77
@lalith77
Jun 07 2016 16:28
does anyone know how to extract "description" in "weather" from the following json ----->{"coord":{"lon":-84.39,"lat":33.75},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"base":"stations","main":{"temp":27.97,"pressure":1010,"humidity":48,"temp_min":26.67,"temp_max":29},"visibility":16093,"wind":{"speed":2.6},"clouds":{"all":1},"dt":1465316031,"sys":{"type":1,"id":748,"message":0.0116,"country":"US","sunrise":1465295196,"sunset":1465346817},"id":4180439,"name":"Atlanta","cod":200}
Sorin Ruse
@sorinr
Jun 07 2016 16:28
@lalith77 take a look at the pens above
Chase
@Belax8
Jun 07 2016 16:29
json.weather[0].description
DC
@dctor
Jun 07 2016 16:30
hey all, I am working on Twitchtv project...what's the correct api to use? i took this one but it returns null 'https://api.twitch.tv/kraken/streams/freecodecamp?callback=?'
Chase
@Belax8
Jun 07 2016 16:31
@lalith77 and then just change json to whatever your variable is
chetanmahore
@chetanmahore
Jun 07 2016 16:32
how can i get first three form inputs next to each other
lalith77
@lalith77
Jun 07 2016 16:32
i tried json.weather.description. it doesnt work. json.main.temp works somehow though
chetanmahore
@chetanmahore
Jun 07 2016 16:32
And the last message box covering whole three input space in bottom.
help :worried:
CamperBot
@camperbot
Jun 07 2016 16:33
no wiki entry for: worried
Sorin Ruse
@sorinr
Jun 07 2016 16:33
@dctor Failed to load resource: the server responded with a status of 400 (Bad Request). you are bad formatting your request
Chase
@Belax8
Jun 07 2016 16:33
@lalith77 try json.weather[0].description
chetanmahore
@chetanmahore
Jun 07 2016 16:34
:cry:
lalith77
@lalith77
Jun 07 2016 16:34
@chase tried. didnt work :(
Sorin Ruse
@sorinr
Jun 07 2016 16:34
@lalith77 description = data['weather'][0]['description']; where data is your json response
Chase
@Belax8
Jun 07 2016 16:36
@dctor that looks like the right api. I will double check
Sai Rahul
@rhhhhl
Jun 07 2016 16:37
hi, guys need some help here Escape Sequences in Strings
in this challenge var myStr = \ \t"\" \t"\" \r"\" \n"\"; is not working for me. Instructions
Encode the following sequence, separated by spaces:
backslash tab tab carriage-return new-line and assign it to myStr
DC
@dctor
Jun 07 2016 16:38
@Belax8 thanks
CamperBot
@camperbot
Jun 07 2016 16:38
dctor sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 393 | @belax8 |http://www.freecodecamp.com/belax8
DC
@dctor
Jun 07 2016 16:39
@Belax8 here is the request in codepen
http://codepen.io/dctor/pen/WxQXQo
Chase
@Belax8
Jun 07 2016 16:42
@dctor stream is null because nothing is being streamed right now on Free Code Camp try this channel ESL_SC2 they are streaming 24/7
DC
@dctor
Jun 07 2016 16:50
@Belax8 i see got it...thank you
Chase
@Belax8
Jun 07 2016 16:51
@dctor anytime
efeselgr
@efeselgr
Jun 07 2016 16:58
Does this count as Build your own portfolio: http://codepen.io/efeselgr/full/vKNWNq/
bscyrpt
@bscyrpt
Jun 07 2016 17:01
@efeselgr if your not going to show it to anybody then sure
Chase
@Belax8
Jun 07 2016 17:02
@efeselgr I think so! And then just keep adding to it as you finish challenges
efeselgr
@efeselgr
Jun 07 2016 17:02
@bscyrpt haha
Shusil Banjade
@shusil123
Jun 07 2016 17:02
@efeselgr , It's good as the first project. But, work more on color combinations... Good work
efeselgr
@efeselgr
Jun 07 2016 17:03
@Belax8 @bscyrpt @shusil123 thanks for all the criticism
CamperBot
@camperbot
Jun 07 2016 17:03
efeselgr sends brownie points to @belax8 and @bscyrpt and @shusil123 :sparkles: :thumbsup: :sparkles:
:cookie: 359 | @shusil123 |http://www.freecodecamp.com/shusil123
:cookie: 277 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
:cookie: 394 | @belax8 |http://www.freecodecamp.com/belax8
Sai Rahul
@rhhhhl
Jun 07 2016 17:04
is it a bug? Encode the following sequence, separated by spaces:
backslash tab tab carriage-return new-line and assign it to myStr ? challenge
Sorin Ruse
@sorinr
Jun 07 2016 17:05
@efeselgr criticism is the best part of a feedback. you learn what you did wrong and need to improve
Clem
@ctataru
Jun 07 2016 17:13

hey guys. is my switch statement on line 67 (js) too long? it doesn't seem to recognize when the computer wins at tic-tac-toe, which are all the cases in the second half of the statement:

http://codepen.io/wise/pen/dXbqMK?editors=0010

the second half (case lose) starts on line 92, for my first switch statement
i don't get any confirm messages when i lose, but i get them when i win. and the code is the same everywhere
David
@Nachlawi
Jun 07 2016 17:23
Can someone help me with JSON?
Toni Shortsleeve
@KoniKodes
Jun 07 2016 17:24
@Nachlawi What do you need?
David
@Nachlawi
Jun 07 2016 17:25
@KoniKodes So I'm trying to get the weather, but I can't seem to get the JSON:
https://codepen.io/Nachlawi/pen/Gqpjjv
I've tried adding in the console logs, but they output nothing.
Toni Shortsleeve
@KoniKodes
Jun 07 2016 17:26
@Nachlawi I'm in the same place right now. Would you like to pair up and see if we can help each other?
Sorin Ruse
@sorinr
Jun 07 2016 17:30
@Nachlawi $.getJSON("api.openweathermap.org here its ur problem. make it $.getJSON("http://api.openweathermap.org but your app will not work because you cannot use https://api.openweathermap.org call
Kevin Holmes
@codersc
Jun 07 2016 17:40
Can someone help me out. Why doesn't my front end cert have my name on it? I just got it yesterday, so I'm assuming it takes some time for them to go through my projects. After they do that and approve it then my cert will have my my name on it?
Clem
@ctataru
Jun 07 2016 17:42

is there any easier way for me to figure out if one of my blocks is empty? (other than "if block1 !== "X" or block1 !== "O")
the issue is that i can't just test if the div is empty, because there's a button inside of it that gets replaced by an X or O.

http://codepen.io/wise/pen/dXbqMK?editors=0010

Sorin Ruse
@sorinr
Jun 07 2016 17:43
@KoniKodes if you need some inspiration just check my weather app pen here: https://codepen.io/sorinr/pen/xOGdYz
Toni Shortsleeve
@KoniKodes
Jun 07 2016 17:46
@sorinr Wow! That is beautiful. I see you've added some php with it. I'm still trying to understand how to parse the json.
efeselgr
@efeselgr
Jun 07 2016 17:47
@sorinr that is i think the third weather app i have seen here and the only one that worked
Sorin Ruse
@sorinr
Jun 07 2016 17:47
@KoniKodes you can use my php script for free but you have to pass only lat and lon
Toni Shortsleeve
@KoniKodes
Jun 07 2016 17:48
@sorinr Thank you. I'm using wunderground for the autoip, but having problems getting the info back.
CamperBot
@camperbot
Jun 07 2016 17:48
konikodes sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 328 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Jun 07 2016 17:49
@KoniKodes because of the https issues. thats why i have created that php file on my server
Toni Shortsleeve
@KoniKodes
Jun 07 2016 17:50
@sorinr Yes, that makes sense. I've seen mention for cross-security issue.
Sorin Ruse
@sorinr
Jun 07 2016 17:52
@KoniKodes you can use that php file for free but be gently because it can override my free limit on http://openweathermap.org/ :)
Toni Shortsleeve
@KoniKodes
Jun 07 2016 17:53
@sorinr I'd like to take a closer look but I'll be gentle. Thank you.
CamperBot
@camperbot
Jun 07 2016 17:53
konikodes sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: konikodes already gave sorinr points
mcorby17
@mcorby17
Jun 07 2016 17:54
How do I move my buttons to the center? I can never figure out how to make .row work... http://codepen.io/mcorby17/pen/JKdoMN/?editors=1100
Sorin Ruse
@sorinr
Jun 07 2016 17:56
@KoniKodes feel free to test it. just make sure u make the calls as https://realistik-it.com and not http
Toni Shortsleeve
@KoniKodes
Jun 07 2016 17:57
@sorinr Yes, https... :-)
madddy123
@madddy123
Jun 07 2016 18:05
hi everyone
i am new to code champ
can anyone help me with this challenge
?
basically can someone guide me?
Ken Haduch
@khaduch
Jun 07 2016 18:08
@mcorby17 - if you just change the div where you have the class="row btns" to class="text-center", it seems to work.
I don't think that the row class helps you with centering - it is for the grid....
mcorby17
@mcorby17
Jun 07 2016 18:10
@khaduch Ugh I always assume that only works for text... Thank you!!
CamperBot
@camperbot
Jun 07 2016 18:10
mcorby17 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1278 | @khaduch |http://www.freecodecamp.com/khaduch
Daniel
@DanielMW34
Jun 07 2016 18:11
I cannot seem to understand why a background-image with a gradient in a 6 column <div> element is showing up in an element which contains a photo but not an empty 6 column <div> element. Also, why is the background image showing up in the same 6 column <div> element when I keep the image present but make it’s opacity = 0. This sound like the type of question anyone wants to help me troubleshoot?
Sorin Ruse
@sorinr
Jun 07 2016 18:14
@madddy123 you are free to make a page for everything you like or care about.
Igor Kurchenko
@scarigor
Jun 07 2016 18:15
Hello, mates! Im just installed sass, and i have a guestion: how can i use simplified syntaxis (without brackets ect.)? btw im using Sublime 3
Sorin Ruse
@sorinr
Jun 07 2016 18:18
@scarigor u can use even notepad. just read the sass docs on scss or sass syntax
madddy123
@madddy123
Jun 07 2016 18:18
@sorinr ..Okay thanks
CamperBot
@camperbot
Jun 07 2016 18:18
madddy123 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 329 | @sorinr |http://www.freecodecamp.com/sorinr
madddy123
@madddy123
Jun 07 2016 18:19
I @sorinr I was just expecting it to be the same as given below link
Daniel
@DanielMW34
Jun 07 2016 18:20
I cannot seem to understand why a background-image with a gradient in a 6 column <div> element is showing up in an element which contains a photo but not an empty 6 column <div> element. Also, why is the background image showing up in the same 6 column <div> element when I keep the image present but make it’s opacity = 0. This sound like the type of question anyone wants to help me troubleshoot?
madddy123
@madddy123
Jun 07 2016 18:20
should it look more related to this page
or doesn't matter?
Sorin Ruse
@sorinr
Jun 07 2016 18:20
@DanielMW34 Daniel can you give as a link to ur pen?
@madddy123 paste in also the link you are talking about :)
Bhavik
@BhavikSheth
Jun 07 2016 18:22
Hello everyone, I am having problems with my Chrome browser with the code below. I am not getting the small box asking me for permission to use my location in the Code Pen website in the Chrome browser but I am getting the permission box in the Free Code Camp website for the same code. I am getting the permission box for the Code Pen website in the safari browser. I don't understand why.
if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position) {
    $("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);
  });
}
Daniel
@DanielMW34
Jun 07 2016 18:22
@sorinr Here is the link to my pen however, I had to re-design the page in order to make progress on this issue and will have to edit the code or walk you through the situation for it to make sense... http://codepen.io/Daniel_Widrich/pen/GZLGQX
@sorinr thank you
CamperBot
@camperbot
Jun 07 2016 18:22
danielmw34 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 330 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Jun 07 2016 18:25
@DanielMW34 add more info on your projects and a contact section
Daniel
@DanielMW34
Jun 07 2016 18:26
@sorinr The issue I am referring to is the div element containing my photo
I included a background-image with a gradient on that div and it "worked"
however, when I included the same background-image on the div section below it --currently empty and likely to remain as such-- it did not "work"
not sure why that would be so
I even included the same photo in the div element below and gave it an opacity of 0, wherein the background-image again appeared/worked
Daniel
@DanielMW34
Jun 07 2016 18:31
again, not sure why a background-image with a gradient would appear / not appear based on the content of the element, even if there is no contrasting information or styles between the content and the background-image
Sorin Ruse
@sorinr
Jun 07 2016 18:32
@DanielMW34 are u referring to the class .white2black?
Markus
@mneuschaefer
Jun 07 2016 18:38
(offtopic) weird feature with result 2 * 21 :-) http://codepen.io/markusn/pen/vKNZyB?editors=0011
this is fun
Sorin Ruse
@sorinr
Jun 07 2016 18:42
@mneuschaefer if (currentMath === ["42"]) return "thx for the fish!"; ????????????
Markus
@mneuschaefer
Jun 07 2016 18:42
ah yes this got in somehow
bscyrpt
@bscyrpt
Jun 07 2016 18:42
@DanielMW34 i think the issue your having is that your div element needs to have size attributes to it. If you set a background but nothing in the div it is shrink wrapped and will have a size of 0 thus showing nothing. Show you can set width/height attributes or make sure content is inside the div.
Gilbert Smith
@GJSmith3rd
Jun 07 2016 18:44
Hey, campers! I have a question about the Local Weather project - the user story says to show weather at your location but ip based look can be far off. Is this OK since google chrome needs a secure origin for navigator.location so I just used ip address?
Sorin Ruse
@sorinr
Jun 07 2016 18:45
@GJSmith3rd take a look here: https://codepen.io/sorinr/pen/xOGdYz
Gilbert Smith
@GJSmith3rd
Jun 07 2016 18:45
ok
Sorin Ruse
@sorinr
Jun 07 2016 18:46
@GJSmith3rd you should run it on https not http
Tzvetlin Velev
@tvelev92
Jun 07 2016 18:48
how can I tweet out a random quote
Tulio Natale
@tuliodnw
Jun 07 2016 18:48
@sorinr the images in the background are too big and take too long to load btw
Gilbert Smith
@GJSmith3rd
Jun 07 2016 18:49
thanks @sorinr - thats pretty accurate. ok your using google maps api. can you use that without a dev key? i don't want to look to closely at the code.
CamperBot
@camperbot
Jun 07 2016 18:49
gjsmith3rd sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 331 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Jun 07 2016 18:49
@tuliodnw btw what connection do u have?
Tulio Natale
@tuliodnw
Jun 07 2016 18:50
like @sorinr 5mb, but some people are on youtube
Sorin Ruse
@sorinr
Jun 07 2016 18:52
@GJSmith3rd you can use the weather.php call for free but you have to make the call over https and pass lat and lon as parameters
@tuliodnw u are on mobile?
Tulio Natale
@tuliodnw
Jun 07 2016 18:52
laptop wifi @sorinr
Sorin Ruse
@sorinr
Jun 07 2016 18:54
@tuliodnw sorry but i realy cannot optimize my pens for every speed. i try to optimize them for web or mobile but not for speed. I will take care in the future also about this aspect
Tulio Natale
@tuliodnw
Jun 07 2016 18:55
@sorinr np, it was just a comment
Gilbert Smith
@GJSmith3rd
Jun 07 2016 18:57
thanks again - my problem is that in my dev environment I use chrome on a local ip instead of local host so i can access it from another pc and display. I get an error about origin with IP 10.0.0.57:3039. I'm going to see what i do to get localhost:3039 working by changing hosts temporarily - thanks again. @sorinr
CamperBot
@camperbot
Jun 07 2016 18:57
gjsmith3rd sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:warning: gjsmith3rd already gave sorinr points
Sorin Ruse
@sorinr
Jun 07 2016 19:03
@GJSmith3rd Gilbert feel free to use that weather.php link but be gently. I don't want to exeed my free api calls quota. For example you can grab one of the json responses add it to a var and test your app from that var first and afterwards change the calls to the weather.php. Hope it makes sense what I try to say
Tulio Natale
@tuliodnw
Jun 07 2016 19:17

people im having problems with the css, i want the tic tac toe to be in very center of the screen, i have done this before, but no working now, help wanted, thanks

http://codepen.io/tuliodnw/pen/OXVYvL?editors=1100

Sanchit Dhiman
@sanchit13
Jun 07 2016 19:28
Could anyone help me out one on one with my portfolio?
Fernand
@Ferdyboy81
Jun 07 2016 19:29
Hello Peeps! how can I make my <h1> move side to side? http://codepen.io/Ferdyboy81/pen/XKmpZy?editors=1000
Sorin Ruse
@sorinr
Jun 07 2016 19:33
@Ferdyboy81 witch side? left or right?
Caitlin Sophia
@ocarno5
Jun 07 2016 19:35
@Ferdyboy81 Do you want it to always be moving or just reposition it to one side?
Fernand
@Ferdyboy81
Jun 07 2016 19:36
@ocarno5 @sorinr just bouncing from left and right
I used Marquee but sometimes it doesn't work
Sorin Ruse
@sorinr
Jun 07 2016 19:38
@Ferdyboy81 you can add animation bounce classs
Fernand
@Ferdyboy81
Jun 07 2016 19:38
@sorinr will you show me how please
Sorin Ruse
@sorinr
Jun 07 2016 19:39
add animate.js to your pen
Fernand
@Ferdyboy81
Jun 07 2016 19:40
@sorinr ok just did
swastikmohapatra7
@swastikmohapatra7
Jun 07 2016 19:40
This message was deleted
Caitlin Sophia
@ocarno5
Jun 07 2016 19:41
@tuliodnw have you tried adding "margin: auto;" to the main id?
Sorin Ruse
@sorinr
Jun 07 2016 19:42
@Ferdyboy81 then look here and choose what u want: https://daneden.github.io/animate.css/
swastikmohapatra7
@swastikmohapatra7
Jun 07 2016 19:43

Hi guys. Can anyone tell me what's the use for adding a type to a button ? For example:

<form action="/www.xyz.com">
<input type="text>
<button type="Submit>Submit</button>
</form>

I mean, if I nest the button in the form element, HTML should identify that clicking the button will send the data to the server. What then, is the use of a type for a button?

Sorin Ruse
@sorinr
Jun 07 2016 19:45
@swastikmohapatra7 it should be <button type="submit">Submit</button> and it triggers automatically your form submission unless u override it
swastikmohapatra7
@swastikmohapatra7
Jun 07 2016 19:47
ya, i forgot to add a quotation, and i didn't get you there. What do you mean by autmoatically triggers a form submission?
automatically
Caitlin Sophia
@ocarno5
Jun 07 2016 19:48
@swastikmohapatra7 a button can be given a "reset" type which is used to reset inputted data in a form too not just submit it so you have to state which you want it to do
swastikmohapatra7
@swastikmohapatra7
Jun 07 2016 19:48
ah i see. Thanks a lot ! :)
@ocarno5 thanks !
CamperBot
@camperbot
Jun 07 2016 19:51
swastikmohapatra7 sends brownie points to @ocarno5 :sparkles: :thumbsup: :sparkles:
:cookie: 41 | @ocarno5 |http://www.freecodecamp.com/ocarno5
DC
@dctor
Jun 07 2016 19:52
hey all in this simple doc, why the text is centered but not the "dot" of the <li>?
http://codepen.io/dctor/pen/WxQXQo
Sandro
@twozero6
Jun 07 2016 19:54
Because the li is 100% width
You're welcome for that useless answer :D
here's a better one: http://jsfiddle.net/8mHeh/1/
DC
@dctor
Jun 07 2016 19:57
@twozero6 it looks like the ul made it that way
Sandro
@twozero6
Jun 07 2016 19:58
@dctor yeah but you'll want to use CSS to fix it, li should be inside of ul or ol as far as I know
In order to validate as least
Fernand
@Ferdyboy81
Jun 07 2016 19:59
@dctor you need to adjust your <ul> padding in your CSS
@dctor you should have:
<ul>
<li>hello</li>
</ul>
Daniel
@DanielMW34
Jun 07 2016 20:01
@sorinr @bscyrpt sorry for not replying. I am at my office and had some other tasks to perform. Yes, I am referring to .black2white however, the way it is written now does not really explain the problem. I will work up some code sections and copy/paste them into a DM for you both and hopefully we can shine some light on the issue. Thank you.
CamperBot
@camperbot
Jun 07 2016 20:01
danielmw34 sends brownie points to @sorinr and @bscyrpt :sparkles: :thumbsup: :sparkles:
:cookie: 332 | @sorinr |http://www.freecodecamp.com/sorinr
:cookie: 280 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
Andrew Krupicka
@akrupicka
Jun 07 2016 20:03

Hello all! I am working on my random quote machine. It works, but I would like to hook it up through an API to get quotes from an external source (my current quotes are in a JSON array).

Can any of you recommend a good starting point for me to begin researching how to set up a simple API connection for my quote machine?

DC
@dctor
Jun 07 2016 20:04
@twozero6 @Ferdyboy81 ok i'll try thanks
CamperBot
@camperbot
Jun 07 2016 20:04
dctor sends brownie points to @twozero6 and @ferdyboy81 :sparkles: :thumbsup: :sparkles:
:cookie: 141 | @ferdyboy81 |http://www.freecodecamp.com/ferdyboy81
:cookie: 307 | @twozero6 |http://www.freecodecamp.com/twozero6
Andrew Krupicka
@akrupicka
Jun 07 2016 20:09
Thank you, Chase, I will look into that! It looks simple enough.
Chase
@Belax8
Jun 07 2016 20:09
Ya, it's super basic but it has everything you need
Andrew Krupicka
@akrupicka
Jun 07 2016 20:11
@Belax8 Thank you!
CamperBot
@camperbot
Jun 07 2016 20:11
akrupicka sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 395 | @belax8 |http://www.freecodecamp.com/belax8
Scott Miller
@smiller171
Jun 07 2016 20:17

hey guys

Am I required to submit with CodePen? I’d find it easier to use a local dev environment and deploy to firebase

NewtonXu
@NewtonXu
Jun 07 2016 20:22
Hi could someone help me with my Simon game, im trying to implement the flashing buttons using a delayed add/removeclass but the setTimeout function isnt working as intended: http://codepen.io/NewtonXu/pen/xOwpPZ
Andrew Krupicka
@akrupicka
Jun 07 2016 20:27
@smiller171
From FreeCodeCamp's FAQ section: As long as your code is publicly viewable, and you have a live demo, you can use whatever you want.
Scott Miller
@smiller171
Jun 07 2016 20:28
thanks @akrupicka
CamperBot
@camperbot
Jun 07 2016 20:28
smiller171 sends brownie points to @akrupicka :sparkles: :thumbsup: :sparkles:
:cookie: 275 | @akrupicka |http://www.freecodecamp.com/akrupicka
Tulio Natale
@tuliodnw
Jun 07 2016 20:43
can someone check the tic tac toe, play some games, tell me if they work and no bugs?
will add hard mode after the css
http://codepen.io/tuliodnw/pen/OXVYvL?editors=1100
mcorby17
@mcorby17
Jun 07 2016 20:47
@tuliodnw Looks good! Great work!
David
@Nachlawi
Jun 07 2016 20:49
@tuliodnw Nice work! But the computer's a bit stupid XD
Tulio Natale
@tuliodnw
Jun 07 2016 20:49
@Nachlawi ai is random, will add hard mode after the css
David
@Nachlawi
Jun 07 2016 20:50
@tuliodnw Yeah, But it seems to all work well. Good job. How did you do the weather app out of interest?
Tulio Natale
@tuliodnw
Jun 07 2016 20:51
@Nachlawi you want to see it, or you have questions?
Sorin Ruse
@sorinr
Jun 07 2016 20:53
@tuliodnw i've plaied it couple of times. you should improve the "computer playing logic"
David
@Nachlawi
Jun 07 2016 20:53
@tuliodnw I found yours from your portfolio. I'm just looking through your code to see how you did it :D
Tulio Natale
@tuliodnw
Jun 07 2016 20:55
@Nachlawi ok, no problem, im not happy with the switch i used to change the background , if i start it again i would change that part.
@sorinr there is no ai now, is totally random, thats gonna change after im done with the css
Darryl Parks
@punchymango
Jun 07 2016 20:56

Hello, I'm still struggling with the Twitch API project. I cannot for the life of me figure out how to pass a result from my .getJSON success handler to anywhere else.

If someone could take a look, I'd appreciate it

I tried a construction like

var strObj = $.getJSON("https://api.twitch.tv/kraken/streams/" + twitchUserArr[i].toLowerCase(), function(data) {
...

ending in "return data;" but it didn't return the retrieved object, it returned a bunch of AJAX stuff I don't understand yet

Tulio Natale
@tuliodnw
Jun 07 2016 21:00
@punchymango twitchUserArr[i].toLowerCase() the lowercase is not needed btw, im watching it, whats the problem? you dont know how to grab the things from the json?
bsandusky
@bsandusky
Jun 07 2016 21:00
@punchymango Check out the link on the project page about how to construct the API call : https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Front-End-Project-Use-Twitchtv-JSON-API. You're missing the ?callback= part which goes between the API and the function.
Darryl Parks
@punchymango
Jun 07 2016 21:01
Well, the thing is, it didn't actually seem to matter whether I added the ?callback=? or not. The data is getting there, I've checked with console.log. I just can't figure out how to use it to change anything outside of the handler function
Tulio Natale
@tuliodnw
Jun 07 2016 21:03
@punchymango what is uname? i cant find it
@punchymango found it
Darryl Parks
@punchymango
Jun 07 2016 21:05

I tried putting the

$("#list").append("<a href = '" + address + "'><div class = 'pod'><h3>" + uName + "</h3><br /><p>" + content + "</p></div></a>");

method inside the callback function also, but weird things happen when I do, it sets uName to the name of the last person in the array for every offline streamer

@tuliodnw the above, having the handler function make all the changes to my HTML, is how I'm used to doing these
Darryl Parks
@punchymango
Jun 07 2016 21:19
am I going about this completely backwards?
greg
@wearenotgroot
Jun 07 2016 21:20
@punchymango closed account will give error code 422. so to determine if the account is closed you need to detect that error
@punchymango use .fail and add a callback
Darryl Parks
@punchymango
Jun 07 2016 21:21
the fail goes inside the callback function? When I tried codepen flagged it as a typo. Did I put it in the wrong place?
the .fail I mean @wearenotgroot
Ethan Rose
@ethanrose
Jun 07 2016 21:31
Hey guys, I've just arrived at the random quote generator project.. and I feel like there's a huge knowledge gap for me to do that.! I'd like to practice AJAX more before I try tackling the project.. any suggestions on how to practice ajax? like.. do I need to upload separate txt files to codepen to request the strings from?
greg
@wearenotgroot
Jun 07 2016 21:36
@aidansven why not just search for free open api and just read the documentation then try for yourself
@punchymango it should be like
$.getJSON(url,function(){}).done(dataHandler).fail(errorHandler);
Amir Ghafouri
@amirghafouri
Jun 07 2016 21:38
I'm having some problems with a:target not working the way it's supposed to. Can anyone help?
Darryl Parks
@punchymango
Jun 07 2016 21:39
okay
@wearenotgroot thanks
CamperBot
@camperbot
Jun 07 2016 21:39
punchymango sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1103 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Darryl Parks
@punchymango
Jun 07 2016 21:39
I'll try that :)
Nikki
@nikhithasriharsha
Jun 07 2016 21:42
which one @amirghafouri
NewtonXu
@NewtonXu
Jun 07 2016 21:44
Could anyone please help me with my setTimeout function? ive been working on it for a while but it still doesnt work
hnry
@hnry
Jun 07 2016 21:45
@NewtonXu show it
@hnry
hnry
@hnry
Jun 07 2016 21:47
what am i looking for?
NewtonXu
@NewtonXu
Jun 07 2016 21:47
if you click the start button, what should happen is that the green one blinks, then red one blinks, but both stay lit up. the function is at the top of the javascript section
@hnry
djoles2401
@djoles2401
Jun 07 2016 21:49
OK, I confess: I'm in trouble. I started building Tribute page,(https://www.freecodecamp.com/challenges/build-a-tribute-page) and I don't understand the task. Should we use Bootstrap only? I don't know enough. Where can I practise more Bootstrap?
hnry
@hnry
Jun 07 2016 21:50
@NewtonXu well callback(i, array[i]) this needs to be callback(i, array[i])() since callback returns a function
@NewtonXu after that sometimes your array[i] is undefined, so you should check that
NewtonXu
@NewtonXu
Jun 07 2016 21:52
@hnry which section are you talking about?
hnry
@hnry
Jun 07 2016 21:52
the same line
NewtonXu
@NewtonXu
Jun 07 2016 21:53
@hnry http://codepen.io/NewtonXu/pen/xOwpPZ
Like this? it still doesnt work though? i updated the length to be length-1
RompePC
@RompePC
Jun 07 2016 21:55
Hey there, could anyone send me feedback about the nav design? http://codepen.io/RompePC/full/YWyLOx/
The mobile version only includes the icons
Tyler Moeller
@TylerMoeller
Jun 07 2016 22:03
@NewtonXu Try promises :) Or, move your recursion call to the inner setTimeout:
function sequence(x, array) {
  var i = x;
  var length = array.length - 1;
  if (i > length) return;
  setTimeout(function() {
    $("." + array[i]).addClass(array[i] + "-active");
    console.log(i, array[i])
    setTimeout(function() {
      callback(i, array[i])()
      sequence(++i, array);
    }, 1000);
  }, 1000);
};
hnry
@hnry
Jun 07 2016 22:03
@NewtonXu well... if the code is confusing the person who wrote it, you might need to rethink the approach :P
@NewtonXu why do you have var i = x ? but never use x?
right now there's a race between i and x, i'm guessing you originally wanted to use x to hold on to the old value?
Tyler Moeller
@TylerMoeller
Jun 07 2016 22:06
It's a little easier to read without the extra vars, IMO:
function sequence(x, array) {
  if (x >= array.length) return;
  setTimeout(function() {
    $("." + array[x]).addClass(array[x] + "-active");
    console.log(x, array[x])
    setTimeout(function() {
      callback(x, array[x])()
      sequence(++x, array);
    }, 1000);
  }, 1000);
}
NewtonXu
@NewtonXu
Jun 07 2016 22:06
@hnry nah i was testing something out but i dont think it matters
lahowitt
@lahowitt
Jun 07 2016 22:06
Hello-
hnry
@hnry
Jun 07 2016 22:06
it does
NewtonXu
@NewtonXu
Jun 07 2016 22:07
@hnry what do you mean?
@TylerMoeller could you explain a bit what you did, isnt it the same
hnry
@hnry
Jun 07 2016 22:08
@NewtonXu anyway, my advice for simon challenge is to learn object orientated programming
and to go with an object orientated approach
Marc White
@Shwrndasink
Jun 07 2016 22:08
Anyone know how to do the Profile Lookup challenge in JS?
Max Goodman
@maxgrok
Jun 07 2016 22:08
Hey, I'm currently working on the Tribute Page and am having difficulty with reducing the white space next to the image in the center. I've tried margin and padding adjustments. It doesn't quite work. Here's the code pen: http://codepen.io/maxgrok/full/xOGwNw/
Sanchit Dhiman
@sanchit13
Jun 07 2016 22:09
If I want to center a heading and margin: 0 auto; doesn't work, but using margin-left: some pixels; works then what might be the cause?
Tyler Moeller
@TylerMoeller
Jun 07 2016 22:09
@NewtonXu Before, you had sequence(++x, array); called in the first setTimeout, so it was firing before the inner setTimeout finished. Placing that code in the inner setTimeout makes sure it is called after both setTimeouts have completed.
NewtonXu
@NewtonXu
Jun 07 2016 22:09
@hnry i was planning on it but i would still need to make this function work, which is why i started with something very simple
RompePC
@RompePC
Jun 07 2016 22:09
@hnry Simon Game can be done only with two arrays: the total moves and the actual ones, and checking in every move you click
lahowitt
@lahowitt
Jun 07 2016 22:11
I'm trying to build the wikipedia viewer, but I am stuck on how to assign my input bar value to a global variable. I thought this technique worked for my quote generator, but isn't working when I try it now. Here is my code pen: http://codepen.io/lahowitt/pen/BzoxqP
Thanks!
hnry
@hnry
Jun 07 2016 22:11
@RompePC if it's written as objects, its much easier to reason and write
NewtonXu
@NewtonXu
Jun 07 2016 22:11
@TylerMoeller yes that was the problem but i didnt see how to fix it, ill see if this works!
Marc White
@Shwrndasink
Jun 07 2016 22:11
@anyone?
RompePC
@RompePC
Jun 07 2016 22:13
@hnry From my POV, I don't know how can be, altough you need only two arrays, a onclick handler and a constant per panel colour (for the arrays).
NewtonXu
@NewtonXu
Jun 07 2016 22:14
@TylerMoeller Thanks a lot, the function works and the blinking works now too :)
CamperBot
@camperbot
Jun 07 2016 22:14
:cookie: 576 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
newtonxu sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
Tyler Moeller
@TylerMoeller
Jun 07 2016 22:14
@NewtonXu Happy to help :)
@Shwrndasink Yes, I finished that one. Are you looking for some help or want to compare answers?
hnry
@hnry
Jun 07 2016 22:14
@RompePC you just need to learn OOP
Marc White
@Shwrndasink
Jun 07 2016 22:15
@Newton I need help
Tyler Moeller
@TylerMoeller
Jun 07 2016 22:15
help profile lookup
CamperBot
@camperbot
Jun 07 2016 22:15

:point_right: challenge profile lookup [wiki]

Challenge Profile Lookup

Instructions

We have an array of objects representing different people in our contacts lists.

A lookUp function that takes firstName and a property (prop) as arguments has been pre-written for you.

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.

If firstName does not correspond to any contacts then return "No such contact"

If prop does not correspond to any valid properties then return "No such property"

Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code.

:pencil: read more about challenge profile lookup on the FCC Wiki

RompePC
@RompePC
Jun 07 2016 22:16
@hnry I know OOP, and still don't see the benefits for such a simple game
Marc White
@Shwrndasink
Jun 07 2016 22:16
That wiki is nice to know about. Thanks @NewtonXu
CamperBot
@camperbot
Jun 07 2016 22:16
shwrndasink sends brownie points to @newtonxu :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for newtonxu
Tyler Moeller
@TylerMoeller
Jun 07 2016 22:16
@Shwrndasink You're welcome :)
NewtonXu
@NewtonXu
Jun 07 2016 22:16
@Shwrndasink uh i didnt do anything lol
Tyler Moeller
@TylerMoeller
Jun 07 2016 22:17
lol
efeselgr
@efeselgr
Jun 07 2016 22:18
Hi what does "So's I can leave this slum" mean?
does it mean "as soon as I can leave this slum"
Marc White
@Shwrndasink
Jun 07 2016 22:21
Sorry Thanks @TylerMoeller
CamperBot
@camperbot
Jun 07 2016 22:21
shwrndasink sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:cookie: 577 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Jared Abel
@jaredabel
Jun 07 2016 22:21
What do i need to add to my codepen to make http://facebook.github.io/react/docs/tutorial.html
this tutorial work
I have React loaded...
Marc White
@Shwrndasink
Jun 07 2016 22:22
I was trying to return "No such contact"; before I checked the other properties.
Max Goodman
@maxgrok
Jun 07 2016 22:26
Hi. Just finished the Tribute Page. Any feedback would be appreciated. Here's the code pen: http://codepen.io/maxgrok/pen/xOGwNw
Alex Myers
@qckpckt
Jun 07 2016 22:30
Hi all. something weird is happening with my wikipedia project. I built a function to carry out an animation when a particular element loses focus. It works great, but if you give and take away focus twice, it carries out the .focusout function twice causing the box to shrink to nothing.
any ideas why? here is the pen http://codepen.io/qckpckt/pen/BzNxEb
Sanchit Dhiman
@sanchit13
Jun 07 2016 22:31
https://codepen.io/sanchit13/full/yJYKbP/ why is there on a margin on the right side of the page?
UtkarshShukla7
@UtkarshShukla7
Jun 07 2016 22:44
@sanchit13 because your div with class row isn't nested inside div of class container
Enrique Sayago
@esayago
Jun 07 2016 22:45
Hey guys, how can I hide an entire div so I can later make it appear when a button is clicked -
I tried $("c1").hide() before document.ready but you can see it coming up and then disappears ...
Is there a better way to do it?
Ken Haduch
@khaduch
Jun 07 2016 22:47
@esayago you cannot hide it before the document is ready, but how about using a class and assigning it to it with display: none;? Then change it after when you want to display it?
Enrique Sayago
@esayago
Jun 07 2016 22:50
@khaduch let me try that
Ken Haduch
@khaduch
Jun 07 2016 22:50

@esayago - like this:

hideIt {
  display:none;
}

And add class="hideIt": to your div.

Enrique Sayago
@esayago
Jun 07 2016 22:51
@khaduch I made the change thanks a lot, it looks more natural
CamperBot
@camperbot
Jun 07 2016 22:51
esayago sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1279 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Jun 07 2016 22:52
@esayago - great! You're welcome...
Trevor Hunka
@Grizvok
Jun 07 2016 23:06
@khaduch on another note. why do divs that are floated sometimes collapse? im having that problem when i call my function to get a quote for my random quote machine that now my button like jumps up on the page because when i call my getquote function (which i have a jquery delay(500) in there during that 500ms my display is set to display:none and collapses my div that contains the quote
Ken Haduch
@khaduch
Jun 07 2016 23:07
@Grizvok - is the div empty? I think that an empty div doesn't occupy any space unless it has contents, or unless you set some width and height (or min-width, min-height, etc.) to keep it "inflated"? That's my guess, without seeing the code.
Trevor Hunka
@Grizvok
Jun 07 2016 23:10
i believe it is empty for 500ms while i run this code to fade in my quote:
   $("#getquote").on("click", function ()    {
   $($quotecontent).delay(500).fadeOut(1000);    
   timeoutID = window.setTimeout(getRandomQuote, 2000);
   $($quotecontent).delay(500).fadeIn(1500);
i guess the delay from the fadeout until the new quote fades in causes it to collapse?
Ken Haduch
@khaduch
Jun 07 2016 23:15
@Grizvok - fading out does go to display:none', I believe? I think that I just read something about visibility:none; that still makes the things that you change the visibility of still occupy the space that it was occupying? Maybe you can make your fade function do that, instead?
Trevor Hunka
@Grizvok
Jun 07 2016 23:17
yes im looking at the console as the function is callled on my click it does seem to go to display:none for a bit
hmmm i like the idea of just using .animate instead
thanks @khaduch
CamperBot
@camperbot
Jun 07 2016 23:18
grizvok sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1280 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Jun 07 2016 23:21
@Grizvok - you're welcome - I hope you get it working! Good luck!
Trevor Hunka
@Grizvok
Jun 07 2016 23:21
hmmmmm
even better may be calling my actual getquote function as a callback of fadeTo so the timing of the fadein and fadeout syncs perfectly
i will have to play with it
programming is hard! i love it
haha
Sanchit Dhiman
@sanchit13
Jun 07 2016 23:26
@sanchit13
Can anyone tell me why I have a margin on the right side of the page? Been trying to get rid of it forever
https://codepen.io/sanchit13/full/yJYKbP/
Greg Duncan
@GregatGit
Jun 07 2016 23:40
@sanchit13 I don't see the margin
David
@Nachlawi
Jun 07 2016 23:40
@sanchit13 You don't have a margin. Do you want your picture more to the left?
Sanchit Dhiman
@sanchit13
Jun 07 2016 23:41
Screen Shot 2016-06-07 at 7.31.08 PM.png
This is what I mean, notice the scroll bar on the bottom and there's white space on the right side of the div. It only appears when I add any columns to the row div.
Greg Duncan
@GregatGit
Jun 07 2016 23:43
@sanchit13 I think you are using your <header> tags wrong - inside them shouldn't be an information you want to display - also - code pen wraps everying inside the header tags - so you don't have to put them in. Things that would normally go in there - like css and scripts are put in at teh settings
David
@Nachlawi
Jun 07 2016 23:44
@GregatGit That's a <header> section, not a <head> section?
Greg Duncan
@GregatGit
Jun 07 2016 23:45
sorry - you are right
Alex DeCapri
@alexdecapri
Jun 07 2016 23:46
Why won't my controller set the returned postcode my service retrieved to $scope.zipcode?? Using Angular and $http. Thanks!!http://codepen.io/alexanderdd/pen/aZvKmW/
Greg Duncan
@GregatGit
Jun 07 2016 23:47
@sanchit13 I'm using chrome on windows 10 and dont see and margin on the right (or left)
Sanchit Dhiman
@sanchit13
Jun 07 2016 23:48
0.0
Thanks anyways @GregatGit
CamperBot
@camperbot
Jun 07 2016 23:48
sanchit13 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 568 | @gregatgit |http://www.freecodecamp.com/gregatgit
David
@Nachlawi
Jun 07 2016 23:48
@sanchit13 Well, I've found the problem. But I'm not sure why it's a problem....
Sanchit Dhiman
@sanchit13
Jun 07 2016 23:49
@Nachlawi What was it?
Someone else played around with overriding container-fluid and it worked
David
@Nachlawi
Jun 07 2016 23:49
@sanchit13 The problem is with the div row for your aboutme part.
When I remove the <div class="row"> it removes the scroll bar
Sanchit Dhiman
@sanchit13
Jun 07 2016 23:50
@Nachlawi Yeah, whenever i tried adding columns to that row it freaks out. I have no idea why.
David
@Nachlawi
Jun 07 2016 23:50
I don't understand why either, but that is the problem! XD
does someone know JSON here?
If so can you explain to me why json.weather[0].main works, but json.weather.main doesn't work for this API: http://openweathermap.org/current#current_JSON
Coy Sanders
@coymeetsworld
Jun 07 2016 23:53
weather is an array @Nachlawi
its not a json object
David
@Nachlawi
Jun 07 2016 23:55
@coymeetsworld But doesn't that mean that it loads the first element in weather, which is 'id'?
weather[0] being "id":803, weather1 being "main":"Clouds" etc.
Bailey
@coder7215
Jun 07 2016 23:56
Hello! I am working on the tribute page and have everything figured out except how to do the border that the example pen has in the lighter grey. Here is the example pen: https://codepen.io/FreeCodeCamp/full/NNvBQW/.
David
@Nachlawi
Jun 07 2016 23:59
@coder7215 Do you mean the jumbotron? If you want that then make a <div class="jumbotron">.
Coy Sanders
@coymeetsworld
Jun 07 2016 23:59
no weather[0] is the first element of the array, it also coincidentally is the only element of the array @Nachlawi
and that element is a json object, which you would use dot notation to access the properties of like main and temp