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
Ayush Bahuguna
@relentless-coder
don't check for null individually, you can check for all the falsy values at once, instead of checking for individual falsy value
sennator
@sennator2
@unreality23 hahhah i had it earlier than removed it
@unreality23 thanks
CamperBot
@camperbot
sennator2 sends brownie points to @unreality23 :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for unreality23
Ayush Bahuguna
@relentless-coder
@unreality23 you can do this
if(!data.stream) {
  //then do this
}
this would check for all the falsey values of data.stream. it would always be null though, because you don't assign undefined to variable, but even if you want to check for undefined too then just do this
Vaidotas
@unreality23
sorry but none of your answers are correct im getting totaly the same answers.
Ayush Bahuguna
@relentless-coder
what is it that you are trying to achieve?
Vaidotas
@unreality23
you always have to check if your channel stream is null or not null. even in example showing the same thing
Ayush Bahuguna
@relentless-coder
so why do you want to check for undefined?
Vaidotas
@unreality23
because its one of the tasks in twitchtv json api
Ayush Bahuguna
@relentless-coder
where? it just asks for whether online or not.
Vaidotas
@unreality23
User Story: I will see a placeholder notification if a streamer has closed their Twitch account (or the account never existed). You can verify this works by adding brunofin and comster404 to your array of Twitch streamers.
Ayush Bahuguna
@relentless-coder
@unreality23 i logged your data, but nowhere did I find an objects property as undefined
now, this is what I meant. Why are you looking for undefined?
Vaidotas
@unreality23
i told you. because its in the task
Ayush Bahuguna
@relentless-coder
@unreality23 you are supposed to check the status code.
if the status code is 404. you don't have to check for undefined because if the channel doesn't exist why would the api send it's data, you'd simply get 404 error. So, use .error() method to check for the status code and if it's 404 then do what you are supposed to do
look in you dev console too. You'd be getting 404 error for comstar404.
and why aren't you using asynchronous call? this froze my browser for at least 10 - 15 seconds.
Vaidotas
@unreality23
because it wont be in the order i want
Ayush Bahuguna
@relentless-coder
again, you can use if statement to check for whether the ajax request is complete and then display your data.
Leo
@leozulfiu
hi, i'm not sure if i can ask here but i got some big problems with my iframe...
i'm trying to embed a survey into my page but it just doesn't work.
here-> https://plnkr.co/edit/CDJVwg6JAtW71KG4ZPiJ?p=preview
i just don't understand why there are TWO scrollbars...could maybe someone have a look?
sennator
@sennator2
it still aligns with body :D
Ayush Bahuguna
@relentless-coder
you can use overflow: hidden on body, uless you intend to put more elements below the iframe
@sennator2 what do you want?
Vaidotas
@unreality23
@relentless-coder check if data1.status == 422 or 404 still no results
checked*
sennator
@sennator2
@relentless-coder my material icon to be positioned next to search bar
Ayush Bahuguna
@relentless-coder
@unreality23 dude no. what?? that's not how you check for status code. jQuery provide the error method.
sennator
@sennator2
but it gets positioned according to body eventhough i gave input position relative
Ayush Bahuguna
@relentless-coder
@sennator2 okay let me check
Vaidotas
@unreality23
@sennator2 write in html,body overflow:hidden
@leozulfiu write in html,body overflow:hidden
sorry not sennator2 lol
Ayush Bahuguna
@relentless-coder
@sennator2 your material icon is positioned absolute, and is position at top right corner.
sennator
@sennator2
@relentless-coder right, but shouldn that be in relation to first relative positioned element
Ayush Bahuguna
@relentless-coder
@sennator2 if you want it to to be present next to the search bar, then put search bar and the icon inside a div. give that div a position: relative, and then use position absolute on your icon and search bar. although float is a better option
@sennator2 positioning input as relative would have no effect on icon because icon is not inside the input tag
sennator
@sennator2
@relentless-coder makes sense... thanks ;)
CamperBot
@camperbot
sennator2 sends brownie points to @relentless-coder :sparkles: :thumbsup: :sparkles:
:cookie: 331 | @relentless-coder |http://www.freecodecamp.com/relentless-coder
Vaidotas
@unreality23
@relentless-coder the thing is, that my code is checking through https://api.twitch.tv/kraken/streams/ESL_SC2?client_id=swakdn0m7ayikkn4ibpzslwqaihbwx through this link. and through this link if you will write existing channel which is ESL_SC2 and hes online. offline one is cretetion and then write brunofin which is not existing and you will see that at the end there is no difference in a call between cretetion and brunofin
Ayush Bahuguna
@relentless-coder
@unreality23 let me check again
@unreality23 you are not checking for error.
Vaidotas
@unreality23
but how he going to understand which of these two are error ?