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
Rostyslav
@BeerDRinker
so I need bouth?
kirbyedy
@kirbyedy
I think so
oh you need a client-id as well
Rostyslav
@BeerDRinker
I allready have one
kirbyedy
@kirbyedy
https://api.twitch.tv/kraken/streams/ + user name + client_id
Artur Arsalanov
@kurumkan

@Faredhattab please check this code var t =[[ 4 , 9, 2 ],[ 3 , 5, 7 ],[ 8 , 1 , 6 ]]

console.log(isMagic(t));

function isMagic(array){
var sum = array[0].reduce(function(a,b){return a+b});

for(var i=1; i<array.length; i++){
    var temp = array[i].reduce(function(a,b){return a+b});
    if(temp!==sum){
        return false;
    }
}

for(var i=0; i<array.length; i++){
    var temp = array.map(function(d){return d[i]}).reduce(function(a,b){return a+b});         
    if(temp!==sum){            
        return false;
    }
}

var temp1 = 0;
var temp2 = 0;
for(var i=0; i<array.length; i++){
    temp1+=array[i][i];
    temp2+=array[i][array.length-1-i];
}

if(temp1!==sum||temp2!==sum)
    return false;

return true;

}

@Faredhattab `var t =[[ 4 , 9, 2 ],[ 3 , 5, 7 ],[ 8 , 1 , 6 ]]

console.log(isMagic(t));

function isMagic(array){
var sum = array[0].reduce(function(a,b){return a+b});

for(var i=1; i<array.length; i++){
    var temp = array[i].reduce(function(a,b){return a+b});
    if(temp!==sum){
        return false;
    }
}

for(var i=0; i<array.length; i++){
    var temp = array.map(function(d){return d[i]}).reduce(function(a,b){return a+b});         
    if(temp!==sum){            
        return false;
    }
}

var temp1 = 0;
var temp2 = 0;
for(var i=0; i<array.length; i++){
    temp1+=array[i][i];
    temp2+=array[i][array.length-1-i];
}

if(temp1!==sum||temp2!==sum)
    return false;

return true;

}

`

f*k
Theodore P.
@Ierofantis
can anyone explain to me why when I append text it stays for a few seconds and after it dissapears? here is my pen
http://codepen.io/Ierofantis/pen/pEpYGp?editors=1010
Stephen James
@sjames1958gm
@Ierofantis You have your input inside a form and the browser wants to submit that form and that causes a refresh.
Make this change to call preventDefault (which prevents this default behavior)
$("#input").click(function(e) {
  e.preventDefault();
Theodore P.
@Ierofantis
@sjames1958gm many thanks!
CamperBot
@camperbot
ierofantis sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3784 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Joshua Faggion
@joshfaggion11
What are some good API's for a random quote machine?
Or libary.
Jess Alexander
@jess-alexander
@joshfaggion11 I finished that challenge last week and made my own giant array of quotes. Using an API makes so much more sense...
Ghulam Shabir
@ghulamshabir
gist @joshfaggion11
Jess Alexander
@jess-alexander
@joshfaggion11 have you looked at https://quotesondesign.com/api-v4-0/?
Joshua Faggion
@joshfaggion11
Thanks for the help guys!
Ghulam Shabir
@ghulamshabir
@joshfaggion11 mention them who help you
Sammy
@ManBearPigg
I have a flex box that contains a form that contains one text input. The form and input width can only be changed using em or px, not percent. Any ideas why I can't change width with percent? The form is contained within a nav element of width 100%
Joshua Faggion
@joshfaggion11
I know. Thx @ghulamshabir Thanks @jess-alexander
CamperBot
@camperbot
:cookie: 109 | @jess-alexander |http://www.freecodecamp.com/jess-alexander
joshfaggion11 sends brownie points to @ghulamshabir and @jess-alexander :sparkles: :thumbsup: :sparkles:
:cookie: 511 | @ghulamshabir |http://www.freecodecamp.com/ghulamshabir
Ghulam Shabir
@ghulamshabir
@joshfaggion11 :smile:
Joshua Faggion
@joshfaggion11
I have like 300 brownie points. But I've been inactive recently.
Ghulam Shabir
@ghulamshabir
@joshfaggion11 you dont need repeated thanking by the way
Jess Alexander
@jess-alexander
lol - I think that was my first. :p
Ghulam Shabir
@ghulamshabir
@joshfaggion11 @jess-alexander brownie points are our earnings for this 24 hour services lol
Joshua Faggion
@joshfaggion11
@ghulamshabir I'de forgotten that.
Spyrantis Theodoros
@thodorisanta

http://codepen.io/oshikurou/pen/LkvoyX

So im currently working on the : RAMDOM QUOTE GENERATOR project.
and i have no idea whatsoever on how to make the "tweet" button to actually tweet the quote that appears.
And i also wanna make the colors to change smoothly like in the freecodecamp's site "https://codepen.io/FreeCodeCamp/full/ONjoLe/"

Jess Alexander
@jess-alexander
@thodorisanta You've got to use Javascript to create a tweet button. First, include the twitter widget in your javascript file, then check out the javascript factory function section. https://dev.twitter.com/web/tweet-button
I can't remember where I found this widget code - but it was copy and pasted from dev.twitter.com so I'll share it with you! ```//////////////////////////////////////////////////
////////////// twitter functionality ////////////
//////////////////////////////////////////////////
window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
if (d.getElementById(id)) return t;
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
  t._e = [];
  t.ready = function(f) {
    t._e.push(f);
  };

  return t;
}(document, "script", "twitter-wjs"));```
Let's try that again...
//////////////////////////////////////////////////
    ////////////// twitter functionality   ////////////
    //////////////////////////////////////////////////
      window.twttr = (function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0],
        t = window.twttr || {};
      if (d.getElementById(id)) return t;
      js = d.createElement(s);
      js.id = id;
      js.src = "https://platform.twitter.com/widgets.js";
      fjs.parentNode.insertBefore(js, fjs);

      t._e = [];
      t.ready = function(f) {
        t._e.push(f);
      };

      return t;
    }(document, "script", "twitter-wjs"));
Benigno Moico
@Noigallardo
hello world
CamperBot
@camperbot

welcome to FreeCodeCamp @Noigallardo!

Benigno Moico
@Noigallardo
hi, how to put image in Tribute Page,
Ghulam Shabir
@ghulamshabir
@Noigallardo you should use an online service to store the image and use that url in codepen
Dylan Noble
@drnoble88
I am working on the build a tribute page and can't figure out how to get the bullet points in the middle like the example. Can anyone help?
Ghulam Shabir
@ghulamshabir
@drnoble88 <ul> <li> </li> </ul>
Benigno Moico
@Noigallardo
@ghulamshabir ... how
Ghulam Shabir
@ghulamshabir
@drnoble88 for moving them to middle of the page you can use bootstrap's columns
Benigno Moico
@Noigallardo
an you guide me
Jess Alexander
@jess-alexander
@Noigallardo , I like using photobucket to upload pictures. Then right click the photo you like, and get the imageURL
Dylan Noble
@drnoble88
@ghulamshabir I have the bullet points but I cannot get them centered.
Ghulam Shabir
@ghulamshabir
@Noigallardo imgur.com/
Benigno Moico
@Noigallardo
@jess-alexander thank you
CamperBot
@camperbot
noigallardo sends brownie points to @jess-alexander :sparkles: :thumbsup: :sparkles:
:cookie: 110 | @jess-alexander |http://www.freecodecamp.com/jess-alexander