Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Ken Haduch
@khaduch
@playingwithinfinity - I haven't gotten into it, yet, but there was this article that came up in the freecodecamp email a day or two ago: https://medium.freecodecamp.com/how-to-make-your-tic-tac-toe-game-unbeatable-by-using-the-minimax-algorithm-9d690bad4b37#.d08xira9g - it looks like it might be helpful, if you haven't seen it?
at least I hope that helps...
khaduch @khaduch - and now going offline for the night... happy coding all!
Prakash Shiwakoti
@pshiwakoti1
can someone else help me?
Prakash Shiwakoti
@pshiwakoti1
anyone here
Franco Javier Danussi
@francodanussi
Goodnight campers, I'm trying to concatenate numbers in the input bar, doing the calculator project. I can't find the way to make that happen in a coherent way though. It looked pretty straight forward, but every time I press a button the input shows "undefined" before the number. Weird stuff.
https://codepen.io/francodanussi/pen/JEgVYo
Prakash Shiwakoti
@pshiwakoti1
can anyone help?
Franco Javier Danussi
@francodanussi
@pshiwakoti1 what are you doing? Can I help you?
Prakash Shiwakoti
@pshiwakoti1
Franco look at my CodePen
im trying to display the temperature data from Open Weather api I extracted from
Franco Javier Danussi
@francodanussi
Yes, I opened it.
Prakash Shiwakoti
@pshiwakoti1
does my code make sense?
Franco Javier Danussi
@francodanussi
your getWeather() method?
Prakash Shiwakoti
@pshiwakoti1
what about it
Franco Javier Danussi
@francodanussi
Tell me where I should look
Prakash Shiwakoti
@pshiwakoti1
I want to know how to display in html section
I believe I have the weather data ready
Franco Javier Danussi
@francodanussi
yes
Prakash Shiwakoti
@pshiwakoti1
someone helped me write getWeather() funcition
Franco Javier Danussi
@francodanussi
You got that right, I'm looking the JSON returned
Ok. You 've got to access the temp property and set it to an html with JQuery or with querySelector
Prakash Shiwakoti
@pshiwakoti1
whats that mean
Franco Javier Danussi
@francodanussi
You should declare a div in html, and assign that an id, then in javascript declare the innertext of that div equal to the JSON temp property
Prakash Shiwakoti
@pshiwakoti1
oh ok Let me do that. I will be right back
Franco Javier Danussi
@francodanussi
Ok
document.querySelector('.weather').innerText = data.weather[0].main;
you can use that as an example, but of course following your id and your JSON structure
Prakash Shiwakoti
@pshiwakoti1
document.querySelector('.temp').innerText = data.weather[0].main;
would that work. I have div class=temp in hteml
do I give #
can you please look at my code now?
Franco Javier Danussi
@francodanussi
Let me see
Prakash Shiwakoti
@pshiwakoti1
are you there
Franco Javier Danussi
@francodanussi
Yes
Your codepen has not changed according to my browser, have you saved your progress?
Prakash Shiwakoti
@pshiwakoti1
yes I have
let me give you the url
Franco Javier Danussi
@francodanussi
Ok
first
if you used ID then you should call the querySelector("#temp")
Prakash Shiwakoti
@pshiwakoti1
ok
Franco Javier Danussi
@francodanussi
Second, check the structure of your JSON, how would you access the temp property?
Prakash Shiwakoti
@pshiwakoti1
Im getting mixed content error on my console
main.temp would give me temperature
looking at the OPen Weather API
Franco Javier Danussi
@francodanussi
Are you sure? check the results of your calls with alerts in your console, or with console.log
Prakash Shiwakoti
@pshiwakoti1
yes
Im getting mixed content errors in my console