patternlock

mod_harbour es un módulo para Apache que permite correr tus PRGs directamente en la web!!!
Post Reply
User avatar
Otto
Posts: 7020
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

patternlock

Post by Otto »

Image
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: patternlock

Post by Antonio Linares »

Dear Otto,

I think that the amount of possibilities is low, so users may "guess" other users on several tries

Code: Select all | Expand

function Main()

   ? NCombinations( 9, [from 3 to 9] )

   // and I think the above is not correct as several solutions may be impossible

return nil

function NFactorial( n )

   local nResult  := 1
   local x
   
   for x = n to 1 step -1
      nResult := nResult * x
   Next x

return nResult

function NCombinations( n, m )

return nFactorial( n ) / ( nFactorial( m ) * nFactorial ( n - m ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 7020
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: patternlock

Post by Otto »

Dear Antonio,
Thank you.
Maybe you can post an example that is safe and works.
It would be great.
Thanks in advane.
Best regards,
Otto

Edit:
I did some more tests and I think it is save but you have to tune it.


Image
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: patternlock

Post by Antonio Linares »

Dear Otto,

I think that 4 x 4 dots would be safer

Android uses it (I would say it is 4x4 also)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply