HOW TO GENERATE RANDOM MEANINGFUL STRINGS ?

Friends,
How do I generate random meningfull strings ? I know how to generate strings randomly but I want to generate meaningfull names. The length is not important. Please help me in this matter as I have to implement this soon.
Thanks in advance
Ankit.

Thanks for reply,
I want to generate any string randomly and also want to make sure that it is meaningfull name. I can use Random(0n class to generate random number then convert according to ascii table to char and concat these generated chars to have string but then it is not meaningfull string, it could be anything. I want the string to be meaningfull too.(any word or name in english language). I don't want to pick up already generated word or names from list randomly(i think this is what you are thinking)

Similar Messages

  • How to generate random password as per password policy by knowing the resou

    Hi,
    Any body tell me, how to generate random password as per password policy by knowing the resource object in OIM11g
    Regards,
    Nishith Nayan

    Hi Nayan,
    You can try below code snippet:
    UserRepository ur = new DBUserRepository();
    UserInfo user = ur.getUserInfo(userKey);     
                   ResourceRepository rrepo = new ResourceDBRepository();
                   Resource resource = rrepo.findResource(resourceName);
                   PasswordPolicyAssignmentsRepository par = new PasswordPolicyAssignmentsDBRepository();
                   PasswordPolicyRepository ppr = new DBPasswordPolicyRepository();               
                   List passwordPolicyAssignments = par.getPasswordPolicyAssigments(resource);     
                   PasswordPolicy passwordPolicy;     
                                            PasswordPolicyAssignment passwordPolicyAssignment = (PasswordPolicyAssignment) passwordPolicyAssignments.get(0);
                             if (isApplicable(passwordPolicyAssignment, getMappedAttributes(userInfo.getAttributes()))) {                            
                                  passwordPolicy = ppr.find(passwordPolicyAssignment.getPasswordPolicyID());                    
                                                 RandomPasswordGeneratorImpl rpg = new RandomPasswordGeneratorImpl();
                             password = rpg.generatePassword(userInfo, passwordPolicy);
    regards,
    gyan

  • How to generate random letter?

    i know how to generate random numbers but is there anyway to generate random letters? or colors?
    thanks in advance..

    marufai wrote:
    -uj-
    as i'm new in java...can u show me how to make random number from array list?
    i tried but it seem long
    ArrayList ma = new ArrayList();
         ma.add("A");
         ma.add("B");
         ma.add("C");          
         ma.add("D");          
         ma.add("E");
         num = gen.nextInt(5);
         System.out.print("" + ma.get(num) );
    so if i wan generate btw A to Z am i suppose to type A to Z out?
    Edited by: marufai on Sep 24, 2007 12:32 PMI like uj's method since it's more extensible, even though it's a little more work up front.
    If you have a range, say A to Z, then loop over the characters in that range, adding them to the list.
            List<Character> list = new ArrayList<Character>();
            for (char index = 'A'; index <= 'Z'; index++) {
                list.add(index);
            }Do that for all of the ranges that you want to add to the possibilities, and then choose random numbers between 0 and the length of the list.

  • How to generate random numbers from 1 to 5

    How to generate random numbers from 1 to 5   
    -1110340081
    Solved!
    Go to Solution.

    (You should not mark a post as solution unless it actually contains a solution to the original problem)
    Do you want to share your code? Did you test to make sure that all numbers equally probable?
    LabVIEW Champion . Do more with less code and in less time .

  • Anyone know how to generate random midi in real time? part 2

    anyone know how to generate random midi in real time?
    http://discussions.apple.com/thread.jspa?messageID=11342321
    This article was archive so I can't reply to this, but I wanted to bring this back up.
    As Christian pointed out on converting your notes to P-Press, then random DataByte 1 then convert back to a Note...
    I used this approached but was able to add in a macro I created to save the generated random DataByte 1 so that when the Note OFF message came around, I can apply that saved random DataByte 1 to the Note OFF in question.
    One thing I did notice when working this out was there's 2 differences in processing the messages when it comes to using a MIDI Input Device or a MIDI Performance (midi file).
    After I was able to figure this out, now I can randomize on notes using either of the 2 Inputs.
    While randomize notes probably won't sound nice to the ear, I apply another macro I created and I'm still adding too, and that's Music Scales.
    So while I randomize notes, when applied to this last macro, the random notes now get mapped to notes in a music scale of your choosing.
    This link shows what I did.
    http://www.digimixstudios.net/RandomizeNotesUseScales/
    I'm currently in the process of creating video tutorials in breaking down the whole process but I wanted to share what I have and see if there's any interested in this.
    Remember, this is just one approach and I hope it gives others ideas to work off of.

    anyone know how to generate random midi in real time?
    When I used to drink a lot... this was no problem at all!
    pancenter-

  • How to generate random strings

    Gday all,
    So I have to create a simple guessing game where the user guesses a 3 letter string that is randomly generated:
    "For each new game your program will generate three unique random numbers between 0 and 9
    inclusive, and convert them into a String of three characters in the range A to J. This String will be an
    input to a game, where the user tries to guess the correct letters in the correct order. Examples of valid
    input Strings would be, �JAD�, �ABC�, �IBE� and �EFG�. Examples of some invalid input Strings could be
    �abc�, �AAA�, �123�, �AdE� or �NME�."
    Just wondering how to create this random string? I know how to generate a random 3 char number (num = (int) (Math.random() * 1000)) but I dont know how to convert this into a corresponding string, as the instructions say.
    I know this is very basic, but any tips?

    I know how to generate a random 3 char number (num = (int) (Math.random() * 1000)) but I dont know how to convert this into a corresponding stringUse string concatenation (+ with one or two String operands).
    int i = 42;
    char ch1 = '*';
    char ch2 = '!';
    String str = "foo";
        // the System.out.println() is not important
        // in each case a string is being created and printed
    System.out.println("" + i);
    System.out.println("2 times i = " + (2 * i));
    System.out.println(i + "*2=" + (2 * i));
    System.out.println("" + ch1 + ch2); // hint, hint
    System.out.println(1 + 2 + "???");
    System.out.println("???" + 1 + 2);

  • How to generate random numbers in a range?

    Hello. i am having trouble finding out how to generate a random number in a certain range. For example i have an array of 100 elements and i want to access one of the elements between 50 and 60, however i cannot find how to generate a random number between these two values.
    Thanks in advance

    java.util.Random.nextInt(int)
    Note that you can get a number between 0 and (max -
    min), exclusive. Then add min, and you've got your
    number.Obviously you didn't read this. It says to get a number between 0 and (max - min) which is actually what you did. But after that you need to add min. The first step would get a number in between 0 and 5. When you add 20 you'd get a number between 0+20=20 and 5+20=25.

  • How To generate random activation code

    Hi Guys
    It might be a very simple question for most of you. I've seen many websites when you register, they send you an email with an activation code.
    It kind of looks like : XA432G2DGR343
    How do we generate something like this in Java. I know we can generate random numbers? Any tips on how to go about it.
    Thanks

    gubloo wrote:
    It might be a very simple question for most of you. I've seen many websites when you register, they send you an email with an activation code.
    How do we generate something like this in Java. So let me see if I have this straight. You are asking us to help you create a program, one that allows you randomly generate activation codes, and with these codes you will try to crack into websites where you haven't registered for or where you possibly haven't paid some entrance fee? Is this correct or am I missing some basic element of logic here? If I'm wrong, please correct my mistake. If I'm right, then you can go to h&#101;ll.

  • How to generate random password

    Hi Experts,
    i using some cmdlets to generate random password.
    $ascii=$NULL;
    For ($a=97;($a –le 122);$a++) {$ascii+=,[char][byte]$a }
    $No_of_password  = 6
    $length_of_password = 10
    $TempPassword=$NULL     # To store single password
    $Morepassword=@()  # Variable to 'X' no. of passwords
     for ($lp=0; $lp -le $count; $lp++ )
    For ($loop=1; $loop –le $length; $loop++)
        $TempPassword+=($ascii | GET-RANDOM)   # this generate the random password
    $morepassword[$lp]= $TempPassword 
    $morepassword    # This should give the all random password
    Output is like --- 
    =zM;HFuElY
    =zM;HFuElYp88<kqTOVM
    =zM;HFuElYp88<kqTOVMfS1xR01VzY
    =zM;HFuElYp88<kqTOVMfS1xR01VzY4<$wG%Z>ft
    =zM;HFuElYp88<kqTOVMfS1xR01VzY4<$wG%Z>ft=a&ME7>&3T
    =zM;HFuElYp88<kqTOVMfS1xR01VzY4<$wG%Z>ft=a&ME7>&3T$98v$b>jSU
    This is not required output. It should give the output like
    =zM;HFuElY
    p88<kqTOVM
    fS1xR01VzY
    4<$wG%Z>ft
    =a&ME7>&3T
    $98v$b>jSU
    Total 6 passwords with a length of 10
    How do create a array like this ?

    I agree with Fred but here i shwo to manage two loops with PowerShell.
    $pwdchars=33..122|%{[char]$_}
    1..6|
    ForEach-Object{
    $pwd=''
    1..10 |
    ForEach-Object{
    $pwd+=$pwdchars | GET-RANDOM
    $pwd
    It is usually always better to write less code and to use the code correctly.  YOu have guessed at mmost of the code but have not used consistent variables.  My guess is that you have tried to modify somecode you found.  Look at this code
    to see how easy it is to build loops in PowerShell
    ¯\_(ツ)_/¯

  • How to generate random sequence numbers

    Hello experts
    Iu2019m writing a custom program and pulling data from VBAK & VBAP. As per requirement I also need to generate a sequence number randomly and finally store all data in text file and upload at server. The hiccup is I donu2019t know how to generate sequence numbers. Can somebody please show me how I can accomplish it?
    Thanks a lot in advance

    Find the below code,
      data: lv_range type datatype-char0128.
      call function 'RANDOM_C'
        exporting
          len_min   = 20
          len_max   = 20
          char_min  = 1
          char_max  = 20
        importing
          rnd_value = lv_range.
    LV_RANGE param will have a random value..
    If you need number you can use the FM "RANDOM_I4"
    Thanks,
    Prathap

  • How to generate random numbers that doesnt contain characters?

    How do we generate random numbers in ESB ROuting Service/ XSL transformation that does not contain characters. I have been using "orcl:generate-guid()" , but it contains some characters, so, I substring it to get only numbers. I dont want to take this risk and in future, my substring itself may contain characters.
    Has anybdy tried this before?
    Thanks,

    If the goal is to have a pseudo random number then consider using the translate function to replace the occurances of the A - E characters with another digit. For example:
    translate(orcl:generate-guid(),'0123456789ABCDEF','0123456789123456')
    This will produce a 1 for A, 2 for B, etc. While not a valid hex to decimal conversion of the GUID value, it does get around the hex issue and might be sufficient for your purposes.
    I would perform a large sample test to see just how unique the values end up being.
    As for why hex is used, well GUID's are most commonly written in text as a sequence of hexadecimal digits such as: 3F2504E0-4F89-11D3-9A0C-0305E82C3301. i.e. 128 bits represented in 32 characters formatted into 5 sections.
    Hope this helps,
    Peter

  • Anyone know how to generate random midi in real time?

    Hi this is my first post so if this is obvious please forgive me
    I'm a John Cage fan and interested in chance generated working methods.
    What i'd like to know is if there is a way to generate random midi events (pitch and velocity) in logic pro or mainstage from an incoming midi signal e.g. any incoming note trigger could trigger any midi note randomly within a user defined range in real time?
    Also is it possible to generate random midi events by just letting something run in the background?
    NB i know i can randomise events after the fact using the transform window - i just can't work out how to randomise in real time.
    sorry if this was a dumb question but any help would be greatly appreciated
    thanks in advance

    christianobermaier wrote:
    Random notes are difficult because a MIDI Note actually consists of two events, Note On and Note Off a while later. If you transform either to something random, you'd get hanging notes all over the place especially when doing it live.
    You are quite right Christian, but I still think there are some ways to solve that in the Environment. For some reason I created such a tool in the pass ( it was a Logic custom offer or something like that ... ). I just converted this old LSO to L8 project. Here is a short description of the Macro "Elements" below:
    *INPUT NOTE RANDOMIZER - ELEMENTS*
    1."On/Off" CC# Assign box - you can set any CC# 0-127 here to control the Global ON/OFF Macro button(2) externally.
    2.Global ON/OFF Macro button - switches the Macro ON/OFF. In OFF mode the macro is bypassed.
    3.Note Pitch Low Randomization range box - determines the low range randomization value.
    4.Note Pitch Top Randomization range box - ( determines the top range randomization value ).
    5."Panic" CC# Assign box - you can set any CC# 0-127 here to control the "Panic" button (6) externally.
    6.Panic Button - resets any playing or hanging notes in both Macro ON/OFF modes.
    7.Note Velocity Low Randomization range box - determines the low range randomization value.
    8.Note Velocity Top Randomization range box - ( determines the top range randomization value ).
    Note: +There is a Stand Alone Macro layer in the template project so the macro tool can be easy imported as an Environment layer into other Logic projects. The tool is Polyphonic ( no Voice Limiter is applied ) so you can use it to generate random chords playing same chord rhythmically etc.+
    Also is it possible to generate random midi events by just letting something run in the background?
    I think so - something like Arpeggiator object may do the job as a Note generator in a combination with some Enviro gear or Macro...
    *Live Input Logic Note Randomizer v1.0* - [DOWNLOAD|http://audiogrocery.com/files/innote_randv1.0.zip]
    !http://img59.imageshack.us/img59/699/innoterand.gif!
    !http://img59.imageshack.us/img59/4967/aglogo45.gif!

  • How to generate random numbers in a range using random class?

    I know how to use Math.random for this, but how would I generate random numbers using the random class?
    Say I want a number between 40 and 50, inclusive--how would I do this?
    What i have in mind is:
    int randomNumber = random.nextInt(max) + min;
    where max is 50 and min is 40. Is this correct?

    Fredddir_Java wrote:
    I know how to use Math.random for this, but how would I generate random numbers using the random class?
    Say I want a number between 40 and 50, inclusive--how would I do this?
    What i have in mind is:
    int randomNumber = random.nextInt(max) + min;
    where max is 50 and min is 40. Is this correct?What happened when you generated a couple hundred numbers that way? Did you get all the ints in the range you wanted?

  • How to generate Random Coupon Codes

    Hi, Is there an app that works with numbers to create a listing of coupon codes?
    Message was edited by: tupper501

    I don't know what your actual question is.
    The subject line is about generating random coupon codes. That could probably be worked out with the use of RANDBETWEEN with it generating UNICODE codes that correspond to numbers and letters.
    Creating a listing of coupon codes is a totally different thing. This requires having a list of actual working codes, not generating random ones. I know of no app that "works with Numbers" to create a list of coupon codes.

  • How to generate random integer?

    What is the func to generate random integer (at most 4-5 digits). Thanks.

    Luckily you asked an amazingly popular question - just take a peek at the answers found in this very forum:
    http://search.java.sun.com/search/java/index.jsp?col=javaforums&qp=%2Bforum%3A31&qt=Generate+Random+Integer

Maybe you are looking for

  • Yoga 3 Pro Multiple Issues: Audio and Harmony

    I am currently using a Yoga 3 Pro. Yet I suffer from two issues after upgrading my Audio driver and the Harmony software. Audio My Audio Driver was originally 6.0.1.7324. It was automatically upgraded to a new version by Windows Update. After updatin

  • Source system creation in BW -  Please help

    Hi, Can anyone send the step by step instruction (including RFC connection) for creating a source (R/3) system in BW. Please help. Email Id: [email protected] Thanks, David.

  • New mobileme calendar

    I upgraded to the new mobileme calendar and now when I open ical I have 2 calendar groups. 1 group called "on my mac" and one for "mobileme". I don't understand why there are 2. Before I had just 1 calendar on iCal and it was automatically synced wit

  • Podcasts under Music?

    I want to keep my podcasts seperate from Music. In iTunes it displays under podcasts but when I transfer to ipod the podcasts are under music so when I want to listen to music sometimes it gets mixed with podcasts. How can I keep them seperate? Under

  • Burrito mobile project charting components

    I have a problem when trying to use the charting components in a Flex Hero mobile project with Flash Builder Burrito. The release notes(http://labs.adobe.com/wiki/index.php/Flex_SDK_Hero) of Flex Hero state that the charting components aren't include