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
Marat
@Marat89bluolyu
@longnt80 , @Masd925 thanks !!!
CamperBot
@camperbot
marat89bluolyu sends brownie points to @longnt80 and @masd925 :sparkles: :thumbsup: :sparkles:
:cookie: 533 | @longnt80 |http://www.freecodecamp.com/longnt80
:star2: 4441 | @masd925 |http://www.freecodecamp.com/masd925
Marat
@Marat89bluolyu
But in my code there is a problem. All values of my array are outputed at once.
I need that they a will be display with interval
 function arrayCounter(arr) {
    for (var i = 0; i<arr.length; i++) {
        (function (inner) {
            setTimeout( function() {
                console.log(inner);
            }, 1000)
        })(i);
    }
 }   

arrayCounter([1,2,3,4,5]);
Long Nguyen
@longnt80
@Marat89bluolyu I think you can do that with recursive instead of loop
Jim Tryon
@jimtryon
I think so too
Markus Kiili
@Masd925
@Marat89bluolyu Or use inner*1000
Long Nguyen
@longnt80
^
Mukesh Kumar Angrish
@MukeshAngrish
@longnt80 Sorry, I’m replying late. Thanks your
vertical-align : middle
worked for my Tic Tac Toe app. And about the float you mentioned, can you show me how to use it. I’ve never used that before in my css.
CamperBot
@camperbot
mukeshangrish sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 534 | @longnt80 |http://www.freecodecamp.com/longnt80
Long Nguyen
@longnt80
@MukeshAngrish can you give me the pen again
Mukesh Kumar Angrish
@MukeshAngrish
@longnt80 Here it is.
Long Nguyen
@longnt80
@MukeshAngrish ok here's a simple example of using float:
https://codepen.io/longnt80/pen/NvObYw
Markus Kiili
@Masd925
@MukeshAngrish Shortly put, a floated element is taken out of the normal flow of elements and put to the far right/left of the containing box. The element becomes a block-level element around which other elements can flow.
Mukesh Kumar Angrish
@MukeshAngrish
@longnt80 Ok, thanks. I understand it now. I will probably use it when I re-do my app
CamperBot
@camperbot
mukeshangrish sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:warning: mukeshangrish already gave longnt80 points
Mukesh Kumar Angrish
@MukeshAngrish
@Masd925 Yeah, got it now thanks
CamperBot
@camperbot
mukeshangrish sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4443 | @masd925 |http://www.freecodecamp.com/masd925
Sofus Heggemsens
@Sofeo
can somone help me center the search resoults on my wikipedia viewer?
https://codepen.io/sofeo/pen/ayymja
heroiczero
@heroiczero
Mukesh Kumar Angrish
@MukeshAngrish
@Sofeo Try giving .results class a margin on the left
LiciniusRex
@hashtagyolo1
argh! Diff two arrays is killing me. For some reason I'm gettting 16! true responses and I cannot work out why
function diffArray(arr1, arr2) {
  var newArr = arr1.filter(function(check) {
    for (var i = 0; i < arr1.length; i++) {
      for (var j = 0; j < arr2.length; j++) {
        if (arr1[i] == arr2[j]) {
          console.log(true);
        }
      }
    }
  });

  //console.log(newArr);
  return newArr;
}

diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
oops, nm, fixed that :/
Markus Kiili
@Masd925
@hashtagyolo1 You should note that filter already loops the array arr1. No need to loop it twice.
LiciniusRex
@hashtagyolo1
I'm trying a s;ightly different approach at the moment. Keep forgetting that console.log does not do the same job as return when troubleshooting :/
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
@rajatkhare619 Sorry for the late Response, but I've got something for your picture highlighting now. The idea is, to wrap the image in a container with the same size, then add a pseudo-element to it (I used :before). This pseudo-element is centered and shaped as a circle. Then you can apply a box-shadow to it, which darkens the surrounding (or you can lighten the circle by adding a background-color).
Here's a pen demonstrating it: https://codepen.io/A_A/pen/WEapPG
FakhriAz
@FakhriAz

Hi everyone, the background-image in codepen does not show up any idea. I have already hosted the image in the web and added the link:

body {
position: relative;
background: url('https://i.imgur.com/onZceGF.jpg') no-repeat center fixed;
background-size: cover;

Ghost
@ghost~57b1df1e40f3a6eec05f92a8
@FakhriAz Can you give us the link to your pen?
And just in case, does the body has a width and height?
I did add only one image for now. Everything works fine on Visual Studio
@Otto-AA
alessiochiffi
@alessiochiffi
play with z index
Sorin Ruse
@sorinr
@FakhriAz think your problem is between codepen and imgur. try some other free img hosting and should work
Ghost
@ghost~57b1df1e40f3a6eec05f92a8

@FakhriAz Yeah, Sorin seems right:

"Imgur blocks image requests from CodePen. We can't control that."

FakhriAz
@FakhriAz
@alessiochiffi @Otto-AA @sorinr Thank you. I read this too https://www.reddit.com/r/FreeCodeCamp/comments/49dfm2/what_is_the_besteasiest_place_to_host_images_for/ (Imgur blocks CodePen)
...then I used https://cloudinary.com
It works now.
CamperBot
@camperbot
fakhriaz sends brownie points to @alessiochiffi and @otto-aa and @sorinr :sparkles: :thumbsup: :sparkles:
:cookie: 82 | @alessiochiffi |http://www.freecodecamp.com/alessiochiffi
:cookie: 386 | @otto-aa |http://www.freecodecamp.com/otto-aa
:star2: 1331 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
@FakhriAz :+1: anyway, do not upload any video files with cloudinary coz they will eat your free quota :)
FakhriAz
@FakhriAz
@sorinr All right
Hi, any idea why when in a small viewport the images in the portfolio have white space on the left and right?
https://codepen.io/FakhriAz/pen/KvGaZL?editors=1100
Tom
@moT01
@FakhriAz if you bring up the dev tools in your browser you can see what's taking up that space
looks to be the .thumbnail class