Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
Activity
• Aug 17 09:32
• 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
Pascal Clanget
@Gh05d
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:
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 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
Marc
@MWBauer
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:
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?
ronald
@ronstarcool
use text area?
Quantomistro3178
@Quantomistro3178
@ronstarcool how?
ronald
@ronstarcool
Quantomistro3178
@Quantomistro3178
like, how do i use it to increase the number of rows?
Marc
@MWBauer
I ended up with a floating navbar.
Quantomistro3178
@Quantomistro3178
any link other than W3C? I'm in china right now, and the website is blocked in china
ronald
@ronstarcool
<textarea rows="4" cols="50">
At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>
@Quantomistro3178
Quantomistro3178
@Quantomistro3178
@ronstarcool thanks, mate!