These are chat archives for FreeCodeCamp/HelpFrontEnd

10th
Sep 2017
Eric Hasegawa
@EricHasegawa
Sep 10 2017 01:28
Can anyone here help me with some javascript or no, no one in the other chat is replying
Elias Cygnus
@eliascygnus
Sep 10 2017 01:28
some1 is there?
Eric Hasegawa
@EricHasegawa
Sep 10 2017 01:29
What? @eeeeeek
just1witness
@just1witness
Sep 10 2017 02:09
@EricHasegawa What's your question?
Engjell Bislimi
@Engjell00
Sep 10 2017 02:48
@eweiss17 thanks ! that's what I wanted
CamperBot
@camperbot
Sep 10 2017 02:48
engjell00 sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 596 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Caleb Fetzer
@lqze
Sep 10 2017 03:11
Hi Everyone, could anyone think of a reason as to why a piece of JS would run on iPhone 6 but not on an iPad 3?
Tom
@moT01
Sep 10 2017 03:25
sounds like browser issue, check the versions maybe
Caleb Fetzer
@lqze
Sep 10 2017 03:25
Yeah..using ES6 code on old safari does not work
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:28
@lqze :- @lqze said a piece of code.Could be ES5 also!
Caleb Fetzer
@lqze
Sep 10 2017 03:29
I’ve been writing a lot of es6 code so everything is let and const this
:D
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:32
@lqze be more specific buddy. May be it's a DOM problem.And yeah IPhone 6's browser is newer than IPad 3, So maybe the piece of code is unsupported by the browser!
Caleb Fetzer
@lqze
Sep 10 2017 03:33
Yeah sorry for the brevity —i’m just making the code work now for older versions of Safari as I need to support early gen iPads, so I’ll be able to fix it up tonight. Thanks!
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:34
@lqze are you doing a job bro?
Caleb Fetzer
@lqze
Sep 10 2017 03:34
Yep!
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:34
Nicee
Caleb Fetzer
@lqze
Sep 10 2017 03:35
Fake it till you make it :)
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:35
Then why are you still in freecodecamp?
Caleb Fetzer
@lqze
Sep 10 2017 03:35
I learnt off fcc
and also other methods
but I’m still a beginner in many aspects
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:35
oh okay
Caleb Fetzer
@lqze
Sep 10 2017 03:35
if you have a job you aren’t allowed in here :)?
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:36
No no that's not the case!!! i'm just asking
Caleb Fetzer
@lqze
Sep 10 2017 03:37
look look I’ll go okay..will it make you happy?
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:37
Hey bro what's your favorite technology?
Caleb Fetzer
@lqze
Sep 10 2017 03:37
um
Javascript :D?
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:37
i am sorry if you're somewhat hurt @lqze
Caleb Fetzer
@lqze
Sep 10 2017 03:38
haha I’m just kidding mate
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:38
thanks
are you an experience developer?
Caleb Fetzer
@lqze
Sep 10 2017 03:39
not really
but I have a comsci degree
I work in sales
but one thing I’m trying to remember
is because I’m using a a for loop to assign an event handler to a list of element
and I want a function to fire only on the element in the for loop - I can only remember how to do it using anonymous functions
e.g.
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:43
a for loop to assign an event handler? Not so sure. Can u show us the code?
Caleb Fetzer
@lqze
Sep 10 2017 03:43
For (var i = 0; i < array.length; i++) {
  element[i].addEventListener(‘click’, () => { //do stuff });
}
so the // do stuff part will only start when an element[i] is clicked
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:46
really? how is that working out for u?
Caleb Fetzer
@lqze
Sep 10 2017 03:49
Well?
Muhammad Ruhul Amin
@gskls
Sep 10 2017 03:49
No it shouldn't work!!
is it working?
Do u know about "variable hoisting"
any way u know react bro?
Caleb Fetzer
@lqze
Sep 10 2017 05:25
a bit :)
rafaelmonroy
@rafaelmonroy
Sep 10 2017 06:46
hey whats up guys, quick questions for anyone willing to answer, just curious:
how far are you in FCC?
did you have any previous code experience or did you learn everything here?
after completing FCC (the legit way not just copying and pasting code) would a camper have enough knowledge to get hire as a developer or at least have the skill set to develop most apps that clients might want?
just wondering…. thanks!
heroiczero
@heroiczero
Sep 10 2017 09:02
Caleb Fetzer
@lqze
Sep 10 2017 09:54
You’ll never ever ever have the skill set to develop what clients want
Because they ask for the most bizarre things sometimes
silver537
@silver537
Sep 10 2017 10:13
Wth
That was a weird convo
Rabin Shrestha
@jyapujuju
Sep 10 2017 11:27
//noprotect

function smallestCommons(arr) {
  var count = 1;
  var gcd =1;
  var b=[];
  var higher;
  var lower;
  var flag;
  if (arr[0]<arr[1]){
    higher = arr[1];
    lower = arr[0];

  }
  else {
    higher = arr[0];
    lower = arr[1];
  }

  for(var i=lower;i<=higher;i++){
    gcd = gcd * i;
  }


  for (var k=1; k<gcd; k++){
     for ( var j=lower; j<=higher; j++){
       if ( k%j==0){
         flag ++;
       }
       else {
         flag = 0;
       }
     }
     if (flag == higher){
         break;       
     }
  }
  return k;

}


smallestCommons([13,1]);
cant pass last one
https://www.freecodecamp.org/challenges/smallest-common-multiple
K L Bhanu
@klbm9999
Sep 10 2017 11:36
hello everyone, logged in after quite some time
just1witness
@just1witness
Sep 10 2017 11:55
@jyapujuju Maybe I'm crazy but it look's like, if k is an evenly divisible by j, you increase flag by one, if not you return it to zero. I haven't had any coffee yet, but if it keeps re initializing to 0 how does it reach == to higher?
Caleb Fetzer
@lqze
Sep 10 2017 12:11
what is this excercise @jyapujuju ? Find the Smallest Common Multiple of two elements?
Zhanibek
@zhann1982
Sep 10 2017 13:03
Hello, everyone! I have problem with my codepen account. I cannot enter my account after i created pen with vue.js . The code in that pen makes my brawser to hang and freeze. Please, tell me how I can contact the codepen team and remove the last pen?
Caleb Fetzer
@lqze
Sep 10 2017 13:09
Is there not a setting you can have to prevent your pens running on page load?
Tom
@moT01
Sep 10 2017 13:13
yes, there is @lqze
click settings -> behavior
Zhanibek
@zhann1982
Sep 10 2017 13:14
@moT01 , @lqze I cannot enter my acount and all my pens
Tom
@moT01
Sep 10 2017 13:14
actually, maybe that's not what you're looking for
on page load? or on a file change?
@zhann1982 can you get to all the other pens?
Zhanibek
@zhann1982
Sep 10 2017 13:15
it freezes on the main page of my account https://codepen.io/zhann1982
I cannot enter any pen of mine
Try to enter https://codepen.io/zhann1982 , please
Rabin Shrestha
@jyapujuju
Sep 10 2017 13:17
@lqze yes
http://codepen.io/zhann1982?turn_off_js=true
Zhanibek
@zhann1982
Sep 10 2017 13:19
@moT01 you saved my buttons :) Thank you so much!
CamperBot
@camperbot
Sep 10 2017 13:19
zhann1982 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 847 | @mot01 |http://www.freecodecamp.com/mot01
Tom
@moT01
Sep 10 2017 13:20
that worked?
LydaTech
@lydatech
Sep 10 2017 13:33
Anyone else using npm to install bootstrap?
Jack Lyons
@JackEdwardLyons
Sep 10 2017 13:40

hi guys, does anyone know of any similar plugins to this swiper? basically i have a horitzontal list of items and want to let the user swipe left and right... Similar to the functionality on google and popular sites these days

http://horizon-swiper.sebsauer.de/

not reall swipe, but simplt click left and right like a slider gallery kinda
HowdyHero
@HowdyHero
Sep 10 2017 13:42
hello guys, I'm working to build a website from scratch with html5 and css3. Is anyone with a little experince willing to help me? :D
Morchid Chellali
@Morched23MJ
Sep 10 2017 13:44
@JackEdwardLyons, http://kenwheeler.github.io/slick/, like this?
Tom
@moT01
Sep 10 2017 13:44
@HowdyHero whats up
Morchid Chellali
@Morched23MJ
Sep 10 2017 13:45
@HowdyHero, you can start, and come here for help whenever you need.
HowdyHero
@HowdyHero
Sep 10 2017 13:47
@moT01 Im great, I want to help a friend build a presentation website for his little hair salon, I have made experiments but Im not really sure how to make few things for the page
Tom
@moT01
Sep 10 2017 13:48
is there something specific you want to make?
HowdyHero
@HowdyHero
Sep 10 2017 13:48
@Morched23MJ I’ve already started, I have made myself a simple tamplet and I also bought one already made but Im not really sure how to replace the context and images with the ones that I want
Tom
@moT01
Sep 10 2017 13:49
what does your current progress look like
heroiczero
@heroiczero
Sep 10 2017 13:49
@HowdyHero do you have a link to the site or some code
HowdyHero
@HowdyHero
Sep 10 2017 13:50
yes, I was just searching google how to share the code written so far
Jack Lyons
@JackEdwardLyons
Sep 10 2017 13:52
yeah, that might work @Morched23MJ thanks :)
CamperBot
@camperbot
Sep 10 2017 13:52
jackedwardlyons sends brownie points to @morched23mj :sparkles: :thumbsup: :sparkles:
:cookie: 303 | @morched23mj |http://www.freecodecamp.com/morched23mj
HowdyHero
@HowdyHero
Sep 10 2017 14:01
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="Affordable and professional hair salon">
        <meta name="keywords" content="hair salon, barber shop, haircut, beauty salon, frizerie">
        <meta name="author" content="Howdy Hero">
        <title>Sebastian Moldovan | Welcome</title>
        <link rel="stylesheet" type="text/css" href="css/sb.css">
        <link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
    </head>

    <body>
    <!-- *************** Header **************** -->
        <header>
            <div class="container">
                <div id="branding">
                    <h1><span class="highlight">Sebastin Moldovan</span></h1>
                    <h4>Hair Salon | Barber Shop</h4>
                </div>

                <nav>
                    <ul>
                        <li class="current"><a href="sm.html">Home</a></li>
                        <li><a href="about.html">About</a></li>
                        <li><a href="services.html">Services</a></li>
                        <li><a href="contact.html">Contact</a></li>
                    </ul>
                </nav>
            </div>
        </header>
    <!-- *************** End of Header **************** -->

    <!-- *************** Showcase *************** -->
        <section id="showcase">
            <div class="container">
                <h1>Meet Your New Favorite Barber Shop</h1>
                <p><strong>Sebastian Moldovan</strong> For All Your Hairdressing Needs</p>
            </div>
        </section>

    <!-- *************** Newsletter **************** -->
        <section id="newsletter">
            <div class="container">
                <h2>Call Us Today | 020 3105 4922</h2>
            </div>
        </section>
    <!-- *************** Boxes **************** -->
        <section id="boxes">
            <div class="container">
                <div class="box">
                    <i class="fa fa-cog fa-3x" aria-hidden="true"></i>
                    <h3>About Us</h3>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                    tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
                    quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                    consequat.</p>
                </div>

                <div class="box">
                    <i class="fa fa-scissors fa-3x" aria-hidden="true"></i>
                    <h3>Services</h3>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                    tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
                    quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                    consequat.</p>
                </div>

                <div class="box">
                    <i class="fa fa-phone fa-3x" aria-hidden="true"></i>
                    <h3>Contact Us</h3>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                    tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
                    quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
                    consequat.</p>
                </div>
            </div>            
        </section>

        <footer>
            <div class="container">
                <p>Howdy Hero Design, Copyright &copy; 2017</p>

            </div>
        </footer>



    </body>
</html>
Im not really sure if this help
Tom
@moT01
Sep 10 2017 14:06
@HowdyHero it helps a little, put content you want in the <p> </p>
<p> content here </p>
p means paragraph
HowdyHero
@HowdyHero
Sep 10 2017 14:07
Screen Shot 2017-09-10 at 15.04.32.png
Screen Shot 2017-09-09 at 18.18.25.png
Screen Shot 2017-09-10 at 15.04.32.png
Screen Shot 2017-09-09 at 18.17.47.png
Screen Shot 2017-09-10 at 15.04.32.png
@moT01 yes I know that I have to add my contect inside the <p> tags
HowdyHero
@HowdyHero
Sep 10 2017 14:13
@moT01 I would need help to add an Image Slider, good backgorund image or background colors that looks good together, how to create a small free logo and add it at the corect size
or should I try harder and figure it out myself ?
Tom
@moT01
Sep 10 2017 14:16
well, that's not exactly one little thing you need help with
John Paul Penaloza
@johnpyp
Sep 10 2017 14:16
What is the easiest way to use php to make basic templating in html easier?
Tom
@moT01
Sep 10 2017 14:16
the background images are probly in the .css file, look for a background property
John Paul Penaloza
@johnpyp
Sep 10 2017 14:17
I just want to seperate my html things into components, not looking for any advanced functionality
HowdyHero
@HowdyHero
Sep 10 2017 14:20
@moT01 would you like to work with me at this little project few hours ? :D
Rabin Shrestha
@jyapujuju
Sep 10 2017 14:20
//

function smallestCommons(arr) {
  var count = 1;
  var gcd =1;
  var b=[];
  var higher;
  var lower;
  var flag;
  if (arr[0]<arr[1]){
    higher = arr[1];
    lower = arr[0];

  }
  else {
    higher = arr[0];
    lower = arr[1];
  }

  for(var i=lower;i<=higher;i++){
    gcd = gcd * i;
  }


  for (var k=1; k<gcd; k++){
     for ( var j=lower; j<=higher; j++){
       if ( k%j==0){
         flag ++;
       }
       else {
         flag = 0;
       }
     }
     if (flag == higher){
         break;       
     }
  }
  return k;

}


smallestCommons([13,1]);
wont pass the last condition
Tom
@moT01
Sep 10 2017 14:20
@HowdyHero does it pay?
i gave ya a few tips, if you get stuck on something, come ask - i might be around... there's some good coding lessons at https://www.freecodecamp.org/
HowdyHero
@HowdyHero
Sep 10 2017 14:23
he’ll pay me 100 pounds cuz he’s a friend and I wanted to learn by building my first website, so it was like a win win situation. If we get the job done and have our work live I’ll gove 50% (50 pounds) @moT01
Im not doing it for money, I just want to get this job done so I can start proggresing through some online courses and learn more
Tom
@moT01
Sep 10 2017 14:26
you stuck on something? did you get the background images you want in there?
did you find the css file i mentioned?
HowdyHero
@HowdyHero
Sep 10 2017 14:26
@moT01 I just got one man, but I dont know how to resize them to fit perfectly. Im stuck on few things
HowdyHero
@HowdyHero
Sep 10 2017 14:29
this is my css man
body {
    font: 1em/1.5 Arial, Helvetica, sans-serif;
    padding: 0;
    margin: 0;
    background-color: #f4f4f4;
}
/* GLOBAL */
.container {
    width: 80%;
    margin: 0 auto;
    overflow: hidden;
}

ul {
    margin: 0;
    padding: 0;
}

.dark {
    padding: 15px;
    background: #35424a;
    border: 0;
    color: #fff;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Header */

header {
    background: #35424a;
    color: #fff;
    padding-top: 15px;
    min-height: 40px;
    border-bottom: #e8491d 3px solid;
}

header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

header a:hover {
    color: #e8491d;
}

header li {
    float: left;
    display: inline;
    margin: 0 10px;
    border-bottom: 1px solid  #e8491d;
}


header #branding {
    float: left;
}

header #branding h1 {
    margin: 0;
    color: #e8491d;
}

.highlight {
    font: 1em/1.5 Arial, Helvetica, sans-serif;
    font-weight: bold;
    margin: 0;
    color: #e8491d;
}

header h4 {
    margin: 0 0 10px 0;
    color: #fff;
    font-weight: bold;
}

header nav {
    float: right;
    line-height: 25px;
    margin-top: 10px;
}


/************** showcase **************/

#showcase {
    width: 100%;
    min-height: 500px;
    color: #fff;
    background: /*("https://kiryusblog.com/wp-content/uploads/hair-stylist-1514894_960_720.jpg"),*/ url('https://media-private.canva.com/MACgkcpP8g0/1/screen.jpg?response-expires=Sat%2C%2009%20Sep%202017%2020%3A25%3A28%20GMT&AWSAccessKeyId=AKIAJJATJK7JCUD446NA&Expires=1504988728&Signature=bF6dom9B6u4FCQW1PZveyk4nNrA%3D');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
}

#showcase h1 {
    margin-top: 150px;
    font-size: 45px;
    margin-bottom: 10px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
}

#showcase p {
    font-size: 20px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
}




/********* End Of Showcase **********/

/********* Newsletter ***********/
#newsletter {
    text-align: center;
    color: #fff;
    background: #35424a;
}

#newsletter h2 {
    margin: 0;
    padding: 12px;
    font-size: 1.3em;
    color: #e8491d;
}

/******** Boxes **********/

#boxes {
    margin-top: 40px;
}

#boxes .box {
    float: left;
    text-align: center;
    width: 30%;
    padding: 10px;
}

#boxes .box i {
    padding: 20px;
    color: #e8491d;
    border: 1px solid #e8491d;
    border-radius: 50%;
}

/*********** Side Bar *********/

aside#sidebar {
    float: right;
    width: 30%;
    margin-top: 65px;
}

/******** Main Col *********/

article#main-col {
    float: left;
    width: 65%;
    margin-top: 10px;
}

/***********Services***********/

ul#services li {
    list-style: none;
    padding: 20px;
    border: 1px solid #ccc;
    margin-bottom: 5px;
    background: #e6e6e6;
}

/*********** Footer ***********/

footer {
    padding: 5px;
    margin-top: 20px;
    color: #fff;
    background-color: #35424a;
    text-align: center;
}


/******** Media Queries **********/
@media(max-width: 768px) {
    header #branding,
    header nav,
    header nav li,
    #newsletter h2,
    #boxes .box,
    article#main-col,
    aside#sidebar {
        float: none;
        text-align: center;
        width: 100%
    }
    header {
        padding: 10px;
    }

    #showcase h1 {
        margin-top: 75px;
    }

}
@moT01 thanks for the website
CamperBot
@camperbot
Sep 10 2017 14:29
howdyhero sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 848 | @mot01 |http://www.freecodecamp.com/mot01
ADIL KARMOUZI
@mradil16
Sep 10 2017 14:41
Hello guys . Javascript doesn't work on IE 11 and old versions ? is there anything I can do to make it work ?
Ken Haduch
@khaduch
Sep 10 2017 14:45
@mradil16 - it doesn't work at all, or not working correctly? Many JavaScript packages have implemented compatible functions for IE. if it doesn't work at all, check the settings of the browser to make sure JS isn't disabled.
ADIL KARMOUZI
@mradil16
Sep 10 2017 14:48
it shows the following message : To help protect your security, Internet explorer has restricted this web page from running scripts or ActiveX controls that could access your computer.
Maciej Dębowski
@debofsky
Sep 10 2017 16:04
Hey! I'm about to start my first projects (static websites), but I feel like FCC is not exactly up to date with CSS materials. Could someone recommend a good resource(s) to learn design the right way? With flexbox, grid etc.? Many thanks in advance!
Adeel Salim
@adeelsalim
Sep 10 2017 16:15
Flexbox.io is a good source to learn flexbox they are 20 or so free videos
@debofsky Flexbox.io is a good source to learn flexbox they are 20 or so free videos
Tom
@moT01
Sep 10 2017 16:17
@debofsky there's an fcc version in testing that includes more of that
might have some bugs
rafaelmonroy
@rafaelmonroy
Sep 10 2017 16:53
@heroiczero thanks man that really puts thing into perspective!
CamperBot
@camperbot
Sep 10 2017 16:53
rafaelmonroy sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1712 | @heroiczero |http://www.freecodecamp.com/heroiczero
Henry
@GitHub-Henry
Sep 10 2017 16:55
@mradil16 if you can, do yourself a favor and use chrome
Morchid Chellali
@Morched23MJ
Sep 10 2017 17:42
Anyone here knows a great tutorial, preferably short one, on how to make a responsive navbar?
Liam Docherty
@ldocherty1
Sep 10 2017 21:26
@Morched23MJ Another option https://v4-alpha.getbootstrap.com/components/navbar/ if you're using the framework bootstrap v4
Elizabeth Paul
@Kowalatam
Sep 10 2017 21:28
how to add audio to codepen ?
Elizabeth Paul
@Kowalatam
Sep 10 2017 22:48
@piteto yeah.. figured it out already.. thanks
CamperBot
@camperbot
Sep 10 2017 22:48
kowalatam sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 85 | @piteto |http://www.freecodecamp.com/piteto