These are chat archives for FreeCodeCamp/HelpFrontEnd

22nd
Feb 2018
Amit Patel
@AmitP88
Feb 22 2018 00:02
@bjorno43 thanks :) I've written down your steps and I'll implement them when I start the advanced (or other) projects
CamperBot
@camperbot
Feb 22 2018 00:02
amitp88 sends brownie points to @bjorno43 :sparkles: :thumbsup: :sparkles:
:cookie: 270 | @bjorno43 |http://www.freecodecamp.org/bjorno43
Bjorn van de Peut
@bjorno43
Feb 22 2018 00:04
@AmitP88 You should apply for jobs you can handle. Don't apply for a position where you don't meet the requirements yet. If for some reason you're unable to master those requirements in time, you'll end up making a fool of yourself and without a job very fast. Still, gaining experience is very important. If that's in the form of an internship and you're financially able to take it, do it. In the mean time, go surf Stack Overflow from time to time. Try to help others by solving their problems and answering their questions. This is a great way of getting used to being presented with unknown problems and having to figure out how to solve them yourself
The benefit of Stack Overflow is that everything you do there will also be visible on your profile. So you can refer any future employer to it as well so they can see how you solve problems. Aside from that it's always a good idea to have a github account where you post your projects that are worth showing
Amit Patel
@AmitP88
Feb 22 2018 00:07
@bjorno43 I've applied to numerous positions before, but I either got a few rejection emails or no reply at all. Granted, my skillset wasn't that big (just the basic html, css, js, responsive design type stuff). As for an internship, I couldn't afford it, especially if I have to move for the position (which I most likely will, since my city is tech poor). I have a Github account where I have about 6-7 projects posted (from a Udacity program I did in the past). Oh I see, that's a good point about the StackOverflow, I didn't know that employers would be able to see my activity on there
Brad
@bradtaniguchi
Feb 22 2018 00:08
I personally stick around helping others as you learn a lot helping. Expands your exposure to different problems, terms, ideas, practices, and issues
Bjorn van de Peut
@bjorno43
Feb 22 2018 00:10
@AmitP88 Yes they do. Not to mention that SO also has a job board where a lot of employers all around the world are actively looking for new employees
Brad
@bradtaniguchi
Feb 22 2018 00:11
@bjorno43 I never thought about SO as a way to impact employment opportunities, thanks a good way to look at it. Thanks
CamperBot
@camperbot
Feb 22 2018 00:11
bradtaniguchi sends brownie points to @bjorno43 :sparkles: :thumbsup: :sparkles:
:cookie: 271 | @bjorno43 |http://www.freecodecamp.org/bjorno43
Amit Patel
@AmitP88
Feb 22 2018 00:11
I guess I just really struggling with the 'when will I be good enough?' dilemma.
I'll create a StackOverflow account and see what I can do though
Bjorn van de Peut
@bjorno43
Feb 22 2018 00:12
@bradtaniguchi You're welcome :)
Amit Patel
@AmitP88
Feb 22 2018 00:12
although my JavaScript is still kind of weak
Brad
@bradtaniguchi
Feb 22 2018 00:12
@AmitP88 That's call imposture syndrome, its pretty common. The best you can do is do what you can, and challenge yourself. The only way to know if your good enough is to get stuff done, if you know what I mean
Amit Patel
@AmitP88
Feb 22 2018 00:15
@bradtaniguchi for sure. and that's my goal for 2018 :) I want to turn my weaknesses into strengths, and earn all 3 certs this year (hopefully by later this summer). I've been pushing myself harder than ever before, and it may be wrecking my brain (in a good way), but I know i'm making progress. before, I could barely even solve the basic algorithms without looking at solutions (this was when I tried FCC before in '16). but this year, I decided to delete my previous fcc account and start all over to really learn the stuff
Brad
@bradtaniguchi
Feb 22 2018 00:16
@AmitP88 Thats good :D
Bjorn van de Peut
@bjorno43
Feb 22 2018 00:16
@AmitP88 I guess you're more stuggling with your insecurity than your abilities tbh. I've been coding for about 17 years now and there's a lot that I don't know! Like I always say to most new programmers: A good programmer is the one that's able to find solutions for problems. (S)he doesn't have to be able to do it from the head. And if something is simply too complicated or too far off their skillset, they're able to say so instead of wasting everyone's time
Brad
@bradtaniguchi
Feb 22 2018 00:19
Sounds like knowing one's self, is better than knowing
Bjorn van de Peut
@bjorno43
Feb 22 2018 00:19
Exactly
Amit Patel
@AmitP88
Feb 22 2018 00:20
that's true. and yeah, I do want to be a good problemsolver. I want to be able to solve algorithms like they're nothing lol, but yeah, if it's too complicated, I need to learn how to ask for help.
I also need to learn patience lol. I want to be able to solve something fast, but sometimes it takes me even a day or two to figure it out, even after googling things (I try my best not to look at the fcc hints though)
I think what I'll do is just take a break from the algorithm challenges and start the JavaScript Calculator project. I've read that some ppl did that and when they got back to the algorithms they were easier to solve
Bjorn van de Peut
@bjorno43
Feb 22 2018 00:23
Well not just ask for help. You're hired to do a job. That doesn't mean you'll have to somehow do or solve everything that's being thrown at you. Any good employer will respect an employee that's able to say no in case it's too much to ask from them. You're not alone. At least, I hope you won't be, ghehe. You can always ask if any of your colleagues is better suited for a task
Brad
@bradtaniguchi
Feb 22 2018 00:25
For example I just asked my boss help on a problem cuse It was driving me insane. I knew I was not having the correct approach, and knew I was missing something fundamental. me and him talked over the issue and came up with a solution that almost worked, except I noticed a case that failed. After another approach we figured it out. I knew I wouldn't of figured it out for a while if I didn't ask for help.
Amit Patel
@AmitP88
Feb 22 2018 00:27
@bradtaniguchi I see. yeah, I guess that's something I need to work on too. sometimes I'll be stuck on an algorithm or problem on a project for maybe 1-2 days before asking for help.
Brad
@bradtaniguchi
Feb 22 2018 00:27
@AmitP88 Another thing that might help on a fundamental level is learning algorithms and data structures. Code camps don't necessarily teach you these things, and its where going to school really benefits. But you can easily learn them on your own. They are really fundamental to a lot of core problems, and Id consider knowing them helps with a large amount of the FCC challenges (they push you in the direction to understand them, but you could figure them out without knowing them)
Bjorn van de Peut
@bjorno43
Feb 22 2018 00:27
There was a case where I had to tell my old boss no. He asked me to develop a mobile app for him. I knew nothing about that. I wasn't hired for that either. And although I was willing to learn, it would take several months, possibly even a year before I'd be able to develop any meaningfull mobile app
Amit Patel
@AmitP88
Feb 22 2018 00:28
@bjorno43 that's crazy lol. Yeah, if my boss asked me something like that that was way outside my current skill range, I'd have to say no too
abraham anak agung
@padunk
Feb 22 2018 00:29
Good Morning... :sunrise: :coffee:
@bradtaniguchi do you know any good source in the web to learn algo and data structures?
Amit Patel
@AmitP88
Feb 22 2018 00:30
@bradtaniguchi do you know any good Algorithm courses online or any books I could look into? so far i've only found 1 javascript algo course on udemy, but the reviews were meh
Brad
@bradtaniguchi
Feb 22 2018 00:30
Haha you both asked the same thing
abraham anak agung
@padunk
Feb 22 2018 00:30
:smile:
Amit Patel
@AmitP88
Feb 22 2018 00:32
lol
Brad
@bradtaniguchi
Feb 22 2018 00:32
Off the top of my head I don't, I have a few physical book I read while I was in school which helped a lot. I wouldn't consider them the best at teaching the material, but they usually all cover the same topics which are more or less univsersal
You could probably look up some datastructure and algorithm book, or find a pdf. Id consider them all the same in terms of material, its more the delivery (like language specific or something) to be the biggest differences
Amit Patel
@AmitP88
Feb 22 2018 00:35
I found this one algo book someone told me about, but it went into some advanced calculus stuff and it was like 1000+ pages haha
Brad
@bradtaniguchi
Feb 22 2018 00:36
I mean I took calculus and its useful knowledge, but developer wise I don't think I've used a single bit of it
It might be necessary if you were doing physics or math calculations, otherwise its meh logic
Amit Patel
@AmitP88
Feb 22 2018 00:37
for sure. I went up to calc2 in college, that was a headspinner lol
barely passed that one tbh
Brad
@bradtaniguchi
Feb 22 2018 00:37
same here, I failed calc1 cuse I wasn't ready for college work at the time. I'm pretty bad at math too which doesn't help
Amit Patel
@AmitP88
Feb 22 2018 00:38
oh yeah, the book is Introduction to Algorithms 3rd Edition by Thomas H. Cormen
Brad
@bradtaniguchi
Feb 22 2018 00:38
I did learn the idea behind a lot of algorithms and datastructures by going through wikipedia (im serious) it gives a great overview of the ideas. It wont help you learn them, but it will help you get an idea of what exists
Amit Patel
@AmitP88
Feb 22 2018 00:38
yeah, I'm sort of ok at math, but it's not my best subject. and it's weird because in precalc, I got a C, but in calc1 I got a B lol
hmmm, I see. I may look into that actually. I'm not sure if I want to read this 1300 page book lol. I may see if I can find an online course or tutorial
Brad
@bradtaniguchi
Feb 22 2018 00:45
I personally never liked watching videos/tutorials. but that's me, id rather read something, and re-read it 5 times until I got it. Especially for complicated things like math, algos, and physics.
Samuel Culpepper
@qzdl
Feb 22 2018 00:49
richer data too from documentation
it’s fairly easy to make a video about a complex topic with little understanding
try publishing something that gets peer reviewed
Amit Patel
@AmitP88
Feb 22 2018 00:51
hmmm, that's true @qzdl
@bradtaniguchi yeah, I get that. I prefer to read short blogs on topics that i'm learning, that way it's quicker lol. but yeah, I gotta get back into reading books too. The last book I read was javascript notive to ninja (good read), but that was last summer I think lol
Samuel Culpepper
@qzdl
Feb 22 2018 00:53
books are too long winded
Amit Patel
@AmitP88
Feb 22 2018 00:53
I downloaded all the chapters of You Dont Know JS on google, so I gotta get into that
Samuel Culpepper
@qzdl
Feb 22 2018 00:53
you want something you can navigate through rapidly for reference
Amit Patel
@AmitP88
Feb 22 2018 00:54
@qzdl exactly. plus I tend to forget so much from books lol
Samuel Culpepper
@qzdl
Feb 22 2018 00:54
build an object of useful articles and organise what you are learning properly
Amit Patel
@AmitP88
Feb 22 2018 00:55
that's a good idea. I'll do that :)
Bjorn van de Peut
@bjorno43
Feb 22 2018 00:56
Funny how it can be quiet for hours and suddenly everyone needs you at the same time, lol
Amit Patel
@AmitP88
Feb 22 2018 00:57
alright guys, I'm gonna go take a break and give my mind a rest. I'll start reading You Don't Know JS since I've heard great things about it. Thanks @bjorno43 @bradtaniguchi @qzdl for your advice and tips! :)
CamperBot
@camperbot
Feb 22 2018 00:57
amitp88 sends brownie points to @bjorno43 and @bradtaniguchi and @qzdl :sparkles: :thumbsup: :sparkles:
:cookie: 288 | @qzdl |http://www.freecodecamp.org/qzdl
api offline
:cookie: 388 | @bradtaniguchi |http://www.freecodecamp.org/bradtaniguchi
Bjorn van de Peut
@bjorno43
Feb 22 2018 00:57
I litterly just had 3 ppl calling me at the same time, lol
@AmitP88 No problem m8. Take care!
Brad
@bradtaniguchi
Feb 22 2018 00:59
@AmitP88 np :D
James Moore
@James-N-M
Feb 22 2018 01:27
Anyone know laravel / vue ??
Trying to use a vue installed from npm in my project not to sure how to do it haha
Brad
@bradtaniguchi
Feb 22 2018 01:29
@James-N-M Id ask in the main fcc room, more active over there at this time
James Moore
@James-N-M
Feb 22 2018 01:53
thanks @bradtaniguchi
CamperBot
@camperbot
Feb 22 2018 01:53
james-n-m sends brownie points to @bradtaniguchi :sparkles: :thumbsup: :sparkles:
:cookie: 389 | @bradtaniguchi |http://www.freecodecamp.org/bradtaniguchi
Max
@maxiwer
Feb 22 2018 04:04
Hi there. I have a question concerning bootstrap 4.
Why the hell I can't view top of the text under my .fixed-top navbar?
Here's what I'm talking about:
https://codepen.io/maxiwer/pen/Moavoa?editors=1000
DMsalati
@DMsalati
Feb 22 2018 04:07
@maxiwer try using <br>
Max
@maxiwer
Feb 22 2018 04:08
@DMsalati thanks
CamperBot
@camperbot
Feb 22 2018 04:08
maxiwer sends brownie points to @dmsalati :sparkles: :thumbsup: :sparkles:
:cookie: 171 | @dmsalati |http://www.freecodecamp.org/dmsalati
DMsalati
@DMsalati
Feb 22 2018 04:08
@maxiwer of course did it work ?
Max
@maxiwer
Feb 22 2018 04:10
@DMsalati absolutely :smile:
DMsalati
@DMsalati
Feb 22 2018 04:10
@maxiwer lit lit
i would recommend you try to put the <br> above the green border so that the top of it doesnt get covered by the navbar
but you dont have to just a personal prefrence
Max
@maxiwer
Feb 22 2018 04:12
@DMsalati yeah I gave one <br>
DMsalati
@DMsalati
Feb 22 2018 04:15
sounds good
try using two see how you like it
Ken Haduch
@khaduch
Feb 22 2018 04:29
@maxiwer - it's better to add some padding-top to the <body> element to keep the content from moving under the navbar.
Max
@maxiwer
Feb 22 2018 04:46
@khaduch Thanks. Worked for it.
CamperBot
@camperbot
Feb 22 2018 04:46
maxiwer sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3747 | @khaduch |http://www.freecodecamp.org/khaduch
Max
@maxiwer
Feb 22 2018 04:47
@DMsalati thank you.
DMsalati
@DMsalati
Feb 22 2018 05:09
@maxiwer no worries
HerbiScript
@HerbiScript
Feb 22 2018 06:04

I was wondering why this isn't returning my newArr variable as the sum of all of my strings from the newStr variable? Thanks

'function findLongestWord(str) {'
' var newStr = str.split(" ");'
' function add(){'
' for (var i = 0; i <= newStr.length; i++){'
' var newArr = 0;'
'newArr += newStr[i].length;'
' return newArr;'

' }'
' } '
'}'

'findLongestWord("The quick brown fox jumped over the lazy dog");'

(I know I havn't finished the code for finding the longest word, btw. Just merely confused why this section doesn't seem to work when in my head it should.)
DMsalati
@DMsalati
Feb 22 2018 06:11
whats function add()?
get rid of it you dont need it
put the return statemnt outside the for loop
HerbiScript
@HerbiScript
Feb 22 2018 06:15
That helped me understand what I was doing wrong, thank so much for the input. @DMsalati
CamperBot
@camperbot
Feb 22 2018 06:15
herbiscript sends brownie points to @dmsalati :sparkles: :thumbsup: :sparkles:
:cookie: 172 | @dmsalati |http://www.freecodecamp.org/dmsalati
DMsalati
@DMsalati
Feb 22 2018 06:15
no worries
Darren
@DarrenfJ
Feb 22 2018 06:41
hey @coderNewby more links, check yer PM
coderNewby
@coderNewby
Feb 22 2018 06:42
thanks @DarrenfJ
CamperBot
@camperbot
Feb 22 2018 06:42
codernewby sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2400 | @darrenfj |http://www.freecodecamp.org/darrenfj
pragya1248
@pragya1248
Feb 22 2018 06:57
Hey!
DMsalati
@DMsalati
Feb 22 2018 06:57
hi
When I m using input type = email then I m getting blue mark inside my sign up box.Why it's happening so? How to fix it?
DMsalati
@DMsalati
Feb 22 2018 07:47
you have a class called sign
i think if you remove it it should fix the issue
abraham anak agung
@padunk
Feb 22 2018 07:48
@pragya1248 in your css, class sign. delete the text-decoration: underline or change it to none.
ahmed-issa-mohd
@ahmed-issa-mohd
Feb 22 2018 09:09
can I have question please ?
Dhaval Vira
@dhavalveera
Feb 22 2018 09:10
Hello
I need little help in HTML & CSS
ahmed-issa-mohd
@ahmed-issa-mohd
Feb 22 2018 09:11
okay
ask me
Dhaval Vira
@dhavalveera
Feb 22 2018 09:11
I want to create a Best Look Drop-Down Menu for Desktop Mode + for Mobo View
abraham anak agung
@padunk
Feb 22 2018 09:11
just ask, someone will help you

<!DOCTYPE html>

<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
<div class="navbar-header">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-6"> <a class="navbar-brand" href="#/home"><img src="img/logo.png" class="img-responsive" alt="Learn Education" title="Learn Education"/></a></div>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
</div>
<div class="collapse navbar-collapse col-lg-6 col-md-6 col-sm-12 col-xs-7 pull-right" id="bs-example-navbar-collapse-1" style="border:none;border-radius:15px;">
<ul class="nav navbar-nav navbar-right changeme" id="visibid">
<li> <a href="#" data-toggle="collapse" data-target=".navbar-collapse">Home</a> </li>
<li><a href="#" data-toggle="collapse" data-target=".navbar-collapse">LogIn</a></li>
<li><a href="#" data-toggle="collapse" data-target=".navbar-collapse">SignUp</a></li>
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Sample Test <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#" data-toggle="collapse" data-target=".navbar-collapse">Mathematics</a></li>
<li><a href="#" data-toggle="collapse" data-target=".navbar-collapse">Physics</a></li>
<li><a href="#" data-toggle="collapse" data-target=".navbar-collapse">Chemistry</a></li>
</ul>
</li>
<li><a href="#" data-toggle="collapse" data-target=".navbar-collapse">Reports</a></li>
<li><a href="#" data-toggle="collapse" data-target=".navbar-collapse">About Us</a></li>
<li><a href="#" data-toggle="collapse" data-target=".navbar-collapse">Contact Us</a></li>
<li><a href="#" data-toggle="collapse" data-target=".navbar-collapse">DashBoard</a></li>
</ul>
</div>
</div>

</body>
</html>

you can try this
Dhaval Vira
@dhavalveera
Feb 22 2018 09:16
can we chat in Private @ahmed-issa-mohd
Muhammad Osman A.J.
@moajday
Feb 22 2018 09:19
I welcome your constructive criticism on my front end project, before I move to next JavaScript sections. https://codepen.io/ajbozdar/details/WwZMoO/ Thank you.
ahmed-issa-mohd
@ahmed-issa-mohd
Feb 22 2018 09:32
@dhavalveera okay , I can
Van Nam -DVN Channel
@vannam05_twitter
Feb 22 2018 10:16
Can someone explain to me how it work,thanks.
code
Dhaval Vira
@dhavalveera
Feb 22 2018 10:17
@vannam05_twitter what ?
Van Nam -DVN Channel
@vannam05_twitter
Feb 22 2018 10:17
var arr = [
[1,2], [3,4], [5,6]
];
for (var i=0; i < arr.length; i++) {
for (var j=0; j < arr[i].length; j++) {
console.log(arr[i][j]);
}
}
I am learning Javascript on FCC, and I feel a bit confused.
Dhaval Vira
@dhavalveera
Feb 22 2018 10:19
oh
Van Nam -DVN Channel
@vannam05_twitter
Feb 22 2018 10:20
var arr = [
  [1,2], [3,4], [5,6]
];
for (var i=0; i < arr.length; i++) {
  for (var j=0; j < arr[i].length; j++) {
    console.log(arr[i][j]);
  }
}
How it work?
abraham anak agung
@padunk
Feb 22 2018 10:21
@vannam05_twitter it is an array inside an array that you loop.
var arr = [[1,2], [3,4], [5,6]] arr[0][0] will point to 1
first loop is for the outer array second loop is inner array.
Van Nam -DVN Channel
@vannam05_twitter
Feb 22 2018 10:23
And what's next?
abraham anak agung
@padunk
Feb 22 2018 10:25
@vannam05_twitter that's it. First loop of i will point to arr[0] which is [1,2] Second loop of j or arr[0][0] is 1
Quantomistro3178
@Quantomistro3178
Feb 22 2018 10:27
Someone please explain me $.getJSON() and $.ajax()
Markus Kiili
@Masd925
Feb 22 2018 10:29
@Quantomistro3178 The second one is a jQuery method for making an ajax call, and the first one is a (shorthand) method for making an ajax call that expects JSON encoded string as a response. It also parses the response into a JS object automatically.
Van Nam -DVN Channel
@vannam05_twitter
Feb 22 2018 10:31
for (var i=0; i < arr.length; i++)  i = 0 , 1 , 2 
for (var j=0; j < arr[i].length; j++)   j = 0, 1, 2
console.log(arr[0][0], [1][0], [2][0], [0][1], [0][2], [1][1]);
Quantomistro3178
@Quantomistro3178
Feb 22 2018 10:31
@Masd925 So getJSON can be used without jQuery too? How would I use it for pulling a quote from this link: http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1
Van Nam -DVN Channel
@vannam05_twitter
Feb 22 2018 10:31
@padunk That's how it work? or not ?
please tell me,thanks.
Markus Kiili
@Masd925
Feb 22 2018 10:31
@Quantomistro3178 getJSON is a jQuery method.
Quantomistro3178
@Quantomistro3178
Feb 22 2018 10:32
oh. Can you do that without jQuery? Just wondering
Markus Kiili
@Masd925
Feb 22 2018 10:33
@Quantomistro3178 You can make ajax requests with pure JS too.
Quantomistro3178
@Quantomistro3178
Feb 22 2018 10:33
how?
Markus Kiili
@Masd925
Feb 22 2018 10:34
@Quantomistro3178 JS uses the XMLHttpRequest object for that https://www.w3schools.com/js/js_ajax_intro.asp
Quantomistro3178
@Quantomistro3178
Feb 22 2018 10:34
@Masd925 Thanks
CamperBot
@camperbot
Feb 22 2018 10:34
quantomistro3178 sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4701 | @masd925 |http://www.freecodecamp.org/masd925
Van Nam -DVN Channel
@vannam05_twitter
Feb 22 2018 10:38
Can you hear me?
Liam Docherty
@ldocherty1
Feb 22 2018 10:56

Hi, can anyone help me resolve these three errors within my code?

The error that is being outputted is that "special characteristics must be escaped : [<]" this is for the first line.

The error that is being outputted is that "special characteristics must be escaped : [>]" this is for the second line.

<div class="skillbar-title" style="background: #2A4494;"><span>WordPress & Photoshop</span>/div>
  <div class="skillbar-bar" style="background: #2A4494;"></div>

Lastly, error "tag must be paired, no start tag </section>"

 <section id="portfolio" class "bg-dark">
        <!-- Page Heading -->
        <div class="container">
            <div class="row">
                <div class="col-lg-8 mx-auto text-center">
                    <h2 class="section-heading text-white">Gallary</h2>
                    <hr class="light">
                    <p class="text-white">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
                </div>
            </div>
            <div class="row img-fluid">
                <div class="col-lg-6 portfolio-item">
                    <div class="card h-100">
                        <a href="#"><img class="card-img-top" src="https://static.pexels.com/photos/261045/pexels-photo-261045.jpeg" alt="" height="300"></a>
                        <div class="card-body">
                            <h4 class="card-title text-center">
                                <a href="#">Project One</a>
                            </h4>
                            <p class="card-text text-justify">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque
                                urna varius vitae.
                            </p>
                        </div>
                    </div>
                </div>
                <div class="col-lg-6 portfolio-item">
                    <div class="card h-100">
                        <a href="#"><img class="card-img-top" src="https://static.pexels.com/photos/261045/pexels-photo-261045.jpeg" alt="" height="300"></a>
                        <div class="card-body">
                            <h4 class="card-title text-center">
                                <a href="#">Project Two</a>
                            </h4>
                            <p class="card-text text-justify">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit aliquam aperiam nulla perferendis dolor nobis numquam, rem expedita, aliquid optio, alias illum eaque. Non magni, voluptates quae, necessitatibus unde temporibus.</p>
                        </div>
                    </div>
                </div>
                <div class="col-lg-6 portfolio-item">
                    <div class="card h-100">
                        <a href="#"><img class="card-img-top" src="https://static.pexels.com/photos/261045/pexels-photo-261045.jpeg" alt="" height="300"></a>
                        <div class="card-body">
                            <h4 class="card-title text-center">
                                <a href="#">Project Three</a>
                            </h4>
                            <p class="card-text text-justify">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
                        </div>
                    </div>
                </div>
                <div class="col-lg-6 portfolio-item">
                    <div class="card h-100">
                        <a href="#"><img class="card-img-top" src="https://static.pexels.com/photos/261045/pexels-photo-261045.jpeg" alt="" height="300"></a>
                        <div class="card-body">
                            <h4 class="card-title text-center">
                                <a href="#">Project Four</a>
                            </h4>
                            <p class="card-text text-justify">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit aliquam aperiam nulla perferendis dolor nobis numquam, rem expedita, aliquid optio, alias illum eaque. Non magni, voluptates quae, necessitatibus unde temporibus.</p>
                        </div>
                    </div>
                </div>
                <div class="col-lg-6 portfolio-item">
                    <div class="card h-100">
                        <a href="#"><img class="card-img-top" src="https://static.pexels.com/photos/261045/pexels-photo-261045.jpeg" alt="" height="300"></a>
                        <div class="card-body">
                            <h4 class="card-title text-center">
                                <a href="#">Project Five</a>
                            </h4>
                            <p class="card-text text-justify">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
                        </div>
                    </div>
                </div>
                <div class="col-lg-6 portfolio-item">
                    <div class="card h-100">
                        <a href="#"><img class="card-img-top" src="https://static.pexels.com/photos/261045/pexels-photo-261045.jpeg" alt="" height="300"></a>
                        <div class="card-body">
                            <h4 class="card-title text-center">
                                <a href="#">Project Six</a>
                            </h4>
                            <p class="card-text text-justify">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit aliquam aperiam nulla perferendis dolor nobis numquam, rem expedita, aliquid optio, alias illum eaque. Non magni, voluptates quae, necessitatibus unde temporibus.</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
Kael_
@iamKael
Feb 22 2018 11:07
hello everyone
i want to create a function that create an element and add all attributes you want to add to this element
function createEl (element, attributes = null) {
      document.createElement(element)
      if (attributes !== null && typeof attributes === 'object') {

      }
    }
Stephen James
@sjames1958gm
Feb 22 2018 11:11
@MichKael You can use Object.keys function to get the keys of an object.
Kael_
@iamKael
Feb 22 2018 11:12
but i don't know to iterate in attribute object to so that the function returns each argument as with a loop
Markus Kiili
@Masd925
Feb 22 2018 11:12
@MichKael Store the element that you create and use Element.setAttribute method.
Stephen James
@sjames1958gm
Feb 22 2018 11:12
@MichKael Object.keys(attributes) returns an array that you can iterate over
Kael_
@iamKael
Feb 22 2018 11:13
@sjames1958gm let me try
Stephen James
@sjames1958gm
Feb 22 2018 11:13
@MichKael :+1:
@ldocherty1 Replace & with &amp;
@ldocherty1 <section id="portfolio" class "bg-dark"> this is missing = from class="bg-dark"
Randy
@RandyGoldsmith
Feb 22 2018 11:18
@sjames1958gm man i wish i was like u, just dishing out answers lol. Been on here for 3 years and you still answer everyones questions
Stephen James
@sjames1958gm
Feb 22 2018 11:19
@RandyGoldsmith :) some might say I need a life, but thanks for your kind words
CamperBot
@camperbot
Feb 22 2018 11:19
sjames1958gm sends brownie points to @randygoldsmith :sparkles: :thumbsup: :sparkles:
:cookie: 15 | @randygoldsmith |http://www.freecodecamp.org/randygoldsmith
Randy
@RandyGoldsmith
Feb 22 2018 11:19
@sjames1958gm lol, thanks
Stephen James
@sjames1958gm
Feb 22 2018 11:19
I have learned much answering questions along with seeing the answers of others
Randy
@RandyGoldsmith
Feb 22 2018 11:19
@sjames1958gm thanks
CamperBot
@camperbot
Feb 22 2018 11:19
randygoldsmith sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9012 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Randy
@RandyGoldsmith
Feb 22 2018 11:20
@sjames1958gm you must do more than code
Stephen James
@sjames1958gm
Feb 22 2018 11:20
@RandyGoldsmith I like to watch Soccer. But coding is also my day job.
Randy
@RandyGoldsmith
Feb 22 2018 11:21
@sjames1958gm Im following the p1xt guide.. its tough..been working on a simple clone resume page for about 5 days.. its only html and css but still hard. my page looks a little bit like it but its not responsive and you can tell a noob did it
@sjames1958gm self taught or schooling?
Stephen James
@sjames1958gm
Feb 22 2018 11:22
@RandyGoldsmith I went to college for CS degree (many years ago) the webstuff, js, css, html, etc. are more self taught
Liam Docherty
@ldocherty1
Feb 22 2018 11:22
@sjames1958gm Thanks for your help it is very appreciated. I was wondering if you could help me with one last thing to do with jAVA? I'm trying to fetch a pdf on my desktop and output it within my java program. I am getting an error when I run the program which is "java.lang.IllegalArgumentException: The file: CVliamdocherty.pdf doesn't exist."
//Help section method
    public static void helpsection() {
        try {
            Desktop.getDesktop().open(new File("CVliamdocherty.pdf"));
        } catch(Exception e) {
            System.out.println(e);
        }
        System.out.println("Would you like to go back into the program to select a course to find out your grade?");
        System.out.println("You can enter 'Yes' or 'No' only.");
        outcome2 = userinput.next();
        if (outcome2.equalsIgnoreCase("Yes")) {
            step1();
        } else if (outcome2.equalsIgnoreCase("No")) {
            System.out.println((username)+" thanks for using Liam's UCAS grade calculator.");
            System.exit(0);
        } else { 
            System.out.println("You have entered an invalid value.");
            System.out.println("The program now will re run, make sure to enter the correct value next time.");
            step1();
        } 
    }
CamperBot
@camperbot
Feb 22 2018 11:22
ldocherty1 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9013 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Randy
@RandyGoldsmith
Feb 22 2018 11:23
@sjames1958gm thats cool, i enjoy it just like everyone else but eventually i want to make a living off it..might as well :)
Stephen James
@sjames1958gm
Feb 22 2018 11:23
@RandyGoldsmith Yes, if you can enjoy and make money - success !
Randy
@RandyGoldsmith
Feb 22 2018 11:24
@sjames1958gm what do u do in your coding day job? I heard its nothing like tutorials..its mostly maintaining legacy code or figuring out more ways to make money with ads as is the case with biger companies like google/facebook
Stephen James
@sjames1958gm
Feb 22 2018 11:24
@ldocherty1 Assuming the file exists, the code must be looking in the wrong place for the file. I am not familiar with the Desktop class
Liam Docherty
@ldocherty1
Feb 22 2018 11:25
@sjames1958gm Ok thanks, I'll continue to do some research on it. It is on the desktop though and the file name is correct.
CamperBot
@camperbot
Feb 22 2018 11:25
ldocherty1 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
api offline
Stephen James
@sjames1958gm
Feb 22 2018 11:25
@RandyGoldsmith Well in my current job, I will use c++, java, javascript, even some python all in one day. I start a new job next week that will be all c++
@ldocherty1 The File class maybe trying to open the file without the desktop context
@ldocherty1 Maybe create the File object on a separate line and see if you can get the file name (path) from that object, maybe that will be a clue?
Randy
@RandyGoldsmith
Feb 22 2018 11:27
@sjames1958gm wow, alot of languages to keep up with.
Stephen James
@sjames1958gm
Feb 22 2018 11:28
@RandyGoldsmith Yeah, the biggest problem is keeping all the syntaxes correct. Luckily IDEs these day help some
Kyanij Maharjan
@Kyanij
Feb 22 2018 11:36
hi
Stephen James
@sjames1958gm
Feb 22 2018 11:36
@Kyanij hello
Kyanij Maharjan
@Kyanij
Feb 22 2018 11:37
Do you guys know what's best tutorial for learning React?
@sjames1958gm hi
Stephen James
@sjames1958gm
Feb 22 2018 11:38
@Kyanij There are good ones on Udemy if you are wanting to spend money.
Liam Docherty
@ldocherty1
Feb 22 2018 11:38
@sjames1958gm I worked out the issue, it's the file path. What would be the file path if it was on the desktop?
Stephen James
@sjames1958gm
Feb 22 2018 11:38
@ldocherty1 Windows?
Liam Docherty
@ldocherty1
Feb 22 2018 11:38
Mac
desktop/CVliamdocherty.pdf?
Kyanij Maharjan
@Kyanij
Feb 22 2018 11:38
isn't there free best courses @sjames1958gm
Stephen James
@sjames1958gm
Feb 22 2018 11:38
@ldocherty1 I am a Mac noob :(
Liam Docherty
@ldocherty1
Feb 22 2018 11:39
His great and his help is much appreciated.
Stephen James
@sjames1958gm
Feb 22 2018 11:40
@Kyanij This channel on you tube has good playlists LearnCode.academy
Kyanij Maharjan
@Kyanij
Feb 22 2018 11:40
When will freecodecamp provide React exercise?
Stephen James
@sjames1958gm
Feb 22 2018 11:41
@Kyanij There are ones in the beta release - which should release "soon"
Another channel - Traversy Media on you tube
Kyanij Maharjan
@Kyanij
Feb 22 2018 11:41
Thanks @sjames1958gm
CamperBot
@camperbot
Feb 22 2018 11:41
kyanij sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9014 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
Feb 22 2018 11:42
@Kyanij No problem
Michael Cordero
@CyberPutty
Feb 22 2018 11:42
anyone done the markdown challenge?
Stephen James
@sjames1958gm
Feb 22 2018 11:43
@CyberPutty yes
Michael Cordero
@CyberPutty
Feb 22 2018 11:46
@sjames1958gm I can solve it very easily with just jquery or dom using innerhtml, but it looks like they want you to use react. the problem i have is the output from the marked() function will always have "<p><p>" for example and outputing plain text and the jsx doesn't convert it over. in react I can't think of a way to convert the marked into its plain format so i can have jsx convert it.
Stephen James
@sjames1958gm
Feb 22 2018 11:48
@CyberPutty As far as I know you have to use dangerouslySetHtml function
return <div dangerouslySetInnerHTML={createMarkup()} />;
Michael Cordero
@CyberPutty
Feb 22 2018 11:48
@sjames1958gm haha what is that
sounds cray cray
Stephen James
@sjames1958gm
Feb 22 2018 11:49
@CyberPutty It is a function that sets HTML from string.
https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml
its the only way I have seen to do this, although there is probably some way to compile html string to React dynamically
Kael_
@iamKael
Feb 22 2018 11:50

@sjames1958gm when i do something like this

function createEl (element, attributes = null) {
      document.createElement(element)
      if (attributes !== null && typeof attributes === 'object') {
        for (var key in attributes) {
          element.setAttribute(`${key}, ${attributes[key]}`)
        }
      }
    }

i have an error saying: Uncaught TypeError: element.setAttribute is not a function at createEl (<anonymous>:5:19) at <anonymous>:10:17

Stephen James
@sjames1958gm
Feb 22 2018 11:51
@MichKael
let newElement = document.createElement(element);
// then use newElement to call setAttribute
@MichKael You'll need to return the created element as well
Kael_
@iamKael
Feb 22 2018 11:53
thanks
Michael Cordero
@CyberPutty
Feb 22 2018 11:54
@sjames1958gm thanks i think this will work.
CamperBot
@camperbot
Feb 22 2018 11:54
cyberputty sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9015 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Liam Docherty
@ldocherty1
Feb 22 2018 11:58

I'm trying to fetch a PDF on my desktop and output it within my Java program. I am getting an error when I run the program which is :

java.lang.IllegalArgumentException: The file: CVliamdocherty.pdf
doesn't exist.

import java.util.Scanner; //taking input from user
import java.io.File;
import java.awt.Desktop;

//Help section method
    public static void helpsection() {
        try {
           Desktop.getDesktop().open(new File("CVliamdocherty.pdf"));
        } catch(Exception e) {
            System.out.println(e);
        }
    }

The file does exist with the file correct name and it is located on the desktop.

The problem is the file path. I'm on Mac what would the file path be for this file located on the desktop? I did try ""./desktop/CVliamdocherty.pdf" but it didn't work.

dinesh
@1532j0004kg
Feb 22 2018 12:12
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>                        
      </button>
      <a class="navbar-brand" href="#">WebSiteName</a>
    </div>
    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#" data-toggle="collapse" data-target=".navbar-collapse">Home</a></li>
         <li class="active"><a href="#">Home</a></li>

        <li class="dropdown">
          <a class="dropdown-toggle" data-toggle="dropdown" href="#">Page 1 <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="#" >Page 1-1</a></li>
            <li><a href="#">Page 1-2</a></li>
            <li><a href="#">Page 1-3</a></li>
          </ul>
        </li>
        <li><a href="#" >Page 2</a></li>
        <li><a href="#">Page 3</a></li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
        <li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
      </ul>
    </div>
  </div>
</nav>

<div class="container">
  <h3>Collapsible Navbar</h3>
  <p>In this example, the navigation bar is hidden on small screens and replaced by a button in the top right corner (try to re-size this window).
  <p>Only when the button is clicked, the navigation bar will be displayed.</p>
</div>

</body>
</html>
in this snippet what is the use of data-toggle="collapse" inside the navabar menu items .
since , collapse is for collapsing the inline menu items right ? then here what is the work of data-toggle="collapse"
can any please tell ?
Sorin Ruse
@sorinr
Feb 22 2018 12:17
@ldocherty1 where is running your java code? local on your machine or somewhere server side?
Stephen James
@sjames1958gm
Feb 22 2018 12:20
@ldocherty1 As I recall there is a get info option on files in the finder?
Sorin Ruse
@sorinr
Feb 22 2018 12:21
@ldocherty1 ok from your example it seems its running on your machine. then you should give to the CVliamdocherty.pdf the relative path to it based on where is the java code you are running
Stephen James
@sjames1958gm
Feb 22 2018 12:22
@1532j0004kg data-toggle - contains the CSS class of the element that should be toggled (collapsed) when the <a> element is clicked
Valeriy Stepanov
@bskydive
Feb 22 2018 12:24
Hello everyone! Please, help with CSS and background overlay. I want to change bacgkround-color of two nested elements after mouse hover on parent.
There is a live example
https://codepen.io/anon/pen/MQXQpo
Valeriy Stepanov
@bskydive
Feb 22 2018 12:35
.c-list-stacked-item:hover .c-list-stacked-item-name,
.c-list-stacked-item:hover .c-list-stacked-item-type {
  background-color: #f00;
}
This looks like hack, but it works. Anybody knows where to learn deeper about background-color overlay rules?
LydaTech
@lydatech
Feb 22 2018 12:51
@bskydive using SASS you can use the ampersand there is no parent selector in css
Kael_
@iamKael
Feb 22 2018 12:54
I have an element that creates another one. I would like that when I click on the new element this one disappears how can I do?
the create script work but the disappear script don't
Marianissimus
@Marianissimus
Feb 22 2018 13:11
@MichKael vanilla JS or do you use jQuery?
Stephen James
@sjames1958gm
Feb 22 2018 13:18
@MichKael How are you assigning the disappear script to the click on the new element?
Van Nam -DVN Channel
@vannam05_twitter
Feb 22 2018 13:31
Hey guys
i really need you help
Tai Jones
@taiJones00
Feb 22 2018 13:32
I can try. With what? @vannam05_twitter
Van Nam -DVN Channel
@vannam05_twitter
Feb 22 2018 13:35
How do I make photos of the same size in a slideshow?
Valeriy Stepanov
@bskydive
Feb 22 2018 13:36
via background properties you can make same height or width
Van Nam -DVN Channel
@vannam05_twitter
Feb 22 2018 13:36
Can you help me? Chat to me privately @taiJones00 Thanks.
CamperBot
@camperbot
Feb 22 2018 13:36
vannam05_twitter sends brownie points to @taijones00 :sparkles: :thumbsup: :sparkles:
:cookie: 265 | @taijones00 |http://www.freecodecamp.org/taijones00
Van Nam -DVN Channel
@vannam05_twitter
Feb 22 2018 13:37
Can you tell me in detail? @bskydive
This is my pen: https://codepen.io/fantasy2943/pen/eVEOBB I have many troubles because I'm a beginner learning web programming.
Kristian Dimitrov
@sickskills91_twitter
Feb 22 2018 13:49
hello
can i have some help ?
Brandon Blackwell
@Radlerz1
Feb 22 2018 13:50
what do you need help with?
Kristian Dimitrov
@sickskills91_twitter
Feb 22 2018 13:50
i am new to jquery
var d = $('<div>');
d.addClass('add-controls');
var label = $('<label>Enter text: </label>');
var input = $('<input>');
input.appendTo(label);
label.appendTo(d);
var a = $('<a>');
a.addClass('button');
a.css('display', 'inline-block');
d.appendTo(container);
why the button doesn't show up?:
elad ben aderet
@eladonline
Feb 22 2018 13:51
var d = $('<div>');
d.addClass('add-controls');
var label = $('<label>Enter text: </label>');
var input = $('<input>');
input.appendTo(label);
label.appendTo(d);
var a = $('<a>');
a.addClass('button');
a.css('display', 'inline-block');
d.appendTo(container);
Kristian Dimitrov
@sickskills91_twitter
Feb 22 2018 13:51
how did you make that?
elad ben aderet
@eladonline
Feb 22 2018 13:52
add ``` line before start and line under end
Kael_
@iamKael
Feb 22 2018 13:52
@msambolah @Marianissimus thanks it's fine now i found the problem
CamperBot
@camperbot
Feb 22 2018 13:52
michkael sends brownie points to @msambolah and @marianissimus :sparkles: :thumbsup: :sparkles:
:cookie: 470 | @marianissimus |http://www.freecodecamp.org/marianissimus
api offline
Kristian Dimitrov
@sickskills91_twitter
Feb 22 2018 13:52
ok elad
can you help me with that:?
where am I wrong?
krckyboy
@krckyboy
Feb 22 2018 13:54

Guys, I am wondering if you could tell me what is the situation like for hosting Node (mongoDB) apps? Are there affordable services for it, and how is it compared to PHP (MySQL)? I still haven't decided what I will learn, whether PHP or stick to Node, so I thought of asking that.

How does the price of heroku & mlab compare to the way you would deploy PHP apps? Thank you!

elad ben aderet
@eladonline
Feb 22 2018 13:54
it seems your adding a class of button to a link element ?
you expect it to turn into a button ?
Brandon Blackwell
@Radlerz1
Feb 22 2018 13:54
Is that on codepen ? be easier if I had the code to play with
Tai Jones
@taiJones00
Feb 22 2018 13:55
Can I have help with my calculator. I have about two bugs to finish before it's presentable
elad ben aderet
@eladonline
Feb 22 2018 13:55
@taiJones00 np ask
Tai Jones
@taiJones00
Feb 22 2018 13:55
Awesome. The bugs are pretty simple. //Bug - Multiple decimal points can be added. An operation can be picked before any number is entered.
To fix the decimal bug I feel like something like this should be written
// If two decimals are found in the results area $("decimal").click(function(event) { results = document.getElementById("results").textContent; if (results == "Results" || results == number1.toString()) { $("#results").html(""); } if (results.indexOf(".") == -1) { $("#results").text($("#results").text() + event.target.value); } else { results = results.substring(0, results.length - 1); $("#results").html(results); } });
Hm. Weirdly formatted
Well that code in in my pen
Kristian Dimitrov
@sickskills91_twitter
Feb 22 2018 13:56
elad ben aderet
i know that
Tai Jones
@taiJones00
Feb 22 2018 13:56
@eladonline
Kristian Dimitrov
@sickskills91_twitter
Feb 22 2018 13:56
but i want a block with add to show up
after input field
Tai Jones
@taiJones00
Feb 22 2018 13:57
So uncomment that and comment the $("#decimal").click(number);
This will produce a new bug where no decimal can be added at all
@eladonline
elad ben aderet
@eladonline
Feb 22 2018 13:58
@taiJones00 give me some time to dive into that
Tai Jones
@taiJones00
Feb 22 2018 13:58
Okay @eladonline
I'll uncomment that code I mean so this will be easier to work on. Reload the page in about ten seconds @eladonline
Brandon Blackwell
@Radlerz1
Feb 22 2018 13:59
test if the first of the str is a number if its not prevent user from adding an operation
elad ben aderet
@eladonline
Feb 22 2018 13:59
@taiJones00 k
Brandon Blackwell
@Radlerz1
Feb 22 2018 13:59
without looking at the code. just a suggestion though
@taiJones00
Tai Jones
@taiJones00
Feb 22 2018 14:00
Oh for the second bug? @Radlerz1 I'll try that
But I think if (results == "Results" && number1 == -999) makes more sense, right? @Radlerz1
So in this if statement I would set operation to not change operation = "" if this condition was met
dinesh
@1532j0004kg
Feb 22 2018 14:02
@sjames1958gm :+1:
@sjames1958gm thanks
CamperBot
@camperbot
Feb 22 2018 14:03
1532j0004kg sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9017 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Brandon Blackwell
@Radlerz1
Feb 22 2018 14:05
if(isNaN(number1)){
//dont let user add an operation
}
for your second question
Tai Jones
@taiJones00
Feb 22 2018 14:06
https://codepen.io/taiJones00/pen/wrZgGq?editors=0011 @Radlerz1 Can you see if this bug is fixed now?
Brandon Blackwell
@Radlerz1
Feb 22 2018 14:07
I am not sure surprisingly been awhile since I have been on that project but I went back to mine and I actually never thought of that scenario :/ and yes seems to be working
Tai Jones
@taiJones00
Feb 22 2018 14:09
Radical. Thank you @Radlerz1
CamperBot
@camperbot
Feb 22 2018 14:09
taijones00 sends brownie points to @radlerz1 :sparkles: :thumbsup: :sparkles:
:cookie: 328 | @radlerz1 |http://www.freecodecamp.org/radlerz1
elad ben aderet
@eladonline
Feb 22 2018 14:15
@taiJones00 add this to the first line of update function
if(!isNaN(results)){return 'none'}
it will prevent oprator when no integer in results
Tai Jones
@taiJones00
Feb 22 2018 14:17
Awesome thank you. Did you find out why my decimal function isn't working right? @eladonline
CamperBot
@camperbot
Feb 22 2018 14:17
taijones00 sends brownie points to @eladonline :sparkles: :thumbsup: :sparkles:
:cookie: 230 | @eladonline |http://www.freecodecamp.org/eladonline
<I am/>
@kondasMajid
Feb 22 2018 14:17
pleas can someone help me, how can i run a random array to go along wit time of the day.
Tai Jones
@taiJones00
Feb 22 2018 14:18
What do you mean? @Guykondas
Tai Jones
@taiJones00
Feb 22 2018 14:24
Ohhhhh @eladonline
Here's something
I'm targeting an element with the name of decimal. Not the element with the id of decimal
Okay it should be fixed and bug free
<I am/>
@kondasMajid
Feb 22 2018 14:34
@taiJones00 i want to create a daily motivational quote app, that will send a quote a dialy random quote through an arays depeding on the time.
that means the app will randomize the arrays once everyday
Tai Jones
@taiJones00
Feb 22 2018 14:36
This should help @Guykondas https://www.w3schools.com/js/js_timing.asp
<I am/>
@kondasMajid
Feb 22 2018 14:37
okay, let me check it
<I am/>
@kondasMajid
Feb 22 2018 14:40
@taiJones00 using thetimeout but im already using the onclick function, is there a way to use two at a time.
Tai Jones
@taiJones00
Feb 22 2018 14:43
Honestly i'm not sure because I haven't used the timeout function before @Guykondas
<I am/>
@kondasMajid
Feb 22 2018 14:45
okay. i think im getting it gradually..
but still thinking how to attach to my code
Tai Jones
@taiJones00
Feb 22 2018 14:48
Just looking at this now, I feel like this is what you should be using. setTimeout(function(){ alert("Hello"); }, 3000);. How many miliseconds are in a day? And inside this function you can do something like change the first element to be the last element. Something like shift and then push to remove and add from an array. This way you never have to add any new elements to the array as all your elements are being recycled. And then in the function try something like send myArr[0] (have it always send the first element of the array which will change daily @Guykondas
<I am/>
@kondasMajid
Feb 22 2018 14:52
thats great there. what i did was i stored the strings in the array and i random it.
check out.
Tai Jones
@taiJones00
Feb 22 2018 14:54
That way would make it more likely for someone to see a quote multiple times in a row since the random method doesn't guarantee an in set of 50 doesn't show up again two days from after it was first shown
@Guykondas
<I am/>
@kondasMajid
Feb 22 2018 14:55
yeah. you are right.
@taiJones00

``` var quotesFunc = function(){
var date = new Date();
var quotes = ["Hello World", "Good morning", "Good Night", "i love you"];
var randomQuotes= quotes[Math.floor(Math.random() * quotes.length)];

        document.getElementById("quotes").innerHTML = randomQuotes;

    } ```

this ma code

Marc Schöni
@marcschoeni
Feb 22 2018 16:25
Good Evening Everyone
h1tag
@h1tag
Feb 22 2018 16:33
good evening
Anker
@ankerpeet
Feb 22 2018 16:55
I'm having some weird issues with my pomodoro clock. Anyone care to help point out what I'm doing wrong?
https://codepen.io/ankerpeet/pen/KQoEXE
Tom
@moT01
Feb 22 2018 16:58
whats the issue
j o h n
@jgwould
Feb 22 2018 16:59
what are all the fcc rooms
where can i find them
CamperBot
@camperbot
Feb 22 2018 16:59
find rooms
nothing found
Tom
@moT01
Feb 22 2018 16:59
@jgwould this is one of them
j o h n
@jgwould
Feb 22 2018 17:00
got it thx guys
Tom
@moT01
Feb 22 2018 17:07
@ankerpeet first problem - change the order of these two lines in both the plus and minus clicks
    multiplier--;
    time = 60 * multiplier;
Sorin Ruse
@sorinr
Feb 22 2018 17:12
@ankerpeet you can even make only one function that will deal with increasing and decreasing by passing the operation you want and return the result
NikolaNbgd
@NikolaNbgd
Feb 22 2018 19:01

@NikolaNbgd
Hi guys, can anybody help me with installing bootstrap 4 through npm? I'm the only one on project and really have a problem with that because I'm using webpack 2. What I did so far, I installed bootstrap 4 (npm install bootstrap@4.0.0-alpha.6) and then when I want to require bootstrap.sass and some of bootstrap js files, I'm getting this error

ERROR in ./node_modules/bootstrap/scss/bootstrap.scss
Module parse failed: Unexpected character '@' (9:0)
You may need an appropriate loader to handle this file type.
|
| // Core variables and mixins
| @import "variables";
| @import "mixins";
| @import "custom";
@ ./src/index.js 3:22-78
@ multi (webpack)-dev-server/client?http://localhost:8080 babel-polyfill ./src/index.js
Which loader do I need? Any kind of help is the most welcome!

Samuel Culpepper
@qzdl
Feb 22 2018 19:02
have you got sass-loader installed
NikolaNbgd
@NikolaNbgd
Feb 22 2018 19:09
@qzdl yes, I am
@qzdl All needed loaders have been installed
Samuel Culpepper
@qzdl
Feb 22 2018 19:09
can you link me to your repo
i’ll take a look
NikolaNbgd
@NikolaNbgd
Feb 22 2018 19:11
Actually, this is my private project, I can't push it to the git :/ can we figure out some another solution?
I can write you exactly what I did so far
Samuel Culpepper
@qzdl
Feb 22 2018 19:12
pm me the details if you want
kennethkovacs
@kennethkovacs
Feb 22 2018 20:49
Why is the map method in freecodecamp not have this arrow '=>' like in other sources I have seen online?
Aditya
@ezioda004
Feb 22 2018 20:51
@kennethkovacs Current map is quite old, I believe they have ES6 section in beta, it'll be updated soon.
kennethkovacs
@kennethkovacs
Feb 22 2018 20:52
@ezioda004 So should I be using ES6?
Aditya
@ezioda004
Feb 22 2018 20:53
If you know it, I dont see a reason why you shouldnt.
Gulsvi
@gulsvi
Feb 22 2018 20:53
@kennethkovacs Arrow function expressions are used in a newer version of JavaScript than what is taught at Free Code Camp currently. You can still use it and pass the coding tests just the same if you prefer.
kennethkovacs
@kennethkovacs
Feb 22 2018 20:53
@ezioda004 @gulsvi Okay that makes sense. Thank you very much :)
CamperBot
@camperbot
Feb 22 2018 20:53
kennethkovacs sends brownie points to @ezioda004 and @gulsvi :sparkles: :thumbsup: :sparkles:
:cookie: 472 | @ezioda004 |http://www.freecodecamp.org/ezioda004
:star2: 2617 | @gulsvi |http://www.freecodecamp.org/gulsvi
Seth
@sethdcd
Feb 22 2018 21:29

hi all! trying to create a small little app and running into some issues. i'm trying to build this off an MVC model so if you need more of the code let me know. here is the snippet that is bugging out.

var adminView = {
    init: function() {
        this.adminBtn = document.querySelector('#adminBtn');
        this.adminArea = document.querySelector('#adminArea');
        this.changeName = document.querySelector('#adminName');
        this.changeImage = document.querySelector('#adminImg');
        this.changeClick = document.querySelector('#adminClick');

        this.render();
    },

    render: function() {
        this.adminBtn.addEventListener('click', (function() {
            if (this.adminArea.classList.contains('hideMe')) {
                this.adminArea.classList.remove('hideMe');
            }
        });
    }
};

and the error I get is Uncaught TypeError: Cannot read property 'classList' of undefined

for this line if (this.adminArea.classList.contains('hideMe')) {
Gulsvi
@gulsvi
Feb 22 2018 21:34
@sethdcd You're missing a parenthesis on the third to last line.
var adminView = {
  init: function() {
    this.adminBtn = document.querySelector("#adminBtn");
    this.adminArea = document.querySelector("#adminArea");
    this.changeName = document.querySelector("#adminName");
    this.changeImage = document.querySelector("#adminImg");
    this.changeClick = document.querySelector("#adminClick");

    this.render();
  },

  render: function() {
    this.adminBtn.addEventListener("click", function() {
      if (this.adminArea.classList.contains("hideMe")) {
        this.adminArea.classList.remove("hideMe");
      }
    });
  }
};
To debug it, what do you get when you do console.log(this.adminArea)
Seth
@sethdcd
Feb 22 2018 21:38
hi @gulsvi you mean for the IIFY? i forgot i tried putting that in but it actually doesnt do what i need
Gulsvi
@gulsvi
Feb 22 2018 21:38
IIFE :) yes
Seth
@sethdcd
Feb 22 2018 21:38
here is the og code
var adminView = {
    init: function() {
        this.adminBtn = document.querySelector('#adminBtn');
        this.adminArea = document.querySelector('#adminArea');
        this.changeName = document.querySelector('#adminName');
        this.changeImage = document.querySelector('#adminImg');
        this.changeClick = document.querySelector('#adminClick');

        this.render();
    },

    render: function() {
        this.adminBtn.addEventListener('click', function() {
            if (this.adminArea.classList.contains('hideMe')) {
                this.adminArea.classList.remove('hideMe');
            }
        });
    }
};
IIFE..right that's what i meant :)
here is the error i get when i click on the button though
app1.js:73 Uncaught TypeError: Cannot read property 'classList' of undefined
at HTMLButtonElement.<anonymous> (app1.js:73)
Gulsvi
@gulsvi
Feb 22 2018 21:39
It's telling you that this.adminArea doesn't refer to anything in the DOM
Without more code, I can't really provide more guidance, other than to console.log this and this.adminArea to see what you get
Seth
@sethdcd
Feb 22 2018 21:40
oh weird, i have an id hooked up to a form element for that
Gulsvi
@gulsvi
Feb 22 2018 21:40
try to find out why there is no classList associated with adminArea
Seth
@sethdcd
Feb 22 2018 21:40
        <form id='adminArea' class='hideMe'>
            <label>Name</label>
            <input type='text' id='adminName'>
            <label>ImageURL</label>
            <input type='text' id='adminImg'>
            <label>Clicks</label>
            <input type='number' id='adminClick'>
            <input type='submit' value='Save'>
            <input type='button' value='Cancel'>
        </form>
should i have the id being a parent element and search for the class within the form?
Gulsvi
@gulsvi
Feb 22 2018 21:41
wouldn't it just be:
            if (adminArea.classList.contains('hideMe')) {
                adminArea.classList.remove('hideMe');
            }
Seth
@sethdcd
Feb 22 2018 21:42
boom
worked lol
Gulsvi
@gulsvi
Feb 22 2018 21:42
awesome :)
Seth
@sethdcd
Feb 22 2018 21:42
thanks @gulsvi
CamperBot
@camperbot
Feb 22 2018 21:42
sethdcd sends brownie points to @gulsvi :sparkles: :thumbsup: :sparkles:
:star2: 2618 | @gulsvi |http://www.freecodecamp.org/gulsvi
Seth
@sethdcd
Feb 22 2018 21:42
i need to learn this a bit better
Gulsvi
@gulsvi
Feb 22 2018 21:42
I try to avoid it, but not sure if that's a good practice
Seth
@sethdcd
Feb 22 2018 21:43
i'm following along in a guided lesson and i dont really understand why we do this. in front of the variable
i think it's so it just calls those once instead of over and over
Gulsvi
@gulsvi
Feb 22 2018 21:43
sometimes it's really useful, but can get confusing, espeically with _that = this
Seth
@sethdcd
Feb 22 2018 21:44
yeah for sure
one thought for why it might not work is because maybe when i use this.adminArea that was just one instance of it, but i'm kinda calling it multiple times with the button so maybe that's why i have to remove it
who knows, i'll keep digging into it, either way thanks!
Gulsvi
@gulsvi
Feb 22 2018 21:46
The second this was referring to this.adminBtn.adminArea
(which doesn't exist)
Seth
@sethdcd
Feb 22 2018 21:55
oh gotcha
Muhammad Osman A.J.
@moajday
Feb 22 2018 22:00
I request some constructive feedback and love for my second front-end (portfolio) project. Thank you very much for your time. https://codepen.io/ajbozdar/details/WwZMoO
Tom
@moT01
Feb 22 2018 22:12
@ajbozdar looks real good
there's some details i could pick apart - but overall its pretty good - especially for your second project
Igor Amidzic
@igoramidzic
Feb 22 2018 22:17
Does anyone know how to remove the spacing created from large words that move to the next line?
https://codepen.io/amidzicigor/pen/mXjyzj
Muhammad Osman A.J.
@moajday
Feb 22 2018 22:19
@moT01 I would like to know more. :smile: please do not hesitate.
Gulsvi
@gulsvi
Feb 22 2018 22:22
@igoramidzic You are doing it correctly - max-width
Igor Amidzic
@igoramidzic
Feb 22 2018 22:23
@gulsvi But there is a space
I'm asking how to get rid of it
Gulsvi
@gulsvi
Feb 22 2018 22:23
@igoramidzic Use a smaller max-width setting
You can use em units to ensure the setting scales according to font size
.message-content {
  padding: 10px;
  max-width: 5.2em;
  background-color: skyblue;
}
Muhammad Osman A.J.
@moajday
Feb 22 2018 22:24
@igoramidzic reduce max-width and you are all set. Have you checked with margin instead of padding?
Igor Amidzic
@igoramidzic
Feb 22 2018 22:25
Changing max-width will only accommodate the current selection of words
Muhammad Osman A.J.
@moajday
Feb 22 2018 22:25
@igoramidzic go with margin instead of padding.
Thhe
Igor Amidzic
@igoramidzic
Feb 22 2018 22:26
@ajbozdar Show me?
Muhammad Osman A.J.
@moajday
Feb 22 2018 22:26
Then what do you exactly want?
Igor Amidzic
@igoramidzic
Feb 22 2018 22:27
The word How'ree is pushed to the next line because its too big to fit in the 130px, but it leaves the spacing behind
So there is like 20 pixels of empty space to the left of the words
@ajbozdar
Gulsvi
@gulsvi
Feb 22 2018 22:28
@igoramidzic It sounds like you want the box to always shrink to the smallest possible size based on the contents - but that isn't possible without some JavaScript
Igor Amidzic
@igoramidzic
Feb 22 2018 22:28
@gulsvi Rip
Gulsvi
@gulsvi
Feb 22 2018 22:28
You can make it an inline-block or display: table, that might help
Muhammad Osman A.J.
@moajday
Feb 22 2018 22:28
I can see.
Gulsvi
@gulsvi
Feb 22 2018 22:28
but it won't be perfect...
Igor Amidzic
@igoramidzic
Feb 22 2018 22:29
@gulsvi display: inline-block does nothing, its essentially an inline block element with the max-width setting already
Gulsvi
@gulsvi
Feb 22 2018 22:29
.message-content {
  display: inline-block;
  background-color: skyblue;
}
Igor Amidzic
@igoramidzic
Feb 22 2018 22:29
This message was deleted
Gulsvi
@gulsvi
Feb 22 2018 22:29
notice the difference
Igor Amidzic
@igoramidzic
Feb 22 2018 22:30
@gulsvi There's literally no difference
Gulsvi
@gulsvi
Feb 22 2018 22:32
image.png
@igoramidzic it certainly is different
Igor Amidzic
@igoramidzic
Feb 22 2018 22:32
Send the link
Gulsvi
@gulsvi
Feb 22 2018 22:32
div is a block element by default. when you set it to display inline-block, it no longer has a width as it's acting like an inline element
Muhammad Osman A.J.
@moajday
Feb 22 2018 22:33
You also do not want to break the text <br> right?
Igor Amidzic
@igoramidzic
Feb 22 2018 22:33
Send link pls
Gulsvi
@gulsvi
Feb 22 2018 22:33
It's your pen link
Igor Amidzic
@igoramidzic
Feb 22 2018 22:33
Yes, but you made changes
@gulsvi
Gulsvi
@gulsvi
Feb 22 2018 22:33
I just added the CSS I gave you above and assigned it a different class name
Igor Amidzic
@igoramidzic
Feb 22 2018 22:33
@gulsvi I'm asking for the link because its not working when I add inline-block
Gulsvi
@gulsvi
Feb 22 2018 22:34

html:

<div class="message-content-inline">Hello, there! How'ree ya?</div>
<div class="message-content">Hello, there! How'ree ya?</div>

CSS:

.message-content-inline {
  display: inline-block;
  background-color: skyblue;
}

.message-content {
  padding: 10px;
  max-width: 5.2em;
  background-color: skyblue;
}
Igor Amidzic
@igoramidzic
Feb 22 2018 22:34
@ajbozdar and no I can't add <br> because the text is random
@gulsvi Can you send the link pls, its not working on mine
Gulsvi
@gulsvi
Feb 22 2018 22:37
Send me the link to the one that isn't working
If you edit it, you have to save it and send me the updated link
Gulsvi
@gulsvi
Feb 22 2018 22:37
Now compare it to what you have before
You will see it is different
Igor Amidzic
@igoramidzic
Feb 22 2018 22:38
Its the same
That's why I am asking for the link homie
Gulsvi
@gulsvi
Feb 22 2018 22:38
add it to your pen
I gave you the code above
You will see two boxes that behave differently
one is a block element, the other is an inline-block
Igor Amidzic
@igoramidzic
Feb 22 2018 22:39
The display of the element doesn't matter since there is a max-width
Your fix was to use em instead of px
and it works, I will use that
Thank you
This message was deleted
Gulsvi
@gulsvi
Feb 22 2018 22:41
@igoramidzic max-width has no effect on inline elements, so that's another option: display: inline
Igor Amidzic
@igoramidzic
Feb 22 2018 22:41
@gulsvi No its not because I want max width or it will go off of the screen
Gulsvi
@gulsvi
Feb 22 2018 22:42
Right, so you put it inside an element with a max width
Anyway, good luck with your project...
Kaz Baig
@kbaig
Feb 22 2018 22:42
Anyone used react-transition-group?
Igor Amidzic
@igoramidzic
Feb 22 2018 22:43
Screenshot_20180222-165850.png
@gulsvi
Thanks, this is what I'm trying to make
Kaz Baig
@kbaig
Feb 22 2018 22:44
Or alternatively, has anyone here done React mounting/dismounting animations?
Igor Amidzic
@igoramidzic
Feb 22 2018 22:47
@gulsvi Your em fix doesn't work btw :P you just chose 5.2 and it doesn't work for other text, but thanks for trying! I've been looking for hours for a solution, rip
CamperBot
@camperbot
Feb 22 2018 22:47
igoramidzic sends brownie points to @gulsvi :sparkles: :thumbsup: :sparkles:
:star2: 2619 | @gulsvi |http://www.freecodecamp.org/gulsvi
Gulsvi
@gulsvi
Feb 22 2018 22:48
@igoramidzic I think you misunderstand what I meant by using em units. I've told you from the start that you cannot do what you want in all cases without javascript.
em units will scale based on your font size, so it may help you more closely approximate what you want to do.
I will repeat though - You cannot do what you want without javascript, you can only cobble a partial solution with HTML/CSS
Igor Amidzic
@igoramidzic
Feb 22 2018 22:49
@gulsvi Oh sorry, you said you had a solution so I thought you were saying you fixed it, misunderstanding my bad
Yeah I'll look into js then
Gulsvi
@gulsvi
Feb 22 2018 22:50
This is about the best you can do: https://s.codepen.io/anon/pen/eVjNWR, but it won't work for all text sizes/lengths
And requires a hacky border to get rid of inline spacing
Igor Amidzic
@igoramidzic
Feb 22 2018 22:50
Yeah its a chat app so I can't account for all possible combinations of words lol
Tom
@moT01
Feb 22 2018 23:11
@ajbozdar okay...
whats the point of the picture in the nav bar - cant even see it
maybe a logo placeholder
the spacing on the first section looks uneven - see more space at the bottom - little goofy
the buttons at the bottom are touching the footer
cant see the title of the first section on a small screen
the html could be better formatted
Tom
@moT01
Feb 22 2018 23:16
there's a little drop down arrow by each section in codepen - with an analyze option - click that, shows some errors
some can be ignored - some are things that could be fixed
Muhammad Osman A.J.
@moajday
Feb 22 2018 23:27
@moT01 Your valuable feedback will help me become a better developer. I'll return with improvements. I am not sure if million thanks would be enough for the time you have taken to see my work.
CamperBot
@camperbot
Feb 22 2018 23:27
ajbozdar sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:star2: 1019 | @mot01 |http://www.freecodecamp.org/mot01
Alexander R Bott
@Abott1222
Feb 22 2018 23:43
troll
CamperBot
@camperbot
Feb 22 2018 23:43
:trollface: troll problems? notify admins here