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
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
horo
@wolfHoro
@JLuboff Thank you,Let me think about it
CamperBot
@camperbot
wolfhoro sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
api offline
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++){
    litarr=arr.slice(a-size,a);
    a=a+size;
    newarr.push(litarr);
  }

}

chunk(["a", "b", "c", "d"], 2);
I deleted newarr[i], but newarr became [a, b, c, d]., which made me very frustrated
Jason Luboff
@JLuboff
@wolfHoro return newarr outside your loop (before the last })
horo
@wolfHoro
@JLuboff I was so stupid, I thought about it for too long, but I ignored the simple place. Thanks for reminding me
CamperBot
@camperbot
wolfhoro sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
api offline
Jason Luboff
@JLuboff
:+1:
Ronique Ricketts
@RoniqueRicketts
@JLuboff why did you break camperbot cookie jar
Diego Mayer
@Chrono79
He's on diet
and so we are
We'll starve if it doesn't get fixed soon
Jason Luboff
@JLuboff
I'm missing my cookies :(
Blauelf
@Blauelf
@JLuboff Maybe take one of those :cookie:
Michael Ney
@MichaelNey
Hi, I am Using EJS, and an external JS file which is linked to the EJS page via script tag. however I'm getting a variable undefined error in the EJS when i'm trying to use one of the variables in the JS file. Is there a way I can make the JS file load before EJS javascript is executed? Since I think that may be the issue
Jason Luboff
@JLuboff
@Blauelf It's just not the same sadly.. :cry:
Blauelf
@Blauelf
Some :candy: then?
Jason Luboff
@JLuboff
That'll have to suffice
Blauelf
@Blauelf
Reminds me of Candy Box game.
Ronique Ricketts
@RoniqueRicketts
@JLuboff lol me too. but idk what happen to camperbot's brownies.
Pethaf
@Pethaf
:coffee:
:tea:
Jason Luboff
@JLuboff
@Blauelf I don't have the patience for it, I want to keep eating them!
@RoniqueRicketts I'm wondering if since they're not really supporting gitter chat anymore that they killed the api..
Ronique Ricketts
@RoniqueRicketts
@JLuboff really, so where will we chat?
:'(
Jason Luboff
@JLuboff
The chat is still here, but perhaps no more brownies/cookies
Ronique Ricketts
@RoniqueRicketts
So how will we know that we contribute everyday
Jason Luboff
@JLuboff
....we wont!
Ronique Ricketts
@RoniqueRicketts
NOOOOOO!!!
THey can't do that. Cant they??? :worried:
Krittiya Clark
@krittiyaclark
Can anyone guid me how to build a Pomodoro Clock with api or plugin?
Jason Luboff
@JLuboff
Who knows what sick twisted thoughts they may have
Ronique Ricketts
@RoniqueRicketts
Well i hope the replacement will be even better
@krittiyaclark use Strickly Javascript to make a timer. No need for any 3rd party api. (My suggestion) All this can be done with raw javascript
Krittiya Clark
@krittiyaclark
@RoniqueRicketts Strickly Javascript ?
Ronique Ricketts
@RoniqueRicketts
@krittiyaclark yes3
Jason Luboff
@JLuboff
Eh... personally I used a framework but I hated that project so meh
Krittiya Clark
@krittiyaclark
@RoniqueRicketts Could not find it on google.
Jason Luboff
@JLuboff
He meant use just regular Javascript, don't use a api or framework/library
Ronique Ricketts
@RoniqueRicketts
yesd
Krittiya Clark
@krittiyaclark
Oh okay!
Christopher McCormack
@cmccormack
There are enough crazy frameworks that I thought Strickly might be one :joy:
Kelechi Chinaka
@ke1echi
:smile: thought so too
Ronique Ricketts
@RoniqueRicketts
@cmccormack lol strickly is not a framework unless you wanna make it a framework