Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 2020 20:09
    @krisb1220 banned @Gastony
  • May 14 2020 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:38
    @bjorno43 banned @real-action
  • Feb 01 2020 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 2020 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 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
c0d0er
@c0d0er
could anybody help on the following code? it doesnt work now
function per(x){
    var source = [];     // source=dest[j];
var temp=[];
var dest = [];
    for(var k=0;k<x.length;k++){
        recursive(k)
    }
    function recursive(ch){
for (var i = 0; i <= source.length; ++i) {
  temp = source.slice(0);         
  temp.splice(i, 0, ch);          
  dest.push(temp); 
}

for(var j=0;j<dest.length; j++){
    source=dest[j];
}
return dest;
}
}
per('ab')//should return [['a','b'],['b','a']];
Ian Lee
@asparism

@c0d0er not sure, maybe because in your recursive function, you're using the variable source, which was defined inside the function per, so unless you passed

recursive(k, source)

and then

function recursive (ch, source)

i think the scope of the source variable remains inside the first function, and can't be accessed by the second

or define
why is that line pink
c0d0er
@c0d0er
@asparism thanks
CamperBot
@camperbot
c0d0er sends brownie points to @asparism :sparkles: :thumbsup: :sparkles:
:cookie: 271 | @asparism |http://www.freecodecamp.com/asparism
Ian Lee
@asparism
@c0d0er you're welcome
Annu Nirmal
@annunirmal
topic: js calculator
can anyone help me find my mistake in my js code. buttons are not working
http://codepen.io/nirmalannu/pen/ALJOAP?editors=1010
Nitin Chandran Nair
@NitinNair89
@annunirmal Where are you assigning values to the element with "answer" ID? The buttons are working, check the console window. Your console.log statements are displaying the button values
AliceNan
@AliceNan
Hello World! Hello cool coders! I am Alice from Beijing. I heard FreeCodeCamp from a friend @zhihu. I am new on programming. Hope to learn and practice much with you guys. Thank you.
CamperBot
@camperbot

welcome to FreeCodeCamp @AliceNan!

Nitin Chandran Nair
@NitinNair89
Welcome @AliceNan Good to have you here. All the best! :)
Artur Arsalanov
@kurumkan
@AliceNan ni hao. huanying=)
@AliceNan zhe bian hai you yi ge chat room. Shi zhongwende.
Annu Nirmal
@annunirmal
@NitinNair89 yeah i just saw. sorted . thanks alot :)
CamperBot
@camperbot
annunirmal sends brownie points to @nitinnair89 :sparkles: :thumbsup: :sparkles:
:cookie: 275 | @nitinnair89 |http://www.freecodecamp.com/nitinnair89
Nitin Chandran Nair
@NitinNair89
You're welcome! @annunirmal :)
Nitin Chandran Nair
@NitinNair89
Guys, did you sign up to get the TwitchTV API key or hard-coded their response as suggested in http://forum.freecodecamp.com/t/use-the-twitchtv-json-api/19541 ?
kirbyedy
@kirbyedy
@NitinNair89 you have to
Nitin Chandran Nair
@NitinNair89
@kirbyedy I have to what? hard-code or sign up?
kirbyedy
@kirbyedy
sign up to get the client-id
Nitin Chandran Nair
@NitinNair89
then is it secure if the key is visible to the public on codepen and github?
and what are they going to do with it ?
Nitin Chandran Nair
@NitinNair89
I don't exactly know to "hide" api keys.. :(
kirbyedy
@kirbyedy
did you do the weather project ?
Nitin Chandran Nair
@NitinNair89
Um, they can use that key without signing up, isn't it?
yes i did
kirbyedy
@kirbyedy
and what did you do there ?
the api key is visible
I dont think you should worry
its not like you are giving your atm pin code
Nitin Chandran Nair
@NitinNair89
yes, that's what my point is :P
kirbyedy
@kirbyedy
imagine its a school project
everybody has the similar result because everyone is doing the same bloody project
Nitin Chandran Nair
@NitinNair89
Then why did they mention it in the challenge? - "UPDATE: Due to a change in conditions on API usage explained here Twitch.tv now requires an API key, but we've built a workaround. Use https://wind-bow.hyperdev.space/twitch-api instead of twitch's API base URL (i.e. https://api.twitch.tv/kraken ) and you'll still be able to get account information, without needing to sign up for an API key."
twitch tv did not require a key before?
kirbyedy
@kirbyedy
no the key was not needed until recently
Nitin Chandran Nair
@NitinNair89
ahh okay. Let me try then. Thanks @kirbyedy
CamperBot
@camperbot
nitinnair89 sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1472 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
kirbyedy
@kirbyedy
I made mine before that, and it was working, but then it stopped so I had to get the client-id
Nitin Chandran Nair
@NitinNair89
hmm ok
kirbyedy
@kirbyedy
https://wind-bow.hyperdev.space/twitch-api this link does not work for me
Nitin Chandran Nair
@NitinNair89
i think their server is down. It worked yesterday
kirbyedy
@kirbyedy
hyperdev is working normally I just tried my projects
so its something with that specific one
Nitin Chandran Nair
@NitinNair89
ok