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
Cato Myhre
@Zalmez
can't get it to work q.q
alpox
@alpox
@Pendramon My minimax doesn't even put it in the middle in the first iteration :D
Pendramon
@Pendramon
or not nvm
It does if you reset it a couple of times
Cato Myhre
@Zalmez
I have just used some place holder text for now, far from done. just want some of the basic looks to be there
alpox
@alpox
Minimax is sometimes funny that it prefers a guaranteed win over a direct win
Pendramon
@Pendramon
Oh yea just noticed that xd
rfvergeldedios
@rfvergeldedios
Hi, may I ask for advice please? I don't understand why getJSON only picks up the last item of my array despite the variable used changes value at the start of the for-loop (getJSON at line 24 ). https://codepen.io/RafaelVD/pen/MogWRv?editors=0010
alpox
@alpox
@Zalmez You have to add jQuery before adding the javascript for bootstrap v4 otherwise it doesn't work
Pendramon
@Pendramon
okay i give up you cant win over minimax xd
alpox
@alpox
:D nop
Pendramon
@Pendramon
its just draw after draw
alpox
@alpox
@rfvergeldedios i doesn't change anymore when the callback runs - it already arrived at the last item
@rfvergeldedios Use let i instead of var i in the for loop
h1tag
@h1tag
@alpox also the for loop doesn't wait for getJSON to get the results, right?
Radek
@radekjohn
OK, i am donne. the board is off until the player chooses everything
alpox
@alpox
@h1tag One moment i'm looking. Still something off :D might be true
@h1tag But yea the for loop doesn't wait
This shouldn't matter though if you use let
Aaha
Its because of the other variables
var chnUser = 'https://wind-bow.glitch.me/twitch-api/users/'+channels[a];    
var userName = chnUser.substring(44, chnUser.length);;
It works if these both are defined with let
let chnUser = 'https://wind-bow.glitch.me/twitch-api/users/'+channels[a];    
let userName = chnUser.substring(44, chnUser.length);;
h1tag
@h1tag

@alpox

This shouldn't matter though if you use let

why?

Faisal
@Faisa1khan
image.png
alpox
@alpox
@h1tag it matters when you use var to define a variable - because a variable declared with var is defined in full function scope - if you change it in another iteration, the value will have changed in the whole function (Also for the last iteration)
If you use let, the variable will be block scoped - means that it will preserve its state and will only be defined in its own block of code. This makes it possible that the variable stays the same if you do an asynchronous request and use the variable in the same block
Its bit hard to understand for new people here, but i usually tell to use let instead of var for that they don't have to rewrite the whole loop stuff :-)
@rfvergeldedios :point_up: 1. Juni 2017 11:23
Cato Myhre
@Zalmez
@alpox wut, explain a little more.
Faisal
@Faisa1khan
plzzz help why the navbar ain't align properly https://codepen.io/Hackplacea/pen/BZBBxO?editors=1000#0
Cato Myhre
@Zalmez
like how?
alpox
@alpox
@Zalmez You mean the jquery thing?
Cato Myhre
@Zalmez
yeah
alpox
@alpox
@Zalmez In the settings -> javascript
You have now bootstrap on the first line
h1tag
@h1tag
@alpox I read that in YDKJS, but I think I need to review it. Thank you
CamperBot
@camperbot
h1tag sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:warning: h1tag already gave alpox points
alpox
@alpox
But that won't work. Bootstrap depends on jquery - it cannot work without it. @Zalmez
Therefore, jQuery has to be on the first line and bootstrap on the second (jQuery must be loaded before the boostrap javascript loads)
Radek
@radekjohn
OK, thanks a lot for consultations. see you all later
alpox
@alpox
@radekjohn :wave:
Faisal
@Faisa1khan
@alpox plzzz help why the navbar ain't align properly https://codepen.io/Hackplacea/pen/BZBBxO?editors=1000#0
Cato Myhre
@Zalmez
hmm, is there a way for codepen to set it as a priority? can't see anything in the settings
rfvergeldedios
@rfvergeldedios
@alpox So, 'let' works like a local variable in a function? In my case it attaches to the for-loop?
alpox
@alpox
@Hackplacea You use bootstrap version 3 definitions but included version 4 of bootstrap in your pen.
Your navbar works when you remove the bootstrap css and add this instead:
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css
Its a link to the css of version 3
@rfvergeldedios let works like a local variable in a block - so it attaches to always one iteration of the for-loop.
It would also be defined only in its own if block if you define it there:
if(true) {
    let foo = "bar";
    console.log(foo);
}
console.log(foo); // ERROR!!!
While:
if(true) {
    var foo = "bar";
    console.log(foo);
}
console.log(foo); // Prints "bar"
Matthias Lang
@MatLang
Hey guys, currently working on the Build a tribute page. (https://codepen.io/ltcMatt/pen/wewvwO) I want to align the two portrait pictures in such a way that the two of them are under each other, and on the right of them the text is displayed. I tried doing that with bootstrap. Can you guys please help me out how to do this? Thanks.