Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 07 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
CamperBot
@camperbot
liamdocherty sends brownie points to @toianw :sparkles: :thumbsup: :sparkles:
:cookie: 513 | @toianw |http://www.freecodecamp.org/toianw
Ehsan Shadmehri
@ehsansh

hi, what is the problem with my code:

const {User} = require('../models')

module.exports = {
    async register(req,res){
        try{
            const user = await User.create(req.body)
            res.send(user.toJSON())
        }catch (err){
            res.status(400).send({
                error:'This email is already in use'
            })
        }
    }
}

It gives an error for register function. Unexpected identifier.

Ehsan Shadmehri
@ehsansh
My node version is 6.9.2 . it seems it is because of the node version. How could I update node on windows?
Nazar
@IsaakNazar
@ehsansh download and install
the easiest single way
Kaz Baig
@kbaig
@ehsansh async await is supported by 7.10.1 and above
Zebralight
@zebralight
hello. I was wondering how I can configure an element such that its height isn't resized based on its child element:https://jsfiddle.net/3xthm5ss/1/
Kaz Baig
@kbaig
@zebralight You could assign it a fixed height
Zebralight
@zebralight
@kbaig thanks!
CamperBot
@camperbot
zebralight sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 585 | @kbaig |http://www.freecodecamp.org/kbaig
Ehsan Shadmehri
@ehsansh
@IsaakNazar @kbaig Thanks
CamperBot
@camperbot
ehsansh sends brownie points to @isaaknazar and @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 586 | @kbaig |http://www.freecodecamp.org/kbaig
:cookie: 323 | @isaaknazar |http://www.freecodecamp.org/isaaknazar
Kaz Baig
@kbaig
@ehsansh fyi http://node.green/
Onome Sotu
@onomesotu
Hey guys, I am working on this exact exchange on advanced algorithm scripting
When I reduce the cid array to get the cash in drawer, it doesnt round up the significant figures accurately
for example, 1.01 + 2.05 returns 3.05999999996 instead of just 3.06
can someone explain this?
please?
Ken Haduch
@khaduch
@onomesotu - I would recommend converting your values to whole integer units, that would be cents (pennies) in this case, and doing all the calculations without any possibility of floating point interferences...
Aditya
@ezioda004
@onomesotu Thats because of something called floating point arithmetic. Since computers only understand 0's and 1's (base 2) it's hard for them to compute any decimals which arent in that base. Example for us (base 10) to write 1/3 we have to do 0.33333333 recurring digits and computers dont understand recurring digits either.
rk
@rajkumart08_twitter
  • if I move text three before the input tag the check box is not disaappearing when I click third time.
  • but when I keep text three after input tag it works fine.
  • can you tell me how to fix it.
  • providing my code below
https://stackblitz.com/edit/angular-w6tqvn?file=app/app.component.html

<label [ngClass]="{'is-multiple-of-3':multipleOf3}">
    <span  id="redSquare"></span>
three
<input type="checkbox" name="rememberLogin" id="buttonId"  (click)="open()"> 
</label>
Onome Sotu
@onomesotu
@khaduch @ezioda004 thanks guys.. I am just reading up on it
CamperBot
@camperbot
onomesotu sends brownie points to @khaduch and @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 521 | @ezioda004 |http://www.freecodecamp.org/ezioda004
:star2: 3843 | @khaduch |http://www.freecodecamp.org/khaduch
Brad
@bradtaniguchi
@rajkumart08_twitter I don't understand the issue you are facing from just the demo
Oh I understand, Its pretty obvious, the checkbox doesn't disappear at all, your red box covers it only when its on the left.
rk
@rajkumart08_twitter
@bradtaniguchi can you update in stackblitz its so confusing :(
Brad
@bradtaniguchi
@rajkumart08_twitter I don't know what you want, or expect to happen.You only stated what is currently happening.
rk
@rajkumart08_twitter
@bradtaniguchi can you tell me how to achieve this one -----> if I move text three before the input tag the check box is not disaappearing
Brad
@bradtaniguchi
@rajkumart08_twitter Cuse it doesn't ever disappear in the first place. Do you want to really hide it with display: none?
John Brann
@jdbrann
Hi all- I am a definite newbie and I am working on completing my "Personal Portfolio Page" for the Basic Front End of FCC. I know this may be rough compared to some of the others I have seen but would like some feedback if possible. I feel like I am really struggling with the "look of my code" and still have very rough understanding of what I am doing. I felt like it was a big leap from the "challenges" I was completing at FCC to the actual project and felt like I was unprepared. But here you go feedback is welcome. https://codepen.io/jdbrann1972/pen/wmPGda
Brad
@bradtaniguchi
@jdbrann Hello, I dislike the green blue color scheme, they seem "off" to my eyes, have you ever thought of using different colors so the complement each other better? Also parts of the page are grey, which I dislike. The employmet portfolio section looks very clean, and I think that part of the site is better than the rest. (align the read more buttons if possible)
just some quick things I noticed when looking
John Brann
@jdbrann
Thanks @bradtaniguchi I appreciate the feedback. I will change the colors for sure. ...
CamperBot
@camperbot
jdbrann sends brownie points to @bradtaniguchi :sparkles: :thumbsup: :sparkles:
:cookie: 442 | @bradtaniguchi |http://www.freecodecamp.org/bradtaniguchi
Brad
@bradtaniguchi
@jdbrann I'm terrible with colors, I usually try to stick with color schemes defined by someone else (client, or otherwise)
include*engine
@newtothat
how long it takes to come to portfolio page
how long it took you ?
Brad
@bradtaniguchi
@newtothat I never really did the portfolio page officially, I already made one a while back and just linked that one (it used angularjs, was a github.io project) I got it 80% and said screw it.
Ken Haduch
@khaduch

@jdbrann - welcome "newbie"! :) and I agree with you that the portfolio seems like a very large leap from the simple pages and basic concepts in the lessons. But the good thing about it is that as you go along and learn more, you can always come back and refine it. It's good to get some basics down and plan to revisit it, there's a lot to learn and you do pick up tips from other pages that you look at, especially once you have experienced creating a few yourself. Not to say that it gets easy really fast, but you just have to take it step-by-step.

I have a few comments about your page. The color scheme is not bad for my eye, but maybe I don't have a great eye for that. There are tools out there that can help you select color palettes, like Adobe's color wheel.
Another thing that I would recommend (I think that it is generally recommended), for better readability, is to limit the width of the text content on the page. For example, I opened your page on a wide screen and your "About" section fits on one line spanning the entire screen. There are readability guidelines (which I haven't read in a while) but they would recommend something like 80 characters max width. You can set up your page to have a central section that limits the width in a couple ways. Since you have Bootstrap, you could use the grid to control the width. I would try to apply the same principles to the section with the references - the images should be smaller in general, I would say, and it would look better if those sections were centered when they shift to a single column.

The last thing that I would like to mention now is that when you are using CodePen, the various sections of the code should be placed in the appropriate boxes. For example, your bootstrap.css and font-awesome.css should be entered in the CSS panel config box in the external stylesheets area. None of the <!DOCTYPE, <html>, <head> and <body> tags should be in the HTML panel. There are places in the HTML config for some of those head items, and the major page sections tags are supplied by the CodePen template. You can read more about it here And here. If you're just cutting and pasting into CodePen from your own editor, then maybe you don't want to bother, as long as your page displays well on all devices. Also it is best to avoid inline style attributes, it makes it harder to make changes to the page if you have to. Better to define some CSS classes and use those to style the various elements, it makes it a lot easier to be consistent throughout the document.

I hope that helps - it's definitely an ongoing project to develop these pages, looks like you have a lot of great material and a good start to getting it together...

zootechdrum
@zootechdrum
function findLongestWord(str) {

  var longest = 0;
  var changedStr = str.split(' ');

for(var i = 0; i < str.length; i++){

}  
 console.log(changedStr[i].length);
}
findLongestWord("hel00 yoiii cool");
VM168:9 Uncaught TypeError: Cannot read property 'length' of undefined
at findLongestWord (<anonymous>:9:28)
at <anonymous>:11:1
Why am i getting the message on the bottom?
i am using the console in chrome to type in the function
Brad
@bradtaniguchi
@zootechdrum Your console log uses i, but its outside of the for loop