These are chat archives for FreeCodeCamp/HelpFrontEnd

13th
Apr 2016
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 00:00
i believe that gets the main page of the wikipedia they provide in the example
Elbert Cortez
@trip16661
Apr 13 2016 00:00
@gpressman also the api route is incorrect too xD
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 00:00
@gpressman your criteria should be where the Main%20 is
ALINATSUI
@ALINATSUI
Apr 13 2016 00:01
@karpimpski to round out the field, maybe try setting border-radius?
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 00:01
@trip16661 is right about incorrect route also, try understanding the api on their site and use the sandbox they provide to get what you want
Michael Karpinski
@karpimpski
Apr 13 2016 00:01
@ALINATSUI the problem was the shadow on the top and left sides, it made the rounding look very weird. I fixed it though! very proud of the product http://codepen.io/karpimpski/pen/eZMYVL
Elbert Cortez
@trip16661
Apr 13 2016 00:02
@gpressman what you want is a
extract
from wikipedia
ALINATSUI
@ALINATSUI
Apr 13 2016 00:03
@karpimpski oh, OK...cool.
Elbert Cortez
@trip16661
Apr 13 2016 00:03
and you also needs the
info
of it so you can access to it's link
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 00:05
@trip16661 thanks that will help me too.. why do we need the extract?
CamperBot
@camperbot
Apr 13 2016 00:05
dueldrawer8 sends brownie points to @trip16661 :sparkles: :thumbsup: :sparkles:
:star: 306 | @trip16661 | http://www.freecodecamp.com/trip16661
Elbert Cortez
@trip16661
Apr 13 2016 00:05
@Dueldrawer8 cuz you need a description for the title you are looking for
and a extract is just that an extract of the page so you can get the important stuff aka
the introduction
how to get there is up to you but those are the main stuff and u should look for that
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 00:07
ive gotten all the info without extract.. although i thought about using it
Gabe Pressman
@gpressman
Apr 13 2016 00:07
I don't know what extract is I suppose, but I'll look into it
Elbert Cortez
@trip16661
Apr 13 2016 00:08
@Dueldrawer8 it allows you to do so much stuff
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 00:09
@trip16661 your right about info though.. i am able to project the info onto my page.. and im about to put each of those searches in a box if that makes sense just like in the example
@trip16661 but i was wondering how they got the title and whenever you click on it, it goes to the wikipedia page
im assuming info does that?
Elbert Cortez
@trip16661
Apr 13 2016 00:10
@gpressman the info contains that
let me see if i can show you an array with my route without spoiling anyone

"batchcomplete": "",
"continue": {
"gsroffset": 10,
"continue": "gsroffset||"
},
"**confidential :D
**": {
"pages": {
"232436": {
"pageid": 232436,
"ns": 0,
"title": "Sidney Lee",
"index": 10,
"extract": "<p><b>Sir Sidney Lee</b> (5 December 1859 – 3 March 1926) was an English biographer and critic.</p>...",
"contentmodel": "wikitext",
"pagelanguage": "en",
"pagelanguagehtmlcode": "en",
"pagelanguagedir": "ltr",
"touched": "2016-04-05T22:34:14Z",
"lastrevid": 708484982,
"length": 3269,
"fullurl": "https://en.wikipedia.org/wiki/Sidney_Lee",
"editurl": "https://en.wikipedia.org/w/index.php?title=Sidney_Lee&action=edit",
"canonicalurl": "https://en.wikipedia.org/wiki/Sidney_Lee"
},
Elbert Cortez
@trip16661
Apr 13 2016 00:16
@Dueldrawer8 something like that which is extremely useful for what we want
M
@raydiatur
Apr 13 2016 00:16
@Dueldrawer8 remember me?
Jeff
@adzam5
Apr 13 2016 00:16
Is it possible to style the little up/down arrows that appear in an <input type="number">?
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 00:16
@raydiatur haha marvin!?
M
@raydiatur
Apr 13 2016 00:16
@Dueldrawer8 yessir!
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 00:18
@trip16661 yes it looks that way.. i think i did it another way and got the intro contents of the wiki pages.. but that would have been easier
@raydiatur yeah man, been coding on here for a while.. my internships didn't pan out for now so just doing projects
M
@raydiatur
Apr 13 2016 00:19
@Dueldrawer8 i pmed you, lets keep it there to not spam up the chat room
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 00:19
true story
Gabe Pressman
@gpressman
Apr 13 2016 00:21
@trip16661 right now, all it's displaying is "batch complete"

I see this block of text in the docs

<link rel="EditURI" type="application/rsd+xml" href="//www.mediawiki.org/w/api.php?action=rsd" />

but I'm not sure how I can format it for what I'm doing
Sergio
@campossrg
Apr 13 2016 00:29

Hello,
I´m Trying to make the portfolio webpage but I find it hard to organize the web in columns.

Could anyone explain me how to give to each <div> the class that allows me to organize them?

Thank you!

Gabe Pressman
@gpressman
Apr 13 2016 00:30
@sergio you have a typo in your html
div-clo
Joe Narvaez
@wordyallen
Apr 13 2016 00:31
Hello I have a question about managing a JSON payload
Gabe Pressman
@gpressman
Apr 13 2016 00:31
other than that, I think you need your container and your row to be separate divs
Aaron Thompkins
@aball6412
Apr 13 2016 00:31
Bootstrap makes this pretty easy. Here is the documentation http://getbootstrap.com/css/#grid. They have neat little columns that will lay everything in a row for you. @campossrg
Michael Karpinski
@karpimpski
Apr 13 2016 00:32
is there any way to style all a statuses (link, visited, hover, and active) in one CSS declaration?
Sergio
@campossrg
Apr 13 2016 00:33
@gpressman @aball6412 Thank you both!
CamperBot
@camperbot
Apr 13 2016 00:33
campossrg sends brownie points to @gpressman and @aball6412 :sparkles: :thumbsup: :sparkles:
:star: 281 | @gpressman | http://www.freecodecamp.com/gpressman
:star: 277 | @aball6412 | http://www.freecodecamp.com/aball6412
Sergio
@campossrg
Apr 13 2016 00:33
I´ll try keep reading documentation :D
Aaron Thompkins
@aball6412
Apr 13 2016 00:35
@campossrg yeah they have some pretty good documentation there! Helped me out a ton. Plus they have tons of examples. Let me know if you get stuck or have any other questions.
Michael Karpinski
@karpimpski
Apr 13 2016 00:37
@campossrg it's best to get used to wrapping every new row in a <div class="row">, then sizing elements inside with "<div class='col-xs-#'>". it's good practice, even if you don't need it for everything
Gabe Pressman
@gpressman
Apr 13 2016 00:42
I'm still stuck on what to do with this json data I'm getting if anyone can help
Bruce Young
@mutantspore
Apr 13 2016 00:44
@gpressman so you are getting what you want now?
Gabe Pressman
@gpressman
Apr 13 2016 00:46
@mutantspore it's sending to the right place, but I don't know how to parse through it
Bruce Young
@mutantspore
Apr 13 2016 00:46
can I see it?
M
@raydiatur
Apr 13 2016 00:46
alright yall, i made my tribute page, its functional and basic but i want to add a lot more to make it look a little bit more like the example. any feedback welcome: http://codepen.io/raydiatur/pen/WwMMdr
Jeff
@adzam5
Apr 13 2016 00:49
@raydiatur Looking good! You should read The Paypal Wars, if you haven't already read it. Great book about what Musk and PayPal went thru in the beginning.
M
@raydiatur
Apr 13 2016 00:50
@adzam5 thank you! i want to finish my current books (currently 3) then read his biography, that one next absolutely
CamperBot
@camperbot
Apr 13 2016 00:50
raydiatur sends brownie points to @adzam5 :sparkles: :thumbsup: :sparkles:
:star: 402 | @adzam5 | http://www.freecodecamp.com/adzam5
Joe Narvaez
@wordyallen
Apr 13 2016 00:52
hello. can someone please DRY up like 15 lines of code?
Robert Friedman
@robfr77
Apr 13 2016 00:52

does anyone have any experience pulling the weather icon from the open weather site? can you offer any advice? I've started with this:

function showWeather() {
    var weatherID = val.weather[0].icon;
    return $(".weather_icon").prepend("http://openweathermap.org/img/w/10d.png");
  }

I know the way I am doing the prepend is the problem, can anyone help?

Joe Narvaez
@wordyallen
Apr 13 2016 00:52
I feel like its obvious but I'm not seeing it
Stephen James
@sjames1958gm
Apr 13 2016 00:54
@robfr77 You probably need a img tag and make that the src attribute.
Tyler Moeller
@TylerMoeller
Apr 13 2016 00:55
@gpressman You're getting "batchcomplete" because the criteria variable isn't getting populated.
Instead of criteria = $("criteia").text() use: criteria = $("#criteria").val()
Also, make sure that variable gets defined when the user searches - so move it into your search function:
$("#search").click(function(){
  criteria = $("#criteria").val()
...
Stephen James
@sjames1958gm
Apr 13 2016 00:55
@wordyallen I guess I could try :)
Joe Narvaez
@wordyallen
Apr 13 2016 00:55
thank you
I feel like I'm repeating myself...
depending on the button the user clicks I have to change my object's properties but the properties are very similar
          let displayName
          if(authData.twitter){
            displayName = authData.twitter.displayName
          }else if(authData.facebook){
            displayName = authData.facebook.displayName
          } else{
            displayName = authData.google.displayName
          }

          dispatch({
            type: 'LOGIN_USER',
            username: displayName
          })
Gabe Pressman
@gpressman
Apr 13 2016 00:57
@TylerMoeller I guess it "works" it searches for undefined
Stephen James
@sjames1958gm
Apr 13 2016 00:58
@wordyallen I don't see much you could do with that - anything you might do would save much and probably decrease readability
Joe Narvaez
@wordyallen
Apr 13 2016 00:58
good point
Tyler Moeller
@TylerMoeller
Apr 13 2016 00:58
@gpressman You didn't move the criteria var into your search function, so "criteria" is undefined
Joe Narvaez
@wordyallen
Apr 13 2016 00:58
yeah.. I think I'm going to leave it as is
Stephen James
@sjames1958gm
Apr 13 2016 00:58
@wordyallen :shipit:
Joe Narvaez
@wordyallen
Apr 13 2016 00:59
awesome!
Tyler Moeller
@TylerMoeller
Apr 13 2016 00:59
@gpressman Also, take note of the spelling of criteria and use a # in front in jQuery to indicate it's an ID:
not criteria = $("criteia").val()
This: criteria = $("#criteria").val()
Gabe Pressman
@gpressman
Apr 13 2016 01:01
now I get batch complete again?
Robert Friedman
@robfr77
Apr 13 2016 01:03
thanks @sjames1958gm got it
CamperBot
@camperbot
Apr 13 2016 01:03
robfr77 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 610 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Tyler Moeller
@TylerMoeller
Apr 13 2016 01:03
@gpressman Does your code look like this?
    $("#search").click(function(){
    criteria = $("#criteria").val()
        $.getJSON("https://en.wikipedia.org/w/api.php?action=query&titles="+ criteria + "&prop=revisions&rvprop=content&format=json&callback=?", function(json){
            console.log(json.query.pages)
        })
    })
@gpressman Is your criteria var defined inside that search click function?
All you are doing is getting an empty text field by defining criteria at the beginning of your js - no one has typed anything yet
Gabe Pressman
@gpressman
Apr 13 2016 01:05
ahhh
blamo
thanks @TylerMoeller
CamperBot
@camperbot
Apr 13 2016 01:05
gpressman sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star: 493 | @tylermoeller | http://www.freecodecamp.com/tylermoeller
Gabe Pressman
@gpressman
Apr 13 2016 01:06
now hopefully I can deal with this mess
Tyler Moeller
@TylerMoeller
Apr 13 2016 01:06
That's a lot of JSON to parse - good luck ;)
Glad we got that working
Gabe Pressman
@gpressman
Apr 13 2016 01:06
well, I guess too much json to parse is better than turning up nothing
Michael Karpinski
@karpimpski
Apr 13 2016 01:06
how do you edit CSS so that it is set for every child element?
Med K
@Gitnaut
Apr 13 2016 01:17
What would be the easiest way to make two column elements where one is text and the other is an image and explanatory text below the image (I may want to add several rows of text below the image, not related to the text on the left side of the page), and the text from the left hand column of the page wraps around the bottom of the image on the row after the image column ends, regardless of what text is put there.
Basically an image and quick reference lines on the top right part of a container, and text that occupies the left side and underneath the image and reference lines
Bruce Young
@mutantspore
Apr 13 2016 01:20
@Gitnaut have a look at bootstrap Media objects
http://getbootstrap.com/components/#media
Jessica Dembe
@jmdembe
Apr 13 2016 01:21
So I am building a personal portfolio page. I want my navigator bar text to be on the right. Is it okay to do it like this with the float:right property? http://codepen.io/thatssojessy/pen/BKraWL
take a look at the HTML
Gabe Pressman
@gpressman
Apr 13 2016 01:22
is that how you want it to look?
Jessica Dembe
@jmdembe
Apr 13 2016 01:26
It is how I want it to look. I was like "but why do I have to write the HTML in the reverse order". You know what I'm saying?
Gabe Pressman
@gpressman
Apr 13 2016 01:28
I don't have a good explanation besides "that's how float works" you could probably use bootstrap columns to put it over there without having to do it in reverse
Stephen James
@sjames1958gm
Apr 13 2016 01:28
@jessica-dembe When you float they float all the way to the right so the first one floats the farthest, so yes reverse order is required.
Jeff
@adzam5
Apr 13 2016 01:30
Are there any benefits or drawbacks to populating select box options from a database via javascript vs php?
Michael Karpinski
@karpimpski
Apr 13 2016 01:32
http://codepen.io/karpimpski/pen/eZMYVL I'm trying to align my results up with my search bar so that the left border of both is equal, but there's a problem. I removed the bullet points, but it's almost as if I hid them, because the text is still moved to the right as if there were still bullets there. how can I size this right so that my results and search bar align on small and large devices?
well they're actually not to the right, looks like the wiki articles are too far to the left
Stephen James
@sjames1958gm
Apr 13 2016 01:34
@karpimpski Looks like you have double divs you want <div class='col-xs-2 col-xs-8'> but you have <div class='col-xs-2><div class='col-xs-8'>
Michael Karpinski
@karpimpski
Apr 13 2016 01:35
@sjames1958gm I have it like <div class='col-xs-2></div> so that 2 columns are taken up on that row
Stephen James
@sjames1958gm
Apr 13 2016 01:35
@karpimpski Maybe you want that it loos odd
@karpimpski <div class='col-xs-offset-2 col-xs-8'> the offset says shift by two columns
Michael Karpinski
@karpimpski
Apr 13 2016 01:36
@sjames1958gm does that have the same effect as what I've been doing?
Stephen James
@sjames1958gm
Apr 13 2016 01:36
@karpimpski I think so
Michael Karpinski
@karpimpski
Apr 13 2016 01:37
@sjames1958gm it does, thanks! that doesn't solve my sizing problem though
CamperBot
@camperbot
Apr 13 2016 01:37
karpimpski sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 611 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Apr 13 2016 01:37
@karpimpski Not sure it will solve your issue, but you have it in a nice function so easy to try.
Jeff
@adzam5
Apr 13 2016 01:37
@karpimpski You can play with the ul left padding
Michael Karpinski
@karpimpski
Apr 13 2016 01:38
@sjames1958gm yeah, it helps clean up the code but not much else. @adzam5 on certain screen sizes it's perfect, so I don't want to manually change the padding because it will make those messed up
Jeff
@adzam5
Apr 13 2016 01:40
@karpimpski What about setting ul padding to 0 and putting the ul in a div with the same col classes as the search box?
Tomasz Turek
@TTomaszito
Apr 13 2016 01:42
This message was deleted
Stephen James
@sjames1958gm
Apr 13 2016 01:42
@karpimpski You don't have a closing on your li but that doesn't appear to make any difference
Michael Karpinski
@karpimpski
Apr 13 2016 01:42
@adzam5 for some reason that pushes it further to the right on small screens and stays the same on larger screens
@sjames1958gm fixed that, but yeah. no change
@adzam5 I figured out why that change pushed it inwards, it was because I offset the ul twice. but still, it makes it look stranger than before
Tomasz Turek
@TTomaszito
Apr 13 2016 01:47
https://codepen.io/TTomaszito/pen/RaQOBQ I didnt save my code pen last time. Anyone know how to get the fixed banner and the relative banner line up?
Stephen James
@sjames1958gm
Apr 13 2016 01:47
@karpimpski Looks like you close your container div before your ul div
@sjames1958gm Click on tidy and see that your ul div is not at the same indent as the search bar you have an extra closing div
@sjames1958gm Line 14
Jeff
@adzam5
Apr 13 2016 01:48
@karpimpski You have your ul within a row class, then you are also declaring a row class within the ul.
Michael Karpinski
@karpimpski
Apr 13 2016 01:48
@sjames1958gm fixed that, thanks!
CamperBot
@camperbot
Apr 13 2016 01:48
karpimpski sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:warning: karpimpski already gave sjames1958gm points
Michael Karpinski
@karpimpski
Apr 13 2016 01:48
@adzam5 I'll fix that now
@adzam5 that fixed it! thank you!
CamperBot
@camperbot
Apr 13 2016 01:49
karpimpski sends brownie points to @adzam5 :sparkles: :thumbsup: :sparkles:
Stephen James
@sjames1958gm
Apr 13 2016 01:49
@karpimpski the xs in col-xs-8 means extra small screens. So those shouldn't affect larger screens you have sm, md, lg as well
CamperBot
@camperbot
Apr 13 2016 01:49
:star: 403 | @adzam5 | http://www.freecodecamp.com/adzam5
Michael Karpinski
@karpimpski
Apr 13 2016 01:50
@sjames1958gm I know what the xs means. if you have just one size that's how it is on all screens. you only need to do all 4 if you want to have different displays on different sized screens
Stephen James
@sjames1958gm
Apr 13 2016 01:51
ah, ok
Jeff
@adzam5
Apr 13 2016 01:51
@karpimpski No problem
Ryan Elliott
@Ryan104
Apr 13 2016 01:52
Hi everyone. I'm having trouble getting started with APIs and would appreciate some help. When i try to use jQuery to access the json I get a "XMLHttpRequest cannot load" message. However if I follow the link directly I can see the information I want. Please take a look http://codepen.io/Ryan104/pen/LNdPRQ?editors=0010
Currently Im just trying to display the json once retrieved
Michael Karpinski
@karpimpski
Apr 13 2016 01:54
@Ryan104 try wrapping your Ajax request in a function, and when you click redirect your code to that function
@Ryan104 crap not ajax
Stephen James
@sjames1958gm
Apr 13 2016 01:55
@Ryan104 Looks like a cross origin issue.
Michael Karpinski
@karpimpski
Apr 13 2016 01:55
@Ryan104 sorry, just got off the first Ajax project, a lot of people have trouble with those APIs on the quote machine. I don't think anything's wrong with your code
Stephen James
@sjames1958gm
Apr 13 2016 01:56
You are getting a cross origin request. Normally you have to use JSONP - a protocol that circumvents cross origin, but not sure that API supports it
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access.
Ryan Elliott
@Ryan104
Apr 13 2016 01:56
@karpimpski hmm ok. Ive tried a few apis with the same error.
Gabe Pressman
@gpressman
Apr 13 2016 01:57
can anyone help me with this mess of json? I don't know where to begin
Michael Karpinski
@karpimpski
Apr 13 2016 01:57
@Ryan104 yeah, I personally didn't use an API, I wanted to use my own quotes
Michael Karpinski
@karpimpski
Apr 13 2016 01:57
@gpressman if your problem is having a jumbled up JSON page, go here: https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc
Ryan Elliott
@Ryan104
Apr 13 2016 01:57
@sjames1958gm So it's just not open for public access?
Stephen James
@sjames1958gm
Apr 13 2016 01:58
@Ryan104 Kind of -
Ryan Elliott
@Ryan104
Apr 13 2016 01:59
@karpimpski did you create another codepen with your own custom JSON database of quotes?
Stephen James
@sjames1958gm
Apr 13 2016 01:59
If you use $.getJSON and add &callback=? to your API URL then it will give you a different error, this API doesn't seem to support JSONP you might try one of the other one again.
Michael Karpinski
@karpimpski
Apr 13 2016 02:00
@Ryan104 no, I didn't think of that when I did it. honestly not sure how I would access it (if you know, please let me know). I just made 2 arrays for quotes and authors
Studio72 G.j.L.-Entertainment
@syronTill
Apr 13 2016 02:01
Thanks on me help
Gabe Pressman
@gpressman
Apr 13 2016 02:03
@karpimpski I'm not sure that's what I need, I just can't figure out how to pull specifics out of the json I have
Ryan Elliott
@Ryan104
Apr 13 2016 02:04
@karpimpski this post mentioned that idea https://blog.codepen.io/2013/09/23/ajax-codepen/
@karpimpski I think ill give that a try though it feels a little like a cheat
Greg Duncan
@GregatGit
Apr 13 2016 02:05
@gpressman copy the object and paste it here https://repl.it/ , and you can play around with it
Elbert Cortez
@trip16661
Apr 13 2016 02:05
@gpressman you still have the wrong route xD
Gabe Pressman
@gpressman
Apr 13 2016 02:06
@trip16661 not really sure where to find it..
Matthew
@mbindewald
Apr 13 2016 02:08
Hey guys, I'm doing the Random Quote Generator and trying to figure out why my button isn't working
any ideas?
None of the code that should run from the button being clicked does
Also haven't had any luck when it's within $(document).ready(...)
Ryan Elliott
@Ryan104
Apr 13 2016 02:12
@mbindewald make sure you have the jQuery JS file added in the settings
Stephen James
@sjames1958gm
Apr 13 2016 02:12
@Ryan104 Thats it
Matthew
@mbindewald
Apr 13 2016 02:12
yup
wow
thanks a ton man
I've spent like an hour straight trying to figure out what was wrong lol
Coy Sanders
@coymeetsworld
Apr 13 2016 02:13
quick @Ryan104 lol, just saw that too
Ryan Elliott
@Ryan104
Apr 13 2016 02:13
@mbindewald haha no problem
Stephen James
@sjames1958gm
Apr 13 2016 02:13
@Ryan104 :clap:
Elbert Cortez
@trip16661
Apr 13 2016 02:14
@mbindewald u are not using jquery
@mbindewald oh wait someone just answered already ahahaha
Matthew
@mbindewald
Apr 13 2016 02:14
@trip16661 :)
Gabe Pressman
@gpressman
Apr 13 2016 02:15
@trip16661 am I supposed to change the action?
Elbert Cortez
@trip16661
Apr 13 2016 02:19
@gpressman you need to do a query
Gabe Pressman
@gpressman
Apr 13 2016 02:20
@trip16661 that's what I have, then I came across "opensearch" and it looked promising
Elbert Cortez
@trip16661
Apr 13 2016 02:20
wheere you are going to extract part of it through the extract property and then generate it
Javier
@sh1g
Apr 13 2016 02:22
hello all, I'm hitting a roadblock trying to use an API for my quote generator. I can create an array and cycle through that but I want to use an API yet I'm failing to wrap my head around it
Elbert Cortez
@trip16661
Apr 13 2016 02:22
"pages": {
"12736609": {
"pageid": 12736609,
"ns": 0,
"title": "Obama",
"revisions": [
{
"contentformat": "text/x-wiki",
"contentmodel": "wikitext",
"*": "#REDIRECT [[Barack Obama]]\n\n{{Redr|hatnote|from surname|p2=nocat|from incomplete name|printworthy|protected}}"
}
]
}
}
this is what you are getting
@sh1g what is exactly confusing you ?
Aaron Thompkins
@aball6412
Apr 13 2016 02:27
@sh1g what part are you stuck on? Connecting with the API? Or simply using the information that was returned?
Gabe Pressman
@gpressman
Apr 13 2016 02:28
@trip16661 ok, I changed it to prop=extracts and I'm getting a different response at least, not what I need, but better. I gotto run out, but thanks, hopefully I can finish when I get home or tomorrow
CamperBot
@camperbot
Apr 13 2016 02:28
gpressman sends brownie points to @trip16661 :sparkles: :thumbsup: :sparkles:
:star: 307 | @trip16661 | http://www.freecodecamp.com/trip16661
Javier
@sh1g
Apr 13 2016 02:41
@aball6412 it was connecting to the API. Turns out I was using one that is not allowed. whoops xD
Elbert Cortez
@trip16661
Apr 13 2016 02:44
okay now im going to stop wasting time and work on my things xD
Mpkuehn33
@Mpkuehn33
Apr 13 2016 03:03

Everything works, but it prints out "Undefined" whenever it prints feeds[x]. Why is feeds[x] undefined?? I defined feeds in a global scope, not sure what I'm doing wrong :( Here is the code: var feeds = ["Towellie", "TrumpSC", "TeamSp00ky", "TwitchPlaysPokemon", "Widgitybear", "AriaBlarg", "TheMexicanRunner", "OPNerd", "rabbitbong", "Wingsofdeath"];

$(document).ready(function(){
for(x = 0; x < feeds.length; x++){
$.getJSON('https://api.twitch.tv/kraken/streams/' + feeds[x] + '?callback=?', function(data) {
console.log(data.stream);
if(data.stream === null){
$('#feeds').append("<p>" + feeds[x] + " is offline </p>");
}else{
$('#feeds').append("<p>" + feeds[x] + " is streaming " + (data.stream.game) + "/<p>");
}
});
}

})

Coy Sanders
@coymeetsworld
Apr 13 2016 03:19
need to declare x
var x = 0;
Michael Karpinski
@karpimpski
Apr 13 2016 03:23
http://codepen.io/karpimpski/pen/eZMYVL completed Wiki viewer! thanks to everybody who helped me earlier!
Gabe Pressman
@gpressman
Apr 13 2016 03:25
@karpimpski looks great, any chance you could provide some assistance?
Michael Karpinski
@karpimpski
Apr 13 2016 03:25
@gpressman I'll definitely try!
I think I'm still going to the wrong link, someone here kept recommending changing prop to extracts but that's not really what I want
put your criteria variable after that
wiki help
CamperBot
@camperbot
Apr 13 2016 03:28

:point_right: coding help [wiki]

Coding Help

I started this list while doing Algorithms, noticing a few things that were common issues / questions but I think most of them are going to be useful to people coding in general. If you've got some tips to help people code I'd love to hear them.

  1. If you don't know where to start, write some pseudocode. Plan out the logic you're trying to implement in your native language before you try to put it into code.

  2. Comment your code! Can't stress that one enough, if you get lost or take a break then come back you need to know what your code is trying to do. It will also reinforce what the code means to you, and help other people understand what your code does if you get stuck and ask for help. If you've got a any other tips for campers I'd love to see them!

  3. Use the chrome javascript debugger console in conjunction with something like netbeans IDE or sublime text to write your code. Both are free to download. <br />
    The free code camp window is great but you can get a lot more feedback on your code's behaviour by using chrome's JS debugger and a bunch of console.log(myVariableGoesHere); <br />
    https://developer.chrome.com/devtools/docs/console <br />
    http://www.sublimetext.com/ <br />
    https://netbeans.org/downloads/

  4. Posting your code in gitter is as simple as adding a line consisting of only

    ```

    Then your code on the next lines, followed by a final

    ```

:pencil: read more about coding help on the FCC Wiki

Gabe Pressman
@gpressman
Apr 13 2016 03:28
ahh, where did you find that? I had a ton of trouble with the docs for this api tbh
Murphy Newell
@severick
Apr 13 2016 03:29
Hi guys, new here.
Michael Karpinski
@karpimpski
Apr 13 2016 03:29
@gpressman I checked out Udacity's Ajax course, that helped a ton! I got the link from there
Gabe Pressman
@gpressman
Apr 13 2016 03:29
ahh
I need to check it out
the json/ajax section left something to be desired
hi Murphy how are you
Murphy Newell
@severick
Apr 13 2016 03:30
Pretty good. trying to figure out this portfolio site
how are you
Michael Karpinski
@karpimpski
Apr 13 2016 03:30
@gpressman it's pretty short, especially if you just look at the Wikipedia section. yeah, that section needs to be updated a lot, it's really lacking. I'm heading off for a bit, but I hope the link helps and I'll be back on soon if you want to mention my name for any future help!
Gabe Pressman
@gpressman
Apr 13 2016 03:31
@karpimpski thanks, this was very helpful to begin with
CamperBot
@camperbot
Apr 13 2016 03:31
gpressman sends brownie points to @karpimpski :sparkles: :thumbsup: :sparkles:
:star: 292 | @karpimpski | http://www.freecodecamp.com/karpimpski
Gabe Pressman
@gpressman
Apr 13 2016 03:31
@severick I'm good, it's been a frustrating night, but comes with the territory
Murphy Newell
@severick
Apr 13 2016 03:32
@gpressman for sure haha
Michael Karpinski
@karpimpski
Apr 13 2016 03:32
@gpressman before I leave, make sure you have the Chrome JSONView extension. then, when you're trying to access data to push it to your page, put in the link for any search query and look at the JSON inside with the extension. it really helped me out!
Gabe Pressman
@gpressman
Apr 13 2016 03:33
@karpimpski do I need ajax to use the link you provided? because I'm getting an error right now
if I have to learn more I'll call it a night and do it tomorrow
Michael Karpinski
@karpimpski
Apr 13 2016 03:33
@gpressman you may need ajax, I didn't try it without Ajax
Mpkuehn33
@Mpkuehn33
Apr 13 2016 03:33
dude, just use jquery $.getJSON()
its so much easier
Michael Karpinski
@karpimpski
Apr 13 2016 03:34
@Mpkuehn33 he is
@Mpkuehn33 and I personally think the JQuery's $.ajax() function is a lot easier. I guess it varies
Gabe Pressman
@gpressman
Apr 13 2016 03:35
@karpimpski and I'll figure that out tomorrow, I've expended all my mental energy for tonight
Michael Karpinski
@karpimpski
Apr 13 2016 03:35
@gpressman enjoy your night then, sir. happy I could help, even if it was just a little
Gabe Pressman
@gpressman
Apr 13 2016 03:35
@karpimpski you helped a lot
Mpkuehn33
@Mpkuehn33
Apr 13 2016 03:35
admittedly, i have no idea what ajax is - i just used $.getJSON() and it returned the object's i wanted
Gabe Pressman
@gpressman
Apr 13 2016 03:35
it's displaying what I need now
@karpimpski I just need to figure out what to do with that data
Michael Karpinski
@karpimpski
Apr 13 2016 03:36
@gpressman well if you need any help, make sure you mention my name. I'd love to help, we can both learn!
Gabe Pressman
@gpressman
Apr 13 2016 03:37
@karpimpski sounds good, I'm mostly here to learn javascript, eventually move into fullstack js stuff, but I've been using Ruby on Rails for over a year, so if you have any interest I'd be happy to help with that
Jeff
@adzam5
Apr 13 2016 03:46
How can I make divs resizable? Similar to the codepen layout
I would rather not use jQuery UI
Frank XC
@tenkdayz
Apr 13 2016 03:52
@adzam5 I thnik those are textareas
Carrie A
@tuningmind
Apr 13 2016 03:52
@karpimpski you mention Udacity's Ajax course; have you gone through that?
Jeff
@adzam5
Apr 13 2016 03:53
@tenkdayz What about the part that renders your code? I'm messing around with the css resize property, but its not really working like I want
Frank XC
@tenkdayz
Apr 13 2016 04:00
@adzam5 I think the code is sent to a database and then it's compiled from there.. Im not sure though
Reginald Davis
@madblkman
Apr 13 2016 04:02
This message was deleted
Oops...
I've been working on my random code generator and for the most part I got it to work. But when I try to tweet the quote, when it jumps to the twitter composer it leaves a bunch of spaces before and after the quote. Anyone have any ideas on what could be causing this issue?
Joe Narvaez
@wordyallen
Apr 13 2016 04:05
This message was deleted
@madblkman yeah you are not encoding the quote
Reginald Davis
@madblkman
Apr 13 2016 04:07
I just figured it out...
Joe Narvaez
@wordyallen
Apr 13 2016 04:07
awesome
Reginald Davis
@madblkman
Apr 13 2016 04:07
Thanks for the help @wordyallen
CamperBot
@camperbot
Apr 13 2016 04:07
madblkman sends brownie points to @wordyallen :sparkles: :thumbsup: :sparkles:
:star: 390 | @wordyallen | http://www.freecodecamp.com/wordyallen
TobyChow
@TobyChow
Apr 13 2016 04:12
Hi, I have an issue with the pomodoro clock where there is a slightly longer delay at 59 seconds. If someone can take a look at my code that would be great
http://codepen.io/Toe125/pen/pyLJyJ
Javier
@sh1g
Apr 13 2016 04:22
well this is strange. This API was working 30 seconds ago. I just refreshed my page and now it's telling me that "No 'Access-Control-Allow-Origin' header is present on the requested resource."
Joe Narvaez
@wordyallen
Apr 13 2016 04:22
I hate that stuff
Paul Borawski
@iAmNawa
Apr 13 2016 04:33
@Toe125 maybe it’s because you are doing document.ready
h4r1m4u
@h4r1m4u
Apr 13 2016 04:37

@Toe125 it's because of the order of your code in the first if. change it to this:

        if (startWorkSeconds - 1 >= 0) {
            startWorkSeconds -= 1;
            $("#seconds-display").html(startWorkSeconds + ' ');          
        }

with your original code you're displaying 59 seconds twice

Jackson Bates
@JacksonBates
Apr 13 2016 04:38
I've been updating my portfolio from the first set of challenges and I noticed that some of the links don't work on my iPhone 6s (the nav anchor links for about, portfolio and contact, or the 'view project' links in each portfolio thumbnail) - the FreeCodeCamp link in the opening text does work though, and all links work properly on my laptop - any ideas why this might be happening? http://codepen.io/Malgalin/pen/ONgawY
TobyChow
@TobyChow
Apr 13 2016 04:40
@h4r1m4u thanks!
CamperBot
@camperbot
Apr 13 2016 04:40
toe125 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1762 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Apr 13 2016 04:40
np
Justin
@daemedeor
Apr 13 2016 04:53
@JacksonBates i'm testing it out now, i notice the error but did you know you can open the terminal for iOS?
Jackson Bates
@JacksonBates
Apr 13 2016 04:54
@daemedeor what do you mean?
Justin
@daemedeor
Apr 13 2016 04:54
the console
Eldar Tinjić
@EldarT90
Apr 13 2016 04:54
@iAmNawa tnx
CamperBot
@camperbot
Apr 13 2016 04:54
eldart90 sends brownie points to @iamnawa :sparkles: :thumbsup: :sparkles:
:star: 405 | @iamnawa | http://www.freecodecamp.com/iamnawa
i mean
Jackson Bates
@JacksonBates
Apr 13 2016 04:54
@daemedeor no, I didn't know that - I'll check the link...
Justin
@daemedeor
Apr 13 2016 04:54
@EldarT90 sorry XD
Eldar Tinjić
@EldarT90
Apr 13 2016 04:55
@daemedeor np ^^
Justin
@daemedeor
Apr 13 2016 05:00
@JacksonBates i can recreate your problem but i can't find out why so one moment
@JacksonBates The <a> name attribute is not supported in HTML5. Use the id attribute instead.
btw ... XD
Jackson Bates
@JacksonBates
Apr 13 2016 05:03
@daemedeor I have a small suspicion it may be a codepen issue, but I'll have to mess around with local hosting to confirm it...which I can't be bothered with a the moment :)
@daemedeor do you just mean swap name="Contact" with id="Contact"?
Justin
@daemedeor
Apr 13 2016 05:03
@JacksonBates yes
Jackson Bates
@JacksonBates
Apr 13 2016 05:04
@daemedeor cool, I did not know that...I have only recently started paying attention to HTML5, thanks for the tip :)
CamperBot
@camperbot
Apr 13 2016 05:04
jacksonbates sends brownie points to @daemedeor :sparkles: :thumbsup: :sparkles:
:star: 326 | @daemedeor | http://www.freecodecamp.com/daemedeor
Justin
@daemedeor
Apr 13 2016 05:04
i actually had to look it up, i only stayed in html5 mode XD
jorgon1022
@jorgon1022
Apr 13 2016 05:07
hey guys can any of you help me with a bonfire?
CamperBot
@camperbot
Apr 13 2016 05:07
type bonfire name to get some info on that bonfire. And check HelpBonfires chatroom
jorgon1022
@jorgon1022
Apr 13 2016 05:07
Escape Sequences in Strings
Frank XC
@tenkdayz
Apr 13 2016 05:21
@jorgon1022 go
Chad Kreutzer
@ChadKreutzer
Apr 13 2016 05:55
This message was deleted
Frank XC
@tenkdayz
Apr 13 2016 06:01
This message was deleted
V Arun Kumar
@arunvkumr
Apr 13 2016 07:07
is there an way to fix a div( using position: fixed) and also use float right property. i have been trying but not working.. here my pen.codepen link
Frank XC
@tenkdayz
Apr 13 2016 07:07
@arunkumrv position: fixed; left: 0
V Arun Kumar
@arunvkumr
Apr 13 2016 07:08
@tenkdayz if i do that.. then float right doesn't work.
Frank XC
@tenkdayz
Apr 13 2016 07:09
what about right:0
that's what i meant.
V Arun Kumar
@arunvkumr
Apr 13 2016 07:10
it works but it moves to the right corner of my page.. i want it in the corner of my bootstrap column.
kirbyedy
@kirbyedy
Apr 13 2016 07:20
@arunkumrv please dont do this:
.col-lg-1,
.col-md-1,
.col-sm-1,
.col-xs-1,
.col-lg-10,
.col-md-10,
.col-sm-10,
.col-xs-10{
  padding: 0;
}
V Arun Kumar
@arunvkumr
Apr 13 2016 07:21
@tenkdayz this is the closest i can come up with.. what i wanted was to make a div much like a side-nav which will move along as i scroll the page.
Frank XC
@tenkdayz
Apr 13 2016 07:24
@arunkumrv you might need a container div for it.. right after the body tag.. If you want it to do what I think you want it to do. then add pos fixed to that div.
Justin
@daemedeor
Apr 13 2016 07:25
@kirbyedy its breaking bootstrap but i don't see why not?
kirbyedy
@kirbyedy
Apr 13 2016 07:26
its not a good practice
V Arun Kumar
@arunvkumr
Apr 13 2016 07:26
@kirbyedy is there any other way to remove the default padding of columns?
kirbyedy
@kirbyedy
Apr 13 2016 07:26
its confusing, better to assign class
Justin
@daemedeor
Apr 13 2016 07:26
@kirbyedy fair enough i think they have a class for it though
kirbyedy
@kirbyedy
Apr 13 2016 07:26
it will be easier to debug in cases when the site grows
Justin
@daemedeor
Apr 13 2016 07:26
@arunkumrv i need to look it up but htey should have a no-padding class
i ie
lie
not that its hard to create a class like that
.no-padding { padding: 0 !important; }
done
V Arun Kumar
@arunvkumr
Apr 13 2016 07:36
@daemedeor @kirbyedy thanks :smile:
CamperBot
@camperbot
Apr 13 2016 07:36
arunkumrv sends brownie points to @daemedeor and @kirbyedy :sparkles: :thumbsup: :sparkles:
:star: 847 | @kirbyedy | http://www.freecodecamp.com/kirbyedy
:star: 335 | @daemedeor | http://www.freecodecamp.com/daemedeor
V Arun Kumar
@arunvkumr
Apr 13 2016 07:40
@tenkdayz thanks. i'll try that
CamperBot
@camperbot
Apr 13 2016 07:40
arunkumrv sends brownie points to @tenkdayz :sparkles: :thumbsup: :sparkles:
:star: 372 | @tenkdayz | http://www.freecodecamp.com/tenkdayz
Shivam Arora
@shivamarora13
Apr 13 2016 08:17
How do I get value from a modal, and store it in a variable
?
from modal, I refer here to bootstrap modal
Shivam Arora
@shivamarora13
Apr 13 2016 08:23
?
can anybody help?
h4r1m4u
@h4r1m4u
Apr 13 2016 08:29
@shivamarora13 same way you'd get it from anywhere else in your page. i'm assuming the user chooses something in the modal and you want to get whatever it is they choose? write a click handler for the element they click when choosing the option
Shivam Arora
@shivamarora13
Apr 13 2016 08:32
@h4r1m4u Ok..
Crooper
@Crooper
Apr 13 2016 09:22
Hey I submitted the wrong link to one project. Should I do anything or just resubmit it when I'm done?
Chad Kreutzer
@ChadKreutzer
Apr 13 2016 09:22
obviously this still needs to be pretty-ified, but can i get a look over of the functionality. http://codepen.io/ChadKreutzer/pen/oxpOGe?editors=1010
Especially inasmuch as I'm not loving all the globals, but I'm not sure I have much of a choice with the interval thing
Also I've had one report of the pause and reset not working right, but they both work on both my computer and my phone. Browser compatibility issue?
h4r1m4u
@h4r1m4u
Apr 13 2016 09:35
@Crooper just resubmit when done. it's not a biggie. the project don't get check until the certificate issuance anyway
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:36
@h4r1m4u need some help with logic and maybe hint on project, doing wikipedia viewer.
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 09:37
morning :)
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:37
@h4r1m4u ive gotten so far as when you type text in box it displays the info i want to the page
@juliankrispel morning!
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 09:37
:)
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:37
now im working on the logic of trying to build a border box around each <p> element
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 09:38
can I help?
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:38
always
if you do a search you see the text correct?
Capzlock
@Capzlock
Apr 13 2016 09:38
Anyone know media queries?
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 09:38
@Capzlock yep
GodGreeny
@GodGreeny
Apr 13 2016 09:39
Can anyone help me to understand why these aren't being centered? http://codepen.io/GodGreeny/full/NNYxLe/
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:39
i basically am trying to create a border around reach one of those <p> tags
h4r1m4u
@h4r1m4u
Apr 13 2016 09:39
@Dueldrawer8 you've got all the hard work done. you just need some CSS for those <p>s
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 09:39
@Dueldrawer8 what he said ^
Capzlock
@Capzlock
Apr 13 2016 09:39
body {
    color: #635959;
}
header {
    background-color: #242323;
    color: #EFEFEF;
}
h3, article > h4 {
    color: #8C1018;
}
article a {
    color: #314052;
}
h4r1m4u
@h4r1m4u
Apr 13 2016 09:39
#workspace p { // your style }
Capzlock
@Capzlock
Apr 13 2016 09:39
This is at the top of my style sheet. Simple. It works.
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 09:39
Capzlock
@Capzlock
Apr 13 2016 09:39

@media not print {
    body {
        color: #635959;    
    }
    header {
        background-color: #242323;
        color: #EFEFEF;
    }
    h3, article h4 {
        color: #8C1018;
    }
    article a {
        color: #314052;
    }
}
This is at the bottom. It does not work.
I do not know why.
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 09:40
I don't think not print is valid syntax
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:41
@h4r1m4u so whenever the search is complete it will enclose each in a border?
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 09:41
@Capzlock what doesn't work exactly?
Capzlock
@Capzlock
Apr 13 2016 09:41
I just want all of that styling to not work whenever I print it.
I'm following another course alongside FCC
And this is all the exact code from it
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:41
@h4r1m4u thanks
CamperBot
@camperbot
Apr 13 2016 09:42
dueldrawer8 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1763 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 09:42
@Capzlock link?
h4r1m4u
@h4r1m4u
Apr 13 2016 09:42
@Dueldrawer8 well, the <p>s inside the #workspace are not there until you display the search results, so you can define whatever style you need for them and it'll apply to them once they're added to the DOM by your JS code
Ankit bhatnagar
@noisyankit
Apr 13 2016 09:43
seems like I messed up my project. Please help how to lock the data it is wrapping up. Do I need to do the css as per the device size or need to include any further tags ? please help. http://codepen.io/noisyankit/pen/RaKNmM
yemengsky
@yemengsky
Apr 13 2016 09:43
<div class="container-fluid">
<div id="firstsection" class="row">
<div class="col-xs-6">
<p>The name is Justin and I'm an UX/UI designeveloper, with extensive practical experience in brand strategy, creative direction and project management; devoted to Functional Programming and Information Architecture. Also a huge fan of semantics and futuristic interfaces.</p>
<p></p>
<h2>Web Developer - Graphic Artist - User Experience Designer</h2>
</div>
<div class="col-xs-6">
<img src="http://qlip.in/avatar.png" class="img-responsive img-circle" height="200" width="200">
</div>
</div>
</div>
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 09:43
@capzlock can you not just put this in a codepen?
yemengsky
@yemengsky
Apr 13 2016 09:44
how to change the background color of the div whose id is firstsection

firstsection{

background:black:
padding:30px;
color:white;
}
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:44
@h4r1m4u sweet, so is there a difference between border and say creating a box? Border is the closest i could think of to a box.
h4r1m4u
@h4r1m4u
Apr 13 2016 09:45
@noisyankit remove the height from .mainbody. that's what's breaking it
yemengsky
@yemengsky
Apr 13 2016 09:45
I write this but the background color still does not change.
Capzlock
@Capzlock
Apr 13 2016 09:45
@yemengsky wouldn't it be background-color: ?
yemengsky
@yemengsky
Apr 13 2016 09:45
/#
@Capzlock still no change
h4r1m4u
@h4r1m4u
Apr 13 2016 09:45
@Dueldrawer8 yeah, border will work great for that. you'll probably want to add some padding to it as well to create some space between the border and the text. and possibly background color if you want
yemengsky
@yemengsky
Apr 13 2016 09:46
/ #firstsection{
background-color:black:
padding:30px;
color:white;
}
h4r1m4u
@h4r1m4u
Apr 13 2016 09:46
there isn't a "box" element. you just need to create it visually
Chad Kreutzer
@ChadKreutzer
Apr 13 2016 09:46
@yemengsky change that colon to a semicolon.
Capzlock
@Capzlock
Apr 13 2016 09:46
^
Chad Kreutzer
@ChadKreutzer
Apr 13 2016 09:46
(After black)
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:46
@h4r1m4u yes thats where i was getting at, i want to add a background color to each border so my text can be seen clearly and also seperate from the main background
yemengsky
@yemengsky
Apr 13 2016 09:46
...
background-color:black:->background-color:black;
I am a fool
Capzlock
@Capzlock
Apr 13 2016 09:47
We've all done it.
h4r1m4u
@h4r1m4u
Apr 13 2016 09:47
@Dueldrawer8 yea. all just CSS properties added to the <p>s inside the #workspace. easy peasy
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:48
alright.. ive always had a problem with css.. i dont know why
Chad Kreutzer
@ChadKreutzer
Apr 13 2016 09:48
Yup. I did something similar earlier tonight.
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:48
ive gotten the logic and JS more than the design/css part although i like all of it
h4r1m4u
@h4r1m4u
Apr 13 2016 09:49
it's just practice. CSS is quite easy to grasp, actually. just keep powering ahead and you'll get it over time. you're doing great
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:49
@h4r1m4u appreciate the kind words, had ALOT of help from fellow campers
Nazim
@nazimkazim
Apr 13 2016 09:51
Please suggest me a way to implement temperature toggle from Fahrenheit to Celsius in "Local Weather App" project....
http://codepen.io/nazimkazim/pen/Bjgrzw
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:51
thanks again @h4r1m4u
CamperBot
@camperbot
Apr 13 2016 09:51
dueldrawer8 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: dueldrawer8 already gave h4r1m4u points
h4r1m4u
@h4r1m4u
Apr 13 2016 09:51
@Dueldrawer8 my pleasure!
Ankit bhatnagar
@noisyankit
Apr 13 2016 09:54
@h4r1m4u Thanks it worked :-) Appreciated
CamperBot
@camperbot
Apr 13 2016 09:54
noisyankit sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1764 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Apr 13 2016 09:54
@noisyankit you betcha
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:57
@h4r1m4u are you familiar with the wiki api?
Chris Wilson
@blockbeard
Apr 13 2016 09:57
Man this weather app is killing me. Everything seems to be going OK, then I make some change and "Cannot GET /[object%20HTMLParagraphElement]" or some variant.
Before I post the code does anyone have any hints?
h4r1m4u
@h4r1m4u
Apr 13 2016 09:58
@Dueldrawer8 not in particular. enough to pass the challenge. although there are multiple ways to get the required results, so that params i use may differ from those you use
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:58
I next to implement when you click on the the content anywhere inside the border, needs to link to where that wiki article is.
Nazim
@nazimkazim
Apr 13 2016 09:58
@h4r1m4u please give me a hint how to implement temperature toggle button.
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 09:58
so same functionality we all need to complete
some people use curlID
some use urls to the full site
is there a difference if you know?
@Rageaholic can try to look at your code if you want.. whats the problem? The weather app really challenged me and i had no idea where to start for a day or two lol
h4r1m4u
@h4r1m4u
Apr 13 2016 10:00
@Dueldrawer8 i'm not entirely sure, to be honest. either of those approaches work. in practice, an id of something would typically not change while the URL might (but i don't know whether that's how wikipedia really does that)
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 10:01
@h4r1m4u alright thanks, im sure ill need more help here in a second when i try to link up my basics to the wiki's api
CamperBot
@camperbot
Apr 13 2016 10:01
dueldrawer8 sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: dueldrawer8 already gave h4r1m4u points
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 10:01
*boxes
h4r1m4u
@h4r1m4u
Apr 13 2016 10:01
@nazimkazim it seems you're almost there. right now your toggle works only once. you need to adjust the click handler you wrote for the toggle button and inside it detect whether the temp is currently shown in C or F and change the temp accordingly
Chris Wilson
@blockbeard
Apr 13 2016 10:02

```<!DOCTYPE html>

<html lang="en">

<head>
<title>Weather</title>
</head>

<body onload="getLocation()">

<p id="location">Waiting for Location</p>
<p id="weather">Waiting for weather</p>

<!-- Weather App JavaScript-->
<script src="js/weatherapp.js"></script>
</body>

</html>


```/**
 * Created by chris_000 on 13/04/2016.
 */
var location = document.getElementById("location"); 
//var weather = document.getElementById("weather");

function getLocation() {
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(showPosition);
    } else {
    location.innerHTML = "Geolocation is not supported by this browser.";
    }
}
function showPosition(position) {
    location.innerHTML = "Latitude: " + position.coords.latitude +
        "<br>Longitude: " + position.coords.longitude;
}
/*function getWeather(lat, lon){

    //weather.innerHTML = lat + " " + lon;
    //get location from API
    $.getJSON("http://api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + lon + "&APPID=36156739ccff3f83d40b8270576b7209", function(weatherData) {
// deal with the data
      weather.innerHTML = "Success";

    });


   //displayWeather();

//}

//function displayWeather(){

}*/
Nazim
@nazimkazim
Apr 13 2016 10:03
@h4r1m4u yep that is a challenge for me now to solve
h4r1m4u
@h4r1m4u
Apr 13 2016 10:03
@Rageaholic you're on the right track from what i see. what are you struggling with?
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 10:04
indeed he does
is*
h4r1m4u
@h4r1m4u
Apr 13 2016 10:05
@nazimkazim inside the click handler, get the current text of #temperature and check the last character. if it's a C, your toggle should convert the temp to F. if it's F, it should convert it to C. that's a simple if/else statement
Chris Wilson
@blockbeard
Apr 13 2016 10:06
When I try and test it it gives me some error like there's something it can't find. But I just don't get it.
Nazim
@nazimkazim
Apr 13 2016 10:06
@h4r1m4u great ide i need to try thanks
CamperBot
@camperbot
Apr 13 2016 10:06
nazimkazim sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1765 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Apr 13 2016 10:06
@Rageaholic can you link your codepen with the code that gives you the error?
Chris Wilson
@blockbeard
Apr 13 2016 10:07
Yeah I'll stick it in one, just a sec
It loads OK, then it goes nuts...
The location code is straight from the w3schools example with just the variable names changed, I can't make the HTML much simpler. I just don't get it.
h4r1m4u
@h4r1m4u
Apr 13 2016 10:11
@Rageaholic ah, location is a reserved word in javascript. don't use it as a name for your variable
Chris Wilson
@blockbeard
Apr 13 2016 10:11
oh FFS
h4r1m4u
@h4r1m4u
Apr 13 2016 10:11
change the first line of your JS to something like var loc = document.getElementById("location");
and then use loc in your code
Chris Wilson
@blockbeard
Apr 13 2016 10:15
@h4r1m4u Thank you so much for that. I've re-written this like 20 times. I have been stuck on this for so long.
CamperBot
@camperbot
Apr 13 2016 10:15
rageaholic sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1766 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Apr 13 2016 10:15
@Rageaholic my pleasure
Nazim
@nazimkazim
Apr 13 2016 10:18
@h4r1m4u can you please check where i'm wrong. I want to get text of the div but it throws an error.
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 10:18
playing with it in sandbox but the api isnt returning a JSON data object that has the url feature
UDAY PRAPHULLA MALANGAVE
@malangaveuday
Apr 13 2016 10:20
Hey guys how to match string in arrays if following conditions occure
no case-sensitive
example 1st . ["like", "Like"] ==> true
2nd. ["like","keli"] => true
my code :
function mutation(arr) {
return (arr[0].toLowerCase().indexOf(arr1.toLowerCase())) !== -1;
}
mutation(["hello", "hey"]);
its not working for second exampl
please any one have idea about this
h4r1m4u
@h4r1m4u
Apr 13 2016 10:21
@Dueldrawer8 i don't remember exactly which parameters i used. but i think the prop=info and inprop=url only works in combination with some other params
@nazimkazim could you link to the updated codepen?
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 10:22
@h4r1m4u hmm..
Stephen James
@sjames1958gm
Apr 13 2016 10:24
@malangaveuday What is arr1?
Nazim
@nazimkazim
Apr 13 2016 10:24
This message was deleted
@h4r1m4u The problem is my div is empty when i want to extract a text it gives an empty text
h4r1m4u
@h4r1m4u
Apr 13 2016 10:25
@nazimkazim you're doing this var textOfDiv = document.getElementById('temperature').innerHTML;. this will give you the text of the #temperature div upon the page load. you need to check the value of the div as part of the toggle click handler
because the value of the #temperature changes once you render the results from the API
(and it'll also change when you toggle the temperature)
UDAY PRAPHULLA MALANGAVE
@malangaveuday
Apr 13 2016 10:26
@sjames1958gm its mistek. it is arr[1]
Nazim
@nazimkazim
Apr 13 2016 10:27
@h4r1m4u Ok
Stephen James
@sjames1958gm
Apr 13 2016 10:28
@malangaveuday Ah, don't you have it backwards? arr[0].toLowerCase().indexOf(arr1.toLowerCase()) this looks for arr1 in the first character of arr
h4r1m4u
@h4r1m4u
Apr 13 2016 10:28
    //Toggle temperature
    document.getElementById("toggleBtn").addEventListener("click",

    function(){ 
        console.log($('#temperature').text()); // getting the text of the #temperature div inside the click handler
        $("#temperature").html(iconURL+""+tempCelsius + " C");

     });
Stephen James
@sjames1958gm
Apr 13 2016 10:30
@malangaveuday arr1.toLowerCase().indexOf(arr[0].toLowerCase())
Nazim
@nazimkazim
Apr 13 2016 10:31
@h4r1m4u Thanks i did not know about text() function
CamperBot
@camperbot
Apr 13 2016 10:31
nazimkazim sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: nazimkazim already gave h4r1m4u points
h4r1m4u
@h4r1m4u
Apr 13 2016 10:31
it's a jquery method
you could do it with vanilla JS, but since you're already using jquery, you might as well leverage it
UDAY PRAPHULLA MALANGAVE
@malangaveuday
Apr 13 2016 10:34
@sjames1958gm its not working
Stephen James
@sjames1958gm
Apr 13 2016 10:35
@malangaveuday To solve the challenge?
Nazim
@nazimkazim
Apr 13 2016 10:36
@h4r1m4u Thanks i got it right now
CamperBot
@camperbot
Apr 13 2016 10:36
nazimkazim sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:warning: nazimkazim already gave h4r1m4u points
h4r1m4u
@h4r1m4u
Apr 13 2016 10:37
@nazimkazim great!
Stephen James
@sjames1958gm
Apr 13 2016 10:37
To solve the challenge -> you will need to loop over arr[1] and test each character arr[0].toLowerCase().indexOf(arr[1][i].toLowerCase())
UDAY PRAPHULLA MALANGAVE
@malangaveuday
Apr 13 2016 10:50
@sjames1958gm hey thank you its done.
CamperBot
@camperbot
Apr 13 2016 10:50
malangaveuday sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 612 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Apr 13 2016 10:50
@malangaveuday :+1:
Shivam Arora
@shivamarora13
Apr 13 2016 11:44
when I pass idStore = '1'
  if (idStore === '2' || '4' || '6' || '8') {
    $("#5").replaceWith('<p id="5">' + comp + '</p>');
  } else if (idStore === '1' || '3' || '9' || '5') {
    $("#7").replaceWith('<p id="7">' + comp + '</p>');
  }
with this code
than also, only the if loop runs, and not the else if,
even though I think, else if loop should run
can anyone tell why?
Shivam Arora
@shivamarora13
Apr 13 2016 11:54
?
Ken Haduch
@khaduch
Apr 13 2016 12:03
@shivamarora13 - that is not a valid construct using the || operator. If you wanted to do something like that, you would need to do this:
This message was deleted

@shivamarora13 - this is what you'd need to do:

if (idStore === '2' || idStore === '4' || idStore === '6' || idStore === '8') {

You cannot chain together just the numbers with || between them.

Obviously the same thing for (idStore === '1' || '3' || '9' || '5')
lcthornhill
@lsrus
Apr 13 2016 12:16

@shivamarora13 to expand on @khaduch's answer a little, in your current loop:
if idStore is not 2, the if statement then evaluates the next condition which is simple '4'. As '4' is a truthy value, this is equivilant to an if condition like

if (idStore === '2' || true)

which is why the else loop never runs

Stanislav
@Shestel12
Apr 13 2016 12:45
Hi everyone. I'm currently trying to do a Tribute Page. Here's my code
https://codepen.io/Shestel12/full/EKEKEb
I would be very grateful if somebody can answer some questions about it
a)In the example(http://codepen.io/FreeCodeCamp/full/wMQrXV) H1 seems to become smaller when you resize the page. How can i make the same effect?
b)Text after the image is placed close to the center of the screen, and slowly gets closer to the borders, as i resize the window. In my project however, it is always spread across all over the screen/ How can i fix this?
c)How can i remove the line near the quote?
d)Why is the border around my image is so big?
nsloc22
@nsloc22
Apr 13 2016 12:53
@Shestel12 for a) question, h1 tag is inside div with jumbotron class, which responds to screen size
Stanislav
@Shestel12
Apr 13 2016 12:58
@nsloc22 Thank you alot, that totally worked! =)
CamperBot
@camperbot
Apr 13 2016 12:58
shestel12 sends brownie points to @nsloc22 :sparkles: :thumbsup: :sparkles:
nsloc22
@nsloc22
Apr 13 2016 12:58
for c) if you mean left border you can change style for blockquote tag so it has no border
CamperBot
@camperbot
Apr 13 2016 12:58
:star: 346 | @nsloc22 | http://www.freecodecamp.com/nsloc22
Dardan Demiri
@dardandemiri
Apr 13 2016 12:59
wiki forEach
CamperBot
@camperbot
Apr 13 2016 12:59

:point_right: js array prototype foreach [wiki]

js Array prototype forEach

The forEach() method executes a provided function once per array element.

:pencil: read more about js array prototype foreach on the FCC Wiki

Dardan Demiri
@dardandemiri
Apr 13 2016 13:22
Hey
Guys I don't even know how many days I am suffering with this problem.
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 13:23
which problem?
Look at the JavaScript Section
in the bottom
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 13:24
allUsersData doesn't exist
it's a variable that hasn't been declared
Dardan Demiri
@dardandemiri
Apr 13 2016 13:25
var allUsersData = []; ?
it's there
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 13:25
oh no it does sorry :)
one sec
Coira Ellison
@Coira
Apr 13 2016 13:25
@dardandemiri getJson is asynchronous
Dardan Demiri
@dardandemiri
Apr 13 2016 13:25
Yeah
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 13:25
oh yea
right
Coira Ellison
@Coira
Apr 13 2016 13:25
so console.log(etc) calls before your getJSON is done
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 13:25
^
console.log(allUsersData);
Dardan Demiri
@dardandemiri
Apr 13 2016 13:26

that are telling me all

And that its a closure

Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 13:26
executes before the getJSON callback
Dardan Demiri
@dardandemiri
Apr 13 2016 13:26
But I just Don't understand it
Dardan Demiri
@dardandemiri
Apr 13 2016 13:26
How to make it execute after ?
Just please.
How to solve this problem
Coira Ellison
@Coira
Apr 13 2016 13:27
everything you want to do with allUsersData needs to go in your getJSON callback (the second part of your getJSON arguments, starts with function(data))
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 13:27
you'd use promises normally
for something like this
Dardan Demiri
@dardandemiri
Apr 13 2016 13:27
hmm
Coira Ellison
@Coira
Apr 13 2016 13:27
yes, promises good too
Dardan Demiri
@dardandemiri
Apr 13 2016 13:27
An example ?
Coira Ellison
@Coira
Apr 13 2016 13:27
.when and .done
nsloc22
@nsloc22
Apr 13 2016 13:28
@dardandemiri you can use https://api.jquery.com/ajaxStop/
Description: Register a handler to be called when all Ajax requests have completed.
Coira Ellison
@Coira
Apr 13 2016 13:29
looks good, i've not seen ajaxStop before
Dardan Demiri
@dardandemiri
Apr 13 2016 13:30
where should I add it
make me an example please
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 13:31
$.ajaxStop(function(){ console.log(allUsersData); });
just replace that with your last line
should do it
Dardan Demiri
@dardandemiri
Apr 13 2016 13:32
Uncaught TypeError: $.ajaxStop is not a function
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 13:33
$(document).ajaxStop(function(){ console.log(allUsersData); });
try that
nsloc22
@nsloc22
Apr 13 2016 13:33
Attach the event handler to the document
should work now
Dardan Demiri
@dardandemiri
Apr 13 2016 13:34
No result
In fact
it's not executing it at all
$(document).ajaxStop(function(){
    console.log("Hello");
    console.log(allUsersData);
});
It doesn't log even Hello
@Coira how was your idea with .done
Ill try that
:(
Samuel Cupidon
@Zerazera
Apr 13 2016 13:37
If you only have one AJAX call you don't need ajaxStop. You can define a function within to always run. https://learn.jquery.com/ajax/jquery-ajax-methods/
Coira Ellison
@Coira
Apr 13 2016 13:38
ajaxStop looks easier to use than .done. can we see your codepen again with the changes you made?
Julian Krispel-Samsel
@juliankrispel
Apr 13 2016 13:39
@Zerazera he has multiple ajax calls that's the point
Coira Ellison
@Coira
Apr 13 2016 13:39
or you could not use any of these, and just put it in the function inside getJSON
Coira Ellison
@Coira
Apr 13 2016 13:40
that works for me, i get "hello" and an array in the console
nsloc22
@nsloc22
Apr 13 2016 13:40
works in chrome
Dardan Demiri
@dardandemiri
Apr 13 2016 13:41
in my LocalHost it's not working
strange !
Coira Ellison
@Coira
Apr 13 2016 13:41
your localhost?
oh, you're running it locally, do you get any errors?
Dardan Demiri
@dardandemiri
Apr 13 2016 13:42
no
no errors no result
Coira Ellison
@Coira
Apr 13 2016 13:42
hm
nsloc22
@nsloc22
Apr 13 2016 13:42

@Zerazera

allUsers.forEach(function(user) {
  var apiURL = streamerURL + user + callback;

  // Looking for Online Users
  $.getJSON(apiURL, function(data) {~
....

wouldn't this make multiple ajax requests?

so you would have to use something like ajax.stop before you do anything with the response
greg
@wearenotgroot
Apr 13 2016 13:44
@nsloc22 well it's async
This message was deleted
Bharat
@BharatKalluri
Apr 13 2016 13:45
Hey guys, Can anyone suggest me an api for quotes which returns json
Dardan Demiri
@dardandemiri
Apr 13 2016 13:47
@Coira @nsloc22 @juliankrispel @Zerazera
Thank you all.
Now the only problem is why is .ajaxStop() not working locally
CamperBot
@camperbot
Apr 13 2016 13:47
dardandemiri sends brownie points to @coira and @nsloc22 and @juliankrispel and @zerazera :sparkles: :thumbsup: :sparkles:
:star: 546 | @coira | http://www.freecodecamp.com/coira
:star: 347 | @nsloc22 | http://www.freecodecamp.com/nsloc22
:star: 3 | @juliankrispel | http://www.freecodecamp.com/juliankrispel
:star: 350 | @zerazera | http://www.freecodecamp.com/zerazera
greg
@wearenotgroot
Apr 13 2016 13:47
@nsloc22 it will handle what it can, just make a separate error handle to deal with the errors
Coira Ellison
@Coira
Apr 13 2016 13:48
maybe something codepen does that you're missing locally, but i can't think what
nsloc22
@nsloc22
Apr 13 2016 13:49
@dardandemiri make sure you are loading your jquery file
greg
@wearenotgroot
Apr 13 2016 13:49
@Bharat-Kalluri most of the good one are not free
Bharat
@BharatKalluri
Apr 13 2016 13:49
@wearenotgroot So.. any bad free ones? :-(
greg
@wearenotgroot
Apr 13 2016 13:50
@Bharat-Kalluri dont know if https://en.wikiquote.org/w/api.php will work
Coira Ellison
@Coira
Apr 13 2016 13:50
@Bharat-Kalluri mostly i see people use either quotes on design or forismatic
V Arun Kumar
@arunvkumr
Apr 13 2016 13:50
I was reading some random articles about web dev and got to know about angularjs and reactjs they both work for the same stuff and want to know which is better to learn or should i learn both. i looked up both in google trends and angular is way too popular and react is still climbing up. so out of this two which i should work on?
Bharat
@BharatKalluri
Apr 13 2016 13:51
@wearenotgroot I could not understand the documentation of wiqiquotes
@Coira Is there anything I need to change
nsloc22
@nsloc22
Apr 13 2016 13:53
@arunkumrv you can learn both, stick with one you develop faster in
Bharat
@BharatKalluri
Apr 13 2016 13:57
So how can I send api calls to foresmatic api
Coira Ellison
@Coira
Apr 13 2016 13:57
@Bharat-Kalluri http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=json&lang=en need's the ?
you'll need to use jsonp format tho
Bharat
@BharatKalluri
Apr 13 2016 13:58
Thanks @Coira ,
CamperBot
@camperbot
Apr 13 2016 13:58
bharat-kalluri sends brownie points to @coira :sparkles: :thumbsup: :sparkles:
:star: 547 | @coira | http://www.freecodecamp.com/coira
Dardan Demiri
@dardandemiri
Apr 13 2016 14:04
@Coira @nsloc22
why can I get the objects not outside ... ?
$(document).ajaxStop(function(){
    console.log(allUsersData);  // Okey here they are
});

console.log(allUsersData); // Here it's empty ?
I am interested to get that allUsersData outside so I can work with it wherever I want
nsloc22
@nsloc22
Apr 13 2016 14:06
@dardandemiri last line is executed before you assign value to allUserData,
Coira Ellison
@Coira
Apr 13 2016 14:06
@dardandemiri because the data doesn't exist in your second console.log, that's why you have to use ajaxStop
Dardan Demiri
@dardandemiri
Apr 13 2016 14:07
Yeah I know, but is there any Way that I can make it possible
Coira Ellison
@Coira
Apr 13 2016 14:07
you won't be able to use allUsersData outside of it
nsloc22
@nsloc22
Apr 13 2016 14:07
it exists but it has value that you assign when you declare it as variable
Dardan Demiri
@dardandemiri
Apr 13 2016 14:07
That's it.
It's Impossible ?
Samuel Cupidon
@Zerazera
Apr 13 2016 14:07
@dardandemiri Ajax calls are asynchronous. You have to call another function from within the AJAX after the variable has been updated.
@dardandemiri The problem is that the variable hasn't updated before getting to your console.log().
Dardan Demiri
@dardandemiri
Apr 13 2016 14:09
can you make an example ?
nsloc22
@nsloc22
Apr 13 2016 14:09
var streamerURL = "https://api.twitch.tv/kraken/streams/";
var channelURL = "https://api.twitch.tv/kraken/channels/";
var callback = "?callback=?";

var allUsersData = []; // it will return whatever you assign to it here
that's why you have to wait for ajax request to finish then response is assigned to this variable
V Arun Kumar
@arunvkumr
Apr 13 2016 14:11
Can i use another set of columns inside a column? like
<div class="row">
    <div class="col-md-8">
        <div class="col-md-4">
        </div>
        <div class="col-md-4">
        </div>
    </div>
</div>
Dardan Demiri
@dardandemiri
Apr 13 2016 14:12
Yes @arunkumrv
You can do whatever you want, just you should remember
In each column are 12 other Columns
Samuel Cupidon
@Zerazera
Apr 13 2016 14:12
Example would be like
$.ajax({
url:'',
dataType:'json',
type:'GET'
}

.done(function(json) {
//do stuff
nextFunction();
};
V Arun Kumar
@arunvkumr
Apr 13 2016 14:12
@dardandemiri thanks.. so do i get the all 12 columns or the ones i got from the parent like 8 from above code.
CamperBot
@camperbot
Apr 13 2016 14:12
arunkumrv sends brownie points to @dardandemiri :sparkles: :thumbsup: :sparkles:
Jeff
@adzam5
Apr 13 2016 14:12
@arunkumrv You need to put them in another row
CamperBot
@camperbot
Apr 13 2016 14:13
:star: 297 | @dardandemiri | http://www.freecodecamp.com/dardandemiri
Dardan Demiri
@dardandemiri
Apr 13 2016 14:14
@Zerazera Ill try
V Arun Kumar
@arunvkumr
Apr 13 2016 14:15
@adzam5 something like this?
<div class="row">
    <div class="col-md-8">
        <div class="row">
            <div class="col-md-4">
            </div>
            <div class="col-md-4">
            </div>
            <div class="col-md-4">
            </div>
        </div>
    </div>
</div>
Dardan Demiri
@dardandemiri
Apr 13 2016 14:15
no
<div class="col-md-8">
        <div class="row">
            <div class="col-md-4">
            </div>
            <div class="col-md-4">
            </div>
            <div class="col-md-4">
            </div>
        </div>
</div>
Now you have 4 x 3 = 12 .
In one row
if you want another just copy all row class
Eldar Tinjić
@EldarT90
Apr 13 2016 14:24
http://codepen.io/EldarT/pen/VaXLGV i need help with for loop and certain closures, thanks
V Arun Kumar
@arunvkumr
Apr 13 2016 14:26
@dardandemiri @adzam5 thanks.. i understand now how they work.codepen link
CamperBot
@camperbot
Apr 13 2016 14:26
arunkumrv sends brownie points to @dardandemiri and @adzam5 :sparkles: :thumbsup: :sparkles:
:warning: arunkumrv already gave dardandemiri points
:star: 404 | @adzam5 | http://www.freecodecamp.com/adzam5
Zubair Ali
@03aliz
Apr 13 2016 14:32
Hi guys I'm doing the wikipedia viewer and I'm testing to see if I can show the wikipedia json data in the codepen console. Here is my code:
$(document).ready(function () {
  $.ajax({    url:"https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Albert%20Einstein&utf8=&format=json",
    success: function (data) {
     console.log(data)

    }   

  });  

});
the problem is nothing outputs to the console, so i'm suspecting something is wrong with the URL
Stephen James
@sjames1958gm
Apr 13 2016 14:33
@03aliz Make sure there are no errors in the devtools console and wrap your data in JSON.stringify(data)
Zubair Ali
@03aliz
Apr 13 2016 14:33
or code
$(document).ready(function () {
  $.ajax({    url:"https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Albert%20Einstein&utf8=&format=json",
    success: function (data) {
     console.log(JSON.stringify(data))

    }   

  });  

});
like this?
it still hasn't worked.
and how do i check errors in the devtools console?
Stephen James
@sjames1958gm
Apr 13 2016 14:36
@03aliz F12 on chrome the console is part of the devtools
Zubair Ali
@03aliz
Apr 13 2016 14:36
ok thank you i'll try now
prashant
@findname
Apr 13 2016 14:38
can any one tell why my submit and checkbox button are not beign inlined though i have used that form class https://codepen.io/findname/pen/qZPwWX?editors=1100
and also that remember checkbox is not aligned with the password is there way to fix it without css
Zubair Ali
@03aliz
Apr 13 2016 14:38
I got this error: XMLHttpRequest cannot load https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Albert%20Einstein&utf8=&format=json&_=1460472219782. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access.
not sure what it means.
Stephen James
@sjames1958gm
Apr 13 2016 14:39
I expected as much - everybody is hitting this - add &callback=? to your URL - this enables JSONP processing to get around that.
Zubair Ali
@03aliz
Apr 13 2016 14:44
$(document).ready(function () {
  $.ajax({    url:"https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Albert%20Einstein&utf8=&format=json&callback=?",
    success: function (data) {
     console.log(JSON.stringify(data))

    }   

  });  

});
like this?
still no luck, getting the same error message.
Stephen James
@sjames1958gm
Apr 13 2016 14:46
@03aliz Maybe requires setting the encoding to json - maybe if you used $.getJSON with that url
Zubair Ali
@03aliz
Apr 13 2016 14:46
yes I'll try now.
Robert Friedman
@robfr77
Apr 13 2016 14:48
Can anyone tell me why jquery wont accept this form action replacement url
$("form").submit(function() {
  var searchText = $(form).serialize();
$("form").attr("action", "https://en.wikipedia.org/w/api.php?action=query&list=search&" + searchText +");
});
Zubair Ali
@03aliz
Apr 13 2016 14:49
@sjames1958gm Thank you that worked, strange does that mean I should always use the getJson method, I thought ajax gave you more control?
CamperBot
@camperbot
Apr 13 2016 14:49
03aliz sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 614 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
prashant
@findname
Apr 13 2016 14:51
can't "remember me" be aligned veritcally with password and email using bootstrap cuz i dont know why email was started giving some margin while it is remember is not having margin
Guys this method as shown in the bottom of the code for getting the data from allUsersData is working but I don't like it.
Because you can not use it outside the .ajaxStop function
h4r1m4u
@h4r1m4u
Apr 13 2016 14:53

@03aliz .getJSON() is just a shorthand for specific use of .ajax(). instead of .getJSON() you could do

.ajax({
 url: 'someurl',
 dataType: 'json'
}).done(...)

and it should work the same

Dardan Demiri
@dardandemiri
Apr 13 2016 14:54
The comments in the end are old, so don't read them
here is the updated Pen
The comments now are okey
Read them on the bottom of the code
Can anyone help me ?
h4r1m4u
@h4r1m4u
Apr 13 2016 15:01
@dardandemiri that's normal behavior because the ajax calls are asynchronous:
$(document).ajaxStop(function(){
// the ajaxStop function gets invoked only once there are not outstanding ajax requests. in other words, it waits until all your ajax calls get the response from the API
    console.log(allUsersData); //All the objects exist.
});

// this doesn't wait until the ajax requests complete. instead it runs immediately, even before you get anything back from the API. hence the allUsersData array is empty
console.log(allUsersData); // Here Not, it's empty []
Stephen James
@sjames1958gm
Apr 13 2016 15:02
@h4r1m4u :+1:
@03aliz I guess it depends on how much control your app needs -
Dardan Demiri
@dardandemiri
Apr 13 2016 15:03
yes but I am interested to solve this problem
@sjames1958gm tried to help me
h4r1m4u
@h4r1m4u
Apr 13 2016 15:04
the solution is to use the ajaxStop function
Dardan Demiri
@dardandemiri
Apr 13 2016 15:04
nothing else
h4r1m4u
@h4r1m4u
Apr 13 2016 15:04
or promises. or handle the data from the api only inside the callback function of the ajax calls
Dardan Demiri
@dardandemiri
Apr 13 2016 15:05
can you show me how ? with an example ?
Islam Ibakaev
@dagman
Apr 13 2016 15:06
hey guys why this code doesn't work propperly (should count down) http://codepen.io/dagman/pen/oxqzLx?editors=0111
h4r1m4u
@h4r1m4u
Apr 13 2016 15:06
  // Looking for Online Users
  $.getJSON(apiURL, function(data) {

    if (data.stream != null) {
      var obj = {
        status: "online",
        logo: data.stream.channel.logo,
        displayName: data.stream.channel.display_name,
        description: data.stream.channel.status,
        url: data.stream.channel.url
      };
     // instead of pushing the obj into the allUsersData array, do something with it immediately here       
     // allUsersData.push(obj);
     console.log(obj);
    $("#results").append(JSON.stringify(obj, 2, 2);
    }
   // etc.
Dardan Demiri
@dardandemiri
Apr 13 2016 15:08
ah Okey thank you than @h4r1m4u
CamperBot
@camperbot
Apr 13 2016 15:08
dardandemiri sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1767 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
Stephen James
@sjames1958gm
Apr 13 2016 15:08
@dagman Are you reseting d to minute with 60 every time?
h4r1m4u
@h4r1m4u
Apr 13 2016 15:08
but either approach - ajaxStop, processing the data inside the ajax callback, or using promises - basically does the same thing - it ensures that you got already got the response from the API. that's just how async JS works
Islam Ibakaev
@dagman
Apr 13 2016 15:15
@sjames1958gm i am just playing with setInterval before switch to pomodoro timer task. just curious why it not count down? where code is wrong?
Sandra
@SandraFlato
Apr 13 2016 15:17
@Slusherman There is a much easier way to solve the Convert HTML challenge if you are interested.
ehekatlOf
@ehekatlOf
Apr 13 2016 15:17
oh man I feel like a potato
h4r1m4u
@h4r1m4u
Apr 13 2016 15:17
@dagman each time you call the minute() function, you're setting m to 60
function minute() {
    var m = 60; // here
    return function() {
        return m--;
    };
}
ehekatlOf
@ehekatlOf
Apr 13 2016 15:17
only modifying the prototype modifies inheritance
Mandeep Singh
@MandeepMann
Apr 13 2016 15:18
can anyone help me with bringing the photo in line with box on each side ?http://codepen.io/MrManu/pen/aNEPvN
ehekatlOf
@ehekatlOf
Apr 13 2016 15:18
and all derivative constructors based on said constructor
finally that's out of the way
prashant
@findname
Apr 13 2016 15:18
any one can tell if how can "remember me" be vertically aligned with email and password https://codepen.io/findname/pen/qZPwWX?editors=1100 and what are things i need to change
Sandra
@SandraFlato
Apr 13 2016 15:19
@adzam5 Just completed Convert HTML Entries if you want to compare answers.
ehekatlOf
@ehekatlOf
Apr 13 2016 15:19
@findname put it in the div with the input forms
prashant
@findname
Apr 13 2016 15:20
@ehekatlOf <div class="col-xs-6 ">
<div class="checkbox">
<label> <input type="checkbox"> Remember-me
</label>
</div></div>
ehekatlOf
@ehekatlOf
Apr 13 2016 15:20
try to sandwich code between ```
no markdown code is hard to read
here's an example
<div class="form-group">
      <label for="Password" class="control-label col-xs-2">Password</label>
      <div class="col-xs-4"><input type "password" class="form-control" placeholder="Enter Password" label="Password">
        <label>  <input type="checkbox">  Remember-me
       </label>
      </div>
    </div>
using your code
Mandeep Singh
@MandeepMann
Apr 13 2016 15:21
any one tell me how i can put photo at the bottom in- line with the paragraphs around it . photo looks out of frame http://codepen.io/MrManu/pen/aNEPvN
ehekatlOf
@ehekatlOf
Apr 13 2016 15:21
I just moved the checkbox up to the div where your input fields are
@MandeepMann if you do
* {
  border: 3px red solid;
}
it looks like you have some weird whitespace action going on below the picture
and the right paragraph
prashant
@findname
Apr 13 2016 15:24
@ehekatlOf i dont get what you are saying but for "remember me" checkbox is inside input see code https://codepen.io/findname/pen/qZPwWX?editors=1100
lpix
@lpix
Apr 13 2016 15:24

How do I get

 for (var n = 0; n < 10; n++) {
      entry = json.query.search[n].title
        text = json.query.search[n].snippet
        $('#some').html('<button class="accordion ">'+entry+'</button><div id="panel" class="container"><p>'+text+'</p></div>');
          }

to add the button every time it goes through the loop?

Mandeep Singh
@MandeepMann
Apr 13 2016 15:24
@ehekatlOf i did not get what you want to say ?
h4r1m4u
@h4r1m4u
Apr 13 2016 15:25
@lpix use .append() instead of .html()
ehekatlOf
@ehekatlOf
Apr 13 2016 15:26
@MandeepMann if you border everything with 3 px red lines
there's a bunch of whitespace below the mid and right div
so the left div is significantly longer
how did you want to align these three?
lpix
@lpix
Apr 13 2016 15:27
@h4r1m4u thanks!
CamperBot
@camperbot
Apr 13 2016 15:27
lpix sends brownie points to @h4r1m4u :sparkles: :thumbsup: :sparkles:
:star: 1768 | @h4r1m4u | http://www.freecodecamp.com/h4r1m4u
h4r1m4u
@h4r1m4u
Apr 13 2016 15:28
yw
Mandeep Singh
@MandeepMann
Apr 13 2016 15:29
@ehekatlOf I want to look all 3 div of the same size ? is it possible ? also i want the margin on the left and right div ?
ehekatlOf
@ehekatlOf
Apr 13 2016 15:30
sure
set a min-height for all 3
Philip J Cox
@philipjc
Apr 13 2016 15:32
Hello
Do I have to host my own images to use them on Codepen?
Mandeep Singh
@MandeepMann
Apr 13 2016 15:33
@ehekatlOf how do i do that ?
ehekatlOf
@ehekatlOf
Apr 13 2016 15:34
min-height: 1000px
as an example
@philipjc make a tumblr account
they let you hotlink for days
Mandeep Singh
@MandeepMann
Apr 13 2016 15:43
@ehekatlOf Thank you
CamperBot
@camperbot
Apr 13 2016 15:43
mandeepmann sends brownie points to @ehekatlof :sparkles: :thumbsup: :sparkles:
:star: 251 | @ehekatlof | http://www.freecodecamp.com/ehekatlof
ehekatlOf
@ehekatlOf
Apr 13 2016 15:44
np
Jose
@sauronsocuro
Apr 13 2016 15:44
Hi everybody
is this the proper chat-room to speak about projects? (like the quote machine)?
Stephen James
@sjames1958gm
Apr 13 2016 15:45
@sauronsocuro Sure
Jose
@sauronsocuro
Apr 13 2016 15:45
thx for the answer
may i ask something now? or are u busy helping others right now?
ehekatlOf
@ehekatlOf
Apr 13 2016 15:46
just go for it
Jose
@sauronsocuro
Apr 13 2016 15:46
ok
ehekatlOf
@ehekatlOf
Apr 13 2016 15:46
usually someone will pick up and have an answer pretty quickly
Jose
@sauronsocuro
Apr 13 2016 15:46
im trying to learn what im coding, i mean, i dont want to copy/paste things
until now i have this
i thought that ---- $("#textbox").html("Here is the message"); -----
will change the dom, in the <p id=textbox>
maybe im losing something
TobyChow
@TobyChow
Apr 13 2016 15:51
Hi! I have an issue with my pomdoro clock, where the there is a slight delay between when the work timer reaches 00:00 and when the break timer begins (countdown is delayed with 1 second intervals otherwise) http://codepen.io/Toe125/pen/pyLJyJ
Stephen James
@sjames1958gm
Apr 13 2016 15:51
@sauronsocuro Are you sure that the $.getJSON call is calling your callback?
Vitor Lory
@vlory73
Apr 13 2016 15:53
hi guys. I'm looking into building a web app which should be as good on a desktop as on a mobile. bootstrap offers responsive pages, but jQuery mobile seems so much better for the mobile devices. can they be used on the same page( i already read somewhere that it should be avoided) ? if not, which to choose? i know it's vague but i'm only looking for some general info
Jose
@sauronsocuro
Apr 13 2016 15:54
No Stephen, im not sure about anything, anyway, i want to understand step by step the things i code, and i thought that ---- $("#textbox").html("Here is the message"); ---- will write "here is the message" in the <p id="textbox">. just for test if im doing well that part, then when can change that part of the html, i will try to put there the JSON quotes.
sorry if i do not explain myself well, im from spain, and english is not my first lenguage
Islam Ibakaev
@dagman
Apr 13 2016 15:56
so i worked out how to make timer in format xxhttp://codepen.io/dagman/pen/oxqzLx?editors=0011 But how can i build timer in format xx:xx ?
ehekatlOf
@ehekatlOf
Apr 13 2016 15:56
hm that's weird, why is this returning every character as a unique array item
$.ajax({
  url: 'https://gist.githubusercontent.com/signed0/d70780518341e1396e11/raw/2a7f4af8d181a714f9d49105ed57fafb3f450960/quotes.json',
  data: 'JSON',
  success: function (returnMe) {
    console.log(returnMe[2])
  }
})
Jose
@sauronsocuro
Apr 13 2016 15:58
im confusing cause i havent learn anything about $.ajax() expresion, so i assume maybe i must read some jquery manual before continue
i thoght with the freecode lessons i had enough to success but if i need extra help, im not in a hurry
ehekatlOf
@ehekatlOf
Apr 13 2016 15:58
well getJSON and .ajax do the same thing
so it's up to preference really
Jose
@sauronsocuro
Apr 13 2016 15:59
ah ok, thx
i put ur code in a new empty pen and get nothing, sometimes i feel so stupid :S
ehekatlOf
@ehekatlOf
Apr 13 2016 16:02
no no, it's fine
don't get discouraged that fast haha
Jose
@sauronsocuro
Apr 13 2016 16:03
i just dont want to bother people, anyway i feel stupid, but ill learn, for sure :D
so maybe the json i found is not properly formated
if i remember well, must be a "coma sign" between values
ehekatlOf
@ehekatlOf
Apr 13 2016 16:04
yeah
it's returning each character as a unique array item right now
Jose
@sauronsocuro
Apr 13 2016 16:04
so is not a valid JSON archive
ehekatlOf
@ehekatlOf
Apr 13 2016 16:04
can you link the documentation?
Jose
@sauronsocuro
Apr 13 2016 16:05
actually i found this looking for "json famous quotes" while i was in the bus, i sent the url to my wife by whatsapp and put it on my codepen when i arrived home
TobyChow
@TobyChow
Apr 13 2016 16:14
Hi! I have an issue with my pomdoro clock, where the there is a slight delay between when the work timer reaches 00:00 and when the break timer begins (countdown is delayed with 1 second intervals otherwise) http://codepen.io/Toe125/pen/pyLJyJ
Acmer77
@Acmer77
Apr 13 2016 16:15
what is this annoying stuff with "XMLHttpRequest cannot load"...
I've tried everything out there and I always get that when fetching quotes
Jose
@sauronsocuro
Apr 13 2016 16:17
thanks @ehekatlOf for your patience, i need to go now. have a great day
CamperBot
@camperbot
Apr 13 2016 16:17
sauronsocuro sends brownie points to @ehekatlof :sparkles: :thumbsup: :sparkles:
:star: 252 | @ehekatlof | http://www.freecodecamp.com/ehekatlof
Stephen James
@sjames1958gm
Apr 13 2016 16:17
@sauronsocuro This is not being sent back as json but as plain text "Content-Type:text/plain; charset=utf-8"
I changed your $.getJSON to $.get and the callback was invoked.
Jose
@sauronsocuro
Apr 13 2016 16:17
thanks @sjames1958gm i will look for something more usefull, another JSON source
CamperBot
@camperbot
Apr 13 2016 16:17
sauronsocuro sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 615 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Jose
@sauronsocuro
Apr 13 2016 16:18
so, i can put just $.get?
Ryan Elliott
@Ryan104
Apr 13 2016 16:21
@sauronsocuro thanks for the json quote link
CamperBot
@camperbot
Apr 13 2016 16:21
ryan104 sends brownie points to @sauronsocuro :sparkles: :thumbsup: :sparkles:
:star: 274 | @sauronsocuro | http://www.freecodecamp.com/sauronsocuro
Ryan Elliott
@Ryan104
Apr 13 2016 16:22
@sauronsocuro Ive been searching for something useful for a while...
Jose
@sauronsocuro
Apr 13 2016 16:22
glad this is usefull for u
if u are going to use it, put the source, i think the author will thank (im not the autor)
TobyChow
@TobyChow
Apr 13 2016 16:23
Hi! I have an issue with my pomdoro clock, where the there is a slightly longer delay between when the work timer reaches 00:00 and when the break timer begins. (countdown is delayed with 1 second intervals otherwise). Any help would be grealty appreciated!
http://codepen.io/Toe125/pen/pyLJyJ
Jose
@sauronsocuro
Apr 13 2016 16:24
see you later, thx for all
lizzieshipton
@lizzieshipton
Apr 13 2016 16:40
Just finished the Quote Machine challenge. Check it out - I'd love some feedback. Thanks! http://codepen.io/lizzieshipton/full/reYmLd/ Note I do NOT support Donald Trump - this is just an attempt to highlight his utter stupidity.
Acmer77
@Acmer77
Apr 13 2016 16:40
thought I'd come here and share my success, in case someone else is lost too...
Stephen James
@sjames1958gm
Apr 13 2016 16:41
@Toe125 Don't you have a second between 1 -> 0 and then another second before the other starts counting down? seems like about 2 seconds before the first number is counted off in the rest period
Acmer77
@Acmer77
Apr 13 2016 16:41
I tried to do the random quote task but I always got the XMLHttp -thing. well, the issue was Vivaldi browser. with Opera it works just fine
another thing was that the quote wouldn't refresh, but the background color changed...
$.ajaxSetup({ cache: false });
that fixes it
Stephen James
@sjames1958gm
Apr 13 2016 16:43
@lizzieshipton Looks good - funny taking Chuck Norris quotes to be about Trump. When you tweet the long quotes, you lose the @lizzieshipton
Acmer77
@Acmer77
Apr 13 2016 16:43
and thanks to all who tried to help. unfortunately those tricks were of no use (except hinting there's 4.0 of the quote API)
Stephen James
@sjames1958gm
Apr 13 2016 16:45
@sauronsocuro You can use console.log() in your code to see where and what is happening
Daniel Gonzales
@choppd
Apr 13 2016 16:56
Hi, I'm working on my Quote Machine and I cannot figure out how to use api's from external websites. Can someone explain how to do this, I'm using getJSON. Here is my javascript so far:
function getQuote() {
  //var html = "";
  $.getJSON("http://quotes.stormconsultancy.co.uk/quotes/1.json", function(a) {

    $("#quotes").append(a.quote);
  });
}

$(document).ready(function() {
  getQuote();

});
lizzieshipton
@lizzieshipton
Apr 13 2016 17:08
@sjames1958gm yeah, I realized that...but it was a sacrifice I was willing to make for the hilarity of the quotes lol. Eventually I'm gonna try and refine it to filter out the longer jokes and the jokes that don't totally make sense.
Stephen James
@sjames1958gm
Apr 13 2016 17:08
@lizzieshipton Before you post to twitter, you can truncate to 130 characters or such and maybe add . . . Hey that was one of the challenges go figure :)
lcthornhill
@lsrus
Apr 13 2016 17:09
@choppd try using the random quote url instead, as it looks like the other doesn't work: http://quotes.stormconsultancy.co.uk/random.json
if you ever want to see if a url will respond with json, you can paste the link directly into your browser and see what's coming back
Daniel Gonzales
@choppd
Apr 13 2016 17:12
@lsrus Thanks, I didn't know you could do that :smile:
CamperBot
@camperbot
Apr 13 2016 17:12
choppd sends brownie points to @lsrus :sparkles: :thumbsup: :sparkles:
:star: 357 | @lsrus | http://www.freecodecamp.com/lsrus
lizzieshipton
@lizzieshipton
Apr 13 2016 17:12
@sjames1958gm interesting, I didn't know about that. I'll play with it
Stephen James
@sjames1958gm
Apr 13 2016 17:13
@lizzieshipton The style is great, I suck at style myself.
lcthornhill
@lsrus
Apr 13 2016 17:13
@choppd nice choice of api, btw
lizzieshipton
@lizzieshipton
Apr 13 2016 17:13
@sjames1958gm thanks! that's the part I feel like I get lol
CamperBot
@camperbot
Apr 13 2016 17:13
lizzieshipton sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 616 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Daniel Gonzales
@choppd
Apr 13 2016 17:14
@lsrus It looked pretty clean haha
Mandeep Singh
@MandeepMann
Apr 13 2016 17:17
why
why style="margin-left:30px; margin-bottom:100px;" not working in my code pen ? margin left working but margin-bottom not working into this http://codepen.io/MrManu/pen/aNEPvN
it is the bottom picture
V Arun Kumar
@arunvkumr
Apr 13 2016 17:29
@MandeepMann both the styles are working.. margin-bottom is not showing because there is nothing at the bottom of the picture, so you are not able to see. resize your pen and both the grey images will come on top the middle image and there you can see margin-bottom is working.
Bascarau Claudiu
@clauub
Apr 13 2016 17:29
Hello guys can you help me with my website, is acting very strange I have no idea what to do http://codepen.io/clauub/pen/oxErjO
lcthornhill
@lsrus
Apr 13 2016 17:32
@clauub well you can't hotlink to imgur
Paul Borawski
@iAmNawa
Apr 13 2016 17:33
@clauub define strange
lcthornhill
@lsrus
Apr 13 2016 17:33
and also if you specify a height then divs will not resize to fit content
Bascarau Claudiu
@clauub
Apr 13 2016 17:35
I mean you can see how the paragraphs and everything is going in different parts of the page
I have something wrong with my size for divs but I don't know where is the problem
lcthornhill
@lsrus
Apr 13 2016 17:36
@clauub, yes, try taking out the .box height rule ^
Bascarau Claudiu
@clauub
Apr 13 2016 17:37
@lsrus just cut it out ?
Mandeep Singh
@MandeepMann
Apr 13 2016 17:38
@arunkumrv thank you
CamperBot
@camperbot
Apr 13 2016 17:38
mandeepmann sends brownie points to @arunkumrv :sparkles: :thumbsup: :sparkles:
:star: 448 | @arunkumrv | http://www.freecodecamp.com/arunkumrv
lcthornhill
@lsrus
Apr 13 2016 17:38

yeah so have


.box {
  position: relative;
  top: -0.3em;

}

instead - it will sort out your overflow problem at least

@iAmNawa Do you use your raspberryPi for much? A friend got me one for christmas but I don't even know where to start
Bascarau Claudiu
@clauub
Apr 13 2016 17:40
@lsrus yeah still nothing I don't know..
lcthornhill
@lsrus
Apr 13 2016 17:40
@clauub may be try stating explicitly what the problem that you are having is
Bascarau Claudiu
@clauub
Apr 13 2016 17:42
@lsrus when I'm resizing the window anything is mixing, and the paragraphs are going in the center, and is overlapping. and the footer is going also in the right and left and mixing too
lcthornhill
@lsrus
Apr 13 2016 17:44
@cluub you may find this helpful http://bit.ly/1Q7f2u2
Bascarau Claudiu
@clauub
Apr 13 2016 17:45
thanks @lsrus
CamperBot
@camperbot
Apr 13 2016 17:45
clauub sends brownie points to @lsrus :sparkles: :thumbsup: :sparkles:
:star: 358 | @lsrus | http://www.freecodecamp.com/lsrus
ehekatlOf
@ehekatlOf
Apr 13 2016 17:45
has anyone paid for the codeacademy angular course?
Robert Uivarosi
@URobert
Apr 13 2016 17:46
@ehekatlOf why pay? where there is so much free material ?:D
ehekatlOf
@ehekatlOf
Apr 13 2016 17:46
I just wanted something comprehensive haha
Robert Uivarosi
@URobert
Apr 13 2016 18:01
@ehekatlOf ;)
Nazim
@nazimkazim
Apr 13 2016 18:12
Hey guys please help me out i'm doing "Wikipedia search" project and it does not work out... Why all my articles start with name undefined although i type in different name?
V Arun Kumar
@arunvkumr
Apr 13 2016 18:21
Hey guys... part of the twitch api challenge is to check for username which doesn't exist. So when i use the name to get data from api i get an error. how should i use this error to get that user doesn't exist in brower i'm getting in jsone format. Like this
{"error":"Unprocessable Entity","message":"Channel 'brunofin' is unavailable","status":422}
but i'm just getting an error in console, so how to use the error to get that account doesn't exist. do i have to use the .done and .fail function of ajax?
John L.
@jomcode
Apr 13 2016 18:23
@arunkumrv look at that response and compare it to responses for channels that are offline but exist, and channels that are online
Frank XC
@tenkdayz
Apr 13 2016 18:24
@arunkumrv have to use /channels not /streams
bhenriquez8
@bhenriquez8
Apr 13 2016 18:24
think i finished the main requirements for the portfolio project, but it doesn't look good. think anyone can look at it and throw me some suggestions to make it aesthetically pleasing?
V Arun Kumar
@arunvkumr
Apr 13 2016 18:25
@tenkdayz @jomcode thanks.. i got it /channels works. :smile:
CamperBot
@camperbot
Apr 13 2016 18:25
arunkumrv sends brownie points to @tenkdayz and @jomcode :sparkles: :thumbsup: :sparkles:
:star: 318 | @jomcode | http://www.freecodecamp.com/jomcode
:star: 375 | @tenkdayz | http://www.freecodecamp.com/tenkdayz
Frank XC
@tenkdayz
Apr 13 2016 18:25
@arunkumrv to check who's online you'll have to use /streams
Stephen James
@sjames1958gm
Apr 13 2016 18:26
@arunkumrv If the response contains an error attribute you can assume the user is non-existant?
V Arun Kumar
@arunvkumr
Apr 13 2016 18:27
so to check if account exists /channels and then if it exists then /streams?
Frank XC
@tenkdayz
Apr 13 2016 18:27
@arunkumrv more like to get info channels and to see whos online streams
John L.
@jomcode
Apr 13 2016 18:28
@arunkumrv yes i think thats what i ended up doing ill look real quick
@arunkumrv look at what @sjames1958gm said
it makes working with json responses way more convenient / human readable
V Arun Kumar
@arunvkumr
Apr 13 2016 18:54
@sjames1958gm thanks.. took a while but it finally works ... :smile:
CamperBot
@camperbot
Apr 13 2016 18:54
arunkumrv sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 618 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
V Arun Kumar
@arunvkumr
Apr 13 2016 18:55
is it ok to use json query inside another one.. i mean nesting of json requests?
Justin
@daemedeor
Apr 13 2016 18:56
@jomcode i prefer postman myself tbh
John L.
@jomcode
Apr 13 2016 18:57
@daemedeor yeah i like postman a lot too. the extension i linked is convenient if youre just dealing with GETs
Justin
@daemedeor
Apr 13 2016 18:58
normally you have to send headers though, now adays esp with APIs so... XD
John L.
@jomcode
Apr 13 2016 19:02
definitely. was just suggesting something quick that works for what he's doing :)
Mandeep Singh
@MandeepMann
Apr 13 2016 19:08
hey guys please give review about my first ever completed tribute page http://codepen.io/MrManu/pen/aNEPvN
Henry Quinn
@Quinncuatro
Apr 13 2016 19:10
Looks solid, dude :)
codercooooder
@codercooooder
Apr 13 2016 19:14
guys can you test something for me. Im having a discussion with a software developer - he's claiming his code does one thing when he tests it - i get something different
on this jfiddle he says that if you page down, it doesn't jump between sections after you reach section 2. This is our discussion (at the bottom of the thread) alvarotrigo/fullPage.js#614
this is the jsfiddle; http://jsfiddle.net/97tbk/1191/
UDAY PRAPHULLA MALANGAVE
@malangaveuday
Apr 13 2016 19:16
function getIndexToIns(arr, num) {
  // Find my place in this sorted array.
  arr = arr.sort(function(a,b){return a - b;});
  var diff = [] ;
  var index;
  // take difference between each number and diff convert in positive
  for(i = 0; i < arr.length; i++){
    diff.push(Math.abs(arr[i]-num));
  }

  //find minimum number for serch closet number of num
  num = Math.min.apply( Math, diff );


  for (i = 0; i < diff.length; i++){
       if( num === diff[i]){
         index = i;
       }
  }

  return index;
}

getIndexToIns([40, 60], 50);




getIndexToIns([40, 60], 50) should return 1.
getIndexToIns([3, 10, 5], 3) should return 0.
getIndexToIns([5, 3, 20, 3], 5) should return 2.
getIndexToIns([2, 20, 10], 19) should return 2.
getIndexToIns([2, 5, 10], 15) should return 3.
its not working for last case please help me
Coy Sanders
@coymeetsworld
Apr 13 2016 19:19
@malangaveuday its an edge condition
you need to have a situation where the number you're inserting is larger than any number in the array
UDAY PRAPHULLA MALANGAVE
@malangaveuday
Apr 13 2016 19:21
@coymeetsworld please give me any hint how to check it
Coy Sanders
@coymeetsworld
Apr 13 2016 19:24
you can do it a number of way
s
after you sort you could check if num is greater than the last element
or, you can wait until your for loop goes through and if you don't have an index then you know you have a larger number than what is in your array
prashant
@findname
Apr 13 2016 19:27
can any one tell why checkbox is not vertically aligned with email and password https://codepen.io/findname/pen/qZPwWX?editors=1000
and also nav bar is having problem
UDAY PRAPHULLA MALANGAVE
@malangaveuday
Apr 13 2016 19:30
@coymeetsworld Hey Thank you smile:
CamperBot
@camperbot
Apr 13 2016 19:30
malangaveuday sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star: 544 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Apr 13 2016 19:31
np @malangaveuday :thumbsup: did you get it working?
UDAY PRAPHULLA MALANGAVE
@malangaveuday
Apr 13 2016 19:31
yup its working fine now. I compare it after sorting of array.
Coy Sanders
@coymeetsworld
Apr 13 2016 19:32
yeah seems like best way to do it
no point in looping through it if you can check to see if it goes at the end first :)
UDAY PRAPHULLA MALANGAVE
@malangaveuday
Apr 13 2016 19:34
yeah. . .
Clem
@ctataru
Apr 13 2016 19:42
hey guys. i just have one small question. could anyone explain why, on CSS line 12, changing the padding-top property from 0.01px to 0.02px creates such a big difference? it moves down my h3 element by quite a lot.
http://codepen.io/wise/pen/redjRo
actually, anything from 0.02px to 1px seems to not change anything. i'm guessing something else is interfering here, but not sure what
binaryhigh
@binaryhigh
Apr 13 2016 19:50
what is wrong with the syntax of input attribute? <input type="text" placeholder="cat photo URL".>
nsloc22
@nsloc22
Apr 13 2016 19:50
@ctataru you set big margins for box class
150 top bottom 200 left right @ctataru
Jeff
@adzam5
Apr 13 2016 19:52
How can I change the background color of a selected radio with JS? This is my current CSS to change it, but I can't figure out what to put in JS to change it.
[type="radio"]:checked + label:after {
    background-color: #ff0000;
    z-index: 0;
}
Clem
@ctataru
Apr 13 2016 19:53
@nsloc22 how else can i line up the box, if not like that?
Jeff
@adzam5
Apr 13 2016 19:54
I have tried many variations of $('[type=radio]:checked').css('background-color', '#color'); but nothing seems to work
Gabe Pressman
@gpressman
Apr 13 2016 19:55
can anyone help with this? I'm trying to make it so it assigns ids to each title the api pulls then uses the id in a window.open, but trying to get a dynamic id selector isn't working properly
it keeps turning up as #"criteria"
instead of "#criteria"
nsloc22
@nsloc22
Apr 13 2016 19:57
@ctataru then I don't understand your question
can you rephrase the question
codercooooder
@codercooooder
Apr 13 2016 19:59
hey guys, can a few of you just test a js fiddle for me and tell me how it responds?
Gabe Pressman
@gpressman
Apr 13 2016 19:59
@codercooooder link?
Clem
@ctataru
Apr 13 2016 19:59
@nsloc22 if the fact that i set my margins too big for the box to center it perfectly is giving me issues with padding inside the box, how else can i center the box without running into this issue?
codercooooder
@codercooooder
Apr 13 2016 19:59
Gabe Pressman
@gpressman
Apr 13 2016 20:00
what am I looking for?
codercooooder
@codercooooder
Apr 13 2016 20:00
@gpressman the developer made this, he claims that it doesn't "autoscroll" in later sections...that normal scrolling goes on... but when i press the down arrow key it autoscrolls no matter what (you have to activate the browser window first)
@gpressman the developer argues that it is scrolling normally (like any old page) in the last three sections, but i don't get that behavior. here is our discussion (at the end of the thread) alvarotrigo/fullPage.js#614
Gabe Pressman
@gpressman
Apr 13 2016 20:01
when you say autoscroll, you mean from 1 section to the next?
codercooooder
@codercooooder
Apr 13 2016 20:02
@gpressman exactly - it is jumping/autoscrolling in all sections for me
Gabe Pressman
@gpressman
Apr 13 2016 20:02
because it does that all the way through for me
codercooooder
@codercooooder
Apr 13 2016 20:02
it is autoscrolling/jumping?
Gabe Pressman
@gpressman
Apr 13 2016 20:02
yes
codercooooder
@codercooooder
Apr 13 2016 20:02
@gpressman thank yoiu - I get the same - with four down arrow presses you get to the end...see he says that isn't happening.
CamperBot
@camperbot
Apr 13 2016 20:02
codercooooder sends brownie points to @gpressman :sparkles: :thumbsup: :sparkles:
:star: 282 | @gpressman | http://www.freecodecamp.com/gpressman
codercooooder
@codercooooder
Apr 13 2016 20:03
do you have a git hub? @gpressman
Gabe Pressman
@gpressman
Apr 13 2016 20:03
yeah, why?
codercooooder
@codercooooder
Apr 13 2016 20:04
i would appreciate it if you could comment and say that it is autoscrolling for you too...or i can just say "other people are reporting the same issue" if you don't feel comfortable.
i understand if you dont' want to though.
Stephen James
@sjames1958gm
Apr 13 2016 20:04
@gpressman Don't JSON.stringify the data when using it only when you want console.log it -
Gabe Pressman
@gpressman
Apr 13 2016 20:05
what good would putting it in the console do?
codercooooder
@codercooooder
Apr 13 2016 20:05
@gpressman can you comment or should I just say "other people are reporting the same behavior"...no rush, i just want to know so I can get this resolved.
guys does everybody with a gitter acct necessarily havea github account too, is github required for access to this chat?
Gabe Pressman
@gpressman
Apr 13 2016 20:06
you might as well just do it, I'm trying to work stuff out
codercooooder
@codercooooder
Apr 13 2016 20:06
@gpressman ok thank you
CamperBot
@camperbot
Apr 13 2016 20:06
codercooooder sends brownie points to @gpressman :sparkles: :thumbsup: :sparkles:
Stephen James
@sjames1958gm
Apr 13 2016 20:06
@gpressman I am saying all your JSON.stringify in your code is not needed and actually breaks. Rather than try to use data off the internet for id's use something likt "tmpid-" + i
CamperBot
@camperbot
Apr 13 2016 20:06
:warning: codercooooder already gave gpressman points
Stephen James
@sjames1958gm
Apr 13 2016 20:07
@gpressman I think the stringify is giving you the "" in #"Frog"
Gabe Pressman
@gpressman
Apr 13 2016 20:07
hmm, ok I only put all this garbage in
because all my links on codepen
don't open properly
they go to codepen.com/whatever/<my link>
Stephen James
@sjames1958gm
Apr 13 2016 20:09
How were you building the links?
Gabe Pressman
@gpressman
Apr 13 2016 20:09
I mean even on my portfolio apparently
Stephen James
@sjames1958gm
Apr 13 2016 20:10
@gpressman github.com/gpressman this is a relative path and will open on the same site http://github.com/gpressman will open on the correct place
Add target="_blank" this to your <a> tags to get it to force a new tab which codepen requires
codercooooder
@codercooooder
Apr 13 2016 20:14
@gpressman I think i figured out why we disagreed. When I used my laptop trackpad to scroll, i get different behavior for the first section (as compared to the others).
Javier
@sh1g
Apr 13 2016 20:14
Question. Why is my quote not appending to the href http://codepen.io/sh1g/pen/GZQYKY
Gabe Pressman
@gpressman
Apr 13 2016 20:15
@sjames1958gm thanks that's all very helpful
CamperBot
@camperbot
Apr 13 2016 20:15
gpressman sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 619 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
nsloc22
@nsloc22
Apr 13 2016 20:16
@ctataru I meant your original question, margins shouldn't affect padding
Stephen James
@sjames1958gm
Apr 13 2016 20:17
@gpressman :+1:
nsloc22
@nsloc22
Apr 13 2016 20:20
@ctataru just I don't know why you are setting fixed left and right margin, is it just to center the element? you can set it to auto, for left and right margin, and element will be centered, give it fixed width, now it wouldn't be very readable for small screens
Gabe Pressman
@gpressman
Apr 13 2016 20:23
@sjames1958gm that fixed all the garbage in my portfolio I didn't know about until today
@sjames1958gm but this is the original version I had of my wiki reader, links still no good
lcthornhill
@lsrus
Apr 13 2016 20:28
@sh1g I have never been able to work out how those twitter buttons work. My only advice is to make your own twitter button using a normal btn and this sort of url
href="https://twitter.com/intent/tweet?text=Hello%20world"
Gabe Pressman
@gpressman
Apr 13 2016 20:30
@sjames1958gm actually I got it, now I just have to figure out why there's html markdown in some of the descriptions
Javier
@sh1g
Apr 13 2016 20:31
@lsrus thank you. Yeah I think that's going to be the case.
CamperBot
@camperbot
Apr 13 2016 20:31
sh1g sends brownie points to @lsrus :sparkles: :thumbsup: :sparkles:
:star: 359 | @lsrus | http://www.freecodecamp.com/lsrus
Orban Geoffrey
@Geo86
Apr 13 2016 20:31
Looking for someone to help me on the no repeat challenge
Stephen James
@sjames1958gm
Apr 13 2016 20:47
@gpressman Cool - I actually used some of the markup in the information - it highlights the search value
Gabe Pressman
@gpressman
Apr 13 2016 20:48
@sjames1958gm I realized that some of it
like for example I kept searching "honey" to test
the weird looking word was honey in greek or some such
but there are still problems, like it doesn't know what to do with quotes
Jin Choi
@JiniHendrix
Apr 13 2016 21:06
Hello, can anyone help me get my scores to show up to the left and right of my tic tac toe board?
im using float left and right but it's not working for me
Stephen James
@sjames1958gm
Apr 13 2016 21:06
@gpressman target=_blank missing the underscore
Gabe Pressman
@gpressman
Apr 13 2016 21:08
@sjames1958gm thanks
CamperBot
@camperbot
Apr 13 2016 21:08
gpressman sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:warning: gpressman already gave sjames1958gm points
Gabe Pressman
@gpressman
Apr 13 2016 21:09
how difficult is the twitch thing? I'm pretty out of mental energy for the day
prashant
@findname
Apr 13 2016 21:10
in boots trap how can i center emai password and login button along with checkboxhttps://codepen.io/findname/pen/qZPwWX?editors=1000
Ken Haduch
@khaduch
Apr 13 2016 21:19
@findname - you can use some bootstrap rows / columns and move the form closer to the center. It will be hard to exactly center it because the labels are not the same length, but you can definitely get them lined up more in the middle.
@JiniHendrix - have you tried using bootstrap row / column grid to position those closer to the board? it might work?
Jin Choi
@JiniHendrix
Apr 13 2016 21:27
@khaduch i'm not really familiar with that stuff, i think i got it to work now
just used position:relative to move it up as it showed up at the bottom of the board
Eduardo Santos
@eddysantos
Apr 13 2016 22:05
Hello guys!! I hope you can help me. I'm using the bootstrap grid class (col-md-x), in one side I have text and in the other one I have an img. The thing is I can't make the text vertically aligned in the center of the image. Any ideas?
Clark Arnold
@clarkarnold
Apr 13 2016 22:07
Hey all, I have really been struggling with the Tic Tac Toe, would anyone care to take a look at what I have and see what I should try next?
@eddysantos You have a link to what you mean?
Vertically aligning can be tricky/hacky, but using margin-top and margin-bottom is a way to try
Clark Arnold
@clarkarnold
Apr 13 2016 22:16
You need to give your image the class="img-responsive"
and also that div needs class="col-md-3"
I have never used col-md-auto before so im not sure how it words, but setting solid column widths and using img-responsive will help!
Eduardo Santos
@eddysantos
Apr 13 2016 22:18
img-responsive should be on the div containing the img or the img itself??
```
            <div class="row"> <!-- Container of both intro-text and picture -->
                <div class="intro-text col-md-9">
                    <p>I am an amateur coder with no more than 6 months actively learning how to code. I've done some PHP and VB Programs, but all from a coding, nothing really made by me from scratch. I ambition to be able to create my own web-based applications, combining all the Front-end technologies with the backend processes (MySQL, PHP, SOAP, etc).</p>
                </div>
                <div class="col-md-3">
                    <img src="https://scontent-atl3-1.xx.fbcdn.net/v/t1.0-9/283201_10150236134231621_1528422_n.jpg?oh=d0460ee594e3722ceed2dbf2e222f6f9&oe=5776E9AD" class="img-circle img-responsive" alt="Me having some fun in Cancun" />
                </div>
            </div>
That's how I just made it now, but it's still not working.

```

<div class="row"> <!-- Container of both intro-text and picture -->
<div class="intro-text col-md-9">
<p>I am an amateur coder with no more than 6 months actively learning how to code. I've done some PHP and VB Programs, but all from a coding, nothing really made by me from scratch. I ambition to be able to create my own web-based applications, combining all the Front-end technologies with the backend processes (MySQL, PHP, SOAP, etc).</p>
</div>
<div class="col-md-3">
<img src="https://scontent-atl3-1.xx.fbcdn.net/v/t1.0-9/283201_10150236134231621_1528422_n.jpg?oh=d0460ee594e3722ceed2dbf2e222f6f9&oe=5776E9AD" class="img-circle img-responsive" alt="Me having some fun in Cancun" />
</div>
</div>
´´´

´´´

<div class="row"> <!-- Container of both intro-text and picture -->

<div class="intro-text col-md-9">

<p>I am an amateur coder with no more than 6 months actively learning how to code. I've done some PHP and VB Programs, but all from a coding, nothing really made by me from scratch. I ambition to be able to create my own web-based applications, combining all the Front-end technologies with the backend processes (MySQL, PHP, SOAP, etc).</p>
</div>

<div class="col-md-3">
<img src="https://scontent-atl3-1.xx.fbcdn.net/v/t1.0-9/283201_10150236134231621_1528422_n.jpg?oh=d0460ee594e3722ceed2dbf2e222f6f9&oe=5776E9AD" class="img-circle img-responsive" alt="Me having some fun in Cancun" />
</div>
</div>
´´´

lcthornhill
@lsrus
Apr 13 2016 22:21
@eddysantos You want to say either
'I aim to be able to create...'
or
'My ambition is to be able to create...'
(sorry, I know that wasn't what you were asking)
Eduardo Santos
@eddysantos
Apr 13 2016 22:21
<div class="row"> <!-- Container of both intro-text and picture -->
<div class="intro-text col-md-9">
<p>I am an amateur coder with no more than 6 months actively learning how to code. I've done some PHP and VB Programs, but all from a coding, nothing really made by me from scratch. I ambition to be able to create my own web-based applications, combining all the Front-end technologies with the backend processes (MySQL, PHP, SOAP, etc).</p>
</div>
<div class="col-md-3">
<img src="https://scontent-atl3-1.xx.fbcdn.net/v/t1.0-9/283201_10150236134231621_1528422_n.jpg?oh=d0460ee594e3722ceed2dbf2e222f6f9&oe=5776E9AD" class="img-circle img-responsive" alt="Me having some fun in Cancun" />
</div>
</div>
Stephen James
@sjames1958gm
Apr 13 2016 22:22
@eddysantos Back ticks
Eduardo Santos
@eddysantos
Apr 13 2016 22:23
@lsrus good catch! Thanks!
CamperBot
@camperbot
Apr 13 2016 22:23
eddysantos sends brownie points to @lsrus :sparkles: :thumbsup: :sparkles:
api offline
Sean McDonald
@bewsii
Apr 13 2016 22:27
@bewsii
Why doesn't this pass the Escaping Literal Quotes in Strings challenge?
var myStr = "I am a \"double quoted\" string inside \"double qoutes\"";
Jeff
@adzam5
Apr 13 2016 22:53
I have 3 divs, inline block. The middle one is just a 10px wide divider. I am having trouble getting the width of the outter divs to meet in the middle
Ryan Elliott
@Ryan104
Apr 13 2016 22:56
@bewsii you spelled quotes incorrectly i believe
Sean McDonald
@bewsii
Apr 13 2016 22:57
oh crap LOL
you noticed what I and everyone else who's tried helping me missed if that's why lol
cant check now though since the site is down ;./
M
@raydiatur
Apr 13 2016 23:12
hello everyone, i had posted my tribute page and got lots of feedback and used it all to make fixes. please let me know if there is anything that might need to be fixed. http://codepen.io/raydiatur/full/WwMMdr/
Frank XC
@tenkdayz
Apr 13 2016 23:21
@raydiatur looks good
@adzam5 did you find a solution ?
Jin Choi
@JiniHendrix
Apr 13 2016 23:24
@clarkarnold im sure your aware, but after winning the alert goes off 4 times and alternates between X and O
@clarkarnold the layout looks nice
Jeff
@adzam5
Apr 13 2016 23:25
@tenkdayz Yes and no. I fixed the gap in the middle, but now I am having trouble getting the divs to stay next to each other and still fill the screen if I resize the window
Jin Choi
@JiniHendrix
Apr 13 2016 23:25
@clarkarnold the alerts are annoying
Jeff
@adzam5
Apr 13 2016 23:26
@tenkdayz It seems to be working better on my dev server than on CodePen though.
Jin Choi
@JiniHendrix
Apr 13 2016 23:27
@clarkarnold also sometimes the computer goes twice after my first turn..
@clarkarnold it just went 5 times in one turn rofl
Frank XC
@tenkdayz
Apr 13 2016 23:30
@adzam5 are you using bootstrap?
Jeff
@adzam5
Apr 13 2016 23:31
@tenkdayz Yes
Frank XC
@tenkdayz
Apr 13 2016 23:32
@adzam5 the red div is not floating left..
Daniel Gonzales
@choppd
Apr 13 2016 23:33
Hi, I'm working on my Quote Machine, and I can't figure out how to use api's from an external link. Any help would be appreciated, here's my code:
function getQuote() {
 $.getJSON("http://quotes.stormconsultancy.co.uk/random.json", function(a) {
  $("#quotes").append(a.quote);
 });
}

$(document).ready(function() {
 getQuote();
});
Frank XC
@tenkdayz
Apr 13 2016 23:35
@adzam5 delete the display inlineblock on all then make the red div and green div's width 46% or so
paffson
@paffson
Apr 13 2016 23:35
@clarkarnold first try to write a loop to recognize a win without repeating your code, would you do it if the board was bigger?
Jeff
@adzam5
Apr 13 2016 23:35
@tenkdayz Forgot to put that back in when I was messing around with the code.
Greg Duncan
@GregatGit
Apr 13 2016 23:35
@choppd do you have a pen? The url is fine
@GregatGit
I'm just trying to get it to post something, the button doesn't work atm
Jeff
@adzam5
Apr 13 2016 23:38
@tenkdayz They seem to be staying next to each other with the narrower width, but now I have more empty space than I'd like on the right
Frank XC
@tenkdayz
Apr 13 2016 23:39
@adzam5 what do you want it to do?
@choppd $('#quotes').text(....)
Jeff
@adzam5
Apr 13 2016 23:40
@tenkdayz I want both divs to fill the width of the screen
Greg Duncan
@GregatGit
Apr 13 2016 23:41
@choppd I recomend setting up a button that does nothing but alert - then once it fires put the getQuote function in it
Ali Amirazizi
@alivera
Apr 13 2016 23:42
Hi! can someone help with the twitch api project. I'm having trouble listing offline users. http://codepen.io/alivera/full/dMmzQR/
Frank XC
@tenkdayz
Apr 13 2016 23:42
make the body{margin:0;} and the divs margins 0 also with withs' 48% and the divider 4% might work
paffson
@paffson
Apr 13 2016 23:42

@clarkarnold i mean this function ```function checkGameOver() {
console.log("checking");
var isOver = false;
draw = false;
if (board[0] !== "" && board[0] == board1 && board1 == board2) {
alert(currentPlayer + " wins!");
isOver = true;
} else if (board3 !== "" && board3 == board[4] && board[4] == board[5]) {
alert(currentPlayer + " wins!");
isOver = true;
} else if (board[6] !== "" && board[6] == board[7] && board[7] == board[8]) {
alert(currentPlayer + " wins!");
isOver = true;
} else if (board[0] !== "" && board[0] == board3 && board3 == board[6]) {
alert(currentPlayer + " wins!");
isOver = true;
} else if (board1 !== "" && board1 == board[4] && board[4] == board[7]) {
alert(currentPlayer + " wins!");
isOver = true;
} else if (board2 !== "" && board2 == board[5] && board[5] == board[8]) {
alert(currentPlayer + " wins!");
isOver = true;
} else if (board[0] !== "" && board[0] == board[4] && board[4] == board[8]) {
alert(currentPlayer + " wins!");
isOver = true;
} else if (board2 !== "" && board2 == board[4] && board[4] == board[6]) {
alert(currentPlayer + " wins!");
isOver = true;
} else if (board[0] !== "" && board1 !== "" && board2 !== "" && board3 !== "" && board[4] !== "" && board[5] !== "" && board[6] !== "" && board[7] !== "" && board[8] !== "") {
alert("Its a draw!");
isOver = true;
draw = true;

}
```

Frank XC
@tenkdayz
Apr 13 2016 23:43
@alivera you have to use https://api.twitch.tv/kraken/channels/
Ali Amirazizi
@alivera
Apr 13 2016 23:44
@tenkdayz ok that might be it. thanks!
CamperBot
@camperbot
Apr 13 2016 23:44
alivera sends brownie points to @tenkdayz :sparkles: :thumbsup: :sparkles:
:star: 383 | @tenkdayz | http://www.freecodecamp.com/tenkdayz
Jeff
@adzam5
Apr 13 2016 23:49
@tenkdayz It's getting closer to what I'm looking for! I am trying to get a layout similar to CodePen
Greg Duncan
@GregatGit
Apr 13 2016 23:53
@choppd Write some text in the div like "quote to go here" then make a button that can change it
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 23:53
@GregatGit are you familar with wikipedia api searching?
Greg Duncan
@GregatGit
Apr 13 2016 23:54
@Dueldrawer8 I got it to work - not 100% all over it tho
are you stuck there?
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 23:54
@GregatGit can you help me with my search query? im so close but cant get all the info i need
yes
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 23:55
I basically need either the url, or page id to link my search boxes to the link. Second i need an extract, and third I want the search to match revelance..take a look at this
if you look at the indexes.. the first search returns "Cast Away" which is in index 10.. "Tom Hanks" which is what i want to appear at the top of the page has an index of 1
i bascially want to keep all that same info except i want the revelant title that people are searching for to stay at the top
Greg Duncan
@GregatGit
Apr 13 2016 23:58
@Dueldrawer8 I found their explaination beyond complicated
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 23:58
oh.. looks like your search query is perfect
Daniel Gonzales
@choppd
Apr 13 2016 23:58
@GregatGit Well the thing is, I'm just trying to get the api to work. I thought I understood it, but for some reason I can't call data from the url
Randy Goldsmith
@Dueldrawer8
Apr 13 2016 23:58
@GregatGit yes, ive been messing with there sandbox for a day or two and cant get excatly what i want. was about to ask the question on stack overflow
Greg Duncan
@GregatGit
Apr 13 2016 23:59
@Dueldrawer8 After days of trying and quitting and coming back a friend gave me the url - so my advice is to just use it and figure how it works later - if not you can spend a lot of time messing around