Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:33
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • May 10 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 25 17:12
    @mstellaluna banned @cmal
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:11
    thecodingaviator labeled #31179
  • Apr 01 18:09
    thecodingaviator commented #31179
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:09
    thecodingaviator labeled #31182
  • Apr 01 18:07
    thecodingaviator commented #31182
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator labeled #31190
  • Apr 01 18:07
    thecodingaviator commented #31190
  • Apr 01 18:05
    thecodingaviator commented #31157
  • Apr 01 18:04

    thecodingaviator on master

    remove A (#31157) (compare)

  • Apr 01 18:04
    thecodingaviator closed #31157
  • Apr 01 18:04
    thecodingaviator closed #33788
  • Apr 01 18:04
    thecodingaviator commented #33788
  • Apr 01 18:02
    thecodingaviator closed #31059
  • Apr 01 18:02
    thecodingaviator commented #31059
Ogundele Olumide
@Lumexralph
@kelechy ehn na
Kelechi Chinaka
@ke1echi
good, prepping lesson mat for my kids
Ogundele Olumide
@Lumexralph
@kelechy yeah, school resumption is close
Kelechi Chinaka
@ke1echi
u need am o, but u have to hold till u get home :smile:
Ogundele Olumide
@Lumexralph
@kelechy abi, and on getting home the sleep vanishes :disappointed:
Kelechi Chinaka
@ke1echi
sure...u know how e be, na
Ogundele Olumide
@Lumexralph
i sabi oo
going for lunch bro, be back soon
Kelechi Chinaka
@ke1echi
teaching kids is fun, but the treating from the school is low, i tend to sign out year ending
Ogundele Olumide
@Lumexralph
@kelechy for?
@kelechy go play small for Andela na
go and test your muscles
Kelechi Chinaka
@ke1echi
govt school maybe
Ogundele Olumide
@Lumexralph
govt school make sense but prompt payment nko?
Kelechi Chinaka
@ke1echi
sure i go tryout Andela @Lumexralph
koder3
@koder3
@Lumexralph wow thanks so much!
CamperBot
@camperbot
koder3 sends brownie points to @lumexralph :sparkles: :thumbsup: :sparkles:
api offline
Ogundele Olumide
@Lumexralph
@kelechy i should go back and flex some muscles November God willing
Kelechi Chinaka
@ke1echi
the payment is cool via n-power scheme @Lumexralph
Morchid Chellali
@Morched23MJ
Can someone tell me why the 'return' icon (fa-arrow-circle-left) is fadding like this? I did a line to hide it, when a game is finished. It's repeating the fading because there is a setInterval. Thank you in advance.
The pen: https://codepen.io/Morched23MJ/pen/VzRQZM?editors=1010
Ogundele Olumide
@Lumexralph
@koder3 you're welcome :smile:
Kelechi Chinaka
@ke1echi
so early? y nt jan @Lumexralph
am just not in a hurry to get in Andela, i dunno y? @Lumexralph
Ogundele Olumide
@Lumexralph
@kelechy still have my leave left to be exhausted and to be honest I've made myself acquainted with technologies that threw me off. i'm pretty confident about.... it won't hurt a thing to try again
@kelechy take your time, once you're familiar with fullstack, go and try it out
i dey H......
Kelechi Chinaka
@ke1echi
sure i would @Lumexralph :+1:
go fill up :smile: @Lumexralph
imperial-isms
@imperial-isms
getting an error message TypeError: json.forEach is not a function. (In 'json.forEach', 'json.forEach' is undefined) on this code…
$(document).ready(function() {

    $("#random-button").on("click", function(){
      $.getJSON("https://random-quote-generator.herokuapp.com/api/quotes/random", function(json) {
        var html = "";
////////////////////////////////////////////

        json.forEach(function (val) {

          var keys = Object.keys(val);
          html += "<id = 'quote-text'>";
          keys.forEach(function (val) {
            html += "<em>" + val[key] + "</em>" 
          }); 
        });

////////////////////////////////////////////
        $("#quote-text").html(html);
      });
    });

});
I can stringify the json variable/arguement and include it in the .html method, but something is getting hung up somewhere inside the purple slashes
Jason Luboff
@JLuboff
@imperial-isms forEach is an array method. Your json property is a single object
imperial-isms
@imperial-isms
I thought something like that was happening
Margaret Greaney
@greaneym
Hi, I can see some people responding but it is just flashing up at the top and not echoing here to the gitter text stream, so I can't see it.
I think something is wrong here because I can't see responses. I will post some code to codepen.io and then ask again later.
imperial-isms
@imperial-isms
Thanks @JLuboff …I just learned it from “Convert JSON Data to HTML”. I copied and pasted it (still analyzed it) from that lesson, so I had to figure that it would work.
CamperBot
@camperbot
api offline
imperial-isms sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
horo
@wolfHoro
'''
CamperBot
@camperbot
:bulb: to format code use backticks! ``` more info
imperial-isms
@imperial-isms
Why does this FCF code work…

<script>
  $(document).ready(function() {

    $("#getMessage").on("click", function() {
      $.getJSON("/json/cats.json", function(json) {

        var html = "";
        // Only change code below this line.
          json.forEach(function(val) {
            var keys = Object.keys(val);
            html += "<div class = 'cat'>";
            keys.forEach(function(key) {
              html += "<strong>" + key + "</strong>: " + val[key] + "<br>";
            });
            html += "</div><br>";
          });


        // Only change code above this line.

        $(".message").html(html);

      });
    });
  });
</script>
Jason Luboff
@JLuboff
@imperial-isms No problem. It's always a good idea when working with api's to see the structure of the returned data. You can do so either by inside your Ajax call having a console.log(data) where data is your property name (in your case, it would be json). Or grab the url and put it into your browser and see what you get.
@imperial-isms I'd have to go verify, but I imagine that you get an array of objects back with that one
imperial-isms
@imperial-isms
Okay that seems like the most likely scenario
horo
@wolfHoro
function chunk(arr, size) {
  var i;
  var a=size;
  var m=Math.ceil(arr.length/size);
  var arrlength=arr.length;
  var litarr=new Array();
  var newarr=new Array();
  for (i=0;i<m;i++){
    newarr[i]=new Array(size);
    litarr=arr.slice(a-size,a);
    a=a+size;
    newarr[i].push(litarr);
  }

}

chunk(["a", "b", "c", "d"], 2);
Why isn't newarr a two-dimensional array?
imperial-isms
@imperial-isms
I appreciate it
Jason Luboff
@JLuboff
:+1:

@wolfHoro It's a multi-demsional array, but one too deep. Right now you have this

[ [ [ 'a', 'b' ] ], [ [ 'c', 'd' ] ] ]

If you return newarr

Inside your loop, you don't need newarr[i]=new Array(size); as litarr is an array
so then you just need to push litarr into newarr