Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 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
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Rabin Shrestha
@jyapujuju
this is generate from sass
@mbpiner
ronald
@ronstarcool
folks, how to render a comp in react router on all routes, but the home route? i know we can use regex in react router, but i cant get it to work some how
<div className="router" style={{ width: "100% !important" }}>
            <Header />
            <Route path="/" component={Nav} />
            <Route exact path="/" component={Home} />
            <Route path="/markets" component={Markets} />
            <Route path="/marketnew" component={MarketNew} />
          </div>
i wanna render the Nav only when nót on home
i tried this: "/.*"
so, a slash, and then anything
but no luck there
Pascal Clanget
@Gh05d
Hi guys, I created an app with create-react-app, ejected because I want to use scss, copied the webpack.dev files for development and production from another project and when I start the app, I now get this error:
Module build failed: Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (57)
I took the old files from the trash and made the necessary modifies to use the sass loader, but it still doesn't work.
Also removed the node_modules and reinstalled
Dan Couper
@DanCouper
I assume you're using Node 8.x.x? Older versions of node-sass are not supported on that runtime. you need to upgrade (npm install node-sass@latest or equivalent). I've this constantly since I upgraded node, every project I've touched in has a lockfile with a specific version on node-sass, so I get that error maybe a couple times a day for the last few weeks
As
Pascal Clanget
@Gh05d
@DanCouper Nope, was just me being stupid. Forgot to install the sass-loader :worried:
Works now, obviously. Sorry for the inconvience
Dan Couper
@DanCouper
Ah, makes sense!
Mostafa Hesham
@mhesham32

Hello what is this ?

10^1 //11 i guess it should be 10
10^2 //8  i guess it should be 100

isn't that symbol (^)mean to the power of ?

Dan Couper
@DanCouper
No, it's a biwise XOR
Bitwise, sorry
10 ** 1 would be power, ** is the exponentiation operator, not ^
Mostafa Hesham
@mhesham32
i don't know about it what should i use to get the power of some number @DanCouper ?
oh thanks @DanCouper
CamperBot
@camperbot
mhesham32 sends brownie points to @dancouper :sparkles: :thumbsup: :sparkles:
:cookie: 857 | @dancouper |http://www.freecodecamp.com/dancouper
Dan Couper
@DanCouper
👍
Mostafa Hesham
@mhesham32
Math.pow is the correct one
Dan Couper
@DanCouper
It's not infix though, that's what ** is for, it's a direct translation of your first example, and can be used same as *, +,-, /, or %. Like i = 2; i **= 4;
Matej Bošnjak
@mbosnjak01
Hi. Could anyone tell me how to do array.join('<br>') inside angular js controller? Since angular ingores html tags in this example, and I really need this, how could I do it?
Mostafa Hesham
@mhesham32
hello guys I have a problem here idk why num!==number.value didn't override the if conditon? help please
function convertToRoman(num) {
    var numArr = (num + '').split ``.map(x => x / 1);
    console.log(numArr);
    var numericalValueArr = numArr.map((number, index, array) => {
        if (array.length == 1) {
            return number;
        }

        var slicedArr = array.slice(index, array.length - 1).length;

        var tenToThePowerOfX = Math.pow(10, slicedArr);

        return number * tenToThePowerOfX;
    });
    console.log(numericalValueArr);

    var romanNumerals = [{
            value: 1,
            symbol: "I"
        },
        {
            value: 5,
            symbol: "V"
        },
        {
            value: 10,
            symbol: "X"
        },
        {
            value: 50,
            symbol: "L"
        },
        {
            value: 100,
            symbol: "C"
        },
        {
            value: 500,
            symbol: "D"
        },
        {
            value: 1000,
            symbol: "M"
        }
    ];


    function converter() {
        var numericalValue = numericalValueArr.map((num) => {
            for (let [index, number] of romanNumerals.entries()) {

                if (num == number.value) {
                    return number.symbol;
                }

                if (num == 0) return null;


                if (num!==number.value&&num / number.value == 2) {//this is the problem
                    return number.symbol + number.symbol;
                }

                if (num!==number.value&&num / number.value == 3) {//this is the problem
                    return number.symbol + number.symbol + number.symbol;
                }


                for (let anotherNumber of romanNumerals) {
                    var subtract = num == number.value - anotherNumber.value;
                    //var adding=num==number.value+anotherNumber.value;

                    var remains = num - number.value;

                    if (subtract) {
                        return anotherNumber.symbol + number.symbol;
                    }

                    if (remains / anotherNumber.value == 2) {
                        return number.symbol + anotherNumber.symbol + anotherNumber.symbol;
                    }

                    if (remains / anotherNumber.value == 3) {
                        return number.symbol + anotherNumber.symbol + anotherNumber.symbol + anotherNumber.symbol;
                    }
                }

            }
        });
        return numericalValue.join('');
    }
   return converter();

}

convertToRoman(3999);
Lee
@LeeConnelly12
morning everyone
Marc
@MWBauer
HIya' Lee
Anyone have a minute?
Lee
@LeeConnelly12
Sure what's up
I'm trying to understand why my JS keeps saying there's an Unexpected end of input
There's a list of images, they're enclosed in {} with a ; to finish.
why is it Unexpected?
Quantomistro3178
@Quantomistro3178
Hey everyone.
Lee
@LeeConnelly12
@MWBauer You're missing a curly brace for your displayWeather function
Marc
@MWBauer
@Quantomistro3178 :wave:
Quantomistro3178
@Quantomistro3178
I'm working on the portfolio project. I just need to add a navbar to finish it off.
Marc
@MWBauer
Yeah.....that was it. Goodness. thank you.
@LeeConnelly12 thanks
CamperBot
@camperbot
mwbauer sends brownie points to @leeconnelly12 :sparkles: :thumbsup: :sparkles:
:cookie: 159 | @leeconnelly12 |http://www.freecodecamp.com/leeconnelly12
ronald
@ronstarcool
anyone online yet to assist on the react router?
Marc
@MWBauer
:cocktail:
@Quantomistro3178 that was a fun part
how do you think you'll do it?
Quantomistro3178
@Quantomistro3178
I downloaded notepad++ to work on there cause the internet is bad here. but when I copied my code from codepen onto the text editor, the result wasnt the same when i ran it
the background-color of the body was messed up, and the cdn font links weren't working either....
@MWBauer I'm just thinking of a simple fixed bottom navbar. Last time I tried to add a navbar, I messed things up so wrong I almost scrapped the whole project.
Quantomistro3178
@Quantomistro3178
say, does anyone know how I could increase the rows in my "Message" input?