These are chat archives for FreeCodeCamp/HelpFrontEnd

12th
Oct 2017
Ve Vanderpool
@VanAmoVe
Oct 12 2017 00:10
ha, noted
duan walker
@duanwalker
Oct 12 2017 00:59
hey you all! im working on the portfolio project and im having a little issue
theduan.herokuapp.com
should i post the js here?
the problem is with my skills page. the sliding bar works on desktop browsers but doesnt show in mobile
any ideas?
Tom
@moT01
Oct 12 2017 02:41
the phone's browser doesn't support the sliding bar
@duanwalker
duan walker
@duanwalker
Oct 12 2017 02:42
im using bootstrap to line up my divs and one div disappears when resizing the screen
i have a div inside another div thats supposed to move on a mouseover via js
the whole bootstrap row disappears on a screen resize. i have bootstrap 4.0.0 beta and have both the js and css files via cdn
the rows above work correctly and not seeing anything standing out in dev tools
you know what i just figured it out
thanks anyway
Ken Haduch
@khaduch
Oct 12 2017 02:45
@duanwalker - do you have this on CodePen? can you post a URL?
duan walker
@duanwalker
Oct 12 2017 02:45
i just figured it out ken thanks
if you wanted to take a look its theduan.herokuapp.com
Ken Haduch
@khaduch
Oct 12 2017 02:45
ok - sometimes those kinds of things are hard to pick out in the devtools...
duan walker
@duanwalker
Oct 12 2017 02:46
im working on my local ver now but ill push the update out to heroku tonight
Ken Haduch
@khaduch
Oct 12 2017 02:59
@duanwalker - really great looking portfolio page!
duan walker
@duanwalker
Oct 12 2017 03:00
thanks man! ill have an update for ya later!
Fabien SHAN
@X140hu4
Oct 12 2017 03:44
at last finished the No Repeats please...
linkin-park
@linkin-park
Oct 12 2017 05:25
my question on frontend
in the above link
when mediaquery is above 480px the make #leftmenu float :lefft; if float is removed the main doesnt go up why
okay got it :)
Ve Vanderpool
@VanAmoVe
Oct 12 2017 07:44
how do you concatenate a string onto a string in a loop?
alpox
@alpox
Oct 12 2017 07:57
@VanAmoVe concatenate them with a + operator. Assign the result back to the same variable
ADIL KARMOUZI
@mradil16
Oct 12 2017 08:38
Guys I want to learn : javascript / php & MySQL / wordpress at the same time . how to schedule those 3 in 12 hours and which one should take more time than the other ?
alpox
@alpox
Oct 12 2017 08:42
@mradil16 Do you have any knowledge of programming already?
ADIL KARMOUZI
@mradil16
Oct 12 2017 08:49
no
@alpox why ?
alpox
@alpox
Oct 12 2017 08:52
@mradil16 The thing is, that when you have no knowledge of programming whatsoever, all those things together are quite much too much at one time and can confuse you a lot when learning them together. I suggest to focus on one technology (Programming language) for the beginning and when you feel comfortable with it, move to another tech
@mradil16 So probably best start with javascript or php
Markus Kiili
@Masd925
Oct 12 2017 08:55
@mradil16 All three are vast subjects. JS and php require you to learn the basics of programming first. You can do simple things with any of those quite fast but it takes years to really learn them. There are also many things around those subjects that you need to learn too.
Johnny
@JohnnyBizzel
Oct 12 2017 10:20
@mradil16 Start by building a site on WordPress.com or locally. You can even set one up on CLOUD9.
Markus Kiili
@Masd925
Oct 12 2017 10:25
@JohnnyBizzel Where do people host their Node etc or java/sql full stack projects? Are there any free places or does one need to buy a virtual server?
Johnny
@JohnnyBizzel
Oct 12 2017 10:27
@Masd925 Node you can use glitch or heroku. Java, I don't know. SQL? I tried my own hosting but couldn't figure out how to connect to the Db,
Heroku give you 5 free. Glitch as far as I can see is free. (Not sure how long that will last though)
Markus Kiili
@Masd925
Oct 12 2017 10:28
@JohnnyBizzel Isn't the database side quite limited on those cloud services?
Johnny
@JohnnyBizzel
Oct 12 2017 10:28
@Masd925 MongoDb I use mlab.com sandbox mode
I think it is "metered" costs after that
For Microsoft sites or Dbs it would be Azure but I've never tried that.
Markus Kiili
@Masd925
Oct 12 2017 10:31
@JohnnyBizzel I checked some virtual server providers and they said that you can run any stack there and it is around 20€/month. Maybe time to learn to setup and use them.
alpox
@alpox
Oct 12 2017 10:32
@Masd925 You can run about anything on AWS but the setup can be more complicated because you have to do most of it yourself. That is not free either though
Johnny
@JohnnyBizzel
Oct 12 2017 10:32
@Masd925 Sounds about right. Not free though.
Markus Kiili
@Masd925
Oct 12 2017 10:33
@alpox I did play with them (virtual servers) at school but it has been a while...
alpox
@alpox
Oct 12 2017 10:35
@Masd925 Its nothing else than running a linux :D
Long Nguyen
@longnt80
Oct 12 2017 10:36

@mradil16

how to schedule those 3 in 12 hours

12 hours per day?

That's a lot. I'd say 4 hours is more realistic.

linkin-park
@linkin-park
Oct 12 2017 11:25
hello vello
linkin-park @linkin-park mad campers
linkin-park /me :waves
linkin-park
@linkin-park
Oct 12 2017 11:37
@longnt80 @Masd925 @JohnnyBizzel what do you guys doing....
:P
Markus Kiili
@Masd925
Oct 12 2017 11:38
@linkin-park Brushing up Network protocols and layers. How about you?
linkin-park
@linkin-park
Oct 12 2017 11:40
@Masd925 thought of learning about media queries today :)
Johnny
@JohnnyBizzel
Oct 12 2017 11:40
@linkin-park Going to the cinema :D
I'm fed up of coding!
linkin-park
@linkin-park
Oct 12 2017 11:41
i feel f! bad havent got a call from any recruiter :(
i havent added FCC since i dont do FCC thing
Johnny
@JohnnyBizzel
Oct 12 2017 11:42
@linkin-park You can do a lot with media queries. The mobile view can look completely different to the desktop views.
linkin-park
@linkin-park
Oct 12 2017 11:42
i'm tryin............
linkin-park
@linkin-park
Oct 12 2017 11:48
how to predict the mobile view :) should stack all the boxes "?
Long Nguyen
@longnt80
Oct 12 2017 11:48
@linkin-park practising react
Johnny
@JohnnyBizzel
Oct 12 2017 11:53
@linkin-park Plan it on paper first.
linkin-park
@linkin-park
Oct 12 2017 11:56
okay :)
sic-f
@sic-f
Oct 12 2017 13:13
what’s a nice handler name for clickng a tab?
linkin-park
@linkin-park
Oct 12 2017 13:28
i'm sorry FCC ill do data-visualization course but rest wont do :) even its beta sama
Spyrantis Theodoros
@thodorisanta
Oct 12 2017 13:29
quick question: lets say that in my JS i have a bunch of functions and i also have a couple variables(var) that i ONLY use them each in 1 of those fuctions. So what i do is place those variables, above the actual function.And all the public variables at the top of the whole JS page. I know that the functionality is the same but what do you think about the way that i prefer to declare variables?
korzo
@korzo
Oct 12 2017 13:31
@thodorisanta It's better to have local function variables. It prevents unwanted behavior when function is called at the same time from different parts of your app
Ken Haduch
@khaduch
Oct 12 2017 14:14
@thodorisanta - I think that i saw a method of doing this somewhere where you enclose the entire code module in curly brackets, which makes a block that keeps the variables "local" to that group of functions? Am I just imagining that i saw this somewhere, or does this sound like a technique that would be recommended? It might have been in the "Eloquent JavaScript" book?
@sic-f - how about onTabClick or tabClickHandler? Unless you have multiple tabs that you need to differentiate with multiple names?
Spyrantis Theodoros
@thodorisanta
Oct 12 2017 14:20
i basically mean that i declare the values above the function that i use them(if you wonder why i need to have them public is cause i also use them in another function that restore its value).
Miljan Grcic
@Nightimer
Oct 12 2017 14:25
Guys
Do you know what is bootstraps height?
i mean bootstraps nav
heroiczero
@heroiczero
Oct 12 2017 14:34
@Nightimer thats to create navigation in bootstrap http://v4-alpha.getbootstrap.com/components/navs/
alteducation
@alteducation
Oct 12 2017 15:07
guys is there a vanilla js alternative to the jquery .closest function
linkin-park
@linkin-park
Oct 12 2017 15:26
sure :)
Trommelochse
@Trommelochse
Oct 12 2017 16:50
@alteducation there is a vanilla alternative to everything ;)
Ian Gracia
@iangracia
Oct 12 2017 18:05
anyone here?

If i'm passed a function with 3 arguments. all the arguments are a separate array. Say i want to set y to the second argument(array).
var x = 2;
var y = arguments[y]; 

return y; // why does this return undefined?
Ian Gracia
@iangracia
Oct 12 2017 18:12
nvm
3gimpfingers
@3gimpfingers
Oct 12 2017 19:58

@zcassini You here? Why doesn't this work:


function titleCase(str) {

  strArray = str.split("");
  strArrayLength = strArray.length;

  for (i = 1; i > strArrayLength; i++) {
    strArray[i] = strArray[i].toLowerCase();
  }

    for (i = 0; i > strArrayLength; i++) {
      if (strArray[i] === " ") {
        strArray[i+1] = strArray[i+1].toUpperCase();
      }
      {

      }

    }

  str = strArray.join("");

  return str;
}

titleCase("I'm a liTtle tea pot");

The variable names should explain what it does/should do.

Do I need an else statement for any if function?
The first for loop is supposed to lowercase every letter except the first one. The second loop is supposed to uppercase all letters after a space. If I run the steps one at a time, they seem to work.
Moisés Man
@moigithub
Oct 12 2017 20:11
for loop condition will never be true.. so it wont loop @3gimpfingers
Ve Vanderpool
@VanAmoVe
Oct 12 2017 20:12
I have this problem :
Create a new function called loveTheH that takes in a string as an argument. In the function, create a for loop that runs 10 times, and each time concatenates an 'H' on the end of the string passed in. When the for loop is done running (but still inside the function), return the resulting string.
I don't know how to set up the loop to add the letter on the end
var stringArray=[];
function loveTheH(string){
for(string;string<=10;string+"H"){
stringArray.push(string);
}
}
feel like this is really wrong
Ve Vanderpool
@VanAmoVe
Oct 12 2017 20:25
got it, nevermind
Petterandre
@Petterandre
Oct 12 2017 21:07
Hey guys, is this where I should ask about frontend problems? It's specifically javascript that doesn't act like I think it should
Tom
@moT01
Oct 12 2017 21:46
@Petterandre sure, ask
3gimpfingers
@3gimpfingers
Oct 12 2017 21:55
@moigithub Really? Why? Sometimes strArray[i] === " ". For example strArray[3] === " ".
@moigithub Oh, crap, you're right. I switched it earlier.
Okay, I switched it back and it won't lowercase some of the letters now. I'll work at it and holler back if I can't figure it out. Thanks @moigithub .
CamperBot
@camperbot
Oct 12 2017 21:58
holler back!
3gimpfingers
@3gimpfingers
Oct 12 2017 21:58
Stay out of this @camperbot
Got it. Thanks again @moigithub
CamperBot
@camperbot
Oct 12 2017 22:00
3gimpfingers sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3667 | @moigithub |http://www.freecodecamp.com/moigithub
3gimpfingers
@3gimpfingers
Oct 12 2017 22:01
@zcassini Somebody else helped me on this. nvm. Thanks for looking, though.
CamperBot
@camperbot
Oct 12 2017 22:01
3gimpfingers sends brownie points to @zcassini :sparkles: :thumbsup: :sparkles:
:star2: 1679 | @zcassini |http://www.freecodecamp.com/zcassini
Petterandre
@Petterandre
Oct 12 2017 22:59
Managed to post in the other channel, lol
Its specifically the else statement on line 34, no matter what happens, it goes into it. https://codepen.io/ImNoroz/pen/YrNpmq?editors=1111
Toni Shortsleeve
@KoniKodes
Oct 12 2017 23:06
@Petterandre HI. It looks like it is adding a turn for every click that is made. It is not waiting until the end of the player's move to end the round.
Petterandre
@Petterandre
Oct 12 2017 23:09
Yeah, that's what is dumbfounding me. I actually had that part working properly earlier. Is it the timeouts/intervals that are messing it up? An overlap, basically?
Petterandre
@Petterandre
Oct 12 2017 23:27
Oh well, Ill head to bed. Perhaps I find the issue tomorrow :)