Must be an easier way to do this?

I am trying to create a password based on the following (very simple) algorithym.
Take the userid("poo"). Convert to uppercase("POO"). Get the ascii value for each character and take the last character of the ascii value to build the password. E.G.
Char ASCII PASSWORD
P 80 0
O 79 09
O 79 099 - The finished password("0"+"9"+"9")
Here is my(i think over complicated) function. I am v new to java so please be gentle with your critiscm :-)
public String MakeUserPwd(String userId){
    String password;
    String charVal;
    int count, intCharCode;
    password = "";
    count = userId.length();
    //For each caracter get ascii val and get last "character" of ascii val to build password
    for (int i = 0; i < count;i++){
      intCharCode = userId.charAt(i);
      charVal = Integer.toString(intCharCode);
      password = password + charVal.substring(charVal.length()-1,charVal.length());
    return password;
  }

for (int i = 0; i < count; i++) {    
  password.append((userId.charAt(i) - 32) % 10);
}

Similar Messages

  • Hi there,I have just purchased an apple mac air and i want to delete       some photos i have put on in iPhoto. Can anybody tell me how to do it?i am used to windows right click and press delete, there must be an easy way to do this. Cheers Pete.

    Hi there, I have just purchased an apple mac air and i want to delete some photos i have  put on i photo.I am used to windows where you right click and press delete.Does anybody know how to do it? Cheers Pete.

    lamptramp wrote:
    Hi there, I have just purchased an apple mac air and i want to delete some photos i have  put on i photo
    Open iPhoto and from the Menu Bar... Click on Help... Type in Delete and choose from the Selected Topics.
    lamptramp wrote:
    ... am used to windows ...
    See >  http://www.apple.com/support/macbasics/

  • I am trying to convert a .fla file to an .flv file, is there an easy way to achieve this.

    I made several movies using symbols and motion twens and now wish to save these as an flv to play in a web browser.
    Could someone please respond with an easy solution as I am just learning about this.
    Thankyou.

    Cheers for the head up, it worked, now I feel like a simpleton. I only saw the choice for doc.fla and thought it must be complicated.
    Kind Regards
    Andrew Whitehead
    [email protected]
    CONFIDENTIALITY - This email and any files transmitted with it, are confidential, are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system.
    SECURITY -All email is scanned with Kaspersky Internet Security 2010. Please be aware that communication by email, by its very nature, is not 100% secure
    VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipient’s responsibility to ensure that email is virus free.
    AUTHORITY - Any views or opinions expressed in this email are solely those of the sender.
    Date: Thu, 25 Feb 2010 11:48:11 -0700
    From: [email protected]
    To: [email protected]
    Subject: I am trying to convert a .fla file to an .flv file, is there an easy way to achieve this.
    No worries, that is very simple to do.
    Just click on File--> Save As and select your "File Type" and select as "Flv." 
    Let me know how it goes and if you have any questions regarding Flash, please feel free to ask me here or sending me an email.
    Hope this helps,
    Vicente Tulliano
    >

  • Signing Applications - There must be an easier way

    Hello, I want to put free-iSMS on my N97 however it's unsigned so I can't. I've been reading up a lot on Google on how to sign an app or how to hack the N97 both of which are very long winded processes. There must be an easier way I can do it. It's all quite new to me and everything appears to be Chinese (literally).
    Does anyone know of the simplist guide that wont confuse me? 
    And is it safe to put all my phone details on the web???

    I followed the guide found within the forum you suggested, however when I went to download the certificate my (works) proxy server stopped the download due to the following reason
    [code]
    WARNING: ProxyAV has detected a virus in this
    file!
    File has been dropped.
    ProxyAV Administrator: unknown
    2009-10-09 14:47:52+00:00UTC
    Hardware serial number: 2205050030
    ProxyAV (Version 3.1.1.3(29863)) - http://www.BlueCoat.com/
    Antivirus Vendor: Sophos, Plc.
    Scan Engine Version: 2.90.1
    Pattern File Version: 4.45E.989453.1691461856 (Timestamp: 2009/10/09 12:16:00)
    Machine name: ProxyAV
    Machine IP address: 172.18.31.55
    Server: 221.238.19.22
    Client: 172.18.16.1
    Protocol: ICAP
    Virus: "Mal/Generic-A" found!
    URL: http://theme.esqimg.com/eshequn/isign/theme/isign/SignTool2.zip
     [/code]
    Is this a problem?
    Message Edited by rhysgm on 09-Oct-2009 05:06 PM

  • How can I share this link Tell Congress to stop bulk collection of our personal information. there is no easy way to do this other then copy the entire link

    I want to share the link and post the:
    Tell Congress:
    It’s Time to Stop Mass Surveillance
    Mass surveillance threatens people’s privacy and security online.
    Tell Congress to stop bulk collection of our personal information.
    there is no easy way to post this or forward without sending the entire page link and nobody will touch those if something like a preview doesn't show up, just looks like a bunch of unsafe links to most people, you need to have a share button on this if you really want us to share it

    Heres the link to "Take action" http://mzl.la/1CgTnKg. In the future if you want to copy links, right click the address bar, and the whole link should be selected, then click "Copy" in the menu that comes up.
    Have a great day!!
    Jon

  • I have huge amount of data on a windows external drive and want to transfer to a Mac drive.  Does anyone know an easy way to do this?  I have almost 2TB of data to transfer.  Thanks.

    I have huge amount of data 2TB on a windows Fantom external drive and want to transfer to a Mac drive.  Does anyone know an easy way to do this?  Thanks.  I have an IMac 3.5 GHz Intel Core i7.  I haven't bought a Mac external yet. 

    Move your data to a new Mac - Apple Support

  • HT1399 When I import a CD to itunes, it splits the album in to multiple entries. I have changed the info on some but others just will not merge. Is there an easy way to do this and can I stop them from splitting in future? Thanks

    When I import a CD to itunes, it splits the album in to multiple entries. I have changed the info on some but others just will not merge. Is there an easy way to do this and can I stop them from splitting in future? Thanks

    Okay this is what fixed my problem. Some kind of error/glitch occured half-way through importing that third cd that prevented further imports from any other cd. Once I completely removed the half-imported cd album from my library I could further import cd's without any problems.

  • Is there an easier way to do this?  Save As in Acrobat to a Specified Folde

    CAN APPLESCRIPT RUN IN THE BACKGROUND?
    Or is there an easier way to do this script? The script does what I need done - no problem, but every action happens on screen. Is there a more direct way to some of the steps? (Ideally so most of the action happens in the background. I will ALL-CAP what my thought process is).
    *BASICALLY I GET JOB REQUESTS FROM DEPARTMENTS IN MY COMPANY ON AN PDF THAT I CREATED. WHEN I OPEN THE REQUEST, I RUN THIS REQUEST SO I CAN IMPORT IT INTO FILEMAKER PRO. IT IS OPEN IN ADOBE ACROBAT PRO 9.*
    tell application "Adobe Acrobat Pro"
    activate
    end tell
    *I SIMPLY SAVE EVERY REQUEST AS "REPORT". IT JUST RESAVES EVERY TIME A NEW REQUEST COMES IN. SO I WANT TO STREAMLINE THIS STEP BETTER AND HAVE IT JUST SAVE IN THE BACKGROUND TO THE SPECIFIED FOLDER.*
    tell application "System Events"
    tell process "Acrobat"
    save
    click menu item "save as..." of menu "File" of menu bar 1
    keystroke "report"
    keystroke tab
    delay 1
    keystroke "g" using {command down, shift down}
    keystroke "/users/kellyf/documents/projects/pdf2fmp/ExportPDF"
    keystroke return
    keystroke "s" using command down
    delay 1
    keystroke "r" using command down
    *I BELIEVE THIS STEP HAS TO HAPPEN LIKE THIS, UNLESS SOMEONE IS FAMILIAR WITH A BETTER WAY TO EXPORT FROM ADOBE ACROBAT TO A CSV/SPREADSHEET FILE.*
    tell application "System Events"
    tell process "Acrobat"
    click menu item "Merge Data Files into Spreadsheet..." of menu 1 of menu item "Manage Form Data" of menu "Forms" of menu bar 1
    keystroke return
    delay 1
    keystroke "g" using {command down, shift down}
    keystroke "/users/kellyf/documents/projects/pdf2fmp/exportpdf"
    keystroke return
    delay 1
    keystroke (ASCII character 31) -- Down
    delay 1
    keystroke return
    delay 1
    keystroke tab
    delay 1
    keystroke return
    delay 1
    keystroke "g" using {command down, shift down}
    keystroke "/users/kellyf/documents/projects/pdf2fmp/ImportCSV"
    keystroke return
    delay 1
    keystroke (ASCII character 31) -- Down
    delay 1
    keystroke return
    delay 1
    keystroke tab
    delay 1
    keystroke return
    keystroke "s" using command down
    delay 1
    keystroke "r" using command down
    delay 1
    click button "Close Dialog" of window "Export Progress"
    end tell
    end tell
    end tell
    end tell
    tell application "Adobe Acrobat Pro"
    close document "report.pdf"
    end tell
    delay 1
    tell application "Finder"
    activate
    open file "Creative Job List.fp7" of folder "Filemaker Pro Databases" of folder "Documents" of folder "Kellyf" of folder "users" of folder "macintosh hd"
    end tell
    tell application "FileMaker Pro"
    activate
    do script "PDF2FMP Import"
    end tell

    Kelly Fisher wrote:
    CAN APPLESCRIPT RUN IN THE BACKGROUND?
    Yes. Applescript can run in the backgound. The applications you run also need to be able to run in the background. You need to run scriptable applications & avoid simulating the keyboard & mouse. You need to run commands that are in the application dictionary.
    *BASICALLY I GET JOB REQUESTS FROM DEPARTMENTS IN MY COMPANY ON AN PDF THAT I CREATED. WHEN I OPEN THE REQUEST, I RUN THIS REQUEST SO I CAN IMPORT IT INTO FILEMAKER PRO. IT IS OPEN IN ADOBE ACROBAT PRO 9.*
    tell application "Adobe Acrobat Pro"
    activate
    end tell
    *I SIMPLY SAVE EVERY REQUEST AS "REPORT". IT JUST RESAVES EVERY TIME A NEW REQUEST COMES IN. SO I WANT TO STREAMLINE THIS STEP BETTER AND HAVE IT JUST SAVE IN THE BACKGROUND TO THE SPECIFIED FOLDER.*
    tell application "System Events"
    tell process "Acrobat"
    save
    click menu item "save as..." of menu "File" of menu bar 1
    keystroke "report"
    keystroke tab
    You are simulating the keyboard. They need to run as you have done.
    delay 1
    keystroke "g" using {command down, shift down}
    keystroke "/users/kellyf/documents/projects/pdf2fmp/ExportPDF"
    keystroke return
    keystroke "s" using command down
    delay 1
    keystroke "r" using command down

  • I have a new computer and want to sync my Iphone and Ipad2 to the new computer, is there an easy way to do this?

    I have a new computer and want to sync my Iphone and Ipad2 to the new computer (PC) instead of the old one, is there an easy way to do this?

    Extract from one of our senior participant.
    Syncing with new computer
    1) Without connecting your iPad to your laptop, start iTunes. Click on Edit. Click on Preferences. Click on Devices. Check the box next to "Prevent your iPod etc. from automatically syncing." Click OK.
    2) Now connect your iPad to your laptop and start iTunes.
    3) When iTunes starts, right click on your iPad under Devices in the left column. Select Transfer purchases etc.
    4) After it finishes transferring all your apps to your new laptop, right click on your iPad and select Backup your iPad.
    5) After it finishes backing up your iPad, right click on your iPad and select Restore etc.
    6) After it finishes restoring, left click on your iPad , then click on the Apps tab on top, and check the box next to Sync Apps, then click on Apply below.
    If everything on your iPad looks good after the sync, go back and click on Edit / Preferences / Devices and UN-check the box next to Prevent your iPod etc. The only other thing you may want to check is if your contacts, bookmarks, etc. are syncing correctly now. If not, go to the Info tab after connecting and make sure you indicate which features you want to sync with what sources.

  • I have a new macbook pro and want to transfer my Mail autofill from my old mac. Never used Time Machine or Migration Assistant -- looks complicated. Any easy way to do this?

    I have a new macbook pro and want to transfer my Mail autofill from my old mac. Never used Time Machine or Migration Assistant -- looks complicated. Any easy way to do this?

    caitlinfromcambridge wrote:
    Thanks -- I would like to try this. I do not know how to reach hard drive from old mac to new. Can you help me with this?
    There are two ways - you can boot your old Mac in Target Mode (reboot your Mac, and as soon as you hear the startup chime hold down the T key on the keyboard until you see the yellow/orange Firewire logo on screen).  You can then use a FireWire cable to connect your new mac to your old one.  The old Mac hard drive will appear on your new Mac as if it is an external hard drive.
    Details on Target Disk Mode:  http://support.apple.com/kb/ht1661
    If you don't have a firewire cable but you do have a home network (i.e. both computers can access the Internet at the same time), you can share the hard drive on your old Mac and then connect to it on your new Mac.
    Good article on sharing your hard drive:  http://support.apple.com/kb/HT1549
    Finally, if the above doesn't thrill you, you can hook an external drive to your old Mac, copy the mail folder over to it, then connect the external drive to your new Mac and copy it over.  It's two steps, but if you don't have a firewire cable and aren't comfortable with sharing over a network it will work just as well - you just have to wait for the mail folder to copy twice instead of once.
    If you get stuck post back!

  • Please tell me - there absolutely MUST be an easier way to 'duplicate' a page! A simple ⌘D use to work in my older version - HELP :'(

    Please tell me - there absolutely MUST be an easier way to 'duplicate' a page! A simple ⌘D use to work in my older version - HELP :'(

    Sorry, but no.  Pages 4 is still in an iWork folder within your Applications folder.  You can use that to get work done.
    Please also let Apple know at:
    http://www.apple.com/feedback/pages.html

  • I have two iTunes libraries I need to merge.  Both contain over 34,000 songs, so I cannot do this manually.  Is there an easy way to do this?

    I have two iTunes libraries I need to merge.  Both contain over 34,000 songs, so I cannot do it manually.  Is there an easy way to do this?

    Drag the media folder from one over to an open iTunes window.  Go away and have a long lunch.  Of course if you have a lot of common content you will be spending your next vacation sorting out the duplicates.  Oh, you can search the Internet because I am sure somebody has some wonder tool that purportedly prevents duplicates, not that I would trust any automated method.  I always deal with duplicates one by one.
    Consolidating Multiple iTunes Libraries - http://www.ilounge.com/index.php/articles/comments/consolidating-multiple-itunes -libraries-api1/ - Basically using consolidate/organize to make sure all your media are in one place, then copying media from a second library to the main one by simply adding the media as new files.
    Commercial software that purportedly helps merge libraries (not a complete list, nor have I tried any of them):
    http://supersync.com/
    PowerTunes - http://www.fatcatsoftware.com/powertunes/ (commercial software)

  • Import a playlist from Spotify to buy the songs on iTunes?  Why isn't there an easy way to do this?  Low hanging fruit Apple.

    Import a playlist from Spotify to buy the songs on iTunes?  Why isn't there an easy way to do this?  Low hanging fruit Apple.

    Yeah, once people get hooked on streaming music, they tend to be much less interested in purchasing downloads, and especially not from a music store that sells songs in an inconvenient (AAC) format instead of the de facto standard, MP3 format.
    However, let me not deter you.  If you would like to make the suggestion to Apple, you can use the iTunes Feedback page:
    http://www.apple.com/feedback/itunesapp.html

  • I want to print from my iPad in my truck. Is there an easy way of doing this?

    I want to print from my iPad from inside my truck. Is there an easy way to do this?

    The bluetooth is generally meant for keyboards and speakers, no idea if it'd work with a printer.
    I suppose you could shop for printers and look to see if one specifically mentions compantibility with iPads.
    The iPad was created to be a consumption device. Used to consume data, watch movies, read books, listen to music. functionality like what you're wanting is beyond how the device was originally conceived, so it requires tweaking and fixing.
    There are other devices out there that have more functionality, including some that might hardwire to a printer. The easy part would be power for the printer. A $25 inverter will give you that in your vehicle.

  • How do i switch my itunes account from old laptop to pc. already have home sharing with the pc. any easy way to do this?

    how do I switch my itunes account from old laptop to pc. already have home sharing between the laptop and pc, laptop is the primary account for my iphone and is about to die. I don't want to lose contacts, photos,etc. any easy way to do this?

    Copy everything from your old computer, or your backup copy of your old computer to your new one.
    You can use and external drive/flash drive/dvd/cd/etc.

Maybe you are looking for

  • Firefox is preventing Java from loading Pogo games which require it

    I have just updated to the latest Firefox and now java is being prevented from loading Pogo games which require it. I have unchecked the block popups box and enabled java script but each time I try to load I get a message on the java concol saying pe

  • TF10175: The team project does not exists

     use visualstudio online for repository. I removed [ProjectName] project from collecection of project After that I got error only on one computer TF10175: The [ProjectName] team project doesnot exist. Any idea to solve this issue ?

  • Kereros error in event viewer logs.

    Hi All, We have configure Vintella SSO on XI3.1 previously and for some reasons now we have changed to NTLM SSO but still we are observing kerberos error in event viewer logs. Error1 : Kerberos error was received on log on session , client time and s

  • Outlook 2010 Hangs at Loading Profile

    We just updated our network with all Server 2008 R2 servers, Exchange 2010, and Office 2010 Pro. We have isntalled Office 2010 on all machines and all has been working fine for the last 2 weeks. Over the last 3 days, we now are having some problems w

  • When is it appropriate to use "spanning-tree bpdufilter enable"

    What exactly does enabling bpdu filter do?  I see some examples where bpdu filtering is enabled on access ports?  Is this correct or are there dangers in this approach?