These are chat archives for FreeCodeCamp/HelpFrontEnd

13th
Jun 2016
Aryan
@aryandua
Jun 13 2016 00:22
hi people
JD Tadlock
@jdtdesigns
Jun 13 2016 00:23
@JonKaric flexbox has support for all browsers and ie 9 and up
no reason not to use it
Blake Harris
@bharris62
Jun 13 2016 00:24
having a little issue, havn't messed with bootstrap in awhile, why are my 4 'social' icons not side by side?
kunno
@kunno
Jun 13 2016 00:27
@bharris62 Why do you have them in separate divs?
Blake Harris
@bharris62
Jun 13 2016 00:30
unless i'm forgetting something, with bootstrap, you create a row, and say you want 4 columns, you create 4 divs at col-xs/md/xl-3
and each div is responsive
thats how I have achieved it in the past, atleast
JD Tadlock
@jdtdesigns
Jun 13 2016 00:31
@bharris62 all your classes are set with '
'-' instead of '='
Blake Harris
@bharris62
Jun 13 2016 00:35
lmao they are....atom did that
no idea why
thanks, @jdtdesigns
CamperBot
@camperbot
Jun 13 2016 00:37
bharris62 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 463 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Blake Harris
@bharris62
Jun 13 2016 00:37
well, that fixed it. needa do a little more work to em, but thats fixed!
Jonathan
@JonKaric
Jun 13 2016 00:59
@jdtdesigns I just don't think it's quite there yet. I'll be utilising it around the end of this year.
JD Tadlock
@jdtdesigns
Jun 13 2016 01:03
@JonKaric ie9 and ie10 usage are at 1.4% across the board
like i said, no reason to not use flexbox
2016 ;)
George Phalen
@gphalen
Jun 13 2016 01:57
Hi. Could anyone look at my TwitchTV project and tell me if it satisfies all of the user stories?
JD Tadlock
@jdtdesigns
Jun 13 2016 01:58
@gphalen we can, but there is a CodeReview chat for that ;)
George Phalen
@gphalen
Jun 13 2016 01:59
oh, sorry! I just hit "help" on the project page.
regardless, it's here if anyone would be so kind: http://codepen.io/gphalen/pen/zBqqPB
Kyle W Pilkinton
@tadake
Jun 13 2016 02:00
hey guys im trying to compare the user input to the array of the pattern in my simon game. i was thinking maybe recording everything thats pressed after a function is called but im not sure how i would do this? can anyone help me out?
buiphuking
@buiphuking
Jun 13 2016 02:02
someone use atom editor, plz help me...............
JD Tadlock
@jdtdesigns
Jun 13 2016 02:02
@gphalen You need to show the description for the live streams. Other than that, the stories seem complete. You should really work on some styling as this will be a necessity for frontend dev.
George Phalen
@gphalen
Jun 13 2016 02:03
@jdtdesigns What description am I missing? I included the game being streamed.
and yeah, I know it's pretty bare bones. I just wanted to get the nuts and bolts working before making it look nice.
kwittig
@kwittig
Jun 13 2016 02:04
@khaduch Thank you for clearing that up!!
CamperBot
@camperbot
Jun 13 2016 02:04
kwittig sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1307 | @khaduch |http://www.freecodecamp.com/khaduch
JD Tadlock
@jdtdesigns
Jun 13 2016 02:04
@tadake basically, you can push each click of the user to an array, saving the id such as 0,1,2,3 and when the array equals the length of the pattern, show the next pattern. For each click, compare the user array to the pattern array, and if they don't match throw the error for either normal or strict mode.
@gphalen " I can see additional details about what they are streaming." <- from User Story 6
Kyle W Pilkinton
@tadake
Jun 13 2016 02:06
ah and restart the array with a function each time thanks @jdtdesigns youve been helping me out alot with this project lol !!
CamperBot
@camperbot
Jun 13 2016 02:06
tadake sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 464 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Jun 13 2016 02:08
@tadake welcome ;)
George Phalen
@gphalen
Jun 13 2016 02:10
@jdtdesigns OK, is this sufficient? It seems to be what they include in the example project.
JD Tadlock
@jdtdesigns
Jun 13 2016 02:11
@gphalen perfect ;)
George Phalen
@gphalen
Jun 13 2016 02:11
Yay! :D
kwittig
@kwittig
Jun 13 2016 02:12
@khaduch Sorry. That isn't right. It keeps saying I'm missing a ")" and that it's a syntax error
kwittig
@kwittig
Jun 13 2016 02:34
@khaduch Nevermind. Same problem as before. Sorry.
All the check marks are green. Won't move on to the next challenge.
buiphuking
@buiphuking
Jun 13 2016 02:40
is anyone use atom editor ????????????
kwittig
@kwittig
Jun 13 2016 02:51
SyntaxError: missing ) after argument list
What do I do with the above error?
All check marks are still green.
Srinivasan
@kksrini89
Jun 13 2016 02:52
can anyone help me to assist for wikipedia viewer for random articles?
I am stuck how to start this even after seen wikipedia api which I don't understand.
anyone help me..???
kwittig
@kwittig
Jun 13 2016 03:00
<script>
$(document).ready(function()
$("button").addClass("animated bounce");
$(".well").addClass("animated shake");
$("#target3").addClass("animated fadeout");

</script>
SuryaKavutarapu
@SuryaKavutarapu
Jun 13 2016 03:08
@kksrini89
@kksrini89 it's build on top of angularJs frontend JavaScript framework.you can learn it from w3schools.com. or you can build the wikipedia app via Ajax
Dana Hooper
@MIssPolly
Jun 13 2016 03:13
I am getting ready to start working on the portfolio webpage. I am feeling as though perhaps I am not prepared to create a page as complex as the sample. The instruction to this point has not covered many of the aspects shown on the example. I mean, have they used a template they got from somewhere? The link to the example is not to the same one that is used in the video, but it looks like it has the same exact layout.
Ken Haduch
@khaduch
Jun 13 2016 03:14
@kwittig - you should have some curly braces there around the body of the function - the opening line should look like this:
$(document).ready(function() { - note the curly brace after the function's () parentheses. Then the last line (before the closing </script> tag) should have the matching }); to close the function body and the opening paren after the .ready(. That might be the solution?
kwittig
@kwittig
Jun 13 2016 03:16
I did that and it gave me errors, so I took them out and the red x's turned to green check marks. Maybe it's a glitch.
Tried signing out and signing in again. Didn't work. Used to though
Ken Haduch
@khaduch
Jun 13 2016 03:18
@MIssPolly - I don't know if you want to go this route, but I found it helpful. There is a section on Bootstrap on the w3schools.com site, and in addition to going through the many Bootstrap classes and features, they walk through the development of some "themes" - which are sites set up from a to z using Bootstrap, developing pages that look a lot like the example portfolio in the challenge. I found it to be helpful just to get more Bootstrap and design exposure. Maybe it will help you?
@kwittig - have you tried refreshing your browser and/or clearing the browser cache (temporary files)? If you can post your code with the braces, etc, and use the code formatting syntax here, I'd be happy to take a look.
help format
Dana Hooper
@MIssPolly
Jun 13 2016 03:19
@khaduch - Thanks! I have also been looking on w3schools, but had not found that part.
CamperBot
@camperbot
Jun 13 2016 03:19
misspolly sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1308 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Jun 13 2016 03:19
This message was deleted
CamperBot
@camperbot
Jun 13 2016 03:19
no wiki entry for: format @kwittig
Ken Haduch
@khaduch
Jun 13 2016 03:19
help format
CamperBot
@camperbot
Jun 13 2016 03:19

:point_right: code formatting [wiki]

Multi line Code

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

Single line Code

This an inline `<paste code here>` code formatting with a single backtick() at _start_ and _end_ around thecode`.

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

Ken Haduch
@khaduch
Jun 13 2016 03:20
@MIssPolly - check it out - look at the bottom of the Bootstrap lessons for "Themes" - should give you some good lessons. I hope it helps!
khaduch @khaduch - time to say goodbye for now - I hope you get all of your coding up and running!
Srinivasan
@kksrini89
Jun 13 2016 03:40
@SuryaKavutarapu thank you for your tip. I'll search like how to do via ajax.
CamperBot
@camperbot
Jun 13 2016 03:40
kksrini89 sends brownie points to @suryakavutarapu :sparkles: :thumbsup: :sparkles:
:cookie: 279 | @suryakavutarapu |http://www.freecodecamp.com/suryakavutarapu
Jimmy Hernandez
@dismister
Jun 13 2016 03:43
Good Afternoon everyone. I'm trying to create a navbar using bootstrap. My webpage is all one page that scrolls,but i'm trying to make a navbar that scrolls the page to the area that was clicked on the navbar. Does anyone know how to do that?
Chris Cullen
@123xylem
Jun 13 2016 03:44
Quick Question:::::Can you tell me what is meant by |collection[c][pre] because pre is a seperate arg to collection so I dont get how its being used??
function every(collection, pre) {
  // Create a counter to check how many are true.
  var counter = 0;

  // Check for each object
  for (var c in collection) {
    // If it has the same property or the same property value then add 1
    if (collection[c].hasOwnProperty(pre) || collection[c][pre] == pre) {//what is this? collection c is c in collection.. but the pre bit isnt in collection...!??
      counter++;
    }
Greg Duncan
@GregatGit
Jun 13 2016 03:56
JD Tadlock
@jdtdesigns
Jun 13 2016 04:18
@123xylem pre is referring to the argument that is passed in when the 'every' function is called
Chris Cullen
@123xylem
Jun 13 2016 04:18
@jdtdesigns right... so how could pre ever be in collection if they are 2 different arguments?
I thought it mightve been: collection[c][pre] = is pre in collection c... but its not that
JD Tadlock
@jdtdesigns
Jun 13 2016 04:19
@123xylem what is the challenge?
Chris Cullen
@123xylem
Jun 13 2016 04:20
see if the object in collection has a truthy val for the arg in pre
Everything Be True
JD Tadlock
@jdtdesigns
Jun 13 2016 04:21
@123xylem what is the name of the challenge on fcc?
Chris Cullen
@123xylem
Jun 13 2016 04:21
Everything Be True
JD Tadlock
@jdtdesigns
Jun 13 2016 04:23
@123xylem you're overthinking this challenge
Chris Cullen
@123xylem
Jun 13 2016 04:23
I just dont understand what that means
JD Tadlock
@jdtdesigns
Jun 13 2016 04:23
bracket notation allows you to dynamically call keys or values
so pre means whatever the function passes in such as 'sex'
Chris Cullen
@123xylem
Jun 13 2016 04:24
so collection[c][pre] what is this saying in english?
to me it says is pre in c of collection
JD Tadlock
@jdtdesigns
Jun 13 2016 04:25
collection[0]['sex']
0 is equal to the current loop iteration counter
or the current object in the collection
the collection has a bunch of objects
Chris Cullen
@123xylem
Jun 13 2016 04:26
yea 0 is the c usually (i)... but if pre is at colection c why ask if its equal to pre ? eg collection[c][pre] == pre...
JD Tadlock
@jdtdesigns
Jun 13 2016 04:26
so c will just equal each object one by one as it goes through it
because [pre] is dynamic
could mean anything
it's just referring to the current key it's on in the loop
pre without brackets is referring to the actual argument passed in, ie 'sex'
Chris Cullen
@123xylem
Jun 13 2016 04:28
but pre means pre when said like that? I guess what im asking is does collection[c][pre] mean the same as collection[c][pre] == pre? Because collection[c][pre] wouldnt exist if it collection[c] wasnt == pre
o so [pre] couldve been called [bannanas] its just saying at [c] is the key == what pre is defined as?
JD Tadlock
@jdtdesigns
Jun 13 2016 04:30
in the loop it will go through like this collection[0]['user'] == 'sex' ( false), collection[1]['sex'] == 'sex' (true)
cause in the brackets, that is just a dummy key to grab the actual key from the object
yes
if you used dot notation, like collection[0].sex, you would be referring to an actual key called 'sex'
Chris Cullen
@123xylem
Jun 13 2016 04:33
so collection[c][randomTagNameForComparingKey]==[pre] is the same thing
JD Tadlock
@jdtdesigns
Jun 13 2016 04:34
yes
Chris Cullen
@123xylem
Jun 13 2016 04:35
@jdtdesigns well god bless and thanks for bein so patient!
CamperBot
@camperbot
Jun 13 2016 04:35
123xylem sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 465 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Chris Cullen
@123xylem
Jun 13 2016 04:35
I was confused because it looked like it was calling pre as if pre was part of collection
Now i iust need to get the definiitions of object properties and keys down
Thomas Burgess
@ThomasBurgess2000
Jun 13 2016 04:36
Can someone check out my portfolio and tell me what they think? I realize I need to make the menu collapse on small screens, but anything else? http://codepen.io/ThomasBurgess2000/full/EyKKwg/
Chris Cullen
@123xylem
Jun 13 2016 04:38
@ThomasBurgess2000 looks good. the Contact part could be better laid out for ease of sight but its nice
eg phone=
email=
Thomas Burgess
@ThomasBurgess2000
Jun 13 2016 04:39
Good point, thanks! @123xylem
CamperBot
@camperbot
Jun 13 2016 04:39
thomasburgess2000 sends brownie points to @123xylem :sparkles: :thumbsup: :sparkles:
:cookie: 311 | @123xylem |http://www.freecodecamp.com/123xylem
JD Tadlock
@jdtdesigns
Jun 13 2016 04:41
@123xylem another example ;) http://jsbin.com/ripugu/edit?js,console
Thomas Burgess
@ThomasBurgess2000
Jun 13 2016 04:42
fixed it @123xylem
Chris Cullen
@123xylem
Jun 13 2016 04:43
@ThomasBurgess2000 good job... Wish i was that advanced at ur age :)
Thomas Burgess
@ThomasBurgess2000
Jun 13 2016 04:44
Haha I appreciate it! I had written off coding for a while after having a bad experience with Codecademy, but FCC has been amazing for me. @123xylem
Chris Cullen
@123xylem
Jun 13 2016 04:45
@ThomasBurgess2000 same with me.. codeacademy frustrated me so i left for a year
then found the light at fcc
@jdtdesigns thanks good lil educational code
CamperBot
@camperbot
Jun 13 2016 04:48
123xylem sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:warning: 123xylem already gave jdtdesigns points
Chris Cullen
@123xylem
Jun 13 2016 04:53

THe first line of code here is correct and the second one doesnt seem to see if its boolean.. how come?

Boolean(collection[c][pre]))

And

collection[a][pre]==="boolean"

What is the difference?

Apart from the c and a
JD Tadlock
@jdtdesigns
Jun 13 2016 05:00
second one would need typeof collection[a][pre] == 'boolean'
@123xylem
Chris Cullen
@123xylem
Jun 13 2016 05:18
@jdtdesigns i tried that
for some reason only the first works
Kyle W Pilkinton
@tadake
Jun 13 2016 05:19
im stuck again on my simon project. everything seems to be aid out correctly and i cant figure out my issue. can anyone help me?
http://codepen.io/tadake/pen/gMadEz?editors=0010
the problems are that i cant get my sequence to progress past two and I cant get it to start again from the begining
tommy
@tommygebru
Jun 13 2016 05:26

@tommygebru
PLEASE SHARE: any tips/tricks/advice you picked up in coding.... just in general or something to share when someone is stuck :smile: :+1: :sparkles: :heart:
for example:

Master pseudocode and you master all languages

Greg Duncan
@GregatGit
Jun 13 2016 05:32
@tadake what is your issue?
@tadake sorry - i missed see your issue at the bottom now
Greg Duncan
@GregatGit
Jun 13 2016 05:44
@tadake it is very hard to read your code - you have so many blank lines that you have to scroll a lot to get from one end to the other. You also have a bunch of variables that should not be declared at the start - i,j,k, temp - decare them when there needed so they can be discarded and not tracked.
Kyle W Pilkinton
@tadake
Jun 13 2016 05:47
Yeah im used to having blank lines to help out a bit. I'll get rid of them. Yeah I'm not sure why those are declared there. that's probably where my problem lies. @GregatGit
Greg Duncan
@GregatGit
Jun 13 2016 05:47
@tadake put all those definations of the functions above each - and name the function accordingly - so function again should be called resetSequences
Kyle W Pilkinton
@tadake
Jun 13 2016 05:48
thanks Greg @GregatGit I'll work on that tomorrow
CamperBot
@camperbot
Jun 13 2016 05:48
tadake sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 579 | @gregatgit |http://www.freecodecamp.com/gregatgit
Greg Duncan
@GregatGit
Jun 13 2016 05:50
@tadake the one thing to remember with delays is that the computer keeps going and just comes back and executes the code when its ready
Kyle W Pilkinton
@tadake
Jun 13 2016 05:51
is there a way to stop the computer and have it wait? @GregatGit
Greg Duncan
@GregatGit
Jun 13 2016 05:51
@tadake so if you had a for loop with a function inside with a setTimeout of 1000 - all of those would go off at what would feel like the same time
you have to increase the timer
here is how i did mine
for (var i = 0; i < movesComp.length; i++) {
    var temp = colorNames[movesComp[i]];
    setTimeout(temp, 750 * (i + 1));
  }
I'm also working on Simone game too right now - I have basically centered it around an array movesComp that I keep pushing a random number to (0 - 3)
Ray Liu
@mania7539
Jun 13 2016 05:57
@dhcodes Haha ok, I would modify it , I will make it to "Time on your Machine", do you think that also fine? :)
Kyle W Pilkinton
@tadake
Jun 13 2016 06:02
thanks again Greg!! do you have any code examples or resources I can look to properly format my code for readability ? @GregatGit
CamperBot
@camperbot
Jun 13 2016 06:02
tadake sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:warning: tadake already gave gregatgit points
Greg Duncan
@GregatGit
Jun 13 2016 06:12
Sorry I don't. But my advice is name functions and variable accoringly - ideally they won't need an explaination if the name says enough - keep your function short - and notice when you are writing the same code over and over - your red, green, blue and yellow function feel very similar
Randy Goldsmith
@Dueldrawer8
Jun 13 2016 06:13
hey whats up @GregatGit
Greg Duncan
@GregatGit
Jun 13 2016 06:14
@Dueldrawer8 I've been working on my simone project - how about you?
Randy Goldsmith
@Dueldrawer8
Jun 13 2016 06:14
@GregatGit eh was taking some html and css courses on treehouse.. learned alot about responsive designs and css in partcular.. still working on it..going to try and do some algorithm challenges
did you finish your algorithm challenges between the advanced front end projects?
Greg Duncan
@GregatGit
Jun 13 2016 06:15
@Dueldrawer8 cool - what do you think of the treehouse css?
Shraddha Parab
@Shraddha99
Jun 13 2016 06:16
@wearenotgroot what requirements . ? exactly . has to be dedicated to someone must link to his/her wiki page . that's it. right?
Randy Goldsmith
@Dueldrawer8
Jun 13 2016 06:16
@GregatGit very helpful.. i learn more visually and by seeing examples and other people doing it.
@Dueldrawer8 here its great because of the projects and things.. but bc i have built the projects here, it makes more meaningful sense at treehouse what im learning bc ive been there and always wondered what i could have done or how i should do that
Greg Duncan
@GregatGit
Jun 13 2016 06:18
@Dueldrawer8 do you have any projects to show off yet?
Randy Goldsmith
@Dueldrawer8
Jun 13 2016 06:19
@GregatGit on here? yes..at treehouse no. Its more of me learning how to do css and responsive design better to help me with my projects at freecodecamp
but i havent incorporated any of it yet into my projects. I may just start my projects all over again
Greg Duncan
@GregatGit
Jun 13 2016 06:20
@Dueldrawer8 that's great - where are you up to in FCC
Randy Goldsmith
@Dueldrawer8
Jun 13 2016 06:21
@GregatGit im doing the intermediate algorithm challenges
@GregatGit have you done those yet?
Greg Duncan
@GregatGit
Jun 13 2016 06:22
@Dueldrawer8 I just finished them - I finished most of them awhile ago but a few I couldn't get my head around - but last week I came back to them and finally finished them
Randy Goldsmith
@Dueldrawer8
Jun 13 2016 06:23
@GregatGit wow.. dont know how you did it.. im stuck on all of them lol.. no clue where to start
Greg Duncan
@GregatGit
Jun 13 2016 06:23
which one are you working on now
Randy Goldsmith
@Dueldrawer8
Jun 13 2016 06:24
@GregatGit i keep jumping around lol.. ill figure it out but will def let you know when i need help :)
hows the simon game going?
Greg Duncan
@GregatGit
Jun 13 2016 06:25
I have the basics down - so now I'm trying to fine tune it - when I've got the js sorted I'll work on the html and css http://codepen.io/gregoverhere/pen/JKGvdQ?editors=1010
It needs some delays and I have to work disable the buttons better
Randy Goldsmith
@Dueldrawer8
Jun 13 2016 06:26
@GregatGit looks good so far better than what i would do
Greg Duncan
@GregatGit
Jun 13 2016 06:28
I think the key is to build up the functionality slowly rather than get it all working at once
Randy Goldsmith
@Dueldrawer8
Jun 13 2016 06:28
yeah for sure
breaking it down to different parts and putting ti all together
Greg Duncan
@GregatGit
Jun 13 2016 06:47
@Dueldrawer8 do you use https://repl.it/ to try and work out the challenges
I often copy and paste it in there - or if I'm trying to figure out an object I'll paste it in there to play around with it
shivamsonu29
@shivamsonu29
Jun 13 2016 06:50
@GregatGit thanks, problem is solved..
CamperBot
@camperbot
Jun 13 2016 06:50
shivamsonu29 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 580 | @gregatgit |http://www.freecodecamp.com/gregatgit
Greg Duncan
@GregatGit
Jun 13 2016 06:52
@shivamsonu29 :+1:
Marc M
@Marc-Moeller
Jun 13 2016 07:54
Hello fam
I have just read "Master pseudocode and you master all languages" ... how do you start learning pseudocode ?
Arth95
@Arth95
Jun 13 2016 09:09
Hi! Can anyone help me with one css issue?
Marc M
@Marc-Moeller
Jun 13 2016 09:09
I'd love to try. No guarantees :)
Arth95
@Arth95
Jun 13 2016 09:12

I have this less class:

.st-color-outline(@color){
  > input {
    background-color: transparent;
    color: @color;
    border-color: @color;
    border-style: solid;
    border-width: 1px;
    transition: 0.2s ease-in-out;
  }
  > textarea {
    background-color: transparent;
    color: @color-gray;
    border-color: @color-gray;
    border-style: solid;
    border-width: 1px;
    transition: 0.2s ease-in-out;
    &:hover, &:active, &:focus{
      background-color: transparent;
      color: #000;
      outline: 0;
      border-color: @color;
      border-style: solid;
      border-width: 1px;
    }
    &:hover ~ h5, &:active ~ h5, &:focus ~ h5{
      color: @color;
    }
  }
  &:hover{
    > input {
      background-color: @color;
      color: #fff
    }
  }
}

I want to make color changing for h5 when sibling textarea is active,focus or hover.
this is my html for this:

<h5>{{title}}</h5>
<textarea>
</textarea>
But it doesnt work
When I click textarea this elem changes color, but not sibling
Marc M
@Marc-Moeller
Jun 13 2016 09:15
Okay, so you want H5 to change colors if the textarea is active ?
Arth95
@Arth95
Jun 13 2016 09:16
yes
Marc M
@Marc-Moeller
Jun 13 2016 09:18
Okay, I'll try to think of a CSS solution.
Arth95
@Arth95
Jun 13 2016 09:18
Thank you
But I think this one should work
i think this answer the question: "There is no CSS selector that can do this (in CSS3, even). Elements, in CSS, are never aware of their parent, so you cannot do a:parent h1 (for example). Nor are they aware of their siblings (in most cases), so you cannot do #container a:hover { / do something with sibling h1 / }. Basically, CSS properties cannot modify anything but elements and their children (they cannot access parents or siblings)."
Graveworm
@legyolo
Jun 13 2016 09:28
Hello :) can somebodey give me some advice? i can not central and make the correct size my images https://codepen.io/graveworm/full/Bzjbmo
Arth95
@Arth95
Jun 13 2016 09:28
Okay, thank you :)
Marc M
@Marc-Moeller
Jun 13 2016 09:29
You're welcome. javascript is probably your best bet.
Marc M
@Marc-Moeller
Jun 13 2016 09:37
@legyolo I'm not sure how your image should look in the end ?
The problem you are facing probably has to do with columns you have created.
Vinay Jaju
@vinay-jaju
Jun 13 2016 09:39
In twitch tv zipline how to handle the case if the channel has closed its account?
Marc M
@Marc-Moeller
Jun 13 2016 09:40
@legyolo http://getbootstrap.com/css/#images this should help you with your images.
jcob95
@jcob95
Jun 13 2016 09:51
Hi, I'm on the tribute page challenge. I've got my text, image and link done but I'm trying to put in an audio file. The music is copyright free so there's no problem there but where does the audio file have to be?
kirbyedy
@kirbyedy
Jun 13 2016 09:53
@jcob95 physically ?
you have to host it somewhere on the net and than link to it
jcob95
@jcob95
Jun 13 2016 09:54
I see, how do you do this?
kirbyedy
@kirbyedy
Jun 13 2016 09:55
find the free host
CamperBot
@camperbot
Jun 13 2016 09:55
find the free host
nothing found
kirbyedy
@kirbyedy
Jun 13 2016 09:55
I personally use dropbox
but there are many other options
just make sure it can be accessed by everyone, so your file should be in some kind of public folder
Vinay Jaju
@vinay-jaju
Jun 13 2016 09:57
This message was deleted
CamperBot
@camperbot
Jun 13 2016 09:57
find twitch tv
nothing found
jcob95
@jcob95
Jun 13 2016 09:59
Ah ok, thanks a lot!
buiphuking
@buiphuking
Jun 13 2016 10:16
anyone has JAVASCRIPT ARTIFICIAL INTELLIGENCE: MADE EASY pdf, plz share with me
Kashif Mohammed
@Spyreo
Jun 13 2016 10:31
Can anyone explain me about word blanks?
Gyeognphil Choi
@creativeworkers10
Jun 13 2016 11:18
Hi guys, I want to add an img on CodePen, but I don't know how. Please help.
kirbyedy
@kirbyedy
Jun 13 2016 11:19
@creativeworkers10 where is the img ?
Gyeognphil Choi
@creativeworkers10
Jun 13 2016 11:20
in my computer. should I upload it to somewhere?
kirbyedy
@kirbyedy
Jun 13 2016 11:20
yes
find some free cloud service
CamperBot
@camperbot
Jun 13 2016 11:20
find some free cloud service
nothing found
kirbyedy
@kirbyedy
Jun 13 2016 11:20
stupid bot :)
Gyeognphil Choi
@creativeworkers10
Jun 13 2016 11:20
haha
kirbyedy
@kirbyedy
Jun 13 2016 11:20
I use dropbox
Brendon
@Balvamar
Jun 13 2016 11:20
<html>

<head>

<title>Api test </title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</head>

<body>

<script type="text/javascript">
    var xmlhttp = new XMLHttpRequest();

    xmlhttp.onreadystatechange = function(){
    if(xmlhttp.readyState===4 && xmlhttp.status===200){
        var json = JSON.parse(xmlhttp.responseText);
        var results = document.getElementById("results");
        results.innerHTML = json.contents.quotes.quote;
    }
    };

    xmlhttp.open('GET','mylist.json',true);
    xmlhttp.send();

</script>
<div id="results"> </div>
</body>

</html>
Gyeognphil Choi
@creativeworkers10
Jun 13 2016 11:20
I understand. I thought there was another way, @kirbyedy thank you so much :)
kirbyedy
@kirbyedy
Jun 13 2016 11:20
or you can user postimage.org
CamperBot
@camperbot
Jun 13 2016 11:20
:star2: 1105 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
creativeworkers10 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
Brendon
@Balvamar
Jun 13 2016 11:21
anyone help with why json only returns Object??
kirbyedy
@kirbyedy
Jun 13 2016 11:22
and what should return ?
Brendon
@Balvamar
Jun 13 2016 11:23
{
    "success": {
        "total": 1
    },
    "contents": {
        "quotes": [{
            "quote": "If we ever stop thinking about the person we want to become, we stop learning and taking risks.",
            "length": "95",
            "author": "Sally Blount",
            "tags": [
                "aspire",
                "inspire",
                "learning"
            ],
            "category": "inspire",
            "date": "2016-06-13",
            "title": "Inspiring Quote of the day",
            "background": "https://theysaidso.com/img/bgs/man_on_the_mountain.jpg",
            "id": "mXuHyeNGOeaTV13__4IZxQeF"
        }]
    }
}
this is the JSON opject I am trying to access.
have tried using json.contents.quotes.quote only get undefined
kirbyedy
@kirbyedy
Jun 13 2016 11:25
well I am not very familiar with this xmlhttp
did you copy that xml call from somewhere or you wrote it yourself ?
Brendon
@Balvamar
Jun 13 2016 11:27
@kirbyedy I wrote it myself, through watching a tutorial
I have been trying to do the "Random Quote Machine" challenge for weeks, this is as close as I have come so far :(
The JSON code I have taken from an api that is correct, and saved it to a file to test, however I am still unable to get it to work
kirbyedy
@kirbyedy
Jun 13 2016 11:35
huh
in case you change your mind and want to use something simple, here is an example code of a different quote api
which is much easier, and straight forward
Brendon
@Balvamar
Jun 13 2016 11:36
sounds great! :)
kirbyedy
@kirbyedy
Jun 13 2016 11:36
$("#button").on("click", function() {
    $.getJSON("http://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&lang=en&jsonp=?", function(data) {
      $("#quote").html("<br>" + data.quoteText + "<hr>" + data.quoteAuthor);
      console.log(data.quoteText);
      console.log(data.quoteAuthor);
    });
  });
Brendon
@Balvamar
Jun 13 2016 11:38
did this run in codepen? @kirbyedy
kirbyedy
@kirbyedy
Jun 13 2016 11:41
yes pretty much
Brendon
@Balvamar
Jun 13 2016 11:43
i just tried, made a div with the id=quote and a button with the id button, couldn't get it to work
kirbyedy
@kirbyedy
Jun 13 2016 11:44
jquery embedded ?
Brendon
@Balvamar
Jun 13 2016 11:45
i added jquery through settings
Clyde
@hea-hea
Jun 13 2016 11:45
Hi, I've just begun with the Weather app, the first time I'm dealing with JSON api. I decided to put a sample json to my Dropbox and use it as a source for the json at the beginning, until I figure out how to access all the data inside the file. And I'm stuck here - is this construction correct, the name of the town should appear in the #place on the website, but nothing's happening - why?
$(document).ready(function(){

$.getJSON("https://dl.dropboxusercontent.com/u/70959990/weatherJS.json", function(json){
  console.log(json);
  $("#place").html(json.sys.name);
});

   });
works for me
@hea-hea I dont see a json.sys.name in your weatherJS object, are you sure its correct ?
Clyde
@hea-hea
Jun 13 2016 11:50
@kirbyedy oh, right it's supposed to be json.name and it works! I need to pay attention more :)
kirbyedy
@kirbyedy
Jun 13 2016 11:50
right
Brendon
@Balvamar
Jun 13 2016 11:54
@kirbyedy sorry, i just can not get this to work, think i'll go to bed soon, this is driving me mad.
kirbyedy
@kirbyedy
Jun 13 2016 11:55
good idea, once you have a rest, it will click for you
Brendon
@Balvamar
Jun 13 2016 11:57
@kirbyedy I have not managed to get any external json related item to work using code pen, not sure if its my code or something is not working correctly with my system
Mikail Bayram
@mikail1998
Jun 13 2016 11:58
http://codepen.io/mikail1998/pen/qNOEeX Im trying to add <p>tags into my offline class, so far unsuccessfull. Any kind of help will be appreciated
kirbyedy
@kirbyedy
Jun 13 2016 12:00
@mikail1998 I am not quite sure how does this works...
$("<p></p>")
maybe you should read about jquery
Mikail Bayram
@mikail1998
Jun 13 2016 12:00
i used the same in mz
wikipedia api
Greg Duncan
@GregatGit
Jun 13 2016 12:04
@mikail1998 you should be using this api string https://api.twitch.tv/kraken/streams/
not the channels one to find out if they are online
Mikail Bayram
@mikail1998
Jun 13 2016 12:05
@GregatGit YESSS! Thank you!
CamperBot
@camperbot
Jun 13 2016 12:05
mikail1998 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 581 | @gregatgit |http://www.freecodecamp.com/gregatgit
Greg Duncan
@GregatGit
Jun 13 2016 12:06
@mikail1998 if they are online the streams api has everything you need - if they are offline (you can only tell by using streams) then use the channels api
Brendon
@Balvamar
Jun 13 2016 12:08
@kirbyedy thanks, I did get it to work, but not in codepen. don't have much luck with it. :)
CamperBot
@camperbot
Jun 13 2016 12:08
balvamar sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1107 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Mikail Bayram
@mikail1998
Jun 13 2016 12:08
@GregatGit im still failing to access the display_name
any idea why
Greg Duncan
@GregatGit
Jun 13 2016 12:08
@kirbyedy http://ip-api.com/json this will get you lat and long quite easily
kirbyedy
@kirbyedy
Jun 13 2016 12:09
for the tic tac toe ? :D
Greg Duncan
@GregatGit
Jun 13 2016 12:10
@mikail1998 click on the link i posted above and then write freecodecamp after it has loaded in the browser
NatixDev
@NatixDev
Jun 13 2016 12:10
Does anyone has a Cors https proxy, crossorigin.me seems to be down or unstable ?
Greg Duncan
@GregatGit
Jun 13 2016 12:11
@mikail1998 you should get
{
"stream": null,
"_links": {
   "self": "https://api.twitch.tv/kraken/streams/freecodecamp",
   "channel": "https://api.twitch.tv/kraken/channels/freecodecamp"
   }
}
Mikail Bayram
@mikail1998
Jun 13 2016 12:13
yes i get that exactly, later i called the channels api for getting the other information like the game that channel streams, name of the channel etc. and i cant get that data
when i call this.display_name it send out undefined
Greg Duncan
@GregatGit
Jun 13 2016 12:15
if jason === null then do the other api call - here is a channel that is always on https://api.twitch.tv/kraken/streams/monstercat as you can see you can get everything without doing the
Mikail Bayram
@mikail1998
Jun 13 2016 12:16
@GregatGit ok thank you
CamperBot
@camperbot
Jun 13 2016 12:16
mikail1998 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:warning: mikail1998 already gave gregatgit points
Thomas Burgess
@ThomasBurgess2000
Jun 13 2016 12:35
Does anyone know why the menu isn't collapsing when the link below my photo is pressed? http://codepen.io/ThomasBurgess2000/pen/EyKKwg
kirbyedy
@kirbyedy
Jun 13 2016 12:38
@ThomasBurgess2000 bootstrap missing ?
Thomas Burgess
@ThomasBurgess2000
Jun 13 2016 12:38
What do you mean? @kirbyedy
kirbyedy
@kirbyedy
Jun 13 2016 12:39
you dont have bootstrap in the codepen setting added
in the javascript section, after jquery
Thomas Burgess
@ThomasBurgess2000
Jun 13 2016 12:41
Yay that fixed it, thanks! So I have to add bootstrap on css and js?
thanks @kirbyedy
CamperBot
@camperbot
Jun 13 2016 12:42
:star2: 1109 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
thomasburgess2000 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
greg
@wearenotgroot
Jun 13 2016 12:50
@mikail1998 only if the channel is streaming(stream !== null) that you can access .display_name in full --------> data.stream.channel.display_name
Mikail Bayram
@mikail1998
Jun 13 2016 12:54
http://codepen.io/mikail1998/pen/qNOEeX i decided to do it in a different kind of way directly from my array but i cant do that either. @wearenotgroot Could you help me?
greg
@wearenotgroot
Jun 13 2016 12:56
@mikail1998 let me have a look
@mikail1998 remember channel or account name are supposed to be lowercase
@mikail1998 so the displayname and channel name can be different at times
@mikail1998 you can change to --------> users[i].toLowerCase()
Mikail Bayram
@mikail1998
Jun 13 2016 13:00
@wearenotgroot i think the problem is in the for loop. it wont read it in the if clause
@wearenotgroot dont know why :(
greg
@wearenotgroot
Jun 13 2016 13:02
@mikail1998 the if statements works but you need to build the html in a different way
Mikail Bayram
@mikail1998
Jun 13 2016 13:02
@wearenotgroot what kind of way?
Shawn
@maple3011
Jun 13 2016 13:03

@maple3011
Error: A meta element with an http-equiv attribute whose value is X-UA-Compatible must have a content attribute with the value IE=edge.
From line 6, column 9; to line 6, column 70

↩ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">↩
Why wrong? guys

greg
@wearenotgroot
Jun 13 2016 13:09
@mikail1998 something like this
var users = ["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"];
for (var i = 0; i < users.length; i++) {
  $.getJSON("https://api.twitch.tv/kraken/streams/" + users[i].toLowerCase() + "?callback=?", function(json) {


    if (json.stream === null) {



        $.getJSON(json._links.channel, function(json2) {
          console.log(json2);
          var html = "<div class='offline'><p>"+json2.display_name+"</p></div>";
          $("#users").append(html);
        });
  }
  });
}
@mikail1998 you can use the data you got from the first $.getJSON (the json._link.channel as the api url for the /channel request)
Mikail Bayram
@mikail1998
Jun 13 2016 13:11
@wearenotgroot thank you soooo much!!! it actually worked!!!
CamperBot
@camperbot
Jun 13 2016 13:11
:star2: 1133 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
mikail1998 sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
greg
@wearenotgroot
Jun 13 2016 13:12
@mikail1998 you can't access users[i] because of the async nature of the $.getJSON, the reference for the variable get buried
Mikail Bayram
@mikail1998
Jun 13 2016 13:12
@wearenotgroot so actually i just had to use the stream api object? Or is there something else
I want to know
what the problem was
greg
@wearenotgroot
Jun 13 2016 13:13
@mikail1998 it was a scoping problem
@mikail1998 you can't access the users[i] when it is inside the callback function
Mikail Bayram
@mikail1998
Jun 13 2016 13:14
@wearenotgroot aa i get it now. Thank you for your patience and help
CamperBot
@camperbot
Jun 13 2016 13:14
mikail1998 sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:warning: mikail1998 already gave wearenotgroot points
Marc Vesper
@marcvesper
Jun 13 2016 13:44
hi, newb here. On the random quote machine, when i press the button, i get a random quote replacing the html in my targetted div which is fine. However, it also seems to then wipe out all subsequent html, including the button to press again. Any clues as to what i'm doing wrong? my hunch is either something simple in the way i should be using the .html() method, or maybe something more convoluted to do with callbacks (which structurally i understand but not so well logically/ sequentially) http://codepen.io/marcvesper/pen/PzqRam
Mikail Bayram
@mikail1998
Jun 13 2016 13:44
http://codepen.io/mikail1998/pen/qNOEeX now I have problems with alligning "offline". Could anyone help?
kirbyedy
@kirbyedy
Jun 13 2016 13:46
try to use bootstrap columns, or flexbox
Mikail Bayram
@mikail1998
Jun 13 2016 13:51

@marcvesper $(document).ready(function() {
$('#getRandQuote').click(function(){

 var rand = Math.floor(Math.random() * quotes.length);
 var quotation = quotes[rand]["text"];
 var author = + quotes[rand]["author"];      
  $(".quoteText h3").text( quotation );
     $(".quoteText h4").text( author );
});

});
try this

instead of your code. You tried changing the html value without specifying the tags
Mikail Bayram
@mikail1998
Jun 13 2016 13:59
@kirbyedy could you be a bit more specific please
Marc Vesper
@marcvesper
Jun 13 2016 14:08
@mikail1998 Thanks your correction does work, I'll play with it now until I better understand why the formatting heading tags should cause that behaviour or not.
CamperBot
@camperbot
Jun 13 2016 14:08
marcvesper sends brownie points to @mikail1998 :sparkles: :thumbsup: :sparkles:
:cookie: 208 | @mikail1998 |http://www.freecodecamp.com/mikail1998
WilliamDecker
@WilliamDecker
Jun 13 2016 14:13
Hi everyone...I'm working on the Weather API challenge and I'm struggling with writing the GET request, does anyone have any resources they could recommend?
Mikail Bayram
@mikail1998
Jun 13 2016 14:21
$.getJSON("http://api.openweathermap.org/data/2.5/weather?lat="+currentLocation.lat+"&lon="+ currentLocation.lon+"&appid=971fab999456cc925544a41f4387ee88", function(currentWeather){ @WilliamDecker it should look like smthng like this
the lat and lon should be obtained from another api
WilliamDecker
@WilliamDecker
Jun 13 2016 14:22
yeah, I'm looking to learn how to properly write a GET rquest
Mikail Bayram
@mikail1998
Jun 13 2016 14:24
for jquery the easiest way is $.getJSON
Quoc Anh Nguyen
@quocanh261997
Jun 13 2016 14:35
how can I rotate my icon please? Anyone?
greg
@wearenotgroot
Jun 13 2016 14:40
@quocanh261997 look into transform(css). note you will have to account for different browser support
Srinivasan
@kksrini89
Jun 13 2016 14:43
@quocanh261997 you can use animate.css also
Silviu
@silviufucarev
Jun 13 2016 14:51

hi everyone I'm struggling with the portfolio challenge, I can't seem to change the background color of a div element `$(document).ready(function () {

$("#navigationBar").css("background color", "blue")

});
`

`$(document).ready(function () {

$("#navigationBar").css("background color", "blue")

});`

Dave Kalu
@ifeanyidavid
Jun 13 2016 14:52
Is there a space between navigation & Bar? @silviufucarev
Silviu
@silviufucarev
Jun 13 2016 14:52
no there isn't any
Srinivasan
@kksrini89
Jun 13 2016 14:53
@silviufucarev use
$("#navigationBar").css("background-color", "blue")
});
Tbuglc
@tbuglc
Jun 13 2016 14:53
@silviufucarev
help format
help format
CamperBot
@camperbot
Jun 13 2016 14:53

:point_right: code formatting [wiki]

Multi line Code

```js ⇦ Type 3 backticks and then press [shift + enter ⏎] (type js or html or css)

<paste your code here>,
then press [shift + enter ⏎]

``` ⇦ Type 3 backticks, then press [enter ⏎]

Single line Code

This an inline `<paste code here>` code formatting with a single backtick() at _start_ and _end_ around thecode`.

See also: ☛ How to type Backticks | ☯ Compose Mode | ❄ Gitter Formatting Basics

:pencil: read more about code formatting on the FCC Wiki

Tbuglc
@tbuglc
Jun 13 2016 14:54
"background-color" not "background color"
Silviu
@silviufucarev
Jun 13 2016 14:54
@kksrini89 no change :(
Srinivasan
@kksrini89
Jun 13 2016 14:55
do you have codepen link?
Dave Kalu
@ifeanyidavid
Jun 13 2016 14:55
I see no problem with your code. It should work fine. You could try adding a terminating semi colon though. But that wouldnt really change anything.
@kksrini89
Silviu
@silviufucarev
Jun 13 2016 14:57
@ifeanyidavid
<html>
  <div id="navigationBar">
  <button  class="btn">
    About
    </button>
    <button class="btn">
      Portfolio
    </button>
  <button class="btn">
    Contact
    </button>
  </div>
</html>
@ifeanyidavid maybe the problem is here?
Srinivasan
@kksrini89
Jun 13 2016 14:58
@silviufucarev you should surround your div tag inside body tag not inside html tag
Silviu
@silviufucarev
Jun 13 2016 14:59
still no change
Srinivasan
@kksrini89
Jun 13 2016 14:59
now worked
you should add Jquery and bootstrap js file reference
This message was deleted
Silviu
@silviufucarev
Jun 13 2016 15:00
any clues how to do that @kksrini89 ?
i've got bootstrap turned on
Srinivasan
@kksrini89
Jun 13 2016 15:01
@silviufucarev you have added bootstrap.css file as the same way add js reference also
there is icon nearby js section click on there you can have a dropdown which provides you set of js reference. you should add jquery reference then bootstrap js reference
Silviu
@silviufucarev
Jun 13 2016 15:03
@kksrini89 you mean adding external javascript?
Srinivasan
@kksrini89
Jun 13 2016 15:03
@silviufucarev exactly
Silviu
@silviufucarev
Jun 13 2016 15:03
did that
no change
Srinivasan
@kksrini89
Jun 13 2016 15:03
what about bootstrap js?
add that slo
@silviufucarev then change the code like below
$("#navigationBar").css("background-color", "blue")
Micah
@miciah123
Jun 13 2016 15:05
how come my second well won't show up?
Silviu
@silviufucarev
Jun 13 2016 15:06
@kksrini89 there is only jquery and jquerry UI i have added them both. in the CSS section i have added bootstrap.
Srinivasan
@kksrini89
Jun 13 2016 15:06
@silviufucarev hey there is bootstrap js also available
remove jquery-ui reference
Hamza Anwer
@ImHamzaAnwer
Jun 13 2016 15:07
This message was deleted
Srinivasan
@kksrini89
Jun 13 2016 15:07
from quick add dropdown, you can find bootstrap reference
Silviu
@silviufucarev
Jun 13 2016 15:08
@kksrini89 indeed. Many thanks :)
CamperBot
@camperbot
Jun 13 2016 15:08
silviufucarev sends brownie points to @kksrini89 :sparkles: :thumbsup: :sparkles:
:cookie: 298 | @kksrini89 |http://www.freecodecamp.com/kksrini89
greg
@wearenotgroot
Jun 13 2016 15:08
@ImHamzaAnwer A T1000 ?
Srinivasan
@kksrini89
Jun 13 2016 15:08
@silviufucarev you are welcome :)
Hamza Anwer
@ImHamzaAnwer
Jun 13 2016 15:10
@wearenotgroot what ?
greg
@wearenotgroot
Jun 13 2016 15:10
@ImHamzaAnwer terminator T-1000 model :smile:
Manny
@Alloffices
Jun 13 2016 15:10
Novice Frontend Code Challenge | Let There Be Light: http://goo.gl/oNKSZU :smile:
Hamza Anwer
@ImHamzaAnwer
Jun 13 2016 15:11
LOL !
Sukanya Ravichandran
@suka6792
Jun 13 2016 15:11
I need a help..trying to add div element to multiple Bootstrap tabs. But the div is added only to the active tab..Not to the other tab.http://codepen.io/Suka6792/pen/VjvggV
Rostyslav
@BeerDRinker
Jun 13 2016 15:12
hello everybody!
I need help
I can not connect fonts. why the text inherits bootstrap fonts
please help
Hamza Anwer
@ImHamzaAnwer
Jun 13 2016 15:14
@BeerDRinker show the code
Vinay Jaju
@vinay-jaju
Jun 13 2016 15:14

http://codepen.io/vinay_jaju/pen/MeywoW?editors=1111

I am on this twitch tv zipline. My array gets filled inside the for loop and then when the loop is completed it is empty. Please help.

Dave Kalu
@ifeanyidavid
Jun 13 2016 15:15
@kksrini89 have you added jquery.js?
Stephen James
@sjames1958gm
Jun 13 2016 15:16
@vinay-jaju You are trying to access data that is not there yet - when you hit those two console.log commands, the requests for data are still in flight. You have to process your data in the callbacks.
Vinay Jaju
@vinay-jaju
Jun 13 2016 15:17
umm..didnt get you?
@sjames1958gm
A little bit more elaboration please
Dylan
@dhcodes
Jun 13 2016 15:19
@BeerDRinker you won't be able to reference fonts on your local machine unless you have codepen premium
find a web font, like something from google fonts
CamperBot
@camperbot
Jun 13 2016 15:19
find a web font like something from google fonts
nothing found
Dylan
@dhcodes
Jun 13 2016 15:19
@BeerDRinker or font squirrel
Rostyslav
@BeerDRinker
Jun 13 2016 15:20
I runs webserver on my PC
and codding web
all fonts in ../font directory
Toni Shortsleeve
@KoniKodes
Jun 13 2016 15:24
@BeerDRinker For codepen, you will need to access from outside because you can't upload your font file.
Vinay Jaju
@vinay-jaju
Jun 13 2016 15:24
@sjames1958gm Check my code now please. I've made some changes
http://codepen.io/vinay_jaju/pen/MeywoW?editors=1111
Rostyslav
@BeerDRinker
Jun 13 2016 15:25
I had converted fonts via https://everythingfonts.com/font-face
and put tham to my local webserver in ../fonts directory
Toni Shortsleeve
@KoniKodes
Jun 13 2016 15:28
@BeerDRinker Right. But you need to have the @font-face { list in your css file. and add jsquery in your settings on codepen.
Vinay Jaju
@vinay-jaju
Jun 13 2016 15:32

Someone please help me with my twitch tv zipline. Array for online and offline shows inside the for loop but is empty outside the loop

http://codepen.io/vinay_jaju/pen/MeywoW?editors=1111

Toni Shortsleeve
@KoniKodes
Jun 13 2016 15:32
Can someone help me please with my weather app? I can't seem to get the C/F transformation to work. https://codepen.io/KoniKodes/full/jrWXjX/
JD Tadlock
@jdtdesigns
Jun 13 2016 15:33
@BeerDRinker First, in your html, you only put what's in between the <body></body> tags. The <head> and <html> need to all come out.
second, all scripts need to be added via Settings->JS tab
all css needs to be added via Settings->CSS tab
Srinivasan
@kksrini89
Jun 13 2016 15:35
@KoniKodes use the calculation
fahrenheit=celsius * 9/5 +32;
Sorin Ruse
@sorinr
Jun 13 2016 15:36
@KoniKodes add jquery to your js scripts but before everithing
Toni Shortsleeve
@KoniKodes
Jun 13 2016 15:36
@kksrini89 Thank you, I pull the temp_c from the api. I just can't get the button to change.
CamperBot
@camperbot
Jun 13 2016 15:36
konikodes sends brownie points to @kksrini89 :sparkles: :thumbsup: :sparkles:
:cookie: 299 | @kksrini89 |http://www.freecodecamp.com/kksrini89
Srinivasan
@kksrini89
Jun 13 2016 15:36
@suka6792 I tried my level best. But couldn't help you. sorry for that
Dylan
@dhcodes
Jun 13 2016 15:38
@kksrini89 first line of your function should be $("#temp").click(function() {
you have =
Toni Shortsleeve
@KoniKodes
Jun 13 2016 15:38
@sorinr What exactly do you mean? I begin with jQuery.document? or jq before bootstrap in settings?
Dylan
@dhcodes
Jun 13 2016 15:38
then if you add a ) to the end I get the alert to work @KoniKodes
JD Tadlock
@jdtdesigns
Jun 13 2016 15:38
@KoniKodes Your code has quite a few errors for the click event
Toni Shortsleeve
@KoniKodes
Jun 13 2016 15:39
@dhcodes jslint keeps telling me it hates my ). Where exactly should it go?
@jdtdesigns Yes, I know. That's why I am asking for help. I can't quite understand the click.
Dylan
@dhcodes
Jun 13 2016 15:40
@KoniKodes after the closing } of your click function
JD Tadlock
@jdtdesigns
Jun 13 2016 15:40
$("#temp").click(function (){
      if (temp === temp_f){
        $("tmp").html(temp_c);
        alert("From temp to C");
      } else  {
        $("tmp").html(temp_f);
        alert("From temp to C");
      }
 });
Dylan
@dhcodes
Jun 13 2016 15:40
yeah. like @jdtdesigns has
JD Tadlock
@jdtdesigns
Jun 13 2016 15:41
@KoniKodes Also, on the Settings->JS tab, click the button on the left side of the jquery box and drag the jquery box above bootstrap js.
Toni Shortsleeve
@KoniKodes
Jun 13 2016 15:43
@dhcodes @jdtdesigns @sorinr Thank you all so much! I am back on path! :)
CamperBot
@camperbot
Jun 13 2016 15:43
konikodes sends brownie points to @dhcodes and @jdtdesigns and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 355 | @sorinr |http://www.freecodecamp.com/sorinr
:star2: 1014 | @dhcodes |http://www.freecodecamp.com/dhcodes
:cookie: 466 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Dylan
@dhcodes
Jun 13 2016 15:43
glad to help
happy coding
Sorin Ruse
@sorinr
Jun 13 2016 15:46
@KoniKodes good.go on on and have a happy coding day
zaizai
@Zaizai56
Jun 13 2016 15:50
Hello campers
I’m looking for some help on CSS
I’m struggling with internal margin inside div
Stephen James
@sjames1958gm
Jun 13 2016 15:53
@vinay-jaju Looks much better
Sorin Ruse
@sorinr
Jun 13 2016 15:53
@Zaizai56 just post your code in here to be able to help :)
Matthew Horsman
@Karnivool89
Jun 13 2016 15:53
Has anyone here done the advanced algorithm "Friendly Date Ranges"?
zaizai
@Zaizai56
Jun 13 2016 15:54
I can’t properly set my button in the center of the div
@Karnivool89 Yep
JD Tadlock
@jdtdesigns
Jun 13 2016 15:56
@Zaizai56 you have widths set on the wrapping div for the buttons
take the width away
use padding left/right instead
Matthew Horsman
@Karnivool89
Jun 13 2016 15:56
@Zaizai56 I'm failing to understand one of the code tests. It says if the second date is less than a year from the first, you should not return a year for either. Yet, one of the tests says: makeFriendlyDates(["2022-09-05", "2023-09-04"]) should return ["September 5th, 2022","September 4th"].
September 4th is less than a year away from September 5th, yet the test expects the year 2022 to be included.
JD Tadlock
@jdtdesigns
Jun 13 2016 15:57
@Karnivool89 They have 3 or four more test cases than the actual challenge tells you
just match each test case until you get them all working
zaizai
@Zaizai56
Jun 13 2016 15:58
@jdtdesigns padding left/right on my wrapper class div ?
JD Tadlock
@jdtdesigns
Jun 13 2016 15:59
for each button, yes
@Zaizai56
Matthew Horsman
@Karnivool89
Jun 13 2016 15:59
@jdtdesigns But this test doesn't make sense to me. Am I supposed to right an if statement that says (if date is only one day away from being a full year away, include first year)? I mean I can write that in just to pass the test and move on, but it seems like either that test is wrong or I'm missing something.
zaizai
@Zaizai56
Jun 13 2016 15:59
@Karnivool89 no years expect if the 1st date is in the current year AND the 2nd date is less than a year after the initial
if the 1st date is not in the current year, you need to include the year
Matthew Horsman
@Karnivool89
Jun 13 2016 16:00
@Zaizai56 Got it. Thanks!
CamperBot
@camperbot
Jun 13 2016 16:00
karnivool89 sends brownie points to @zaizai56 :sparkles: :thumbsup: :sparkles:
:cookie: 304 | @zaizai56 |http://www.freecodecamp.com/zaizai56
Vinay Jaju
@vinay-jaju
Jun 13 2016 16:01
@sjames1958gm Help me with the case where a twitch account has closed. Check my condition...the console doesn't show anything. I've added one closed account
http://codepen.io/vinay_jaju/pen/MeywoW?editors=1111
zaizai
@Zaizai56
Jun 13 2016 16:02
@jdtdesigns how to make the button round shape with padding ?
JD Tadlock
@jdtdesigns
Jun 13 2016 16:06
@Zaizai56 You shouldn't be using Bootstrap for this. BS is designed for quick prototyping of a 'certain' layout. Not custom design.
You will be fighting it the whole way, trying to use it like this
Vinay Jaju
@vinay-jaju
Jun 13 2016 16:07
Anyone please help me with the case where a twitch account has closed. Check my condition...the console doesn't show anything. I've added one closed account
http://codepen.io/vinay_jaju/pen/MeywoW?editors=1111
Andreas
@andreasculbertson
Jun 13 2016 16:08
I'm having trouble getting the "click" action to work in codepen. I've basically copied the code from an earlier exercise into this pen, but nothing happens when I click the button. In the settings I've added jQuery and Bootstrap
zaizai
@Zaizai56
Jun 13 2016 16:09
@jdtdesigns I have been using BS everyday since I started FCC, never for something else. What would you recommend ?
@andreasculbertson have you tried with $(« #getMessage").click(function() ?
$(« #getMessage").click(function() {insert-your-function-here} )
Melissa Guerrero
@Mmgfrog
Jun 13 2016 16:13
Hi everyone. I'm almost done with creating my personal web portfolio page. The part I am stuck on is fulfilling the User Story:" I navigate to different sections of the webpage by clicking buttons in the navigation,"
Dylan
@dhcodes
Jun 13 2016 16:13
@Zaizai56 I think he is saying you should take a crack at styling a button from scratch
Stephen James
@sjames1958gm
Jun 13 2016 16:13
@vinay-jaju You can examine the error property of the response.
Object {
  error: "Unprocessable Entity",
  message: "Channel 'brunofin' is unavailable",
  status: 422
}
Melissa Guerrero
@Mmgfrog
Jun 13 2016 16:14
I have created a simple Nav Bar
Dylan
@dhcodes
Jun 13 2016 16:14
@Mmgfrog use anchor links
Melissa Guerrero
@Mmgfrog
Jun 13 2016 16:14
@dhcodes I tried anchor links,
Dylan
@dhcodes
Jun 13 2016 16:15
@Mmgfrog ex. you have <div id="about">, in your nav bar you do <a href="#about">About</a>
@Mmgfrog so you tried that?
and it didn't work?
Andreas
@andreasculbertson
Jun 13 2016 16:16
@Zaizai56 thanks for the advice. I tried:
CamperBot
@camperbot
Jun 13 2016 16:16
andreasculbertson sends brownie points to @zaizai56 :sparkles: :thumbsup: :sparkles:
:cookie: 305 | @zaizai56 |http://www.freecodecamp.com/zaizai56
Andreas
@andreasculbertson
Jun 13 2016 16:16
$("getMessage").click(function() {
$(".message").html("Here is the message");
});
Melissa Guerrero
@Mmgfrog
Jun 13 2016 16:16
http://codepen.io/Mmgfrog/pen/LZEbMK here's a link to my site and all the code,
Andreas
@andreasculbertson
Jun 13 2016 16:17
@Zaizai56 I tried $("getMessage").click(function() {
$(".message").html("Here is the message");
}); but still no luck
Ray Liu
@mania7539
Jun 13 2016 16:17
Hey guys, I am working on the wikipedia app, but can't get the JSON from API, can you take a look here if you are available? http://codepen.io/mania7539/pen/YWqZxw
zaizai
@Zaizai56
Jun 13 2016 16:18
@jdtdesigns Awesome. Thank you !
CamperBot
@camperbot
Jun 13 2016 16:18
zaizai56 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 467 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
zaizai
@Zaizai56
Jun 13 2016 16:18
I’ll study this into details
Dylan
@dhcodes
Jun 13 2016 16:19
@Mmgfrog it's working, it's just that your page is not long enough to really jump too far
@Mmgfrog repeat it for your other sections and you should be good to submit
Melissa Guerrero
@Mmgfrog
Jun 13 2016 16:20
Great! Thanks @dhcodes
CamperBot
@camperbot
Jun 13 2016 16:20
mmgfrog sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1017 | @dhcodes |http://www.freecodecamp.com/dhcodes
JD Tadlock
@jdtdesigns
Jun 13 2016 16:20
@Zaizai56 ;)
Dylan
@dhcodes
Jun 13 2016 16:21
@mania7539 it's working, you just have errors in your javascript
you need to change que to query and add a + after it
@mania7539 also you want to run the function on submit of the form, right now it runs when the page loads so nothing is in the box.
Ray Liu
@mania7539
Jun 13 2016 16:22
@dhcodes thank you man , I just found I need to add &callback=? after the API url
CamperBot
@camperbot
Jun 13 2016 16:22
mania7539 sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1018 | @dhcodes |http://www.freecodecamp.com/dhcodes
JD Tadlock
@jdtdesigns
Jun 13 2016 16:22
@Zaizai56 I teach people css, and the major problem I always see is people being taught to use Bootstrap from the start. If you learn css before using BS, you will 99% of the time never use it.
Ray Liu
@mania7539
Jun 13 2016 16:22
so currently moving on although not so sure about its meaning
JD Tadlock
@jdtdesigns
Jun 13 2016 16:22
Just because every single course site out there shows you BS from the start doesn't mean it's right ;)
zaizai
@Zaizai56
Jun 13 2016 16:23
alright, I take note
Dylan
@dhcodes
Jun 13 2016 16:23
@mania7539 yes that too
zaizai
@Zaizai56
Jun 13 2016 16:23
I litterally used it in all my FCC projects :smile:
Dylan
@dhcodes
Jun 13 2016 16:23
@jdtdesigns some people like bootstrap for it's grid and navbar...
not the pretty buttons
though I actually like foundation better
JD Tadlock
@jdtdesigns
Jun 13 2016 16:24
@dhcodes float grid is 2005 ;)
wake up and smell the 2016 css :P
i can make anyone of bs's navs in 80% less code
that's just the facts of modern css
the frameworks are out of date and bloated
no getting around it
Dylan
@dhcodes
Jun 13 2016 16:26
@jdtdesigns what's a good grid? flexbox?
i don't disagree btw
JD Tadlock
@jdtdesigns
Jun 13 2016 16:26
flex is the number one choice
Sorin Ruse
@sorinr
Jun 13 2016 16:26
@dhcodes i don't like bootstrap. prefer materialize if i need a metro style i like: https://metroui.org.ua/
Dylan
@dhcodes
Jun 13 2016 16:27
ok, i'll try to incorporate it in my portfolio overhaul
thanks @jdtdesigns
CamperBot
@camperbot
Jun 13 2016 16:27
dhcodes sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 468 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Jun 13 2016 16:27
yep
.row, .column {
  display: flex;
}

.column {
  flex-direction: column;
}

.row-center {
  justify-content: center;
}

.column-center {
  align-items: center;
}
those few classes will change your life ;)
Dylan
@dhcodes
Jun 13 2016 16:28
good to know
i'll go read the docs
thanks again
Narendro
@Narendro
Jun 13 2016 16:30
nice info for flex box... i've heard it before.. but never use it
Michael R
@Myst3420
Jun 13 2016 16:30
Good Morning.
Dylan
@dhcodes
Jun 13 2016 16:30
@Narendro just found this. I'm learning too, maybe it will be useful: http://flexboxin5.com/
Michael R
@Myst3420
Jun 13 2016 16:31
Anyone familiar with the process of btn-groups in bootstrap?
Dylan
@dhcodes
Jun 13 2016 16:31
@Myst3420 what do you mean exactly?
Narendro
@Narendro
Jun 13 2016 16:32
guys.. need your review here
Dylan
@dhcodes
Jun 13 2016 16:32
@Myst3420 i'm assuming you've seen this: http://v4-alpha.getbootstrap.com/components/button-group/
@Narendro the first image doesn't cover, neither does the last. I'd start here
Michael R
@Myst3420
Jun 13 2016 16:33
Well I have two btn-groups that I am trying to get different inputs from.
WilliamDecker
@WilliamDecker
Jun 13 2016 16:33
@Myst3420 http://hackerthemes.com/bootstrap-cheatsheet/ That's a great resource
Dylan
@dhcodes
Jun 13 2016 16:33
@Myst3420 i believe you'll need to name them uniquely then
@Narendro also the text in the third div is a bit hard to read over that picture
@Myst3420 can you paste your codepen?
Michael R
@Myst3420
Jun 13 2016 16:34
When I separate them by id, ie group1 and group2, the button selected in the first group becomes deselected when a choice is made in the second.
@dhcodes yes I can. Do I send a link from here or is there a share button in CodePen?
Srinivasan
@kksrini89
Jun 13 2016 16:34
Hi friends, can anyone help me on wikipedia api
getting this error
XMLHttpRequest cannot load https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=saf&utf8=. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access.
I knew this is CORS related issue.
but I am quite confused which api method should use to return number of results by entering an input search text.
JD Tadlock
@jdtdesigns
Jun 13 2016 16:35
@kksrini89 just add &callback=? as one of your params
Narendro
@Narendro
Jun 13 2016 16:36
@dhcodes which image doesn't cover?
Srinivasan
@kksrini89
Jun 13 2016 16:36
@jdtdesigns I did . but showed me like
Refused to execute script from 'https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=supers…r&utf8=&callback=jQuery224031541014002595347_1465835518210&_=1465835518211' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Vinay Jaju
@vinay-jaju
Jun 13 2016 16:36
@sjames1958gm Thanks for the help. Completed the zipline
CamperBot
@camperbot
Jun 13 2016 16:36
vinay-jaju sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 1547 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Srinivasan
@kksrini89
Jun 13 2016 16:37
@jdtdesigns that's why I asked which api method should use to retrieve the results?
don't run codepen from https either
Srinivasan
@kksrini89
Jun 13 2016 16:38
sure
@jdtdesigns how did you get this API?
JD Tadlock
@jdtdesigns
Jun 13 2016 16:38
research and troubleshooting
Srinivasan
@kksrini89
Jun 13 2016 16:38
I got struggle in this finding which one to use...
JD Tadlock
@jdtdesigns
Jun 13 2016 16:38
same api
just the params are different
Srinivasan
@kksrini89
Jun 13 2016 16:39
@jdtdesigns :+1:
@jdtdesigns I got the results from your given api method
but if I surround each result with <a> tag, will it redirect to the specified page?
JD Tadlock
@jdtdesigns
Jun 13 2016 16:44
Use this href="http://en.wikipedia.org/?curid= for the url and concat the pageid onto it and use target="_blank"
@kksrini89
Srinivasan
@kksrini89
Jun 13 2016 16:45
@jdtdesigns really thanks man. you helped me a lot
CamperBot
@camperbot
Jun 13 2016 16:45
kksrini89 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 469 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Jun 13 2016 16:45
@kksrini89 welcome ;)
Srinivasan
@kksrini89
Jun 13 2016 16:45
:smile:
Michael R
@Myst3420
Jun 13 2016 16:46
Sorry for the delay.
Dave
@BeingDS
Jun 13 2016 16:47
Hello, having trouble with my Portfolio Webpage form. I can't seem to get my form submit button to start the email with the info from the form in the message area. It starts a new email in my email client, but the info from the form is not there.
Nikhil Goyal
@ngoyal100894
Jun 13 2016 16:47
Anybody have any idea how to get dates of next 7 days .. I am working on weather project
Michael R
@Myst3420
Jun 13 2016 16:48
So, what I am trying to do is have the Form Type selected then, depending on which subform type is selected, a specified for should load.
Dave
@BeingDS
Jun 13 2016 16:48
<form role="form" action="MAILTO: davestevens85@gmail.com">
<center>
    <input type="text" placeholder="Name" id="name">
    <br><br>
    <input type="text" placeholder="Phone" id="phone">
    <br><br>
    <input type="email" placeholder="Email" id="email">
    <br><br>
    <button type="submit">Submit</button>
    </form>
^This isn't working.
Michael R
@Myst3420
Jun 13 2016 16:52
Any help with this would be appreciated.
Nikhil Goyal
@ngoyal100894
Jun 13 2016 16:56
@BeingDS should not center be closed?
Micah
@miciah123
Jun 13 2016 16:56
How come my other well won't show up?
and also, the contact section I added does not appear
Dave
@BeingDS
Jun 13 2016 16:57
@ngoyal100894 Thanks. I noticed and fixed that after posting, but it hasn't solved the problem.
CamperBot
@camperbot
Jun 13 2016 16:57
beingds sends brownie points to @ngoyal100894 :sparkles: :thumbsup: :sparkles:
:cookie: 193 | @ngoyal100894 |http://www.freecodecamp.com/ngoyal100894
Micah
@miciah123
Jun 13 2016 17:03
anyone?
Dave
@BeingDS
Jun 13 2016 17:03
Hi @miciah123 . I'm waiting for help as well. Have you tried posting on http://www.stackoverflow.com?
Micah
@miciah123
Jun 13 2016 17:04
Not yet I actually just figured my problem out xD @BeingDS
Dave
@BeingDS
Jun 13 2016 17:04
It's a web forum for professional programmers where they go for reference and answers.
Sorin Ruse
@sorinr
Jun 13 2016 17:10
@miciah123 what do you expect to have there and you don't see it?
Courtney Biel
@frzbgolfer
Jun 13 2016 17:10
Hey everyone, I'm working on the "Falsy Bouncer" challenge in the Basic Algorithm Scripting... I was having trouble getting rid of all falsy values but while testing different parts of my code to rule stuff out I accidentally solved it but not sure why it works. Could someone explain?
function bouncer(arr) {
  // Don't show a false ID to this bouncer.
  var rtnArray = arr.filter(removeFalsys);

  return rtnArray;
}

function removeFalsys(value) {
return value;
}

bouncer([7, "", "d", false, 9]);
JD Tadlock
@jdtdesigns
Jun 13 2016 17:14
@frzbgolfer You're filtering based on a boolean. True will remain, false will be removed.
it's how .filter() works
try returning arr.filter(Boolean) inside the bouncer function without anything else ;)
Nikhil Goyal
@ngoyal100894
Jun 13 2016 17:16
Anybody have any idea how to get dates of next 7 days .. I am working on weather project

repost

Courtney Biel
@frzbgolfer
Jun 13 2016 17:18
@jdtdesigns ah so by default since those aren't legitimate values it returns false. I was trying to build a function to recognize the values the exercise was asking to filter against.
JD Tadlock
@jdtdesigns
Jun 13 2016 17:19
@ngoyal100894 http://openweathermap.org/forecast16 and just use the first 7 objects returned
Nikhil Goyal
@ngoyal100894
Jun 13 2016 17:20
but how to set the date in front of them or the day
JD Tadlock
@jdtdesigns
Jun 13 2016 17:20
@frzbgolfer '', 0, false are falsy values
Nikhil Goyal
@ngoyal100894
Jun 13 2016 17:20
@jdtdesigns
JD Tadlock
@jdtdesigns
Jun 13 2016 17:22
@ngoyal100894 There are a few different ways you could do it. One being use the info the object contains. If the date is not in the object, just get today's date with Date() and use it to calculate the next 6 ;)
Courtney Biel
@frzbgolfer
Jun 13 2016 17:22
thank you @jdtdesigns Now let's see if I can figure out the next challenge :smile:
CamperBot
@camperbot
Jun 13 2016 17:22
frzbgolfer sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 470 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Nikhil Goyal
@ngoyal100894
Jun 13 2016 17:24
yeah I searched over it alot and I could find very complicated ways to set dates .. since there are issues with if we are near to end of month
LukeDreamtSloths
@LukeDreamtSloths
Jun 13 2016 17:24
Can anyone explain why the following line of code works at changing the background but without any transition?
$("body").delay(13000).css("background-color",colorArray[colorIndex]);
the colorArray[] bit refers to a # value
JD Tadlock
@jdtdesigns
Jun 13 2016 17:26
@LukeDreamtSloths because that's just a timer that counts down 13 seconds then changes the background to another color
no animation or transition is called
Nikhil Goyal
@ngoyal100894
Jun 13 2016 17:26
function nextweek(){
    var today = new Date();
    var nextweek = new Date(today.getFullYear(), today.getMonth(), today.getDate()+7);
    return nextweek;
}
Is this one looks good ? wont it create problem near end of the month or year
JD Tadlock
@jdtdesigns
Jun 13 2016 17:26
in your css do this:
body {
  transition: background .7s;
}
LukeDreamtSloths
@LukeDreamtSloths
Jun 13 2016 17:27
Oh well I've got this terribly wrong xD
@jdtdesigns thanks. Shall try that right now
CamperBot
@camperbot
Jun 13 2016 17:27
lukedreamtsloths sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 471 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
LukeDreamtSloths
@LukeDreamtSloths
Jun 13 2016 17:28
Neat, that does exactly what I needed! Even when I blow up at the delay function to some ridiculous number there didn't seem to be any delay though?
JD Tadlock
@jdtdesigns
Jun 13 2016 17:29
var today = new Date();
var nextWeek = new Date(today.getTime() + 7 * 24 * 60 * 60 * 1000);
@ngoyal100894
@LukeDreamtSloths What kind of delay are you wanting?
Nikhil Goyal
@ngoyal100894
Jun 13 2016 17:32
That will work ?@jdtdesigns
JD Tadlock
@jdtdesigns
Jun 13 2016 17:32
@ngoyal100894 to get next week from today, yes
get time is in milliseconds so it will just give you a date calculated by adding the number of milliseconds from today to next week
Nikhil Goyal
@ngoyal100894
Jun 13 2016 17:34
cool ..that will return a date finally?
JD Tadlock
@jdtdesigns
Jun 13 2016 17:34
@ngoyal100894 nextWeek.getDate(); ;)
Nikhil Goyal
@ngoyal100894
Jun 13 2016 17:35
cool ..thanx @jdtdesigns let me try it out
LukeDreamtSloths
@LukeDreamtSloths
Jun 13 2016 17:36
@jdtdesigns that wasn't what I wanted, I was using the delay() function incorrectly. You have solved my problem I was just curious why I wasn't getting a delay?
JD Tadlock
@jdtdesigns
Jun 13 2016 17:42
@LukeDreamtSloths because you had no declaration before the css change
Narendro
@Narendro
Jun 13 2016 17:45
hi guys... need your review please
JD Tadlock
@jdtdesigns
Jun 13 2016 17:46
@LukeDreamtSloths http://jsbin.com/vovutu/edit?css,js,output A better way to approach it
@LukeDreamtSloths Just read that the .delay() is only used for delaying jquery animation effects
LukeDreamtSloths
@LukeDreamtSloths
Jun 13 2016 18:08
@jdtdesigns sorry for the slow response. I really appreciate the help, thanks mate!
CamperBot
@camperbot
Jun 13 2016 18:08
lukedreamtsloths sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:warning: lukedreamtsloths already gave jdtdesigns points
kwittig
@kwittig
Jun 13 2016 18:09
@khaduch Thanks! Just tried it with the brackets and it worked this time.
CamperBot
@camperbot
Jun 13 2016 18:09
kwittig sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1309 | @khaduch |http://www.freecodecamp.com/khaduch
GiorgosKorn
@GiorgosKorn
Jun 13 2016 18:10
im so stupid
i cannot figure out the code for the portofolio :@
JD Tadlock
@jdtdesigns
Jun 13 2016 18:14
@GiorgosKorn stupid is not the correct term
GiorgosKorn
@GiorgosKorn
Jun 13 2016 18:14
oh sorry
JD Tadlock
@jdtdesigns
Jun 13 2016 18:14
we all get frustrated when we can't figure it out
GiorgosKorn
@GiorgosKorn
Jun 13 2016 18:14
frustrated then xD
hahaha
Saberdjanovmarsel
@Saberdjanovmarsel
Jun 13 2016 18:14
https://www.freecodecamp.com/challenges/turn-an-image-into-a-link#?solution=%3Clink%20href%3D%22https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLobster%22%20rel%3D%22stylesheet%22%20type%3D%22text%2Fcss%22%3E%0A%3Cstyle%3E%0A%20%20.red-text%20%7B%0A%20%20%20%20color%3A%20red%3B%0A%20%20%7D%0A%0A%20%20h2%20%7B%0A%20%20%20%20font-family%3A%20Lobster%2C%20Monospace%3B%0A%20%20%7D%0A%0A%20%20p%20%7B%0A%20%20%20%20font-size%3A%2016px%3B%0A%20%20%20%20font-family%3A%20Monospace%3B%0A%20%20%7D%0A%0A%20%20.thick-green-border%20%7B%0A%20%20%20%20border-color%3A%20green%3B%0A%20%20%20%20border-width%3A%2010px%3B%0A%20%20%20%20border-style%3A%20solid%3B%0A%20%20%20%20border-radius%3A%2050%25%3B%0A%20%20%7D%0A%0A%20%20.smaller-image%20%7B%0A%20%20%20%20width%3A%20100px%3B%0A%20%20%7D%0A%3C%2Fstyle%3E%0A%0A%3Ch2%20class%3D%22red-text%22%3ECatPhotoApp%3C%2Fh2%3E%0A%0A%3Cp%3EClick%20here%20for%20%3Ca%20href%3D%22%23%22%3E%3Cimg%20src%3D%22%3Cimg%20class%3D%22smaller-image%20thick-green-bordersrc%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3Ca%2F%3E%0A%0A%3Cimg%20class%3D%22smaller-image%20thick-green-border%22%20src%3D%22https%3A%2F%2Fbit.ly%2Ffcc-relaxing-cat%22%3E%0A%0A%3Cp%20class%3D%22red-text%22%3EKitty%20ipsum%20dolor%20sit%20amet%2C%20shed%20everywhere%20shed%20everywhere%20stretching%20attack%20your%20ankles%20chase%20the%20red%20dot%2C%20hairball%20run%20catnip%20eat%20the%20grass%20sniff.%3C%2Fp%3E%0A%3Cp%20class%3D%22red-text%22%3EPurr%20jump%20eat%20the%20grass%20rip%20the%20couch%20scratched%20sunbathe%2C%20shed%20everywhere%20rip%20the%20couch%20sleep%20in%20the%20sink%20fluffy%20fur%20catnip%20scratched.%3C%2Fp%3E%0A%0A
pease help
JD Tadlock
@jdtdesigns
Jun 13 2016 18:16
@Saberdjanovmarsel that doesn't let anyone know what your issue is
GiorgosKorn
@GiorgosKorn
Jun 13 2016 18:16
i know
just close the a tag
JD Tadlock
@jdtdesigns
Jun 13 2016 18:16
@GiorgosKorn did you have a question regarding the portfolio?
GiorgosKorn
@GiorgosKorn
Jun 13 2016 18:16
you havent closed it
yes i have a lot actually
cause i cant make the navbar right so i cannot start the project
Saberdjanovmarsel
@Saberdjanovmarsel
Jun 13 2016 18:17
@jdtdesigns yes i need to get the tird one done
GiorgosKorn
@GiorgosKorn
Jun 13 2016 18:18
@Saberdjanovmarsel just close the a tag
@Saberdjanovmarsel i pmed u
@Saberdjanovmarsel did usee?
Nguyễn Quốc Đại
@nqdai1992
Jun 13 2016 18:29
Hello I have a problem when use geolocation. Somebody can help me, please :D
that my code
```
var URL
function main() {    navigator.geolocation.getCurrentPosition(function(pos){
            var lat=pos.coords.latitude
            var lon=pos.coords.longitude
                console.log(lat,lon)
            URL="https://maps.googleapis.com/maps/api/geocode/json?latlng="+lat+","+lon+"&key=AIzaSyDUzOoDTivFqJh2KC8PtvTr5G4MMquf5f4";
});
     }
console.log(URL)

and a see console, it show result:
"function URL() {

[native code]

}"

I want to use vaule from geolocation but I can't
Courtney Biel
@frzbgolfer
Jun 13 2016 18:36
Hello again, I'm working on the "Seek and Destroy" challenge in the "Basic Algorithm Scripting" section. I have successfully completed it using the following code but I'm not able to figure it out using the Array.filter() method that it suggests... any thoughts on how I might rewrite this to use the Array.filter() method?
function destroyer(arr) {
  // Remove all the values  
  var filtered = [];
  var arrToFilter = [arguments[0]];
  var found;

  for(i=0; i<arrToFilter[0].length; i++) {
    found = false;
    for(j=1; j<arguments[0].length; j++) {
      if(arguments[j] == arrToFilter[0][i]) {
        found = true;
      }
    }
    if(!found) {
      filtered.push(arrToFilter[0][i]);
    }
  }    
  return filtered;
}

destroyer([1, 2, 3, 1, 2, 3], 2, 3);
Leo Sizaret
@Bungou
Jun 13 2016 18:39
Hello :) I'm crafting together a test page for the portfolio,to get the elements right before I add content. 2 nooby questions I have: 1) It's difficult to hover over the links in the navigation; "Contact" works, the others don't activate when hovering. 2) The red line at the bottom of the big picture is the background-color for everything downwards on; but the images have a white contour (Want that red!!) http://codepen.io/Bungou/pen/yJOpOv
Lyba M
@lybamahenti
Jun 13 2016 18:39
for the build a personal portfolio, is it necessary to put a picture of myself (i dont take pictures because of religious reasons) and do i have to put links to twitter and linkedin accounts (i dont have those)?
Nguyễn Quốc Đại
@nqdai1992
Jun 13 2016 18:41
@frzbgolfer My english not good you can give me link, i want to understand pronlem
problem
JD Tadlock
@jdtdesigns
Jun 13 2016 18:44
@nqdai1992 geolocation is deprecated on chrome unless you're using https
Leo Sizaret
@Bungou
Jun 13 2016 18:44
@lybamahenti I think Portfolio is to show what you do and help people make an image in their minds of who you are...A picture can be part of that, or not.
Karolina Kluz
@karolinaKluz
Jun 13 2016 18:44
@lybamahenti you don't have to put a picture of yourself and it's enough if you add a link to any social media account (github counts)
Nikhil Goyal
@ngoyal100894
Jun 13 2016 18:45
$.getJSON(weather,function(forcast)){

    for(int i = 0 ; i<8 ;i++){
         var today = new Date();
         var requiredTime = new Date(today.getTime()+i* 24 * 60 * 60 * 1000);
         var requiredDate = requiredTime.getDate();


       html += '<p>'+requiredDate':'list[i].temp.day '</p>';

        }
         $("#weather").html(html);
 });
weather = 'http://api.openweathermap.org/data/2.5/weather?lat='+ lat + '&lon='+long+'&units=imperial&cnt=7&APPID=122d951bb2c';
```
Does this look like a good JSON request for a 7 day forcast of temp ??
that is forcast.list[i].temp.day
Karolina Kluz
@karolinaKluz
Jun 13 2016 18:49
@ngoyal100894 is there an "int" in JS syntax?
Nikhil Goyal
@ngoyal100894
Jun 13 2016 18:52
no? then how do i declare it
Karolina Kluz
@karolinaKluz
Jun 13 2016 18:52
@ngoyal100894 var, of course before ES2015 lets
Nikhil Goyal
@ngoyal100894
Jun 13 2016 18:54
okk ..anything else to add .. This is my first javascript app .. see anymore things you can figure out ..i will be adding more to this, so wanna be sure
;)
mcorby17
@mcorby17
Jun 13 2016 18:57
Hey guys! Does anyone know how I could change the background of the body using jQuery? I've tried $("body").attr("background-image",'url("https://mryanhouse.files.wordpress.com/2014/04/atmosphere-clouds.jpg")'); and the same thing without the url() function but neither work
Karolina Kluz
@karolinaKluz
Jun 13 2016 18:57
@mcorby17 isn't it "css" not "attr"?
mcorby17
@mcorby17
Jun 13 2016 18:58
@karolinaKluz yep that would make more sense. Thanks!
CamperBot
@camperbot
Jun 13 2016 18:58
mcorby17 sends brownie points to @karolinakluz :sparkles: :thumbsup: :sparkles:
:cookie: 217 | @karolinakluz |http://www.freecodecamp.com/karolinakluz
YG
@yisuang1186
Jun 13 2016 19:06
Hey guys, if I use the following code, should there be any white space between my two buttons?
<div class="row">
<div class="col-xs-6">
<button class="btn btn-block btn-primary">cool</button>
</div>
<div class="col-xs-6">
<button class="btn btn-block btn-primary">cool</button>
</div>
</div>
Nguyễn Quốc Đại
@nqdai1992
Jun 13 2016 19:06
@frzbgolfer That my ideal for your problem. First, you use a loop for to read a single agrument. Secondly, in each loop excute arr.filter(agruments[j])
Nikhil Goyal
@ngoyal100894
Jun 13 2016 19:06
@karolinaKluz It says html is not defined
Nguyễn Quốc Đại
@nqdai1992
Jun 13 2016 19:07
now, i'm not open laptop so i'm not sure it works
Karolina Kluz
@karolinaKluz
Jun 13 2016 19:09
@ngoyal100894 so maybe define it with var and I would suggest different name. And it will be a string I guess, so first var html = "";
@ngoyal100894 and check if you have enough "" and + after html +=
Karolina Kluz
@karolinaKluz
Jun 13 2016 19:15
@yisuang1186 you are using bootstrap so there will be predefined padding and margin for button classess
Nikhil Goyal
@ngoyal100894
Jun 13 2016 19:15
I dont get you ? could you explain
it says anonymous function
$(document).ready(function(){

    var getLocationUrl = "http://ip-api.com/json";
    var weather;

    $.getJSON(getLocationUrl, function(ip){
        var stat = ip.status;
        var country   = ip.country;
        var city  = ip.city;
        var lat  = ip.lat;
        var lon  = ip.lat;
        var zip  = ip.zip;

        var userlocation = " " + city + "," + country + " " + zip + " ";

        $("#userLocation").html(userlocation);

        weather = 'http://api.openweathermap.org/data/2.5/weather?lat='+ lat + '&lon='+lon+'&units=imperial&cnt=7&APPID=122d951bb2c0a2b88a6979b918364ff1';

        $.getJSON(weather,function(forcast){
            var html = "";
            for(var i = 0 ; i<8 ;i++){
                var today = new Date();
                var requiredTime = new Date(today.getTime()+i* 24 * 60 * 60 * 1000);
                var requiredDate = requiredTime.getDate();


                 html += '<p>'+requiredDate+':'+forcast.list[i].temp.day+ '</p>';

            }

        $("#weather").html(html);



         });
    });

});
This one is my code
YG
@yisuang1186
Jun 13 2016 19:16
@karolinaKluz Make sense, ty!
CamperBot
@camperbot
Jun 13 2016 19:16
yisuang1186 sends brownie points to @karolinakluz :sparkles: :thumbsup: :sparkles:
:cookie: 219 | @karolinakluz |http://www.freecodecamp.com/karolinakluz
Karolina Kluz
@karolinaKluz
Jun 13 2016 19:22
@ngoyal100894 I'm sorry I don't know how to make your code work. Try asking in HelpJavaScript room
Nikhil Goyal
@ngoyal100894
Jun 13 2016 19:23
Its ok @karolinaKluz thanx
CamperBot
@camperbot
Jun 13 2016 19:23
ngoyal100894 sends brownie points to @karolinakluz :sparkles: :thumbsup: :sparkles:
:cookie: 220 | @karolinakluz |http://www.freecodecamp.com/karolinakluz
JD Tadlock
@jdtdesigns
Jun 13 2016 19:23
@ngoyal100894 what is the issue?
Karolina Kluz
@karolinaKluz
Jun 13 2016 19:24
I don't get for example why are you defining today as new Date and then you use it in another new Date
Nikhil Goyal
@ngoyal100894
Jun 13 2016 19:24
hey @jdtdesigns See I wrote that code , followed that what we discussed
I made a new date object . and used it to get date for any day .
@karolinaKluz
@jdtdesigns it gives an error .. anonymous function on line where htmli+=<p> ...
keystuck
@keystuck
Jun 13 2016 19:32
Has anyone worked on the random quote generator recently? I'm tearing my hair out trying to change the text that gets sent out in the tweet
Nikhil Goyal
@ngoyal100894
Jun 13 2016 19:38
?? @jdtdesigns
JD Tadlock
@jdtdesigns
Jun 13 2016 19:48
@ngoyal100894 looking through it
see this one .. I got the hint to use html+= ...from here .. not even read we can even call html tags from javascript
JD Tadlock
@jdtdesigns
Jun 13 2016 19:57
@ngoyal100894 first issue is you're not using the forecast api, you're using the current weather
Nikhil Goyal
@ngoyal100894
Jun 13 2016 20:00
okay .. corrected it ..thanx
WilliamDecker
@WilliamDecker
Jun 13 2016 20:12
just curious, does anyone have any good resources on learn/writing API/JSON/HTTP GET requests?
Nikhil Goyal
@ngoyal100894
Jun 13 2016 20:14
https://www.youtube.com/watch?v=OFjxqzMTsBc&list=PL7C8fMD-89DLXOLuwjofJJ9smB_LmVGeu
view all the 4 .. you might get some help .. for http get
Daniel
@clevadani
Jun 13 2016 20:23
hey guys, how do I play the sounds in the simon game?\
JD Tadlock
@jdtdesigns
Jun 13 2016 20:26
var sound1 = new Audio('http://mp3.url');

sound1.play(); // plays the mp3 file audio
@clevadani
Daniel
@clevadani
Jun 13 2016 20:29
@jdtdesigns Thanks. Let me try it out
CamperBot
@camperbot
Jun 13 2016 20:29
clevadani sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 472 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Nikhil
@jerof
Jun 13 2016 20:49
Hello all! I seem to be stuck in a certain step while learning Javascript. It's got to do with push(), shift(), pop(), etc. Can anyone help? (resources, etc.) Thanks
WilliamDecker
@WilliamDecker
Jun 13 2016 20:53
Sorry for the delay @ngoyal100894 and @Belax8 thanks for the resources!
CamperBot
@camperbot
Jun 13 2016 20:53
williamdecker sends brownie points to @ngoyal100894 and @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 194 | @ngoyal100894 |http://www.freecodecamp.com/ngoyal100894
:cookie: 410 | @belax8 |http://www.freecodecamp.com/belax8
ALINATSUI
@ALINATSUI
Jun 13 2016 20:54
hey people...I feel so dumb...I'm working on the weather app and can't seem to get the degree fahrenheit in line with the temperature? I've tried .before(), but doesn't seem to be working correctly? http://codepen.io/alinawtsui/pen/grJvro
I'm using a weather icon similar to Font Awesome.
Nikhil
@jerof
Jun 13 2016 20:55
Thanks @Raj00786
CamperBot
@camperbot
Jun 13 2016 20:55
jerof sends brownie points to @raj00786 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for raj00786
Arsalan Sabir
@aayanqazi
Jun 13 2016 21:02
Please help me
hot can I get a value of weather array in open weather API ??
?
?
redixhumayun
@redixhumayun
Jun 13 2016 21:09

http://codepen.io/redixhumayun/pen/XKdJZQ?editors=1112

Hey, can anybody help me out with this code? I have no idea what kind of logical error i have in my for loop, but when i try to console.log my current value of the array, I keep getting only the last value

bscyrpt
@bscyrpt
Jun 13 2016 21:12
@ALINATSUI you need to add this
.temperature{ display:inline;}
.degree{ display:inline};
//divs by default are block level elements so they are on lines by themselves, you can use inline or inline-block
ALINATSUI
@ALINATSUI
Jun 13 2016 21:13
oh!!! Let me try that @bscyrpt ...
Thanks @bscyrpt ...that's a lot better....
CamperBot
@camperbot
Jun 13 2016 21:14
alinatsui sends brownie points to @bscyrpt :sparkles: :thumbsup: :sparkles:
:cookie: 12 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
Daniel Combs
@DunderStruck
Jun 13 2016 21:20
I have no idea where to start with the portfolio project. Can anyone point me in the right direction? Currently I'm trying to make a nav bar, but I'm not sure where to start with it. What are some resources I can use?
Daniel Combs
@DunderStruck
Jun 13 2016 21:24
Alright, I'll check into that. Thanks! @Belax8
CamperBot
@camperbot
Jun 13 2016 21:24
dunderstruck sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:cookie: 411 | @belax8 |http://www.freecodecamp.com/belax8
Kyle W Pilkinton
@tadake
Jun 13 2016 21:27
can anyone help me with my simon game. im really stuck with it and ive tried alot of different things and i cant tell where im going wrong.
http://codepen.io/tadake/pen/gMadEz
Daniel Combs
@DunderStruck
Jun 13 2016 21:27
Oh, it'd probably help a lot if I actually used bootstrap in my codepen too...I must've misclicked and selected foundation instead. That explains why things weren't displaying how they should have.
JD Tadlock
@jdtdesigns
Jun 13 2016 21:29
@tadake I see a ton of repeated code which will always come back and bite you when your app gets large
Philip Eckert
@pae4557
Jun 13 2016 21:29
Hey, anybody have experience with the OpenWeatherMap API? Their example calls have invalid keys so I can't see what I'm doing wrong when I call it for the weather app project.
Bailey
@coder7215
Jun 13 2016 21:29
Hi! How can I make my bootstrap buttons smaller like the one in the example pen, so that they are small and centered under my name? Here is my pen: https://codepen.io/coder7215/pen/WxQyPr
JD Tadlock
@jdtdesigns
Jun 13 2016 21:29
@tadake go through your code and figure out what things can be cleaned up and DRY'd (Don't Repeat Yourself)
Jonathan
@JonKaric
Jun 13 2016 21:30
@coder7215 Hey baily, you need to wrap your buttons inside columns.
Bailey
@coder7215
Jun 13 2016 21:31
@JonKaric oh how exciting. :) How do I do that?
JD Tadlock
@jdtdesigns
Jun 13 2016 21:32
@pae4557 have you signed up for a key and tried using the api yet?
Jonathan
@JonKaric
Jun 13 2016 21:33
@coder7215 <div class="col-md-6"> <button></button> </div>
Bailey
@coder7215
Jun 13 2016 21:33
@JonKaric thanks one second. let me try
CamperBot
@camperbot
Jun 13 2016 21:33
coder7215 sends brownie points to @jonkaric :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jonkaric
Philip Eckert
@pae4557
Jun 13 2016 21:33
@jdtdesigns Yeah, but it keeps running the error when I call it :/
JD Tadlock
@jdtdesigns
Jun 13 2016 21:33
@pae4557 post your codepen
Philip Eckert
@pae4557
Jun 13 2016 21:33
@jdtdesigns https://codepen.io/zarker24/pen/OXMmNB?editors=1010 I have the error function commented out, as it keeps alerting me
Bailey
@coder7215
Jun 13 2016 21:34
@JonKaric ah hah! Thanks for your help!
CamperBot
@camperbot
Jun 13 2016 21:34
coder7215 sends brownie points to @jonkaric :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jonkaric
JD Tadlock
@jdtdesigns
Jun 13 2016 21:36
$.getJSON('http://api.openweathermap.org/data/2.5/weather?lat=' + latitudeVariable + '&lon=' + longitudeVariable + '&units=imperial&APPID=<your key without the arrows>', function(json) {
  // do something with the data
}
@pae4557
much easier
setting the header is what is causing the error in your call
the api instructions say to use the param APPID=<your key>
bscyrpt
@bscyrpt
Jun 13 2016 21:38
@pae4557 your url is wrong, its try to do this:
https://s.codepen.io/boomerang/85fc4b0d674584df9ce5c81fd714bc481465853889138/api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&lat=35.9276062&lon=-84.0854432
and keeps giving 404 error message
Philip Eckert
@pae4557
Jun 13 2016 21:42
@jdtdesigns so getJSON just passes the JSON it gets in response to the function you put at the end?
and @bscyrpt do you mean that I should be calling that instead? Why is it trying to add the codepen url at the beginning?
bscyrpt
@bscyrpt
Jun 13 2016 21:45
@pae4557 no that is from browser error message in console the boomerang part codepen adds in, the your lat={lat} part is wrong, its not subing in the values like you want you need to remove it from the url
Philip Eckert
@pae4557
Jun 13 2016 21:49
@bscyrpt Uh oh. Something seems to be really messed up now... the page wont even load for me :/
Bailey
@coder7215
Jun 13 2016 21:57
How can I make sure everything in my #hello div stays in front of the background image no matter the screen size (the background image is only taking up the height of the viewport, rather than the entire div . . . here is my pen: https://codepen.io/coder7215/pen/YWqemv
Jonathan
@JonKaric
Jun 13 2016 22:03
@coder7215 What are you trying to do sorry? i dont understand what you mean
Bailey
@coder7215
Jun 13 2016 22:05
@JonKaric No problem. Basically when I squish my browser down so that it takes up the full HORIZONTAL width but only a little of the VERTICAL one, half the buttons of the page go into the next div and everything becomes all, well, squishy. How can I remedy this while still making a responsive site?
P.S. You will have to open the pen in a separate window to see it
Jonathan
@JonKaric
Jun 13 2016 22:06
@coder7215 Lemme just open in a differnt browser. cant replicate in chrome
Bailey
@coder7215
Jun 13 2016 22:06
Okay. :)
Philip Eckert
@pae4557
Jun 13 2016 22:07
@bscyrpt can you see what's still wrong with the call? Isn't the call correct now? When I copy paste that url into my browser I get the proper JSON http://api.openweathermap.org/data/2.5/weather?lat=40.1886836&lon=-92.576239&units=imperial&APPID=9ac31c074b05f21b2a331ee767de7736
Bailey
@coder7215
Jun 13 2016 22:08
@JonKaric Oh! I tried writing overflow:auto in my code and it seems to have worked: https://codepen.io/coder7215/pen/YWqemv?editors=1100
Tzvetlin Velev
@tvelev92
Jun 13 2016 22:09
anyone got a sec to help with JSON to link question?
Jonathan
@JonKaric
Jun 13 2016 22:10
@coder7215 Yeah for some reason i couldnt replicate what you meant. All looked fine to me, hope the overflow has worked!
Bailey
@coder7215
Jun 13 2016 22:11
@JonKaric Thanks again!
CamperBot
@camperbot
Jun 13 2016 22:11
coder7215 sends brownie points to @jonkaric :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jonkaric
Tzvetlin Velev
@tvelev92
Jun 13 2016 22:13
need some help guys
Jonathan
@JonKaric
Jun 13 2016 22:14
Go for it
bscyrpt
@bscyrpt
Jun 13 2016 22:14
@pae4557 i changed the method to an ajax call and its giving an error message. I think that since you pull the lat/lon from geolocator , openweather api only supports like 200+ locations so it may be asking for a location in lat/lon that doesn't exist for openweather. Either change location to using the city name or use another api service to convert ip to lat/lon
Philip Eckert
@pae4557
Jun 13 2016 22:15
@bscyrpt I see. Thank you!
CamperBot
@camperbot
Jun 13 2016 22:15
pae4557 sends brownie points to @bscyrpt :sparkles: :thumbsup: :sparkles:
:cookie: 13 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
Ethan Rose
@ethanrose
Jun 13 2016 22:17
is this the correct javascript to add a class?
This message was deleted
$("#unit-switch-F").click(function(){
   $("#unit-switch-F").addClass("f-selected")
}
)
Jonathan
@JonKaric
Jun 13 2016 22:17
@aidansven Yeah thats right
Ethan Rose
@ethanrose
Jun 13 2016 22:18
would that also add the
.f-selected:hover
?
because I'm trying it now and it's not adding anything :/
ah maybe it's because of the ordering.. it's not overriding the old background color perhaps?
Jonathan
@JonKaric
Jun 13 2016 22:19
@aidansven :hover will only work in css, what are you trying to do so i can understand better?
Ethan Rose
@ethanrose
Jun 13 2016 22:20
trying to make buttons that will change background color when they are selected
and have opacity when they are hovered
:)
Jonathan
@JonKaric
Jun 13 2016 22:20
@aidansven Selected or hoverd upon?
Ethan Rose
@ethanrose
Jun 13 2016 22:21
so this in the css works for me
.f-selected {
font-size: 30px;
}
but
.f-selected {
background-color: blue;
}
doesn't change anything
Philip Eckert
@pae4557
Jun 13 2016 22:21
@bscyrpt hmm even just setting it to city = london won't work (thats the city they have in the example call on their site so I assume it should work)
Ethan Rose
@ethanrose
Jun 13 2016 22:22
my main problem is I'm wondering why the background-color isn't changing? but something else like font-size is
Jonathan
@JonKaric
Jun 13 2016 22:23
@aidansven If they are both in your css, then call .f-selected something different as you shouldnt really have the same classes twice
Is this for a freecodecamp tutorial or your own project?
Ethan Rose
@ethanrose
Jun 13 2016 22:23
ah no it's not in there twice, I'm just changing it to test it
it's the weather api project
so far I just have the bar at the top, and I want the F and C to change depending on which one is selected
RompePC
@RompePC
Jun 13 2016 22:25
@aidansven In Codepen's editor you cannot tell colors by name, but by hex number instead (#00f)
Ethan Rose
@ethanrose
Jun 13 2016 22:25
I want to be able to click "F" and it will turn gold-ish
bscyrpt
@bscyrpt
Jun 13 2016 22:25
@coder7215 did you get what you want working? Kinda hard to understand what you are trying to do. Anything in the #hello div will always be on top of the background image for that div by default. if your talking about buttons that stack/reflow to ontop of each other when you resize the browser you can prevent this by specifying a min-width to a given css class and it wont collapse any smaller than that
Ethan Rose
@ethanrose
Jun 13 2016 22:25
ohhhh...
Bailey
@coder7215
Jun 13 2016 22:25
@bscyrpt Yes! I got it. Thanks so much
CamperBot
@camperbot
Jun 13 2016 22:25
coder7215 sends brownie points to @bscyrpt :sparkles: :thumbsup: :sparkles:
:cookie: 14 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
Ethan Rose
@ethanrose
Jun 13 2016 22:28
@RompePC @JonKaric
even
.f-selected {
background-color: #00f;
}
is not working
but when I change any other styling aside from color, it's working
RompePC
@RompePC
Jun 13 2016 22:28
@aidansven That cannot be, go to look
Jonathan
@JonKaric
Jun 13 2016 22:29
@aidansven There is somthing wrong with the hierarchy, when i place !important in the class it works. diving deeper now...
Ethan Rose
@ethanrose
Jun 13 2016 22:29
@JonKaric ohhh..... thanks Jon.. I thought that might be... even though I put .f-selected on the bottom of my CSS for that reason??
CamperBot
@camperbot
Jun 13 2016 22:29
aidansven sends brownie points to @jonkaric :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jonkaric
Ethan Rose
@ethanrose
Jun 13 2016 22:31
@RompePC thanks too :) yeah the problem is so weird to me.. since I don't have anything else marked !important and my .f-selected is on the bottom of the CSS
CamperBot
@camperbot
Jun 13 2016 22:31
aidansven sends brownie points to @rompepc :sparkles: :thumbsup: :sparkles:
:cookie: 309 | @rompepc |http://www.freecodecamp.com/rompepc
RompePC
@RompePC
Jun 13 2016 22:32
@aidansven You gave the answer, use !important in your class and it will work
Ethan Rose
@ethanrose
Jun 13 2016 22:33
@RompePC is it bad practice to use !important ? I thought I read that somewhere, so I've always tried to avoid it in case
RompePC
@RompePC
Jun 13 2016 22:34
@aidansven The only reason I don't know why it just not overlaps the id selector properties (because all is correct) is maybe beacuse an id selector is more important (or something alike) than a class selector
Ethan Rose
@ethanrose
Jun 13 2016 22:34
ahhhhh...!!! @RompePC good point! that might be it!
RompePC
@RompePC
Jun 13 2016 22:34
@aidansven !important just tells the property to be there no matter what you do later until another !important is founded in the same property.
Jonathan
@JonKaric
Jun 13 2016 22:34
@aidansven Yeah the #unit-switch-F is taking over the class
RompePC
@RompePC
Jun 13 2016 22:35
@aidansven @JonKaric Didn't know about that one, never had that issue
Jonathan
@JonKaric
Jun 13 2016 22:35
@aidansven It's not bad practice unless you MUST use it. Otherwise, never use it. When writing css it should all cascase nicely without the use off !important
Ethan Rose
@ethanrose
Jun 13 2016 22:36
@JonKaric @RompePC thanks so much guys.. brilliant
CamperBot
@camperbot
Jun 13 2016 22:36
aidansven sends brownie points to @jonkaric and @rompepc :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jonkaric
:warning: aidansven already gave rompepc points
RompePC
@RompePC
Jun 13 2016 22:36
@aidansven So, when you set as important your new background-color, it will take priority over all background-color properties assigned to that selector
Ethan Rose
@ethanrose
Jun 13 2016 22:36
so should I (for best practice) be changing my #unit-switch-f to a .unit-switch-f ?
use a class instead of ID in this case?
RompePC
@RompePC
Jun 13 2016 22:36
@aidansven @JonKaric It's strange having to use it; maybe when replacing some framework property (like in Bootstrap or Foundation).
Jonathan
@JonKaric
Jun 13 2016 22:37
@RompePC Put bootstrap first in the head and then your style, and you wont ever have to use !important
RompePC
@RompePC
Jun 13 2016 22:37
@aidansven Switch to .unit-switch-f and you won't have more headaches like that
Jonathan
@JonKaric
Jun 13 2016 22:38
@aidansven It's up to you. I like to stay clear of !important where i can, so in this case i would do as you suggested, a class instead of an ID
RompePC
@RompePC
Jun 13 2016 22:38
@JonKaric I always do that loading order, and I think in some cases I needed to do it...
Jonathan
@JonKaric
Jun 13 2016 22:39
@RompePC understandable. Ive seen some cases where developers (well....) put so many of them it's just a mess. completely unmaintainable
Ethan Rose
@ethanrose
Jun 13 2016 22:41
@JonKaric why won't bot give you brownie points if I say thanks?? haha!
CamperBot
@camperbot
Jun 13 2016 22:41
aidansven sends brownie points to @jonkaric :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jonkaric
Jonathan
@JonKaric
Jun 13 2016 22:41
@aidansven Bot doesnt seem to like me :(
Ethan Rose
@ethanrose
Jun 13 2016 22:41
ohhhhh :( :-1:
RompePC
@RompePC
Jun 13 2016 22:42
@JonKaric Yep xD Altough I work alone always, maybe it was just a bad BS version they landed with more !important than ever
ALINATSUI
@ALINATSUI
Jun 13 2016 22:42
ugh, this is frustrating....I'm getting 'NaN' error when I try to convert fahrenheit temp to celsius: http://codepen.io/alinawtsui/pen/grJvro?editors=1011
RompePC
@RompePC
Jun 13 2016 22:42
@JonKaric Thanks
CamperBot
@camperbot
Jun 13 2016 22:42
rompepc sends brownie points to @jonkaric :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jonkaric
RompePC
@RompePC
Jun 13 2016 22:44
@ALINATSUI Don't pass convert as an arg and try
Jonathan
@JonKaric
Jun 13 2016 22:47
@ALINATSUI Seems like it isnt passing it as a number, probably a string. So it can't work it out
ALINATSUI
@ALINATSUI
Jun 13 2016 22:47
@RompePC Nope, same thing...weird thing is I'm able to pull out the parsed_json with the Celsius temp and that's working in console.log....
@jonKaric Well, not sure that I really need to use the converter as I was able to get the parsed json_with the converted celsius temp already...
RompePC
@RompePC
Jun 13 2016 22:49
@ALINATSUI Inside your .click, try replacing temp_fwith $('.weatherCondition').text
Jonathan
@JonKaric
Jun 13 2016 22:49
no no dont do that
RompePC
@RompePC
Jun 13 2016 22:49
@ALINATSUI Well, first do a parseFloat
Jonathan
@JonKaric
Jun 13 2016 22:49
ive fixed it
ALINATSUI
@ALINATSUI
Jun 13 2016 22:50
??
Jonathan
@JonKaric
Jun 13 2016 22:50
@ALINATSUI Instead of using the temp_f variable inside the .click
use fahrenheit instead
ALINATSUI
@ALINATSUI
Jun 13 2016 22:51
ooh I see what I did there @jonkaric...I used the temp_f to parse out the weather conditions, instead of the actual temp (var fahrenheit)...
Jack Reinke
@jreinke10
Jun 13 2016 22:52
can someone help me get my buttons inline with my nav bar. As you can see they are out of line http://codepen.io/jreinke10/pen/ZOQMwd
bscyrpt
@bscyrpt
Jun 13 2016 22:52
@ALINATSUI umm looking at your parsed_json object, it does already give the degrees in both far and celcius btw
Jonathan
@JonKaric
Jun 13 2016 22:54
@jreinke10 hey jack you need to float the buttons and your h1 to the left
ALINATSUI
@ALINATSUI
Jun 13 2016 22:54
yeah @bscyrpt ...I couldn't get the temperature in celsius to appear, but just got that part working.. thanks @jonkaric.
CamperBot
@camperbot
Jun 13 2016 22:54
alinatsui sends brownie points to @bscyrpt and @jonkaric :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for jonkaric
:cookie: 15 | @bscyrpt |http://www.freecodecamp.com/bscyrpt
bscyrpt
@bscyrpt
Jun 13 2016 22:58
@jreinke10 currently you set a height on your navbarheader and your buttons are larger than that, remove the height value from navbar header and set a height in the #button
Jonathan
@JonKaric
Jun 13 2016 23:04
@jreinke10 Hey jack ive refreshed your pen and seems like youre still having trouble. you need to float the h1, and each button to the left. Remove the bottom value completly
shivamsonu29
@shivamsonu29
Jun 13 2016 23:15
$(document).ready(function(){
$("#data").click(function(){
    window.open("https://en.wikipedia.org/wiki/Special:Random");

});

  $("#sub").on("click",function(){
  var s=$("#inf").val();
  var url="https://en.wikipedia.org/w/api.php?action=opensearch&search="+ s +"&format=json&callback=?";
  $.ajax({

    type:"GET",
    url:url,
      async:false,
    datatype:"json",
    success:function(data)
    {
      console.log(data);
    },
    error:function(errorMessage)
    {
     alert("Error"); 
    }
  });
  }); 
});
hi everyone, following program showing always Error as a result, not getting data from api in the program..why is it so??
anacou
@anacou
Jun 13 2016 23:22
Stuck on "Build a Personal Portfolio Webpage". I just don't know where to get started..?
Toni Shortsleeve
@KoniKodes
Jun 13 2016 23:22
@anacou Do you have a hero or favorite person? Begin getting the info together with a great pic, and the rest will come together.