Problem with a date... expecting what i am not offering

lol. I thot that would grab your attention...
now that your here...
can you help me with my date?
When i compile GameTest.java, i receive these 2 errors:
C:\jDevl\Lot649\GameTest.java:18: integer number too large: 02121982
          lotto[0] = new Ticket1(0001,02121982, 03, 11, 12, 14, 41, 43, 13);
.\Ticket1.java:20: incompatible types
found : int
required: Lot649.Date
          drawDate = dDay.getDate();
here is my code for GameTest
import Lot649.*;
public class GameTest{
     public static void main( String args[]){
          String result = "";
          //fill the lottery array with 5 ticket objects
          Ticket1[] lotto = new Ticket1();
                              //recNo,mmddyr, n1, n2, n3, n4, n5, n6, n7}
          lotto[0] = new Ticket1(0001,02121982, 03, 11, 12, 14, 41, 43, 13);
          lotto[1] = new Ticket1(0002,02191982, 08, 33, 36, 37, 39, 41, 09);
          lotto[2] = new Ticket1(0003,02261982, 01, 06, 23, 24, 27, 39, 34);
          lotto[3] = new Ticket1(0004,03031982, 03, 09, 10, 13, 20, 43, 34);
          lotto[4] = new Ticket1(0005,03031982, 03, 11, 12, 14, 41, 43, 14);
          //print out information about all ticket objects
          for (int i=0; i < lotto.length; i++)
               Ticket1 t = lotto;
               result += t.getRecNo+" "+t.getDate+" "+t.getArray() + "/n";
and here is my code from the Ticket class
import Lot649.Date;
public class Ticket1{
     private int recNum;
     private Date drawDate;
     private int nArray[] = new int[7];
     public Ticket1( int rec, Date dDay, int n1, int n2, int n3, int n4,
                     int n5, int n6, int n7){
          recNum = rec;
          //drawDate = dDay.getDate();
          //Date dD = new Date();
          drawDate = dDay.getDate();
          nArray[0] = checkNum(n1);
          nArray[1] = checkNum(n2);
          nArray[2] = checkNum(n3);
          nArray[3] = checkNum(n4);
          nArray[4] = checkNum(n5);
          nArray[5] = checkNum(n6);
          nArray[6] = checkNum(n7);
     }//end of ticket constructor
     public Ticket1( int recA, Date DateA, int arrayName[] ){
          recNum = recA;
          drawDate = DateA;
          nArray[0] = arrayName[0];
          nArray[1] = arrayName[1];
          nArray[2] = arrayName[2];
          nArray[3] = arrayName[3];
          nArray[4] = arrayName[4];
          nArray[5] = arrayName[5];
          nArray[6] = arrayName[6];
     }//end of Ticket1 constructor...and this is the code from my Date class
package Lot649;
public class Date extends Object {
   private int month;  // 1-12
   private int day;    // 1-31 based on month
   private int year;   // any year
   // Constructor: Confirm proper value for month;
   // call method checkDay to confirm proper
   // value for day.
   public Date( int mn, int dy, int yr )
      if ( mn > 0 && mn <= 12 )       // validate the month
         month = mn;
      else {
         month = 1;
         System.out.println( "Month " + mn +
                             " invalid. Set to month 1." );
      year = yr;                      // could also check
      day = checkDay( dy );           // validate the day
      System.out.println(
         "Date object constructor for date " + toString() );
   public Date( Date dateObj){
          month = dateObj.month;
          day = dateObj.day;
          year = dateObj.year;
   // Utility method to confirm proper day value
   // based on month and year.
   private int checkDay( int testDay )
      int daysPerMonth[] = { 0, 31, 28, 31, 30,
                             31, 30, 31, 31, 30,
                             31, 30, 31 };
      if ( testDay > 0 && testDay <= daysPerMonth[ month ] )
         return testDay;
      if ( month == 2 &&   // February: Check for leap year
           testDay == 29 &&
           ( year % 400 == 0 ||
             ( year % 4 == 0 && year % 100 != 0 ) ) )
         return testDay;
      System.out.println( "Day " + testDay +
                          " invalid. Set to day 1." );
      return 1;  // leave object in consistent state
   // Create a String of the form month/day/year
   public String toString()
      { return month + "/" + day + "/" + year; }
   public int getDate()
        { return month + day + year;}
//     public Date getDate()
//          { return Date;}
}//end of Date Classwhen i do
drawDate = dDay.getDate();getDate returns an int
how do i getDate to return an object that i can stuff into drawDate?
you can see that i have monkeyed around with it...
but my brain is gettin kinda frustrated...
your help appreciated.

lotto[0] = new Ticket1(0001,02121982, 03, 11, 12, 14, 41, 43, 13);
You can't do that. The second parameter for the constructor is Date, >not int. You have to pass a Date Object. ...02122982 is the date in my data file,i thot bcz i identified that field in my Ticket constructor it would know that i wanted 02122982 to be interpreted as a date....
...brain is toast.
i tried to create
public Date getDate(){ return date }//but i commented this out bcz
no matter how i tried it still gave me errors...
or is it
public Date getDate(){ return this.date }//
or is it
in TestGame
drawDay = new Date(Date xxx);
so your saying i can keep 02122982 as an arguement
& that the constructors parameter is expecting an object... how do i make it look like an object?

Similar Messages

  • Problem with billing date at closed period

    Hi
    We have a problem with billing date in transaction . Previously we could set up different (earlier) billing date than the actual posting period and now it is not working. We receive an error message that the posting period is closed ) .
    I attached an example invoice which we managed to post and where you can see what Iu2019m thinking about, parking number: 1024337, BILLING DOCUMENT: 841835. In this case the billing date was at 30.11.2007, but the posting in 15.07.2008 and we managed to post.
    Pls help that issue
    yps

    hi,
    it is due to posting period closed for the month of 07/2008.
    u need to open posting during that period.
    Regards,
    Greeshma

  • Facing problem with a date column in select query

    Hi,
    I am facing problem with a date column. Below is my query and its fainling with " invalid number format model" .
    Query: SELECT *
    FROM EMP
    WHERE trunc(LAST_UPDATED) >= to_date(to_char(22-05-2009,'dd-mm-yyyy'),'dd-mm-yyyy')
    LAST_UPDATED column is "DATE" data type.
    Please help me Thanks

    Radhakrishna Sarma wrote:
    SeánMacGC wrote:
    WHERE LAST_UPDATED >= to_date('22-05-2009','dd-mm-yyyy');
    You do not need the TRUNC here in any case.
    I don't think so. What if the user wants only data for 22nd May and the table has records with date later than 22nd also? In that case your query willl not work. In order for the Index to work, I think the query can be written like this I think Sean is right though. Use of TRUNC Function is quiet useless based on the condition given here, since the to_date Function used by OP will always point to midnight of the specified date, in this case 22-05-2009 00:00:00.
    Regards,
    Jo
    Edit: I think Sean proved his point... ;)

  • Problem with loading data to Essbase

    Hi All,
    I have a problem with loading data into Essbase. I've prepared maxl script to load the data, calling rule file. The source table is located in RDBMS Oracle. The script works correctly, ie. generally loads data into Essbase.
    But the problem lies in the fact, that after deletion of data from Essbase, when I'm trying to load it again from the source table I get the message: WARNING - 1003035 - No data values modified by load of this data file - although there is no data in Essbase... I've also tried to change the mode of loading data from 'overwrite' to 'add to existing values' (in rule file) but it does'nt help ... Any ideas what can I do?

    Below few lines from EPM_ORACLE_INSTANCE/diagnostics/logs/essbase/dataload_ODL.err:
    [2013-09-24T12:01:40.480-10:01] [ESSBASE0] [AGENT-1160] [NOTIFICATION] [16][] [ecid:1379989900303,0] [tid:1116830016] Received Validate Login Session request
    [2013-09-24T12:01:40.482-10:01] [ESSBASE0] [AGENT-1001] [NOTIFICATION] [16][] [ecid:1379989900303,0] [tid:1114724672] Received client request: Get App and Database Status (from user [admin@Native Directory])
    [2013-09-24T12:01:54.488-10:01] [ESSBASE0] [AGENT-1001] [NOTIFICATION] [16][] [ecid:1379989900303,0] [tid:1101564224] Received client request: MaxL: Execute (from user [admin@Native Directory])
    [2013-09-24T12:01:54.492-10:01] [ESSBASE0] [AGENT-1001] [NOTIFICATION] [16][] [ecid:1379989900303,0] [tid:1115777344] Received client request: MaxL: Describe (from user [admin@Native Directory])
    [2013-09-24T12:01:54.492-10:01] [ESSBASE0] [MLEXEC-2] [NOTIFICATION] [16][] [ecid:1379989900303,0] [tid:1115777344] Output columns described
    [2013-09-24T12:01:54.494-10:01] [ESSBASE0] [AGENT-1001] [NOTIFICATION] [16][] [ecid:1379989900303,0] [tid:1102616896] Received client request: MaxL: Define (from user [admin@Native Directory])
    [2013-09-24T12:01:54.494-10:01] [ESSBASE0] [AGENT-1001] [NOTIFICATION] [16][] [ecid:1379989900303,0] [tid:1102616896] Received client request: MaxL: Fetch (from user [admin@Native Directory])
    [2013-09-24T12:01:54.494-10:01] [ESSBASE0] [MLEXEC-3] [NOTIFICATION] [16][] [ecid:1379989900303,0] [tid:1102616896] Record(s) fetched
    [2013-09-24T12:01:54.496-10:01] [ESSBASE0] [AGENT-1001] [NOTIFICATION] [16][] [ecid:1379989900303,0] [tid:1116830016] Received client request: MaxL: Fetch (from user [admin@Native Directory])
    [2013-09-24T12:01:54.498-10:01] [ESSBASE0] [AGENT-1160] [NOTIFICATION] [16][] [ecid:1379989900303,0] [tid:1114724672] Received Validate Login Session request
    [2013-09-24T12:01:54.499-10:01] [ESSBASE0] [AGENT-1001] [NOTIFICATION] [16][] [ecid:1379989900303,0] [tid:1101564224] Received client request: Get Application State (from user [admin@Native Directory])

  • PSP: problems with viewing data

    Hello.
    I'm currently working at on-line shop and have some problems with viewing data from database. When there is no much inserts to table its working very well. But after inserting all Inserts I have its acting weird.
    Sample with 10 INSERTS:
    http://gafgarion.atspace.com/psp/1.jpg
    Sample with 100 INSERTS:
    http://gafgarion.atspace.com/psp/2.jpg
    I'm using Oracle 9i. when I have more data in my database its acting weird. There is SELECT only from one table, but sometimes I have data from other tables aswell.
    I didnt touch any config files or something else. Only created new User and DAD.
    any ideas what should I do to fix that ??
    thnx in advice

    Hello,
    My guess is that you are speaking about PLSQL Server Pages (PSP), and the PLSQL Web Toolkit.
    This is why I do not think that you will have lot of answer since this forum is targeted toward Web Services developer (XML, SOAP, and so on)
    I am inviting you to ask your question on the general Oracle Application Server - General or PLSQL forums.
    Regards
    Tugdual Grall

  • Facing lot of problems with the DATA object  -- Urgent

    Hi,
    I am facing lot of problems with the data object in VC.
    1. I created the RFC initially and then imported the data object in to VC. Later i did some modifications to RFC Function module,and when i reload the data object, I am not able to see the new changes done to RFC in VC.
    2. Even if i delete the function module, after redeploying the IVIew, results are getting displayed.
    3. How stable is the VC?
      I restarted the sql server and portal connection to R3 is also made afresh.... still i am viewing such surprise results..
    please let me know what might be the problem.

    Hi Lior,
    Are u aware of this problem.
    If yes, please let me know...
    Thanks,
    Manjunatha.T.S

  • Problem with a data set: DIAdem crashes

    Hi,
    I've got a problem with a data set. When I want to zoom in DIAdem-View, DIAdem crashes with the following message (translated from German ;-):
    error type: FLOAT INEXACT RESULT or FLOAT INVALID OPERATION or FLOAT STACK CHECK
    error address: 00016CB8
    module name: gfsview.DLL
    I've got some similar data set not showing such problems. Further on I scanned the data a bit, but in the 59000 points I didn't see anything special. I did try to delete "NOVALUE"s as well, but after that there still exist "NOVALUE"s.
    Does anyone have an idea what to look for?
    Thanks,
    Carsten

    Carsten,
    Could you please upload you Citadel database to the following FTP site:
    ftp.ni.com/incoming
    If you want to compress (ZIP) and/or put a password on the data, that's fine. Please send me a private email at [email protected] (with the file name and password if you put one on the file) once you have uploaded the file and I will check it out.
    Otmar
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • Problem with input data format - not "only" XML

    Hi Experts,
    I have problem with input data format.
    I get some data from JMS ( MQSeries) , but input format is not clear XML. 
    This is some like flat file with content of XMLu2026.
    Example:
    0000084202008-11-0511:37<?xml version="1.0" encoding="UTF-8"?>
    <Document xmlns="urn:xsd:test.01" xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance Sndr="0001" Rcvr="SP">
    ...content....
    </Document>000016750
    Problems in this file is :
    1. data before parser <? xml version="1.0"> -> 0000084202008-11-0511:37 
    2. data after last parser </Document> -> 000016750
    This data destroy XML format.
    Unfortunately XI is not one receiver of this files and we canu2019t change this file format in queue MQSeries ( before go to XI) .
    My goal is to get XML from this file:
    <?xml version="1.0" encoding="UTF-8"?>
    <Document xmlns="urn:xsd:test.01" xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance Sndr="0001" Rcvr="SP">
    ...content....
    </Document>
    My questions:
    1. Is any way or technique to delete this data 0000084202008-11-0511:37  in XI from this file ?
    2. Is any way to get only XML from this file ?
    Thanx .
    Regards,
    Seo

    Hi Buddy
    What is the XI adapter using?
    If you use inbound File adapter content conversion you could replace these values with none and then pass it to the scenario.
    Does that help?
    Regards
    cK

  • Problem with universal data cleanse

    I have problem with universal data cleanse.
    I am using DS 3.2.x (12.2.2).
    I created:
    Dictionary: TEST
    Classification: TEST_CL
    Custom outputs: category: TEST_CAT
    Dictionary Entry:
    Primary: BO
    Classification: TEST_CL
    Gender: Unassigned
    Secondary information:
    When used as: TEST_CAT
    Standard: Business Objects
    Rule file:
    DataCleanse Rule File v2.0;
    TEST_CAT = TEST_CL;
    action = TEST_CAT;
    TEST_CAT = 1 : TEST_CAT : 1;
    end_action
    Data Cleanse:
    Input: Multiline1
    Options:
    Parsing Dictionary: TEST
    Rule file: .../test_rules.dat
    Break On Whitespace Only: Yes
    Parser Sequences Multiline1: TEST_CAT
    Output:
    Parent_component: TEST_CAT1
    Generated_field_name: TEST_CAT and RULE_LABEL
    Generated_field_class: parsed/standardized
    Contenet_type: none
    and EXTRA field
    I wanted to replace word u201CBOu201D with the standard words u201CBusiness Objectu201D, but I have result: there is "BO" in the extra field,
    there are "null" in others fields.
    What am I doing wrong?
    Thanks for all help!
    P.S. I don't have cleansing packages installer.

    There seem to be a couple of things going on here:
    1. If you are using your custom dictionaries, then you have to map your input to MULTILINE1 and enable the custom parsers - just something to be aware of
    2. You mentioned that you made some changes to the existing dictionary and you are not seeing any changes. To be clear, do you have different TEST and PRODUCTION environments? Or is it the same environment except that you have a local DS repository and for the dictionary you are pointing to another repository (using Dictionary --> Manage Connections)?
    Having the dictionaries on a different repository should not make any difference as long as you point to them in your designer using the Dictionary --> Manage Connection option.
    So I think there may be some issue with your job setup and/or dictionary values need to be looked at. You can start by adding another output field named "EXTRA" to see whether or not your data is getting parsed at all. Also, make sure the entry "CLEANME" is classified as FIRM_NAME_ALONE in the dictionary and that you are selecting the correct dictionary name in the Datacleanse Transform options.

  • Is anyone else having problems with Apertures Date fields?

    After experiencing a sysems failure I began restoring my images from backups.  I have had no end of problems with Image dates.  I have come to the determination that Aperture is NOT using either the "Create Date" or "DateTimeOriginal" as the image "Date" or "Date Created" data if other fields have other dates.
    Here is a clip from my image metadata using exiftool:
    File Modification Date/Time     : 2012:09:23 19:53:15-04:00
    File Access Date/Time           : 2013:01:16 11:34:38-05:00
    File Inode Change Date/Time     : 2013:01:16 11:31:32-05:00
    Create Date                          : 2006:02:20 11:51:12.10
    Date/Time Original              : 2006:02:20 16:51:12.10
    Modify Date                          : 2006:02:20 11:51:12.10
    And here is what Aperture utilized on import
    Date:                               9/23/12 7:53:15 PM EDT
    Date Created                         9/23/2012 7:53:15 PM
    So Aperture utlized the File Modification Date/Time as the Create Date despite that the fact that the Create Date field is present and is properly formatted in the original image.
    According to the Aperture mapping table, this shouldn't be happening.
    Now, before someone recommends that I use Aperture's Date Adjust utility - I'm talking about  slightly over 30,000 images.  Editing images one at a time, or in blocks when you don't know what field Aperture is using as the Create Date would require individual inspection of each image followed by manual adjustment of each image.  That approach isn't acceptable.

    Hmm ok, let me restate the issue then, I thought I was clear.  I could have pointed out in my original post however, that only the EXIF and IPTC date fields were displayed from the metadata dump.
    The data set presented in my first post is the EXIF dataset from the file which clearly shows the image was captured by digital camera at
    Create Date                          : 2006:02:20 11:51:12.10
    Date/Time Original              : 2006:02:20 16:51:12.10
    (The delta of 5 hours is the result of Zulu versus local time offset)
    But, when I ingested it into Aperture, the import routine utilized the IPTC field
    File Modification Date/Time     : 2012:09:23 19:53:15-04:00
    which is updated by the OS whenever you move the file around outside of Aperture. (a number of image data fields are updated by the OS - filename for example is another.).  This resulted in the image date fields being stamped in Aperture as:
    Date:                               9/23/12 7:53:15 PM EDT
    Date Created                         9/23/2012 7:53:15 PM
    Which obviously came form the File Modification Date/Time field and not (either) the Create Date or Date/Time Original fields.

  • I have got new hardrive windows 8.1 and i have downloaded PS, LE and AE...Clouds...when i open PC so i get massage on rigth corner short time." your photoshop has problem with compalitet"....i have not put things back or used PS,,,what shall i do? LR work

    i have got new hardrive to windows 8.1....when i open my PC so i get message on lower right corner  - very short time - your photoshop has problem with compalitet....i have not used it yet or put brushes and so on back....LR is working fine...i can open photoshop without problem..and AE...what shall i do?...

    Thanks for info:
    A. Backup before doing anything advanced is recommended but not widely used.
    B. Upgrade on vanilla plain (and updated) operatiing system goes flawlessly. Upgrade on "real" computer may depend on "status" of operating system and applications installed. You may not be the last experiencing troubles.
    C. Software vendors expect that users has nearly unlimited disk size, large memory and latest processor.
    D. It is on you to find anything positive to compensate annoyances. Mental balance is in your hands ;-)

  • PLSQL Server Pages (PSP): problems with viewing data

    Hello.
    I'm currently working at on-line shop and have some problems with viewing data from database. When there is no much inserts to table its working very well. But after inserting all Inserts I have its acting weird.
    Sample with 10 INSERTS:
    http://gafgarion.atspace.com/psp/1.jpg
    Sample with 100 INSERTS:
    http://gafgarion.atspace.com/psp/2.jpg
    I'm using Oracle 9i. when I have more data in my database its acting weird. There is SELECT only from one table, but sometimes I have data from other tables aswell.
    I didnt touch any config files or something else. Only created new User and DAD.
    any ideas what should I do to fix that ??
    thnx in advice

    Hello,
    My guess is that you are speaking about PLSQL Server Pages (PSP), and the PLSQL Web Toolkit.
    This is why I do not think that you will have lot of answer since this forum is targeted toward Web Services developer (XML, SOAP, and so on)
    I am inviting you to ask your question on the general Oracle Application Server - General or PLSQL forums.
    Regards
    Tugdual Grall

  • Problem with Java Dates and UPDATE for SQL2000

    I am having problems with the date formats for Java. I am trying to put the current date time into a SQL table, here it the code I am using:
    var Today = new Date()
    var conn = Server.CreateObject( "ADODB.Connection" )
    conn.Open( "Provider=SQLOLEDB;Server=(local);Database=BillTracking;UID=sa;PWD=;")
    var sql = "UPDATE BillAssignments SET DatePosted = " + Today + " WHERE AssignmentID = '" + Request.QueryString("AssignmentID") + "'"
    var rs = conn.execute(sql)
    I keep getting different errors and I have been unable to find a solution yet. I know that I need to change the date format from the Java standard to the one that SQL likes.
    Help....
    Norm...

    Please tell us where the Java part of this comes in. I see that you are using JavaScript to load up data via an ADO connection (presumably on an IIS platform) - but I do not see where you are using Java
    Lee

  • Why is Apple so bad at providing customers with information on what the problem with email is and what they are doing to fix it?

    Why is apple not providing information on what the problem withe email is and what they are doing to fix, along with a time frame for fixing the problem.

    It was because the problem was major.  If you do not know tech, you should know that a two day outage usually indicates some type of virus, hack, or a bad software load that they had to unravel.  The common way to solve that is to rebuild servers and put back into service.  That takes time.
    Apple did not want to admit this problem.  My guess at this stange was that they loaded new software that might be associated with the new IOS and it crashed.  To reveal this would be to cast into doubt their future revenue.
    Either way.  Run do not walk away from Icloud products and services.  Apple has demonstrated they can not be a business partner.

  • Hello I have a problem to update Imovie. I want to update but I get "There is a billing problem with a previous purchase" What do I do?

    Hello I have a problem to update Imovie. I want to update but I get "There is a billing problem with a previous purchase" What do I do?

    Restore from iTune Backup
    1. Settings>General>Reset>Erase all content and settings
    2. You will be asked twice if you want to erase iPad
    3. Slide to set up
    4. Select Language
    5. Select Country
    6. Enable Location Service
    7. Choose Wi-Fi Network
    8. Enter Wi-Fi password
    9. (a) Setup as new (b) Restore from iCloud Backup (c) Restore from iTune Backup
    10. Select "Restore from iTune Backup"
    11. You will be instructed to connect to iTune (computer)
    On computer
    12. Two options offered
    13. (a) Set up as new iPad (b) Restore from backup (a list of backup will be shown)
    14. Select Restore from backup and select the backup
    15. Continue
    16. Restoring iPad from backup
    17. The settings for iPad restored

Maybe you are looking for

  • Error when trying to create a Site or Site Collection

    Hi, I am trying to create site in site collection in sharepoint online 2013 Pls help me

  • CREATING A FORM UTILIZING MULTIPLE TABLES

    I'd like to know if it's feasable to create a form using multiple tables and if so, how? Thanx

  • WLC 5508 and 7925G

    HI I have the follownig setup: WLC and 7925G and want to lunch QoS I have 2 problems: 1. WLC has got 7.6.130.0 software and I would like to  setup the Tag for wired network part Wired QoS Protocol - Protocol Type- 802.1p Tag   5 by default there is T

  • WATERMARK log entries

    Hi guys, by any chance you might know what are IPC-WATERMARK/ICC-WATERMARK log messages, I googled, everything points to the fact that they are cosmetic, which is not the case, as SIP-400 stops passing traffic, sometimes even directly connected, unti

  • General Laptop Energy Saving Question

    Hello, everyone. What is the general procedure regarding leaving a laptop on or off? I have a desk top, and pretty much leave it on, as the constant powering on and off wears the disk drives more. I simply sleep the display only. Does this same metho