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
Prakash Shiwakoti
@pshiwakoti1
But I still don't know how to filter out the data from API
for each data do I have to do document.querySelector('#temp').innerText = data.weather[0].main;
off course last parameter will change
Vincent D'Onofrio
@donofriov
can you save your pen so I can see the updated code?
Prakash Shiwakoti
@pshiwakoti1
sure
pls don't access htts
use http
Vincent D'Onofrio
@donofriov
i am but just need you to save real quick
Prakash Shiwakoti
@pshiwakoti1
saved
Albert L. C.
@sirus3020
guys how can i push an object to an array if the object name is from another array?

var streamerStatus = [];
var streamers = ['x', 'y', 'z'];

for (var i = 0; i < streamers.length; i++){
streamerStatus.push({streamers[i]: 'true'});
}

Vincent D'Onofrio
@donofriov
@pshiwakoti1 i don’t see your code working on codepen.. so it’s really difficult to help you debug
Chris Cullen
@123xylem

GET file:///C:/Users/Chris/Documents/Coding/Sublime/Interactive/Assets/paper.js-develop/paper.js-develop/dist/paper-full.js net::ERR_FILE_NOT_FOUND

<!DOCTYPE html>
<html>
<head>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <title></title>

<script  src="Assets/paper.js-develop/paper.js-develop/dist/paper-full.js"></script> //THIS FILE!!!!!
</head>
<body>
<h1>Hi</h1>
</body>
</html>

WHy cant my html find my paper-full.js file!?/?

Vincent D'Onofrio
@donofriov
oh wait it’s working now! @pshiwakoti1 weather[0].main is correct
for me it says Fog on your page now
Prakash Shiwakoti
@pshiwakoti1
ok great
but Im not good at json
Vincent D'Onofrio
@donofriov
you have exactly what you need :)
.getJSON is a lot simpler than .ajax in my opinion
Prakash Shiwakoti
@pshiwakoti1
how do I access other objects ? I want to display lot more properties
Vincent D'Onofrio
@donofriov
@123xylem what directory is your html file in
@pshiwakoti1 data is your starting point
so everything is going to be data. something
Prakash Shiwakoti
@pshiwakoti1
ok
Vincent D'Onofrio
@donofriov
you’ll notice that in the JSON response, weather has two sets of braces before the next code
Chris Cullen
@123xylem
@donofriov C:\Users\Chris\Documents\Coding\Sublime\Interactive\index.html
Vincent D'Onofrio
@donofriov
that means it has an object that you have to sort through which is what you need [0]
but if you were lookin at main (that includes temp/pressure/etc.) it doesn’t have that
so you can get things in there by data.main.temp
Prakash Shiwakoti
@pshiwakoti1
cool i got next data too
mscirocco8
@mscirocco8
is there a boostrap option that allows me to pick any color I want?
Prakash Shiwakoti
@pshiwakoti1
Let me explore now, I will figure out
Vincent D'Onofrio
@donofriov
:thumbsup:
Prakash Shiwakoti
@pshiwakoti1
@donofriov thanks a lot for your guidance
CamperBot
@camperbot
:cookie: 285 | @donofriov |http://www.freecodecamp.com/donofriov
pshiwakoti1 sends brownie points to @donofriov :sparkles: :thumbsup: :sparkles:
Prakash Shiwakoti
@pshiwakoti1
you are so helpful
1 more thing I forgot to ask you
Vincent D'Onofrio
@donofriov
@mscirocco8 yeah checkout the bootstrap docs, they have a lot of good stuff there https://v4-alpha.getbootstrap.com/getting-started/introduction/
@123xylem looking now
Prakash Shiwakoti
@pshiwakoti1
before rain, I want to show some captions like "Humidity" or something similar. How do I write those? do I have to do that in html code?
like right now I have 10.41 but I want to display 10.41 Celcisou? how do i do that?
Vincent D'Onofrio
@donofriov
@123xylem sorry not sure what’s happening, that looks exactly right :(
yeah @pshiwakoti1 that’s something you want to add in html
you can use javascript to search for the html to append the text to
Prakash Shiwakoti
@pshiwakoti1
i added within my div element but can't see it
Chris Cullen
@123xylem
@donofriov btw when i dloaded paper.js it wouldnt find its own files when i tried to run the example.html files it comes with on download
Vincent D'Onofrio
@donofriov
it looks like you downloaded a devlopment version which sometimes they can have bugs
and clicking the first one