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
Adel
@AdelMahjoub
@tiagocorreiaalmeida
/*
CSS
*/
.progress {
    height: 20px;
    width: 0;
    margin-bottom: 5px;
    background-color: brown;
    display: block;
    transition: width 1s;
  }
/*
JS
*/
window.addEventListener('DOMContentLoaded', function() {
  var progress = document.querySelectorAll('.progress');

  progress.forEach(function(element) {
    var percentage = element.getAttribute('progress')
    element.style.width = percentage + 'px';
  });
});
intcreate
@intcreate
How can i make the earth spin/rotate? https://jsfiddle.net/La3qbr0v/
Diego Mayer
@Chrono79
animated gif? http://jsfiddle.net/LwwfG/ <- but the earth doesn't rotate like that
Bryan Reese
@breese8009
thanks guys i solved
Randell Dawson
@RandellDawson
@intcreate - Close as you can get with that image -
https://jsfiddle.net/6y9bkLdr/
Jason Luboff
@JLuboff
@rmdawson71 The earth is flat?!
:joy:
Diego Mayer
@Chrono79
The anticonspirancy were right!
I'm selling these fine aluminium-foil hats btw
Randell Dawson
@RandellDawson
@JLuboff - That photo was taken in the 1600s by an alien.
Jason Luboff
@JLuboff
No wonder!
Jason Luboff
@JLuboff
Ugh... the igdb api is such a pain to work with
juni
@junipberry
hey guys, is it wrong for me to combine the conditionals like this.. How can I get it work in the same line?
function isEitherEvenOrAreBoth7(num1, num2) {
  if (num1%0 || num2%0) || (num1 && num2 = 7){
    console.log("true");
  } else {
    console.log("false");
  }
}
actually, its
console.log(true) and console.log(false)
Diego Mayer
@Chrono79
@junipberry = is used to assign, not to compare
use === or == instead
Jason Luboff
@JLuboff
As well as you would need num1 === 7 && num2 ===7
Diego Mayer
@Chrono79
and you should repeat the seven there too
Christopher McCormack
@cmccormack
@junipberry anything mod 0 will be NaN
You'll want to do num%2, and check if the result is === 0 for it to be true
juni
@junipberry
ahh right, ty @Chrono79 and ty @cmccormack
CamperBot
@camperbot
junipberry sends brownie points to @chrono79 and @cmccormack :sparkles: :thumbsup: :sparkles:
api offline
api offline
juni
@junipberry
ty @JLuboff
Jason Luboff
@JLuboff
:+1:
dyon3334
@dyon3334
$` Inserts the portion of the string that precedes the matched substring.
$' Inserts the portion of the string that follows the matched substring.
replace()
what do they mean ?
Adel
@AdelMahjoub
@intcreate I got the opposite sense https://jsbin.com/toboqafeka/1/edit?js,output
piteto
@piteto
Randell Dawson
@RandellDawson
@dyon3334 - I answered in the other channel.
Adel
@AdelMahjoub
@piteto cool, less code with css
@piteto and better perf than setInterval
juni
@junipberry
hi guys, I’m trying to give the properties of obj2 to obj1. Is this the right way about it?
function extend(obj1, obj2) {
  if (obj1[key]===true){
  return obj1 === obj2[key];
}
}
Coy Sanders
@coymeetsworld
@junipberry key isn't defined, you should look into the Object.keys and hasOwnProperty functions
Randell Dawson
@RandellDawson
@junipberry - question - what do you think your if statement is evaluating?
Caleb Cox
@CalebCox
Hello everyone! I'm working on the Tic Tac Toe advanced project and I'm having some issues understanding how to properly implement minimax or similar algorithms to create an unbeatable AI for a board that's in a 2D array. Does anyone have any resources that would be helpful or any suggestions?
juni
@junipberry
good point, ty @coymeetsworld. Fixing it now.
CamperBot
@camperbot
junipberry sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
api offline
Randell Dawson
@RandellDawson
@CalebCox - why not attempt your own algorithm?
Coy Sanders
@coymeetsworld
This helped for me @camperbot https://www.youtube.com/watch?v=J1GoI5WHBto
but, you dont need to implement minimax, making the game unbeatable was removed as a req over a year ago
Caleb Cox
@CalebCox
@coymeetsworld thank you! I also didn't notice it wasn't a requirement any longer, the video still mentioned it but the side panel's user stories do not lol.
Coy Sanders
@coymeetsworld
yw @junipberry
CamperBot
@camperbot
calebcox sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
api offline
Randell Dawson
@RandellDawson
@CalebCox - This wiki gives some basic logic for AI.