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
CamperBot
@camperbot
123xylem sends brownie points to @donofriov :sparkles: :thumbsup: :sparkles:
:cookie: 286 | @donofriov |http://www.freecodecamp.com/donofriov
Vincent D'Onofrio
@donofriov
no problem!
now if you want to add them to a project you are working on, just drop them into a js folder in your project and that should make it easy enough to figure out the path for index.html
Akash.D
@Akashd7
hi guys
Vincent D'Onofrio
@donofriov
:wave:
this is my tribute page
the problem is that i cant center the image
can anyone please help me?
thanks :)
kirbyedy
@kirbyedy
@Akashd7 for start change your bootstrap library from 4.0 to this one
to avoid future problems
Prakash Shiwakoti
@pshiwakoti1
// 20170221232339
// http://api.openweathermap.org/data/2.5/weather?lat=37.7697&lon=-122.3933&appid=34a4cf171b5fa89cd0ea82794d903fdb&units=metric

{
  "coord": {
    "lon": -122.42,
    "lat": 37.77
  },
  "weather": [
    {
      "id": 802,
      "main": "Clouds",
      "description": "scattered clouds",
      "icon": "03n"
    }
  ],
  "base": "stations",
  "main": {
    "temp": 10,
    "pressure": 1024,
    "humidity": 76,
    "temp_min": 7,
    "temp_max": 14
  },
  "visibility": 16093,
  "wind": {
    "speed": 3.6,
    "deg": 290
  },
  "clouds": {
    "all": 40
  },
  "dt": 1487746680,
  "sys": {
    "type": 1,
    "id": 478,
    "message": 0.0081,
    "country": "US",
    "sunrise": 1487774984,
    "sunset": 1487815013
  },
  "id": 5391959,
  "name": "San Francisco",
  "cod": 200
}
Akash.D
@Akashd7
ok doing that
Prakash Shiwakoti
@pshiwakoti1
this is my weather JSON data. IF i wana access city, how do i do that? is variable.name gonna be ok?
Vincent D'Onofrio
@donofriov
@kirbyedy @akashd7 no need to change to 3.3.6. bootstrap 4 will be the new standard. so now is better than ever to build with the new version
kirbyedy
@kirbyedy
@Akashd7 using that library will also solve your problem, as far as I can see :)
Akash.D
@Akashd7
woahg thanks
it worked
Prakash Shiwakoti
@pshiwakoti1
@donofriov you are still there. can i ask you that question
kirbyedy
@kirbyedy
@donofriov at the moment bootstrap 4 is in the alpha stage, so problems might occur, but if you can help him solve the problem he is facing using bs 4 that will be great
Akash.D
@Akashd7
@donofriov will try the new library too
@kirbyedy thanks again :)
CamperBot
@camperbot
akashd7 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1827 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Vincent D'Onofrio
@donofriov
yeah very good point @kirbyedy
adding these classes to an img for bootstrap 4 work as well :)
<img class="mx-auto d-block"
Prakash Shiwakoti
@pshiwakoti1
hi vincent will you please look at my CodePen? http://codepen.io/pshiwakoti1/pen/YZKPRx?editors=1112
Vincent D'Onofrio
@donofriov
@pshiwakoti1 do you want to get your city from your first api or the second api?
Prakash Shiwakoti
@pshiwakoti1
second api
Vincent D'Onofrio
@donofriov
what’s the name of the field in the second api?
Prakash Shiwakoti
@pshiwakoti1
name
data.name doesn't do it
Vincent D'Onofrio
@donofriov
hmm really?
Prakash Shiwakoti
@pshiwakoti1
yes
there are few variables that are not displaying
maybe I did it incorrectly
Will you please check for me?
Vincent D'Onofrio
@donofriov
data.name works for me :)
you are on the right track!
Prakash Shiwakoti
@pshiwakoti1
Why its not showing in my then
Vincent D'Onofrio
@donofriov
can you send me the line where you tried data.name, it may be a typo in your queryselector
Prakash Shiwakoti
@pshiwakoti1
document.querySelector('#temp1').innerText = data.weather[0].main; document.querySelector('#temp2').innerText = data.main.temp; document.querySelector('#temp3').innerText = data.weather[0].pressure; document.querySelector('#temp4').innerText = data.coord.lon; document.querySelector('#temp5').innerText = data.coord.lat;
Vincent D'Onofrio
@donofriov
right
so now you need to make one for data.name