Most annoying error in the world

Hi, I've been having problems with the following code:
public static Person[] calcRelative(Person[] calcArray, int len){
     for(int p =0; p<len ; p++) {          
          int convert = Integer.parseInt(calcArray[p].Num);
          calcArray[p].Father = (convert * 2);
          calcArray[p].Mother = (calcArray[p].Father + 1);
          System.out.println("person: " + calcArray[p].Forename + " " + calcArray[p].Surname + " *Father: " + calcArray[calcArray[p].Father].Forename + " " + calcArray[calcArray[p].Father].Surname + " *Mother: " + calcArray[calcArray[p].Mother].Forename + " " + calcArray[calcArray[p].Mother].Surname);
          if(calcArray[p].Partner == 0){
               calcArray[p].Partner = (convert + 1);
return calcArray;
The idea of this code is that the when the following text file is read in and stored in an object array, the method above will set up the numbers of each relative. Before the numbers go into the array they are correct. However when they are retrieved they are one more than they should be. and I cannot see why. The file read is as follows:
1.      Mark Jameson.
Parents
2.     Chris Jameson. He married Jessica Alburn.
3.     Jessica Alburn.
Grand Parents
4.     Gary Jameson. He married Racheal Hunter.
5.     Racheal Hunter.
6.     Jonathon Alburn. He married Janet Jones.
7.     Janet Jones.
Great Grand Parents
8.     Edward Jameson. He married Katie McHarbour.
9.     Katie McHarbour.
10.     William Hunter. He married Laura Berk.
11.     Laura Berk.
12.     Gary Alburn. He married Claire Jackson.
13.     Claire Jackson.
14.     Mark Jones. He married Claire Smith.
15.     Claire Smith.
It reads in fine and the object attributes are all set fine apart from the relatives. When tested for example, I try to achieve the object instance in position two of the array. However for whatever reason, unknown, the object in position 3 is retrieved.
I cannot see from my code why this happens? Can anyone point out to me what is going wrong please.

This may seem like a silly question if you know this already, but you do realize that the first element in an Array, or any Java Collection Object, has an index of 0?
That is, an array of 5 names would look like this:
myNames[0] = "Bob";
myNames[1] = "Mary";
myNames[2] = "Jim";
myNames[3] = "Rose";
myNames[4] = "Anthony";

Similar Messages

  • OMG The Most Annoying Error in the History of iPhoto! "Alert, Photo Missing

    This is driving me absolutely insane. EVERY photo that is imported into my iphoto brings an "Alert" that says, "The photo "Blah blah" could not be opened because the original item cannot be found". It's like, I DON'T CARE, upload the photo. How do I get rid of these errors that are meaningless?

    What type of library are you using: a referenced library< where the photos are not copied into the library when imported< or a managed library, where the photos are copied into the library? Does the message ask you to find the original file? If so then it's a referenced library.
    It will depend on the type of library as to how to go about trying to recover it.
    <blockquote align="left">
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Is there a solution to the most annoying problem in the world (the clipboard cannot be emptied)?

    I have tried everything!!!
    200b$ company cannot fix a simple copy-paste?!

    Maybe the third party causes such an issue.
    I saw someone who has the similar issue said:
    If you have any remote access software like VNC or TightVNC you may want to uninstall them and try the Excel program again. I had this issue and narrowed it down to the TightVNC program installed
    Please have a try.
    Wind Zhang
    TechNet Community Support

  • BT- Probably the most useless company in the world...

    After 2 or 3 years of hell with this company and nobody willing to help I thought I would write here so anybody else thinking of joining BT will make the correct decision and stay as far away as possible.
    Firstly after moving house 3 times and being told we would not need an engineer visit when moving and would not be charged they still decided to take the cost of an engineer visit out of our bank account(about £130) all 3 times 2 of which took us overdrawn in our bank account incurring £25 costs and damaging our credit rating. Did anybody at BT care, NO! Managed to get our money back but obviously not the charges incurred from our bank or the damage to our credit score.
    We have now moved house again and been without Internet for 2 months. They claim they cannot re connect the line as someone else owns it. This is probably the most stupid thing I have ever heard the person who used to live here isn't exactly going to magic back into the house and start using it again. We could have another line connected at our own cost. Obviously they have still been charging us for a service we have not had which again we had to call and get refunds for. Does anybody at care, NO!
    So we still have no Internet. We finally managed to get them to see some sense after some very long and tedious phone calls they eventually assured us all our services would be active by the 30th of July. As I sit here today not to my surprise we still have no Internet and no phone line. After another long phone call they tell us we will have Internet by the 7th of august although were not holding out any hopes.
    After reading online it seems many people have the same  issues. BT are obviously not capable of looking after any of its customers, even long standing customers such as ourselves. Even when we decided enough was enough and wanted to cancel our service all together we could not do that unless we paid them £230 or something similar.
    We will of course be leaving BT at the earliest opportunity when we are not tied to the stupid contracts we have had to start again each time we move house. Had it Up to the eyeballs with the poor service and them robbing money from our bank account. I would advise anybody else to stay as far away from BT as possible.
    Shame on you BT.

    A new iPod will connect to your computer and load whatever you have in iTunes. If the PC has been authorised to play purchased songs you don't need to do it again, it's the computer that requires authorisation not the iPod.

  • Possibly the most annoying thing on the face of this planet.

    Obviously I've done something horribly wrong because I absolutely cannot log into a computer I've been trying to set up for my parents. My parents have a 1.25 GHz eMac and needed Leopard installed so they could sync a new iPod touch with iTunes, since Tiger does not support iTunes 10. So I upgraded the computer via target disk mode with an iBook G4 that collects dust in my closet and restarted the eMac, followed through with the setup assistant and created an account. The problem is that directly after the setup assistant finishes and ironically tells me "Enjoy your Mac!", instead of going straight to the desktop like I'm used to, it brings me to a blank login box. It shakes no matter what I put in. Even the user name and password I just created. If anyone happens to know what's up, I'll be forever grateful!

    Which exact procedure did you use? If you booted the ibook and installed to the e-Mac then the installer may have put an ibook version of the OS onto the e-Mac. If the e-Mac does not have a DVD drive you can borrow the ibook's drive by putting the ibook in TDM and do it that way around.

  • Firefox keeps scrolling after I release the up or down arrow on the scrool bar. Most annoying. Makes the scrollbar arrows unuseable. Fix???

    SuSE 11.2. Firefox 3.6

    Does the scrolling stop if you click in the browser window or the user interface?
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Premiere has the most enoying error ever in history

    Hello people, I'm working at a project that involves a lot of Premiere and after I've progressed with it, it gives me the most killer error ever. How can I solve this? I can't recover my work, so everytime I have to start over from some point it auto-saved. Please help me with this!
    I'll be waiting for your suggestions.
    Thanks!

    So... this isn't actually any help, but I would have to say the most annoying error message ever is FCP's "General Error". Which would then be followed by your system crashing. Has to set a record for least informative error ever, and it used to come up fairly often.
    I'd follow Steven's advice, and import either you project or sequence into a new project.

  • Annoying error 2:  ViewController may not respond to -enableBBI

    Developers,
    This is my second annoying error. The code works fine, but i get the following error message when i run the app "viewcontroller may not respond to -enableBBI".
    The code i am using is below and i have placed ///Error/// next to parts of the code that trigger the error. The part of the code that shows an error is used to enable a Bar Button item.
    Is there anything i can do to prevent this? or does it not really matter?
    Ray, i am hoping you will have a quick glance over this. The code is something you gave me in the past. Perhaps you have a solution?
    james
    -(IBAction)NextItem {
    int count = [flashCards count];
    if (counter < count - 1) {
    NSDictionary *nextItem = [self.flashCards objectAtIndex:++counter];
    Label1.text = [nextItem objectForKey:Question_KEY];
    [self enableBBI]; ////Error//////
    -(IBAction)PreviousItem {
    if (counter > 0) {
    NSDictionary *nextItem = [self.flashCards objectAtIndex:--counter];
    Label1.text = [nextItem objectForKey:Question_KEY];
    [self enableBBI]; ////Error//////
    - (void)enableBBI {
    int count = [flashCards count];
    next.enabled = counter < count - 1 ? YES : NO;
    prev.enabled = counter > 0 ? YES : NO;
    flip.enabled = count > 0 ? YES : NO;
    Message was edited by: james_coleman01

    See xnav's suggestion, then add the following at the end of the file and move enableBBI inside:
    @implementation YourViewControllerName (PrivateMethods)
    - (void)enableBBI
    @end
    Using categories in this way is just a trick to simulate private methods in Objective-C. That way, you can define your methods where you want in the file without having to put them into the header file for all the world to see.
    You can create new categories for any class, including Cocoa classes like NSString, etc.
    Message was edited by: etresoft

  • SQL server agent jobs throws random errors while the ETL process works fine.

    Hi,
    I have this problem with SQL agent jobs.
    We went from sql2008 to sql2012 and migrated SSIS without problems. The ETL process runs fine and the OLAP cubes are processed.
    I have a job which calls the master execution dtsx for a particulair customer. When the ETL load and OLAP is processed it should go to the next customer. The problem i have is that the agent logs some errors for random customers. I tried to do only two clients
    in one job this works then i add the third client and then it fails (log wise) for a customer which did run successfully before when there were only two customers.
    Despite the error message the ETL did run, there were no duplicate keys and OLAP was processed???
    Im very close to pull all my hair, because some combinations like two customers work, and placing these two customers with a third one it then fails again. (again cubes are processed and data is integer yet i keep getting these annoying errors in the log)
    Perhaps someone could help me further. 
    -Miracles are easy, the impossible takes a bit longer-

    Just double-click on the Agent job, then click on Steps property page (on your left), you must be able to see a list of steps with the action "On Failure" which you should examine.
    Arthur My Blog

  • HT1657 Downloaded rush yesterday on my iPad2 - went to watch it today. 1.23 seconds in I get error message "cannot load video" Most annoying! Not happened before. Please ether fix or give me my money back

    Downloaded "Rush" yesterday on my iPad2 - sat down to watch it today. 1.23 seconds in, I get error message "cannot load video" Most annoying! Not happened before. Please ether fix or give me my money back asap
    Jody

    We are fellow users here on these user-to-user forums, you're not talking to iTunes Support nor Apple.
    What have you tried to fix it ? Have you tried closing the Videos app via the iPad's multitasking bar and seeing if it plays properly when you re-open then app ? Have you tried a soft-reset of your iPad ? If neither of those fix it then are you in a country where films can be redownloaded (assuming that it's not a rental) ? If you are then delete it from the Videos app and redownload it via the Purchased tab in the iTunes store app.
    If you can't redownload it (e.g. if it's a rental) then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • My new speakers make the most annoying hissing noise!

    I have just purchased a set of creative megaworks 250d, now having owned an older set of speakers from creative in the past (dt surround system) i had expected the same good quality sound and craftsmanship.
    What did i get? The most annoying hissing sound in the world!
    I switch my system on and it gives out an audible hiss which can be heard upto 5-10meters away, this is completely ridiculous and pretty much ruins any sound which isnt played at a loud level!
    Ive contacted creative customer support who told me to return my product? well, fat use that is when i got my system from ebay and apparently the entire range does the same thing anyway?
    Please no comments about how my system is setup wrong and whether i have power interference, because just to check this i've been to maplins today to buy a power conditioner/filter (which cost me ?100 i may add) and a ground loop isolator, neither of these made any difference at all, still the digital snake invades my ears every time i turn the system on.
    Now i dont know what your trying to pull down at creative labs, but i can guarantee you wont be staying in the market lead making 'high quality computer audio products' that are by design defective. I want a valid solution to my problem please, i see 100 other threads on the internet concerning the same thing and quite frankly its not good enough. How much would it have cost you to install a pass filter inline to the amplifier to reduce this hiss? or is there one and its broken? is it the remote like some people are suggesting?

    *BUMP* Any solution would be good? im fairly adept with electronics so dont mind taking the unit apart if a technician would like to tell me how to fix this hiss. Would a low pass filter on the speaker line be a good solution or maybe ferrite coils on the positve wire?, would either of those work before i go out and spend yet more money?

  • HT203200 Have deleted temp video, configured anti spam and firewall, and one specific video keeps giving me an error. Just tried downloading a previous episode of the show and it worked just fine. Always sunny in philly "Charlie rules the world" anyone el

    Have deleted temp video, configured anti spam and firewall, and one specific video keeps giving me an error. Just tried downloading a previous episode of the show and it worked just fine. Always sunny in philly "Charlie rules the world" anyone else??

    Have deleted temp video, configured anti spam and firewall, and one specific video keeps giving me an error. Just tried downloading a previous episode of the show and it worked just fine. Always sunny in philly "Charlie rules the world" anyone else??

  • I purchased photoshop elements and i am having all the problems in the world installing it.... first the link in the emails were errors and secondly i have downloaded and installed multiple times and it says my serial number from the email i received is i

    I purchased photoshop elements and i am having all the problems in the world installing it.... first the link in the emails were errors and secondly i have downloaded and installed multiple times and it says my serial number from the email i received is incorrect.... please help

    Ok, since this forum is for Photoshop Standard and Photoshop Extended, we don't know much about Photoshop Elements. There is a Photoshop Elements forum and I'll link it for you since they best know how to field your questions.
    Photoshop Elements
    Good luck on it! 
    Gene

  • In your experience what are the most common errors in binding files when deploying?

    As the title suggest I'm interested in discussing the most common errors in binding files when deploying.
    Reason for this is that I'm currently working on a Powershell script that can parse a binding file and create a reader friendly report (rtf format) with various information.
    But the main purpose for this script is to find common errors in the binding file used. And so far these are the ones I've thought of:
    - Tracking enabled for either services or the pipelines they are using (if it's a binding meant for Prod).
    - Orchestrations logical ports not having any ports bound to them.
    - URI containing certain words that's not ok. For example if a binding meant for Prod contains the word "test" anywhere in the URI then that should be reported in the created rtf report. This also applies vice versa.
    So now I need your help with coming up with more ideas on common errors that need to be looked after and reported on if found! 
    Additional features the report should contain:
    - Listing the details of each orchestration, send port, receive port along with their associated receive location(s). To better understand and get a quick overview on exactly what settings are planned to be deployed. Especially the "TransportTypeData"
    section which otherwise can be quite tedious to read.
    - List each unique host instance, so that I can easier see directly which ones might need a restart after an import.
    I'd appreciate if you can come up with any more features that should be included in this script.
    /Christian @ IntegrationAdmin.com

    Filter on send port not on the same line as the Filter tag.
    This one is a nice one, I ran into it several times. Mostly after copy/paste of a port definition for a binding file, because Visual Studio is formatting after paste the XML in a way the filter will get invalid. This leads to a cryptic error
    during importing the binding.
    http://winterdom.com/2008/06/biztalkfiltersnotgettingimported
    Jean-Paul Smit | Didago IT Consultancy
    Blog |
    Twitter | LinkedIn
    MCTS BizTalk 2006/2010 + Certified SOA Architect
    Please indicate "Mark as Answer" if this post has answered the question.

  • Flashplayer pop up box  "Requesting permission to store info on my computer" does not respond and will not go away. How do I get rid of it. It is most annoying as it stays right in the middle of the screen.

    Flashplayer pop up box  "Requesting permission to store info on my computer" does not respond and will not go away. How do I get rid of it. It is most annoying as it stays right in the middle of the screen.

    Move cursor onto video.  Right click.  Click Settings,  Click the "never ask again" box. Then click Close.  That will work.
    For some reason, that always worked for me, but in the last two days, it does not work, and it seems to freeze on the
    video.  See, if it works for you.

Maybe you are looking for

  • Replacing many spaces with single space in a string

    Hi! I have the following strings: "Eric       B" "John                 A" "Mary Anne   C"But I want them to be like this: "Eric B" "John A" "Mary Anne C"Do anyone have an idea how to do this? Edited by: suladna on Aug 2, 2008 5:42 AM

  • Seems to be a common recent iTunes problem

    In searching the forum, I've found a few people experiencing this problem, but no solutions...perhaps someone has come across a solution? Yesterday, iTunes informed me that my Library file was damaged, saved it under a different name and opened a new

  • END dated resoponsibilities doesn't display after activate in apps 11i

    Hi All, When i activate the end dated responsibilities, its not displaying of the end dated responsibilities in the responsibilities menu after applying the 11i.FIN_PF.G. Any inputs on this issue us appreciated. REgards, OrAc

  • How do i detect whether EXE file is installer or not?

    Hi All, Is there any way to identify provided EXE file is whether installer or normal EXE file? Thanks Thanks SOU

  • Noob - TABLE BREAKING MADNESS!

    Hi, I'm still learning DW so be nice ;) I am using CS3 to make a website for a client. It looks fine in DW: Dreamweaver But then when I preview in Fireworks I get this: Fireworks IE, looks fine however. Is this a known issue or is there something I a