These are chat archives for FreeCodeCamp/HelpJavaScript

16th
Mar 2018
Quantomistro3178
@Quantomistro3178
Mar 16 2018 02:05
var x = function bar(){
    // ..
};
Could someone explain this type of function definition?
Greg Duncan
@GregatGit
Mar 16 2018 02:14
@Quantomistro3178 x is a variable that contains a function

@Quantomistro3178

var x = function(name){
  return name
}
var me = x('me')
var you = x('you')
console.log(me + ' and ' + you)

play around with simple function and try to predict the result

Quantomistro3178
@Quantomistro3178
Mar 16 2018 04:02
@GregatGit Thanks!
CamperBot
@camperbot
Mar 16 2018 04:02
quantomistro3178 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 899 | @gregatgit |http://www.freecodecamp.org/gregatgit
aRtoo
@artoodeeto
Mar 16 2018 04:18

hey guys need help about centering and keep on the same spot.

the refresh button wont stay in the middle of the line. i know i should use the transform: translate thanks heres the pen https://codepen.io/artoo/pen/BrjYrp

nevermind i got it guys
aRtoo
@artoodeeto
Mar 16 2018 04:36
i didnt got it guys. lols. still open for suggestions.
aRtoo
@artoodeeto
Mar 16 2018 04:59
nevermind guys i think i got it. lols
jane
@632251707
Mar 16 2018 06:55
5555
wangzhizheng
@asuka-wzz
Mar 16 2018 07:11
Adding a default option in Switch statements
这个网站有答案没
walden1993
@walden1993
Mar 16 2018 07:47
有没有大神告诉我一下302那个是怎么做的Exact Change这个提
有点看不懂题目
打错了。是303
Henry
@GitHub-Henry
Mar 16 2018 08:43
Tess0704
@Tess0704
Mar 16 2018 09:53
a bit sad today, have finished the front-end part in fcc two months ago, and been applying for a web developer job(junior/intern) for almost two months, got totally no response
anyone who can share experience about how to get a first job as web developer , I.m losing confidence day by day now
Fabien SHAN
@X140hu4
Mar 16 2018 09:57
@Tess0704 Where are you applying from and for?
@Tess0704 Your github does not look very active. Do you have a portfolio?
Tess0704
@Tess0704
Mar 16 2018 10:01
I am in australia now so basically I apply for junior web developer but I don't have a portfolio
Markus Kiili
@Masd925
Mar 16 2018 10:03
@Tess0704 I got my first job with no portfolio, but I had some education to show.
Fabien SHAN
@X140hu4
Mar 16 2018 10:04
@Tess0704 Have you tried networking too? going to meetups for example
Tess0704
@Tess0704
Mar 16 2018 10:05
yeah I've tried once ,send my resume to a senior developer ,but got no response as well
Markus Kiili
@Masd925
Mar 16 2018 10:06
@Tess0704 So if you have a degree or a portfolio, you can apply for junior jobs. If you have neither, you will rarely get responses or interviews.
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 10:07
@Masd925 do you have some degree related to programming?
Fabien SHAN
@X140hu4
Mar 16 2018 10:08
@Tess0704 Can you show us your resume?
Tess0704
@Tess0704
Mar 16 2018 10:08
is it ok if I post my resume here?
Markus Kiili
@Masd925
Mar 16 2018 10:08
@tiagocorreiaalmeida I have a masters degree on physics and bachelor in business-ICT (mostly software development).
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 10:09
nice :) didnt knew tbh, how old are you?
Markus Kiili
@Masd925
Mar 16 2018 10:10
@tiagocorreiaalmeida 44
@Tess0704 You can post it here if you like.
Tess0704
@Tess0704
Mar 16 2018 10:11

EDUCATION

Duration:10, August.2008-20, June. 2012
School: Zhejiang University (top 5 in China)
Major: Electronic & Information Technology and Instrument
Relevant courses and score:(GPA:3.56/4)
Fundamentals Of Computer Science and Technology 86/100, Linear Algebra 92/100,Sensor Technology 92/100; Weak signal Detection 97/100; Principle of Automatic Control 92/100; Principles of Database Systems 90/100; Principle & Applications of Microcomputer 89/100; etc.

Relevant projects
Finished all the tests and develop projects in freecodecamp(the front end part) and built an online shop using angular4.
my code pen profile: https://codepen.io/haishi0704/,
my github profile: https://github.com/Tess0704?tab=repositories

SKILL SUMMARY
Technical
¡¤ HTML
¡¤ CSS
¡¤ JAVASCRIPT
¡¤ JQUERY
¡¤ BOOTSTRAP
¡¤ Angular4,React
¡¤ C Programming
¡¤ Mysql database
Still learning:
¡¤ Data Visualization(D3), Node.js
Non-Technical
¡¤ able to learn fast and learn in deep
¡¤ attention to details, well organized, patient and a good team member
¡¤ Problem Solving Skills
¡¤ reliability, honesty and dedication
¡¤ good communication skills

Referees
Google Software Engineer
Xia Li
This is my resume ,a bit long ,not sure wether there's anything wrong

Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 10:11
did you always had jobs related to coding/ it?
im slowly starting to get motivated to take a "step back" in my life and go take a degree
Fabien SHAN
@X140hu4
Mar 16 2018 10:12
@Tess0704 hmm a link to a file would have been fine ^^;
Markus Kiili
@Masd925
Mar 16 2018 10:12
@tiagocorreiaalmeida I changed to IT sector 4 years ago.
Tess0704
@Tess0704
Mar 16 2018 10:13
@X140hu4 lol never mind
Fabien SHAN
@X140hu4
Mar 16 2018 10:13
@Tess0704 What about the Zhejiang community in Brisbane? Maybe some are looking for people to make them websites
@Tess0704 You say you completed projects, do you have links to these projects to show?
Tess0704
@Tess0704
Mar 16 2018 10:16
yeah there are all on my codepen profile I have listed the link in my resume
they are
Markus Kiili
@Masd925
Mar 16 2018 10:17
@Tess0704 Your tribute page seems to be a copy of the model page? Idea of the project is not to copy the code.
Tess0704
@Tess0704
Mar 16 2018 10:20
I did exactly the same style& content as the model page, but I didn't copy the code
Markus Kiili
@Masd925
Mar 16 2018 10:22
@Tess0704 ok. You should at least change the content to something else.
Tess0704
@Tess0704
Mar 16 2018 10:25
I thought I need to finish the project exactly as the model ones, so I may change some images or words inside
need to change
Markus Kiili
@Masd925
Mar 16 2018 10:26
@Tess0704 The idea is to make a tribute page for some person you like with same functionality as the model page.
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 10:26
@Masd925 are you into codefights?if you are not really busy at the moment
Markus Kiili
@Masd925
Mar 16 2018 10:27
@tiagocorreiaalmeida I have only done some codewars.
Tess0704
@Tess0704
Mar 16 2018 10:27
I may do this for Hawking then
Markus Kiili
@Masd925
Mar 16 2018 10:29
@tiagocorreiaalmeida There is always time for some nice problems.
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 10:29
I was thinking about a 10min tournament? and invite some more people
Fabien SHAN
@X140hu4
Mar 16 2018 10:30
@Tess0704 What is your current visa situation?
Tess0704
@Tess0704
Mar 16 2018 10:49
pr visa
Fabien SHAN
@X140hu4
Mar 16 2018 10:57
permanent resident?
Tess0704
@Tess0704
Mar 16 2018 10:58
yes ,exactly
Fabien SHAN
@X140hu4
Mar 16 2018 11:03
What have you done from June 2012 to now? I cant see anything from what you posted earlier
Tess0704
@Tess0704
Mar 16 2018 11:05
I was working as a clinical engineer during 2012-may,2017
Stephen James
@sjames1958gm
Mar 16 2018 11:09
@Tess0704 Maybe you could leverage that experience and create a web page/app for that job?
That might be more impactful that the typical tutorial apps you see (todo, weather, etc)
Tess0704
@Tess0704
Mar 16 2018 11:12
Fabien SHAN
@X140hu4
Mar 16 2018 11:13
@Tess0704 If asked, would you be able to build that page without bootstrap but only pure css?
Tess0704
@Tess0704
Mar 16 2018 11:13
@sjames1958gm yeah maybe you're right , I will try to create a web page
@X140hu4 not actually sure, cuz bootstrap is really easy to use
Zulfan Hameed
@zlfnhmd
Mar 16 2018 11:19
how detect if an element is visible in the viewport
how can i*
Ken Haduch
@khaduch
Mar 16 2018 13:48
@zlfnhmd - are you using jquery or vanilla js - you can google for that - a couple results, for vanilla JS - https://gomakethings.com/how-to-test-if-an-element-is-in-the-viewport-with-vanilla-javascript/ and for jquery here is one: https://medium.com/talk-like/detecting-if-an-element-is-in-the-viewport-jquery-a6a4405a3ea2
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 14:14
@sjames1958gm you were the onyl one joining :(
Stephen James
@sjames1958gm
Mar 16 2018 14:14
@tiagocorreiaalmeida Not my fault :(
First time for me - that is kind of stressful
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 14:15
yeah i9ndeed now that I look at your last solution I was drunk for sure
ahahha
and same one the second one
Stephen James
@sjames1958gm
Mar 16 2018 14:17
@tiagocorreiaalmeida your first one is better, I got stuck a little on that one
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 14:18
yeah but the last one .... :D
and the second one aswell ahaha the time pressure doesnt help
Stephen James
@sjames1958gm
Mar 16 2018 14:18
@tiagocorreiaalmeida When in array => out array I think map immediately
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 14:18
I didnt even touyght about storing the previous value at that moment
really bad one :D
if you are interested in a new round https://codefights.com/tournaments/4TmZcHZrjosxkb5jn :D lets hope more people join
Stephen James
@sjames1958gm
Mar 16 2018 14:20
@tiagocorreiaalmeida Ok back to work for me. l8ter
Sorry but that was my break
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 14:20
no worries was fun :D
Jason Luboff
@JLuboff
Mar 16 2018 15:14
:wave:
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 15:32
hey there @JLuboff
Jason Luboff
@JLuboff
Mar 16 2018 15:32
What up
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 15:33
nothing special just the usual of a friday day how about you?
Jason Luboff
@JLuboff
Mar 16 2018 15:33
Just starting the day
mikirob
@mikirob
Mar 16 2018 15:43
hae guys
need some help
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 15:58
@mikirob just ask
Jason Luboff
@JLuboff
Mar 16 2018 16:11
@tiagocorreiaalmeida Did you get your toggl clone going?
jusgoose
@gusd773
Mar 16 2018 16:14
can somebody tell me why my text won't show up? I am trying to create multiple sections to scroll down through on my page
<!DOCTYPE html>

<html>
<head>
<title> JUSGOOSE </title>
    <link href="style.css" rel="stylesheet" type= "text/css">
    <script src="jusgoose.js"> </script>

</head>


<body>
    <header>
        <div class= "row">
            <div class= "logo">
                <img src="@JUSGOOSE.jpg">

                <ul class="main-nav">
                    <li class="active"><a href="">HOME</a></li>
                    <li><a href="">MUSIC</a></li>
                    <li><a href="">ABOUT</a></li>
                    <li><a href="">NEWS</a></li>
                    <li><a href="">CONTACT</a></li>
                </ul>
            </div>


    </section>
        <div class="mainText">
            <h1>  jusgoose </h1>
        </div>
        <div  class="container">
        <p align="justify">
            a











            ssssssssssssssssssssssssssss
            S
            A
            A
            A
            A
            A
            AA
            A
            A
            A
            A
            A
            A
            A
            A
            A
            AA
            A
            A
        </p>        

                <p align="justify">
            a










            ssssssssssssssssssssssssssss
            S
            A
            A
            A
            A
            A
            AA
            A
            A
            A
            A
            A
            A
            A
            A
            A
            AA
            A
            A
        </p>        

    </div>

    </header>
    </div>        
    <section class="parallax">
        <div class="parallaxInner"></div>


<a href="javascript:void(0)" title="Go To Top" id="scroll" style="display:none;">
    <span></span>
</a>

</body>
</html>
Jason Luboff
@JLuboff
Mar 16 2018 16:16
I just threw that into codepen and the text shows fine, given I have no image.
jusgoose
@gusd773
Mar 16 2018 16:17
@JLuboff it won't load when I refresh my browser :(
Jason Luboff
@JLuboff
Mar 16 2018 16:17
Is the text supposed to be on top of the image?
jusgoose
@gusd773
Mar 16 2018 16:18
nope should be underneath the main text
blob
Jason Luboff
@JLuboff
Mar 16 2018 16:20
I don't necessarily see an issue in the code provided. Perhaps someone else will though
jusgoose
@gusd773
Mar 16 2018 16:24
lmao it was hidden underneath the border of the "JUSGOOSE" @JLuboff
Jason Luboff
@JLuboff
Mar 16 2018 16:28
Cool
jusgoose
@gusd773
Mar 16 2018 16:32
@JLuboff I'm trying to get a grasp on how to divide my page into sections any tips? (I was thinking divs but I can't seem to google the right questions)
Jason Luboff
@JLuboff
Mar 16 2018 16:33
I typically just use a CSS framework like Bootstrap or Bulma which have built in Sections and/or Hero sections which makes it easy. I'm kind of lazy when it comes to CSS
jusgoose
@gusd773
Mar 16 2018 16:37
@JLuboff I'm sure I'll get more in tune with frameworks soon but I can barely even call on apis lol
Jason Luboff
@JLuboff
Mar 16 2018 16:38
Bootstrap and Bulma make things very easy. FCC taught a bit of bootstrap so you should already have a bit of a foundation
Blauelf
@Blauelf
Mar 16 2018 16:46
Bulma? Like Vegeta? Interesting name.
Jason Luboff
@JLuboff
Mar 16 2018 16:47
@Blauelf :joy: Not sure where they got the name from but yes, everytime I think of it, I think of Dragon Ball
Matej Bošnjak
@mbosnjak01
Mar 16 2018 16:47
what about Trunks? ... Trunks JS - new framework
Jason Luboff
@JLuboff
Mar 16 2018 16:48
Although...never watch dragon ball. Only watched DBZ, DB GT, and now Super
Blauelf
@Blauelf
Mar 16 2018 16:48
Maybe there even is a "Bra"?
Matej Bošnjak
@mbosnjak01
Mar 16 2018 16:48
what the hell it exists
Jason Luboff
@JLuboff
Mar 16 2018 16:49
:joy:
Matej Bošnjak
@mbosnjak01
Mar 16 2018 16:50
looks like it's just some design ... :(
not the actuall js lib .. shame
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 17:06
@JLuboff still not sure what im gonna build, a bit confused I would say im also interested in doing the fcc rouge game,
Jason Luboff
@JLuboff
Mar 16 2018 17:08
@tiagocorreiaalmeida I got you. You work in IT right now right? Have you thought about trying to do something for your work?
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 17:10
@JLuboff yes indeed, and I aslo tried to pick some idea but we use an erp i nother words a company management software and we handle alot of what the company needs there so I can't get an idea
Jason Luboff
@JLuboff
Mar 16 2018 17:11
Ah
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 17:12
and well software language is foxpro
the*
Markus Kiili
@Masd925
Mar 16 2018 18:11
Good evening.
Jason Luboff
@JLuboff
Mar 16 2018 18:11
Hello
Christopher McCormack
@cmccormack
Mar 16 2018 18:17
:wave:
Jason Luboff
@JLuboff
Mar 16 2018 18:17
What up
Christopher McCormack
@cmccormack
Mar 16 2018 18:21
Same old, you?
Jason Luboff
@JLuboff
Mar 16 2018 18:21
Just staying busy. It's friday which is nice
Kaz Baig
@kbaig
Mar 16 2018 18:21
Happy friday
Christopher McCormack
@cmccormack
Mar 16 2018 18:22
Yeah love fridays. Less meetings, more nose to the grindstone or whatever the saying is
Kaz Baig
@kbaig
Mar 16 2018 18:22
I reaaaaally need this week to end
Christopher McCormack
@cmccormack
Mar 16 2018 18:22
@kbaig :wave:
Kaz Baig
@kbaig
Mar 16 2018 18:22
It's my first weekend not travelling in a while, so finally get to relax and play fortnite :)
Jason Luboff
@JLuboff
Mar 16 2018 18:23
Psh. Welcome to adultlife, there is no time for video games :P
Kaz Baig
@kbaig
Mar 16 2018 18:23
Single and living in a small town with no friends - plenty of time for video games!
Jason Luboff
@JLuboff
Mar 16 2018 18:24
I thought you had a lady friend
Kaz Baig
@kbaig
Mar 16 2018 18:24
Ah yes I meant in terms of marital status (and she also lives 3 hours away, hence the frequent travelling)
Markus Kiili
@Masd925
Mar 16 2018 18:24
I also stopped playing games when my lover split in two.
Jason Luboff
@JLuboff
Mar 16 2018 18:25
Lady friend's don't like hearing their boyfriends say they're single ;)
Kaz Baig
@kbaig
Mar 16 2018 18:25
pff
Jason Luboff
@JLuboff
Mar 16 2018 18:26
Thats how boyfriends become single haha
Markus Kiili
@Masd925
Mar 16 2018 18:34
@JLuboff Losing games was not a big deal, but having to destroy my extensive magazine collection was heart breaking.
Jason Luboff
@JLuboff
Mar 16 2018 18:35
@Masd925 What kind of magazines?
Markus Kiili
@Masd925
Mar 16 2018 18:36
@JLuboff Is that a rhetorical question ;)
Jason Luboff
@JLuboff
Mar 16 2018 18:36
...ah...
Kaz Baig
@kbaig
Mar 16 2018 18:53
Oh dear
Jason Luboff
@JLuboff
Mar 16 2018 19:08
Interesting form submisson tidbit I just learned. If you have a form that you need submitted via normal http method (i.e for me I have a file upload) that preventDefault() is not an option and you dont want the page to refresh/redirect.. have the server send back status code 204.
Conor Murphy
@cmurphy580
Mar 16 2018 19:40

I'm trying to do a transition on height with this line of code:

        wrap.style.backgroundAttachment = 'fixed';

it work in a js fiddle-type environment, but not in the project i'm working on. Any ideas on what is going on here?

Kaz Baig
@kbaig
Mar 16 2018 19:40

@JLuboff from MDN

The HTTP 204 No Content success status response code indicates that the request has succeeded, but that the client doesn't need to go away from its current page

Nice
Conor Murphy
@cmurphy580
Mar 16 2018 19:42
wrong line of code:
        wrap.style.transition = 'width 0.5s cubic-bezier(0.4, 0.0, 0.2, 1), height 1s cubic-bezier(0.4, 0.0, 0.2, 1)';
Christopher McCormack
@cmccormack
Mar 16 2018 19:58
@JLuboff that is cool. Why is preventDefault not an option?
Jason Luboff
@JLuboff
Mar 16 2018 20:21
@cmccormack If my understanding is right (which it may not be..) when you use preventDefault you still need to then send the form as preventDefaultstops the event from triggering. So you then would need to use ajax fetch what have you. Well..I wasn't having a fun time trying to get ajax to work with multer (which is used for file uploading)
Christopher McCormack
@cmccormack
Mar 16 2018 20:22
@JLuboff ah gotcha
Jason Luboff
@JLuboff
Mar 16 2018 20:22
I could get my req.body but req.file was coming in undefined
So this worked perfectly!
Kaz Baig
@kbaig
Mar 16 2018 20:23
@JLuboff so if you send the status as 204 back in the response along with whatever you want in the body, the page won't reload?
Jason Luboff
@JLuboff
Mar 16 2018 20:24
@kbaig In my case, I'm not sending back any data, just the status, and ya does not reload/redirect (nor does it act like the page is still loading or awaiting server response)
Tiago Correia
@tiagocorreiaalmeida
Mar 16 2018 20:30
@alpox around?
Christopher McCormack
@cmccormack
Mar 16 2018 20:32
How would you do something with the server response in that case?
other than the browser reading the status info
( Assuming you wanted to )
Jason Luboff
@JLuboff
Mar 16 2018 20:34
@cmccormack What do you mean? Like showing a notification or something on the frontend?
Christopher McCormack
@cmccormack
Mar 16 2018 20:35
yeah like how would the frontend know to expect something if you submitted it via a form
Jason Luboff
@JLuboff
Mar 16 2018 20:36
Mmmm...not sure actually. Wasn't really ocncerned about that lol. Probably should figure out a way to show a notification that their update has been saved
Christopher McCormack
@cmccormack
Mar 16 2018 20:37
:nose:
you could probably still handle your form submission and call the api to see if the file was uploaded
but personally I would try to make multer and fetch work :)
Jason Luboff
@JLuboff
Mar 16 2018 20:38
Looks like you can't directly unless using ajax, etc
I think the simpliest method for my case is to show a notification right away and only redirect if an error occurs.. but..hmm
Christopher McCormack
@cmccormack
Mar 16 2018 20:41
my thoughts are - unless you page is extremely static, you'll probably want to add functionality down the line so better to make your submissions dynamic and easy to modify
The only places I use forms without preventDefault are on my Contact Me page and a wedding site I made to do RSVP submission. Those will never change
Jason Luboff
@JLuboff
Mar 16 2018 20:41
It will remain fairly static
Christopher McCormack
@cmccormack
Mar 16 2018 20:42
Static in that you won't want to add any functionality in the future?
Jason Luboff
@JLuboff
Mar 16 2018 20:45
It'll be minimal if any
More so maybe adding a field or removing a field
Christopher McCormack
@cmccormack
Mar 16 2018 20:45
That's good, less support requirements on your end at least :)
Jason Luboff
@JLuboff
Mar 16 2018 20:47
The changes in the future will probably be more "OH! I learned something new, let me implement it here!"
Christopher McCormack
@cmccormack
Mar 16 2018 20:50
haha dangerous
Jason Luboff
@JLuboff
Mar 16 2018 20:53
:D
I hate having to install old software :(
Christopher McCormack
@cmccormack
Mar 16 2018 20:55
Would you like it more if it were new? haha I hate installing anything
Jason Luboff
@JLuboff
Mar 16 2018 20:56
Well..when building up a new computer for an employee it sucks having to try and get a 10+ year old piece of software to work
Christopher McCormack
@cmccormack
Mar 16 2018 20:57
is it even possible? Can you put it in a VM instead?
eh I guess 10 years isn't that old
I think 10 years I think 90s for some reason but damn time flies by
Jason Luboff
@JLuboff
Mar 16 2018 20:58
Ya it's possible, if anything you run via compatability mode but it's just the company really isn't around any more so you have to try and email the owner who may or may not respond in a responsible time..
VM would be an inconvience lol
HOLY SHIT!!! ahahahahaha got it working. Copied the existing Program Files from the users current computer and it worked :joy:
Christopher McCormack
@cmccormack
Mar 16 2018 21:01
Boom
haha that's great
Jason Luboff
@JLuboff
Mar 16 2018 21:02
It's so rare for that to work that when it does it's amazing
in OSX (at least 10.7 and below...thats the last version I really worked with) you could drag and drop most applications and have them work without an installer
Christopher McCormack
@cmccormack
Mar 16 2018 21:04
Yeah I think it's all bundled in the .app right?
Jason Luboff
@JLuboff
Mar 16 2018 21:04
Something like that
Christopher McCormack
@cmccormack
Mar 16 2018 21:04
I really like that style
Jason Luboff
@JLuboff
Mar 16 2018 21:05
I used to know a ton about OS X..but haven't worked with it for over 4 years now so my knowledge is lacking
Christopher McCormack
@cmccormack
Mar 16 2018 21:05
except occasionally when you need to edit a config within the .app
I think a lot of it is the same
Jason Luboff
@JLuboff
Mar 16 2018 21:06
Ya I'm sure it is, more so just forgot
Christopher McCormack
@cmccormack
Mar 16 2018 21:07
Get your work to get you a new mac :)
Jason Luboff
@JLuboff
Mar 16 2018 21:10
I wish :D We're a Windows only enviornment. Although.. I could probably convince my head boss since he is an apple fan
Maybe at the point where I need a laptop I can convince them ;)
Christopher McCormack
@cmccormack
Mar 16 2018 21:11
Bootcamp - party in the front, business in the rear
Jason Luboff
@JLuboff
Mar 16 2018 21:11
I'll see what I can do. Get me one of dem touch bars that I'd never use
Christopher McCormack
@cmccormack
Mar 16 2018 21:12
It's pretty useless and I hate the esc button
I have one for work
I actually hate the keyboard on the new models
see if you can get a 2015 for cheaper :)
Jason Luboff
@JLuboff
Mar 16 2018 21:14
I don't want old technology, I want to be bleeding edge
Christopher McCormack
@cmccormack
Mar 16 2018 21:15
some things on the touchbar are cool if they are developed by app owners. Like iTerm you can change your theme really easy and other apps have a few conveniences
Jason Luboff
@JLuboff
Mar 16 2018 21:17
Ya its a cool concept but I think most likely poorly executed in most cases
Christopher McCormack
@cmccormack
Mar 16 2018 21:19
I don't think they should have removed the top row to put it in
I guess touch ID is pretty good when it works
Jason Luboff
@JLuboff
Mar 16 2018 21:22
Does it not work well on the laptop? The phone one works great
Daniel Romero
@Ranacode
Mar 16 2018 21:23
hey
regex question here
Christopher McCormack
@cmccormack
Mar 16 2018 21:23
It may be because of my corporate image but sometimes it just doesn't do anything when I put my finger on it. May have something to do with the docking station, not sure, more issues when using docking station than not
Daniel Romero
@Ranacode
Mar 16 2018 21:23
I'm trying to achieve the next thing: I want to check just for one specific word only one time
/(role|responsible|admin){1}/
I did this but I'm so newbie on regex
Christopher McCormack
@cmccormack
Mar 16 2018 21:24
how did you implement it?
Jason Luboff
@JLuboff
Mar 16 2018 21:24
@cmccormack Unless I'm mistaken...MAcbooks don't have a dedicated dock port right? It's usb? IF so, I hate any and all USB style docks. They're worthless
Christopher McCormack
@cmccormack
Mar 16 2018 21:24
Yeah it's all type-C
and it's so buggy. Sometimes monitors just don't show up at all
Daniel Romero
@Ranacode
Mar 16 2018 21:24
That regex above match all the words here more than once
Ou nothing I achieve it
^(role|responsible|admin){1}$
Christopher McCormack
@cmccormack
Mar 16 2018 21:25
@Ranacode sure but how are you implementing it
Jason Luboff
@JLuboff
Mar 16 2018 21:25
@cmccormack Ya I hate those things. They are just awful. We purposely buy laptops with dock ports for that reason
Christopher McCormack
@cmccormack
Mar 16 2018 21:25
you're just showing the regex
Jason Luboff
@JLuboff
Mar 16 2018 23:16

:joy: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418

The HTTP 418 I'm a teapot client error response code indicates that the server refuses to brew coffee because it is a teapot

Amit Patel
@AmitP88
Mar 16 2018 23:16
hey guys, on my timer, when the countdown goes to zero and it says "time's up!", how do I make a space between time's and up?
https://codepen.io/AmitP88/pen/ZxWRmx?editors=1010
Jason Luboff
@JLuboff
Mar 16 2018 23:20
@AmitP88 I think the issue is your display: flex Why not just have one div with several spans inside it?
<div class="countdown">
<span class="minutes"><span><span class="color">:</span> etc etc
Amit Patel
@AmitP88
Mar 16 2018 23:21
@JLuboff ah I see. I dunno, the way I did it was the first thing that came to mind lol. I'll give it a shot
Jason Luboff
@JLuboff
Mar 16 2018 23:22
Hmm even with span if you leave the display: flex it has the same issue, but you can keep everything on the same row that way
Amit Patel
@AmitP88
Mar 16 2018 23:22
@JLuboff thanks bro, it worked! I also removed the display :f lex part
CamperBot
@camperbot
Mar 16 2018 23:22
amitp88 sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:star2: 2370 | @jluboff |http://www.freecodecamp.org/jluboff
Jason Luboff
@JLuboff
Mar 16 2018 23:23
:+1:
Amit Patel
@AmitP88
Mar 16 2018 23:23
I dunno why, but I always never think to use spans lol
Jason Luboff
@JLuboff
Mar 16 2018 23:23
They're a nice way to manipulate text (or icons, or what not) thats in the middle of a div or p
Amit Patel
@AmitP88
Mar 16 2018 23:24
hmmm, when I start the countdown, the : no longer appears, but I might be able to resolve it
ah I see
Jason Luboff
@JLuboff
Mar 16 2018 23:25
colon still shows for me
Amit Patel
@AmitP88
Mar 16 2018 23:27
colon.png
Jason Luboff
@JLuboff
Mar 16 2018 23:29
Hmm.. in FF it still shows. Changed it to 2 minute timer and colon remains..
Amit Patel
@AmitP88
Mar 16 2018 23:31
ah ok, it's working now. I tried changing minutes and seconds to different things, and it works now. that's strange though
oh you know what? the colon disappears when I hit reset button, that's why
that's weird though, my reset_timer function doesn't touch the colon div in any way
function reset_timer(){
  clearInterval(interval);
  minutes = 0;
  seconds = 5;
  minutes_div.innerHTML = minutes;
  seconds_div.innerHTML = seconds;
  clicks = 0;
}
Jason Luboff
@JLuboff
Mar 16 2018 23:37
Did you fix it? I hit reset and still have a colon :P
Amit Patel
@AmitP88
Mar 16 2018 23:50
yeah, the colon issue is fixed lol. but now i'm having a small issue to where when the countdown starts, the seconds go from -1, then 58, 57, 56, etc
Amit Patel
@AmitP88
Mar 16 2018 23:55
hmmmm, colon dissappears when I hit reset