These are chat archives for FreeCodeCamp/Help

18th
Nov 2017
Daniel
@dkapexhiu
Nov 18 2017 00:11
Hi! Can someone help with this issue? jlmakes/scrollreveal#396
Joshua Arnett
@josha5
Nov 18 2017 01:47
d
Stephen James
@sjames1958gm
Nov 18 2017 02:19
@ldocherty1 You'll need to wrap the input request in another loop which only exits if there is a valid input.
mstellaluna
@mstellaluna
Nov 18 2017 02:44
@ldocherty1 your example IF statement is just attempting to assign rather than validate. You don't need the && (i<?). Also I don't see where you are prompting the user.. I just see the println which won't prompt the user for input
Albert Cardona II
@daddycardona
Nov 18 2017 02:45
Good evening to all the great helpers out there ;)
mstellaluna
@mstellaluna
Nov 18 2017 02:50
@ldocherty1 your also going to have a problem with your Arrays as you are hard setting them to 18 elements. Arrays are immutable. so if you need more or less than 18 you can't resize them.
Ken Haduch
@khaduch
Nov 18 2017 03:47
@daddycardona - hello there Albert...
Liam Docherty
@ldocherty1
Nov 18 2017 12:24
In my java program, if the user inputs "E" the program skips to the next step. However, I want the user to be notified and asked again to enter the correct value which is "P, M or D". How can I fix this in my program to do this.
String grade = "";
        int yr2cred[] = new int[18];
        char yr2grade[] = new char[18];
        for (int i = 1; i <= 18; i++) {
            while (grade.equals("")) {
                System.out.println("Please enter your grade for unit " + i + " " + username + ".");
                grade = userinput.next().toLowerCase();
                yr2grade[i - 1] = grade.charAt(0);
                if (yr2grade[i - 1] == 'p') {
                    yr2cred[i - 1] = yr2cred[i - 1] + P;
                } else if (yr2grade[i - 1] == 'm') {
                    yr2cred[i - 1] = yr2cred[i - 1] + M;
                } else if (yr2grade[i - 1] == 'd') {
                    yr2cred[i - 1] = yr2cred[i - 1] + D;
                } else {
                    System.out.println("Invalid Grade Supplied! Try Again.\n");
                    grade = "";
                }
            }
            grade = "";
        }
Albert Cardona II
@daddycardona
Nov 18 2017 13:00
@ldocherty1 can you try if(grade.charAt(0) == 'p') for your if sttemens?
Liam Docherty
@ldocherty1
Nov 18 2017 13:02
Thanks @daddycardona I fixed the problem.
CamperBot
@camperbot
Nov 18 2017 13:02
ldocherty1 sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 488 | @daddycardona |http://www.freecodecamp.org/daddycardona
Albert Cardona II
@daddycardona
Nov 18 2017 13:02
also is P,M,D defined wouldn't you want to put them as "p"
okay ;)
Liam Docherty
@ldocherty1
Nov 18 2017 13:02
@daddycardona Thanks Albert. I fixed the problem
CamperBot
@camperbot
Nov 18 2017 13:02
ldocherty1 sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
api offline
Marc
@MWBauer
Nov 18 2017 14:33
Morning everyone!
:wave: :coffee:
Albert Cardona II
@daddycardona
Nov 18 2017 14:49
GM Marc :)
:wave:
@MWBauer
Albert Cardona II
@daddycardona
Nov 18 2017 15:38
so i cheated on symmetric difference I did not get that one at all looking at the basic code however I started understanding it. Now I am doing this register one and am like shit am I ever gonna get this stuff. maybe I should pursue something different because it is very difficult for me to to come up with stuff like this especially since I have not seen examples before that would truly help me out
Ken Haduch
@khaduch
Nov 18 2017 15:58
@MWBauer - howdy Marc!
@daddycardona - Hello Albert - which one are you working on?
Albert Cardona II
@daddycardona
Nov 18 2017 16:03
well I was working on symetric difference but honestly I could not understand even after reading some stack overflow ways of doing it. Actually after cheating I understood what was happening but then was like how did the third array get fixed with that code I did not know it was recursive. Now I am working on chash register
just breaking it down right now so I can understand it but I am like shoot many pieces here
@khaduch
Moisés Man
@moigithub
Nov 18 2017 16:04
if u did Diff Two Arrays exercise..
sym diff is (almost) the same @daddycardona
Ken Haduch
@khaduch
Nov 18 2017 16:04
@daddycardona - oh, yeah, the cash register one was a bit of a challenge.
Albert Cardona II
@daddycardona
Nov 18 2017 16:07
I did do that one @moigithub I just don't know what I did to solve it because FCC deletes my answers even though it says I have completed it. That was one that I had not saved in my hard drive so must go back and do it
Moisés Man
@moigithub
Nov 18 2017 16:08
soo if u have (arr1, arr2, arr3)
to get symdiff u do
tmp = diff2arr (arr1, arr2)
finalResult = diff2arr (tmp, arr3)
Albert Cardona II
@daddycardona
Nov 18 2017 16:11
I don't remember doing the diff of two arrays I don't have it saved on my computer which sucks because I would have used it however, I checked the answer on that diff of two arrays and don't remember using any of those answers so now I am screwed thinking about it I hope I did not cheat on that one too
Stephen James
@sjames1958gm
Nov 18 2017 16:28
@daddycardona I used my github account to save my solutions
Albert Cardona II
@daddycardona
Nov 18 2017 16:30
Yes I am just saying I had not start saving solutions until after diff of two arrays I use vscode and just make a new folder for every challenge and project
Stephen James
@sjames1958gm
Nov 18 2017 16:30
@daddycardona What I have seen a lot of people have trouble with is that they start coding before they have a good plan for a solution
Then they are too committed to the code they have written to just throw it away and start over.
Albert Cardona II
@daddycardona
Nov 18 2017 16:30
not this happy coder I start over all the time lol and accidently sometimes rewrite the same thing lol
Stephen James
@sjames1958gm
Nov 18 2017 16:31
@daddycardona Now that is a new one :) maybe saving your attemps on something like github?
Albert Cardona II
@daddycardona
Nov 18 2017 16:32
so @sjames1958gm you think I should save my attempts as well as my re written code maybe just comment it out ?
Stephen James
@sjames1958gm
Nov 18 2017 16:33
Maybe, or save a separate file on github that has previous attempts. Commented code can sometimes prove a distraction.
Albert Cardona II
@daddycardona
Nov 18 2017 16:37
that is what I do on my computer for the most part I am just upset I didn't save some of them until after that one I swore I saved it before
I found sum of all ranges lol
Marc
@MWBauer
Nov 18 2017 16:47
YEA!!! GO ME!!!
After switching to FF DevEdition I went back thru all of the FCC lessons that I've already done and re-done them so that I have my answers.
lol
Now I'm back to working on the weather app
Morning @sjames1958gm
come and getcha some
lol
I thought I was further along than this.....but here I am.
Albert Cardona II
@daddycardona
Nov 18 2017 16:55
its nice layout but I don't see the weather lol @MWBauer
Darren
@DarrenfJ
Nov 18 2017 17:04
morning fCC
Kyle Holm
@thekholm80
Nov 18 2017 17:04
@DarrenfJ :wave:
Darren
@DarrenfJ
Nov 18 2017 17:07
@daddycardona reading back through the threads.. algorithms are hard but it's like exercise.. you just build up the problem solving muscle... over time... and practice
@thekholm80 hey buddy :D
@daddycardona you should be able to see your solution on the fCC profile page.. it should ring up your old/latest solution...
also, it's sometimes good to go back and try it again.. fresh. but from this end where you know so much more.. also the codewars kyu 8 challenges are very basic and let you practice parsing stuff and mixing them up.. like little mini exercise sessions
Ken Haduch
@khaduch
Nov 18 2017 17:09
@DarrenfJ - good morning / afternoon...
Darren
@DarrenfJ
Nov 18 2017 17:12
@MWBauer same as with @daddycardona not getting any results hen i hit the weather button.. consolde log says the get is a 404 error
@khaduch morning moonrings!
Albert Cardona II
@daddycardona
Nov 18 2017 17:17
What up @DarrenfJ and where you mean I should see this in my profile page?
Darren
@DarrenfJ
Nov 18 2017 17:20
@daddycardona for me, if I click on my pic icon in the top of the fCC page I get 'my profile' https://www.freecodecamp.org/darrenfj
and each exercise has a link on the far right 'solution' which opens the solution i used at the time
Albert Cardona II
@daddycardona
Nov 18 2017 17:21
that is so weird because yes I just did that lol but if I go to a problem it won't show the solutions sometimes lol
thanks I was exploring @DarrenfJ
CamperBot
@camperbot
Nov 18 2017 17:21
daddycardona sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2277 | @darrenfj |http://www.freecodecamp.org/darrenfj
Darren
@DarrenfJ
Nov 18 2017 17:21
in some cases they've changed the exercises so I can't make them work again but i can see what i tried
oh man i made the mistake of looking at my solution and it's so convoluted! gah!
Kyle Holm
@thekholm80
Nov 18 2017 17:26
looking at my old code makes me cringe
Darren
@DarrenfJ
Nov 18 2017 17:26
ok, i'm off for :coffee: and podcasts replyAll really really good podcast on things peripheral to the internet (and not coding)
thanks for the chats guys
thanks @thekholm80 @daddycardona @khaduch
CamperBot
@camperbot
Nov 18 2017 17:26
darrenfj sends brownie points to @thekholm80 and @daddycardona and @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 1594 | @thekholm80 |http://www.freecodecamp.org/thekholm80
:cookie: 490 | @daddycardona |http://www.freecodecamp.org/daddycardona
:star2: 3512 | @khaduch |http://www.freecodecamp.org/khaduch
Darren
@DarrenfJ
Nov 18 2017 17:26
be back later
Kyle Holm
@thekholm80
Nov 18 2017 17:26
@DarrenfJ have a good day, sir
Darren
@DarrenfJ
Nov 18 2017 17:26

and yes, i totally agree :D

looking at my old code makes me cringe

:D
Albert Cardona II
@daddycardona
Nov 18 2017 17:26
yeah talk to you later ;)
@thekholm80 I don't like looking at old code lol
I really need to start reading more to step up my game
Kyle Holm
@thekholm80
Nov 18 2017 17:28
once you can start reading the mdn pages and understanding what they're saying, it all gets so much easier
i remember first starting out and trying to use mdn, it wasn't pretty
Ken Haduch
@khaduch
Nov 18 2017 17:30
@DarrenfJ - thanks, have a great day, see you on here later...
CamperBot
@camperbot
Nov 18 2017 17:30
khaduch sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2278 | @darrenfj |http://www.freecodecamp.org/darrenfj
Albert Cardona II
@daddycardona
Nov 18 2017 17:31
MDN really does suck @thekholm80 I don't understand half of what I am reading and the other half is like what?
lol
Kyle Holm
@thekholm80
Nov 18 2017 17:31
you'll get there
they just assume that you understand a lot of the base concepts, so as you learn those it makes more sense
Albert Cardona II
@daddycardona
Nov 18 2017 17:32
I hate asking for help or googling stuff too somewhere else because they always be like why are you using .reduce() like that lol
because I obviously don't get it and your too fancy for me lol
hello @khaduch :)
Kyle Holm
@thekholm80
Nov 18 2017 17:32
i use .map() for everything that i don't have specific requirements on what i return, which is probably wrong
but i don't care lol
Albert Cardona II
@daddycardona
Nov 18 2017 17:33
I was looking at a video and they were saying how reduce is awesome you can use it for everything so easy and then he was using reduce().map() lOL
Albert Cardona II
@daddycardona
Nov 18 2017 17:53
Well I am out people :)
rscales02
@rscales02
Nov 18 2017 18:02
I would like some feedback on my code if anyone has a second to look... https://codepen.io/rscales02/pen/VMrMBb
Ken Haduch
@khaduch
Nov 18 2017 19:07

@rscales02 - it might be good to prevent clicking on the buttons when you are playing the sequence? It looks like you only have "strict" mode implemented? It looks pretty good, though - the color changes are a little "weak". And I'm finding the response to the clicks to not always be clean - sometimes I click twice and it only looks like I clicked once. And I think that I just had it shoot me after I got the correct sequence in and didn't press another button? I just got it into some kind of mode where I push the start button and it shoots almost right away. Even shooting again after I moved away from the board?

But it's looking pretty good, a lot farther along than I am with it! :)

Ken Haduch
@khaduch
Nov 18 2017 19:13
oh, I see that if I don't respond after the game starts, then it shoots... that explains part of it! :)
oh - I also see that if I switch it off and hit the "start" button, then it starts doing stuff, too? That might have been after I was playing - maybe "off" doesn't really turn it off afterward, as in clearing the state.
ADIL KARMOUZI
@mradil16
Nov 18 2017 20:10
Hi everyone . I know javascript basics , but everytime I want build someting , I get stuck . I don't know where to start or what to write ?? any toughts ??
artbohr
@artbohr
Nov 18 2017 20:54
@mradil16 I guess there is many ways to tackle it, you can watch how people build projects from the very basics and learn what they are using, and google every new thing you see to understand it and add it to your arsenal or start building for yourself using the most basic tools you know then start asking question how could you improve the tools you are using by googling the thing you want to do (I mean an action you want to do) and understanding the code samples you are seeing in the answers in stackoverflow for example. But the most standard way would be doing a programm like freecodecamp or codecademy for example and getting introduced to more and more tools and using them little by little or any other teaching program is out there, also you can just go and read projects code and try to break it down in to parts and understand it, but it may be hard if you are not experienced because you will lose the grasp of it when you meet some combined parts, so I would go for some teaching programm or trying to build yourself with your arsenal and then look for ways to improve it by googling the things/actions you want to do and trying to understand the answers.
Yaroslav
@YariPL
Nov 18 2017 21:03
hi. Is there anybody who knows php and sql and can help me?
Ken Haduch
@khaduch
Nov 18 2017 21:20
@YariPL - we can give it a shot, although maybe the Backend help room would be more appropriate. But I have some PHP and mySQL experience - as I said, we can give it a shot!
Daniel
@dkapexhiu
Nov 18 2017 21:35
Someone use ScrollReveal.js? I'm having an issue with modals of bootstrap and ScrollReveal. When i open modal through button it opens a blurred window that i can't interact with it. This is codepen: https://codepen.io/dkapexhiu/pen/OOzJxN
Darren
@DarrenfJ
Nov 18 2017 21:47
@daddycardona I've asked on question on stackoverflow and felt super stoopid asking it so I haven't ever again :D
@mradil16 another way some people do things is build out the design, on paper, visually map were everything is and what you want the buttons to do and then build base on that. rather than having an idea *in your head8 and trying to build that way..
build it modularly section by section
or a third way is when P1xt has her coding challenges she asks people to clone specific sites. so they have an end goal and know what it all does already, and try to build it based on something that already exists
Darren
@DarrenfJ
Nov 18 2017 22:17
@mradil16 for example: https://github.com/P1xt/p1xt-guides/blob/master/job-ready-javascript-edition-2.0.md you can see she has some of the projects a cloning sites..
Alexander R Bott
@Abott1222
Nov 18 2017 22:19
^p1xt guides are awesome
Darren
@DarrenfJ
Nov 18 2017 22:20
oh yah man.. i love 'em
Alexander R Bott
@Abott1222
Nov 18 2017 22:20
@DarrenfJ how goes it brother?
Darren
@DarrenfJ
Nov 18 2017 22:20
ah you know.. avoiding actually watching CSS vids by checking out every possible other thing first...
you?
Alexander R Bott
@Abott1222
Nov 18 2017 22:21
@DarrenfJ haha I hear you man. For some reason I can really bring myself to code anything today either. Guess its just one of those Saturdays haha XD
Darren
@DarrenfJ
Nov 18 2017 22:21
it's rainy and gloomy here tbh
Alexander R Bott
@Abott1222
Nov 18 2017 22:22
hahah atleast you can blame it on the weather
its sunny over here in Seattle for once
Darren
@DarrenfJ
Nov 18 2017 22:24
yah, i'm totally hiding out :D
waiting for the :rainbow:
Alexander R Bott
@Abott1222
Nov 18 2017 22:26
:D
I hear the winters in Toronto are rough
Darren
@DarrenfJ
Nov 18 2017 22:27
yah..it get's cold but also most of them it's wet and slushy
icy
i you go up north a bit you get more snow so it's cold but everything is white and bright.. here's it's all grey and the sand/salt they use on the roads kills yer shoes
Alexander R Bott
@Abott1222
Nov 18 2017 22:28
@DarrenfJ cool. alright im out of here. gotta make some coffee and try to make a dent on my work for next week
Darren
@DarrenfJ
Nov 18 2017 22:28
havea good one bruha
Alexander R Bott
@Abott1222
Nov 18 2017 22:28
:v:
you too!
Darren
@DarrenfJ
Nov 18 2017 22:29
thanks @Abott1222 for the chat :D
CamperBot
@camperbot
Nov 18 2017 22:29
darrenfj sends brownie points to @abott1222 :sparkles: :thumbsup: :sparkles:
:cookie: 214 | @abott1222 |http://www.freecodecamp.org/abott1222
Alexander R Bott
@Abott1222
Nov 18 2017 22:29
@DarrenfJ ty as well :D
CamperBot
@camperbot
Nov 18 2017 22:29
abott1222 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2279 | @darrenfj |http://www.freecodecamp.org/darrenfj
Ankur Sharma
@AnkurSharma102
Nov 18 2017 23:01
hlo anyone
can we align the text from left hand side?
??
Stephen James
@sjames1958gm
Nov 18 2017 23:32
@AnkurSharma102 text-align: left is a setting, is that what you mean?