These are chat archives for FreeCodeCamp/Help

22nd
Aug 2017
Nick Forlivio
@whackdev
Aug 22 2017 00:36
has anyone here completed the dynamic api vote app?
Kyle Holm
@thekholm80
Aug 22 2017 00:40
@whackdev do you mean this one?
jordanvj27
@jordanvj27
Aug 22 2017 01:58
Hey there
Can anyone suggest me how to learn node.js
Olga C
@Octopinky
Aug 22 2017 02:10
You can try codecademy.
Alex
@cyberpunk1971
Aug 22 2017 02:13
hi, can anyone here help with errors when trying to push to github from command line
jordanvj27
@jordanvj27
Aug 22 2017 03:17
Thank you @Octopinky
CamperBot
@camperbot
Aug 22 2017 03:17
jordanvj27 sends brownie points to @octopinky :sparkles: :thumbsup: :sparkles:
:cookie: 373 | @octopinky |http://www.freecodecamp.com/octopinky
Albert Cardona II
@daddycardona
Aug 22 2017 03:19
send your link @cyberpunk1971
Justin Barcelos
@justinbarcelos
Aug 22 2017 05:50

Does anyone know why URL prefilling on Amazon's website doesn't work?
Like if I enter:
https://stackoverflow.com/questions/4024271/rest-api-best-practices-where-to-put-parameters?q=20

The search box (input 'q') on the website will show the number 20. But if I try that on Amazon's website it doesn't work...

prakash chandra yadav
@prakashyadav008
Aug 22 2017 05:55
hey anyone
a little help
i added the font awesome cdn but still cant see the icon i am using
vínαч puppαl
@vinaypuppal
Aug 22 2017 05:59
@prakashyadav008 you added fontawesome link in Settings -> Javascript tab. Add it in settings -> css tab for it to work
prakash chandra yadav
@prakashyadav008
Aug 22 2017 05:59
ohh my bad thanks@vinaypuppal
thats why i was thinking i am forgetting something
thanks @vinaypuppal
vínαч puppαl
@vinaypuppal
Aug 22 2017 06:03
@prakashyadav008 No problem, Next time If something does not work as expected be sure to check chrome or your browser console it shows whats the error.
Suhail Bahawi
@IKing4ever1
Aug 22 2017 06:28
....
hello

<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="utf-8">
<title>jsCourse</title>
<link type="text/css" href="Style.css">
</head>
<body>
<h1>Hello Js Test</h1>
<form action="" method="POST">
<label for="name">Write your name here:</label>
<input id="name" class="input">

<?php

if(isset($_POST[name])) {

$name = $_POST[name];

echo $name;

}

?>

</form>

<script src="script.js"></script>
</body>
</html>

what's problem in these codes
?
the probbblem = Notice: Use of undefined constant name - assumed 'name' in C:\xampp\htdocs\jscourse\index.php on line 16
the lang is php
..
````
dd
dsds
penguio
@penguio
Aug 22 2017 06:30
@IKing4ever1 i think your name is not defined
Notice: Use of undefined constant name - assumed 'name'
like your variable when you use it
Suhail Bahawi
@IKing4ever1
Aug 22 2017 06:38
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>jsCourse</title>
        <link type="text/css" href="Style.css">
    </head>
    <body>
        <h1>Hello Js Test</h1>
        <form action="" method="POST">
        <label for="name">Write your name here:</label>
        <input id="name" name="name" class="input"> &nbsp;&nbsp;&nbsp;
        <input type="submit" name="submit" id="submit">

            <?php

            if(isset($_POST['submit'])) {  


            $name = $_POST['name'];

            echo $name;

            }

            ?>

        </form>

        <script src="script.js"></script>
    </body>
</html>
now it's ok
i've add submit
...
Machiel Van Der Toorn
@mcvdt07
Aug 22 2017 07:48
hello world
heroiczero
@heroiczero
Aug 22 2017 07:49
@mcvdt07 Welcome to Free Code camp :clap: community
Machiel Van Der Toorn
@mcvdt07
Aug 22 2017 07:51
@heroiczero thanks byt ive been here befpore, i completed my free code camp FED certificate
CamperBot
@camperbot
Aug 22 2017 07:51
mcvdt07 sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1636 | @heroiczero |http://www.freecodecamp.com/heroiczero
Machiel Van Der Toorn
@mcvdt07
Aug 22 2017 07:52
@heroiczero you have experience with python?
heroiczero
@heroiczero
Aug 22 2017 07:54
not that much experience in python @mcvdt07
Machiel Van Der Toorn
@mcvdt07
Aug 22 2017 07:56
oh darn...
Owais Ahmed
@owaisehmed
Aug 22 2017 08:38
How can i shift the nav bar contents towards right side
??
heroiczero
@heroiczero
Aug 22 2017 08:41
@owaisehmed do you want to align it right? try navbar-right or look at the example here: https://stackoverflow.com/questions/19733447/bootstrap-navbar-with-left-center-and-right-aligned-items
Owais Ahmed
@owaisehmed
Aug 22 2017 09:04
Why is the collapse button not working?
https://codepen.io/OwaisEhmed/pen/zdRozE
heroiczero
@heroiczero
Aug 22 2017 09:05
@owaisehmed you need bootstrap in Setting->Javascript
vínαч puppαl
@vinaypuppal
Aug 22 2017 09:05
@owaisehmed Becoz you forgot to link bootstrap.js in Settings -> Javascript
Owais Ahmed
@owaisehmed
Aug 22 2017 09:07
Thanks @vinaypuppal @heroiczero
CamperBot
@camperbot
Aug 22 2017 09:07
:star2: 1638 | @heroiczero |http://www.freecodecamp.com/heroiczero
:cookie: 711 | @vinaypuppal |http://www.freecodecamp.com/vinaypuppal
owaisehmed sends brownie points to @vinaypuppal and @heroiczero :sparkles: :thumbsup: :sparkles:
Owais Ahmed
@owaisehmed
Aug 22 2017 09:13
@heroiczero https://www.dawn.com/
View this site in mobile mode. use the navbar collapse button. The collapsible items are shown in a short box rather than the whole container. Do u know how to modify it to that>
?
Emmanuel Akodia
@akodiaemma
Aug 22 2017 11:21
how can i create 241 active emails in under 2 hours
Rishabh Kashyap
@iamrkcheers
Aug 22 2017 11:21
I am at FCC Data Visualisation -> React projects -> Camper Leaderboard project.
My 'componentDidMount()' isn't working in the 'Table' component class.
https://codepen.io/iamrkcheers/pen/ayYmMZ?editors=0010
Any help is appreciated. Thank You.
Emmanuel Akodia
@akodiaemma
Aug 22 2017 11:21
how can i create 241 active emails in under 2 hours
Stephen James
@sjames1958gm
Aug 22 2017 13:48
@iamrkcheers How is it not working - it is getting called.
Tim
@Genjack
Aug 22 2017 13:48
Hi guys! quick open and rookie question about centring a navigation bar if anyone's interested
limbu
@limbu
Aug 22 2017 14:32
has anybody had an issue when trying to set the width of a select dropdown box?
artbohr
@artbohr
Aug 22 2017 14:53
@limbu you need to post your code if you want anybody to help you, coz most of the times is the wrong interaction between elements, but try to check this link stackoverflow
Rajan
@ProgramNovice
Aug 22 2017 14:57
Hi guys
i have a doubt to ask you all
for the "degrade of fonts" rite
can we include more than 2 fonts?
example:
p{
font-family: Helvetica, Sans-Serif, Arial;
}
Joshua Friedman
@jsf2008
Aug 22 2017 14:59
Anyone got a second to answer a quick error I'm getting with the backend development portion of FCC
Darren
@DarrenfJ
Aug 22 2017 15:05
monring fCC
@jsf2008 what's up? haven't done that back-end part for a while but I try to answer what I can
Joshua Friedman
@jsf2008
Aug 22 2017 15:06
I'm getting a PUT 402 error
I think the module is bugged
```
Darren
@DarrenfJ
Aug 22 2017 15:06
@ProgramNovice in life yes, you should add more fonts for degrading...
Joshua Friedman
@jsf2008
Aug 22 2017 15:06
npm ERR! publish Failed PUT 402
npm ERR! code E402
npm ERR! You must sign up for private packages : @jsf2008/quit
Darren
@DarrenfJ
Aug 22 2017 15:06
in the fCC exercises they are sometimes more specific in what they want to pass
@jsf2008 which exercise is it? looks kind of like the npm ones?
Joshua Friedman
@jsf2008
Aug 22 2017 15:07
it is the npm ones
Rajan
@ProgramNovice
Aug 22 2017 15:07
oh ok thanks Darren :) @DarrenfJ
CamperBot
@camperbot
Aug 22 2017 15:07
programnovice sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1981 | @darrenfj |http://www.freecodecamp.com/darrenfj
Joshua Friedman
@jsf2008
Aug 22 2017 15:09
why is it trying to get me to sign up for private packaging
Darren
@DarrenfJ
Aug 22 2017 15:10
@jsf2008 I'm not sure, but generally the packages included should be the ones required for that module..
Joshua Friedman
@jsf2008
Aug 22 2017 15:11
that's kind of my thought. Not sure where I'm screwing up
Darren
@DarrenfJ
Aug 22 2017 15:11
@jsf2008 aych, the nodeschool stuff is ok but kind of wonky.. I think in the beta they are moving away from them...
this guy has a good free intro to node and npm
the reason I say that is cause for the present exercise it's a self-declare that you have completed it
in other words if you are convinced you know the basics of npm you can say you've completed it
I'd say go do the beta on the npm stuff because the instructions are ok, but the test suite wasn't up and working last time I played with it about a month ago
@jsf2008 basically you are learning to use the command line to download packages and then manipulating the JSON file to define the content in the program you are creating...
Darren
@DarrenfJ
Aug 22 2017 15:16
@jsf2008 you get what a JSON file is?
Joshua Friedman
@jsf2008
Aug 22 2017 15:17
that's what I want to learn, and there's still a few more things I have to do. So I don't want to move onto the next thing is until I know for certain what I'm doing
Yeah, I did my lasts few projects from Front end development on C9 so I had to import JSON files from when I did that
Darren
@DarrenfJ
Aug 22 2017 15:18
@jsf2008 ok.. so there's likely many more people in the main room who might be able to help
if the room seems busy you ask them to come over to here to coach you through it...
or PM
Joshua Friedman
@jsf2008
Aug 22 2017 15:20
Yeah I was asking for a bit but people aren't really helping ATM. Ill probably try back later
Darren
@DarrenfJ
Aug 22 2017 15:20
@jsf2008 also I do recommend going to the beta and seeing the instructions/exercises for the npm stuff...
you can run the tests against a test suite that's hidden... I'll see if I can find the link
Joshua Friedman
@jsf2008
Aug 22 2017 15:21
Thanks m8
Darren
@DarrenfJ
Aug 22 2017 15:25
@jsf2008 here's the npm part
Joshua Friedman
@jsf2008
Aug 22 2017 15:26
@DarrenfJ Thanks
Darren
@DarrenfJ
Aug 22 2017 15:26
@jsf2008 you do everything in glitch instead of C9
Joshua Friedman
@jsf2008
Aug 22 2017 15:26
glitch?
Darren
@DarrenfJ
Aug 22 2017 15:28
yah, it's a sandbox environment made by the fun people who created Stack Overflow
Joshua Friedman
@jsf2008
Aug 22 2017 15:28
ah ok! Im looking at it now
@jsf2008 here's the issue with running the tests: freeCodeCamp/freeCodeCamp#15688
oh it's in a few places: freeCodeCamp/freeCodeCamp#13095
Joshua Friedman
@jsf2008
Aug 22 2017 15:32
Yeah, so it is a bugged module
Darren
@DarrenfJ
Aug 22 2017 15:35
@jsf2008 use this to see if you pass, it worked for me
that's the tests but run outside the fCC interface
worked for me
they just have to figure out how to make it work inside fCC ;)
but you can at least go and test all the npm stuff form the beta exercises
so yer good to go
and thanks @jsf2008 for forcing m to grab all those links again.. meant to do it when I did it last but forgot to grab them all :D
CamperBot
@camperbot
Aug 22 2017 15:38
darrenfj sends brownie points to @jsf2008 :sparkles: :thumbsup: :sparkles:
:cookie: 303 | @jsf2008 |http://www.freecodecamp.com/jsf2008
Joshua Friedman
@jsf2008
Aug 22 2017 15:38
the the testing message on the beta doesn't work?
Darren
@DarrenfJ
Aug 22 2017 15:39
yah, it just hangs up for those exercises.. but if you put your glitch live link into the back end tester (the narrow-plane glitch link above) you can see if they actually pass.
Joshua Friedman
@jsf2008
Aug 22 2017 15:40
ah ok!
Yeah this is just going to take some time to learn. This is such a pain in the ass
Thanks @DarrenfJ
CamperBot
@camperbot
Aug 22 2017 15:40
jsf2008 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1982 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Aug 22 2017 15:41
this is for if you want to finish off the present npm stuff: --> Alternately, go check the nodeschool gitHub site for any issues logged with their exercise similar to yours (the private sign-in).. might be a known problem. also might be good to log it regardless.. consider it an exercise in using github ;)
definitely a PIA.. i agree
also highly recommend the free course (vids) above ^^
very beginner intro level
Tyler Furby
@tyler-furby
Aug 22 2017 15:45
So this is a dumb question: Why does hoveredNav; get called on page load, despite the fact this is a function stored in a variable, it still gets called regardless?
var hoveredNav = anime({
  targets: '.brand',
  translateX: 250
});
Kyle Holm
@thekholm80
Aug 22 2017 15:46
that's not a function
it's the result of a function
Tyler Furby
@tyler-furby
Aug 22 2017 15:46
Why does it get called if it’s just being assigned?
Kyle Holm
@thekholm80
Aug 22 2017 15:47
because you're assigning the result of the function, not the function
Darren
@DarrenfJ
Aug 22 2017 15:47
@thekholm80 hey buddy! missed yah the last few days :D
Kyle Holm
@thekholm80
Aug 22 2017 15:47
@DarrenfJ hiya! been kind of lurking, trying to find some motivation. how are you?
Tyler Furby
@tyler-furby
Aug 22 2017 15:48
Can you store the result of a function in a variable?
Darren
@DarrenfJ
Aug 22 2017 15:49
@thekholm80 good man.. just found out that even after the beta goes live if you signed up for fCC before Dec of 2016 you can still go for the old certs.. at least back and front end anyway
i have about 2/3rds of the front end ones done but have been holding off submitting them thinking it's gonna switch but now.. eff' it
also brownies for the hell of it
Kyle Holm
@thekholm80
Aug 22 2017 15:49
var hoveredNav = function () {
  anime({
    targets: '.brand',
    translateX: 250
  });
}
i believe you need to wrap the function in an anonymous function
Darren
@DarrenfJ
Aug 22 2017 15:49
thanks @thekholm80
CamperBot
@camperbot
Aug 22 2017 15:49
darrenfj sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1449 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Kyle Holm
@thekholm80
Aug 22 2017 15:50
@DarrenfJ lol thanks
CamperBot
@camperbot
Aug 22 2017 15:50
thekholm80 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1983 | @darrenfj |http://www.freecodecamp.com/darrenfj
Kyle Holm
@thekholm80
Aug 22 2017 15:50
that's good to hear, i was worried i'd not get my last few projects done in time
i've been slacking so long i'm worried i'm going to have to learn it all over again
Darren
@DarrenfJ
Aug 22 2017 15:52
me too man
like above.. barely able to help on the npm challenges
ha
Kyle Holm
@thekholm80
Aug 22 2017 15:53
i only know how to do the things that i do all the time, i don't remember much else from the npm lessons
Tyler Furby
@tyler-furby
Aug 22 2017 15:53
@thekholm80 Thanks! Good answer -> stupid question
CamperBot
@camperbot
Aug 22 2017 15:53
tyler-furby sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1450 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Kyle Holm
@thekholm80
Aug 22 2017 15:53
there are no stupid questions, this is how we learn!
Darren
@DarrenfJ
Aug 22 2017 15:54
yah.. i only know now how to log in and post on the forum.. ;)
ok, off to test
later
Kyle Holm
@thekholm80
Aug 22 2017 15:55
@DarrenfJ :wave:
Tyler Furby
@tyler-furby
Aug 22 2017 15:56
@DarrenfJ :smile:
Tyler Furby
@tyler-furby
Aug 22 2017 16:04
@thekholm80 One more question, if I wanted to do something like hoveredNav.translateX = -250; on that variable, how would I do that?
Kyle Holm
@thekholm80
Aug 22 2017 16:05
then you need to ensure that hoveredNav is an object instead of a function
Tyler Furby
@tyler-furby
Aug 22 2017 16:06
@thekholm80 Given the syntax of the function within the variable you provided previously, is there any way to access translateX otherwise
Kyle Holm
@thekholm80
Aug 22 2017 16:08
in the example that i provided, the result of the function is not stored anywhere
if you want hoveredNav to be an object, and the named function anime() isn't manipulating the object you're passing in as an argument, then you can assign the object directly to hoveredNav?
it's hard to guess what you're trying to accomplish
Tyler Furby
@tyler-furby
Aug 22 2017 16:13
@thekholm80
Nav = {
    hoveredNav: function() {
      anime({
        targets: '.brand',
        translateX: 250
      });
    }
}

$("img").hover(
    function(){
      Nav.hoveredNav();
  },
    function(){
      Nav.hoveredNav.translateX = -250;
      Nav.hoveredNav();
});
Kyle Holm
@thekholm80
Aug 22 2017 16:14
i would think you would have to recall anime() to reassign the value of .translateX
Tyler Furby
@tyler-furby
Aug 22 2017 16:14
Hmm, so no other way to access it except to call it again?
Kyle Holm
@thekholm80
Aug 22 2017 16:16
so something like
    function(){
      Nav.hoveredNav = function () {
        anime({
         targets: '.brand',
         translateX = -250
        });
      Nav.hoveredNav();
i'm pretty rusty at all this, there may be a better way
i don't think these need to be wrapped in anonymous functions, though, unless you want to assign a function to a DOM element as the result of your event handler
the event handler itself acts as the wrapper function
Tyler Furby
@tyler-furby
Aug 22 2017 16:21
Essentially all I’m trying to do is have this animation run at the hover event and then revert back after leaving the hover event
Tyler Furby
@tyler-furby
Aug 22 2017 16:34
I get a RangeError: Maximum call stack size exceeded. from the above code
Kyle Holm
@thekholm80
Aug 22 2017 16:35
what is anime() doing?
Stephen James
@sjames1958gm
Aug 22 2017 17:54
@tyler-furby Why not pass the translateX value into the hoveredNav function?
@tyler-furby
Nav = {
    hoveredNav: function(dx) {
      anime({
        targets: '.brand',
        translateX: dx
      });
    }
}
Suhail Bahawi
@IKing4ever1
Aug 22 2017 17:56
hi
everone
how i can how can I prove
the footer and header
in end of page
and front of page
i've do this codes
.masthead {
top: 0;
position: absolute;
}
.mastfoot {
bottom: 0;
position: absolute;
````
  .masthead {
    top: 0;
    position: absolute;
  }
  .mastfoot {
    bottom: 0;
    position: absolute;
but the page be like this
the same with foorer
i want t
i want someone tell me how
Suhail Bahawi
@IKing4ever1
Aug 22 2017 18:05
please fast &^^
this is my websitr&^^
Soad33
@Soad33
Aug 22 2017 18:11
@IKing4ever1 I didn't understand what u want, could u explain in arabic ?!
Suhail Bahawi
@IKing4ever1
Aug 22 2017 18:12
اوه
انا دحين بسوي صفحة
استعملت تمبلت جاهز من بوت ستراب
وعدلت عليه
وبضيف جزئية حقت اقتراحات
لما الصفحة تملت
صار الكلام يخش على الهيدر والفوتر
شوف كيف
اوه *
*
هو كان اصلا الفوتر والهيدر
position: fixed;
بس ما كنت اباه فيكسد
كنت اباه ثابت في اعلى واسفل الصفحة
يمديك تساعدتي
؟
يا ليت تديني خبر انك معايا
Soad33
@Soad33
Aug 22 2017 18:17
اذا تباهم ثابتين لازم تخلي البوزيشن فيكس
Suhail Bahawi
@IKing4ever1
Aug 22 2017 18:17
بس الفيكس يتحرك مع الصفحة
يعني لما اطلع وانزل ينزلوا معي
انا اباهم لما انزل واطلع يبقوا فوق
Soad33
@Soad33
Aug 22 2017 18:18
اوه فهمت عليك
طيب انت استخدمت col-md-6 ككلاس ولا لان لو انت تشتغل بالبوتستراب الوضع بيكون سهل عليك ومايحتاج تغير ولا شيء
Suhail Bahawi
@IKing4ever1
Aug 22 2017 18:20
ما فهمتك
اها
col-md-6 مو حق ال قريد سستم ؟
Soad33
@Soad33
Aug 22 2017 18:21
وريني الكود حقك
Suhail Bahawi
@IKing4ever1
Aug 22 2017 18:22
html or css
?
or both
?
ولا اقلك خش الموقع
وشوف المصدر
شوف
Soad33
@Soad33
Aug 22 2017 18:24
انت منك مستخدم كلاسات البوتستراب عشان كدا الدنيا دخلت فبعضها ..بوريك مثال بسيط دقايق
Suhail Bahawi
@IKing4ever1
Aug 22 2017 18:26
يب
ترا ما عندي ذيك الخبرة في نظام القريد سستم
او بالبوت ستراب بشكل عام
..
اللهم الي سويته اخذت تمبلت جاهز
وعدلت عليه وكذا
وبضيف عليه لوحة تحكم
وكذا
Soad33
@Soad33
Aug 22 2017 18:27
```<div class = "col-md8"></div>
Suhail Bahawi
@IKing4ever1
Aug 22 2017 18:28
هذااضيفه في الهيدر
وال فوتر
؟
ولا كيف الوضع
دقيقة بشوفه في موقع البوت ستراب
Soad33
@Soad33
Aug 22 2017 18:28
لازم كل div تسوي تحط فيهم ممن دي الكلاسات
الكلاسات**
mstellaluna
@mstellaluna
Aug 22 2017 18:29
@IKing4ever1 @Soad33 Hello, please be aware the FCC rooms are moderated room. Although we welcome people of other native languages, the rooms are primarily English. If you wish to speak in your native language, please move to private messages.
Suhail Bahawi
@IKing4ever1
Aug 22 2017 18:29
ذا الكلاس بالضبط
ولا على حسب موقع الكلاس
ok.
just 1m
mstellaluna
@mstellaluna
Aug 22 2017 18:29
k
Suhail Bahawi
@IKing4ever1
Aug 22 2017 18:29
كيف تسوي برايفت
ارسلي
Soad33
@Soad33
Aug 22 2017 18:29
ok , sorry for the bothers
Suhail Bahawi
@IKing4ever1
Aug 22 2017 18:30
how i can do private ?
mstellaluna
@mstellaluna
Aug 22 2017 18:33
@IKing4ever1 hover over the persons avatar and select 'chat privately'
Suhail Bahawi
@IKing4ever1
Aug 22 2017 18:33
ok, thanks
Ross Scarborough
@SourceHorse
Aug 22 2017 18:36
anyone know how to get my "random" button to stay on the same line as my form "search" button?
wnghero
@wnghero
Aug 22 2017 19:06
var total = 0;
// Create a function that adds numbers in an array to the total.
var testArray = [1,2,3,4,5,6,7];
function totalOfNumbers(){
for(i=0;i<testArray.total;i++){
total+=testArray[i];
} return total;
}
why isnt this working?
Albert Cardona II
@daddycardona
Aug 22 2017 19:06
@SourceHorse put it before the </form> taga
@wnghero you want to say 'testArray.length'
wnghero
@wnghero
Aug 22 2017 19:09
oooooooooooh
/facepalm
@daddycardona thank you
CamperBot
@camperbot
Aug 22 2017 19:09
:cookie: 320 | @daddycardona |http://www.freecodecamp.com/daddycardona
wnghero sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
Albert Cardona II
@daddycardona
Aug 22 2017 19:09
Yeah we all make mistakes @wnghero I do it everyday lol
especially with coding
did it work @SourceHorse
Kacper
@KacperPL0
Aug 22 2017 19:14
hello guys!
wnghero
@wnghero
Aug 22 2017 19:17
@daddycardona Can I use an array as an argument in a function? they want me to "Create a new function called totalOfNumbers that will take in an array of numbers and add all of them to the total variable, and then return total."
var total = 0;
// Create a function that adds numbers in an array to the total.
var testArray = [1,2,3,4,5,6,7];
function totalOfNumbers(){
for(i=0;i<testArray.length;i++){
total+=testArray[i];
}
return total;
}
Kacper
@KacperPL0
Aug 22 2017 19:18
i made a accordion menu on my tribute page but when i hit the button the page is scrolling down :< can someone help me?
stealthygame
@stealthygame
Aug 22 2017 19:19
Anyone know where to get sound sources for codePen ?
and i have another question, is there possible to make background image static to stretching?
Margaret
@Margaret2
Aug 22 2017 19:27
@wnghero you shouldn't use an outside variable directly in your function. you should pass in the array as an argument, e.g. function total(arr)
wnghero
@wnghero
Aug 22 2017 19:28
@Margaret2 like this?
var total = 0;
// Create a function that adds numbers in an array to the total.
var testArray = [1,2,3,4,5,6,7];
function totalOfNumbers(ary){
for(i=0;i<ary.length;i++){
total+=ary[i];
}
return total;
}
totalOfNumbers(testArray);
cause that isn't work either :/
Margaret
@Margaret2
Aug 22 2017 19:29
@wnghero not a great idea to modify a variable outside of your function. put total inside the function
wnghero
@wnghero
Aug 22 2017 19:30
lololol thank you @Margaret2
CamperBot
@camperbot
Aug 22 2017 19:30
wnghero sends brownie points to @margaret2 :sparkles: :thumbsup: :sparkles:
:star2: 2892 | @margaret2 |http://www.freecodecamp.com/margaret2
Margaret
@Margaret2
Aug 22 2017 19:30
:+1:
wnghero
@wnghero
Aug 22 2017 19:30
ive been banging my head for hours lol
Kacper
@KacperPL0
Aug 22 2017 19:30
ok, i fixed my background image :D
Margaret
@Margaret2
Aug 22 2017 19:31
:clap:
unknww
@unknww
Aug 22 2017 19:56
Hello world
It s been for a long time that I don t came here
Someone can send me all the stuff that you done
Kyle Holm
@thekholm80
Aug 22 2017 20:02
lol
mstellaluna
@mstellaluna
Aug 22 2017 20:03
@unknww as you aren't a FCC member, you can sign up at https://www.freecodecamp.org and learn to create the projects the members here are doing
Albert Cardona II
@daddycardona
Aug 22 2017 21:33
@KacperPL0 your tribute page is awesome makes me want to totally redo my page now. I hate the fact your's is so awesome lol good job and I love Joanna Jedrzejczyk. When I first saw this lady fight I thought to myself, 'holy macaroni she is bad ass' lol
Alexander Køpke
@alexanderkopke
Aug 22 2017 21:36
woa 1½ h chat.... pause!!
Razvan
@razvanlikespizza
Aug 22 2017 21:49
@daddycardona are u for real?
Albert Cardona II
@daddycardona
Aug 22 2017 21:50
hell yeah I loved it so simple and beautiful all at the same time ;)
and Joanna is freaking awesome it's going to be very hard to beat her in her weight class she is amazing
@razvanlikespizza
Razvan
@razvanlikespizza
Aug 22 2017 21:51
Thats simple?
alt
@daddycardona Can I get the link again? Maybe I saw it wrong..
Albert Cardona II
@daddycardona
Aug 22 2017 21:52
scroll up
I really liked it thought it was creative
Razvan
@razvanlikespizza
Aug 22 2017 21:54
Can I see your tribute page? Please..
Albert Cardona II
@daddycardona
Aug 22 2017 21:54
no lol
mine is boring but ill show u
Razvan
@razvanlikespizza
Aug 22 2017 21:54
I dont careee , I wanna see it pls :(
to redo your page or your tribute page?
Hell yeah Just make it look better ;)
Razvan
@razvanlikespizza
Aug 22 2017 22:02
It looks pretty good.
Its not simple, but ...
Albert Cardona II
@daddycardona
Aug 22 2017 22:02
Yes it looks horrible LOL
to busy at the top
Razvan
@razvanlikespizza
Aug 22 2017 22:03
You can fix that now, cos you get experience boiii
Albert Cardona II
@daddycardona
Aug 22 2017 22:04
Yeah but I am like stuck on wherart tho challenge
Razvan
@razvanlikespizza
Aug 22 2017 22:12
Work,work,work.
Margaret
@Margaret2
Aug 22 2017 22:54

Jedrzejczyk

how do you pronounce that O.o

Albert Cardona II
@daddycardona
Aug 22 2017 23:03
yes lol
@razvanlikespizza I do feel like a Rhinna song but I don't like her voice at all and the only movie I think she did real good in was home. Yet she is very beautiful to me
Razvan
@razvanlikespizza
Aug 22 2017 23:04
Rihanna its a cool girl ! Hell ya
Albert Cardona II
@daddycardona
Aug 22 2017 23:04
@Margaret2 :wave:
Margaret
@Margaret2
Aug 22 2017 23:05
hi
Albert Cardona II
@daddycardona
Aug 22 2017 23:06
So I got like most of that challenge done. I just need to see how I can get 2 different keys and values to match I guess
but right now I am working on a website I might just use WP to redo it but for now I am working on it might be for a future client
Razvan
@razvanlikespizza
Aug 22 2017 23:07
WP= Wordpress?
Albert Cardona II
@daddycardona
Aug 22 2017 23:29
yes sorry lol
@razvanlikespizza
I am doing like 3 things at once lol
Ai rui 艾瑞
@aisolae
Aug 22 2017 23:30

var orderCount = 0;

function takeOrder(topping, crustType) {
orderCount++

console.log("Order: piza " + topping + crustType);

}

takeOrder("toppings with bacon ", "with slad cheese");
takeOrder("toppings with beef ", "with slad egg");
takeOrder("toppings with fish ", "with slad vegies");
getSubTotal(orderCount);

function getSubTotal(itemCount){

return itemCount * 7.5;
console.log(getSubTotal());
}

Razvan
@razvanlikespizza
Aug 22 2017 23:30
@daddycardona For yourself or its for someone else?
Albert Cardona II
@daddycardona
Aug 22 2017 23:30
someone else
Ai rui 艾瑞
@aisolae
Aug 22 2017 23:30
i need help with that code, can someone tell me why it's not processing the orderCount
Albert Cardona II
@daddycardona
Aug 22 2017 23:33
var orderCount = 0;
function takeOrder(topping, crustType) {
orderCount++
console.log("Order: piza " + topping + crustType);
}
takeOrder("toppings with bacon ", "with slad cheese");
takeOrder("toppings with beef ", "with slad egg");
takeOrder("toppings with fish ", "with slad vegies");
getSubTotal(orderCount);
function getSubTotal(itemCount){
return itemCount * 7.5;
console.log(getSubTotal());
}
Ai rui 艾瑞
@aisolae
Aug 22 2017 23:35
what's the difference ?
@daddycardona
Razvan
@razvanlikespizza
Aug 22 2017 23:35
@aisolae Makes code easier to read.
Ai rui 艾瑞
@aisolae
Aug 22 2017 23:35
ok
with the snippet
don't know how to do that
Albert Cardona II
@daddycardona
Aug 22 2017 23:36
I think you need to call the function getSubTotal in function takeorder to get your results
Ai rui 艾瑞
@aisolae
Aug 22 2017 23:37
'ok
Razvan
@razvanlikespizza
Aug 22 2017 23:37
@daddycardona What software do you use when coding a website?
Albert Cardona II
@daddycardona
Aug 22 2017 23:37
vscode
fileziller
Razvan
@razvanlikespizza
Aug 22 2017 23:37
thats all?
Albert Cardona II
@daddycardona
Aug 22 2017 23:38
Yes sir
Razvan
@razvanlikespizza
Aug 22 2017 23:38
FilleZila? For ftp or what?
Albert Cardona II
@daddycardona
Aug 22 2017 23:38
and console.log() lmao
yes
Razvan
@razvanlikespizza
Aug 22 2017 23:38
xDD console.log
Albert Cardona II
@daddycardona
Aug 22 2017 23:38
LOL
Razvan
@razvanlikespizza
Aug 22 2017 23:38
good for debugging.
Albert Cardona II
@daddycardona
Aug 22 2017 23:38
This is what I did so far for that site I am working on and I just created that logo so looking for the proper size now
I am using my domain an subing it so I can show people online and live how their sites would lo like but if I would have used WordPress I would have been done with it like 30 minutes tops lol
@razvanlikespizza
Razvan
@razvanlikespizza
Aug 22 2017 23:41
Looks a lot better than your tribute page. xD
For what is it?
Albert Cardona II
@daddycardona
Aug 22 2017 23:42
LOL
Razvan
@razvanlikespizza
Aug 22 2017 23:42
@daddycardona When I click on "Home", smooth scrolling its not working. Put an <a> on it.
Albert Cardona II
@daddycardona
Aug 22 2017 23:42
Practice might get paid
Razvan
@razvanlikespizza
Aug 22 2017 23:42
Are you getting paid for that project?
Albert Cardona II
@daddycardona
Aug 22 2017 23:42
Yeah I am wodering why that is too
Ai rui 艾瑞
@aisolae
Aug 22 2017 23:43
@daddycardona thanks
CamperBot
@camperbot
Aug 22 2017 23:43
aisolae sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 321 | @daddycardona |http://www.freecodecamp.com/daddycardona
Albert Cardona II
@daddycardona
Aug 22 2017 23:43
I might get paid
Razvan
@razvanlikespizza
Aug 22 2017 23:43
For who is it? :|
Ai rui 艾瑞
@aisolae
Aug 22 2017 23:43
it should be
Albert Cardona II
@daddycardona
Aug 22 2017 23:43
you welcome @aisolae
Ai rui 艾瑞
@aisolae
Aug 22 2017 23:43
console.log(getSubTotal(orderCount))
Albert Cardona II
@daddycardona
Aug 22 2017 23:43
a guy i play basketball for
Ai rui 艾瑞
@aisolae
Aug 22 2017 23:43
console.log(getSubTotal(orderCount))
Albert Cardona II
@daddycardona
Aug 22 2017 23:44
I see that you have a global variable orderCount, that is usually frowned upon in javascript @razvanlikespizza
@aisolae
Razvan
@razvanlikespizza
Aug 22 2017 23:44
@daddycardona Okay buddy. Good luck with it.
Albert Cardona II
@daddycardona
Aug 22 2017 23:44
oops lol
Razvan
@razvanlikespizza
Aug 22 2017 23:44
Np.
Albert Cardona II
@daddycardona
Aug 22 2017 23:44
thanks
Ai rui 艾瑞
@aisolae
Aug 22 2017 23:44
'''console.log(getSubTotal(orderCount))'''
CamperBot
@camperbot
Aug 22 2017 23:44
:bulb: to format code use backticks! ``` more info
Razvan
@razvanlikespizza
Aug 22 2017 23:45
@daddycardona Wohoooo,great portfolio page/page... :)
Albert Cardona II
@daddycardona
Aug 22 2017 23:45
no its that one you did before three times then press enter and it would give you ``` lines
Yeah I was learning that affect or effect for that page @razvanlikespizza
Razvan
@razvanlikespizza
Aug 22 2017 23:46
@daddycardona When you dont know when to use "affect" or "effect", use "impact" instead.
Albert Cardona II
@daddycardona
Aug 22 2017 23:46
I redid it because I was more concearned about the challenges then realized that this is going to be my portfolio to possibly landing a job
@razvanlikespizza I am trying to learn how to check for if mobile use this screen and this code lol
Razvan
@razvanlikespizza
Aug 22 2017 23:48
A good portfolio, more chances to get a job.
@daddycardona Can you explain more? Like...uhmm
Albert Cardona II
@daddycardona
Aug 22 2017 23:51
i know I can use @media in css but I have a contact form but on a cellphone I can use the gmail logo from frontawesome and then mailto: in the href and it would be easier to just open your email on a cell phone then computer I am working on that
Gersho
@Gersho
Aug 22 2017 23:55
hello everyone :wave:
Albert Cardona II
@daddycardona
Aug 22 2017 23:56
:wave: @Gersho
Razvan
@razvanlikespizza
Aug 22 2017 23:57
@daddycardona Make two elements,one with mailto: and one without it. Display one of them when needed.
@daddycardona I think ..I dont understand what to you...buut.
Albert Cardona II
@daddycardona
Aug 22 2017 23:58
I think I am going to do somethign like that as well
wnghero
@wnghero
Aug 22 2017 23:58
// Create a function that checks to see if "Dave" is in an array.
var testArr=["mike","Dave","Jake...","from Statefarm"];
function lookingForDave(arr){
for(i=0;i<arr.length;i++){
if(indexOf.arr[i]==="Dave"){
return "I found him";
}
}
}
lookingForDave(testArr);
am i going about this wrong or am i making a stupid syntax mistake?
Albert Cardona II
@daddycardona
Aug 22 2017 23:59
@wnghero put var testArr inside the function
Gersho
@Gersho
Aug 22 2017 23:59
@wnghero indexOf. ?
also you might want to prefer forEach to for(i)