These are chat archives for FreeCodeCamp/HelpFrontEnd

2nd
Sep 2017
rafaelmonroy
@rafaelmonroy
Sep 02 2017 00:01 UTC
@longnt80 @gothamknight ah man, gotta run, I'll check it out at computer at home. thanks! brb
CamperBot
@camperbot
Sep 02 2017 00:01 UTC
rafaelmonroy sends brownie points to @longnt80 and @gothamknight :sparkles: :thumbsup: :sparkles:
:warning: rafaelmonroy already gave gothamknight points
:cookie: 541 | @longnt80 |http://www.freecodecamp.com/longnt80
Siddarth Krishnan
@siddarthk123
Sep 02 2017 00:29 UTC
can someone
tell me how to solve the roman numeral converter problem?
can someone
tell me how to solve
the roman numeral converter
problem
please?
start at the number and work down to zero
if number > 1000 { answer += "M" number -= 1000 }
@siddarthk123
rafaelmonroy
@rafaelmonroy
Sep 02 2017 00:46 UTC
@gothamknight @longnt80 ok I see the object data in the google chrome console (was working off safari earlier) how come it wont show on codepen console?
Long Nguyen
@longnt80
Sep 02 2017 00:51 UTC
@rafaelmonroy not all console is the same
devtool is the best out there
Henry
@GitHub-Henry
Sep 02 2017 01:12 UTC
@rafaelmonroy if you play around with it, you can use chrome dev tools with codepen
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:16 UTC
Can someone
help me wth my JS?
@Refath whats up
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:18 UTC
So the problem is that
in my pen, when you go down to Speed (in settings), and put like 3s, the animation-duration property will change to 3s, but the visual rotation of the wheel doesn't change until after 30s (default animation-duration). What I want is for the animation-duration to change, and the visual rotation to change accordingly immediately after the user clicks done.
Unfortunately, I'm kind of stumped on how to go on about this.
Here is the CodePen link. https://codepen.io/Refath/pen/yoZxMr
Elizabeth Paul
@Kowalatam
Sep 02 2017 01:20 UTC
so my timer starts glitching after the session time has counted.....
https://codepen.io/Kowalatam/pen/LjqJmW
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:21 UTC
Any help is appreciated, guys
@Refath i thought i tried helping you earlier? did what i suggested not work?
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:22 UTC
@moT01 Wrapping the jQuery in one document window function?
changing the duration in .parent in the css
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:23 UTC
Right, but I'm not changing the duration via css, I'm doing it in jQuery
$(".parent").css("animation-duration", newimg);
newimg, by the way, is whatever the new number of seconds the animation duration is (user input)
probly cause the animation is already in progress and has to finish
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:26 UTC
Exactly
@Kowalatam dont forget to clear those intervals
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:26 UTC
But how can I like, disrupt the animation immediately, do you know?
Thanks for helping, BTW
Elizabeth Paul
@Kowalatam
Sep 02 2017 01:27 UTC
@moT01 when i did the clearInterval tini.. it was still glitching..
i can give it one more go and see...
@Refath no i dont know off hand, you should really properly indent your code before you ask for help. What lines?
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:31 UTC
@moT01
$(".speedtext").keyup(function() { var newimg = $(this).val(); $(".parent").css("animation-duration", newimg); $(".speedSave").click(function() { $(".speedChange").html(newimg); }); });
top left on the keyboard
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:32 UTC
@moT01 I don't understand?
three of those, on their own line
`
'
different things
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:32 UTC
Oh, ok! Thanks
$(".speedtext").keyup(function() { var newimg = $(this).val(); $(".parent").css("animation-duration", newimg); $(".speedSave").click(function() { $(".speedChange").html(newimg); }); });
on their own line, three ' then hit shift+enter then your code then shift+enter and then three more '
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:37 UTC
$(".speedtext").keyup(function() { var newimg = $(this).val(); $(".parent").css("animation-duration", newimg); $(".speedSave").click(function() { $(".speedChange").html(newimg); }); });
Wow, nice!
So, thoughts?
Elizabeth Paul
@Kowalatam
Sep 02 2017 01:39 UTC
im probably not using it well but it kinda made it worst ...
i got nothin
Elizabeth Paul
@Kowalatam
Sep 02 2017 01:39 UTC
i guess thats what happens when i assume a project is going to be easy .. :)
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:39 UTC
OK Thx
no, im taking a look
but yea, im not sure, i dont think its as easy as you would think
i skimmed over this if you want to read it https://css-tricks.com/restart-css-animation/
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 01:40 UTC
Thanks for the link @moT01! Let me check it out
CamperBot
@camperbot
Sep 02 2017 01:40 UTC
refath sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 833 | @mot01 |http://www.freecodecamp.com/mot01
@Kowalatam yea, if you ever go start to finish on a project without any hiccups let me know, ill send some real cookies
Elizabeth Paul
@Kowalatam
Sep 02 2017 01:44 UTC
@moT01 oh c'mon.. i actually enjoy hiccups... i find it frustrating and weirdly fun lol
if there is a project like that.. i probably won't do it.. will it for boring peeps lol :)
that's where you learn
im checking how i did it
you need to like set the interval to a variable name and then clear it
Elizabeth Paul
@Kowalatam
Sep 02 2017 01:46 UTC
ohh i see..
i was setting the variable name to the main function ...
i'm so smart :)
@moT01 works well now.. thank u
CamperBot
@camperbot
Sep 02 2017 01:51 UTC
kowalatam sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 834 | @mot01 |http://www.freecodecamp.com/mot01
one other thing you might run into is hitting your start button when an interval is already running
Elizabeth Paul
@Kowalatam
Sep 02 2017 01:58 UTC
ahhh.. i seee.. witchcraft ... lol ...
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:15 UTC
can anyone tell me why this code will change my fahrentheit to celcius but not back to fahrenheit
$('#btn').on('click', function (){
          if ($weather.text(fahrenheit+' F')){
            $weather.text(celcius+' C');
          } else if ($weather.text(celcius+' C')){
            $weather.text(fahrenheit+' F');
          }
        })
is the variable named $weather?
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:19 UTC
yeah i set var $weather = $('#weather')
it turns it from F to C but not back
got a pen?
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:20 UTC
@moT01 i was having trouble with that so am trying a different approach lol but was wondering if this was the reason it wasnt working
Roxroy
@roxroy
Sep 02 2017 02:20 UTC
@rafaelmonroy , for the on click handle, check if the last char of the '$weather.text' is F or C. Then use it to switch the text
maybe some more code to show?
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:26 UTC
@moT01 @roxroy i commented out the second approach for now lol here is the pen running the code i had questions about https://codepen.io/rafaelmonroy/pen/BdMyeb
the reason I am trying to second approach is because I shouldnt be running a click function inside my success function, maybe thats the reason its not working? @roxroy @moT01
Siddarth Krishnan
@siddarthk123
Sep 02 2017 02:31 UTC
Tom M
can someone help me
can someone
get on skype
and help me with the roman numeral challenge?
please?
i gave you a hint earlier
Siddarth Krishnan
@siddarthk123
Sep 02 2017 02:33 UTC
Tom
@rafaelmonroy im taking a look, its not finding my location, so im trying to put my lat/long in the url
Roxroy
@roxroy
Sep 02 2017 02:33 UTC

@rafaelmonroy . you can create a variable outside the click handler
let showCelcius = false;
in the handler put

         showCelcius = !showCelcius;    
          if (showCelcius){
            $weather.text(celcius+' C');
          } else {
            $weather.text(fahrenheit+' F');
          }

This will toggle the temp unit

Siddarth Krishnan
@siddarthk123
Sep 02 2017 02:33 UTC
Tom m
can we chat on skype?
no
Siddarth Krishnan
@siddarthk123
Sep 02 2017 02:33 UTC
wait
so
if the number is larger than
1000
then print M
yup
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:33 UTC
@moT01 really? not showing your location? thats weird
Siddarth Krishnan
@siddarthk123
Sep 02 2017 02:34 UTC
what if the number
reaches
a three digit number?
williamsb
@williamsb
Sep 02 2017 02:34 UTC
you have to enable geolocation in your browser
@siddarthk123 there should be a link in the challenge description on how roman numerals work
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:36 UTC
@roxroy nice! that worked! thanks bro
CamperBot
@camperbot
Sep 02 2017 02:36 UTC
rafaelmonroy sends brownie points to @roxroy :sparkles: :thumbsup: :sparkles:
:star2: 1132 | @roxroy |http://www.freecodecamp.com/roxroy
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:37 UTC
@moT01 kinda sucks tho because I dont really understand it lol
@roxroy do you know why my original code wasnt working>
@williamsb showing me its enabled
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:39 UTC
@moT01 it worked in my computer at work and computer at home, also in my cell phone at the store, is there a bug in my code?
no, that's something on my end
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:41 UTC
does anyone know what a ! before a variable mean?
williamsb
@williamsb
Sep 02 2017 02:42 UTC
returns the opposite of a boolean
so !true equals to false, !false equals to true
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:43 UTC
ohh ok @williamsb thanks
CamperBot
@camperbot
Sep 02 2017 02:43 UTC
rafaelmonroy sends brownie points to @williamsb :sparkles: :thumbsup: :sparkles:
:cookie: 46 | @williamsb |http://www.freecodecamp.com/williamsb
williamsb
@williamsb
Sep 02 2017 02:49 UTC
@rafaelmonroy '.text(content)' sets content while '.text()' returns the content value. so you would have to do '$weather.text() === (fahrenheit+" F")' and the same for celcius
Siddarth Krishnan
@siddarthk123
Sep 02 2017 02:49 UTC
can someone
help me with the roman numeral
converter
?
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:50 UTC
@williamsb alright let me see if i can get it to work, thanks again!
CamperBot
@camperbot
Sep 02 2017 02:50 UTC
rafaelmonroy sends brownie points to @williamsb :sparkles: :thumbsup: :sparkles:
:warning: rafaelmonroy already gave williamsb points
williamsb
@williamsb
Sep 02 2017 02:51 UTC
@rafaelmonroy okay lmk, i got it to work on my end
@siddarthk123 start with the number and work your way down to zero, maybe use a while loop
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:53 UTC
@williamsb YES! WOOOOO brroooo i knew i was close! lmao, got it to work
while (number > 0) {
  if (number > 1000) {
      answer += "M"
      number -= 1000; 
   }
....
....
}
williamsb
@williamsb
Sep 02 2017 02:54 UTC
@rafaelmonroy awesome
rafaelmonroy
@rafaelmonroy
Sep 02 2017 02:55 UTC
@williamsb quick question, is it bad coding technique to write the click handler inside my success function?
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 02:57 UTC
I need some help, folks
more than 4 hours? call a doctor
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 02:58 UTC
My pen, when I see it on debug mode, it's background image doesn't fit the body
williamsb
@williamsb
Sep 02 2017 03:00 UTC
@rafaelmonroy I don't see a problem with it (i could be wrong though)
rafaelmonroy
@rafaelmonroy
Sep 02 2017 03:02 UTC
@williamsb lol alright thanks man, I guess I’ll get feedback when I submit the final pen
CamperBot
@camperbot
Sep 02 2017 03:02 UTC
rafaelmonroy sends brownie points to @williamsb :sparkles: :thumbsup: :sparkles:
:warning: rafaelmonroy already gave williamsb points
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 03:03 UTC
@moT01 Thx
CamperBot
@camperbot
Sep 02 2017 03:03 UTC
refath sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 835 | @mot01 |http://www.freecodecamp.com/mot01
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 03:03 UTC
Worked
williamsb
@williamsb
Sep 02 2017 03:04 UTC
@rafaelmonroy np
Henry
@GitHub-Henry
Sep 02 2017 03:37 UTC
@rafaelmonroy just a heads up, I don't think feedback is provided to submitted projects, at least based on my experience.
williamsb
@williamsb
Sep 02 2017 03:39 UTC
@GitHub-Henry lol i was wondering about that I've submitted some and never received feedback
Henry
@GitHub-Henry
Sep 02 2017 03:41 UTC
I'm guessing it's an honor system kind of thing around here. So if you say it's done, then it's done. I haven't found anything to indicate otherwise.
rafaelmonroy
@rafaelmonroy
Sep 02 2017 03:47 UTC
@GitHub-Henry @williamsb guess its because I post it on my city’s facebook group, one of the admins always replies with suggestions, guess its not really code camplol
mstellaluna
@mstellaluna
Sep 02 2017 03:47 UTC
@rafaelmonroy Feedback isn't provided when you submit projects, they are verified for academic dishonesty. If you wish to have feedback you can post the link to your project in the codeReview room or in the main freecodecamp room.
rafaelmonroy
@rafaelmonroy
Sep 02 2017 03:48 UTC
@mstellaluna oh cool thats a good idea too, ill get the double the feedback lol
mstellaluna
@mstellaluna
Sep 02 2017 03:48 UTC
:)
Henry
@GitHub-Henry
Sep 02 2017 03:49 UTC
@mstellaluna what does 'verified for academic dishonesty' mean?
mstellaluna
@mstellaluna
Sep 02 2017 03:49 UTC
@GitHub-Henry it means they check to make sure you either a) did copy/paste the FCC example code or b) steal another camper's project and claim it as yours
williamsb
@williamsb
Sep 02 2017 03:51 UTC
@mstellaluna is this only for projects that are FCC related?
mstellaluna
@mstellaluna
Sep 02 2017 03:52 UTC
@williamsb yes
williamsb
@williamsb
Sep 02 2017 03:52 UTC
@mstellaluna ah okay
Henry
@GitHub-Henry
Sep 02 2017 03:53 UTC
@mstellaluna who is the 'they' that does this academic dishonesty check?
mstellaluna
@mstellaluna
Sep 02 2017 03:53 UTC
@GitHub-Henry FCC staff
sometimes cheating does get reported in to a moderator, the moderator checks out the claim, if its true, the moderator reports the cheating to the FCC staff
Henry
@GitHub-Henry
Sep 02 2017 03:57 UTC
@mstellaluna so if one does not copy another's work, is submitted work verified to meet minimum requirements before it is considered complete?
mstellaluna
@mstellaluna
Sep 02 2017 03:58 UTC
@GitHub-Henry i believe they are, i dont verify the projects.
Henry
@GitHub-Henry
Sep 02 2017 04:01 UTC
@mstellaluna just wondering, cuz i've looked at submitted work that didn't work properly (calculators for example), and it was considered complete. I've seen it enough times, I really wondered how it passed a verification check. So, are you pullling my leg about a verification check?
mstellaluna
@mstellaluna
Sep 02 2017 04:02 UTC
@GitHub-Henry as i said, i dont verify them... i believe they are
Henry
@GitHub-Henry
Sep 02 2017 04:02 UTC
@mstellaluna and you believe they are because?
mstellaluna
@mstellaluna
Sep 02 2017 04:03 UTC
@GitHub-Henry why wouldnt they be?
Henry
@GitHub-Henry
Sep 02 2017 04:04 UTC
@mstellaluna is there a policy page somewhere that indicates who and how this is supposed to be done?
when looking at completed work it really does make me question this verification claim you make
rafaelmonroy
@rafaelmonroy
Sep 02 2017 04:06 UTC
Henry
@GitHub-Henry
Sep 02 2017 04:09 UTC
@rafaelmonroy @mstellaluna thank you, what about verification of projects. as mentioned earlier. i've seen enough 'completed' work that makes me wonder how the project could be considered complete, since it didn't work (I am thinking of the 'completed' calculator projects that had flaws but were still marked as complete.
CamperBot
@camperbot
Sep 02 2017 04:09 UTC
github-henry sends brownie points to @rafaelmonroy and @mstellaluna :sparkles: :thumbsup: :sparkles:
:cookie: 269 | @rafaelmonroy |http://www.freecodecamp.com/rafaelmonroy
:cookie: 750 | @mstellaluna |http://www.freecodecamp.com/mstellaluna
mstellaluna
@mstellaluna
Sep 02 2017 04:10 UTC
@GitHub-Henry as the page says you can send an email to the FCC team and they can respond to your concerns
just be aware they get alot of email so expect a delay
Henry
@GitHub-Henry
Sep 02 2017 04:13 UTC
@mstellaluna the way i see it, is if someone wants to claim that a flawed project is complete, and that person is satisfied with it, and fcc is satisfied with it, and a potential employer is satisfied with it, who am i to say otherwise. but the claim of fcc verifying projects really is questionable in my mind, since i've seen enough projects to make me question it.
mstellaluna
@mstellaluna
Sep 02 2017 04:14 UTC
@GitHub-Henry that's your opinion and you have a right to it. Have a great evening Henry
Henry
@GitHub-Henry
Sep 02 2017 04:18 UTC
@mstellaluna thanks for your input and the academic honesty link, btw, is there a verification policy page. i'd appreciate the opportunity to review that policy.
CamperBot
@camperbot
Sep 02 2017 04:18 UTC
github-henry sends brownie points to @mstellaluna :sparkles: :thumbsup: :sparkles:
:warning: github-henry already gave mstellaluna points
mstellaluna
@mstellaluna
Sep 02 2017 04:21 UTC
@GitHub-Henry you know im not sure, you can either ask in the Contributors room, the FCC staff and Quincy Larson are sometimes in there, they might know https://gitter.im/FreeCodeCamp/Contributors just be aware this room isn't very active .. i believe there is an equivalent also on the forum ... or send an email to the team@freecodecamp.org to find out if there is one available
Henry
@GitHub-Henry
Sep 02 2017 04:22 UTC
@mstellaluna appreciate your input
mstellaluna
@mstellaluna
Sep 02 2017 04:22 UTC
:)
@GitHub-Henry you can post in there and tag quincy, when he's available he will eventually answer
the chat contributors room
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 05:16 UTC
Hi people
On my website, I have all my files linked, but the layout of the page is messed up. https://refath.github.io/Niva/
Any help is appreciated
David
@deitcode
Sep 02 2017 05:33 UTC
Hey everyone, I've just been putting the finishing touches on my Random Quote Machine for the intermediate projects of front-end cert. I built it locally on my machine and then copied and pasted everything into CodePen where I'm getting a little bit of extra height on the content of my twitter and new quote buttons. The height is perfect on my local copy though. Would anybody have any idea why this is happening? https://codepen.io/deitcode/pen/BdpGpo
Wow it looks pretty bad in there. I tried to build it without bootstrap and haven't really done any responsive design work on it yet. I've mostly been looking at it full screen, oops :(
piteto
@piteto
Sep 02 2017 05:38 UTC
@deitcode You'll probably need to right-click -> view source and compare to know for sure. This CSS fixes it for me:
.buttonbar {
  width: 100%;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  line-height: 1em;
}
David
@deitcode
Sep 02 2017 05:43 UTC
woah that works. I guess codepen was doing something weird with line-height inheritance or something. thanks @piteto
CamperBot
@camperbot
Sep 02 2017 05:43 UTC
deitcode sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 41 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Sep 02 2017 05:44 UTC
I've been staring way too long at this....can anyone help me debug why I get a horizontal scrollbar in bootstrap's small breakpoint? It kicks in around 577px wide when the search results are shown. https://codepen.io/anon/pen/OjdBvK?editors=0010
Glad I could help @deitcode
rafaelmonroy
@rafaelmonroy
Sep 02 2017 05:55 UTC
hey guys, finally finished my weather app! thanks to all of you that helped along the way, i learned A LOT creating this one, it was a lot fun too. I’ll leave the pen here just incase anyone wants to check the weather lol https://codepen.io/rafaelmonroy/pen/BdMyeb/
Henry
@GitHub-Henry
Sep 02 2017 06:08 UTC
nice job @rafaelmonroy
rafaelmonroy
@rafaelmonroy
Sep 02 2017 06:09 UTC
@GitHub-Henry thanks
CamperBot
@camperbot
Sep 02 2017 06:09 UTC
rafaelmonroy sends brownie points to @github-henry :sparkles: :thumbsup: :sparkles:
:cookie: 354 | @github-henry |http://www.freecodecamp.com/github-henry
heroiczero
@heroiczero
Sep 02 2017 06:13 UTC
@rafaelmonroy nice job on the Weather App works as expected
Henry
@GitHub-Henry
Sep 02 2017 06:14 UTC
@piteto I don't get a horizontal scroll bar. when i go below 577 px area the input bar gets larger, but no horizontal scroll bar in my browser.
David
@deitcode
Sep 02 2017 06:15 UTC
@GitHub-Henry the scrollbar appears after you do a search
piteto
@piteto
Sep 02 2017 06:16 UTC
I'm seeing it between roughly 577px -> 768px
Henry
@GitHub-Henry
Sep 02 2017 06:18 UTC
@piteto @deitcode ok, in my browser after i do a search, after the results start to get covered by the browser (chrome in my case) then the browser adds the scroll bar. I think this is the browser's way of indicating that there is stuff that the browser is covering which may be seen by using the scroll bar. If this is the case, then this is ok. What do you think?
piteto
@piteto
Sep 02 2017 06:20 UTC
I'd like to prevent it if I can @GitHub-Henry very odd that only happens in the sm breakpoint of bootstrap, so I'm leaning toward something in their CSS. Mine is kind of minimal
Henry
@GitHub-Henry
Sep 02 2017 06:21 UTC
I think there is a stop default browser action js command that could be used, to stop the browsers default action.
piteto
@piteto
Sep 02 2017 06:21 UTC
As soon as the browser width goes below around 768px, the content jumps to the left
Then the scroll bar appears
Henry
@GitHub-Henry
Sep 02 2017 06:21 UTC
i'd search 'stop default horizontal scroll bar chrome'
David
@deitcode
Sep 02 2017 06:22 UTC
@piteto when the scrollbar appears, the content jumps to the right for me
piteto
@piteto
Sep 02 2017 06:22 UTC
I can use overflow hidden, but I'd prefer to fix the issue rather than hide it
Same here @deitcode
Henry
@GitHub-Henry
Sep 02 2017 06:27 UTC
@piteto @deitcode Perhaps this can help
The link provides a few solutions
It's a start
piteto
@piteto
Sep 02 2017 06:29 UTC

This fixes it in the debugger:

@media (min-width: 576px)
.container {
  max-width: 720px;
}

But it won't apply the settings when I add it to my css

The card-columns are overflowing their .container at that one breakpoint
Henry
@GitHub-Henry
Sep 02 2017 06:32 UTC
@piteto when overridding boot strap stuff i've found it better to use id because of css specificity
piteto
@piteto
Sep 02 2017 06:33 UTC
I try to use the same class name and make sure my CSS loads after bootstrap
prakash chandra yadav
@prakashyadav008
Sep 02 2017 06:34 UTC
hello everyone
Henry
@GitHub-Henry
Sep 02 2017 06:34 UTC
@piteto try adding an id to the container, then use the id, really try it. do you understand specificity. if you do, then you why to use id.
prakash chandra yadav
@prakashyadav008
Sep 02 2017 06:34 UTC
heres my wikipedia project
plz suggest changes if any
heroiczero
@heroiczero
Sep 02 2017 06:36 UTC
@prakashyadav008 Your search button seems out of line other than that good job :+1:
Henry
@GitHub-Henry
Sep 02 2017 06:36 UTC
@piteto your example uses a class .container
piteto
@piteto
Sep 02 2017 06:38 UTC
This works just fine for overriding, but gives different results in the debugger for some reason:
@media (min-width: 576px) {
  .container {
    max-width: 720px;
  }
}
heroiczero
@heroiczero
Sep 02 2017 06:39 UTC
Henry
@GitHub-Henry
Sep 02 2017 06:40 UTC
@heroiczero i prefer to avoid bootstrap also, so css grid or flex would be the way I go
piteto
@piteto
Sep 02 2017 06:41 UTC
If only everyone would upgrade their browsers so we could use it
Henry
@GitHub-Henry
Sep 02 2017 06:42 UTC
@piteto they have
piteto
@piteto
Sep 02 2017 06:42 UTC
Yeah, CSS grid is broken for 1 out of every 3 browsers :)
That's flexbox, which I'm currently using, CSS grid has lower support numbers
Henry
@GitHub-Henry
Sep 02 2017 06:43 UTC
@piteto virtually everyone supports flexbox, that's why i use it
Henry
@GitHub-Henry
Sep 02 2017 06:43 UTC
that's also why i don't use css grid
gotta use what's supported, unless you want head aches
css grid is almost there
heroiczero
@heroiczero
Sep 02 2017 06:45 UTC
It will eventually be supported.
Henry
@GitHub-Henry
Sep 02 2017 06:46 UTC
should learn it, cuz it's going to be supported
Jan Shah
@JanShah
Sep 02 2017 06:53 UTC
@piteto opera mini is the only browser not currently supporting grid
piteto
@piteto
Sep 02 2017 06:55 UTC
@JanShah It's the versions of the browsers people are using that cause the problems. People need to update.
71% of browsers in use support css grid
Henry
@GitHub-Henry
Sep 02 2017 06:58 UTC
@piteto CSS specificity is the reason I suggested you use an ID over a class or pseudo-class. You may want to consider this.
the link shows a pseudo class is the same as a class, please look at the link to see the specificity
root is no better than a class
that's why i provided the link for you to see for yourself
you might want to review css specificity
@JanShah not everyone upgrades, i have friend still using iphone 4
cuz it's smaller
Jan Shah
@JanShah
Sep 02 2017 07:03 UTC
@GitHub-Henry tell me about it, I've still got iphone 3 and an old windows phone
Santiago Chopitea
@raka26
Sep 02 2017 07:32 UTC
Guys i use ajax to upload imgs with php and after the request my page url goes like +++++++++++++++++fileTo
Im using method=post. But whats the difference between type and method?
Adeel Salim
@adeelsalim
Sep 02 2017 07:42 UTC

HI! Everyone can anyone look at this and help met why dont i see the hamburger on mobile view although when i move the cursor thier it changes to pointer and even works fine but i cant see the humburger

https://codepen.io/adeelsalim/pen/WEPYPM

Jan Shah
@JanShah
Sep 02 2017 08:04 UTC
@adeelsalim
 <div style="z-index:10"class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">
          </span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </div>

//css
.icon-bar {
  background:blue; //choose color
}
I'm not sure why the icon bars aren't already coloured.
Adeel Salim
@adeelsalim
Sep 02 2017 08:08 UTC
@JanShah Thanks alot mate
CamperBot
@camperbot
Sep 02 2017 08:08 UTC
adeelsalim sends brownie points to @janshah :sparkles: :thumbsup: :sparkles:
:cookie: 506 | @janshah |http://www.freecodecamp.com/janshah
iso
@iso1048
Sep 02 2017 08:09 UTC
Hi. Is anyone available to help with an issue related to the textarea tag?
Jan Shah
@JanShah
Sep 02 2017 08:10 UTC
also, if you add navbar-fixed-top to <nav class="navbar navbar-clean it will stop the scrollbars from appearing but you'll need a background for the open menu
@adeelsalim
Adeel Salim
@adeelsalim
Sep 02 2017 08:19 UTC
@JanShah background for the open menu? how can i get that
ok i get it
Jan Shah
@JanShah
Sep 02 2017 08:23 UTC
@adeelsalim
.navbar-nav {
  background:grey;
}
.navbar-nav > .active {
  background:green;
}
.navbar-nav > li {
  background:blue;
}
Adeel Salim
@adeelsalim
Sep 02 2017 08:24 UTC
thanks alot @JanShah
CamperBot
@camperbot
Sep 02 2017 08:24 UTC
adeelsalim sends brownie points to @janshah :sparkles: :thumbsup: :sparkles:
:warning: adeelsalim already gave janshah points
Jan Shah
@JanShah
Sep 02 2017 08:25 UTC
@adeelsalim no worries, looks good :)
Adeel Salim
@adeelsalim
Sep 02 2017 08:27 UTC
what if only want it to give the background color when i toggle the hamburger menu.. otherwise remains transparent
LiciniusRex
@hashtagyolo1
Sep 02 2017 09:17 UTC
good morning happy campers!
I was hoping someone could help me work out why my buttons and search don't align with the rest of the site
LiciniusRex
@hashtagyolo1
Sep 02 2017 09:23 UTC
I should say, why they aren't correctly centered
Utsav Kafley
@chopedada
Sep 02 2017 09:27 UTC
@hashtagyolo1 You site is correcty centered. Its just that you have an element that is not visible on the page itself. If you use developer tools and use the inspect tool it would show you the element and its properties.
LiciniusRex
@hashtagyolo1
Sep 02 2017 09:30 UTC
thanks @chopedada , I'll get that fixed now
CamperBot
@camperbot
Sep 02 2017 09:30 UTC
hashtagyolo1 sends brownie points to @chopedada :sparkles: :thumbsup: :sparkles:
:warning: @chopedada's account is not linked with freeCodeCamp. Please visit the settings and link your GitHub account.
Utsav Kafley
@chopedada
Sep 02 2017 09:31 UTC
@hastagyolo1 You have provided the #centreLine div with a width of 600px. But the two buttons and searchbar only take about 380px of the whole area and the rest is blank space that the div occupies. I would create a class for the three elements and then center them instead.
LiciniusRex
@hashtagyolo1
Sep 02 2017 09:38 UTC
thanks @chopedada , that fixed it. I'd tried that with the wrapper div already rather than seperating them into their own divs.
CamperBot
@camperbot
Sep 02 2017 09:38 UTC
hashtagyolo1 sends brownie points to @chopedada :sparkles: :thumbsup: :sparkles:
:cookie: 204 | @chopedada |http://www.freecodecamp.com/chopedada
LiciniusRex
@hashtagyolo1
Sep 02 2017 09:39 UTC
Much obbliged :D
Emmanuel Sucilan
@HeartOfKings
Sep 02 2017 10:20 UTC
hi guys.!! glad to be back :)
Vishal Sholkay
@sholkay
Sep 02 2017 10:37 UTC
Anyone online I need help with my assignment
Ken Haduch
@khaduch
Sep 02 2017 10:49 UTC
@sholkay - what's up?
There is a .gif file inside this rar and i have also attached HTML and CSS files in it .. I want my site to look like .gif file
I am not able to apply @media queries please help me with that only ?
I am not familiar with @media queries .. so help me with that in it
Jan Shah
@JanShah
Sep 02 2017 10:52 UTC
@sholkay better off posting your code in codepen and then asking.
Ken Haduch
@khaduch
Sep 02 2017 10:53 UTC
@sholkay - yes, can you just post an image of the project, and code in CodePen? You can paste an image in here.
Vishal Sholkay
@sholkay
Sep 02 2017 10:53 UTC
I'll post the code in codepen :)
Ken Haduch
@khaduch
Sep 02 2017 10:53 UTC
great
dinesh
@1532j0004kg
Sep 02 2017 11:22 UTC
$.getJSON("/json/cats.json", function(json) {
$(".message").html(JSON.stringify(json));
});
can u plz explain this guys..
stingify(json)==>in this json is from where?
/json/cats.json is what?
Henry
@GitHub-Henry
Sep 02 2017 11:41 UTC
@1532j0004kg /json/cats.json should be a folder called jsonwith a file called cats.json
dinesh
@1532j0004kg
Sep 02 2017 11:41 UTC
where we can find this
Henry
@GitHub-Henry
Sep 02 2017 11:42 UTC
based on the code the folder json should be located in the same folder as the javascript file
dinesh
@1532j0004kg
Sep 02 2017 11:43 UTC
stingify(json)==>in this json is from where?
i can able to use another name replace of json ?
or what is json
Henry
@GitHub-Henry
Sep 02 2017 11:44 UTC
in this case, stringify(json) it appears that json should be a variable
dinesh
@1532j0004kg
Sep 02 2017 11:45 UTC
i can able to use the another name for replace of json?
Long Nguyen
@longnt80
Sep 02 2017 11:46 UTC
@1532j0004kg yes
Henry
@GitHub-Henry
Sep 02 2017 11:46 UTC
@1532j0004kg what @longnt80 said
dinesh
@1532j0004kg
Sep 02 2017 11:47 UTC
i can able to use the another name for replace of json
Henry
@GitHub-Henry
Sep 02 2017 11:48 UTC
@1532j0004kg you really need to understand what you are doing before you start making that kind of a change, based on your questions, you might want to do that first
dinesh
@1532j0004kg
Sep 02 2017 11:48 UTC
$.getJSON("https://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=jsonp&lang=en&jsonp=?",function(val){

  var quote = "";

  quote = val.quoteText;

 $(".quotess").html(quote); 
in this how the quotetext refers the original quotetext?
Henry
@GitHub-Henry
Sep 02 2017 11:52 UTC
@1532j0004kg I gotta go now, good luck
dinesh
@1532j0004kg
Sep 02 2017 11:52 UTC
or how quotext refers the original quote?
@GitHub-Henry thanks
CamperBot
@camperbot
Sep 02 2017 11:52 UTC
1532j0004kg sends brownie points to @github-henry :sparkles: :thumbsup: :sparkles:
:cookie: 355 | @github-henry |http://www.freecodecamp.com/github-henry
Elizabeth Paul
@Kowalatam
Sep 02 2017 11:56 UTC

@1532j0004kg yeah.. that looks like it.. it doesnt work ?

in this how the quotetext refers the original quotetext?

dinesh
@1532j0004kg
Sep 02 2017 11:57 UTC
it is working
Elizabeth Paul
@Kowalatam
Sep 02 2017 11:59 UTC
ok.. then what was the question ?
dinesh
@1532j0004kg
Sep 02 2017 11:59 UTC
quotetext is what?
shall u give the learning api links?
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:02 UTC
quotetext is the property that hold the Quote which is the property value..
dinesh
@1532j0004kg
Sep 02 2017 12:02 UTC
okok....
do u know any simple api links for learning..
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:03 UTC
i don't know any links.. but there is nothing that is not on youtube...
:)
dinesh
@1532j0004kg
Sep 02 2017 12:03 UTC
lol...
ok where u learned the api...
i think the question i asked are all in api...
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:04 UTC
right here ... which means i probably should do personal reading reading on it..
when i had to use it for wikipedia
i asked around here and read some of the stuff in the forum
dinesh
@1532j0004kg
Sep 02 2017 12:05 UTC
i didn't use the links to learn api...
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:07 UTC
just did a google search and its showing a bunch of things...
dinesh
@1532j0004kg
Sep 02 2017 12:07 UTC
okie...
thanks @Kowalatam
CamperBot
@camperbot
Sep 02 2017 12:08 UTC
1532j0004kg sends brownie points to @kowalatam :sparkles: :thumbsup: :sparkles:
:cookie: 311 | @kowalatam |http://www.freecodecamp.com/kowalatam
dinesh
@1532j0004kg
Sep 02 2017 12:08 UTC
whats your current status in fcc
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:08 UTC
there are a lot of things.. so it might be good to narrow it down to specifics..
status how ? @1532j0004kg
dinesh
@1532j0004kg
Sep 02 2017 12:09 UTC
ok why your weathor api is not working...
weathor app
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:10 UTC
it's not ?.... eish... it used... i will check it out
dinesh
@1532j0004kg
Sep 02 2017 12:10 UTC
if i want to use weathor app of yours i need any special things?
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:11 UTC
it is working... just opened it now..
no.. just enable ur location i guess...
dinesh
@1532j0004kg
Sep 02 2017 12:12 UTC
okieee,,,
are u college student, why i asked because u know lot of things...
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:13 UTC
image.png
dinesh
@1532j0004kg
Sep 02 2017 12:14 UTC
ok nice...
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:14 UTC
yeah i am in college but not studying programming or computer stuff... just doing this as extra stuff
dinesh
@1532j0004kg
Sep 02 2017 12:15 UTC
great ..
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:15 UTC
how about you
dinesh
@1532j0004kg
Sep 02 2017 12:16 UTC
Am college student studying msc ss ... but didn't know more than u...
are u computer related student?
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:17 UTC
what is ss ?
dinesh
@1532j0004kg
Sep 02 2017 12:18 UTC
software systems
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:19 UTC
cool.. im not computer related.. mechanical engineering
dinesh
@1532j0004kg
Sep 02 2017 12:19 UTC
great...
shall u give tips to learn about json and api and ajax...
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:22 UTC
that i really can't help very much.. what i know is just enough to use it..
u can hang around here and sm1 else can help u out on that part....
dinesh
@1532j0004kg
Sep 02 2017 12:23 UTC
what i want to learn first jquery or json
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:24 UTC
those are two different things..
jquery is a javascript library
dinesh
@1532j0004kg
Sep 02 2017 12:24 UTC
yes i know ...
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:25 UTC
i hope i'm right... not good on theory lol
dinesh
@1532j0004kg
Sep 02 2017 12:25 UTC
but what i want to learn first to do projects
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:29 UTC
depends on u... u can do a lot without jquery
i'm unsure about json as i don't know much about it
dinesh
@1532j0004kg
Sep 02 2017 12:30 UTC
ok thanks for ur valuable time spend for me ...i will go and start learning...
Elizabeth Paul
@Kowalatam
Sep 02 2017 12:31 UTC
seriously though... where are all the experts ... c'mon... before i give out wrong information here .........
lol
@1532j0004kg usually ppl use other resources combined with freecode camp..
feel free to stray lol
Netrunner21
@Netrunner21
Sep 02 2017 13:23 UTC

JSON is similar to regular javascript object (referred to as an "object literal" in that case), except that JSON is usually stuffed with way more key value pairs. This is important: In JSON, Object keys must be strings. In object literals (what you as objects from freecodecamps lessons so far), you can store a lot more things as values, such as functions and other executable code. You cannot parse a JSON link the same way you parse an object literal - you must use either an AJAX call or jQuery's $.getJSON() method.

As for JSON vs jQuery, they are not comparable. JSON is a storage mechanism and jQuery is a javascript library.. Also note that JSON needs to be parsed because its not javascript. It is a javascript like format that can be used by lots of other programming languages. I'll also echo using other resources to compliment what you're doing here. I've done several of CodeCademy's courses when I didn't feel like had the full grasp from what I learned here.

Cheers.

Markus Kiili
@Masd925
Sep 02 2017 13:45 UTC
@Netrunner21 Just to clarify your explanation: JS object keys are also strings, but in JSON, they need to be double quoted.
Netrunner21
@Netrunner21
Sep 02 2017 13:47 UTC
That's right, I had forgotten about that
Netrunner21
@Netrunner21
Sep 02 2017 13:52 UTC
also, one correction on what I said earlier: all JSON-formatted text is also syntactically legal JavaScript code. AJAX calls and $.getJSON are used when your JSON comes from an outside source. Someone with more experience may be better able to explain it more clearly.
There are certain special characters than can be used in JSON than can't be parsed normally. That gets a bit hairy, and probably above the scope of what's trying to be learned here.
Markus Kiili
@Masd925
Sep 02 2017 14:01 UTC
@Netrunner21 The big difference is that JSON is text or string, and JS object literal is part of JS code. If you have a JSON formatted string (from an AJAX call for example), it can be parsed into an JS object with JSON.parse() or automatically under the hood like with getJSON(). The syntax of JSON is almost a more strict subset of JS object literal syntax, so in almost all cases JSON would work (pasted into) an object literal.
Netrunner21
@Netrunner21
Sep 02 2017 14:04 UTC
Nice. Thanks for the clarification @Masd925
CamperBot
@camperbot
Sep 02 2017 14:04 UTC
netrunner21 sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4463 | @masd925 |http://www.freecodecamp.com/masd925
Renan Teixeira Ferraz
@RTFerraz
Sep 02 2017 15:28 UTC
Hi there
I had just finished the local weather app
inserted the code in the codepen
and it didn't work
Trommelochse
@Trommelochse
Sep 02 2017 15:32 UTC
that can have several reasons
console usually gives you some information
@RTFerraz
Renan Teixeira Ferraz
@RTFerraz
Sep 02 2017 15:33 UTC
alright @Trommelochse
outside the codepen the geolocation works
@Trommelochse
korzo
@korzo
Sep 02 2017 15:43 UTC
@RTFerraz Which type of geolocation(HTML5, ip based...) you use and which browser?
Renan Teixeira Ferraz
@RTFerraz
Sep 02 2017 15:43 UTC
HTML5 @korzo
firefox and chrome
but didn't work on codepen
I used the navigator.geolocation.getCurrentLocation()
korzo
@korzo
Sep 02 2017 15:46 UTC
@RTFerraz I run also into this. there is some issue with geolocation when asking for permission inside iframe
@RTFerraz I take a look into my notes what I have about it
Renan Teixeira Ferraz
@RTFerraz
Sep 02 2017 15:47 UTC
function getLocation() {
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function(position) {
            fccRequest(position.coords.latitude, position.coords.longitude);
        });
    } else { 
        x.innerHTML = "Geolocation is not supported by this browser.";
    }
}
@korzo
I used this function inside an onload of the document
``
document.onload = getLocation();
just1witness
@just1witness
Sep 02 2017 15:50 UTC
@RTFerraz you can use this instead, it works more often
$.ajax({
    type: "GET",
    url: "https://ipinfo.io/json/",
    success: coordinates
  });
korzo
@korzo
Sep 02 2017 15:50 UTC
@RTFerraz that's ok. Coud you post link yo your pen ?
just1witness
@just1witness
Sep 02 2017 15:51 UTC
@RTFerraz It get's the location from the ip address, instead of using geolocation
Renan Teixeira Ferraz
@RTFerraz
Sep 02 2017 15:53 UTC
@just1witness I'll try this
korzo
@korzo
Sep 02 2017 15:58 UTC
@RTFerraz well, it works for me in chrome and firefox.
just1witness
@just1witness
Sep 02 2017 15:58 UTC
@RTFerraz BTW, your geolocation worked for me
on FF
Renan Teixeira Ferraz
@RTFerraz
Sep 02 2017 15:59 UTC
@korzo @just1witness it is working for me too
but only outside codepen
korzo
@korzo
Sep 02 2017 15:59 UTC
@RTFerraz Try incognito window
Renan Teixeira Ferraz
@RTFerraz
Sep 02 2017 16:00 UTC
@korzo is that an option of codepen?
Trommelochse
@Trommelochse
Sep 02 2017 16:00 UTC
@RTFerraz most likely you selected 'no' when some app within codepen asked you if geolocation can be used. you could try clearing your cache
korzo
@korzo
Sep 02 2017 16:00 UTC
@RTFerraz no. In Chrome or private browsing in firefox
Renan Teixeira Ferraz
@RTFerraz
Sep 02 2017 16:01 UTC
@Trommelochse I'll try
korzo
@korzo
Sep 02 2017 16:03 UTC
@Trommelochse @RTFerraz clearing cache will not help as geolocation preference is stored in Site settings
Open your pen in incognito window (right click on link and select open link in incognito window)
Trommelochse
@Trommelochse
Sep 02 2017 16:04 UTC
I see
Renan Teixeira Ferraz
@RTFerraz
Sep 02 2017 16:06 UTC
@korzo didn't work
@RTFerraz @Trommelochse my link is working for you?
@Trommelochse @korzo thanks
CamperBot
@camperbot
Sep 02 2017 16:10 UTC
rtferraz sends brownie points to @trommelochse and @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 441 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 324 | @trommelochse |http://www.freecodecamp.com/trommelochse
Renan Teixeira Ferraz
@RTFerraz
Sep 02 2017 16:11 UTC
Worked in firefox incognito
Trommelochse
@Trommelochse
Sep 02 2017 16:15 UTC
it is, @RTFerraz
Chrome
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 16:16 UTC
Hey guys
I was wondering if anyone could help me debug my website
whats up @Refath
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 16:30 UTC
@moT01 Sup
Still debugging
did you try some bug spray?
Ghost
@ghost~55a04b725e0d51bd787af54c
Sep 02 2017 16:39 UTC
@moT01 Not compatible with HTML5
ha
just1witness
@just1witness
Sep 02 2017 19:21 UTC

I don't understand why this seems to be storing the 2, from the previous loop and adding the very same 2 to the next one, thus returning a true value and adding the identical index of 2 twice to the sum...

function pairwise(arr, arg) {
 var arr1 = [];
  var ind = [];
   for (var i = 0; i < arr.length; i++){
    arr.filter(function(el, index){
     if(el + arr[i] === arg){
      arr1.push(el , arr[i]);
       ind.push(index, i);
        arr[index] = "0";
        arr[i] = "0"; 
        }                 
       });
      }
return ind.reduce(function(sum, value) {
  return sum + value;
}, 0);

    }
pairwise([1, 3, 2, 4], 4);

_

just1witness
@just1witness
Sep 02 2017 19:35 UTC
@gersho helped me fix it, here's the finished solution
function pairwise(arr, arg) {
 var arr1 = [];
  var ind = [];
   for (var i = 0; i < arr.length; i++){
    arr.filter(function(el, index){
     if(el + arr[i] === arg && i !== index){

      arr1.push(el , arr[i]);
       ind.push(index, i);
        arr[index] = "0";
        arr[i] = "0"; 
        }                 
       });
      }
return ind.reduce(function(sum, value) {
  return sum + value;
}, 0);   
    }
pairwise([1, 1, 1], 2);
@gersho Thank you
CamperBot
@camperbot
Sep 02 2017 19:35 UTC
just1witness sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:warning: just1witness already gave gersho points
Siddarth Krishnan
@siddarthk123
Sep 02 2017 20:38 UTC
can someone
help me with the sorted union problem?
or no?
just1witness
@just1witness
Sep 02 2017 20:41 UTC
maybe
let's see it
need help with this one
just1witness
@just1witness
Sep 02 2017 20:44 UTC
I can help you, what do you have so far? To paste your code use three back ticks (```) press shift+enter, paste your code, press shift+enter again, and add three more back ticks
RonSwan
@RonSwan
Sep 02 2017 20:45 UTC
Is it a bad idea to have a very plain porfolio page to complete the project and just move on? I am planing on upgrading to a 'real' website and not a codepen that does not jive with my google fonts.
just1witness
@just1witness
Sep 02 2017 20:46 UTC
I don't think the profolio page you submit has to be in codepen. You may be able to submit the website.
@RonSwan
Siddarth Krishnan
@siddarthk123
Sep 02 2017 20:46 UTC
just 1 witness
can you
help me over skype?
just1witness
@just1witness
Sep 02 2017 20:47 UTC
no, thanks
@siddarthk123
Siddarth Krishnan
@siddarthk123
Sep 02 2017 20:48 UTC

function uniteUnique(arr) {

var newArr = [];

 for(var i =0 ; i <= arguments.length-1; i++){
   newArr = newArr.concat(arguments[i]);
 }
this is what i have
so far?
just1witness
@just1witness
Sep 02 2017 20:48 UTC
k, give me a minute.
Siddarth Krishnan
@siddarthk123
Sep 02 2017 20:49 UTC
ok
so i already got it unionized
now...
just1witness
@just1witness
Sep 02 2017 20:50 UTC
You can get an array to work with by using the basic .reduce() function. Have you read up on that method?
Siddarth Krishnan
@siddarthk123
Sep 02 2017 20:50 UTC
i just need to get rid of the duplicates.
yes.
i have
what do i do in the reduce function though?
delete duplicates?
just1witness
@just1witness
Sep 02 2017 20:50 UTC
now look at the filter() method @siddarthk123
Siddarth Krishnan
@siddarthk123
Sep 02 2017 20:51 UTC
so i use
filter
not....
reduce?
just1witness
@just1witness
Sep 02 2017 20:52 UTC
you can use that to compare elements in your array, if they are equal, you can remove them.
Siddarth Krishnan
@siddarthk123
Sep 02 2017 20:52 UTC
but i do not use reduce
just filter?
just1witness
@just1witness
Sep 02 2017 20:53 UTC
I used reduce to do what you did above, do you get one array with all the values?
Siddarth Krishnan
@siddarthk123
Sep 02 2017 20:53 UTC
yeah
so now i'm supposed to use filteR?
just1witness
@just1witness
Sep 02 2017 20:54 UTC
what I did to get that was
var objArr = Array.from(arguments.reduce(function(a,b){
    return a.concat(b);
},[]);
Siddarth Krishnan
@siddarthk123
Sep 02 2017 20:55 UTC
ok
i already got that
just1witness
@just1witness
Sep 02 2017 20:55 UTC
Filter would work to remove the duplicates, yes
Siddarth Krishnan
@siddarthk123
Sep 02 2017 20:55 UTC
now how do i get rid of the duplicates?
what do i put inside the filter function?
how do i compare item to item?
huh?
just1witness.
just1witness
@just1witness
Sep 02 2017 21:00 UTC
filter uses a function, in this case with three parameters. Array.filter(function(item, index, inputArray){condition goes here});
give me a sec, I'm trying to figure out the best way to explain it
index may be better called, next actually.
Siddarth Krishnan
@siddarthk123
Sep 02 2017 21:02 UTC
but how do i use
the filter function
to delete duplicates?
just1witness
@just1witness
Sep 02 2017 21:02 UTC
I know what your asking, just give me the time to figure out how to explain it clearly
I don't want to just hand you the answer
Siddarth Krishnan
@siddarthk123
Sep 02 2017 21:03 UTC
ok
Mike
@MikeJSchorah
Sep 02 2017 21:07 UTC
How has everyone's day been going so far?
Siddarth Krishnan
@siddarthk123
Sep 02 2017 21:07 UTC
arr = arr.filter( function( item, index, inputArray ) {
return inputArray.indexOf(item) == index;
});
what does this mean?
Mike
@MikeJSchorah
Sep 02 2017 21:08 UTC
I'm lucky to be alive. Almost involved in a head-on collision about an hour ago.
Siddarth Krishnan
@siddarthk123
Sep 02 2017 21:08 UTC
just1witness
can you explain it to me now?
just1witness
@just1witness
Sep 02 2017 21:08 UTC

the first parameter (item) is the current element being being processed in the array.
the second parameter (index) is the index of the current element being processed
the third parameter is the array you are filtering through

What you want to do is check the array (inputArray) for the index of your current element(item) and see if it's equal to the current index(index)

try to picture it as putting your array through a funnel that catches any values it sees twice
Mike
@MikeJSchorah
Sep 02 2017 21:09 UTC
Thanks. Guy must have been drunk or on drugs. I refused to be a witness because I have so much work to do, but I did call 911 and 5 people did stop. Guess I'm just compartmentalizing this, but I feel like I should cherish this moment in a sense that I should tell my family how lucky I am to be alive and how each and every moment counts because you don't know what is in the future and how much I love them. Idk. Just want to calm down from panic attack/adrenaline rush, haha
Siddarth Krishnan
@siddarthk123
Sep 02 2017 21:10 UTC
i dont get it
Mike
@MikeJSchorah
Sep 02 2017 21:10 UTC
I have a quick question: If I didn't use a child theme for my WordPress website, will all content be completely eliminated when the theme updates? I built 2 websites with the Avada theme and 3 websites with the Divi theme.
Siddarth Krishnan
@siddarthk123
Sep 02 2017 21:10 UTC
i dont really get it
just1witness
i do not get it.
just1witness
@just1witness
Sep 02 2017 21:10 UTC
Hold on
Siddarth Krishnan
@siddarthk123
Sep 02 2017 21:11 UTC
can you explain it to me on skype?
please?
just1witness
@just1witness
Sep 02 2017 21:11 UTC
You know when you pour something through a filter, or screen?
Siddarth Krishnan
@siddarthk123
Sep 02 2017 21:11 UTC
yes.
just1witness
@just1witness
Sep 02 2017 21:11 UTC
You want to remove something sprecific, like big rocks, and only keep the dust
Siddarth Krishnan
@siddarthk123
Sep 02 2017 21:12 UTC
yeah
just1witness
@just1witness
Sep 02 2017 21:12 UTC
well, filter does that, but with code
piteto
@piteto
Sep 02 2017 21:12 UTC
@MikeJSchorah When your theme updates, it won't preserve changes you've made to theme files. Always use a child theme if you need to customize your primary theme. (Glad you're okay, btw)
just1witness
@just1witness
Sep 02 2017 21:12 UTC
so you took your array
and pushed it through a filter that said, if the array index value is the same as the filter index value, get rid of it
Mike
@MikeJSchorah
Sep 02 2017 21:13 UTC
@piteto Thanks. Another quick question, if it's okay. What exactly is a child theme? So, I'm just dealing with stylesheets? Is it difficult to transfer my code over to a child theme?
CamperBot
@camperbot
Sep 02 2017 21:13 UTC
mikejschorah sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 45 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Sep 02 2017 21:14 UTC
@MikeJSchorah A child theme is a copy of the CSS for your primary theme that you can modify. http://www.wpbeginner.com/wp-themes/how-to-create-a-wordpress-child-theme-video/
Always, always use a child theme :)
just1witness
@just1witness
Sep 02 2017 21:14 UTC
you set determined the filter conditions AFTER filter(), and you Added the array in question BEFORE filter() (ARR.filter())
Mike
@MikeJSchorah
Sep 02 2017 21:15 UTC
@piteto Thanks for the video. How is it different from the regular theme? I've been using a lot of CSS to style my websites
CamperBot
@camperbot
Sep 02 2017 21:15 UTC
mikejschorah sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:warning: mikejschorah already gave piteto points
just1witness
@just1witness
Sep 02 2017 21:16 UTC
@siddarthk123 is that making any sense?
piteto
@piteto
Sep 02 2017 21:17 UTC
@MikeJSchorah It's really a reference to your main theme - if you're familiar with how CSS works, it lets you customize the appearance of your main theme without modifying the files that get updated / installed with your main theme.
Mike
@MikeJSchorah
Sep 02 2017 21:20 UTC
@piteto I guess my question is... I've built 5 sites now using Avada theme and Divi theme. They're all done. Is it going to be a TON of work to get those styles changed over to a child theme?
piteto
@piteto
Sep 02 2017 21:21 UTC
@MikeJSchorah You'll have to diff the changes you made to the core files and compare them to the originals to know for sure
If you just modified the CSS, take those changes you made and put them in a new style.css
iso
@iso1048
Sep 02 2017 21:22 UTC
does anyone use chrome canary?
piteto
@piteto
Sep 02 2017 21:22 UTC
That style.css will be used in your new child theme - it's hard to say how much work all of this will be without knowing how much you've modified the core theme
If you've modified core .php files, which you really shouldn't do, it could potentially be a lot of extra work
Mike
@MikeJSchorah
Sep 02 2017 21:24 UTC
@piteto Thanks for all of the info. I thought there was a lot of money in modifying WordPress PHP, no? I heard that 80% of ALL websites are powered by PHP. So, all of the work in WordPress is just CSS and customizing themes only?
CamperBot
@camperbot
Sep 02 2017 21:24 UTC
mikejschorah sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:warning: mikejschorah already gave piteto points
piteto
@piteto
Sep 02 2017 21:26 UTC
@MikeJSchorah You can become a plugin developer and make money off of custom plugins for wordpress, those add to the core functionality provided by wordpress and the theme installed
Similar to how your child theme adds to the design of the core theme, plugins add to the functionality without modifying the core theme or wordpress installation
Mike
@MikeJSchorah
Sep 02 2017 21:28 UTC
@piteto Cool. Thanks. How often do themes update? I've done 2 sites with Avada and 3 sites with Divi in the past 5 weeks
CamperBot
@camperbot
Sep 02 2017 21:28 UTC
mikejschorah sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:warning: mikejschorah already gave piteto points
piteto
@piteto
Sep 02 2017 21:29 UTC
@MikeJSchorah It depends on who developed the theme - some may only get updates when security bugs are found, others get new features added all the time and receive regular updates
I personally haven't used Avada or Divi, so can't say how often to expect updates - but there should be a log of release notes with dates for every release out there
Mike
@MikeJSchorah
Sep 02 2017 21:31 UTC
@piteto So the update is automatic? My stuff will automatically be wipes out or will I have to manually go in and update it?
piteto
@piteto
Sep 02 2017 21:31 UTC
@MikeJSchorah You can configure it to update automatically, but if you haven't done that, you'll manually update
I always do manual updates to review the changes and make backups first if needed. It sucks waking up to jetpack alerts that one of your sites are down because of a failed update
Mike
@MikeJSchorah
Sep 02 2017 21:33 UTC
@piteto Thanks. But do I really need to worry about my website getting hacked for not updating it?
CamperBot
@camperbot
Sep 02 2017 21:33 UTC
mikejschorah sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:warning: mikejschorah already gave piteto points
piteto
@piteto
Sep 02 2017 21:34 UTC
Yes, that's definitely a concern - always apply updates as soon as possible @MikeJSchorah
There are roaming botnets out there searching for wordpress sites - it's scary if you check your firewall logs to see how much traffic tries to hack into your sites
Mike
@MikeJSchorah
Sep 02 2017 21:37 UTC
@piteto Yeah........ I had a site and my Sucuri WordPress plugin updated me so much that I deactivated it :o I got too many updates...
Shadow Walker
@khashy
Sep 02 2017 22:04 UTC
hey guys
i uploaded a website on server
Mike
@MikeJSchorah
Sep 02 2017 22:05 UTC
Which server? AWS? Heroku?
Shadow Walker
@khashy
Sep 02 2017 22:05 UTC
the background image is not loading like use to load
htttp://soheilsepahyar.com
@MikeJSchorah take a look
korzo
@korzo
Sep 02 2017 22:58 UTC
@khashy Looks ok from here
@khashy But your images are 3Mb , so it takes some time on slower network