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
good neighbors
? ha, the bad neighbors get shunned from the neighborhood?
Jose Diaz
Good morning all, I want to create an array of arrays - stuff[{'name':name, 'live':live},{'name':name, 'live':live},{'name':name, 'live':live}] but I'm getting 0:{'name':name, 'live':live}, 1:{'name':name, 'live':live}, etc my code is var stuff = []; stuff.push({
What am I doing wrong?
@jsd540 you're making an array of objects there
the first row should not use the state of the neighbors that are above, as they don't have one
@GabriRa it's not supposed to be playing yet, is it?
I dont know hoe to make it start
is that a question?
Jose Diaz
@moT01 but its showing up as an array for each user and the length for stuff is always 0
It should be running
but i have done something wrong, so it does not starts
or rerender the cell
change the state to the new array @GabriRa
my god
I think you are right
@jsd540 stuff should have 3 length i think
Jose Diaz
so var stuff = new.array(); ?
i think it's getting stuck looking for variables named live and name
need to make them strings in the object, or create variables with those names
Why when I use setState it doesn't triggers ComponentDidMount again?
Jose Diaz
thats what I want to end up with but it seems to be pushing to individual arrays
@GabriRa i dont think it's supposed to trigger that
@jsd540 check it again
Anyone have a moment?
@MWBauer whats up
I'm working on the Random Quote Generator. Once I've gone and pulled a random quote from the web, it needs to be displayed. Do I need a special field for that to display in, or make a button and have the message display there?
@GabriRa i dont know spanish (i think that's spanish), so it's tough for me to find out what's going wrong there, but there should be single array that you map to the html in the return() and then in the function to update the grid you should change the state at the end, and it will automatically update the screen
pretty sure that's how i did it
@MWBauer make an html element to put it in
and use .html to put the quote in it
(if you're using jquery)
@moT01 thanks
sorry mot01, you can't send brownie points to yourself! :sparkles: :sparkles:
Jose Diaz
@moT01 yep still get 0 length, and [] in the console...
What's the newest version of HTML?
that's not what i got in the example i made @jsd540, do you have code i can see
5 @MWBauer
i think
click my name
Jose Diaz

// list of active users from twitch

var userNameList = ['riotgames','syndicate','summit1g','esl_csgo',
'meclipse','cretetion', 'shroud','officialbjergsen','wolves_bjergsen',
'dreamhackcs','timthetatman','ESL_SC2', 'captainsparklez','goldglove','boxbox',
'swiftor','c9sneaky','storbeck', 'doublelift_renamed300203','doublelift',
'drdisrespectlive','OgamingSC2', 'sivhd','iijeriichoii','faceittv','Faceit',
'omgitsfirefoxx','kinggothalion','habathcx', 'thenadeshot','nadeshot',
'kittyplaysgames','kittyplays','yoda','stonedyooda','RobotCaleb', 'GiantWaffle',
'Gronkh','bobross','nick28t','noobs2ninjas', 'gassymexican','monstercat','cryaotic',

// userNameList array size.

var size = userNameList.length;


// active on click button

// $("button").click(function(){
//   $("button").removeClass("active");
//   $(this).addClass("active");
// });

// listen for a button click to call function

// iterate the userNameList array
// and get necessary data for each user

for(var i = 0; i < size; i++){

    // construct the url

    var user_name = userNameList[i];
    var user_url = 'https://wind-bow.gomix.me/twitch-api/users/';

    user_url += user_name + '?callback=?';

    $.getJSON(user_url, function (user_data) {

    var name = user_data.display_name;     // twitch streamer user name
    var name2 = user_data.name;            // twitch user name to be sent to isItLive
    var logo = user_data.logo;             // streamer logo image
    var bio = user_data.bio;            // streamer bio

    if (bio == null){ // handle null bio case
        bio = 'no bio available';
    else{ // if bio is too long limit size 
        bio = bio.substring(0,125) + "...";
    // send data to isItLive

    isItLive(name, name2, logo, bio);



// this function finds out weather the streamer is
// currently live or if they are off the air.

function isItLive(name, name2, logo, bio){

var user_stream_url = 'https://www.twitch.tv/' + name2; // cunstruct user stream url

// construct url

var stream_url = 'https://wind-bow.gomix.me/twitch-api/streams/';

stream_url += name2 + '?callback=?';

$.getJSON(stream_url, function(liveOrNot){

    // if the streamer is off the air liveOrNot returns null
    // else streamer is currently on the air

    if (liveOrNot.stream != null){

    console.log(name + "  " + bio + " On-line now!");


     console.log(name + " " + bio + " Off-line!");




so your computer can run through code really fast, ...that for loop takes like no time. A getJSON request, however, takes a little more time
so why you aren't able to fill your array is cause the request hasn't returned any values before you try and push it to the array
Kaz Baig
@MWBauer 5 but it is generally assumed that this is the final 'version' -- features will get added over time but they won't increment the version number. This is evidenced by the doctype declaration being simply <!DOCTYPE html> as opposed to <!DOCTYPE html5>