Thread: Algorythm Task

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    2
    Rep Power
    0

    Algorythm Task


    hello there,
    as new in delphi and generally in porgramming, i want to create a list of swaping chars.
    What do i mean....
    All keyboard keys result to all possible combination!
    A example will be very usefull so:
    the choice of chars will be :
    abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*();:'"/\}{[],.><
    and the result for eight limit number like this:
    8!QvSe:/
    lY^Ne[(T
    ->7,agUo
    l4};b]*P
    &(#H!9Hs
    >yj4l@NB
    dm[i$w06
    &O(d<*o8
    n'2c{ib)
    p-"V|4"/
    S"tV0Fh-
    99/&znG0
    ]2>sEs!9
    NAE="9I2
    <p%Zw!2h
    2hboED^E
    1EnL5FYx
    yA);(1i<
    m^[owOW2
    dJ?#)'l*

    or just like using a array ( i suppose its easier) to have a result like this:

    00000000
    00000001
    00000002
    00000003
    ....
    0000000a
    0000000b
    ....
    0000000A
    0000000B
    ...
    0000000? <-- last box of arrow
    ....
    00000010
    00000011
    etc..
    11111110
    11111111
    11111112


    Thank you for any suggestion, solution
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,057
    Rep Power
    383
    Hard to be sure what you are looking for.

    If you are looking to pick 8 characters at random from the full list then look up the random function.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    2
    Rep Power
    0
    Originally Posted by clivew
    Hard to be sure what you are looking for.

    If you are looking to pick 8 characters at random from the full list then look up the random function.
    Thank you for answering. Well i have done solutions with randomize char but it is not what i need.
    My basic idea is to create a result of random string within a length, but i need to print it all the possible combination of selected string. If i use just random fuction i will not get 100% of combination. To do it i suppose i ll need an array to load strings and call them one by one as a stable until it finish all combination with full array. My first question is if i need as many array as my result lenght will be?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,057
    Rep Power
    383
    Sorry I do not understand what you are trying to achieve.
    Last edited by clivew; April 19th, 2012 at 03:31 PM.

IMN logo majestic logo threadwatch logo seochat tools logo