Infuriatingly complex missing parenthesis problem!!

Hi
Im new to this forum but just wondering could anybody help me with this problem (or suggest another solution in sql).
Im developing an application to calculate the distance in kilometres between 2 sets of longtitude and latitude points. Im using the Haversine formula, which in javascript is:
var R = 6371; // km
var dLat = (lat2-lat1).toRad();
var dLon = (lon2-lon1).toRad();
var a = Math.sin(dLat/2) * Math.sin(dLat/2) +
Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) *
Math.sin(dLon/2) * Math.sin(dLon/2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
var d = R * c;
"d" is the distance in km's. Im converting this to sql (im using coldfusion to output variables latitude1 and longitude1, which are hardcoded to cartain values at the moment). To find "a", the sql is:
          select
          Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                    * Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                    + Cos(<cfoutput>#latitude1#</cfoutput> * 3.14159/180)
                    * Cos(L.Latitude * 3.14159/180)
                    * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)
                    * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)
                    FROM
                         tblLocations L
This works find and gives me the correct answer for "a". So next i need to find the value of "c" (using the formula var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a))). Im substituting the sql to find "a" for "a" in that formula. So:
select 2 * Atan2(Sqrt(a), Sqrt(1-a)) from tblLocations
becomes
               select 2 * Atan2(Sqrt((Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                    * Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                    + Cos(<cfoutput>#latitude1#</cfoutput> * 3.14159/180)
                    * Cos(L.Latitude * 3.14159/180)
                    * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)
                    * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2))), Sqrt(1-(Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                    * Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                    + Cos(<cfoutput>#latitude1#</cfoutput> * 3.14159/180)
                    * Cos(L.Latitude * 3.14159/180)
                    * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)
                    * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)))) As "KM"
from tblLocations L
There are 33 "(" parenthesis and 33 ")" parenthesis. But im getting an error "missing parenthesis". Sql should automatically execute the most embedded formulas first and work outwards. But it seems to be failing. Am I forgetting something? Or maybe theres another apporach I could use? I tried embedding a select within a select but I cannot use the "a" answer in the embedded select for calculations in the outer select....its all very baffling!
Thanks
Mark

ya thats true:) i changed it slightly:
     select 2 * Atan2(Sqrt(Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                    * Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                    + Cos(<cfoutput>#latitude1#</cfoutput> * 3.14159/180)
                    * Cos(L.Latitude * 3.14159/180)
                    * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)
                    * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)), Sqrt(1-(Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                    * Sin(((L.Latitude - <cfoutput>#latitude1#</cfoutput>) * 3.14159/180)/2)
                    + Cos(<cfoutput>#latitude1#</cfoutput> * 3.14159/180)
                    * Cos(L.Latitude * 3.14159/180)
                    * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)
                    * Sin(((L.Longitude - <cfoutput>#longitude1#</cfoutput>) * 3.14159/180)/2)))) As "KM"
                                   FROM
                         tblLocations L
It now works fine! Anyway, i'll use the sdo_geom.sdo_distance function. much tidier. thanks a lot for the help!
Mark

Similar Messages

  • Help needed with missing data problem in CRVS2010

    We recently upgraded the reporting engine in our product to use Crystal Reports for Visual Studio 2010 (previously engine was CR9). Our quote report, which has numerous subreports and lots of conditional formatting, started losing data when a quote took more than a single page to be printed. We knew the SQL results included the data, but the report was not printing those lines at all or sometimes printing a partial line. In addition, the running total on the report would exclude the lines that were being missed on the next page. In one example submitted by a customer, 3 lines were skipped between pages.
    I think I have identified two potential issues that document the possibility of data not being included in the report.
    The first potential issue is an issue with the "suppress blank section" option being checked. This issue is supposedly fixed with ADAPT01483793, being released someday with service pack 2 for CRVS2010.
    The second potential issue is using shared variables. This issue is supposedly fixed with ADAPT01484308, also targeted for SP2.
    Our quote report does not explicitly use shared variables with any of the subreports, but it does have several subreports, each in its own section that has the "supress blank section" option checked. We have other reports that use this feature, as well, and they are not exhibiting the problem.
    One different thing about the quote report is that it has a section with multiple suppression options selected. The section has a conditional suppression formula, which controls whether the section is included at all within the report. The section also has the suppress blank section option selected. There are multiple fields within the report that are each conditionally suppressed. In theory, the section's suppress formula could evaluate to true, yet all of the fields within the section are suppressed (due to null values), and then the "suppress blank section" option would kick in.
    The missing data only seems to happen when the section is not being suppressed, and at least one of the fields is being included in the report. If I clear the "suppress blank section" check box, and change the section formula to also include the rules applied to the fields in the section, the missing data problem seems to be resolved.
    Is this related to ADAPT01483793? Will it be fixed in service pack 2?
    If more details are needed, I would be happy to provide a sample report with stored data.

    Hi Don,
    Have a look at the Record Selection formula in CR Designer ( stand alone ) and when exported to RPT format opening that report in the Designer also. 
    There's been a few issues with => logic in the record selection formula. It could be you are running into this problem. Look for NOT inserted into your selection formula.
    Oh and SP2 is coming out shortly so it may resolve the issue. But if you want you could purchase a support, or if you have a support contract then create a case in SMP and get a rep to work with you to debug the issue.
    If you have not try the Trial Version of CR 2011, put it on a VM-ware image or Test PC so you don't corrupt anything for production and have a look at and test it in that designer also. If you purchase a case and it is a bug then you'll get a credit back for the case.
    Don
    Edited by: Don Williams on Oct 26, 2011 7:40 AM

  • The missing library problem.

    I understand that there's already a lot of threads about the sudden disappearance of iTunes libraries, however I'm typing this up because I'd like to point out in a bit more detail what I'm seeing happening to my computer, and maybe have a collective of what's going on. This issue has happened to me five times in the last two months since I've updated to iTunes 11. After searching on google I know the missing library problem has existed since the early 2000s; why this glitch has yet to be fixed 13 years later is beyond me. I have personally never had this problem until updating to 11, and seeing the many other threads on here this appears to me to be an issue with this version of the software more than it has been in previous versions.
    Before I continue, I have tried the following to fix it:
    Simply readded my whole library. It was only wiped again a few weeks later.
    Completely uninstalled and reinstalled iTunes. That didn't work either, so it's not just an updating problem.
    What I haven't tried
    Changing where on my computer iTunes is installed. I have no idea where on the computer might be better or if it will change anything. I have iTunes installed on its default location on my local C: disk.
    Importing the music directly from my iPod into iTunes. Can this be done? If so, how? Not everything on my iTunes is a store purchase, most of it is imported CDs and also amazon purchases too. So I don't know if the transfer purchases option works. While this wouldn't fix this current issue, I would like to know how to do this if possible since it would just be a quick fix whenever this happens.
    What is happening:
    So each time this has happened, what occurs is that like many other people, one day I open my iTunes and everything is in order. Then the next, for no reason, all of my libraries are gone but the music is still on my computer, organized in their files the way iTunes had them done so upon importing. I can't use the .itl files in the "previous libraries" folder because they have also been re-written. Upon opening them, even if their last save was on a day I know everything was in working order, opening them does nothing but give me the same blank default page.
    What isn't mentioned in a lot of the posts regarding this issue, is the sudden crop of temporary files in the iTunes folder.
    The ones that have cropped up for me personally are the following:
    iT 1.tmp
    iT 2.tmp
    iT 3.tmp
    iT 4.tmp
    Temp file 1.tmp
    Temp file 2. tmp
    Those were not there the last time I used iTunes, and they're never there on the days I've used it before and it has worked correctly. However every time my library is wiped, these files suddenly appear without fail, every time. I can't open them, I can't do anything with them except delete them. I believe I remember reading somewhere that this might be an issue regarding with how the program is saving the progress of your library changing, and that the temp files are there until it can "officially" save what has happened to your library. While I didn't change anything in my library in the last couple of weeks, I'm assuming this also counts things like play count.
    My own personal opinion
    Seeing just how many threads with this issue are popping up, this leads me to believe that this isn't just a problem with my personal computer or my personal install of iTunes 11. These temp files also lead me to believe that as well. In other words, whatever glitch has existed with iTunes since the early 2000s is for some reason running rampant in version 11.
    TL;DR:
    Please developers, actually look at this library glitch within the program itself. It can't just be an individual user's problem because way too many people are experiencing it.

    No worries. You've probably run into one the other threads I've posted to but I'll add my thoughts here anyway...
    Empty/corrupt library after upgrade/crash
    Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping.  Note that in iTunes 11 an "empty" library may show your past purchases with links to stream or download them.
    In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
    Alternatively, depending on exactly when and why the library went missing, there may be a more recent .tmp file in the main iTunes folder that can be copied and renamed as iTunes Library.itl to restore the library to an earlier state. Look for a recent .tmp file that is similar in size to the .itl files in the Previous iTunes Libraries folder. If it has happened repeatedly you may want the earliest such file generated since the last iTunes upgrade.
    If applicable, see iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
    When you get it all working make a backup!
    Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device.
    I've noticed more of these missing library posts of late and a common factor to most since I started asking is AVG Anti-Virus. It seems in some cases it might be at least part of the reason why the library file disappears. Try excluding the iTunes folder from any AV scanning process.
    tt2

  • Missing Pictures problem

    Missing Pictures problem, I work with Adobe Illustrator CS2 at work & CS3 at home but i have the problem with both. I have a problem with missing pictures from time to time after saving the file & moving the image from original location. I know you have to link the images/files and leave then where the are or you can embeded them. So in my option box i un select the link the files box & i still get the missing files problem, when re-opening the AI file.
    Does anybody know why? Or what I can do to avoid this?
    Thanks

    steve fairbairn wrote:
    Always try to keep your pictures in the same folder as your artwork.
    However you can also make aliases of your pictures and keep them in the folder.
    Aliases are better at tracing their origins than Illy is.
    Steve,
    Could you expand on that a bit please...  the "make aliases of your pictures", i mean...
    TIA,
    JJ

  • Profit center and comapny code missing authorization problem.

    Could you help any body,i have some missing authorization problem with profit center and company code,
    How to search the roles  which having require profit and company code values.
    Is there any way to search.
    Please let us know very fast.
    Thanks in advance

    Another, and probably much easier way, is just to use Ctrl + Y... and use subsets of the selections in the SUIM reports.
    But I can well understand the temptation to use tables or at least double-check the SUIM output against them.
    The bugger with tables is that you can easy make the same mistakes or more than the SUIM reports do, or use old obsolete tables, or incorrect logic when interpreting single fields of the user tables.
    Personally,  I would normally check the exits first. Developers don't always raise self-explanatory messages...
    Cheers,
    Julius

  • Right parenthesis problem !!

    Hello
    I'm trying to make something simple work, and it doesnt.
    When trying that :
    declare
    solde number;
    journal varchar2(2);
    dossier varchar2(12);
    begin
    journal:='21';
    dossier:='1707029205';
    execute immediate 'select sum(a.debi)-sum(a.cred)
    into solde
    from auxiloc a,
      dossier d,
      client c
    where d.clie =c.code
    and a.doss in (select o.code from dossier o where o.clie=c.code )
    and a.cmpt   =4111
    and a.xdate <=
      (select dar2 from qt:1 where doss=d.code
    and d.jqt =:2
    and d.code=:3' using journal,journal,dossier;
    end;I get a "Missing right parenthesis" on line 8, which is the line with the execute immediate.
    Obviously, there's no missing parenthesis, I'm must be missing something else, but what ?
    The request as :
    select sum(a.debi)-sum(a.cred)
    --into solde
    from auxiloc a,
      dossier d,
      client c
    where d.clie =c.code
    and a.doss in (select o.code from dossier o where o.clie=c.code )
    and a.cmpt   =4111
    and a.xdate <=
      (select dar2 from qt21 where doss=d.code
    and d.jqt =21
    and d.code=1707029205;is working without a glitch...
    clues ?

    OK, I was (wrongly) assuming that execute immediate statments were working just as a regular one, now it's corrected and it works with:
    create or replace
      FUNCTION sc_ar
          dossier IN varchar,
          journal IN varchar )
        RETURN number
      AS
        solde number(11,2);
      begin
        execute immediate 'select sum(a.debi)-sum(a.cred)   
            from auxiloc a,     
            dossier d,     
            client c   
            where d.clie =c.code   
            and a.doss  in     
            (select o.code from dossier o where o.clie=c.code     
            and a.cmpt   =''4111''   
            and a.xdate <=     
            (select dar2 from qt'||journal||' where doss=d.code     
            and d.jqt =:1   
            and d.code=:2' into solde using journal,dossier;
      RETURN solde;
    END sc_ar;thx for your help.

  • Verizon is releasing another update tommorow: ED05 did not fix the miss call problem

    I got  two voice mails today that did not show as missed calls . I call Verizon technical support and ask to speak to a  manager. He told me that several people are still having miss call problems and to expect a new update august 1 which is tommorow. I told him this is the last straw , if this new update doesn't work for me, they are going to have to give me a different phone or release me from my contract. This is so frustrating.

    I called Verizon 2nd level tech support and they assured me there is NO ED06 update's said they haven't even finished rolling out ED05 yet. I think they just told you that to get you off the phone. I also have a Fascinate and have had problems and can't get them to replace my phone with a different device. I want the Droid Charge since it is the only other one that has the AMOLED screen that I originally chose the Fascinate for . They had a program that ended on July 28th the day that ED05 rolled out. They offered the Droidx, the Incredible 2, and the Droid Charge to replace the Fascinates that were having trouble. I had called to report my issues during this replacement program but was not told that it was going on and now they won't give me the Droid Charge because it has expired. I think since there are STILL issues-they need to bring this program back and allow us to get a different phone. I have been a customer of Verizon for 10 years and have 7 lines so I am REALLY disappointed that they can't work with me (or other customers ) especially since it is not something we did to the phone. It is a problem with either Verizon or Samsung. I don't know where to go from here but maybe if they hear enough from others that didn't have any success with ED05 they will start to replace them. I will probably go to a higher level to voice my concern. Let me know if anyone has any success getting a new device especially the Droid Charge.

  • Complex IDOC mapping problem

    Hello,
    I'm stuck with a complex mapping issue that I can't figure out.  I'm trying to pull 0..N Variant Configuration segments from the ORDERS IDOC and map it into a 0..N XML segment.
    The inbound ORDERS IDOC is structured like this:
    IDOC
    ...E1EDP01  (Item segment 0..N)
    ......E1EDP19 (Product data 0..5)
    ...........Z1EDPIT  (Configuration Data 0..N)
    .................ATUE1   (Description)
    .................ZCODE   (Category)
    .................RTWTB  (Value)
    Target XML:
    Order  
    ....Item  (Item segment 0..N)
    .......Product  (Product data 0..1)
    ............VariantConfig  (configuration data 0..N)
    ....................Description
    ....................Category
    .....................Value
    I need to create a new VariantConfig segment in my XML for every Z1EDPIT segment for that PO Item.  But I need to skip any Z1EDPIT segments when ATUE1 = 'OPTIONS' or when ATUE1 does not exist.
    The problem I'm running into is that my mapping is capable of creating the VariantConfig segment under those conditions but the following mappings used to create the Description/Category/Value are unable to skip the Z1EDPIT segments.
    For example:
    IDOC
    ...E1EDP01 
    ......E1EDP19
    ...........Z1EDPIT 
    .................ZCODE     = REQT
    .................RTWTB     =  5644
    ...........Z1EDPIT 
    .................ATUE1     = Finish
    .................ZCODE    = REQT
    .................RTWTB    = 7712
    The output XML should read:
    Order  
    ....Item 
    .......Product 
    ............VariantConfig
    ....................Description   = Finish
    ....................Category      = REQT
    .....................Value          = 7712
    So I determine to create the VariantConfig segment if ATUE1 exists and does not equal 'OPTIONS'.  So my mapping creates one VariantConfig segment because the second Z1EDPIT qualifies.  But each element within that node is reverting back to the first Z1EDPIT segment.
    I thought the top of the Node (VariantConfig) would determine the context for the following fields.  Therefore, when the 2nd Z1EDPIT segment generates the VariantConfig node then the elements should refer to the current context of the root node (VariantConfig).
    What tools does PI's mapping provide to resolve a situation like this? 
    Any suggestions?
    Thanks,
    Matt

    Job,
    Thanks, for the responses!
    What do you mean by "add a context change for the fields". 
    Is there some mapping function to add a context change or is this a UDF I need to write to handle the context changes when ATUE1 is missing or equal to "OPTIONS".
    In my example:
    VariantConfig:
    ATUE1 (E1EDP01) >mapWithDefault [OPTIONS] equatsS [OPTIONS] -> Not ->createIf->VariantConfig
    Sub Element
    Category
    ATUE1 (E1EDP01) >mapWithDefault [OPTIONS] equatsS [OPTIONS] -> Not ->ifWithoutElse>ZCODE->Category
    The problem is that this does not keep the ATUE1 and the ZCODE in the same Z1EDPIT segment.  So I get the first ZCODE value when I only want the 2nd.   Even if I insert a context change I can't say for sure that next time I won't have 5 Z1EDPIT segments missing the ATUE1 segment before I find my first good segment that I need to map.
    ...confused...
    Thanks,
    Matt

  • Formula node parenthesis problems

    Hi Y'all,
       I'm going cross-eyed trying to figure out what is wrong with the equation that I'm trying to use in a formula node. I've attached both the VI (version LabVIEW 2009) and the error msg. Unfortunately there are a couple more of these, but maybe if I get the problem with this one pointed out to me ...
    Thanks!
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion
    Solved!
    Go to Solution.
    Attachments:
    Calculate Discharge coeff.vi ‏7 KB

    Ha ha ha, thank goodness for Mac's. When I went back and replaced all the "-" with "-" it fixed the problem. The problem was that I had copied/pasted from a pdf document, and what was displayed in the formula node wasn't what it was seeing! So much for WYSIWYG!
    What a PAIN! It didn't say "What the heck is this weird character", told me that I alternately was missing a right hand parenthesis, or a semi-colon.
    Thanks,
    Message Edited by LV_Pro on 10-21-2009 12:39 PM
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Photos are Missing messages Problem constantly showing up

    I screwed up. I had iPhoto link to my photos on my hard drive rather then importing/embedding them into the iPhoto library but then I believe I reorganized all my original folders (merging, file renaming etc.). So that is one reason I am getting missing photo messages. I thought iPhoto would automatically track the originals but that was probably a wrong assumption.
    Not sure how to find/mark which photos are all missing and reconnect them to where they are located now and how to fix it so I don't get the messages. I have to go through around 300 "Can't Find Photo dialogs" if I accidently click on a orphaned photo (thumbnail without a photo).
    I have made some changes to some photos in iPhoto and I would prefer not to lose those changes. I don't want to lose my Current Albums and Books and Slideshows etc. But I'm guessing I need to backup and re-import all my photos again in a new library but that cause me to lose my meta-data (Albums, Phtot Changes, Slideshows etc.)
    I tried rebuilding the library but it still prompted me with the "Can't Find Photo Questions" and never really solved the problem.
    The reason I didn't embed was I wanted other application to be able access my photos without having to go through the trouble of exporting them first, and also to save space. But I saw a 1TB drive for $370 so maybe space shouldn't be the issue anymore and I have iPhoto Library Manager so there should be no problem with having my library on a different drive then the pictures folder on the HD.
    It would be sure nice if most Apple applications (Final Cut Studio for example)could select from the iPhoto or Arpeture (I was thinking of buying) library.
    Anyway any suggestion on how to fix my orphaned photos without losing all my changes?
    Dave

    I just noticed it as well out of the blue. Could have sworn that it always worked and suddenly stopped without any updates or anything.
    The "right click-paste" function of a jpeg is not working in apple mail. You can drag and drop a picture into the email, or "right click-copy image" and "command -v" it into the body of the email and see the picture but "right click-paste" only produces the "box with the blue question mark". This is only happening in mail as far as I know, in .pages "right click-paste" works just fine.

  • HELP Can you see the missing parenthesis ?!

    Dear People,
    I am doing a simple program that creates a ContactBook and allows keyboard entry of lastName, telephoneNumber and emailAddress.
    I have a few error messages that say parenthesis missing but I don't
    see any missing ! :
    "Note.java": Error #: 200 : '{' expected at line 15
    "Note.java": Error #: 200 : '}' expected at line 59
    "TryContactBook.java": Error #: 200 : ')' expected at line 30
    "TryContactBook.java": Error #: 200 : ')' expected at line 42
    below is the coding
    thank you in advance
    Stan
    import java.util.*;
    public class TryContactBook
       private Note note;
       public static void main(String[] args)
         ContactBook myContactBook = new ContactBook();
         FormattedInput input = new FormattedInput();
         Note note = new Note();
         System.out.println("Enter the number of new notes you wish to record ");
         int numberOfNotes = input.readInt();
         System.out.println("Ready to record " + numberOfNotes + "note(s) ");
         for (int i = 0; i < numberOfNotes; i++)
           try
             System.out.print("Enter a last name: ");
              note.setLastNaame(input.readString());
             System.out.println("last name input is: " + notes.getLastName());
           catch (InvalidUserInputException e)
              System.out.println("InvalidUserInputException thrown when inputting last name. \n" +
                         e.getMessage());
            try
               System.out.println("Enter a telephone number ");
              note.setTelephoneNumber(input.readString();
             System.out.println("telephone number input is: " + notes.getTelephoneNumber());
           catch (InvalidUserInputException e)
              System.out.println("InvalidUserInputException thrown when inputting last name. \n" +
                         e.getMessage());
            try
              System.out.println("Enter an e-mail address ");
              note.setTelephoneNumber(input.readString();
              System.out.println("e-mail address  input is: " + notes.getEmailAddress());
            catch (InvalidUserInputException e)
              System.out.println("InvalidUserInputException thrown when inputting last name. \n" +
              e.getMessage());
    =====================================================================
    import java.util.*;
    * A class to maintain an arbitrarily long list of contacts.
    * Notes are numbered for external reference by a human user.
    * In this version, note numbers start at 0.
    * @author Stan Dominski
    public class ContactBook
        // Storage for an arbitrary number of notes.
        private ArrayList notes;
         * Perform any initialization that is required for the
         * notebook.
        public ContactBook()
            notes = new ArrayList();
         * Store a new note into the notebook.
         * @param note The note to be stored.
        public void storeNote(String note)
            notes.add(note);
         * @return The number of notes currently in the notebook.
        public int numberOfNotes()
            return notes.size();
         * Show a note.
         * @param noteNumber The number of the note to be shown.
        public void showNote(int noteNumber)
            if(noteNumber < 0 || noteNumber > numberOfNotes())
                // This is not a valid note number, so do nothing.
            else
                // This is a valid note number, so we can print it.
                System.out.println(notes.get(noteNumber));
         * Remove a note from the notebook if it exists.
         * @param noteNumber The number of the note to be removed.
        public void removeNote(int noteNumber)
           if(noteNumber < 0 || noteNumber > numberOfNotes())
           System.out.println("noteNumber is not valid.");
           else
            notes.remove(noteNumber);
          * List all the notes in the notebook
           public void listNotes()
              Iterator i = notes.iterator();
               Iterator myIterator = notes.iterator();
              while(i.hasNext() && myIterator.hasNext())
                 System.out.print(notes.indexOf(i.next() ) + ":" );
                 System.out.println("" + myIterator.next());
    =======================================================================
    import java.util.*;
    public class Note
       private ArrayList contactInfo;
       private String lastName;
       private String telephoneNumber;
       private String emailAddress;
       public class Note()
            contactInfo = new ArrayList();
           this.lastName = lastName;
          this.telephoneNumber = telephoneNumber;
          this.emailAddress = emailAddress;
        public  void setLastName(String lastName)
           this.lastName = lastName;
              public String getLastName()
                 return lastName;
                    public  void setTelephoneNumber(String telephoneNumber)
                       this.telephoneNumnber = telephoneNumber;
              public String getTelephoneNumber()
                 return telephoneNumber;
                    public  void setEmailAddress(String emailAddress)
                        this.emailAddress = emailAddress;
                  public String getEmailAddress()
                     return emailAddress;
    ======================================================================
    import java.io.*;
    import java.util.*;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.IOException;
    public class FormattedInput
         public String readString() throws InvalidUserInputException
           if(readToken() == tokenizer.TT_WORD || ttype == '\"' ||  ttype == '\'')
            return tokenizer.sval;
           else
             throw new InvalidUserInputException(" readString() failed. ..... Input data is not a string");
         // Method to read an int value
    public int readInt() throws InvalidUserInputException
       if (readToken() != tokenizer.TT_NUMBER)
         throw new InvalidUserInputException(" readInt() failed. " + " input data not numeric");
       else
         return (int)tokenizer.nval;   // value is numeric so return as int
           //helper method to read the next token
           private int readToken()
             try
               ttype = tokenizer.nextToken();
               return ttype;
             catch(IOException e)
               e.printStackTrace(System.err);
               System.exit(1);
              return 0;
           //object to tokenize input from the standard input stream
           private StreamTokenizer tokenizer = new StreamTokenizer(
                                                new BufferedReader(
                                                 new InputStreamReader(System.in)));
           private int ttype;                  //stores the token type code
    ======================================================================
    import java.io.StreamTokenizer;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.BufferedReader;
    public class InvalidUserInputException extends Exception
       public InvalidUserInputException() { }
          public InvalidUserInputException(String message)
              super(message);

    I have out comments on the errors I found. There might be more.
    I couldn't get the indentation to work so it will look a bit funny.
    //David
    "Note.java": Error #: 200 : '{' expected at line 15
    "Note.java": Error #: 200 : '}' expected at line 59
    "TryContactBook.java": Error #: 200 : ')' expected at
    line 30
    "TryContactBook.java": Error #: 200 : ')' expected at
    line 42
    import java.util.*;
    public class TryContactBook
    private Note note;
    public static void main(String[] args)
    ContactBook myContactBook = new ContactBook();
    FormattedInput input = new FormattedInput();
    Note note = new Note();
    System.out.println("Enter the number of new notes you wish to record ");
    int numberOfNotes = input.readInt();
    System.out.println("Ready to record " + numberOfNotes + "note(s) ");
    for (int i = 0; i < numberOfNotes; i++)
    try
    System.out.print("Enter a last name: ");
    note.setLastNaame(input.readString());
    System.out.println("last name input is: " +
    is: " + notes.getLastName());
    catch (InvalidUserInputException e)
    System.out.println("InvalidUserInputException
    xception thrown when inputting last name. \n" +
    e.getMessage());
    try
    System.out.println("Enter a telephone
    telephone number ");
    note.setTelephoneNumber(input.readString()); // 1 error
    System.out.println("telephone number input
    er input is: " + notes.getTelephoneNumber());
    catch (InvalidUserInputException e)
    System.out.println("InvalidUserInputException
    xception thrown when inputting last name. \n" +
    e.getMessage());
    try
    System.out.println("Enter an e-mail address
    l address ");
    note.setTelephoneNumber(input.readString()); // 2 error
    System.out.println("e-mail address  input
    ss  input is: " + notes.getEmailAddress());
    catch (InvalidUserInputException e)
    System.out.println("InvalidUserInputException
    xception thrown when inputting last name. \n" +
    e.getMessage());
    =======================================================
    =============
    import java.util.*;
    * A class to maintain an arbitrarily long list of
    contacts.
    * Notes are numbered for external reference by a human
    user.
    * In this version, note numbers start at 0.
    * @author Stan Dominski
    public class ContactBook
    // Storage for an arbitrary number of notes.
    private ArrayList notes;
    * Perform any initialization that is required for
    for the
    * notebook.
    public ContactBook()
    notes = new ArrayList();
    * Store a new note into the notebook.
    * @param note The note to be stored.
    public void storeNote(String note)
    notes.add(note);
    * @return The number of notes currently in the
    the notebook.
    public int numberOfNotes()
    return notes.size();
    * Show a note.
    * @param noteNumber The number of the note to be
    o be shown.
    public void showNote(int noteNumber)
    if(noteNumber < 0 || noteNumber >
    umber > numberOfNotes())
    // This is not a valid note number, so do
    mber, so do nothing.
    else
    // This is a valid note number, so we can
    , so we can print it.
    System.out.println(notes.get(noteNumber));
    * Remove a note from the notebook if it exists.
    * @param noteNumber The number of the note to be
    o be removed.
    public void removeNote(int noteNumber)
    if(noteNumber < 0 || noteNumber >
    mber > numberOfNotes())
    System.out.println("noteNumber is not
    is not valid.");
    else
    notes.remove(noteNumber);
    * List all the notes in the notebook
    public void listNotes()
    Iterator i = notes.iterator();
    Iterator myIterator = notes.iterator();
    while(i.hasNext() && myIterator.hasNext())
    System.out.print(notes.indexOf(i.next() )
    f(i.next() ) + ":" );
    System.out.println("" +
    println("" + myIterator.next());
    =======================================================
    ===============
    import java.util.*;
    public class Note
    private ArrayList contactInfo;
    private String lastName;
    private String telephoneNumber;
    private String emailAddress;
    public class Note()
    contactInfo = new ArrayList();
    this.lastName = lastName;
    this.telephoneNumber = telephoneNumber;
    this.emailAddress = emailAddress;
    public  void setLastName(String lastName)
    this.lastName = lastName;
    public String getLastName()
    return lastName;
    public  void setTelephoneNumber(String
    neNumber(String telephoneNumber)
    this.telephoneNumnber =
    telephoneNumnber = telephoneNumber;
    public String getTelephoneNumber()
    return telephoneNumber;
    public  void setEmailAddress(String
    lAddress(String emailAddress)
    this.emailAddress = emailAddress;
    public String getEmailAddress()
    return emailAddress;
    }} // 3 error
    =======================================================
    ==============
    import java.io.*;
    import java.util.*;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.IOException;
    public class FormattedInput
    public String readString() throws
    rows InvalidUserInputException
    if(readToken() == tokenizer.TT_WORD || ttype ==
    ype == '\"' || ttype == '\'')
    return tokenizer.sval;
    else
    throw new InvalidUserInputException("
    eption(" readString() failed. ..... Input data is not
    a string");
    // Method to read an int value
    public int readInt() throws
    InvalidUserInputException
    if (readToken() != tokenizer.TT_NUMBER)
    throw new InvalidUserInputException(" readInt()
    nt() failed. " + " input data not numeric");
    else
    return (int)tokenizer.nval; // value is numeric
    eric so return as int
    //helper method to read the next token
    private int readToken()
    try
    ttype = tokenizer.nextToken();
    return ttype;
    catch(IOException e)
    e.printStackTrace(System.err);
    System.exit(1);
    return 0;
    //object to tokenize input from the standard
    andard input stream
    private StreamTokenizer tokenizer = new
    = new StreamTokenizer(
    new
    new
    new
    new BufferedReader(
    new
    new
    new
    new
    new
    new
    new
    new InputStreamReader(System.in)));
    private int ttype; //stores
    stores the token type code
    =======================================================
    ==============
    import java.io.StreamTokenizer;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.BufferedReader;
    public class InvalidUserInputException extends
    Exception
    public InvalidUserInputException() { }
    public InvalidUserInputException(String
    tring message)
    super(message);

  • IE 10 blank new tab and missing favourites problem only when requiring a proxy for first page visit

    We are having a very strange situation with one (only) of our 64bit 2008r2 remote desktop session host servers.  The problem we are having is that when any new tab or window is opened it must first open a page that is in the
    internet options -> connections ->LAN settings -> Advanced -> Exception. Do not use proxy server for addresses beginning with
    Area.  OR ELSE....
    The entire contents of the favourites menu below "Organize favourites" is missing, though the favourites explorer bar, and tool bar display the links, but they cannot be opened in the current tab and will not create a new tab when you click open
    in new tab.  HOWEVER, this problem is instantly resolved if you manually type into the address bar and visit a site that is in the proxy exception list.  Then that tab starts to function normally, the favourites menu is populated and works, and so
    does the favourites explorer bar, and toolbar, and other websites can be visited.
    This is extremely problematic.  Looking at the proxy server logs, when the problem is happening no attempt is made at contacting the proxy server.
    Ways we've encountered this problem
    If the user has the option set that a new tab opens the 'new tab page' then any new tab experiences the problem.
    If the browser is set to open the user's home page(s) then any of the home pages that are not in the exception list may or may not open successfully. But again any of them that opened a page that was not in the proxy exception list will experience
    the problem
    when a user tries to click on a website link from an email or document that is not in the proxy exception list, as this opens a new window or tab and it is just blank.
    when a website not in the exception list tries to open a new window/tab
    This problem is happening for all users on that RD session host server, including domain admins, except for THE domain/enterprise administrator.  Our other 2008r2 64bit RD session host servers and windows 7 machines with the same version of IE
    installed on it does not have this problem.
    We have tried deleting all IE data, resetting IE, re-registering the ieproxy.dll with the regserv32 command and the problem continues.
    Our proxy settings for each user is coming from the group policy setting of 'computer config -> policies -> Administrative Templates -> Windows Components -> Internet Explorer -> Make proxy settings per-machine = enabled'
    and THE domain administrator choosing to enable the proxy server and disable automatic proxy detection.

    Hi,
    Since you have  tried many methods like deleting all IE data, resetting IE, and it works well on other Windows 7 machines, the problem might be some clients didn’t respond to the group policy.
    Try to update the group policy with this command at the clients ”gpupdate /force”.
    And check whether the client is infected with virus, some virus might cause this issue too.
    Regards
    v-yamliu

  • Missing index problem

    Hi Gurus!
    I have a critical problem to solve.
    I have a table without data which is inconsistent because it doesn't have the primary index. When i see missing indexes at DB02, the system tells me that the index is created, but when i go to SE14 and select the primary index, it says the index does not exists on the database and the only option that is active is the one to create the index. If I try to create the index, i get an error saying: there is already a  an object named 'zmed_distr~0' ( my index name ).
    Can anybody help me?
    Thank you in advance.

    the tsystem does'nt create the index and give me this log:
    Request: Create Index ZMED_DISTR-0 (FORM05/11.12.07/19:06)                                                                        
    Process: BLADE04_0                                                                               
    sql:                                                                               
    ALTER TABLE [ZMED_DISTR]                                                                               
    ADD CONSTRAINT [ZMED_DISTR~0]                                                                               
    PRIMARY KEY CLUSTERED                                                                               
    ( [MANDT] ,                                                                               
    [ZUONR] ,                                                                               
    [GJAHR] ,                                                                               
    [KUNNR] ,                                                                               
    [ESTAB] ,                                                                               
    [TXT20] ,                                                                               
    [REPS] )                                                                               
    There is already an object named 'ZMED_DISTR~0' in the database.Could                                                             
    not create constraint. See previous errors.                                                                               
    DDL time(___1): .........3 milliseconds                                                                               
    The SQL statement was not executed                                                                               
    Index   could not be created completely in the database                                                                           
    Index ZMED_DISTR-0 could not be created                                                                               
    Request for ZMED_DISTR could not be executed

  • File missing /cache problem

    Out of 15 pages one opens in Iweb with the message that there are files missing and calls them cache 6 cache 7 and cache 8. Problem is I have no files with those names and have no idea what they refer to because when you visit the site nothing appears to be missing. I know a cache is where things are stored but without an idea of what files are missing how can I remedy this problem or get rid of the msg.
    Any help greatly appreciated
    the prin-Jane

    I had the same problem, and I figured out a way to resolve the issue to my satisfaction. I created a new "Album" page in my site on iweb and moved all the individual pages within the old album to the new one. I then deleted the old Album page and renamed the new one to reflect the original setup I had on my web site.
    I saved, and then published. And it worked great. I did not lose any data this way or all the work I put in creating the individual pages with all my pictures and videos.
    I am guessing the cache files that go missing are part of the "albums" page that we create within iweb. It is not part of the photos or videos that you have as sub-pages of the Album main page. Anyway, this was the situation in my case, and I hope this resolves your problem as well.

  • Missed call problem with 5s

    Hi
    I bought new iPhone 5s yesterday. But I have small problem about missing call.
    When somebody called me and if I missed that call , I can see who called me at the phone tab and last call selection with red colour. And also I can see missed call on the notification center missed tabs.
    But missing calls 24 hours stayed notification center although I deleted last call selection in phone tab. Is it normal for ıos 7 ?
    Thanks for hand.

    Apple is not here. This is a user to user technical support forum. If you would like to provide feedback to Apple, do so here:
    Apple - Feedback
    Cheers,
    GB

Maybe you are looking for