Time server 1:55:50 wrong!! how could this be??

Hello everybody,
I am develloping an application where I get the time from a time sever and update the (embedded) system time. But I am getting from the server 1h55min minutes earlier than it should be. Most of it I think come from my GMT+0200 location but that would still leave me with a 4/5 minutes advance when corrected!!
I got the program from somewhere around the net but it's too complex for me (okay okay, you can call me a noob) to find out if any of the byte handling could be the source of the error
So I have 2 questions:
1. What could be causing the illogical 11min time difference?? (I think the encodeTimestamp method is not that reliable)...
2. How do I retrieve GMT related information to such as time zone and daylight savings time??
This is the code:
package general;
import java.io.*;
import java.util.*;
import javax.microedition.io.*;
import javax.microedition.midlet.*;
import com.siemens.icm.io.*;
public class Teste27 extends MIDlet
     private ATListener ComList = null;     
     private ATCommand ATCmd = null;
     String gprs = null;
     Calendar cal;
     Date date;
     TimeZone timeZone;
     long milliSeconds = 0;
     class ATListener implements ATCommandListener{
          public void ATEvent(String Event){System.out.println("\rURC-Event: " + Event);}
          public void RINGChanged (boolean SignalState){System.out.println("\rRING-Event: " + SignalState);}
          public void DCDChanged (boolean SignalState){System.out.println("\rDCD-Event: " + SignalState);}
          public void DSRChanged (boolean SignalState){System.out.println("\rDSR-Event: " + SignalState);}
          public void CONNChanged (boolean SignalState){System.out.println("\rCONN-Event: " + SignalState);}
     public Teste27() throws MIDletStateChangeException
          System.out.println("Constructor");
          try{
               // Create Listener
               ComList = new ATListener();
               ATCmd = new ATCommand(false);
               ATCmd.addListener(ComList);
          }catch(ATCommandFailedException e){System.out.println("\rATCommandFailedException(Teste27)" + e);
          destroyApp(true);}
     protected void startApp() throws MIDletStateChangeException
          // Address
          String address = "datagram://ntp-sop.inria.fr:123";
          System.out.println(address);
          try
               // Configure GPRS connection
               gprs = ATCmd.send("at^sjnet=gprs,a2bouygtel.com,\"\",\"\",\"\",0\r");
               System.out.println(gprs);
               // Creates Connection
               System.out.println("Creating connection");
               DatagramConnection connection = (DatagramConnection)Connector.open(address);
               // Creates UDP Packet
               System.out.println("Creating message");
               byte[] buf = new NtpMessage().toByteArray();
               // Sends Packet
               System.out.println("Sending packet");
               Datagram packet = connection.newDatagram(buf,buf.length,address);        
               connection.send(packet);
               // Get response
               System.out.println("receiving connection");
               Datagram response = connection.newDatagram(512);
               connection.receive(response);
               System.out.println("Obtained");
               NtpMessage msg = new NtpMessage(response.getData());
               System.out.println(msg.toString());
               System.out.println(msg.transmitTimestamp);
               destroyApp(true);
          } catch(IOException ioe){ioe.printStackTrace();}
          catch(Exception e){System.out.println("Exception(configureSocketService): " + e);}
     protected void pauseApp()
          System.out.println("pauseApp");
     protected void destroyApp(boolean arg0) throws MIDletStateChangeException
          System.out.println("destroyApp");
          this.notifyDestroyed();
}And this is the NtpMessage Class:
package general;
import java.util.Date;
import java.util.Random;
* @author Adam Buckley
public class NtpMessage
     public byte leapIndicator = 0;
     public byte version = 3;
     public byte mode = 0;
     public short stratum = 0;
     public byte pollInterval = 0;
     public byte precision = 0;
     public double rootDelay = 0;
     public double rootDispersion = 0;
     public byte[] referenceIdentifier = {0, 0, 0, 0};
     public double referenceTimestamp = 0;
     public double originateTimestamp = 0;
     public double receiveTimestamp = 0;
     public double transmitTimestamp = 0;
      * Constructs a new NtpMessage from an array of bytes.
      */     public NtpMessage(byte[] array)
          // See the packet format diagram in RFC 2030 for details
          // BYTE 1
          leapIndicator = (byte) ((array[0] >> 6) & 0x3);
          version = (byte) ((array[0] >> 3) & 0x7);
          mode = (byte) (array[0] & 0x7);
          // BYTE 2
          stratum = unsignedByteToShort(array[1]);
          // BYTE 3
          pollInterval = array[2];
          // BYTE 4
          precision = array[3];
          // BYTES 5->8
          rootDelay = (array[4] * 256.0) +
               unsignedByteToShort(array[5]) +
               (unsignedByteToShort(array[6]) / 256.0) +
               (unsignedByteToShort(array[7]) / 65536.0);
          // BYTES 9->12
          rootDispersion = (unsignedByteToShort(array[8]) * 256.0) +
               unsignedByteToShort(array[9]) +
               (unsignedByteToShort(array[10]) / 256.0) +
               (unsignedByteToShort(array[11]) / 65536.0);
          // BYTES 13->16
          referenceIdentifier[0] = array[12];
          referenceIdentifier[1] = array[13];
          referenceIdentifier[2] = array[14];
          referenceIdentifier[3] = array[15];
          // BYTES 17->24
          referenceTimestamp = decodeTimestamp(array, 16);
          // BYTES 25->32
          originateTimestamp = decodeTimestamp(array, 24);
          // BYTES 33-40
          receiveTimestamp = decodeTimestamp(array, 32);
          // BYTES 41-48
          transmitTimestamp = decodeTimestamp(array, 40);
      * Constructs a new NtpMessage in client -> server mode, and sets the
      * transmit timestamp to the current time.
     public NtpMessage()
          // Note that all the other member variables are already set with
          // appropriate default values.
          this.mode = 3;
          this.transmitTimestamp = (System.currentTimeMillis()/1000.0) + 2208988800.0;
      * This method constructs the data bytes of a raw NTP packet.
      */     public byte[] toByteArray()
          // All bytes are automatically set to 0
          byte[] p = new byte[48];
          p[0] = (byte) (leapIndicator << 6 | version << 3 | mode);
          p[1] = (byte) stratum;
          p[2] = (byte) pollInterval;
          p[3] = (byte) precision;
          // root delay is a signed 16.16-bit FP, in Java an int is 32-bits
          int l = (int) (rootDelay * 65536.0);
          p[4] = (byte) ((l >> 24) & 0xFF);
          p[5] = (byte) ((l >> 16) & 0xFF);
          p[6] = (byte) ((l >> 8) & 0xFF);
          p[7] = (byte) (l & 0xFF);
          // root dispersion is an unsigned 16.16-bit FP, in Java there are no
          // unsigned primitive types, so we use a long which is 64-bits
          long ul = (long) (rootDispersion * 65536.0);
          p[8] = (byte) ((ul >> 24) & 0xFF);
          p[9] = (byte) ((ul >> 16) & 0xFF);
          p[10] = (byte) ((ul >> 8) & 0xFF);
          p[11] = (byte) (ul & 0xFF);
          p[12] = referenceIdentifier[0];
          p[13] = referenceIdentifier[1];
          p[14] = referenceIdentifier[2];
          p[15] = referenceIdentifier[3];
          encodeTimestamp(p, 16, referenceTimestamp);
          encodeTimestamp(p, 24, originateTimestamp);
          encodeTimestamp(p, 32, receiveTimestamp);
          encodeTimestamp(p, 40, transmitTimestamp);
          return p;
      * Returns a string representation of a NtpMessage
      */     public String toString()
          return "Leap indicator: " + leapIndicator + "\r\n" +
               "Version: " + version + "\r\n" +
               "Mode: " + mode + "\r\n" +
               "Stratum: " + stratum + "\r\n" +
               "Poll: " + pollInterval + "\r\n" +
//               "Precision: " + precision + " (" + precisionStr + " seconds)\r\n" +
//               "Root delay: " + new DecimalFormat("0.00").format(rootDelay*1000) + " ms\r\n" +
//               "Root dispersion: " + new DecimalFormat("0.00").format(rootDispersion*1000) + " ms\r\n" +
               "Reference identifier: " + referenceIdentifierToString(referenceIdentifier, stratum, version) +
"\r\n" +
               "Reference timestamp: " + timestampToString(referenceTimestamp) + "\r\n" +
               "Originate timestamp: " + timestampToString(originateTimestamp) + "\r\n" +
               "Receive timestamp:   " + timestampToString(receiveTimestamp) + "\r\n" +
               "Transmit timestamp:  " + timestampToString(transmitTimestamp);
      * Converts an unsigned byte to a short.  By default, Java assumes that
      * a byte is signed.
      */     public static short unsignedByteToShort(byte b)
          if((b & 0x80)==0x80) return (short) (128 + (b & 0x7f));
          else return (short) b;
      * Will read 8 bytes of a message beginning at <code>pointer</code>
      * and return it as a double, according to the NTP 64-bit timestamp
      * format.
     public static double decodeTimestamp(byte[] array, int pointer)
          double r = 0.0;
          for(int i=0; i<8; i++)
//               r += unsignedByteToShort(array[pointer+i]) * Math.pow(2, (3-i)*8);
            double tmp = unsignedByteToShort(array[pointer+i]);           
            for(int k=0;k<(3-i)*8;k++)
                tmp *= 2;
            r += tmp;
          return r;
      * Encodes a timestamp in the specified position in the message
     public static void encodeTimestamp(byte[] array, int pointer, double timestamp)
          // Converts a double into a 64-bit fixed point
          for(int i=0; i<8; i++)
               // 2^24, 2^16, 2^8, .. 2^-32
//               double base = Math.pow(2, (3-i)*8);
               double base = 1;      
               for(int k=0;k<(3-i)*8;k++)
                   base *= 2;
               // Capture byte value
               array[pointer+i] = (byte) (timestamp / base);
               // Subtract captured value from remaining total
               timestamp = timestamp - (double) (unsignedByteToShort(array[pointer+i]) * base);
          // From RFC 2030: It is advisable to fill the non-significant
          // low order bits of the timestamp with a random, unbiased
          // bitstring, both to avoid systematic roundoff errors and as
          // a means of loop detection and replay detection.
//          array[7] = (byte) (Math.random()*255.0);
        array[7+pointer] = (byte) (new Random(System.currentTimeMillis()).nextDouble()*255.0);
      * Returns a timestamp (number of seconds since 00:00 1-Jan-1900) as a
      * formatted date/time string.
     public static String timestampToString(double timestamp)
          if(timestamp==0) return "0";
          // timestamp is relative to 1900, utc is used by Java and is relative
          // to 1970
          double utc = timestamp - (2208988800.0);
          // milliseconds
          long ms = (long) (utc * 1000.0);
          // date/time
//          String date = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss").format(new Date(ms));
        String date = new Date(ms).toString();
          // fraction
//          double fraction = timestamp - ((long) timestamp);
//          String fractionSting = new DecimalFormat(".000000").format(fraction);
//          String fractionString = new
//          return date + fractionSting;
        return date;
      * Returns a string representation of a reference identifier according
      * to the rules set out in RFC 2030.
     public static String referenceIdentifierToString(byte[] ref, short stratum, byte version)
          // From the RFC 2030:
          // In the case of NTP Version 3 or Version 4 stratum-0 (unspecified)
          // or stratum-1 (primary) servers, this is a four-character ASCII
          // string, left justified and zero padded to 32 bits.
          if(stratum==0 || stratum==1)
               return new String(ref);
          // In NTP Version 3 secondary servers, this is the 32-bit IPv4
          // address of the reference source.
          else if(version==3)
               return unsignedByteToShort(ref[0]) + "." +
                    unsignedByteToShort(ref[1]) + "." +
                    unsignedByteToShort(ref[2]) + "." +
                    unsignedByteToShort(ref[3]);
          // In NTP Version 4 secondary servers, this is the low order 32 bits
          // of the latest transmit timestamp of the reference source.
          else if(version==4)
               return "" + ((unsignedByteToShort(ref[0]) / 256.0) +
                    (unsignedByteToShort(ref[1]) / 65536.0) +
                    (unsignedByteToShort(ref[2]) / 16777216.0) +
                    (unsignedByteToShort(ref[3]) / 4294967296.0));
          return "";
}   Thank you (if you got this far... =s)

i forgot to mention one thing in my previous post..
my server starts up sometimes without giving me any problems. that is, when i face this problem, all i do is shut down the server and then wait for abt 10-15 minutes and try starting it again..sometimes this gap of 15 min helps a lot coz the server starts up properly and the connection exception does not occur. Also,the web app also works perfectly. But this wasnt the case abt 2 months back. prior to this problem, my server would never give me a problem and i could start and stop it at will...i used to start and stop the server almost 3-4 times a day (when i made changes to java files and wanted the server to read the latest class files..).it was only 2 months back that this problem arose and ever since then, all i would do is wait for 10-15 minutes if the server doesnt start up and then try my luck again. Even if i wait for 15 min, there are days when the server doesnt start properly all day long !
Another issue is that even when the server starts properly(without giving the connection exception) it sometimes does not load the web application correctly. It displays a "Page cannot be found" error. But waiting for abt 10-15 minutes again removes this problem and i am again able to use the application.
I am a newbie to JAVA and do not know much abt application servers. I had read through the Apache tomcat documentation which told me abt JNDI realm and the 389 port to which connection is made. I could not understand much and thats why i posted the problem on this forum.
This whimsical behaviour is what has delayed my work and i am not being able to deliver on deadlines.Needless to say, any help would be appreciated. :)
Regards,
Shankar

Similar Messages

  • My server is reliance in india,how could i activate my i phone 4s?

    my server is reliance in india, how could i activate my i phone 4s?

    Contact Reliance and ask them.

  • I created an image in Photoshop and saved it as the PSD file. Now when I try and open it it says it is not compatible with my version. How could this be when I created it in this version?

    I created an image in Photoshop and saved it as the PSD file. Now when I try and open it it says it is not compatible with my version. How could this be when I created it in this version?

    That depends on why it won't open.  Most of the time it means the file is corrupted and unlikely to be recovered. If you saved it right after adding or copying a LOT of layers - then it might just be the layer limit and we can attempt to recover it.

  • My ipad including my iphone says "unable to connect network" whenever i connect it to wifi. How could this be?

    Help anyone pls!!! My ipad including my iphone says " unable to connect network" whenever i connect it to wifi. How could this be?

    Try Settings > General > Reset > Reset Network Settings
    Then try again.

  • I updated my macbook with lion and airdrop does not show up in the finder, how could this be?

    I updated my macbook with lion and airdrop does not show up in the finder, how could this be?

    shldr2thewheel wrote:
    If this is the case: How to enable AirDrop over ethernet and AirDrop on unsupported macs running Lion  .
    http://osxdaily.com/2011/09/16/enable-airdrop-ethernet-and-unsupported-macs/
    Interesting.  Googling, I see that someone posted that on these discussions as well:
    https://discussions.apple.com/thread/3331216?start=0&tstart=0
    which mentions what I recall: that Airdrop (as implemented by Apple) would create an on-demand ad-hoc Wi-Fi connection, even if you were already connected to an access point.  Normally, you can't connect to multiple Wi-Fi networks, thus the reason for Airdrop only supported on newer Wi-Fi chips.
    And Apple's KB:
    http://support.apple.com/kb/HT4783

  • My iphone 3g show the itune logo and when I restore it, it says restore error 46? What is restore error 46? How could this be resolved?

    My iphone 3g show the itune logo and when I restore it, it says restore error 46? What is restore error 46? How could this be resolved?

    Hi! were you able to restore your phone?

  • My daughter has just purchased $1250 of "in game" credits, a) how could this occur without a pass code and b) how do I stop this from reoccuring

    My daughter was playing Pet City, somehow she purchased $1250 in credits against our credit card. How could this occur, how do I stop it from happening again
    Thanks

    Contact Apple:
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support visit online support site.
    For iTunes: Apple Support for iTunes - Contact Us

  • Corrupt Time Portion of a DATE column - how can this happen?

    DUMP(START_TIME)
    gives
    'Typ=12 Len=7: 100,99,255,255,0,0,0'
    How can this happen? Is there any way to prevent the database from allowing invalid dates to be inserted.
    Thanks in advance,
    Cade

    That's part of the problem. We don't have direct access to the database. I don't know what the equivalent of SQL Server's Query Analyzer or SSMS in Oracle. I'm more of a 'NET and SQL Server developer.
    What the group I am helping does is extract the data (from a system they don't control) using Focus. They send a SQL statement and then Focus retrieves the rowset and does what Focus calls a TABLE FILE operation to put it in a Focus file. Because the Focus rowset typing appears to be based on what datatypes Oracle represents the columns as having, Focus then attempts to interpret the date and time as valid. But apparently they are so messed up that Focus actually halts/crashes.
    So every morning, they notify the group responsible for the Oracle system to "fix" the records that are bad. They apparently do this by copying the END_TIME to the START_TIME, hopefully with a simple UPDATE query, but perhaps manually with some other tool.
    I'm also not a Focus expert, but in experimenting with sending different SQL statements (like using to_char() to identify the bad data) we did eventually find out how to identify these records using DUMP. What I helped the MIS group here do was to change their SQL query to be:
    SELECT CASE WHEN DUMP(START_TIME) = 'Typ=12 Len=7: 100,99,255,255,0,0,0' THEN END_TIME ELSE START_TIME END AS START_TIME
    FROM etc.

  • Since a few days i receive each e-mail two times, what is wrong and how could this stopped?

    I appretiere tips to solve that Problem.
       Thank you very much for you help.
             Horst P.H.

    Did you resolve this issue? I finally upgraded my iMac to Mountain Lion and it has stopped connecting to my own website & email (same domain) via safari/mail respectively.
    Yet, connecting to both on my MacBook Air on the same network is fine. Also running 10.8.4.

  • Date & Time are wrong, how is this possible.

    I am having a look at my inlaw's computer. Late 2008 15" MPB, 10.6.8/iLife 11.
    One of the more strange things I've seen is that in Date & Time preferences the small section above the calendar where it should show the date i.e. 2/19/2012 is essentially missing. There's up and down arrows next to a tiny 1 character width box.
    This is affecting multiple things within their user account in terms of files being tagged with the wrong date, in apps like mail, iphoto, etc. 11/24/11 is what is being tagged.
    If you click on the clock in the menu bar, which I have set to display day of week, date, and time and is doing so correctly, just below it in the popup box that appears where it should display the same information and give the option for View as analog or digitial, it says Thursday, November 24, 2011 in gray instead of the correct date and time.
    I have tried in a test user and issue does not persist.
    I have tried SMC/PRAM resets. Persists.
    I have tried deleting /etc/localtime. Persists.
    I have tried 10.6.8 combo update. Persists.

    Try this.
    Go to System Preferences > Date & Time > Formats
    In the section for Dates, click the Customize button. You should get a screen that looks something like this -
    In the upper area, showing boxes for Short, Medium, Long, and Full, make sure that no text has been entered into any of those boxes. They should contain only blue ovals. If you need to replace any of those, drag the appropriate ones up from the lower area of that screen.
    Note that the info shown in the blue ovals is representative, and is not intended to show current date info in that screen.

  • I created a new folder in my bookmarks menu and it disappeared with all the links inside the next time I turned on my notebook.how could that happen?can I find those links again somewhere in the memory?

    actually I lost the whole sub-folder,not only the links inside...

    See:
    http://kb.mozillazine.org/Bookmarks_not_saved
    http://kb.mozillazine.org/Locked_or_damaged_places.sqlite

  • An unknown website just appeared in my 'exceptions' list (Tools Options Security "warn me when sites try to install add-ons"-how could this happen?

    downloaded Firefox onto friends' laptop last night. Found it necessary to place two websites in the (afore-mentioned) "Exceptions" category. shut down/re-booted three-four times over the next few hours before shutting down the laptop and going to bed. Booted up this am and, WHOA!-suddenly my menu/toolbars have new, undesired toolbars(?) search boxes(?): the search box, if I remember right, was labeled "My Web Search sponsored by iwon!" Whilst eliminating the intruders I became aware that by some unknown means I had fetched up on some webpage I've never heard of and had no reason to go to-( the very top of my display (above the menu and address bar) read: 'reason upgrade Search' (separated by a line symbol I can't reproduce here), then 'Musician's Friend' ....HUH? (feeling like Dorothy w/o a tornado transport). So I finish getting rid of the invaders and check out my History to try to figure out how I wound up at this website. my history indicates the last site I visited before going to bed, then 'aclk' (www.google/aclk? followed by a string of mixed symbols letters etc. Then 'redirect' (www.rkdms.com/redirect?c=....and a string of numbers and letters. Then the website"reason upgrade Search (?) Musician's Friend " then 'redirect.jhtml' (www.search.mywebsearch.com/mywe.........) Them 'Firefox Web Browser& Thunder....' still no clue how or why I wound up at that site..didn't go there, (not of my volition, anyways!!) so im checking my security settings and in Tools>options>Security>advanced> in the "Exceptions" category of "Warn me when sites try to install add-ons" is a website I've never heard of (getpersonas.com) and DID NOT enter!!!!!!!.Need to know how this could happen, how to prevent recurrence and how hard should I hit the panic button because right now I'm totally freaked!
    == today

    These prefs get set to an empty String once the sites have been added to the whitelist if the pref is not empty if you open the exception window.
    Tools > Options > Security : "Warn me when sites try to install add-ons": Exceptions
    You can reset these prefs on the about:config page.
    xpinstall.whitelist.add - addons.mozilla.org
    xpinstall.whitelist.add.36 - getpersonas.com
    To open the ''about:config'' page, type '''about:config''' in the location (address) bar and press the Enter key, just like you type the url of a website to open a website.
    If you see a warning then you can confirm that you want to access that page.

  • How could this be achieved

    Hey everyone,
    I have information stored in side a file, it is first stored in arrays like this:
    String[] cars = {"ford", "ford", "mini"}
    int[] car_id = {101, 102, 103}
    It is then written to a file.
    I would like to make a record or my own type of some sort, that would combine these into one record like this. So the record would read this:
    record 1: ford, 101
    record 2: ford, 102
    record 3: mini, 103
    This would be easy to change the values as well, as i could just say record1 = "ford", "201" or something.
    Any suggestions on how this could be achieved.

    Some of this might help, courtesy of jverd:
    Resources for Beginners
    Sun's
    basic Java tutorial
    > Sun's New To Java Center.
    Includes an overview of what Java is, instructions
    for setting up Java, an intro to programming (that
    includes links to the above tutorial or to parts of
    it), quizzes, a list of resources, and info on
    certification and courses.
    http://javaalmanac.com[
    /u]. A couple dozen code examples that
    supplement
    [url=http://www.amazon.com/exec/obidos/tg/detail/-/
    0201752808?v=glance]The Java Developers
    Almanac.
    jGuru. A
    general Java resource site. Includes FAQs, forums,
    courses, more.
    JavaRanch.
    To quote the tagline on their homepage: "a friendly
    place for Java greenhorns." FAQs, forums (moderated,
    I believe), sample code, all kinds of goodies for
    newbies. From what I've heard, they live up to the
    "friendly" claim.
    Bruce Eckel's
    Thi
    nking in Java (Available online.)
    Joshua Bloch's
    [url=http://www.amazon.co.uk/exec/obidos/Author=
    Bloch,%20Josh]Effective Java
    Bert Bates and Kathy Sierra's
    [url=http://www.amazon.com/exec/obidos/tg/detail
    /-/0596004656?v=glance]Head First Java.
    This one has been getting a lot of very positive
    comments lately.
    Thanks for those great links!
    I've now read up about constructors and classess again, so i'm a little more confident. I am having a little trouble printing and retreiving the information in the objects. Here is some of my code:
    class Details{ //storage for cars and details
            public int customer_id; //id of customer hiring it
            public String type; //small, saloon or van
            public int rate; //rate of hire
            public int mileage;
            public boolean hired; //hired or not
            // constructor
            public Details(int id, String t, int r, int m, boolean h) {
                    set_customer_id(id);
                    set_car_type(t);
                    set_rate(r);
                    set_mileage(m);
                    set_hired(h);
            // return object variables
            public int get_customer_id() { return customer_id; }
            public String get_car_type() { return type; }
            public int get_rate() { return rate; }
            public int get_mileage() { return mileage; }
            public boolean get_hired() { return hired; }
            // set object variables
            public void set_customer_id(int id) { customer_id = id; }
            public void set_car_type(String car_type) { type = car_type; }
            public void set_rate(int the_rate) { rate = the_rate; }
            public void set_mileage(int miles) { mileage = miles; }
            public void set_hired(boolean car_hired) { hired = car_hired; }
    class Cars {
            public static void main(String[] args) throws IOException {
                 Details[] thecars = new Details[] {new Details(1, "small car", 20, 0, true), new Details(2, "big car", 220, 3, true)};
    }I'm really unsure how i could retrieve the details. I though tthis would work:
    String type = thecars[0].get_car_type;
    Because thecars is an array of Details[] and get_car_type returns the type of car. Any suggestions?:
    Thanks.

  • While trying to delete an image or header on Index page, Index..html disappeared--how could this have happened?

    Windows 7, Adobe CS6
    In Dreamweaver, from files located on a USB, on the Index screen, I was trying to  1) delete an Image in order to insert a different one and link it to a page; 2) delete the Header in order to insert a border and then replace the Header.
    I seem to have succeeded with the Image rollover replacement and link. Clicking on the Header should have activated it so that I could delete it; but it didn't.
    All of the images and links are intact; I just can't open the Index page, since I can't find the Index.html file.  The last time I copied the USB files onto my C: drive was 3 weeks ago.
    1.  What might I have done accidentally to cause the Index.html file to be deleted?
    2.  Exactly what does the Index.html file contain?  Would the one that's 3 weeks old work?  No, I'm thinking, since some changes were made in the html coding in the meantime?

    Lelia150 wrote:
    I was trying to  1) delete an Image in order to insert a different one and link it to a page; 2) delete the Header in order to insert a border and then replace the Header.
    I seem to have succeeded with the Image rollover replacement and link. Clicking on the Header should have activated it so that I could delete it; but it didn't.
    This is the problem with working in Design View only.  You really need to work in Split View so you can see the code that DW creates/selects for you.  Often times, selecting elements in Design View will capture too much or too little code.  When you  hit delete, you may have deleted much more code than was needed.   The result is invalid code, unbalanced tags, etc.. all of which might explain why your page is blank in Design View.
    Switch to code view.  Copy & paste the remaining code into a web forum reply (do not use e-mail, it won't come through).  If we can see the code you have to work with, we might be able to help you repair it.
    Nancy O.

  • Publishing Just One Site...How Could This Even Be An Issue?

    I have been checking the discussion boards looking for an answer to what appears to be a serious design flaw. All I want to do is publish one of the two sites I have created on iWeb. From what I read, the only option I have is to use a freeware program called "iWebsites". Is this true? I can't believe there isn't another reasonable workaround. Someone....a little help please?

    There are lots of posts on this subject. The way I do iit is to create indivual domain files in iweb. Once you have created the first move the domain file out of the user library/application support/iweb folder and then click on iweb it will prompt you to open an existing site or to create a new one. Back up the domain file before doing anything, and then keep each domain file as a separate entity. I rename my domains so I know what they are.
    To split your existing site make 2 copies of the domain file - make a backup first and move it to an external drive if you can.
    Open the 1st copy and delete one of the sites - save and then repeat with the 2nd copy and delete the other site. Now you should have 2 separate domain files. Make sure you have the files in different places before saving - the best way is to move them to an external drive then you can't over write them.
    Hope that makes sense - there are some clever people on here how may well put it in better language.

Maybe you are looking for

  • C2 audit mode Option in SQL server 2000

    Hi, How to set c2 audit mode Option for only customized tables not for entire database SQL server 2000

  • Minimum shelf life and delivery completed indicator at GR

    Dear Gurus, I have two questions: 1. As per my knowledge minimum shelf life is "minimum number of days for which the material must be keep for GR to be accepted" , (i.e. if it is 10 days the material should accepted for GR only after 10days of produc

  • NTFS Permissions

    Hi Everyone, I have a server running Windows Server 2008 R2, and have come across an unusual issue. We have a large folder tree and at the end of it several documents with multiple permissions. for example. user1 - read/write user2 - read only when u

  • Expand /Collapse push button

    Hi Guys, I have problem with expand/collapse push button in my selection-screen. In the older version 4.6c icon is displaying  good where as in the ECC6  the instead of symbol, the icon id is displaying.     How to display the symbol ? Regards, Naras

  • Supermicro AOC-SASLP-MV8 (Marvell 6480 chip)

    Does anyone know if the Supermicro AOC-SASLP-MV8, with the Marvell 6480 chip, will work with OVM 2.2? it is an 8-port raid contoller. thanks