I need help with fourms
I made a project to do a password checker and generator. i done most of it. But i am struggling how to make the password checker check if it uses the qwerty format. and to make a score by it.
43 Replies
what would be the problem
qwerty is literally
qwertyuiop
asdfghjkl
zxcvbnm
so you have to compare that with the passwordmy approach would be to use a sliding window over the password, length 3, then for each window, check if the window exists in either of the three qwerty-strings
I dont understand how to check if it contains that or not
check my message just above yours
how do i do that
Do you know what a sliding window is?
no
all of this is confusing me too much.
I am new to fourms i watched a tutorial video.
its not helping that much i cant lie.
This has nothing to do with forms
Oh
i need this in fourms.
I did it in console first.
Sure, but as said, it's not relevant
but i didnt know i had to fo it in forms
Ok
@Pobiega what is sliding window
never heard of it
A sliding window in coding is a restricted view of a larger something
Let's say the password is abcde
We want to look if ABC, BCD or CDE is in your "bad" sequences
It's a "window" of length 3 that "slides" over the total
oh
will it check for both capital and normal letters
or do i have to do it differently for both.
It won't do anything, it's something you will have to code.
But you can easily normalize it so it's case insensitive
I dont understand how it helps tho.
or how i code it
Well you need to know if there are any sequence of three characters in the password that is directly from the qwerty layout
Can you really not see how a sliding window would help with that?
no
I am still clueless.
Well, it's unfortunate you didn't answer earlier, cause I'm just about to head to bed
Could you help me tmr?
But try to think of a way to do this by hand
perhaps
Maybe?
ok
sleep well
Step one is to figure out the problem. Step two is to come up with a solution. Step three is translating that solution into code.
Ok
This is a "sliding window" over a string. The window length is 3.
so for this string, we'd get 3 results back. for each of these results, we test if that 3-length string exists in any of the known qwerty strings
you'd then do something like...
how to implement the
Window
and IsSequenceFromQwerty
methods is up to you.Oh
do you get the idea?
kind of
So i use the sliding window to make sure if there is qwerty or not.
but in order to use it i have to download it.
right
from extensions
.. download it? what
no
you write it
oh
its just a simple method.
ok
also, eh.. you use it as part of your solution, specifically the "any sequence of length 3" part
oh ok
the sliding window itself doesnt know or care about qwerty
So i have to add the qwerty part.
Did you read the snippet I sent? and the messages around it? ...
Pobiega
how to implement the
Window
and IsSequenceFromQwerty
methods is up to you.Quoted by
<@105026391237480448> from #I need help with fourms (click here)
React with ❌ to remove this embed.
yea
You have to implement the two methods that don't exist in that snippet of code
Window might be a little tricky, but it's also a fairly common thing so should be googlable
The qwerty one should be pretty easy
aight
i do that