These are chat archives for FreeCodeCamp/Help

30th
Sep 2017
Albert Cardona II
@daddycardona
Sep 30 2017 00:33
hey yall :)
Albert Cardona II
@daddycardona
Sep 30 2017 01:07
anyone on?
piteto
@piteto
Sep 30 2017 01:18
howdy :sparkles: :wave: :sparkles:
akosuadenell
@akosuadenell
Sep 30 2017 01:46

@akosuadenell
*{
margin: 0;
padding: 0;
border: 0;
}
html, body{
height: 100%;
}

body{
background: url(chase.jpg) no-repeat center center;
background-size: cover;
display: flex;
flex-direction: column;
justify-content: center;

}
img{

}
.container{
max-width: 600px;
margin: 0 auto;
text-align: center;
}

h1{
color: #FFFFFF;
font: 900 90px 'Pacifico', cursive;
text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.6);
margin-bottom: 24px;
opacity: 0.5;
}
<!DOCTYPE html>

<html lang = "en">

<head>
<meta charset = "utf-8">
<title>Chase Your Dreams</title>
<link href="https://fonts.googleapis.com/css?family=Josefin+Sans|Pacifico" rel="stylesheet">
<link href="style2.css" type="text/css" rel="stylesheet">
</head>

<body>
<header>
<img src="dreamchasers.png" alt="logo" width="120"/>
<nav>
</nav>
</header>

<div class = "container">

<h1>Chase Your Dreams</h1>

</div>
</body>
</html>
can anyone tell me why my logo isnt in the upper lefthand corner?

Screen Shot 2017-09-29 at 9.31.24 PM.jpg
Joshua Waller
@Obscureether1
Sep 30 2017 02:10
hows it going ppl
Ken Haduch
@khaduch
Sep 30 2017 02:31
@daddycardona - I just got on the computer - are you still around, and have questions?
@Obscureether1 - hey Joshua - how are you doing?
Joshua Waller
@Obscureether1
Sep 30 2017 02:34
nope im good just saying hi before signing off ...
Kyle Holm
@thekholm80
Sep 30 2017 03:16
@daddycardona :wave:
Eric Miller
@ericmiller777
Sep 30 2017 03:26
hey guys
wanna test out my simon?
korzo
@korzo
Sep 30 2017 03:30
@ericmiller777 Thats a really big simon :)
Eric Miller
@ericmiller777
Sep 30 2017 03:30
its responsive :P
@akosuadenell you still need help?
korzo
@korzo
Sep 30 2017 03:31
@ericmiller777 You should remove outline and disable click, when playing sequence
Eric Miller
@ericmiller777
Sep 30 2017 03:32
@korzo hmm okay, outlike is easy enough
you mean outline like on mobile?
when you click a button?
korzo
@korzo
Sep 30 2017 03:34
@ericmiller777 I'm on desktop and when I click button, there is a big blue square
screenshot-ericmiller777.github.io-2017-09-30-05-35-07-108.png
Eric Miller
@ericmiller777
Sep 30 2017 03:37
yeas
yea
ill take that away last
Albert Cardona II
@daddycardona
Sep 30 2017 05:31
@khaduch @thekholm80 I took a nap was so tired I played basketball thursday night didn't sleep all night got some sleep at 7am to like 12 but i am sore now lol but i am up now lol
is that you @ericmiller777 I like the blue background :)
So is anyone up now?
Albert Cardona II
@daddycardona
Sep 30 2017 05:37
hello
Yog Mehta
@BitYog
Sep 30 2017 06:10
Hey devs
If you've heard of the guides freeCodeCamp has developed...
I want my PR to the guides repo to get merged
It's been 4 days. Care to help me out?
Albert Cardona II
@daddycardona
Sep 30 2017 06:25
you want your PR?
@BitYog
Georgia
@georgiawang5332
Sep 30 2017 07:06
image.png
how could this math can be use??? ([1,4] =>why r the answer is 10 plz....give me explane
Albert Cardona II
@daddycardona
Sep 30 2017 07:09
because you need to add all number from 1-4 so 1+2+3+4
Georgia
@georgiawang5332
Sep 30 2017 07:09
sorry english not good is explanation is right
Albert Cardona II
@daddycardona
Sep 30 2017 07:09
where you from @georgiawang5332
Georgia
@georgiawang5332
Sep 30 2017 07:09
ok that me try loop
taiwan @daddycardona
Albert Cardona II
@daddycardona
Sep 30 2017 07:10
Okay I see Georgia I thought you was from the republic of georgia lol
Georgia
@georgiawang5332
Sep 30 2017 07:10
i dont know for loop what it run
:)
Albert Cardona II
@daddycardona
Sep 30 2017 07:14
is this free code camp challenge
I would do something more like finding the two numbers and then
for(var i = minNum, i <= maxNum; i++){ total += i; }
@georgiawang5332
Georgia
@georgiawang5332
Sep 30 2017 07:18
@daddycardona thx
CamperBot
@camperbot
Sep 30 2017 07:18
georgiawang5332 sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 354 | @daddycardona |http://www.freecodecamp.com/daddycardona
Albert Cardona II
@daddycardona
Sep 30 2017 07:19
so did that work better for you?
Georgia
@georgiawang5332
Sep 30 2017 07:25
I'm trying to give you advice to me, sorry for my logic is poor
Albert Cardona II
@daddycardona
Sep 30 2017 07:26
I am trying it again I have not done that one in a while
Georgia
@georgiawang5332
Sep 30 2017 07:28
OKOK i think what i learn
:)
Albert Cardona II
@daddycardona
Sep 30 2017 07:30
okay
Georgia
@georgiawang5332
Sep 30 2017 07:38
image.png
the num have wrong
Albert Cardona II
@daddycardona
Sep 30 2017 07:40
why are you using range at all
Georgia
@georgiawang5332
Sep 30 2017 07:41
Are there any errors in the comment section?
using range at all---->I do not understand this mean?
Albert Cardona II
@daddycardona
Sep 30 2017 07:42
well I keep getting an infinite loop so you can use the reduce method
well you are using a variable range you don't need that one
Georgia
@georgiawang5332
Sep 30 2017 07:43
Do not understand English, meaning the scope is 1 ~ 4 error?
So use reduce to make judgments?
Because I do not understand no logic, had to follow the other people first program XD
Albert Cardona II
@daddycardona
Sep 30 2017 07:49
I am trying to understand why the code is not working either it is really pissing me off lol
Pethaf
@Pethaf
Sep 30 2017 07:51
What code are you talking about?
Albert Cardona II
@daddycardona
Sep 30 2017 07:51
sum of all ranges
she is trying to use the Math.max and min but for some reason does not work
function sumAll(arr) {
  var a = Math.max(...arr);
  var b = Math.min(...arr);
    var total = 0;

  for(let i = b; b<= a; i++){
    total +=i;    
  }

  // 
  return b;
}



sumAll([1, 4]);
Albert Cardona II
@daddycardona
Sep 30 2017 07:56
how does this become an infinite loop?
Pethaf
@Pethaf
Sep 30 2017 07:57
var theMin = arr.reduce(function(a,b) { return Math.min(a,b);});
var theMax = arr.reduce(function(a, b) {
return Math.max(a, b);
});
I just realized I could have written this code much simpler.
Manish Giri
@Manish-Giri
Sep 30 2017 07:58
function sumRange(arr) {
  const min = Math.min(...arr);
  const max = Math.max(...arr);

  let total = 0;

  for(let i = min; i <= max; i++) {
    total += i;
  }
  return total;
}
Albert Cardona II
@daddycardona
Sep 30 2017 07:58
never mind lol its the b<= a lol
yeah I was just editing it so fast I missed that part lol
yes LOL
I was returning b and a just to make sure it worked properly lol my mistake on that one ;)
thanks @Manish-Giri
CamperBot
@camperbot
Sep 30 2017 08:00
daddycardona sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6598 | @manish-giri |http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Sep 30 2017 08:00
:smile:
ty @daddycardona
ffs
@daddycardona ty
CamperBot
@camperbot
Sep 30 2017 08:00
manish-giri sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 355 | @daddycardona |http://www.freecodecamp.com/daddycardona
Manish Giri
@Manish-Giri
Sep 30 2017 08:01
@DarrenfJ @heroiczero @TeddyHugs ty
CamperBot
@camperbot
Sep 30 2017 08:01
manish-giri sends brownie points to @darrenfj and @heroiczero and @teddyhugs :sparkles: :thumbsup: :sparkles:
:cookie: 325 | @teddyhugs |http://www.freecodecamp.com/teddyhugs
:star2: 1793 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 2064 | @darrenfj |http://www.freecodecamp.com/darrenfj
Albert Cardona II
@daddycardona
Sep 30 2017 08:02
I am not going to lie to you @Manish-Giri I don't think I would ever guess how to do the LCM because I suck at math I even looked at other peoples completed code for this challenge and am still confused. I even looked at all 3 answers and still don't understand what the hell is going on there. I can use my mind and a paper and figure that out easier but to put it into code I am still lost
Manish Giri
@Manish-Giri
Sep 30 2017 08:03
ah that's fine
you'll get it with practice
i too stumble across a lot of math coding problems, but it gets better with practice
Albert Cardona II
@daddycardona
Sep 30 2017 08:05
I will keep trying but I am like what the hell is going on in those codes that I couldn't understand it is like especially this one. I get the GCD etc... but on a piece of paper I would be like this is way easier lol
why the hell doesn't JS already have premade methods for this crap like Math.lcm(...arr)?
Manish Giri
@Manish-Giri
Sep 30 2017 08:07
lol
I ask myself that question everyday
and it kills me that Ruby has a lot of those functions built in
Albert Cardona II
@daddycardona
Sep 30 2017 08:08
wow I need a library of math for that because it is the math concepts I don't get lol
Manish Giri
@Manish-Giri
Sep 30 2017 08:09
but unless you wanna do Rails (which is declining), there's no point learning ruby
Albert Cardona II
@daddycardona
Sep 30 2017 08:09
I don't even understand what Rails are yet
lol
Manish Giri
@Manish-Giri
Sep 30 2017 08:09
lol
Albert Cardona II
@daddycardona
Sep 30 2017 08:10
I need to research and understand all this stuff like rails, and node for back end it is so confusing
so I am about to go try this code again
Manish Giri
@Manish-Giri
Sep 30 2017 08:15
good luck!
Albert Cardona II
@daddycardona
Sep 30 2017 08:18
thanks :)
Kelechi Chinaka
@ke1echi
Sep 30 2017 09:30
:wave: @Manish-Giri
math===code
:smile:
heroiczero
@heroiczero
Sep 30 2017 09:58
@Manish-Giri @daddycardona @thekholm80 @DarrenfJ TY
CamperBot
@camperbot
Sep 30 2017 09:58
heroiczero sends brownie points to @manish-giri and @daddycardona and @thekholm80 and @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1496 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:star2: 2065 | @darrenfj |http://www.freecodecamp.com/darrenfj
:star2: 6599 | @manish-giri |http://www.freecodecamp.com/manish-giri
:cookie: 356 | @daddycardona |http://www.freecodecamp.com/daddycardona
Ken Haduch
@khaduch
Sep 30 2017 12:32
@ericmiller777 - your simon game - just dragging the screen around and it is responsive, but the buttons and labels jump around quite a bit, and the size of the border looks a little off - too big? But I guess that's minor. THe fact that the button's square box highlights when I click does ruin the appearance. After I mistakenly clicked I got a strange sequence of re-playing the buttons and sounds. Maybe it is just playing the sequence multiple times? But it seems to be functioning well when the user interacts with it carefully.
akosuadenell
@akosuadenell
Sep 30 2017 12:48
Screen Shot 2017-09-30 at 8.32.02 AM.jpg
I am trying to figure out how to make the text vertically align on the page
I want it to be in the exact center of the page

*{
margin: 0;
padding: 0;
border: 0;
}
body{
background: url(chase.jpg) no-repeat center center;
background-size:contain cover;
display: flex;
flex-direction: column;
justify-content: center;
height: auto;
min-height: 100%;
}
.container{
max-width: 600px;
margin: 0px auto;
text-align: center;
vertical-align: middle;

}

h1{
color: #FFFFFF;
font: 900 90px 'Pacifico', cursive;
text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.6);
margin-bottom: 24px;
opacity: 0.5;
vertical-align: middle;
text-align: center;

}

<!DOCTYPE html>

<html lang = "en">
<head>
<meta charset = "utf-8">
<title>Chase Your Dreams</title>
<link href="https://fonts.googleapis.com/css?family=Josefin+Sans|Pacifico" rel="stylesheet">
<link href="style2.css" type="text/css" rel="stylesheet">
</head>
<body>
<header>
<img src="dreamchasers.png" alt="logo" width="120"/>
<nav>
</nav>
</header>
<div class = "container">
<h1>Chase Your Dreams</h1>

</div>
</body>
</html>

LydaTech
@lydatech
Sep 30 2017 13:28
@akosuadenell use flex
@akosuadenell put it in a pen please
Ken Haduch
@khaduch
Sep 30 2017 13:33
@daddycardona - re: :point_up: September 30, 2017 4:05 AM - you can probably find math packages written in JS that will do all of those things - there are definitely math packages that people have developed. I think that you can have a language that is loaded with those features and perhaps they aren't generally used in a web page, so it would be overkill to have them available all the time. Of course, that is just my own thought on it. Googlling for some info, I found this math library that has a gcd function, and tons of others. So if you need it for a site you're developing, you can get it!
@daddycardona - in the case of what you're learning here, knowing how to write code to do a lot of things is useful, so there is a selection of challenges that are presented and you get to try lots of things. I agree that it can be confusing and sometimes be really frustrating, but that's definitely a way to learn things - working through the pain and frustration and getting help from google and the fine folks here & elsewhere!
Ken Haduch
@khaduch
Sep 30 2017 13:45
@daddycardona - here is a link to another math package - there are things out there if you need them in the future (probably not for use in the FCC exercises, maybe in the projects if you would need them?)
Anders Nicolai Magnussen
@andersnicolaimagnussen
Sep 30 2017 13:55
Hi,
I have a project where I have included a bootstrap carousel slider, the slider works but the navbar button does not work, if I change some of the script sources then the button works but the slider goes maniac sliding really fast. I know it is something related to which scripts I have included but I have tried multiple times now and I cant seem to get it to work.
Thanks in advance. You can take a look at the website if you´d like
Ken Haduch
@khaduch
Sep 30 2017 14:21
@nicolaimagnussen - you should post the URL for your site and someone might be able to help you figure it out.
@akosuadenell - this site might be helpful - CSS tricks centering guide - or as @lydatech said, please make a CodePen project, it's a lot easier to help without having to set up a separate project from posted code. And if you do want to post code, this guide to markdown code posting makes the code posting show up in a better format.
Darren
@DarrenfJ
Sep 30 2017 15:17
morning fCC
@khaduch thanks for sharing the links and tips..always appreciated when people help out :D
CamperBot
@camperbot
Sep 30 2017 15:19
darrenfj sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3325 | @khaduch |http://www.freecodecamp.com/khaduch
Darren
@DarrenfJ
Sep 30 2017 15:26
and thanks @Manish-Giri @daddycardona for helping others yesterday too...
CamperBot
@camperbot
Sep 30 2017 15:26
:cookie: 357 | @daddycardona |http://www.freecodecamp.com/daddycardona
darrenfj sends brownie points to @manish-giri and @daddycardona :sparkles: :thumbsup: :sparkles:
:star2: 6600 | @manish-giri |http://www.freecodecamp.com/manish-giri
Darren
@DarrenfJ
Sep 30 2017 15:26
i'm off for :coffee: and podcasts. ttyl
Ken Haduch
@khaduch
Sep 30 2017 15:29
@DarrenfJ - you're welcome! And have a great day...
Momozor
@momozor
Sep 30 2017 15:44
Hi
is it okay to share a javascript project here?
I think a quick one won't hurt anybody I think. You can find the source too at https://github.com/faraco/platformer
Thanks.
Darren
@DarrenfJ
Sep 30 2017 16:52
@faraco thanks for sharing
CamperBot
@camperbot
Sep 30 2017 16:52
darrenfj sends brownie points to @faraco :sparkles: :thumbsup: :sparkles:
:cookie: 375 | @faraco |http://www.freecodecamp.com/faraco
Darren
@DarrenfJ
Sep 30 2017 16:52
will check it out
it's cool/interesting
1 thing, the stars 'fall' at the start.. that expected?
and anyhting that can kill me?
or is it in 'phase 1' inital design?
Sritharini
@srithpink
Sep 30 2017 16:58
hi guys
hiii friends!
Darren
@DarrenfJ
Sep 30 2017 17:00
@srithpink hi!
welcome to the helproom
Sritharini
@srithpink
Sep 30 2017 17:01
thanks for d welcome ! @DarrenfJ
CamperBot
@camperbot
Sep 30 2017 17:01
srithpink sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2066 | @darrenfj |http://www.freecodecamp.com/darrenfj
Sritharini
@srithpink
Sep 30 2017 17:01
i am learning php
from w3schools
while doing a program to retrieve data from database....i get an error
Darren
@DarrenfJ
Sep 30 2017 17:01
cool
Sritharini
@srithpink
Sep 30 2017 17:02
but i dont have any idea
Darren
@DarrenfJ
Sep 30 2017 17:02
not a lot of php people here at fCC
lemme check if the php gitter is still active
Sritharini
@srithpink
Sep 30 2017 17:02
yeah sure thankyou!
Momozor
@momozor
Sep 30 2017 17:04
@DarrenfJ Hi thanks for the reply.
CamperBot
@camperbot
Sep 30 2017 17:04
faraco sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2067 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Sep 30 2017 17:04
yah i think it's no longer active but i think there might be some people in the main chat room ...
here's the list of all rooms: https://gitter.im/FreeCodeCamp/home
Momozor
@momozor
Sep 30 2017 17:04
Yes, the star supposed to fall. Also yes, it is in phase 1. No enemies yet, but I'm working towards that soon! :)
Darren
@DarrenfJ
Sep 30 2017 17:05
this is the main room.. way more active
@faraco cool
i liked what i say so far :D
Momozor
@momozor
Sep 30 2017 17:05
Thus, the bat sprite doesn't make sense when paired with its jumping motion. They are supposed to fly.
Darren
@DarrenfJ
Sep 30 2017 17:05
ok,back to :coffee: and podcasts
Momozor
@momozor
Sep 30 2017 17:05
alright, bye.
Darren
@DarrenfJ
Sep 30 2017 17:06
@faraco oh you mean creating a one with the wings flying?
it's wings fly don't they?
oh i see, it only goes up when it's on the platform
yah
Momozor
@momozor
Sep 30 2017 17:07
I actually cannot find suitable sprite for the player. Turn out that the only thing I found working also that I can animate is the bat.
Darren
@DarrenfJ
Sep 30 2017 17:07
i like the bat :D
ok back later
Momozor
@momozor
Sep 30 2017 17:07
:wave:
Albert Cardona II
@daddycardona
Sep 30 2017 19:40
@kelechy bad at math === screw the code lmao
what up yall ;)
thanks @DarrenfJ
CamperBot
@camperbot
Sep 30 2017 19:44
daddycardona sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2068 | @darrenfj |http://www.freecodecamp.com/darrenfj
Gersho
@Gersho
Sep 30 2017 19:48
@daddycardona math.com helped me a great deal for the math related challenges
Albert Cardona II
@daddycardona
Sep 30 2017 19:49
nice to know thanks @Gersho I will check that out right now I am redoing all the older code that I don't have saved. I realized I am getting better with .reduce() with some of these easy challenges lol
CamperBot
@camperbot
Sep 30 2017 19:49
daddycardona sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 485 | @gersho |http://www.freecodecamp.com/gersho
Gersho
@Gersho
Sep 30 2017 19:51
after checking the logs a bit, i see you're on lcm, here is the link you're looking for http://www.math.com/school/subject1/lessons/S1U3L3DP.html
their method can be broken in small codable steps even if you suck at maths
Albert Cardona II
@daddycardona
Sep 30 2017 19:54
thanks again brother
I am looking at it now but since FCC deleted what I have submitted and I had no clue what I was doing I am going to redo all the >easier challenges and come back to this one ;)
Gersho
@Gersho
Sep 30 2017 20:00

but since FCC deleted what I have submitted

?? are you sure it's not a .org /.com issue ?

Albert Cardona II
@daddycardona
Sep 30 2017 20:26
nope it was when I deleted my cookies @Gersho
Eric Miller
@ericmiller777
Sep 30 2017 20:27
@daddycardona thanks, also I know there's a email you can email to get your account restored.
CamperBot
@camperbot
Sep 30 2017 20:27
ericmiller777 sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 358 | @daddycardona |http://www.freecodecamp.com/daddycardona
Albert Cardona II
@daddycardona
Sep 30 2017 20:27
oh okay
Gersho
@Gersho
Sep 30 2017 20:28
i had never heard of that issue (but i use a separate browser for fCC lessons and stuff, and i never cleared cookies)
Albert Cardona II
@daddycardona
Sep 30 2017 20:28
try clearing cookies ;) see if it does the same I literally do all my stuff on my desktop now
Gersho
@Gersho
Sep 30 2017 20:28

try clearing cookies ;)

errr, i'll pass

Albert Cardona II
@daddycardona
Sep 30 2017 20:29
blob
Gersho
@Gersho
Sep 30 2017 20:29
but are we talking about the ones you started but haven't finished, or the finished ones too ?
Screenshot from 2017-09-30 16-31-14.png
Albert Cardona II
@daddycardona
Sep 30 2017 20:32
I don't see any pornhub code lmao
Gersho
@Gersho
Sep 30 2017 20:33
well if they hired me there would be
Albert Cardona II
@daddycardona
Sep 30 2017 20:34
lmao
yeah I fell you I think I am about to go to treehouse and do their stuff too. ;)
feel you *
Gersho
@Gersho
Sep 30 2017 20:35
would be great from small talk, first they're like "ooohh you're a programmer" and then "oh you work for pornhub" and then you pretend you know all their secrets ;O
Albert Cardona II
@daddycardona
Sep 30 2017 20:37
LMAO
where were you on april 12th 2017, because our cookies say something different lmao @Gersho
Gersho
@Gersho
Sep 30 2017 20:39
^^
Albert Cardona II
@daddycardona
Sep 30 2017 20:40
lol
Mike
@MikeJSchorah
Sep 30 2017 21:13
lol
Is that Eli Manning?
Is anyone familiar with this code?
<?php
//* Code goes here

add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );

function enqueue_parent_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
piteto
@piteto
Sep 30 2017 21:15
loading a wordpress child theme?
Mike
@MikeJSchorah
Sep 30 2017 21:17
@piteto Were you the one I was talking to a month ago about how to use a child theme??
piteto
@piteto
Sep 30 2017 21:17
if you don't import the style in your child theme's css you can use that code to import it via your functions.php
yes, I was the one
Mike
@MikeJSchorah
Sep 30 2017 21:18
Lol. Why didn't you tell me?
piteto
@piteto
Sep 30 2017 21:18
creating a child theme usually isn't a one-size-fits-all solution
Mike
@MikeJSchorah
Sep 30 2017 21:19
Why not? @piteto
piteto
@piteto
Sep 30 2017 21:19
because some themes are ridiculously complicated
Mike
@MikeJSchorah
Sep 30 2017 21:19
The Divi theme?
piteto
@piteto
Sep 30 2017 21:19
You were using a couple of themes I'm not familiar with - Divi is one of them
the kinds of themes that provide WYSIWYG build tools can get pretty crazy
Mike
@MikeJSchorah
Sep 30 2017 21:21
Divi is the most popular theme out there
piteto
@piteto
Sep 30 2017 21:21
I've never heard of it :)
Maybe you've tried that, but the instructions look standard
Mike
@MikeJSchorah
Sep 30 2017 21:28
I think my website now has a child theme on it @piteto
http://monksbarbershop.com <--- I used my worst website to try it out on :)
piteto
@piteto
Sep 30 2017 21:29
If so, you should see it in your admin dashboard and be able to select it, then see any CSS style changes you made
Mike
@MikeJSchorah
Sep 30 2017 21:33
@piteto I thought you were going to tell me to go to "View Page Source"
piteto
@piteto
Sep 30 2017 21:33
@MikeJSchorah that works too!
Mike
@MikeJSchorah
Sep 30 2017 21:34
<link rel='stylesheet' id='divi-style-css'  href='http://monksbarbershop.com/wp-content/themes/Divi-child/style.css?ver=3.0.69' type='text/css' media='all' />
@piteto This means I did it right then, right?
piteto
@piteto
Sep 30 2017 21:35
@MikeJSchorah It seems so - do you see your CSS customizations on the site?
Mike
@MikeJSchorah
Sep 30 2017 21:40
Nothing has changed, so yeah @piteto
Eric Miller
@ericmiller777
Sep 30 2017 21:58
anyone wanna look at my crappy simon logic and see if theres a way to set a true/false at the beginning/end of the loop? so the player cant click during sequence?
its pretty much done
just the player can click during the sequence and make some weird stuff happen
Gersho
@Gersho
Sep 30 2017 22:02

anyone wanna look at my crappy simon logic and see if theres a way to set a true/false at the beginning/end of the loop? so the player cant click during sequence?

i didn't look yet, but can't you use a boolean check ?

playerTurn = false
and at the start of your button callback
if (!playerTurn){return;}
Eric Miller
@ericmiller777
Sep 30 2017 22:06
I tryed to do that yesterday didnt work, i can try again
my poroblem is where can i set playerTurn (noClick)
to true again, without it becoming true too soon
Gersho
@Gersho
Sep 30 2017 22:08
you have to take into account that while the start of the computer turn should trigger right away, you must block user interaction until all your setTrigger have resolved
yes the delay is the issue
Eric Miller
@ericmiller777
Sep 30 2017 22:09
it is perfectly playable atm, but if it was a simple fix, I wanted to try and fix it
any ideas?
Gersho
@Gersho
Sep 30 2017 22:10
    setTimeout(function(){
      playerTurn = true;
    },(melody.length+1)*lightDuration);
lightDuration should be the same as your usual light on/off , so 1000 according to your code
(i can't help but notice you kept all those *0.8 xD)
Eric Miller
@ericmiller777
Sep 30 2017 22:11
:P
the timeing worked fine
so i didnt mess with it
Gersho
@Gersho
Sep 30 2017 22:13
in my version i have lightDuration*0.8 (wasn't really sure how much it should be and it was annoying to change it in every place when testing, i ended up with 1100 )
Eric Miller
@ericmiller777
Sep 30 2017 22:13
is there a way i can check, when function is complete?
i tryed if i == sequence.length, but that was just weird
Gersho
@Gersho
Sep 30 2017 22:14
console.log at the last line ?
oh
you simply put that code right after (or before doesn't really matter) your loop
Eric Miller
@ericmiller777
Sep 30 2017 22:15
it doesnt work for some reason....
wamme re add it so you can try it?
Gersho
@Gersho
Sep 30 2017 22:15
  function playMelody(){
    playerTurn = false;
    playerMelody = [];

    if(melody.length<10){
      $("#display").html("0"+melody.length);

    }else{$("#display").html(melody.length);}

    for(i=0; i<melody.length; i++){

      switch(melody[i]){
        case "green":
        setTimeout(function(){
          $("#green").attr('class', 'green-on');
          document.getElementById("audio-green").play();
          setTimeout(function() {
            $("#green").attr('class', 'green-off');
          }, lightDuration*0.8);
        },(i+1)*lightDuration);
        break;
        case "red":
        break;
        case "yellow":
        break;
        break;
      }

    }

    setTimeout(function(){
      playerTurn = true;
    },(melody.length+1)*lightDuration);

  }
i deleted a bunch of unrelated stuff in the switch so it's not too long
but you should see the logic
Eric Miller
@ericmiller777
Sep 30 2017 22:16
yes
Gersho
@Gersho
Sep 30 2017 22:17
it's pretty much the same as yours
Eric Miller
@ericmiller777
Sep 30 2017 22:17
i really think i should be able to do it with mine somehow....
Gersho
@Gersho
Sep 30 2017 22:19
i can't really tell where all those {} start and end so i might be missing something, but i'd say you should try putting it between line 433 and 434
or on line 482/483
Eric Miller
@ericmiller777
Sep 30 2017 22:25
since yesterday i was trying to do the same thing, but i was useing sequence.length + i
1 seems to have fixed it i think
@gersho thank you
CamperBot
@camperbot
Sep 30 2017 22:25
:cookie: 486 | @gersho |http://www.freecodecamp.com/gersho
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
Eric Miller
@ericmiller777
Sep 30 2017 22:26
gersho id like to accredit you for help at least at the top of my code? if you dont mind, i promise I understand either way :P
Gersho
@Gersho
Sep 30 2017 22:26
:thumbsup:
that's your project do whatever you want with it lol :D
Moisés Man
@moigithub
Sep 30 2017 22:27

generateSequence (step 1) (userTurn = false)
playSequence (step 2)
wait for user input (with a timeout.. lets say 1 second per sequence item) (userTurn = true)
after each user input.. check if sequence is valid

if timeout and user didnt input all sequence in correct order, repeat from step 2

if user input failed to enter the correct sequence, repeat from step 2

if all sequences are correct.. repeat from step 1

Eric Miller
@ericmiller777
Sep 30 2017 22:38
@moigithub thanks
CamperBot
@camperbot
Sep 30 2017 22:38
ericmiller777 sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3646 | @moigithub |http://www.freecodecamp.com/moigithub
Eric Miller
@ericmiller777
Sep 30 2017 22:54
@Gersho fullscreen is my strict button aligned for you?
because for me on chrome it is not
....
idk why firefox is fine
Gersho
@Gersho
Sep 30 2017 22:56
Screenshot from 2017-09-30 18-56-02.png
left is vivaldi(4/3), right is firefox (16/9)
Eric Miller
@ericmiller777
Sep 30 2017 22:57
only chrome is wrong lol
why....
ill just have to make another css that targets chrome....?
Gersho
@Gersho
Sep 30 2017 22:58
depends how bad it is i guess
Eric Miller
@ericmiller777
Sep 30 2017 22:59
pretty bad
Gersho
@Gersho
Sep 30 2017 23:00
then yes i guess, but i have no idea how to do that
Eric Miller
@ericmiller777
Sep 30 2017 23:01
i do
Gersho
@Gersho
Sep 30 2017 23:02
good luck then :D
Nick Cleary
@Hijerboa
Sep 30 2017 23:05
question: can the isInteger() function be passed a variable?
because whenever I try to do so it returns false
Eric Miller
@ericmiller777
Sep 30 2017 23:07
it returns NaN or not NaN?
Nick Cleary
@Hijerboa
Sep 30 2017 23:07
nvm it was my own stupid mistake
Eric Miller
@ericmiller777
Sep 30 2017 23:07
okay gl
Nick Cleary
@Hijerboa
Sep 30 2017 23:08
@ericmiller777 haha thanks
CamperBot
@camperbot
Sep 30 2017 23:08
:cookie: 305 | @ericmiller777 |http://www.freecodecamp.com/ericmiller777
hijerboa sends brownie points to @ericmiller777 :sparkles: :thumbsup: :sparkles:
Gersho
@Gersho
Sep 30 2017 23:08
If the target value is an integer, return true, otherwise return false. If the value is NaN or infinite, return false.
Nick Cleary
@Hijerboa
Sep 30 2017 23:17
yeah.... I realized that if it looks like a number, smells like a number, and reads like a number in console.log, it still can be a string
Gersho
@Gersho
Sep 30 2017 23:20
var foo = "blabla";
console.log(typeof foo);
Eric Miller
@ericmiller777
Sep 30 2017 23:21
hey guys
.btn-sq-lg {
    width: 20vw;
    height: 20vw;
    outline: 0;
    outline: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }
i cant get chrome to remove the blue box on click
Gersho
@Gersho
Sep 30 2017 23:22
apart from width and height i don't even know what this is xD
Eric Miller
@ericmiller777
Sep 30 2017 23:23
for some reason it works from html....
Moisés Man
@moigithub
Sep 30 2017 23:24
outline is when ur element have focus, similar to a border
Eric Miller
@ericmiller777
Sep 30 2017 23:25
i set it to the tag instead of the class and that worked
@Gersho you dont have this problem because you use divs
just1witness
@just1witness
Sep 30 2017 23:45
@ericmiller777 Find out how to modify the color and set it to transparent?
Eric Miller
@ericmiller777
Sep 30 2017 23:45
i got it working
@just1witness thanks
CamperBot
@camperbot
Sep 30 2017 23:45
ericmiller777 sends brownie points to @just1witness :sparkles: :thumbsup: :sparkles:
:cookie: 402 | @just1witness |http://www.freecodecamp.com/just1witness
just1witness
@just1witness
Sep 30 2017 23:45
@ericmiller777 What did you do? Curious
Eric Miller
@ericmiller777
Sep 30 2017 23:46
i was setting it to the class
i set it directly to the buttons tag
and it worked
just1witness
@just1witness
Sep 30 2017 23:47
Cool. Thanks