These are chat archives for FreeCodeCamp/HelpFrontEnd

24th
Oct 2016
KonSal
@KonSal
Oct 24 2016 00:00
i'm doing data analysis and data acquisition, so I'm using packages like
LabVIEW, Mathematica and MATLAB
vuasin
@vuasin
Oct 24 2016 00:01
thats nice
what do you even need html and css for?
seems like a waste of time if u dont use it
KonSal
@KonSal
Oct 24 2016 00:02
using them for personal projects, just for the fun of it
vuasin
@vuasin
Oct 24 2016 00:02
well i can tell you its very easy
KonSal
@KonSal
Oct 24 2016 00:03
Well, kinda, depends on how much you want to deepen your knowledge.
(i think we de-railed the topic, and i g2g, so cya around :) )
vuasin
@vuasin
Oct 24 2016 00:04
bye bye
rod poblete
@rodpoblete
Oct 24 2016 00:07
hi guys, have a question, Why disallow IDs in selectors?
Juan Sierra
@juan-sierra
Oct 24 2016 00:10
hello guys!
j1417
@j1417
Oct 24 2016 00:10
hi!! how can i put charachaters between a horizontal bar??
<------------------------>
Juan Sierra
@juan-sierra
Oct 24 2016 00:11
hi @j1417 i think this might answer your question
j1417
@j1417
Oct 24 2016 00:16
thanks @jasierragarcia
CamperBot
@camperbot
Oct 24 2016 00:16
j1417 sends brownie points to @jasierragarcia :sparkles: :thumbsup: :sparkles:
:cookie: 236 | @jasierragarcia |http://www.freecodecamp.com/jasierragarcia
Adel
@AdelMahjoub
Oct 24 2016 00:33
@j1417 some fancy stuff is coming with the next css you can put words in borders too
Jorge
@liberaltech
Oct 24 2016 00:43
Made some improvements on my JSON data viewing app, “JSON Disco” , Im still working to get more weather services up and running, for now its just weather underground api. Any feed back would be awesome!
https://json-disco.herokuapp.com
j1417
@j1417
Oct 24 2016 00:51
hi!! i want to put the symbol < before the horizontal line how can i do it??http://codepen.io/Juan1417/pen/BLrjOY
Erick Delfin
@Nifled
Oct 24 2016 00:54
Hi everyone, I just wanted ask for thoughts on my portfolio. I haven't finished but I'm trying my best.
http://erickdelfin.me/
Jorge
@liberaltech
Oct 24 2016 00:55
@j1417 take a look at your <span>
@Nifled scrolls too quick
j1417
@j1417
Oct 24 2016 00:57
@liberaltech ??
Jorge
@liberaltech
Oct 24 2016 00:57
@j1417 im not sure what your intention was there
j1417
@j1417
Oct 24 2016 00:57
@liberaltech neither me
@liberaltech <-------------------------/>
i want to create that separator
Jorge
@liberaltech
Oct 24 2016 00:58
@j1417 try <hr>
j1417
@j1417
Oct 24 2016 00:58
@liberaltech with hr i cant insert text after and before
Jorge
@liberaltech
Oct 24 2016 00:59
make sure to remove the span @j1417
@j1417 also make sure not to close hr, its simply <hr> NOT <hr></hr>
Daniel Ferrazoli
@ferrazoli
Oct 24 2016 01:01
@liberaltech can I have a <hr> inside a container?
Jorge
@liberaltech
Oct 24 2016 01:01
@ferrazoli yeah but it wont be full width
Daniel Ferrazoli
@ferrazoli
Oct 24 2016 01:02
@liberaltech how would I go around doing that?
Jorge
@liberaltech
Oct 24 2016 01:02
@ferrazoli doing what?
Daniel Ferrazoli
@ferrazoli
Oct 24 2016 01:02
@liberaltech for some reason the line won't show up in my experiment
Jorge
@liberaltech
Oct 24 2016 01:04
@ferrazoli i dont see <hr>
Daniel Ferrazoli
@ferrazoli
Oct 24 2016 01:04
@liberaltech it's on the sidebar, under <h4>
Jorge
@liberaltech
Oct 24 2016 01:05
@ferrazoli try tidying up
@ferrazoli the button on the top right corner of your html view
Daniel Ferrazoli
@ferrazoli
Oct 24 2016 01:05
@liberaltech done
@liberaltech what was that supposed to accomplish?
Jorge
@liberaltech
Oct 24 2016 01:06
@ferrazoli me being able to read it
Daniel Ferrazoli
@ferrazoli
Oct 24 2016 01:06
@liberaltech hahaha my bad
Jorge
@liberaltech
Oct 24 2016 01:06
your code
@ferrazoli make sure your rows are closing properly
Daniel Ferrazoli
@ferrazoli
Oct 24 2016 01:07
@liberaltech they are
Jorge
@liberaltech
Oct 24 2016 01:08
looks like you have ann extra div
at the bottom
hit the analyze button
@ferrazoli nevermind
@ferrazoli try container each row
Daniel Ferrazoli
@ferrazoli
Oct 24 2016 01:09
@liberaltech indeed I had an extra div, but that didn't fix it
@liberaltech will do
Jorge
@liberaltech
Oct 24 2016 01:10
@ferrazoli I think that its because of jumbotron
just noticed that
the hr and jumbotron are the same color on bootstrap, is that what your using?
Daniel Ferrazoli
@ferrazoli
Oct 24 2016 01:11
@liberaltech yes I am using bootstrap
Jorge
@liberaltech
Oct 24 2016 01:12
@ferrazoli try it without jumbotron
@ferrazoli another thing you could do is change the background-color: to jumbotron
Daniel Ferrazoli
@ferrazoli
Oct 24 2016 01:13
@liberaltech I changed the hr border color and it showed up
@liberaltech so it was indeed the same color
@liberaltech thank you so much for your help
CamperBot
@camperbot
Oct 24 2016 01:13
ferrazoli sends brownie points to @liberaltech :sparkles: :thumbsup: :sparkles:
:cookie: 352 | @liberaltech |http://www.freecodecamp.com/liberaltech
Jorge
@liberaltech
Oct 24 2016 01:13
@ferrazoli no problem
@j1417 did it fix your problem?
@j1417 also in jumbotron hr wont show up unless you change either one's background color
@ferrazoli I should warn you about using jumbotron the entire page
Juan Sierra
@juan-sierra
Oct 24 2016 01:20
I'm working on my portfolio/resume and I keep having this issue
Screen Shot 2016-10-23 at 9.18.33 PM.png
Jorge
@liberaltech
Oct 24 2016 01:23
@jasierragarcia are you using codepen
Juan Sierra
@juan-sierra
Oct 24 2016 01:24
I'm using git
let me push all my commits so you can see the code
This message was deleted
@liberaltech
@liberaltech here you go
Trevor Pyle
@pyleotrevor
Oct 24 2016 02:27
This message was deleted
This message was deleted
LPR-309
@LPR-309
Oct 24 2016 02:28
Question: Should I program out each of these buttons separately? What's the best practice? I'm trying to follow DRY here, but chaining a function call to another function call every single time a button is clicked seems ... not like a great idea. (These are increment buttons for setting timers).
$workMinus.on("click", function() {
        if (minutesW > 1) {adjustTimers("W", "-");}
    });
    $workPlus.on("click", function() {
        if (minutesW < 60) {adjustTimers("W", "+");}
    });
    $breakMinus.on("click", function() {
        if (minutesB > 1) {adjustTimers("B", "-");}
    });
    $breakPlus.on("click", function() {
        if (minutesB < 60) {adjustTimers("B", "+");}
    });

    function adjustTimers(session, adjustment) {
        switch (session) {
            case "W":
                if (adjustment === "+") {minutesW++;} else {minutesW--;}
                $workSession.text(minutesW);
                break;
            case "B":
                if (adjustment === "+") {minutesB++;} else {minutesB--;}
                $breakSession.text(minutesB);
                break;
        }
    }
Trevor Pyle
@pyleotrevor
Oct 24 2016 02:30
This message was deleted
var myGlobal = 10; 

function fun1(oopsGlobal) {
  // Assign 5 to oopsGlobal Here
  oopsGlobal = 5;
}
How do I get oopsGlobal to have the value of 5? Without using var or initializing it in a global scope?
I seem to be missing something.
Ken Haduch
@khaduch
Oct 24 2016 02:35
@pyleotrevor - I think that you should be close there, without having the function argument "oopsGlobal" in the parens for fun1(oopsGlobal). This is just showing how a variable that you declare without the var keyword gets created in the global space.
Trevor Pyle
@pyleotrevor
Oct 24 2016 02:36
hmmm. That worked. Maybe I misinterpreted the instructions. I thought that I would need to use it as a placeholder before I assigned it a value in the function.
I think I just need to read up on functions a bit. Very brief explanation offered. Thanks so much @khaduch !
CamperBot
@camperbot
Oct 24 2016 02:37
pyleotrevor sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1824 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Oct 24 2016 02:40
@pyleotrevor - the name oopsGlobal is a hint to what is going on. If you declare a variable, or rather, use it without having declared it, it gets created in the global scope. That is sometimes what you want to do, but it is better to declare it in a global space, as the var myGlobal is declared, so that you expressly have it created where you want it to be. Global variables are not really good to use, but sometimes that most expedient way to implement something. Just better to not "oops" it, but be explicitly declaring it in a place where it has global scope for the functions that use it.
Trevor Pyle
@pyleotrevor
Oct 24 2016 02:48
Ahh okay. @khaduch that helps. I appreciate the explanation. So my creation of oopsGlobal in that instance could have lead to scope issues down the road.
Ken Haduch
@khaduch
Oct 24 2016 02:58
@pyleotrevor - do you mean when you had it in the parenthesis of the function declaration? That would make a variable "oopsGlobal" that is a locally scoped variable within the function body, so it would not fulfill the conditions of the lesson, I think that would be the problem there.
woven1web
@woven1web
Oct 24 2016 03:35
How to set an image in my tribute page with codepen
Daniel Ferrazoli
@ferrazoli
Oct 24 2016 03:36
@woven1web <img src=" link to your image ">
woven1web
@woven1web
Oct 24 2016 03:40
Hey Daniel do I have use CodePen Pro to import my images?
Sarah Chima
@sayrah901
Oct 24 2016 04:13
Please guys, help me review my Wiki viewer https://codepen.io/sayrah901/pen/ZprNJv
JD Tadlock
@jdtdesigns
Oct 24 2016 04:29
@silver537 Been away for a couple days, but I made this today to show you some ways of handling column layouts with animations. I also went ahead and incorporated real weather forecast data too just for fun. ;) http://jsfiddle.net/jdtadlock/2m5ppeL1/6/embedded/result/
@woven1web You can use http://photobucket.com/
JD Tadlock
@jdtdesigns
Oct 24 2016 04:40
@sayrah901 Works well. ;)
I would add 'target="_blank"' to your link wrapper though
so it opens the wikipedia page in a new browser tab
Sarah Chima
@sayrah901
Oct 24 2016 04:59
@jdtdesigns aiit, I'll try to do that. Thank u
CamperBot
@camperbot
Oct 24 2016 04:59
sayrah901 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 715 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Puspak
@Puspak64
Oct 24 2016 05:43
Browser and Text zoom should be at 100%. Getting difficulty to figure out this. Any sugeestion
JD Tadlock
@jdtdesigns
Oct 24 2016 05:46
@Puspak64 huh?
Puspak
@Puspak64
Oct 24 2016 05:48
@jdtdesigns new to free code camp. Stuck in a practice problem
JD Tadlock
@jdtdesigns
Oct 24 2016 05:49
@Puspak64 what is the problem?
Sorin Ruse
@sorinr
Oct 24 2016 06:09
@jdtdesigns hi. there is something wrong in toggleTemp = ()=> on your jsfiddle. when you press the C btn it converts the temp ok only that the hours in the forecast are not showing anymore
Annu Nirmal
@annunirmal
Oct 24 2016 06:10
can you guys help me in inline-block in css for ```id="timer" in my codepen. i want to align my input in one row.
http://codepen.io/nirmalannu/pen/pEGRgN
Sorin Ruse
@sorinr
Oct 24 2016 06:19
@annunirmal you can use display: flex; justify-content: center; on your #timer css
Sorin Ruse
@sorinr
Oct 24 2016 06:24
@jdtdesigns this is the one i've seen first then when i reloaded it saw that problems. this one works very nice. :+1:
Annu Nirmal
@annunirmal
Oct 24 2016 06:24
@jdtdesigns thanks alot :smile: +1:
CamperBot
@camperbot
Oct 24 2016 06:24
annunirmal sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 716 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Annu Nirmal
@annunirmal
Oct 24 2016 06:25
@sorinr thanks alot :)
CamperBot
@camperbot
Oct 24 2016 06:25
annunirmal sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 787 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Oct 24 2016 06:27
@jdtdesigns still working on that proj?
JD Tadlock
@jdtdesigns
Oct 24 2016 06:27
@sorinr Yep, i've been streaming. I'll be streaming again today sometime.
Sorin Ruse
@sorinr
Oct 24 2016 06:31
@jdtdesigns same link you have pm'ed me? have also recording of the lasts streams?
JD Tadlock
@jdtdesigns
Oct 24 2016 06:32
@sorinr yes
look on bottom right of page, you'll see past videos
JD Tadlock
@jdtdesigns
Oct 24 2016 06:51
@sorinr forgot to add saturday to the weekday array http://jsfiddle.net/jdtadlock/2m5ppeL1/9/embedded/result/
Don Price
@KingHippo
Oct 24 2016 06:51
Can someone look at my code and give me a clue as to why it's not pushing values into the array? I can see the value with console.log, but they wont push into the array.
function pairElement(str) {

  var strArray = str.split('');
  var dnaArray = [[],[]];
  var dnaPair = {};
  dnaPair.A = 'T';
  dnaPair.G = 'C';
  dnaPair.T = 'A';
  dnaPair.C = 'G';

  for(var i in strArray){
//  console.log(str[i]);

    if(dnaPair.hasOwnProperty(strArray[i])){
     console.log(strArray[i] + " " + dnaPair[str[i]]);
        dnaArray.push([strArray[i]][dnaPair[strArray[i]]]);
    }
//    console.log(dnaArray);
    }
 // return str;
}

pairElement("ATCGA");
Annu Nirmal
@annunirmal
Oct 24 2016 06:54
@jdtdesigns also i wanted to ask whether you can add only 7 pens in your showcase of codepen? i think there must be a next tab for further projects more than 7
JD Tadlock
@jdtdesigns
Oct 24 2016 06:55
@annunirmal You can make unlimited pens
you hit the New Pen button up top ;)
Annu Nirmal
@annunirmal
Oct 24 2016 06:56
@jdtdesigns yeah unlimited pens but onlt 7 in showcase ?
@jdtdesigns this
blob
JD Tadlock
@jdtdesigns
Oct 24 2016 06:57
showcase is just the popular pens
you can see all pens in the public tab
Annu Nirmal
@annunirmal
Oct 24 2016 06:57
alright
JD Tadlock
@jdtdesigns
Oct 24 2016 06:57
the more clicks each pen gets pushes it to the top of showcase
Annu Nirmal
@annunirmal
Oct 24 2016 06:58
thnaks
JD Tadlock
@jdtdesigns
Oct 24 2016 06:58
@KingHippo I'm not sure of your plan there. You have two empty arrays that will remain in dnaArray after pushing the new arrays.
Don Price
@KingHippo
Oct 24 2016 07:00
@jdtdesigns I am trying to complete the DNA pairing excercise. the values need to be put in the array like so [["A","T"],["T","A"],["C","G"],["G","C"],["A","T"]]
JD Tadlock
@jdtdesigns
Oct 24 2016 07:01
correct
Don Price
@KingHippo
Oct 24 2016 07:02
I don't need to specify the array to be an 2 dimensional array first?
JD Tadlock
@jdtdesigns
Oct 24 2016 07:02
i would split the str and then map through it
and pair the letter with it's match
then you could push that pair to an empy array
Don Price
@KingHippo
Oct 24 2016 07:03
@jdtdesigns I will give map a look. Thanks!
CamperBot
@camperbot
Oct 24 2016 07:03
kinghippo sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 717 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Don Price
@KingHippo
Oct 24 2016 07:03
sounds like a good plan
JD Tadlock
@jdtdesigns
Oct 24 2016 07:03
;)
higher order functions will become your life
Don Price
@KingHippo
Oct 24 2016 07:04
Haha I feel like it' cheating a little, but they defintely make things easier
JD Tadlock
@jdtdesigns
Oct 24 2016 07:05
@KingHippo Not cheating at all. They have been built into js for awhile and should always be used when the situation calls for it.
they can be extremely complex as well
so learning them isn't like using a calculator for a math test :P
Sorin Ruse
@sorinr
Oct 24 2016 07:09
@jdtdesigns thought its just a 5 day forecast including today
Don Price
@KingHippo
Oct 24 2016 07:09
@jdtdesigns I am giving map a look now and it looks like I will have to create another function? Just checking if I'm thinking right.
JD Tadlock
@jdtdesigns
Oct 24 2016 07:10
@sorinr I was referring to the days of the week(Monday, Tuesday, ect)
@KingHippo no extra function needed
Don Price
@KingHippo
Oct 24 2016 07:11
@jdtdesigns ok thanks!
CamperBot
@camperbot
Oct 24 2016 07:11
kinghippo sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:warning: kinghippo already gave jdtdesigns points
Sorin Ruse
@sorinr
Oct 24 2016 07:14
@jdtdesigns now i switch to code part and seen its missing from the array
JD Tadlock
@jdtdesigns
Oct 24 2016 07:14
click on the link i gave you
jsfiddle doesn't auto update prev saves
@sorinr
Sorin Ruse
@sorinr
Oct 24 2016 07:15
@jdtdesigns ok
JD Tadlock
@jdtdesigns
Oct 24 2016 07:16
@KingHippo Here's a simple example of some .map() magic http://jsbin.com/vugiqes/edit?js,console
you'd probably be surprised to know you could complete that challenge in one line right? :D
Don Price
@KingHippo
Oct 24 2016 07:17
@jdtdesigns Thanks again!
CamperBot
@camperbot
Oct 24 2016 07:17
kinghippo sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:warning: kinghippo already gave jdtdesigns points
Don Price
@KingHippo
Oct 24 2016 07:17
whatttt???
@jdtdesigns 1 line? that is some kung fu stuff right there
JD Tadlock
@jdtdesigns
Oct 24 2016 07:18
@KingHippo There are quite a lot you can do in one line using higher order functions
Don Price
@KingHippo
Oct 24 2016 07:20
@jdtdesigns I am going to have to try and use them more often!
Vlad
@baxa19
Oct 24 2016 09:14
omg ....recently started to learn coding and omg.... i have no idea how to start portfolio :D to finish damn 118 surv :DD
how to break through that coding barier :shipit:
kirbyedy
@kirbyedy
Oct 24 2016 09:26
@baxa19 leave it for now, go through the rest and go back to portfolio later on
KonSal
@KonSal
Oct 24 2016 11:27
If anyone can spot that bug that is killing me, would be more than thankful!
To replicate it, after you stop the first game and restart over, things start getting messy and the score is jumping.
(The game is far from complete, ignore the rest of the bugs, missing features)
http://codepen.io/KonSal/pen/pgjozZ?editors=0011
Gare24
@Gare24
Oct 24 2016 11:32
how can i skip building portfolio page and come back later on ... but still continue with the lessons?
Jess Alexander
@jess-alexander
Oct 24 2016 11:42
Hello - I’m working on the Twitch.tv API and am working out my query string. To get the status of each user, is it possible to make only one call to the API rather than create a request for each user?
Ken Haduch
@khaduch
Oct 24 2016 11:45
@Gare24 - this might be helpful, at least it's a place to look at for some kind of inspiration. On the w3schools pages, in their bootstrap section, they have a section on "themes", where they walk through the design and implementation of some pages, some of which would make a nice portfolio page. It does use Bootstrap, which you may or may not want to use, but you can see how a page is designed and implement. http://w3schools.com/bootstrap - look for the "Themes", and if you are using bootstrap, individual elements are covered through lessons, as well. (I posted this in the code review chat, as well.)
Kerry L Moss Jr
@klmjr314
Oct 24 2016 11:56
Hey all so I am at my first project!!! super excited !! anyway I want to use atom instead of codePen. I was thinking to use atom to write it then transfer it into codepen, I have no idea who to ask for permission for something like that. Any advice?
Paul
@gp22
Oct 24 2016 11:57
@klmjr314 Go for it!
Kerry L Moss Jr
@klmjr314
Oct 24 2016 11:57
ok thanks paul :)
Paul
@gp22
Oct 24 2016 11:58
That’s how I just finished my portfolio page. Edited it in Atom and uploaded to codepen
Gare24
@Gare24
Oct 24 2016 11:58
@khaduch thanks i will see
CamperBot
@camperbot
Oct 24 2016 11:58
gare24 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1826 | @khaduch |http://www.freecodecamp.com/khaduch
catalin560
@catalin560
Oct 24 2016 11:58
Hello
can someone tell me how to approach the https://www.freecodecamp.com/challenges/build-a-javascript-calculator challenge?
I need some tips for how to make the JS code as simple as possible
Ken Haduch
@khaduch
Oct 24 2016 12:00
@klmjr314 - it's fine to use any editor that you want, and develop locally. Just be aware that making the transfer to codepen is not straightforward, as there is a proper way to partition everything into the codepen interface to correctly use their system. But you can certainly do things that way, if you want to go through the extra pain. Also, I have seen people posting their code in github, but that is also a little difficult to provide help for, at least I find that to be the case. CodePen is a nice environment for the normal flow here.
Annu Nirmal
@annunirmal
Oct 24 2016 12:02
is there no other method than js to remove background box of input . i want to plain my input background
http://codepen.io/nirmalannu/pen/pEGRgN
Japneet Singh
@japsuchiha
Oct 24 2016 12:03
http://codepen.io/designercoder123/pen/kkVkaj
i am working on this artboard but my toggle isn't working. i need help!!
Cameron Burkholder
@Cameron-Burkholder
Oct 24 2016 12:05
I'm working on TIC TAC TOE, and the setup of my code works, but when I go to actually start the game playing functions, none of my checkpoint code (console.logs, $("#").html("SOMETHING)...) works.
http://codepen.io/CameronBurkholder/pen/WGkELZ
Greg Duncan
@GregatGit
Oct 24 2016 12:10
@Cameron-Burkholder setAttribute is not a function ln 11
Japneet Singh
@japsuchiha
Oct 24 2016 12:27
@gofighting123 thanks for the help but i was able to resolve just had to change the positioning of some lines. smile:
CamperBot
@camperbot
Oct 24 2016 12:27
designercoder123 sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
:cookie: 309 | @gofighting123 |http://www.freecodecamp.com/gofighting123
走你飛艇
@gofighting123
Oct 24 2016 12:29
@designercoder123 and the last line
//$("input[type= range]").change(changeColor);
i remark it bcz it freezed...
@designercoder123 u called changeColor inside of function changeColor....
@designercoder123 u should $("input[type=range]").val(6); // sets value to 6 for each of ur input range
Japneet Singh
@japsuchiha
Oct 24 2016 12:34
all is working now :smile: thanks
走你飛艇
@gofighting123
Oct 24 2016 12:34
@designercoder123 :smile:
@designercoder123 good job :+1:
rh429
@rh429
Oct 24 2016 12:37
hi, could anyone tell me what is wrong with this? Why can the 2 divs not be aligned in the same line?<body>
<div class="row" id="navigation">
<div class="col-xs-12">
<div class="col-xs-1 col-xs-offset-1"><a href="#">My Name</a>
</div>
<div class="col-xs-4 col-xs-offset-7"><a href="#">Home</a>
<a href="#">About</a>
<a href="#">Portfoio</a>
<a href="#">Content</a>
</div>
</div>
</div>
走你飛艇
@gofighting123
Oct 24 2016 12:37
@designercoder123 seems the problem is
$("#showColor").css("background-color", "rgb("+ one +","+ two +", " + three + ")"); :clap:
Japneet Singh
@japsuchiha
Oct 24 2016 12:39
@gofighting123 no that was not the problem. the problems were 1) change(changeColor()); --> change(changeColor); 2) called the function changeColor function after the toggle function.
走你飛艇
@gofighting123
Oct 24 2016 12:42
@designercoder123 OK @@
Adam Pasternack
@apasternack
Oct 24 2016 12:45
goodmorning
Did anyone run into a problem with getting an AJAX get or getJSON to work in codepen?
I have my quote generator working locally on my computer and on a local webserver
but when I copy the same code over to codepen and add the JQuery import, my button does not do anything.....hmmm
走你飛艇
@gofighting123
Oct 24 2016 12:47
@apasternack CORS problem? Cross Origin Requests problem
@apasternack did you check the console of your browser?
Annu Nirmal
@annunirmal
Oct 24 2016 12:55
can anyone help me figure out why my input value are not in font play
http://codepen.io/nirmalannu/pen/pEGRgN
Adam Pasternack
@apasternack
Oct 24 2016 12:56
@gofighting123 Thanks....
CamperBot
@camperbot
Oct 24 2016 12:56
:cookie: 310 | @gofighting123 |http://www.freecodecamp.com/gofighting123
apasternack sends brownie points to @gofighting123 :sparkles: :thumbsup: :sparkles:
Adam Pasternack
@apasternack
Oct 24 2016 12:56
what would I be looking for in the console?
proper request headers?
走你飛艇
@gofighting123
Oct 24 2016 12:58
@apasternack nope , codepen doesn't allow use CORS request...u should use webservice like https://crossorigin.me/ ?
@annunirmal ....
Annu Nirmal
@annunirmal
Oct 24 2016 12:59
sounds interesting +1:
走你飛艇
@gofighting123
Oct 24 2016 13:02
@annunirmal setting=>behavior...Auto-Updating Preview and checked...it :smile:
Annu Nirmal
@annunirmal
Oct 24 2016 13:03
nice
@gofighting123 i like it
:)
走你飛艇
@gofighting123
Oct 24 2016 13:03
@annunirmal it's ok....
Annu Nirmal
@annunirmal
Oct 24 2016 13:45
any idea how to style up and down button in <input type="number"
http://codepen.io/nirmalannu/pen/pEGRgN
KonSal
@KonSal
Oct 24 2016 13:58
@annunirmal you're not allowed to change with CSS the styling of the arrows.
Annu Nirmal
@annunirmal
Oct 24 2016 13:59
@KonSal oh! then how? js?
KonSal
@KonSal
Oct 24 2016 14:02
@annunirmal nope, you simply can't. the only work-around is to make pseudo-elements and place them above the predefined arrows, but that would be tricky and a waste of time.
Annu Nirmal
@annunirmal
Oct 24 2016 14:03
@KonSal i saw few examples but they are quite lengthy
like this one
and this one
KonSal
@KonSal
Oct 24 2016 14:05
yeah, they're using work-around just for Chrome/Mozilla browsers. Can be done, but would be unnecessary for you to get into all that trouble.
Adhetya Narayan
@Adhetya
Oct 24 2016 14:25
How do I create a bootstrap scrollspy?
Suzanne Atkinson
@AdventureBear
Oct 24 2016 14:27
@CatalinScr best to get some working code first, then ask for help refactoring. What have you tried so far?
Spyrantis Theodoros
@thodorisanta
Oct 24 2016 14:30
https://codepen.io/FreeCodeCamp/full/wGqEga/
freecodecamp's example^^
im working on the "Build a Wikipedia Viewer" and i did the first thing with the random wiki page but im completely lost with the other one.can you help me out?
Raga Putra Pratama
@raga22
Oct 24 2016 15:02
hello everyone, i want ask. Why my local weather app wont runing in google chrome ?
KonSal
@KonSal
Oct 24 2016 15:03
@raga22 you can't get geolocation or something else?
Simon Cordova
@gbsimon87
Oct 24 2016 15:03
@raga22 its because of the navigator settings...
Try using an api that gets your latitude and longitude, then apply those values to your weather api
Raga Putra Pratama
@raga22
Oct 24 2016 15:04
@KonSal yeah i cant get geolocation
@gbsimon87 owh like ipinfo.io ?
KonSal
@KonSal
Oct 24 2016 15:04
@raga22 one way is to estimate location from IP, just like @gbsimon87 said.
Simon Cordova
@gbsimon87
Oct 24 2016 15:05
ipinfo is known for malware
KonSal
@KonSal
Oct 24 2016 15:05
sometimes it's way off, for example my IP is about 700 Km away from where I am, but still
Simon Cordova
@gbsimon87
Oct 24 2016 15:05
Magnus
@magnus195
Oct 24 2016 15:05
hey guys
KonSal
@KonSal
Oct 24 2016 15:06
@raga22 http://ip-api.com/ is way better
Simon Cordova
@gbsimon87
Oct 24 2016 15:06
hey @magnus195
KonSal
@KonSal
Oct 24 2016 15:06
hiya @magnus195
Magnus
@magnus195
Oct 24 2016 15:06
whats up
Raga Putra Pratama
@raga22
Oct 24 2016 15:06
@KonSal @gbsimon87 oke thanky guys, i will try
CamperBot
@camperbot
Oct 24 2016 15:06
raga22 sends brownie points to @konsal and @gbsimon87 :sparkles: :thumbsup: :sparkles:
:cookie: 358 | @gbsimon87 |http://www.freecodecamp.com/gbsimon87
:cookie: 381 | @konsal |http://www.freecodecamp.com/konsal
Magnus
@magnus195
Oct 24 2016 15:07
btw my ip have been in another country
KonSal
@KonSal
Oct 24 2016 15:07
@magnus195 second day struggling with my Simon Says app, still can't find my bug :P
Simon Cordova
@gbsimon87
Oct 24 2016 15:08
@raga22 np buds!
Magnus
@magnus195
Oct 24 2016 15:09
@KonSal JS seems so hard :joy:
KonSal
@KonSal
Oct 24 2016 15:10
@magnus195 never had such a big problem as this time, and nobody is willing to help as well, cause it's kinda complicated. so, I'm struggling :P
Magnus
@magnus195
Oct 24 2016 15:12
Thats why i cheat on tests, i think even x in math looks complicated (my next math test). I hope i dont forget it on the test
KonSal
@KonSal
Oct 24 2016 15:12
lel
Magnus
@magnus195
Oct 24 2016 15:14
normally its x + 2 = 4 or somthing very easy, while we get long ones that make no sense like (2x +4) * 7 : (9x + 23 -2)
KonSal
@KonSal
Oct 24 2016 15:16
c'mon, if you wanna code you better like math :D at least those basics
Magnus
@magnus195
Oct 24 2016 15:18
Math is one of the most fun subjects at school, its still boring though
and also math is one of the subjects im best at
i got the highest grade in the class on 2 test in a row
one of them are national tests which is knows to be hard
thats why my class average is 3
KonSal
@KonSal
Oct 24 2016 15:21
@magnus195 well done :)
Magnus
@magnus195
Oct 24 2016 15:21
im kinda proud of it since mt german sucks
my*
People say german is so similar to norwegian,ITS NOT
Suzanne Atkinson
@AdventureBear
Oct 24 2016 15:29
@KonSal what kind of trouble with Simon?
JD Tadlock
@jdtdesigns
Oct 24 2016 15:31
@annunirmal Simplest way is to create the input buttons yourself and just attach listeners to raise or lower the input value on button press
KonSal
@KonSal
Oct 24 2016 15:38
@AdventureBear i have a bug that's preventing me from continuing with the rest of my fixes, improvements. wanna show you my codepen?
Moses
@mb432
Oct 24 2016 16:16
Can we use another editor besides codepen, maybe Atom?
For some reason my code doesn't work on CodePen, but it works on Atom. I was up all night trying to make it work on CodePen and nothing worked. I tried Atom this morning and my code was correct.
Jason Luboff
@JLuboff
Oct 24 2016 16:19
@mb432 You just need to be able to provide a link to a hosted version, whether thats on codepen or some where else is your choice. However, Codepen is FCC prefered host
@mb432 Did you make sure to Add the frameworks you were needing in Codepen?
Moses
@mb432
Oct 24 2016 16:20
Ooh okay, thank you @JLuboff for that.
CamperBot
@camperbot
Oct 24 2016 16:20
mb432 sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:cookie: 411 | @jluboff |http://www.freecodecamp.com/jluboff
Moses
@mb432
Oct 24 2016 16:20
I'm sorry I'm still new, frameworks?
Jonathan Doliver
@porygonj
Oct 24 2016 16:21
jQuery, Bootstrap, etc.
Jason Luboff
@JLuboff
Oct 24 2016 16:21
@mb432 Ya, you need to "call" to frameworks (like bootstrap, jquery, etc)
Moses
@mb432
Oct 24 2016 16:23
Ooh okay, I getcha you. I was trying to use plain HTML, but that's pretty hard to do.
I didn't want to get to fancy.
I just don't understand why even Notepad is doing everything that I want it to do, but CodePen won't. Here is an example:
<hr size="10" background color="black">
JD Tadlock
@jdtdesigns
Oct 24 2016 16:27
@mb432 I'd go to codecademy and take the html/css course. I think you're struggling with some basics. ;)
Jason Luboff
@JLuboff
Oct 24 2016 16:28
HR is not supported in HTML5, which I believe Codepen uses
(well the size attribute...we'd want to use CSS instead)
JD Tadlock
@jdtdesigns
Oct 24 2016 16:30
@mb432 And if you're styling inline it would be <hr size="10" style="background-color: black">
Moses
@mb432
Oct 24 2016 16:31
@jdtdesigns I learn by repetition because I ran through all those challenges pretty quick, but I usually have to go over the material to engrave it in my brain. I'm doing read-search-ask. If you don't want to help that's fine, but once again the code is working in NotePad.
@jdtdesigns your code didn't even work either.
JD Tadlock
@jdtdesigns
Oct 24 2016 16:33
@mb432 Never take my comments as an insult. We're only trying to help. Post your codepen, because my code is correct and works fine.
Moses
@mb432
Oct 24 2016 16:34
I'll figure it out, I always do. Thought I would get some help here, but I guess not.
JD Tadlock
@jdtdesigns
Oct 24 2016 16:34
@mb432 lol, just post your codepen so we can see the issue
Jonathan Doliver
@porygonj
Oct 24 2016 16:44
I'm trying to do the Twitch API project, but there seems to be no property for the profile icons of users who aren't streaming. I'm just using an array of response objects instead of using the actual API. https://gist.github.com/QuincyLarson/2ff6892f948d0b7118a99264fd9c1ce8
karocann
@karocann
Oct 24 2016 16:44
Is the twitch server currently up and running? I'm having some trouble getting a response from my JSON queries using the modified base URL for twitch.tv:
https://wind-bow.hyperdev.space/twitch-api
Anders
@Skretch
Oct 24 2016 16:46
{
coord: {
lon: 9.75,
lat: 59
},
weather: [
{
id: 500,
main: "Rain",
description: "light rain",
icon: "10d"
}
],
base: "stations",
main: {
temp: 280.928,
pressure: 1034.19,
humidity: 100,
temp_min: 280.928,
temp_max: 280.928,
sea_level: 1038.56,
grnd_level: 1034.19
},
wind: {
speed: 8.82,
deg: 47.0007
},

I am trying to access main inside weather which inside an object called data. Can any of you see anything I have done wrong?

jQuery.getJSON(url + lat +  "&lon=" + lon + "&APPID=" + appID, function(data){
        $("#locationP").html(data.name);
        $("#temp").html(Math.round(data.main[0].temp) - 273 + "C");
        $("#weather").html(data.weather[0].main);
        $("#wind").html(data.wind.speed + " M/S")
      });

http://codepen.io/Skretch/pen/ZpqoOE

karocann
@karocann
Oct 24 2016 16:46
@porygonj Jonathon, I'm on the twitch challenge also. What URL did you use to get the response you just posted?
Jason Luboff
@JLuboff
Oct 24 2016 16:46
@porygonj When I did the Twitch project, I had to make two API calls. One to https://api.twitch.tv/kraken/channels/ and one to https://api.twitch.tv/kraken/streams I got the logo from channels
karocann
@karocann
Oct 24 2016 16:47
@JLuboff But the latest mod says not to use Kraken?
Jason Luboff
@JLuboff
Oct 24 2016 16:47
@karocann I did the project a bit ago, so I haven't looked at it recently except to add the clientID
JD Tadlock
@jdtdesigns
Oct 24 2016 16:47
@porygonj You need the channel response to get the offline logo and the stream response for online images.
Jonathan Doliver
@porygonj
Oct 24 2016 16:48
@karocann Unfortunately, I'm just using a list of premade responses. It looks like I'll have to use actual API calls to get the responses I need, though.
karocann
@karocann
Oct 24 2016 16:48
@JLuboff The new work-around ( due to rate limiting) changed the calls quite a bit.
JD Tadlock
@jdtdesigns
Oct 24 2016 16:49
@porygonj A list of premade responses?
@karocann The reason you might not be getting responses is they require an access id now.
Michael Davis
@mhdavis
Oct 24 2016 16:50
Silly question: how do you get font awesome on codepen? I know you have to copy the link for font awesome into your html but what path do you specify?
karocann
@karocann
Oct 24 2016 16:51
@jdtdesigns Is access ID the same as an API key?
Jason Luboff
@JLuboff
Oct 24 2016 16:51
@mhdavis You have to get a link from FontAwesome (they email it to you) and then you include that in the HTML settings under "Stuff for <head>"
JD Tadlock
@jdtdesigns
Oct 24 2016 16:51
yes
@mhdavis Just go to Settings->CSS and start typing font-awesome in the input blocks
Jason Luboff
@JLuboff
Oct 24 2016 16:52
@mhdavis It will be something like <script src="https://use.fontawesome.com/yourid.js"></script>
JD Tadlock
@jdtdesigns
Oct 24 2016 16:52
you see it come up
Jason Luboff
@JLuboff
Oct 24 2016 16:52
Or do what JD said. Didn't realize Codepen had that
karocann
@karocann
Oct 24 2016 16:53
@jdtdesigns Interesting. In the UPDATE section on the challenge page, it specifically states that an API key is no longer necessary. It sounds like the modified URL is specifically designed to be used with FCC.
JD Tadlock
@jdtdesigns
Oct 24 2016 16:53
@Skretch You need to use an ip locator for chrome and navigator for other browsers.
Anders
@Skretch
Oct 24 2016 16:55
@jdtdesigns ? Everything is working I get an object with the data in respons but I can't seem to access the variable main in weather
Michael Davis
@mhdavis
Oct 24 2016 16:55
@jdtdesigns @JLuboff thanks
CamperBot
@camperbot
Oct 24 2016 16:55
mhdavis sends brownie points to @jdtdesigns and @jluboff :sparkles: :thumbsup: :sparkles:
:cookie: 412 | @jluboff |http://www.freecodecamp.com/jluboff
:cookie: 718 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Anders
@Skretch
Oct 24 2016 16:56
thats the only problem, I changed the codepen.io url to https so that navigator worked in chrome
JD Tadlock
@jdtdesigns
Oct 24 2016 16:56
@karocann The hard coded example isn't actual api data, it's just static code. To access the API, you do need an access ID now.
karocann
@karocann
Oct 24 2016 16:59
OK. So I need to use the modified URL with an API key?
JD Tadlock
@jdtdesigns
Oct 24 2016 16:59
@Skretch You need to access it with json.weather[0].main
karocann
@karocann
Oct 24 2016 17:01
When making a JSON call is .stream part of teh JSON language?:
$.getJSON(url, function(data1){
if(data1.stream === null){
JD Tadlock
@jdtdesigns
Oct 24 2016 17:02
@karocann I just looked at the challenge instructions. To use the bypass url, you just do it like this https://wind-bow.hyperdev.space/twitch-api/channels/freecodecamp
replace 'channels' with 'streams' to get live streams info
Anders
@Skretch
Oct 24 2016 17:03
@jdtdesigns That doesn't seem to work. If you look at line 12 in the codepen you can see that, that is already how I am doing it data.weather[0].main. That should be correct or did I miss understand you ?
JD Tadlock
@jdtdesigns
Oct 24 2016 17:06
@Skretch Lol, just noticed you spelled weather wrong in your id
Michael Davis
@mhdavis
Oct 24 2016 17:08
@jdtdesigns there isn't a quick load in the css for FA; only animate, foundation and boostrap
karocann
@karocann
Oct 24 2016 17:08
@jdtdesigns Thanks! That was where I was stuck...
CamperBot
@camperbot
Oct 24 2016 17:08
karocann sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 719 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Oct 24 2016 17:08
@mhdavis What're you trying to do? If you need the icons, you just need the css.
Michael Davis
@mhdavis
Oct 24 2016 17:10
im trying to add a spinner
JD Tadlock
@jdtdesigns
Oct 24 2016 17:10
you just need the css for that @mhdavis
Michael Davis
@mhdavis
Oct 24 2016 17:11
what do you mean when you say you just need the css?
like just include fa-spinner in the html and include it in the css
adjust the settings for it in the css i mean
Anders
@Skretch
Oct 24 2016 17:12
@jdtdesigns LOL xD Thanks :P so much trouble for such a little thing :P
CamperBot
@camperbot
Oct 24 2016 17:12
skretch sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 720 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
@Skretch Welcome ;)
Michael Davis
@mhdavis
Oct 24 2016 17:13
okay gotcha so just include the link in the html (or in the case of codepen, add it to the css tab)
JD Tadlock
@jdtdesigns
Oct 24 2016 17:14
css tab for codepen
Michael Davis
@mhdavis
Oct 24 2016 17:15
that fixed it thanks!
Thinh Cao
@tcao2
Oct 24 2016 17:16
Hello all. I am finishing up my "Random Quote Machine" project, but I cannot seem to add the part "#quotes" at the end of the tweet when the retweet button is pressed. I read the official document from twitter and it told me to add "hashtags=quote" to the link. It does not work. Please give me some pointers
thank you so much in advance
Michael Davis
@mhdavis
Oct 24 2016 17:18
@jdtdesigns one other thing how do I get it so that when I'm hovering over the <a>, and not just specifically the twitter icon it changes color
.fa-twitter {
  color: white;
}

.fa-twitter:hover {
  color: black;
}
o i think I have an idea
Eric Gossick
@egossick
Oct 24 2016 17:22
any suggestions on getting my Portfolio Webpage started? Seems over whelming for what little I have learned. Even if I copied the code I don't know what a lot of it is doing....need some simpler ways to start. thanks!
danielle5
@danielle5
Oct 24 2016 17:22
can any1 tell me what this means - Are you developer @ desktop level or Server Level?
are they asking front end or back end?
Eric Gossick
@egossick
Oct 24 2016 17:22
server is likely back end
while desktop would be front end
danielle5
@danielle5
Oct 24 2016 17:23
thought so, just hadn't seen it worded like that before
Eric Gossick
@egossick
Oct 24 2016 17:23
odd way of saying it though
danielle5
@danielle5
Oct 24 2016 17:23
:) thanks Eric
Eric Gossick
@egossick
Oct 24 2016 17:23
same here...new to me
np sir!
Spyrantis Theodoros
@thodorisanta
Oct 24 2016 17:24
can i get some help on the wikipedia viewer project?
JD Tadlock
@jdtdesigns
Oct 24 2016 17:28
@tcao2
tweetBtn.addEventListener("click", function(){
  var myURL = "https://twitter.com/intent/tweet?hashtags=quotes&text=" + quote_content.innerText; 
  window.open(myURL);
});
Thinh Cao
@tcao2
Oct 24 2016 17:33
that works. Thank you so much @jdtdesigns
CamperBot
@camperbot
Oct 24 2016 17:33
tcao2 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 721 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Alex Dobre
@Zerelt
Oct 24 2016 17:35
Hi ! Anybody online that's comfortable with react ? I'm working on a personal react project ( a countdown list ) on codepen and I have a problem that I simply cannot understand ... i have ONE setState in componentDidUpdate that's supposed to get the inputed time in miliseconds, but it will not update the state. the variable works, it gets the inputed time in miliseconds correctly but the setState(timeInput: milisecondsVarialbeHere) just is not changing the state on just THAT particular state; if i put anyother state in that set.State , it works. Would anybody want to take a look :) (it's on line 466-468) ?
karocann
@karocann
Oct 24 2016 17:37
I am trying to place an href tag on on my twitch page that shows the status of freecodecamp, but I can't seem to get it to show up. The URL works, the HTML looks good, but I can't find my error. Can you help?
http://codepen.io/stmoen/pen/RGYKxg?editors=1011
Durga Prasad Yadav
@durga369
Oct 24 2016 17:40
Your a element should be a dead link with a href attribute set to "#".
is any one can help me with this.
you need to return jsonp with codepen
karocann
@karocann
Oct 24 2016 17:48
Right. Forgot the callback. Appreciate it.
j1417
@j1417
Oct 24 2016 17:52
hi!! how can i make a circle button??
j1417
@j1417
Oct 24 2016 18:44
hi!! i have three wells in my page and one has a margin and the others no.... but i dont understand why ... i created them copying each other
Magnus
@magnus195
Oct 24 2016 18:48
put all the wells in the same container-fluid and row
@j1417
j1417
@j1417
Oct 24 2016 18:50
@magnus195 just one row??
Magnus
@magnus195
Oct 24 2016 18:51
Yeah, rows go horizontally, but two or three rows goes vertically
j1417
@j1417
Oct 24 2016 18:53
but i want wells one below the other...¿
@magnus195
Marko Rajkovic
@marko88ks
Oct 24 2016 18:53
responsive when it comes to a website, whether it be moving from a maximum width to a minimum or at minimum to the maximum width ?? sorry my english is not that good :)
Magnus
@magnus195
Oct 24 2016 18:55
@j1417 Your margin is set to 0.
.well{
  margin:0px; 
  width:5px;
  padding:100px;
}
j1417
@j1417
Oct 24 2016 18:59
hi!! how can i adjust the width of the wells to full page??https://codepen.io/Juan1417/pen/BLrjOY
Magnus
@magnus195
Oct 24 2016 19:01
width:100%;
@j1417
j1417
@j1417
Oct 24 2016 19:09
thanks @magnus195
CamperBot
@camperbot
Oct 24 2016 19:09
j1417 sends brownie points to @magnus195 :sparkles: :thumbsup: :sparkles:
:cookie: 122 | @magnus195 |http://www.freecodecamp.com/magnus195
Tyler Moeller
@TylerMoeller
Oct 24 2016 19:09
@j1417 Remove your .well in your css and do this:
  <div class="row well">
    <div class="col-xs-9">
      <p>Informatics Engineering student at National University of la Matanza, Argentina.</p>
    </div>
    <div class="col-xs-3">
      <img src="https://x1.xingassets.com/assets/frontend_minified/img/users/nobody_m.original.jpg" class="img-responsive img-circle">
    </div> 
  </div>
Magnus
@magnus195
Oct 24 2016 19:10
@j1417 no problem
j1417
@j1417
Oct 24 2016 19:37
hi im doing the portfile project....how can i send a email in the form???
Magnus
@magnus195
Oct 24 2016 19:40
@j1417 I think you need php for that. There are websites where you dont need a php server like 123contactform.com
But you can create a mailto: button which sends the user to their email client so he/she can send an email from there
Sorin Ruse
@sorinr
Oct 24 2016 19:47
@j1417 if you want you can add in the form action="mailto:youremail@adress.com" that will open the implicit email client of the user withyour email already filled in
@magnus195 lol. haven't seen your post
Magnus
@magnus195
Oct 24 2016 19:49
@sorinr what post
karocann
@karocann
Oct 24 2016 19:49
Working on twitch and trying to get a list of users using the documentation provided at
https://github.com/justintv/Twitch-API/blob/master/v3_resources/follows.md#get-channelschannelfollows
I cannot get the list of users to show up in a console.log statement. Can anyone help? See JS lines 12-17
http://codepen.io/stmoen/pen/RGYKxg?editors=0011
Michael Davis
@mhdavis
Oct 24 2016 19:49
does anyone have an api for the local weather app?
Sorin Ruse
@sorinr
Oct 24 2016 19:50
@magnus195 the one above with mailto:
Magnus
@magnus195
Oct 24 2016 19:50
@sorinr oh :joy:
@mhdavis just find one on google, like weather.com
Sorin Ruse
@sorinr
Oct 24 2016 19:52
@magnus195 you suggested to use a button. if he uses a form then just add that as an action and the submit button will call it
Michael Davis
@mhdavis
Oct 24 2016 19:52
I know I was just wondering if there were any specific APIs that were nice to work with
Magnus
@magnus195
Oct 24 2016 19:53
I know one api but it only works in very few countries
And it doesn't have farenheit
And its Norwegian so country names will appear in Norwegian
Gopherine
@gopherine
Oct 24 2016 19:58
Hi there https://codepen.io/atharvajava/pen/yakgxP?editors=1000 i am creating responsive navbar there but when i am making the screen small all the icons dissappear and that button doesnt work as a dropdown stuff can anyone guide me what i am doing wrong here
oops nvm thanks i forgot to add Jquery :O
Sorin Ruse
@sorinr
Oct 24 2016 20:00
@karocann your url https://wind-bow.hyperdev.space/twitch-api/channel/follows is wrong try to replace "channel" with the actual channel like https://wind-bow.hyperdev.space/twitch-api/freecodecamp/follows
j1417
@j1417
Oct 24 2016 20:02
thanks @sorinr @magnus195
CamperBot
@camperbot
Oct 24 2016 20:02
j1417 sends brownie points to @sorinr and @magnus195 :sparkles: :thumbsup: :sparkles:
:warning: j1417 already gave magnus195 points
:cookie: 788 | @sorinr |http://www.freecodecamp.com/sorinr
karocann
@karocann
Oct 24 2016 20:02
@sorinr I guess I don't understand channels in this context very well. Could you give a short explanation?
j1417
@j1417
Oct 24 2016 20:02
hi!! how can i create a button that takes me to the top of the page???
Magnus
@magnus195
Oct 24 2016 20:04
Use an id on your main doc and use an a tag to link to that id (#WHATEVERYOURIDIS)
Sorin Ruse
@sorinr
Oct 24 2016 20:05
@karocann sorry. this is the right url: https://wind-bow.hyperdev.space/twitch-api/channels/freecodecamp/follows
@karocann using this api call u find who is following freecodecamp channel if this is what you want
j1417
@j1417
Oct 24 2016 20:08
@magnus195 and if i want that the button go up and down when i scroll up and down ??
Magnus
@magnus195
Oct 24 2016 20:09
@j1417 what
Freddie O
@FreddieFO
Oct 24 2016 20:09

Hi guys please I need help with the random quote generator project. My code is here: http://codepen.io/freddiefo/pen/xEBwVP

I need to get dynamically loaded html (where the random quotes are meant to appear) and assign to a variable so I can link it to the twitter “data-text” share button. I want to be able to press the tweet button and tweet whatever quote has been generated!

j1417
@j1417
Oct 24 2016 20:09
@magnus195 the button is like fixed
the button is always at bottom left in the window
Magnus
@magnus195
Oct 24 2016 20:11
If you want to center it you can use text-align: center;
karocann
@karocann
Oct 24 2016 20:12
@sorinr My understanding is that fcc is one of the users, not a channel based on the array of users given on the challenge page. I am trying to get a list of all users currently online.
http://codepen.io/stmoen/pen/RGYKxg?editors=0011
Sorin Ruse
@sorinr
Oct 24 2016 20:14
@karocann you mean all the streamers that are online?
karocann
@karocann
Oct 24 2016 20:16
@sorinr yes - the ones that are currently using any of the channels (or is streams?)
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:18
Hello World!
CamperBot
@camperbot
Oct 24 2016 20:18

welcome to FreeCodeCamp @NitinNair89!

Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:18
:blush:
Using gitter on phone. I will be online for sometime. :)
@karocann was that you who had issues with twitch TV? Someone had just commented on my reply in the forums.. :)
j1417
@j1417
Oct 24 2016 20:20
hi!! how can i make a a button like the on in this page that is alway bottom left in the page https://codepen.io/FreeCodeCamp/full/YqLyXB/
karocann
@karocann
Oct 24 2016 20:21
@NitinNair89 I've been having issues with twtich, but my conversation has been with Sorin Ruse.
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:22
Oh Ok @karocann . I thought it was you who commented. Someone similar to your username. Sorry!
karocann
@karocann
Oct 24 2016 20:22
@sorinr Are streamers the same as users?
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:23
@j1417 Do you want to create the bottom right button which scrolls to the top of the page?
j1417
@j1417
Oct 24 2016 20:24
yes! @NitinNair89
Magnus
@magnus195
Oct 24 2016 20:24
I think he can use text-align: right;
j1417
@j1417
Oct 24 2016 20:24
sorry i said left @NitinNair89
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:25
@j1417 NP! Assign the button a fixed position and add some pixels to bottom and right in your CSS

.btn {position:fixed; right:5px; bottom:5px;}
The button should actually be an anchor tag with href attribute pointing to the "Id" of the element wherever you want to scroll. @j1417
Tony Miri
@TonyMiri
Oct 24 2016 20:28
Hey everyone. I've been away from coding for a while and just getting back into it so I'm trying to finish up my weather app. Having a little trouble figuring out how to do something without declaring a global variable. If anyone has time I would appreciate some quick input. Thanks.
j1417
@j1417
Oct 24 2016 20:28
thanks @NitinNair89
CamperBot
@camperbot
Oct 24 2016 20:28
j1417 sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 303 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:28
Welcome! :+1:
@FatTone225 why do you need a global variable?
Tony Miri
@TonyMiri
Oct 24 2016 20:32
I've got one function called getweather() that handles my API calls and assigns the data to variables and updates my HTML. In order to do the F/C button I think I have to put that function outside my getweather() function. That would mean that I'd have to call getweather() again every time the button is clicked, but I don't really want to do that for a couple reasons. 1. In order to get my data I had to do a nested API call, so each call is actually 2 calls. And number two is that getweather() already retrieves the data I need.
So if I made a global variable I could store the Celsius data outside of getweather() and update the HTML every time the button is clicked without calling the API again.
KonSal
@KonSal
Oct 24 2016 20:34
@FatTone225 why making another API call? just change the inner HTML to covert back and forth.
convert*
Tony Miri
@TonyMiri
Oct 24 2016 20:35
@KonSal Right now everything happens inside getWeather() which is called once when the page loads
So in order to use that data I'd have to have the button functionality inside getWeather(), but I don't think that will work since it only runs one time when the page loads
Or would it?
KonSal
@KonSal
Oct 24 2016 20:38
@FatTone225 Well, you can store the api data on global variables and then change them in whatever way you want to.
Tony Miri
@TonyMiri
Oct 24 2016 20:39
Right. I was just trying to avoid global variables since from what I understand it is considered to not be the best practice.
Gopherine
@gopherine
Oct 24 2016 20:39
https://codepen.io/atharvajava/pen/yakgxP?editors=1000 any idea how to unhide his head ?
KonSal
@KonSal
Oct 24 2016 20:40
Just revisited my weather app and did what you did. I'm calling the API every time i change from imperial to metric system.
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:40
@FatTone225 once you retrieve all your necessary info from the API, you can calculate the temperatures in Celsius and Farenheit and store it as the content for two different <span> which are hidden on page load. On the click of button, pass the Id of <span> as argument and hide/show them. I haven't seen your codepen yet, but you can position the span on top of the other so that it gives the desired effect of temperature conversion.
Tony Miri
@TonyMiri
Oct 24 2016 20:41
@KonSal Ah. lol. Common problem then. @NitinNair89 Very very clever sir.
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:41
@atharvajava is the head visible without the navbar? If yes, then add some margin-top to that image
KonSal
@KonSal
Oct 24 2016 20:42
@atharvajava
img {
  margin-top: 150px;
}
Gopherine
@gopherine
Oct 24 2016 20:42
@NitinNair89 i tried adding margin top and yes it is visble without nav and margin-top is having no effect on it
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:42
@FatTone225 thank you :smiley: I just thought about it now .. Haha. I don't remember how I did it on my codepen
CamperBot
@camperbot
Oct 24 2016 20:42
nitinnair89 sends brownie points to @fattone225 :sparkles: :thumbsup: :sparkles:
:cookie: 364 | @fattone225 |http://www.freecodecamp.com/fattone225
Tyler Moeller
@TylerMoeller
Oct 24 2016 20:45
@atharvajava
body {
  padding-top: 70px;
}
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:45
@atharvajava remove the center-block class. I didn't see anything in your CSS on codepen
Gopherine
@gopherine
Oct 24 2016 20:45
@NitinNair89 @KonSal thanks and suddenly it started working -_- .... i guess may be my connection is bugging me
CamperBot
@camperbot
Oct 24 2016 20:45
atharvajava sends brownie points to @nitinnair89 and @konsal :sparkles: :thumbsup: :sparkles:
:cookie: 304 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
:cookie: 385 | @konsal |http://www.freecodecamp.com/konsal
Gopherine
@gopherine
Oct 24 2016 20:46
i added it earlier nitin that time it wasn't working now it is
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:46
:P
Haha great for you! :)
KonSal
@KonSal
Oct 24 2016 20:48
@atharvajava you had to press Run to see the CSS change for some reason, no live updating
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:49
Maybe due to his codepen settings
KonSal
@KonSal
Oct 24 2016 20:49
Ok, I have a challenge for you! Who wants to review my Simon Says app and find a bug that is driving me crazy? :P
Gopherine
@gopherine
Oct 24 2016 20:49
-_- @KonSal i know that XD
not now i am so tired its 2:20 am i need to go to work as well i dk how i will do java stuff tommorow ;-;
KonSal
@KonSal
Oct 24 2016 20:50
Ohh, it's fine :)
I'll just leave my codepen here for anyone who wants to have a look!
The bug i'm trying to kill is:
If you start a game, then press stop and start again, the score is jumping in (N+1)*2 steps, where N is the number of times you Stopped/Started again the game.
http://codepen.io/KonSal/pen/pgjozZ?editors=0010
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 20:55
@atharvajava night shift? Or sleepy? ;)
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 21:02
@KonSal Your score is not resetting properly
KonSal
@KonSal
Oct 24 2016 21:03
@NitinNair89 I can see it resetting properly in my console. But for some reason, after restarting, my getPlayerSequence function is getting called multiple times. Where did you spot an error?
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 21:04
Um also, once stopped the game sequence should reset. If I played 1 level and scored 1 and stopped. When I click play again, it should again start from level from. Currently it started from level 2 and gave me a score headstart of 1. This continues on..
*from level one.
So if I stop at say level 5 and restart, I would get a score of 5 and game will start at level 6 instead of level 1.
KonSal
@KonSal
Oct 24 2016 21:05
@NitinNair89 i can't replicate that. I'm always starting from Level 0 but then i jump at 2nd/3rd depending on how many times I stopped.
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 21:06
Ok.. I am using my phone right now. Can't do much on codepen!
KonSal
@KonSal
Oct 24 2016 21:06
@NitinNair89 oh oh, thanks for taking a look tho :)
CamperBot
@camperbot
Oct 24 2016 21:06
konsal sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 305 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 21:07
:)
What's the playsequence doing?
KonSal
@KonSal
Oct 24 2016 21:09
@NitinNair89 animating the current sequence and pushing to an array the expected player input to check afterwards.
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 21:11
Also did you try resetting the values inside else part? - which button===play again @KonSal
The play now is only first right? So if I stop this game and click play again, my scores and not reset, neither the sequence..
*are not reset
I think or reset should happen after click of stop game as well? - just forming my hypothesis. Sorry! @KonSal
Nitin Chandran Nair
@NitinNair89
Oct 24 2016 21:16
See you guys tomorrow. 3am here. All the best @KonSal :+1:
KonSal
@KonSal
Oct 24 2016 21:18
@NitinNair89 good night!
thx for the help!
Michael Davis
@mhdavis
Oct 24 2016 21:19
Anyone here use the Weather Underground API for their Weather App? I'm a little confused in terms of how to pull the data from the API
I got a key ID; I'm trying to figure out how to pull the correct data corresponding to someones location
KonSal
@KonSal
Oct 24 2016 21:22
@mhdavis you need to either use geolocation data or a second API, to get coordinates according to user's IP address
JD Tadlock
@jdtdesigns
Oct 24 2016 21:22
@mhdavis post the pen
Michael Davis
@mhdavis
Oct 24 2016 21:24
The pen is pretty empty at the moment, as I've been doing a lot of googling and video watching for api
@KonSal does the API auto recognize the IP from the person using it?
KonSal
@KonSal
Oct 24 2016 21:26
@mhdavis look at this: http://ip-api.com/
with that data, then you can call weather API for appropriate location
Michael Davis
@mhdavis
Oct 24 2016 21:26
@KonSal so do I have ot use that to pull the location information to then feed to the Wunderground API?
KonSal
@KonSal
Oct 24 2016 21:28
@mhdavis yep :)
Tyler Moeller
@TylerMoeller
Oct 24 2016 21:29
@mhdavis You only need one URL for location + weather with Wunderground: https://www.wunderground.com/weather/api/d/docs?d=data/geolookup&MR=1
The url is formatted: https://api.wunderground.com/api/Your_Key/geolookup/q/autoip.json
KonSal
@KonSal
Oct 24 2016 21:29
so you gotta use 2 different APIs
Tyler Moeller
@TylerMoeller
Oct 24 2016 21:29
@KonSal Nope :)
Michael Davis
@mhdavis
Oct 24 2016 21:30
Yea that is what I was wondering @TylerMoeller so you just need the key ID to activate the API, but it will use the geolookup to find the corresponding location
@KonSal your method works too; I was just unsure of how the geolookup worked
silver537
@silver537
Oct 24 2016 21:31
@jdtdesigns your code is so tiny! im jealous.
KonSal
@KonSal
Oct 24 2016 21:32
@mhdavis Yeah, apparently wunderground has a autoip function that my OpenWeatherMap API didn't. Even better!
Michael Davis
@mhdavis
Oct 24 2016 21:32
that simplifies things so now all I have to do is $.getJSON on that link and it should pull up everything correctly, I can test it by copy/pasting the link into chrome and making sure I get a JSON object
@KonSal its chill, your method works well for things that don't have as fancy a thing as geolookup
worth knowing in case I have to use it later
KonSal
@KonSal
Oct 24 2016 21:33
@mhdavis the less API calls the merrier :P
Michael Davis
@mhdavis
Oct 24 2016 21:33
basically lol
I just get really uptight about code that isn't clean and short depending on what you want it to do
so the less code in this instance the better
Ken Haduch
@khaduch
Oct 24 2016 21:37
@KonSal - looking at your simon game. I think that the problem has to do with the way your getPlayerSequence function works. I think that every time you invoke that function, you are adding a new click handler to your .playField classes, and those are not removed. You can probably restructure your code to make sure that you only do that function one time, either with a flag variable to indicate that the click handler is already set, or set the click handler outside of a function that you repeatedly call. I haven't tried to edit the code to see if I can prove that, but I think by analysis that is what is going on.
JD Tadlock
@jdtdesigns
Oct 24 2016 21:39
@silver537 I fixed an issue. http://jsbin.com/copafe/edit?js,output
silver537
@silver537
Oct 24 2016 21:40
@jdtdesigns the day right?
JD Tadlock
@jdtdesigns
Oct 24 2016 21:41
it was creating a div for today without any data, so i just removed it if there's no data
easy fix ;)
Ken Haduch
@khaduch
Oct 24 2016 21:41
@KonSal - yes, I think that that's it. I have an edited version that is much better behaved, but does my comment make sense to you?
silver537
@silver537
Oct 24 2016 21:42
@jdtdesigns is it cool if i save your code to study and use?
JD Tadlock
@jdtdesigns
Oct 24 2016 21:43
@silver537 Of course. That's what it's for
KonSal
@KonSal
Oct 24 2016 21:43
@khaduch trying to :P
silver537
@silver537
Oct 24 2016 21:43
@jdtdesigns thank you! :D
CamperBot
@camperbot
Oct 24 2016 21:43
silver537 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 722 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
snickerz
@snickerz
Oct 24 2016 21:44
http://codepen.io/snickerz/pen/JREmOK hope this works for tribute page?? if not help please
JD Tadlock
@jdtdesigns
Oct 24 2016 21:45
@snickerz It works for the concept, but it could use some styling. ;)
Jonathan Doliver
@porygonj
Oct 24 2016 21:46
It was working fine a few minutes ago... Anyone getting a 503 error on https://wind-bow.hyperdev.space/twitch-api ?
snickerz
@snickerz
Oct 24 2016 21:46
wanted to keep it simple :sparkles:
silver537
@silver537
Oct 24 2016 21:46
@jdtdesigns i had fixed my problem which let me take away the boxshadow. and i also changed the color a tiny bit.
http://codepen.io/Silver537/full/gwKvmg/
KonSal
@KonSal
Oct 24 2016 21:46
@khaduch actually, i tried a couple hours ago to have my click handler outside of the function but didn't make it work. But i'm guessing that's where the problem is. Thanks for your feedback :)
CamperBot
@camperbot
Oct 24 2016 21:46
konsal sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1827 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Oct 24 2016 21:46

@KonSal - my quick fix was to do this - slight modification to this part of your code:

  var clickOn = false;
  // Function that takes player input
  var getPlayerSequence = function() {
      // Play sequence up to the score point.
      playSequence();
      if (clickOn === false) {
        $('.playField').click(function() {
          // Animate user-pressed playing fields.
          playFieldId = $(this).attr('id');
          animateField(playFieldId);
          // If the last one is correct, proceed to next round.
          // Intoduces 1.5 second delay between rounds.
          if (playFieldId == thisRound[0] && thisRound.length === 1) {
            setTimeout(function() {
              thisRound.shift();
              score += 1;
              playFieldId = " ";
              playSequence();
            }, 1500);
            // Keep pushing till the last one.
          } else if (playFieldId == thisRound[0] && thisRound.length > 1) {
            thisRound.shift();
            playFieldId = " ";
          }

        });
      };
      clickOn = true;
    }

Just tracking if the click handler was added, and only allowing it to be added once.

KonSal
@KonSal
Oct 24 2016 21:48
@khaduch ahaaa! nice! imma implement it right away and let you know! :D Thanks again!
CamperBot
@camperbot
Oct 24 2016 21:48
konsal sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: konsal already gave khaduch points
Kelsey
@kcdilla
Oct 24 2016 21:48
Hello! I'm working on a responsiveness issue. When the picture next to the text moves below the text when the screen gets smaller, I want it to be centered but it isn't doing it. Suggestions? http://codepen.io/kcdilla/pen/RRWmbQ
JD Tadlock
@jdtdesigns
Oct 24 2016 21:49
@silver537 You can decrease the code by using an array for the weekdays instead of a switch
Kelsey
@kcdilla
Oct 24 2016 21:49
JK i forgot to do margin: auto on the image
KonSal
@KonSal
Oct 24 2016 21:49
@khaduch OMG you're my savior :D
Kelsey
@kcdilla
Oct 24 2016 21:49
it's fixed now.
KonSal
@KonSal
Oct 24 2016 21:49
@khaduch imma give you a comment credit for that.
Ken Haduch
@khaduch
Oct 24 2016 21:51
@KonSal - you're welcome. The funny thing is that I just found a similar thing on someone's pomodoro project not too long ago - once I started thinking about the behavior of your project, I remembered something similar from that... good luck finishing up - nice concept for your game! :)
KonSal
@KonSal
Oct 24 2016 21:57
@khaduch Thanks a lot for your kind words! :) Well, i guess our inexperience leads us to similar mistakes :P
CamperBot
@camperbot
Oct 24 2016 21:57
konsal sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: konsal already gave khaduch points
Tony Miri
@TonyMiri
Oct 24 2016 22:01
@NitinNair89 Took a little figuring out but works beautifully. Thanks again for the great idea!
CamperBot
@camperbot
Oct 24 2016 22:01
fattone225 sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 306 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
silver537
@silver537
Oct 24 2016 22:05
@jdtdesigns so on your code. you declared a data object, then you're adding properties with new data?
Michael Davis
@mhdavis
Oct 24 2016 22:16
@TylerMoeller you still around? I have a question about the API
Tyler Moeller
@TylerMoeller
Oct 24 2016 22:16
@mhdavis Sure, what's up?
Michael Davis
@mhdavis
Oct 24 2016 22:22
@TylerMoeller I popped the address into a browser and all it gives me is information about the location and surrounding locales but no info on the temperature and climate of the area
in they example they give on the page, they use the city and state
like that
Tyler Moeller
@TylerMoeller
Oct 24 2016 22:23
@mhdavis Sorry, my fault, I gave you the wrong url. Replace 'geolookup' with 'conditions': https://api.wunderground.com/api/Your_Key/conditions/q/autoip.json
Michael Davis
@mhdavis
Oct 24 2016 22:26
that makes more sense lol
okay cool that gives me everything I need now
emamadordev
@emamadordev
Oct 24 2016 22:40

if anyone get's this chrome console error when using apis or using getjson jquery command: http://i.share.pho.to/17875d4a_o.jpeg

then use this resource: http://crossorigin.me/

It allows you to use resources from other domains without getting this error. The site explains better. Take a look: http://crossorigin.me/

bala020304
@bala020304
Oct 24 2016 23:03
JD Tadlock
@jdtdesigns
Oct 24 2016 23:25
@silver537 The data object is used to store data that can be shared across the app. The only trick is to know how async data works to avoid conflicts.
silver537
@silver537
Oct 24 2016 23:27
@jdtdesigns async data reduces accidents? like overriding preexisting properties? or how does it work?
JD Tadlock
@jdtdesigns
Oct 24 2016 23:30
@silver537 Async or asynchronous refers to the ajax data that is being requested from the api. It is not available instantly. The ajax request is sent and the rest of your code is ran. Once the data is received, the ajax response will fire the callback. If you call functions or run code that doesn't wait for the callback response, it will fail.
You'll see .then() in my code. That makes sure the response has been returned before running that function.
silver537
@silver537
Oct 24 2016 23:32
@jdtdesigns i think thats what i did. i wrote my code in the $getJSON method. i guess i've been using async data. but the only difference is, i was passing the data object as arguments for functions.
JD Tadlock
@jdtdesigns
Oct 24 2016 23:35
@silver537 You're coding procedurally which is fine for small programs. Running the code line by line to do this or that. What you'll soon find is coding functionally can clean up your code and make it more readable to you and others without the need for mass commenting.
silver537
@silver537
Oct 24 2016 23:38
@jdtdesigns i thought i was coding functionally.. are there any rescources i can look up for "functional" coding?
Manish Giri
@Manish-Giri
Oct 24 2016 23:40
@jdtdesigns are you talking about promises, when you say .then?
JD Tadlock
@jdtdesigns
Oct 24 2016 23:41
@Manish-Giri A jQuery promise, yes
Manish Giri
@Manish-Giri
Oct 24 2016 23:42
@jdtdesigns okay
silver537
@silver537
Oct 24 2016 23:46
@jdtdesigns i saw you use a map method. data.forecast.map((obj)=> {}) is this rewriting the json data?
JD Tadlock
@jdtdesigns
Oct 24 2016 23:49
@silver537 I'm just using .map() to iterate through the array of forecast objects returned from the api
I saved the list to data.forecast
.map() can do many things, but at it's most basic can be used as an iterator. Like a for loop but less code.
silver537
@silver537
Oct 24 2016 23:51
wouldn't the forEach() be a better choice?
or it wouldn't make a difference
JD Tadlock
@jdtdesigns
Oct 24 2016 23:57
works the same for an array @silver537