Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • 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
Albert L. C.
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
@pshiwakoti1 i don’t see your code working on codepen.. so it’s really difficult to help you debug
Chris Cullen

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>

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

<script  src="Assets/paper.js-develop/paper.js-develop/dist/paper-full.js"></script> //THIS FILE!!!!!

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

Vincent D'Onofrio
oh wait it’s working now! @pshiwakoti1 weather[0].main is correct
for me it says Fog on your page now
Prakash Shiwakoti
ok great
but Im not good at json
Vincent D'Onofrio
you have exactly what you need :)
.getJSON is a lot simpler than .ajax in my opinion
Prakash Shiwakoti
how do I access other objects ? I want to display lot more properties
Vincent D'Onofrio
@123xylem what directory is your html file in
@pshiwakoti1 data is your starting point
so everything is going to be data. something
Prakash Shiwakoti
Vincent D'Onofrio
you’ll notice that in the JSON response, weather has two sets of braces before the next code
Chris Cullen
@donofriov C:\Users\Chris\Documents\Coding\Sublime\Interactive\index.html
Vincent D'Onofrio
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
cool i got next data too
is there a boostrap option that allows me to pick any color I want?
Prakash Shiwakoti
Let me explore now, I will figure out
Vincent D'Onofrio
Prakash Shiwakoti
@donofriov thanks a lot for your guidance
:cookie: 285 | @donofriov |http://www.freecodecamp.com/donofriov
pshiwakoti1 sends brownie points to @donofriov :sparkles: :thumbsup: :sparkles:
Prakash Shiwakoti
you are so helpful
1 more thing I forgot to ask you
Vincent D'Onofrio
@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
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
@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
i added within my div element but can't see it
Chris Cullen
@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
it looks like you downloaded a devlopment version which sometimes they can have bugs
and clicking the first one
then unzip and go into and example and double click
should be working out of the box
@pshiwakoti1 you’re getting it now! take a time to tinker around and try to figure it out before asking questions. It makes it so much more rewarding :)
also did you run through all of the FCC challenges before attempting these projects? There’s a lot of information in those that can be used to help you compelte the projects
Chris Cullen
@donofriov yea i tried .1 and even off github.. didnt work out tof the box for me tho!
Vincent D'Onofrio
oh man i think is ee it
try Assets/paperjs-develop/paper.js-develop/dist/paper-full.js