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
Ashwin
@ashwins93
@mhesham32 it's actually in the official ecma specification. The ToNumber coercion. It's in the section 9.3 I guess
Or you could read about it in YDKJS
book 4 chapter 4
Isaiah Trembley
@IsaiahCT
@ashwins93 what is that
Ashwin
@ashwins93
@IsaiahCT what is what ? Lol
Mostafa Hesham
@mhesham32
@ashwins93 that is so nerdy :smile:
Isaiah Trembley
@IsaiahCT
YDKJS
Ashwin
@ashwins93
@mhesham32 lol yeah but knowing stuff like that can save you sometimes ( I meant knowing about the ToNumber not section numbers lol)
@IsaiahCT it's an amazing book. Check it out once you get some experience in JS
Mostafa Hesham
@mhesham32
sure thing thank you guys
mbpiner
@mbpiner
Hey guys, trying to access a certain object in a JSON for the wiki search project
For example, this is the URL which I'm trying to get this right with
It's a search for the term "philosophy" with callback=? at the end to request the JSON and JSONP
&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=pageimages|extracts&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&gsrsearch=philosophy&callback=?
is good for looking at it in an easier to read format
my problem is I have to get to the data which is at jsonData["query"]["pages"]
Kaz Baig
@kbaig
@mbpiner can you link the api call you're making or a pen
mbpiner
@mbpiner
Oops, sorry thought above was
Kaz Baig
@kbaig
full call
mbpiner
@mbpiner
at jsonData["query"]["pages"], the next element I have to select by to get further in the object is a random ass number
and jsonData["query"]["pages"][0] returns undefined so I cant call it by that
is there a jquery method or some library or something I can use to just return the first child, that would function similarly to jsonData["query"]["pages"][0]?
mbpiner
@mbpiner
I've googled around but i've realized after you and alpox helping me its a lot quicker just to ask someone who knows
Kaz Baig
@kbaig
and then iterate/map over the array
mbpiner
@mbpiner
Shoot that's right! Totally forgot about Object.keys()
Kaz Baig
@kbaig
Honestly, it should really be an array they give us
But it's fine
quickspeedy
@quickspeedy
How do I center the weather box including search bar? I tried using height: 100vh; and it don't work. I tried rearranging positioning but it makes the weather box and searchbar out of place.
Codepen: https://codepen.io/quickspeedy/pen/BmBWoQ
Kaz Baig
@kbaig
@quickspeedy vertical and horizontal you mean?
quickspeedy
@quickspeedy
vertical center
@kbaig
Kaz Baig
@kbaig
@quickspeedy here you go
.centerSection {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
mbpiner
@mbpiner
You could get it further down with margin-top:
quickspeedy
@quickspeedy
Was it necessary to include flex? @kbaig
mbpiner
@mbpiner
@kbaig thank you btw
CamperBot
@camperbot
mbpiner sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 387 | @kbaig |http://www.freecodecamp.com/kbaig
Kaz Baig
@kbaig
i mean you could do it using transform: translate and position: relative but why bother
quickspeedy
@quickspeedy
@kbaig Ok all right thanks!
CamperBot
@camperbot
quickspeedy sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 388 | @kbaig |http://www.freecodecamp.com/kbaig
Kaz Baig
@kbaig
np friendos
@quickspeedy would prob look better if you did 75vh instead of 100 btw
quickspeedy
@quickspeedy
@kbaig Now that you mentioned it, it actually does look better.
Thanks again!
Kaz Baig
@kbaig
@quickspeedy no prob, exact vertical center is not something human eyes like, even though we intuitively think they would
quickspeedy
@quickspeedy
@kbaig Yeah that is true. Something I can learn for UI design.