## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• Jun 19 2020 20:09
@krisb1220 banned @Gastony
• May 14 2020 22:39
• May 14 2020 22:38
@bjorno43 banned @real-action
• Feb 01 2020 00:27
@bjorno43 banned @Ndoua
• Jan 07 2020 03:10
@bjorno43 banned @doctor-sam
• Aug 17 2019 09:32
• 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
Abraham Anak Agung
@AbrahamAnakAgung
@mpmaan i think the cid is like ONE HUNDRED, 100 means you have 1 ONE HUNDRED. TWENTY, 60 means you have 3 TWENTY notes
mpmaan
@mpmaan
lol..really..i need to check the problem statement
Abraham Anak Agung
@AbrahamAnakAgung
yup :smile: so in total you have just about 300 something, not 11 thousand, that is too much
mpmaan
@mpmaan
i am unable to conclude that from the question
ok..got it
because for "PENNY" number of coins can't be fraction like 1.01
Abraham Anak Agung
@AbrahamAnakAgung
@mpmaan PENNY is 0.01 notes so 1.01 will be 101 pennies
mpmaan
@mpmaan
yeah..now i need to modify a lot of code
Simon Cordova
@gbsimon87
Hey all! - was wondering if anyone could lend a quick hand
I've got an input, imagine a pinpad, and upon clicking a button, I only want to show the last digit on the input, but the previous digits must be an asterisk - any thoughts how to accomplish such a task?
mpmaan
@mpmaan
@gbsimon87 i don't understand what do you want to do? what do you mean by previous digits being asterick?
if i press 3 should the output be *3?
or like those login forms where the password is invisible except for the last digit?
Simon Cordova
@gbsimon87
like login forms where the pass is invisible except the last digit
@mpmaan
mpmaan
@mpmaan
you can try something like n = length_of_the_character_in_input_field and then replace it with newInput = ***(upto n times) + new_entered_digit
Simon Cordova
@gbsimon87
@mpmaan I'm trying something similar to no avail, I'll copy what you wrote so I can follow it closely thank you
mpmaan
@mpmaan
@gbsimon87 the method i told you might cause inconvenience to users. if they pressed * then it will seem like it has been hidden , for example if current input is ***3 and user presses * then new input will be *****
what is 'no avail?
Simon Cordova
@gbsimon87
@mpmaan
No avail means no success
The only way the user can input a number is by clicking a button with the mouse, not with the keyboard.
The layout itself is an pinpad, so a disabled input up top and 9 numbers at the bottom. Upon clicking a button, it will take that button's value and insert it in the input. Currently it's working well just showing every number, I need to mask al but the last digit
mpmaan
@mpmaan
like when user has entered correct pin it will automatically login into account or something similar
without the need to press enter or any submit button?
Simon Cordova
@gbsimon87
Exactly
I've got everything in functionality except the hiding of all but the current last digit
mpmaan
@mpmaan
then my method should work
but there mightbe some delay when updating the input
although user won't notice it because of presence of * characters
most probably lol
Simon Cordova
@gbsimon87
I'll try it out :)
Claudio Restifo
@Marmiz
@gbsimon87 something like
const hide = n =>
('' + n).slice(0, -1).replace(/./g, '*') + ('' + n).slice(-1);
you can add more argument to change the hiding char or the length of the visible number
caution: the return val is a string and not a number (since it has * in it)
Simon Cordova
@gbsimon87
@Marmiz thank you, it can be either a string or number really, current they're strings in my app anyway
mpmaan
@mpmaan
what wil slice(0,-1) do?
Claudio Restifo
@Marmiz
return everything but the last letter of the string

from mdn

If negative, it is treated as strLength + endIndex where strLength is the length of the string (for example, if endIndex is -3 it is treated as strLength - 3).

ie: 6 -1 == 5
mpmaan
@mpmaan
good..i didn't know it
Abraham Anak Agung
@AbrahamAnakAgung
@Marmiz if we replace the password with * will it still read as number or string when we store it in database?
Claudio Restifo
@Marmiz
it returns a string
bit no other way since you want to change it to a string
that's why you should have a formatter and a parser so that once you read the value is back as a number
Hey guys, I've been working as a front end developer for a year and 2 months now. I got let go yesterday
I need to build a new portfolio and get a new job ASAP but I'm bad with design and I can't find good enough inspiration to give me a base design idea
Could anyone help me out a little?
Abraham Anak Agung
@AbrahamAnakAgung
@Marmiz ah i see, never know about formatter or parser`.
mpmaan
@mpmaan
I got let go yesterday