These are chat archives for FreeCodeCamp/HelpFrontEnd

23rd
Feb 2018
Tom
@moT01
Feb 23 2018 00:10
@ajbozdar come on back when you're done ill check it out again - like i said before though, it looks real good for a second project
roughnut
@roughnut
Feb 23 2018 01:11
Hey folks, has anyone tried to use .card-inverse from Bootstrap in codepen? It doesn’t seem to work.
DerMann97
@DerMann97
Feb 23 2018 01:25
Hello guys i have a question when i have two classes A and B and B extends A when i create an object A test = new B(); if i call a method of this object for example method1 and method1 is in both classes what will happen exactly ? What will the compiler execute ?
[JAVA]
Heathercoraje
@Heathercoraje
Feb 23 2018 02:09
I am wondering if it is possible to move on to Backend without completeing Data visualization and React projects?
Does anyone know?
Tom
@moT01
Feb 23 2018 02:22
@Heathercoraje yes
Amit Patel
@AmitP88
Feb 23 2018 02:22
hey guys, I'm working on the JS calculator project and I came across this: https://www.wikihow.com/Create-a-Calculator-Using-HTML
Should I try to use the html from this or should I ignore it and figure it out for myself?
I don't mean to blindly copy/paste either, I would still study how the code works
Tom
@moT01
Feb 23 2018 02:24
@AmitP88 either way works i think
whatever you create yourself will end up looking pretty close
Amit Patel
@AmitP88
Feb 23 2018 02:24
@moT01 ah ok. I just wanted to make sure I wasn't cheating or anything
Tom
@moT01
Feb 23 2018 02:24
i think i just made a bunch of divs with some style
Amit Patel
@AmitP88
Feb 23 2018 02:25
@moT01 I was thinking of doing that too, but when I thought about all the buttons and the textfield, the first thing that came to mind was a form
Tom
@moT01
Feb 23 2018 02:25
no - i dont think that's cheating - maybe someone else would say something different - but the hard part will be the javascript for the calculator
Sophy888
@Sophy888
Feb 23 2018 02:25
hello there !! i'm woring on a project with JAVA, and have to create a drawing shape application with user interface, with creates a shape that the user chose from a JComboBox and then he has to choose the color,and after that a JDialog should appear to enter the coodinations of x and y (of the shape selected),and so on for each shape should appear on the JPanel....after clicking on a JButton :)
Tom
@moT01
Feb 23 2018 02:25
i dont think you need a form
but the inputs would work
Sophy888
@Sophy888
Feb 23 2018 02:26
i'm so confused how to work on it...so if anyone could help,i would appreciate it ! thank you very much for reading :)
Tom
@moT01
Feb 23 2018 02:26
i would still just go with some divs
Amit Patel
@AmitP88
Feb 23 2018 02:26
hmmmm, I might just use divs then. make it a bit more challenging lol
@moT01 thanks Tom :)
CamperBot
@camperbot
Feb 23 2018 02:26
amitp88 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:star2: 1020 | @mot01 |http://www.freecodecamp.org/mot01
Tom
@moT01
Feb 23 2018 02:26
i know you've been doing this long enough - that shouldnt be too tough to create a layout for you
Amit Patel
@AmitP88
Feb 23 2018 02:27
yeah, it seems simple enough. I don't want to waste too much time just on the html lol
I'm actually pacing myself to get through the ciriculum too
alright, divs it is then :)
Tom
@moT01
Feb 23 2018 02:29
strange - you reset your profile or something? all your activity is in the last 2 months - and i know you've been here for way longer than that
Amit Patel
@AmitP88
Feb 23 2018 02:30
yeah, I actually deleted my FCC account to restart. I had to look at a lot of tutorials before for the projects, so I felt like I didn't really learn as much. so this time, I figure I should do it right and try my best to figure it out on my own
and this time I want to finish all 3 certs so that part is even more crucial to build up
Tom
@moT01
Feb 23 2018 02:31
you learn and remember more when you have to grind through all your problems on your own
Amit Patel
@AmitP88
Feb 23 2018 02:32
for sure, that's what I'm discovering this time around. Even before, I couldn't even solve algorithms. Now I'm sort of close to completing 1/2 of the intermediate ones. I decided to take a break from them to get back into project mode
Tom
@moT01
Feb 23 2018 02:35
i switched back and forth between projects and algorithms when i was going through it - did a project and then a couple algorithms - or maybe got stuck on a project and then went and didnt some algorithms - mix it up a bit
Amit Patel
@AmitP88
Feb 23 2018 02:38
yeah, getting stuck on the algorithms became too frustrating and old
Heathercoraje
@Heathercoraje
Feb 23 2018 02:42
@moT01 Thank you
CamperBot
@camperbot
Feb 23 2018 02:42
heathercoraje sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:star2: 1021 | @mot01 |http://www.freecodecamp.org/mot01
akosuadenell
@akosuadenell
Feb 23 2018 03:00
Screen Shot 2018-02-22 at 9.55.45 PM.png
can anyone tell me what's wrong with the skype and github keys? I thought I was doing this correctly. But apparently something is missing
Tom
@moT01
Feb 23 2018 03:22
@akosuadenell what am i looking at - and whats the problem, i see a lot of green check marks
Ken Haduch
@khaduch
Feb 23 2018 04:08
@roughnut :point_up: February 22, 2018 8:11 PM - did you figure out your question about .card-inverse ?
Brad
@bradtaniguchi
Feb 23 2018 04:11
@akosuadenell I assume this is beta?(beta fcc) I also assume your not passing the tests as your keys you passes are in an array, which doesn't make sense as "your info" should have only 1 github key and 1 skype key, not an array of them.
Darren
@DarrenfJ
Feb 23 2018 06:03
evening fCC
coderNewby
@coderNewby
Feb 23 2018 06:03
hi @DarrenfJ :wave:
Darren
@DarrenfJ
Feb 23 2018 06:04
hey buddy! :D
coderNewby
@coderNewby
Feb 23 2018 06:04
thanks for the help the other day
Darren
@DarrenfJ
Feb 23 2018 06:04
no worries, glad to be of help. :D
have you tried the it challenge yet?
coderNewby
@coderNewby
Feb 23 2018 06:06
no, think it's beyond my present level
still new
Darren
@DarrenfJ
Feb 23 2018 06:06
ok, cool, give it a try when you can and ping me if you need help
coderNewby
@coderNewby
Feb 23 2018 06:06
thanks @DarrenfJ
CamperBot
@camperbot
Feb 23 2018 06:06
codernewby sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2401 | @darrenfj |http://www.freecodecamp.org/darrenfj
Sujeet Buddiga
@sujeetbuddiga
Feb 23 2018 07:00
can someone please help me with this web-pack , less-loader issue webpack-contrib/less-loader#243
Van Nam -DVN Channel
@vannam05_twitter
Feb 23 2018 07:04
hello,I need help,can you help me plz?
Claudio Restifo
@Marmiz
Feb 23 2018 07:32
@vannam05_twitter just ask your question, and if someone can, will reply :)
santhoshbalaguru001
@santhoshbalaguru001
Feb 23 2018 08:58
Screenshot (114).png
      <div className="container">
        <div className="row">
      <div className="col-md-12">
      <div className="col-md-3">
      <div className="box" style={{marginLeft:"13px"}}>
        <img src = { meeting } style ={{width:"20%", marginLeft:"5px",marginRight:"5px",marginTop:"5px",marginBottom:"5px"}}/>
        <h4>OUR LAWYERS  </h4>  
        <p style={{display:"block", whitespace:"pre"}}>Our website templates are created with inspiration,
         checked for quality and originality. </p>
        </div> 
      </div>
      <div className="col-md-3">
      <div className="box" style={{marginLeft:"13px"}}>
        <img src = { meeting } style ={{width:"20%", marginLeft:"5px",marginRight:"5px",marginTop:"5px",marginBottom:"5px"}}/>
        <h4>OUR LAWYERS  </h4>  
        <p style={{display:"block", whitespace:"pre"}}>Our website templates are created with inspiration,
         checked for quality and originality. </p>
        </div> 
      </div>
      <div className="col-md-3"></div>
      <div className="col-md-3"></div>
        </div>
        </div></div>
        </section>
not able to get box side by side may i know what mistake i done?
alpox
@alpox
Feb 23 2018 09:14
@santhoshbalaguru001 you should not wrap cols into cols. Remove your <div className="col-md-12"> which wraps the <div className="col-md-3">
@santhoshbalaguru001 Apart from that, i suggest you to use Prettier to format your code. WIth your current format its very hard to see what is inside of what - the structure is not obvious.
Here is your code formatted with Prettier:
<div className="container">
    <div className="row">
      <div className="col-md-12">
        <div className="col-md-3">
          <div className="box" style={{ marginLeft: "13px" }}>
            <img
              src={meeting}
              style={{
                width: "20%",
                marginLeft: "5px",
                marginRight: "5px",
                marginTop: "5px",
                marginBottom: "5px"
              }}
            />
            <h4>OUR LAWYERS </h4>
            <p style={{ display: "block", whitespace: "pre" }}>
              Our website templates are created with inspiration, checked for
              quality and originality.{" "}
            </p>
          </div>
        </div>
        <div className="col-md-3">
          <div className="box" style={{ marginLeft: "13px" }}>
            <img
              src={meeting}
              style={{
                width: "20%",
                marginLeft: "5px",
                marginRight: "5px",
                marginTop: "5px",
                marginBottom: "5px"
              }}
            />
            <h4>OUR LAWYERS </h4>
            <p style={{ display: "block", whitespace: "pre" }}>
              Our website templates are created with inspiration, checked for
              quality and originality.{" "}
            </p>
          </div>
        </div>
        <div className="col-md-3" />
        <div className="col-md-3" />
      </div>
    </div>
  </div>
jamesbomb
@jamesbomb
Feb 23 2018 09:25
hello everyone!
someone knows how to change the pin marker of a google map?
i mean use a custom png
Markus Kiili
@Masd925
Feb 23 2018 09:31
@jamesbomb I used custom pics on markers recently.
jamesbomb
@jamesbomb
Feb 23 2018 09:36
@Masd925 i have a different iframe from google docs
Markus Kiili
@Masd925
Feb 23 2018 09:37
@jamesbomb I used a function like this:
function createMarker (url,scale,lat,lon) {
    var image = {
        url: url,
        scaledSize: new google.maps.Size(scale, scale), // scaled size
      origin: new google.maps.Point(0,0), // origin
      anchor: new google.maps.Point(0, 0) // anchor
    };
    return new google.maps.Marker({
      position: {
             lat: lat,
          lng: lon
      },
      map: map,
    icon: image
    });
}
jamesbomb
@jamesbomb
Feb 23 2018 09:41
how do u put it in the html?
Markus Kiili
@Masd925
Feb 23 2018 09:44
@jamesbomb I used JS to init the map and setting the markers.
Google maps JS API.
jamesbomb
@jamesbomb
Feb 23 2018 09:47
but are u still able to use the functions of the map (like mobile functionalities, click on the marker to open the detail, etc) or it just shows your marker on the map?
Markus Kiili
@Masd925
Feb 23 2018 09:49
@jamesbomb Those are Google maps markers, so you can configure them as you wish.
jamesbomb
@jamesbomb
Feb 23 2018 09:53
looking at the references it says i need an api key, why?
Markus Kiili
@Masd925
Feb 23 2018 09:56
@jamesbomb Not really sure, but you can get it there and use it.
jamesbomb
@jamesbomb
Feb 23 2018 09:57
ok
so,
here is the js
<script>
    // This example uses SVG path notation to add a vector-based symbol
    // as the icon for a marker. The resulting icon is a star-shaped symbol
    // with a pale yellow fill and a thick yellow border.
    function initMap() {
        var map = new google.maps.Map(document.getElementByClass('mappa'), {
            zoom: 4,
            center: {
                lat: 45.00000,
                lng: 9.00000
            }
        });
        var image = {
            url: '../images/pin.png',   //custom marker
            scaledSize: new google.maps.Size(scale, scale), // scaled size
            origin: new google.maps.Point(0, 0), // origin
            anchor: new google.maps.Point(0, 0) // anchor
        };
        var marker = new google.maps.Marker({
            position: map.getCenter(),
            icon: image,
            map: map
        });
    }
</script>
here is the html
<div class="mappa">
        <script async defer src="https://maps.googleapis.com/maps/api/js?key=here i put my key&callback=initMap"></script>
    </div>
Markus Kiili
@Masd925
Feb 23 2018 10:03
@jamesbomb A better place for that script element is at the end of body element.
jamesbomb
@jamesbomb
Feb 23 2018 10:04
ok
I'm trying it on jsfiddle
jamesbomb
@jamesbomb
Feb 23 2018 10:10
would u like to take a look?
Markus Kiili
@Masd925
Feb 23 2018 10:13
@jamesbomb You have some errors on the browser developer tools console.
scale is not defined in your code.
manojdevinvent
@manojdevinvent
Feb 23 2018 10:21
Here on freecodecamp.org I am going for implementing 2nd basic front end project i.e. Personal portfolio webpage, in that i came across html(pug) and post css terms, can anyone get me what i have do with it. or what are that terms about?
jamesbomb
@jamesbomb
Feb 23 2018 10:35
@Masd925 i added scale: 1, before scaledSize but i don't see anything yet
Markus Kiili
@Masd925
Feb 23 2018 10:37
@jamesbomb Maybe var scale = 1;
jamesbomb
@jamesbomb
Feb 23 2018 11:08
now on jsfiddle it seem to work https://jsfiddle.net/daxke4pa/42/
Markus Kiili
@Masd925
Feb 23 2018 11:09
@jamesbomb :+1:
jamesbomb
@jamesbomb
Feb 23 2018 11:09
@Masd925
var marker = new google.maps.Marker({ position: map.getCenter(), icon: 'http://pngimages.net/sites/default/files/location-png-image-31558.png', map: map });
CamperBot
@camperbot
Feb 23 2018 11:09
:bulb: to format code use backticks! ``` more info
jamesbomb
@jamesbomb
Feb 23 2018 11:10
yeah, sorry i dont have ``` on my keyboard
i tried with ''' but it went wrong
CamperBot
@camperbot
Feb 23 2018 11:10
:bulb: to format code use backticks! ``` more info
jamesbomb
@jamesbomb
Feb 23 2018 11:10
:)
@Masd925 the problem is i cannot scale, if i put var scale = 1 or scale:1, it doesn't change anything
Irfan Syed
@syedirfan7
Feb 23 2018 11:12
Hi !! i am a front end developer(JavaScript ) from india.. i want to move to some product companies which focus on algorithms and data structures. i would need some advice on choice of language to practice algorithms and DS. what would you suggest between java and Javascript.
Donnie
@Donnie-D
Feb 23 2018 11:18
A link to some jolly good article on SAME-ORIGIN POLICY anyone? lol
jamesbomb
@jamesbomb
Feb 23 2018 11:20
@Donnie-D did u tried on mozilla developer?
Donnie
@Donnie-D
Feb 23 2018 11:21
@jamesbomb Oh I would like to learn from MDN but it always scares me off
especially when i try to learn about some methods and I come across unfamiliar '[a,[b,[3,[g]]] 'type coding which doesn't make any sense to me
Markus Kiili
@Masd925
Feb 23 2018 11:24
@jamesbomb What if you give it some other value?
Donnie
@Donnie-D
Feb 23 2018 11:29
for example this one here arr.indexOf(searchElement[, fromIndex]) i have just copied from MDN. What is that little comma doing inside the square brackets?
Also in arr.slice([begin[, end]]) this doesn't seem to be making sense to me
from MDN
Markus Kiili
@Masd925
Feb 23 2018 11:31
@Donnie-D It means that the second argument fromIndex is optional.
In slice method, both arguments are optional.
Donnie
@Donnie-D
Feb 23 2018 11:33
@Masd925 so if the comma is inside the left square bracket (which it is a lot of the times) then it means that the argument is optional in general as well on MDN examples?
@Masd925 if you'd have to suggest between MDN and w3schools, which one would you prefer?
jamesbomb
@jamesbomb
Feb 23 2018 11:35
@Masd925 maybe i made it (on jsfiddle it works, not yet on my website)
Markus Kiili
@Masd925
Feb 23 2018 11:36
@Donnie-D W3Schools JS part has some bad content. I prefer to use MDN, but it can be too tough for some people at start.
Donnie
@Donnie-D
Feb 23 2018 11:36
@Masd925 tell me about it lol
thanks though
jamesbomb
@jamesbomb
Feb 23 2018 11:56
@Masd925 i made it!!!!
i had to enable the api on the google developer console
thankyou!!!!
Markus Kiili
@Masd925
Feb 23 2018 11:56
@jamesbomb :+1:
krckyboy
@krckyboy
Feb 23 2018 11:57
Do you guys use a notebook to write things down when developing, doing a course, practicing, picking up tips and tricks?
Markus Kiili
@Masd925
Feb 23 2018 11:59
@krckyboy I use notebooks. One for each language or library.
But I am an old fart.
Ahmed Al-Gallad
@A-Gallad
Feb 23 2018 12:37
hello
I am working on project portfolio at the moment and I have a problem in making the navbar fixed to top
I tried using bootstrap class navbar-fixed-top and still not working
here my code

<body>

<div id="home">
<nav class="navbar navbar-fixed-top navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">Ahmed El Gallad</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
<li class="nav-item">
<a class="nav-link text-danger" href="#">Portfolio</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact</a>
</li>
</ul>
</div>
</nav>
<h1 class="px-50 mt-5">Dead Ice Tech</h1>
<h2>Integerated Web Solutions</h2>
</div>

Fabien SHAN
@X140hu4
Feb 23 2018 12:42
@Gallad23 Can you put your code with three backticks ``` on the line before and after?
Ahmed Al-Gallad
@A-Gallad
Feb 23 2018 12:42
alright one sec sorry still new at this :D
Fabien SHAN
@X140hu4
Feb 23 2018 12:43
Also are you doing this on locally? You are using bootstrap classes but I cannot see any reference to it
Ahmed Al-Gallad
@A-Gallad
Feb 23 2018 12:44
I am using code pen so its already imported in the css settings , if that's what you mean
Fabien SHAN
@X140hu4
Feb 23 2018 12:44
Can you share your codepen link?
Ahmed Al-Gallad
@A-Gallad
Feb 23 2018 12:44
sure
just a sec
Fabien SHAN
@X140hu4
Feb 23 2018 12:48
Its fixed-top in bootstrap4
not navbar-fixed-top
Ahmed Al-Gallad
@A-Gallad
Feb 23 2018 12:50
oh!
Fabien SHAN
@X140hu4
Feb 23 2018 12:50
@Gallad23 Please refer to bootstrap 4 documentation for the classes. They made big changes from BS3
Ahmed Al-Gallad
@A-Gallad
Feb 23 2018 12:50
I was viewing the documentation but I guess I got mixed up with the alpha versions
thank you so much appreciate your help :)
Rouy
@Roudy_Hanna_twitter
Feb 23 2018 12:52
hi guys
i just started the challenges yesterday
and i feel a bit stuck with the portfolio challenge
krckyboy
@krckyboy
Feb 23 2018 12:53

If we skewed an entire section for the layout, and unskewed the direct children of it, how do we unskew the background image of the section?

.section-features {
    padding: 20rem 0;
    background-image: linear-gradient(              /* this gradient is for overlay */
    to right bottom,
    rgba($color-primary-light, 0.801),
    rgba($color-primary-dark, 0.801)),
    url(../img/nat-4.jpg);
    background-size: cover;
    transform: skewY(-7deg);
    margin-top: -10rem;



    & > * {
        transform: skewY(7deg);
    }


}

How would we unskew the background image of the
.section-features
?

Fabien SHAN
@X140hu4
Feb 23 2018 12:53
@Roudy_Hanna_twitter How so?
Rouy
@Roudy_Hanna_twitter
Feb 23 2018 12:54
@X140hu4 should i create a banner or is it available in bootstrap?
Fabien SHAN
@X140hu4
Feb 23 2018 12:54
What do you mean by banner?
also how do i make it to scroll on click?
Fabien SHAN
@X140hu4
Feb 23 2018 12:58
I think that behavior is from the JS part
Rouy
@Roudy_Hanna_twitter
Feb 23 2018 13:00
Alright thanks!
Fabien SHAN
@X140hu4
Feb 23 2018 13:00
I would suggest not bothering yourself with that for the moment.
If you were a newbie a few days/weeks ago, just focus on the html and css part.
Rouy
@Roudy_Hanna_twitter
Feb 23 2018 13:01
It's true I still am a newbie lol
Fabien SHAN
@X140hu4
Feb 23 2018 13:01
Then if you have finished and you are interested, look at the example page's JS and try to understand it
Rouy
@Roudy_Hanna_twitter
Feb 23 2018 13:01
Will do thanks for the advice!
Jowze
@Jowze
Feb 23 2018 14:06
Hey everyone. I'm having an issue making my leaderboard work on codepen. It all works fine on in my code editor but it doesnt load on codepen XD. Here is the pen if someone wants to take a look https://codepen.io/jowze/pen/RQBJZv
I guess I've forgotten a setting. But I can't find which...
Igor
@flipmotion
Feb 23 2018 14:21
You need learn programming on js)))
Ken Haduch
@khaduch
Feb 23 2018 14:22
@Jowze - Uncaught Error: ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM. and ReactDOM was not loaded, apparently...
or at least that is what the developer's console reports, @Jowze
Jowze
@Jowze
Feb 23 2018 14:24
@khaduch thanks man. I had added both react and reactdom in codepen's setting, but had clicked first on the reactdom quicklink, so it mush have appeared in that order once applied by codepen
CamperBot
@camperbot
Feb 23 2018 14:24
jowze sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3750 | @khaduch |http://www.freecodecamp.org/khaduch
Ken Haduch
@khaduch
Feb 23 2018 14:26
@Jowze - it looks like you have them both in there, but it doesn't seem to load correctly? Well, maybe it did now... it took a while to load, though?
Jowze
@Jowze
Feb 23 2018 14:29
@khaduch , following your reply I removed them both and added them back in the correct order. Which solved the issue. I'm now trying to make my sass work XD, it's strange it's not styling the code
Ken Haduch
@khaduch
Feb 23 2018 14:30
@Jowze - it seems to be having a problem with that font import? Maybe try moving that into the CSS settings?
@Jowze - that seems to have made a difference in the way it loads - I copied the URL and put it into a CSS external resource slot, and remove the @import and that looks like it works better.
Jowze
@Jowze
Feb 23 2018 14:34
@khaduch I'll give that a shot
mh. strange it only styles properly if I don't pick the sass option. It's the first time I use sass on codepen so I may be doing something wrong
Ken Haduch
@khaduch
Feb 23 2018 14:36
@Jowze - after that, I went back to check the developer console and saw this warning:
Warning: Each child in an array or iterator should have a unique "key" prop. See https://fb.me/react-warning-keys for more information.
    in ItemSelector (created by Board)
    in tbody (created by Board)
    in table (created by Board)
    in div (created by Board)
    in Board (created by App)
    in div (created by App)
    in App
Jowze
@Jowze
Feb 23 2018 14:41
true, I didn't assign a key when mapping over the items
I changed that
thanks for all this help @khaduch much appreciated
CamperBot
@camperbot
Feb 23 2018 14:42
jowze sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
api offline
Jowze
@Jowze
Feb 23 2018 14:43
I changed the css settings to normal css without preprocessor and it works fine now
this is strange...
Kietil
@Kietil
Feb 23 2018 14:45
is it possible to get codeblocks like this with syntax color, with just html/css/js? I use html's <pre> tag , but they are difficult to read with only 1 color.
Ken Haduch
@khaduch
Feb 23 2018 15:07
@Jowze - I cannot really see anything in your CSS that requires compilation, though? I don't really know SASS, at least not much, but it look pretty much like vanilla CSS to me?
Ken Haduch
@khaduch
Feb 23 2018 15:12
@Jowze - and you're welcome - happy to help (and learn at the same time!)
@Kietil - it looks like they are using some JS package for language markup called "Prism" - here is a link to the homepage for that package - http://prismjs.com - it looks like it is available at no cost?
Jowze
@Jowze
Feb 23 2018 15:38
@khaduch you're right the CSS on this project is super light. The only sass feature I used in there was one nested style XD
so yeah, it wasn't very hard to change back to vanilla CSS. I'll see if the issue happens again on the next project
Kietil
@Kietil
Feb 23 2018 16:10
@khaduch Yes, that's it. Thanks buddy :)
<I am/>
@kondasMajid
Feb 23 2018 16:19
Good day .
I have created a quote generator can someone help me with the preview of the arrays
.
https://codepen.io/wiz_harley/pen/NyzwmL
abraham anak agung
@padunk
Feb 23 2018 16:26
@Guykondas why don't make it all random with one random button?
<I am/>
@kondasMajid
Feb 23 2018 16:33
@padunk i have already than with the random, i only want to get the prev working as well.
Aditya
@ezioda004
Feb 23 2018 16:34
@Guykondas Perhaps save the random number in an array and on prev click use that number as index for the quote array you have?
<I am/>
@kondasMajid
Feb 23 2018 16:55
okay... i have got you but how do i use that index. @ezioda004
Marit Fischer
@TheMarit
Feb 23 2018 17:07
I have some trouble with opacity and was wondering if anyone could explain why my h2 in the following codepen is transparent? It's probably something stupid but I can't seem to figure it out. https://codepen.io/TheMarit/pen/wyxRXQ
Kaz Baig
@kbaig
Feb 23 2018 17:21
@TheMarit you mean "It's a tie"?
Marit Fischer
@TheMarit
Feb 23 2018 17:21
@Guykondas I was looking at your code to try to help you, but because I don't know pug I converted it to HTML and put the styles part in the styles section. Than your quotes function seems to work, fine. Although I am not sure what you are trying to do with prefunc
@kbaig yea "its a tie" you see the tic tac toe cells through it
Kaz Baig
@kbaig
Feb 23 2018 17:27
@TheMarit the culprit
.container{
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.5;
}
Marit Fischer
@TheMarit
Feb 23 2018 17:28
But why does the div with class container effect the h2? its not in there
Kaz Baig
@kbaig
Feb 23 2018 17:29
The divs are over the message
It's not the h2's opacity change that you're observing
You need to add a z-index to your message
Rouy
@Roudy_Hanna_twitter
Feb 23 2018 17:30
Hi how do i space my li from each other
or distance them to be more accurate
Kaz Baig
@kbaig
Feb 23 2018 17:30
@Roudy_Hanna_twitter adding margins on them
Rouy
@Roudy_Hanna_twitter
Feb 23 2018 17:31
oh that simple, thanks!
Kaz Baig
@kbaig
Feb 23 2018 17:31
@TheMarit Notice how hard it is to select the message using the selector tool
Marit Fischer
@TheMarit
Feb 23 2018 17:32
@kbaig It does work now with a z-index, thanks. I don't completely understand why it effects just the h2 and not the background though.
CamperBot
@camperbot
Feb 23 2018 17:32
themarit sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 576 | @kbaig |http://www.freecodecamp.org/kbaig
Kaz Baig
@kbaig
Feb 23 2018 17:33
@TheMarit It's not affecting the h2. You're seeing a translucent grid on top of the message
Kietil
@Kietil
Feb 23 2018 17:33
@Roudy_Hanna_twitter use line-height on vertical separation or padding for horisontal, or both on the 'li' element in css (probably not the best answer, but try it ^^)
Marit Fischer
@TheMarit
Feb 23 2018 17:35
@kbaig OH! I see, it's because the background is the same color as the cells you don't see it there. It all makes sense now
Kaz Baig
@kbaig
Feb 23 2018 17:37
@TheMarit :)

@TheMarit Notice how hard it is to select the message using the selector tool

The first clue for me

Rouy
@Roudy_Hanna_twitter
Feb 23 2018 17:38
I gave my first icon an id and gave it a margin then gave my li a margin that how i placed my first icon on far left and my other elements to the far right in the header
@Kietil ^
Marc Schöni
@marcschoeni
Feb 23 2018 18:20
why i become a unexpected token failure for } https://codepen.io/mschoeni/pen/paZqqz?editors=1010
Ken Haduch
@khaduch
Feb 23 2018 18:35

@marcschoeni - it looks like it's a parentheses / bracket balancing problem. And perhaps an errand comma. Just make the end of your JS code look like this:

    var condition = weatherData.wether[0].description,
        id = weatherData.weather[0].id,
        speed = Number((weatherData.wind.speed * 0.86897624190816).toFixed(1));

  });
}

And don't forget to add an external script reference in your JS config to the jquery.js code.

There are still other reasons why it isn't working, but that will get you to load the page. I should say why it isn't displaying the weather, but you can try to sort that out, ask more questions if you need to.
Marc Schöni
@marcschoeni
Feb 23 2018 18:38
thanks @khaduch
CamperBot
@camperbot
Feb 23 2018 18:38
marcschoeni sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3751 | @khaduch |http://www.freecodecamp.org/khaduch
Edy1988
@Edy1988
Feb 23 2018 18:40
Hi Guys! I have used bootstrap to build responsive menu, but when I make my browser window smaller, the menu covers over the paragraph below!!! I feel so silly, can anyone help. please
Ken Haduch
@khaduch
Feb 23 2018 18:41

@Edy1988 - in your CSS, add this:

body {
    padding-top: 50px; /* or a suitable value */
}

and if you already have a body styling statement defined, just add that padding-top to it.
Unless you mean that the expanded menu covers it, then there's nothing to do about that, unless you want to try and have it automatically disappear after clicking.

Edy1988
@Edy1988
Feb 23 2018 18:41
@khaduch ahhhhh thanks!
CamperBot
@camperbot
Feb 23 2018 18:41
edy1988 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3752 | @khaduch |http://www.freecodecamp.org/khaduch
Edy1988
@Edy1988
Feb 23 2018 18:49
@khaduch so i have tried this, but it doesn't help
<I am/>
@kondasMajid
Feb 23 2018 18:51
@TheMarit for the preFunc i was trying to create a function for prev of the arrays.
Ken Haduch
@khaduch
Feb 23 2018 18:51
@Edy1988 - are you on codepen with this page? Want to share the URL if you can?
Rouy
@Roudy_Hanna_twitter
Feb 23 2018 18:55
hi
how do i scroll to the section by clicking
Brad
@bradtaniguchi
Feb 23 2018 18:57
@Roudy_Hanna_twitter If you don't want to have any fancy animations or scroll effects you can do this with just html
Rouy
@Roudy_Hanna_twitter
Feb 23 2018 18:58
@bradtaniguchi thank you!
CamperBot
@camperbot
Feb 23 2018 18:58
roudy_hanna_twitter sends brownie points to @bradtaniguchi :sparkles: :thumbsup: :sparkles:
:cookie: 393 | @bradtaniguchi |http://www.freecodecamp.org/bradtaniguchi
Brad
@bradtaniguchi
Feb 23 2018 18:58
@Roudy_Hanna_twitter np :D
Rouy
@Roudy_Hanna_twitter
Feb 23 2018 18:59
lmao what does brownie points mean?
Brad
@bradtaniguchi
Feb 23 2018 19:03
@Roudy_Hanna_twitter idk, I guess its tied to your account progress. Finishing challenges give you some, and when people "thank you" here you get some aswell. Idk why its called brownie points, when the icon is clearly a cookie haha
But the points don't really matter at the end of the day
Gulsvi
@gulsvi
Feb 23 2018 19:07
@Edy1988 change the height setting for your navbar's CSS to min-height instead of height so it can expand as your menu moves down. It's a good idea to use the standard bootstrap navbar which will take care of all that for you instead. https://getbootstrap.com/docs/4.0/components/navbar/
Marit Fischer
@TheMarit
Feb 23 2018 19:14
@bradtaniguchi @Roudy_Hanna_twitter https://en.wikipedia.org/wiki/Brownie_points
Rouy
@Roudy_Hanna_twitter
Feb 23 2018 19:15
@TheMarit haha brownie points are the real deal!
Curtis
@CurtisJCamp
Feb 23 2018 21:02
Hey can anybody help me out with a problem I'm having with building my pomodoro clock. It is far from being finished. I am trying to stop the worktimer once it reaches zero "minutes" (I have it set to seconds for testing) but the timer just goes into negatives and then goes twice as fast everytime I click the function to start pause.
Gulsvi
@gulsvi
Feb 23 2018 21:07
@CurtisJCamp Your timer is named counter not timer and you try to stop it inside of a function that never gets called:
    var counter = setInterval(timer, 1000);

    function timer() {
      workCount -= 1;
      if (workCount === 0) {
        function stopTimer() { // this function never gets called
          clearInterval(timer); // the timer is called "counter" above
        }
        alert("Break for " + breakCount + " mins");
      }
So, to fix it, do:
    var counter = setInterval(timer, 1000);

    function timer() {
      workCount -= 1;
      if (workCount === 0) {
        clearInterval(counter);
        alert("Break for " + breakCount + " mins");
      }
@Roudy_Hanna_twitter They are the real deal! If you collect enough fake internet points, you get a fake trip to anywhere in the world!
(LOL)
Matej Bošnjak
@mbosnjak01
Feb 23 2018 21:11
Looking forward to go on a fake trip to anywhere in the world!
\o/
Eric Weiss
@eweiss17
Feb 23 2018 21:16
brownie points don't do nothing here
roughnut
@roughnut
Feb 23 2018 21:20
@khaduch Not yet. I found some mention via Google search that it wasn’t working in the current version. I copied some example code from the Bootstrap site into Codepen and it didn’t work, so I’m guessing it’s that.
Zachary Orona-Calvert
@TheTRUEHoohah
Feb 23 2018 21:21
Hey, guys. I'm doing a project that involves synthetic division of polynomials. Long story short i have any array and a string. The string will be something like 3x^2+8x+9. I need to regex everything but the 3 numbers. I've already figured out how to regex the xs and the ^ but I need to regex the 2 from the squared. My output to the array should be 3,8,9 and right now I have 3,2,8,9. The solution also needs to accept bigger polynomials with bigger squares.
Eric Weiss
@eweiss17
Feb 23 2018 21:24
okay.... what is the question
Kaz Baig
@kbaig
Feb 23 2018 21:39
Can anyone think of a good reason why someone might disable right clicking on their website?
Matej Bošnjak
@mbosnjak01
Feb 23 2018 21:39
@TheTRUEHoohah You should add your code to your question, if possible inside a https://codepen.io/, it's the fastest way to get help if people can see what you already wrote and if you have any errors in your code
Zachary Orona-Calvert
@TheTRUEHoohah
Feb 23 2018 21:41
The pr
Curtis
@CurtisJCamp
Feb 23 2018 21:41
Oh my gosh I need some coffee, thanks @gulsvi
CamperBot
@camperbot
Feb 23 2018 21:41
curtisjcamp sends brownie points to @gulsvi :sparkles: :thumbsup: :sparkles:
:star2: 2620 | @gulsvi |http://www.freecodecamp.org/gulsvi
Curtis
@CurtisJCamp
Feb 23 2018 21:42
enjoy your internet points!
Zachary Orona-Calvert
@TheTRUEHoohah
Feb 23 2018 21:42
@mbosnjak01 the problem is I don't have code
It's still in theory. But I'm writing in JS
Brad
@bradtaniguchi
Feb 23 2018 22:32
@kbaig idk about disabling it, but you could "repurpose" it, like what google drive does.
Stephen James
@sjames1958gm
Feb 23 2018 22:33
@TheTRUEHoohah There might be a better way, but:
"3x^2+8x+9".split('+').map((s) => s.match(/\d+/)[0]);
or
"3x^2+8x+9".split('+').reduce((a, c) => a.concat(c.match(/^\d+/)), []);
Neil
@NNeil1
Feb 23 2018 22:57
I have a class called Nav, which is set to 15% width, now I have another class inside that called Social. So, Nav is the parent element. However, when I set social to a width of 100%, the width if expanding outside the element. How do I set it, so it 100% width of the parent
Tom
@moT01
Feb 23 2018 23:02
@NNeil1 do you have code to share - that sounds like it would work
maybe try max-width 100% - is there content in it making it expand?
CamperBot
@camperbot
Feb 23 2018 23:19
:bulb: to format code use backticks! ``` more info
Neil
@NNeil1
Feb 23 2018 23:27
@moT01 trying to put on codepen now
Vukasin Vasiljevic
@Vukasinn
Feb 23 2018 23:28
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
document.getElementById('#innerBox').innerHTML = "Please allow usage of your geolocation, it is necessary to run the app."
console.log("Hello World!");
}
}
function showPosition(position) {
// x.innerHTML = "Latitude: " + position.coords.latitude +
// "<br>Longitude: " + position.coords.longitude;
let latitude = position.coords.latitude;
let longitude = position.coords.longitude;
console.log(latitude);
console.log(longitude);
setTimeout(showPosition,1000);
}
it gives me the coordinates, but when it needs to pudate it throws me an typeerror saying position is not defined, someone help please, it's urgent
_
Neil
@NNeil1
Feb 23 2018 23:28
@moT01 https://codepen.io/therighttwo/pen/PQdorj codepen has pretty much messed it up, but if you look at the code, you'll be able to see what I mean. I have my FA icons inside a div, inside Nav bar. Nav is set to 15% width, I'm trying to make social also take up the full width of Nav
Marit Fischer
@TheMarit
Feb 23 2018 23:41
@vukasinn could you send the rest of your code/ html/css than I will have a look at it
Rakshit Sinha
@sinharaksh1t
Feb 23 2018 23:43
What's the best way to find and land interviews for web developer jobs in USA?
AbrisM
@AbrisM
Feb 23 2018 23:45
Dice.com
Marit Fischer
@TheMarit
Feb 23 2018 23:45
@sinharaksh1t to find them I use indeed. To land them, that is a tough question, didn't get there yet.
AbrisM
@AbrisM
Feb 23 2018 23:46
Its specifically a search engine for IT
Vukasin Vasiljevic
@Vukasinn
Feb 23 2018 23:46
@TheMarit how about private chat?
Rakshit Sinha
@sinharaksh1t
Feb 23 2018 23:50
Thank you! @TheMarit
CamperBot
@camperbot
Feb 23 2018 23:50
sinharaksh1t sends brownie points to @themarit :sparkles: :thumbsup: :sparkles:
:cookie: 321 | @themarit |http://www.freecodecamp.org/themarit