Input Formatting

I am very new to java, i am taking it as a course for my IS major. We have an assignment to create a program that takes in two coordinates and uses them to calculate various distance formulas. I was wondering if there was a way to make it so that two numbers can be entered, separated by a comma, indicating the x and y values of a point, instead of prompting to enter each coordinate separately.

Yes, this can be done. Look into scanning in the input into a String, then splitting the string with String.split( ). You may need to trim before parsing, I'm not sure.

Similar Messages

  • -wap-input-format not working properly in Nokia 58...

    I didn't know where to report this bug, so I'll try here.
    When you create web pages for mobile use you can set various input formats in form elements.
    This helps the user by setting up and validating input even before it reaches the server.
    One of these is the "-wap-input-format".
    I recently ran into a problem with at page that I couln't access from my Nokia 5800 and I decided to figure out why.
    The page has an input field like this:
    <input name="somenumber" type="text" style='-wap-input-format: "10N"' />
    (Which basically tells the phone that in this field you can only enter 10 digits.)
    However, even when I enter exactly 10 digits, the field turns red, and the phone refuses to continue until I "correct my error". The only input that the phone will allow is an empty field.
    However... if the field is made like this:
    <input name="somenumber" type="text" style='-wap-input-format: "NNNNNNNNNN"'/>
    everything works just as it should.
    But... the first type is also correct according to standards and should work too.
    My phone has the V21.0.025 firmware. (and no new updates available yet for this product code.)
    Does anyone know where this bug can be reported, or if its fixed in newer firmware?

    The solution is NOT changing the webpage. The page already follows the correct standard! 
    It its the browser in the XM5800 that has a problem. My example clearly shows this. The phone acts inconsistent depending on the syntax in the wap inputfield. Both of the above syntaxes are supposed to give the same result. But one works, and the other, which is probably the one most often used, does not work at all.
    Right now I use the Opera browser instead to access that page.(Because Opera does not have this bug.)
    My post was simply an attempt to notify Nokia of this problem...  Because I can't find any place to report bugs.
    And at the same time ask users who have the newer version of the firmware, if they know if this problem still exists.
    Message Edited by Timod on 08-Nov-2009 09:04 PM

  • ORA-01820: format code cannot appear in date input format

    I don't understand why I am getting the error below. That should be valid, no?
    TIA for any insight.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    SQL>
    SQL> select to_date('2004 01 3','yyyy mm w') from dual;
    select to_date('2004 01 3','yyyy mm w') from dual
    ERROR at line 1:
    ORA-01820: format code cannot appear in date input format
    SQL>
    SQL> select to_char(sysdate,'yyyy mm w') from dual;
    TO_CHAR(S
    2008 08 1

    LC,
    ORA-01820:     format code cannot appear in date input format
    Cause:     A date specification contained an invalid format code. Only the following may be specified when entering a date: year, month, day, hours, minutes, seconds, Julian day, A.M./P.M. and B.C./A.D.
    Action:     Remove the invalid format code from the date specification.
    Looking at the cause,you can't use a format code like W in the date format for converting a text to date. To_date doesn't accept it.
    Aman....

  • IMG-00705: unsupported or corrupted input format

    Hello Gurus,
    I am getting this error
    ORA-29400: data cartridge error
    IMG-00705: unsupported or corrupted input format
    ORA-06512: at "ORDSYS.ORDIMG_PKG", line 608
    ORA-06512: at "ORDSYS.ORDIMAGE", line 65
    ORA-06512: at "ORDSYS.ORDIMG_PKG", line 695
    ORA-06512: at "ORDSYS.ORDIMAGE", line 213
    ORA-06512: at line ***
    when i am trying to insert a tiff file from a URL.
    Any advices/ suggestions are highly appreciated.
    Thank you,

    I am getting a similar error when calling setProperties after importing an image from a BLOB:
    net.scee.pinpoint.common.framework.dao.DAOException: DAOException [#1131460088376] : Failed to processImageCopy : ORA-29400: data cartridge error
    IMG-00705: unsupported or corrupted input format
    ORA-06512: at "ORDSYS.ORDIMG_PKG", line 608
    ORA-06512: at "ORDSYS.ORDIMAGE", line 65
    ORA-06512: at "MEDIA.PROCESSIMAGECOPY", line 73
    MEDIA.PROCESSIMAGECOPY is one of our own PL/SQL stored procedures, here is the section around the line that fails:
    IF a_isBlob = 1 THEN
    -- this is a blob so convert it to an image first
    stmt := 'SELECT ' || a_srcImgCol || ' FROM ' || a_srcTable || ' WHERE ' || a_srcIdCol || '=' || a_srcId || srcSubStmt;
    EXECUTE IMMEDIATE stmt INTO rawImage;
    localSrcImage := ordsys.ordimage( ordsys.ordsource( rawImage, null, null, null, null, null), null, null, null, null, null, null, null);
    localSrcImage.setLocal();
    localSrcImage.setProperties();
    ELSE
    The image is a very large TIFF (A3 600dpi CMYK, 7016x9921 pixels). Everything works fine with other images.

  • What is the getcamera input format & output format?

    when we get video from webcam by getcamera(), what is the input format?
    output format should be the codec, like: VP6, H264, right?
    thx

    Hello,
    Please refer to this Help document on getCamera method:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Camera.html
    Regards,
    Suhas Yogin

  • Need insight from DNG gurus about implementing DNG as input format for HDR software

    I've been having a discussion about the DNG file format and the developers of a new HDR software called Essential HDR (EHDR) but we are having some difficulties because none of us really understands much about the DNG spec and concept.
    The first version of EHDR supports DNG as input. I normally shoot my photos in RAW and then convert them to DNG, then I use the different exposure photo set as input.
    The thing is, EHDR or even Photomatix (I also tested this on that software) doesn't read any DNG metadata, they simply ignore it. Do you think this is a normal and correct behavior?
    One of the points in the discussion that I was defending was that EHDR should read the values from the DNG metadata and not the original RAW data. I was even saying that if I cropped the image, they should read ALL that metadata and use it instead of the original RAW data. What do you guys think of that?
    I don't know how RAW works on most cameras but on mine, when I shoot something RAW and then convert it to DNG, I need to do slight changes to the DNG to make the colors look more real, to make it look more like the JPG file (that I shoot along with the RAW). What I'm saying is that I shoot in RAW+JPG and then convert the RAW to DNG so I have DNG+JPG. The JPG file has a white and color balance that closely resembles the real life scene I shot, however, the DNG having more data, always looks different, more saturated and with different temperature and I have to fix it to make it look more like the JPG file. When I'm done why my changes, I save the metadata to the file.
    If software like EHDR or Photomatix ignore the metadata, I will be creating an HDR that doesn't look like the photo I shot and I might have problems trying to make a real looking HDR if I'm not seeing correct color balance in the first place because the metadata, which fixes the temperature and etc, is being ignored.
    How do you think a DNG photo set should work as input for creating an HDR photo?

    >"You don't detail your workflow, but if the app you use puts its edit (i.e. crop) and raw processing (e.g., white point) info in a public schema as defined in the XMP specification, then the developers should be comfortable accessing this publicly documented information."
    I'm not sure what you mean...
    >The question of whether a company should listen to its customers is outside the scope of a discussion of the DNG spec.
    That's not the point, I'm asking for your own opinions...
    >Since the program you are using will not read those changes that are in metadata, maybe you will have to export your DNG files as TIF images from ACR. Then use those TIF images your HDR image with your other software.
    This is what I'm doing at the moment, but I would prefer to load the DNGs directly into the HDR program.

  • Format code cannot appear in date input format - IW related

    Hi,
    please explain what I'm doing wrong:
    SQL>  select to_char(sysdate, 'YYYY-IW') from  dual;
    TO_CHAR
    2010-48
    SQL>  select to_date('2010-22', 'YYYY-IW') from  dual;
    select to_date('2010-22', 'YYYY-IW') from  dual
    ERROR at line 1:
    ORA-01820: format code cannot appear in date input formatOracle 9.2 .
    Regards.
    Greg

    FIrst of all you should stay with the date format. Instead of converting it into a string you could TRUNCATE it to the first day of the Iso-Wekk.
    And to enable index usage you just have to put a certain range on your queries.
    example
    select *
    from t
    where col_date  >= trunc(sysdate, 'IW')  ;if col_date can hold values that are greater than syste. Or if you use another date value to compare than sysdate. Then you need to compare with a range. Just like this
    select *
    from t
    where col_date  >= trunc(sysdate, 'IW') 
    and col_date  < trunc(sysdate, 'IW')+7 ;If you want to input a certain WEEK and get all entries from that week you can start with the first day of the iso-Year and add the number of weeks to it.
    example using iso-Week 40
    select *
    from t
    where col_date  >= trunc(sysdate, 'IYYY')  + 7 * 40
    and col_date  < trunc(sysdate, 'IYYY')+7 * (40 +  1);However calendar arithmetic is complex. We have to be careful for special cases. For example the beginning of the ISO-Year 2011 is the 3rd Jan 2011. So if we run this logic on the first or second of January *2011* we would get the calendar week 40 from *2010*. This is probably not what you want.
    To take this into account we must make sure that we are using the proper year. There are several possibilities how to do it. In this case I choose to use the normal TRUNC to get the first day of the normal year (1.1.2011) then add a week and truncate again.
    example
    select *
    from t
    where col_date  >= trunc(trunc(sysdate,'YYYY)+7, 'IYYY')  + 7 * 40
    and col_date  < trunc(trunc(sysdate,'YYYY)+7, 'IYYY')+7 * (40 +  1);Edited by: Sven W. on Dec 3, 2010 8:52 AM

  • Standard input format in a field

    I'm creating a form that requires input of a sales order number, for which the format is always the same: XXXX-20. I'd like to make it so the -20 automatically populates, so they can only enter the first four numbers. Is this possible?

    Sure. Under the Format tab select Special, Arbitrary Mask, and enter this:
    9999-20
    On Thu, Jun 5, 2014 at 4:49 PM, kylevansyoc <[email protected]>

  • Preferred input format with VHS via Canpous 55 to iMovie/Final Cut Express

    I am using VHS deck to Canpus 55 to iMovie 08/MacBook Pro.
    I do the input to iMovie 08 as it is less problematic for input than Final Cut Express and also I can share these with family for their video making in iMovie.
    However I import the video files from iMovie events to FCE for editing.
    1. I notice the VHS-to Canopus-to iMovie are .dv files with frame size 720x480 and compressor file says DV/DVCPRO - NTSC, not Apple Intermediate Codec.
    2. I also import AVCHD files and those are frame size 960x540 and compressor is Apple Intermediate Codec.
    When I bring the .dv files in from iMovie 08 to FCE, I sometimes get the warning about the files not in the standard settings and the drop down list of settings include Apple Intmediate Codec in various choices and the NTSC in various choices.
    Should these be somehow standardized or will the eventual output be ok? I had one VHS 15 min segment look great on the computer in iMovie, then FCE but was very digitized after output to iDVD.
    Thanks for the help.

    misterdmmc wrote:
    ... and I also don't have Imovie.
    you do.
    on the Installer Disks, your Mac came with, there's 'Installed software', which allows to install the iLife Package only.
    for most of your needs, esp. being no professional editor , iM offers all you need:
    https://sites.google.com/site/karstenschluter/how-to-make-a-vidcast
    shows you how to use pic-in-pic, green-sceen, integration of 'charts' and other 'effects' of iM, to produce a vidcast.
    -Subtitles
    'Subtitles' is for me a switchable feature on DVD ... if you mean 'titles in lower third' - any editor offers this. what iM does NOT offer, is a free-locatable title (or e.g. logo-bug), but there's a simple workaround working with transparent pngs, see my site too ....-
    -Split screen video. Half/Half or Full screen for one video source, and a tiny screen say on the top left of another source...
    side-by-side? iM no, FC yes.
    -Export video in ipod compatible format
    afaik, any Apple video-app allows that ..
    general advice:
    • iM is meant for consumers - convenient, but limited.
    • FC/e or /p is meant for (semi)professionals - what iM offers as a 'one click done'-solution, is a many-steps-process with some background-knowledge and understanding needed.
    • for sure, FC offers MUCH more options .. any option, you'll soon get lost
    • the learning curve for FC is steep! buy a book of master-mind TOM WOLSKY, who generously participates here at this board ...-
    • I don't see a need for you in spending 1.000$ more for the FC/pro suite ... Motion? Color? Compressor? Highly complex tools for even more complex processing ...
    I would 'play' with iM to get familiar with your project - what do you need, how should it look? if you reach the limits, have a look at FC/e at any Apple-store ... if it doesn't scare you, get the app and the book, and spend some months studying ...
    and Welcome misterdmmc to the  boards ...

  • Mail.app/ToDo: How to change Input format of Date Due?

    Hello,
    I am using english version of Leopard 10.5.7 with international/Formats region setting set to german. In applications it usually results in dates like 23.12.2008 (dd.mm.yyyy).
    However, Mail.app's ToDo still requires me to enter mm/dd/yyyy dates ("month-first").
    How do I change it, so Mail.app also accepts european dd.mm.yyyy dates?
    Regards,
    t-80

    Hello,
    is there a chance to get a question answered?
    or shall one better contact apple support by phone?
    regards.

  • How to read the input FORMAT of a Checkbox in list.

    hi,
    suppose i have,
    WRITE CHK1 AS CHECKBOX INPUT OFF.
    Now i have, grayed check box,
    Problem. how to read from program, whether the checkbox is input off or on.
    pls reply

    Hi,
    Check this example of how to use the Checkbox in a list..
    REPORT ztest NO STANDARD PAGE HEADING.
    DATA: BEGIN OF itab OCCURS 0,
                check,
                value(20),
              END OF itab.
    SET PF-STATUS 'TEST1'.
    itab-value = 'ETSAT'.
    APPEND itab.
    itab-value = 'ETSATADSF'.
    APPEND itab.
    itab-value = 'ETSAT'.
    APPEND itab.
    LOOP AT itab.
      WRITE: / itab-check AS CHECKBOX,
                    itab-value.
    ENDLOOP.
    AT USER-COMMAND.
      DATA: wa LIKE itab.
      DATA: itab_download LIKE itab OCCURS 0 WITH HEADER LINE.
      IF sy-ucomm = 'DOWNLOAD'.
        DESCRIBE TABLE itab.
        DO sy-tfill TIMES.
          READ LINE sy-index FIELD VALUE itab-check.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
          CHECK itab-check = 'X'.
          itab_download-value = itab-value.
          APPEND itab_download.
        ENDDO.
       download
        call function 'WS_DOWNLOAD'
             exporting
                  filename = 'C:\TEST.XLS '
             tables
                  data_tab = itab_download.
      ENDIF.
    Thanks,
    Naren

  • Cannot get system date. My input format is %Y%m%d and the output is also a format 'YYYYMMDD'?

    Dear all,
    I am using Labview 8.5.
    I am trying to get system date.
    I use Format Date/Time String tool in a "%Y%m%d" format.
    The PROBLEM is the Format Date/Time String return 'YYYYMMDD' only. 
    Please see my attachment to see.
    Please help me with this, every time I encounter this problem it force for to re-install the labview program.
    Best Thanks!
    Solved!
    Go to Solution.
    Attachments:
    DateTime Error.JPG ‏7 KB

    tyk007 - It is sucessfully working with other computers but there are some computer having this problem.
    altenbach - Please see attached file for actual VI. I assume that it will work on your pc.
    After leaving Format unwired, the output is YYYY-MM-DD 00:00:00 PM. 
    How Labview connects with the local machine system date?
    Attachments:
    Format DateTime String.vi ‏6 KB

  • PJC to input formatted text into a long/clob field

    Hi,
    Is there a PJC that can be used to stored formatted text into a LONG/CLOB column in the database (Something similar to the Message field while posting a new thread in this forum). I am using Oracle Forms 10G (9.0.4)
    I would also like to print this formatted text using Oracle Reports 10G (9.0.4).
    Thx in Advance
    Best Rgds
    Ramdas

    Hello<br><br>
    Have a look at this new forum, and particulary this article that shows how to create an editable styled text area.<br><br>
    Francois

  • Any way to limit the input format for string control?

    Hi there,
      I need a control for the user to input some string with only alphabets and no special characters. Also need to control the number of characters to input. I search it and see someone use Xcontrol to achieve that but I really have no idea how to get that. Any other way to get this function works on string input?

    prvs wrote:
    Dear Altenbach,
    The VI that you have posted in (Max8Discard.vi) in Limiting Input String Length
    limits the entry of string control to required length but it doesnt limit the entry of special characters.
    If you have any simple way to do the same it will be very helpful
    Thanks in advance...!!!
    Regards,
    Praveen PRVS
    Just change the check after the Lexical Class function.  If you just want numbers and letters, then use the In Range & Coerce function to check for class numbers 3 through 5.  Play around with the logic some more until you get what you need (I'm thinking that AND should be an OR).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • BATCH INPUT FORMAT ERROR TYPE QUAN DEC 3 WHY?

    hi experts,
    i use this function to create BOM CS_BI_BOM_CREATE_BATCH_INPUT1 (transaction IB11) but this is no really relevants, the problem is that when the Batch imput is executed, it stops when try to insert the field RC29P-MENGE becuase is passed the value 11.000 but the program only accept 11,000.
    the field have this configuration:
    MENGE     KMPMG     QUAN     13     3
    the error message is "insert format:  _ ___ ___ __~,___V message No. 00088
    why?
    What i have to do to resolve the problem?
    thanks.

    always use character field when passign data in BDC. define your source field as character, and then you should be able to use that

Maybe you are looking for

  • Move Game Center profile from one apple ID to another

    Hi, To access my game center profile (achievements and challenges etc...) I have to remember to login to an old appleID I don't use anymore for anything significant except game center. My other appleId (which is my iCloud account) has everything on i

  • Exporting to PDF Issue

    I have a Report that was created using Crystal Reports XI Developer. The report prints invoices (text) and also images (blob values).  The report uses the oracle OCI database driver. When I run this report from Crystal Reports XI Developer and export

  • Can't get video on camera app

    Since the update to iOS7, I cannot use the video function on the camera app.  I press and press the word "video" but it just stays on normal camera.  I tried a restart (holding home and sleep buttons) and it didn't help.

  • Issue with Contract Replication from SRM to MDM  - XML structure

    Hi We are having an issue with trnsfering a contract to MDM. We have released the contract for update to MDM in the contract through the distribute to catalog option. An XML is generated in SRM that gets sucessfully passed to PI through Catalogupdate

  • Final Cut crashing on startup - Please Help

    I've never had an issue with my Final Cut before until today and have to urgently create a dvd in DVD Studio Pro but it keeps on crashing on startup. It does the identical crash to Final Cut as well. *The report shows this...* +Process: Final Cut Pro