[iOS4] CMDeviceMotion and timestamp problem

Hi,
Excuse my English as it isn't my primary language.
I hava a problem using an instance of CMDeviceMotion. I need data from both the gyro and accelerometer and the frequency of sample is set at the maximum, 100.
I also need the timestamp at which the sample was taken. However, at the beginning the timestamp doesn't change even if the acceleration and gyro change. I got something like that :
0.003779 -0.050910 0.001185 933.604339
0.035029 -0.042457 0.019893 933.604339
0.062266 -0.009147 0.084819 933.604339
0.069300 0.012292 0.092631 933.604339
0.047862 0.018517 0.091456 933.604339
0.035304 0.029885 0.084575 933.604339
0.032496 0.039498 0.083583 933.604339
We have acceleration.x, .y, .z and the timestamp. As you can see the timestamp doesn't change for about 60 upgrades ~6 seconds.
Besides, when it finally starts upgrading, it sometimes sample twice the accelreation/gyro at the same timestamp :
0.115215 0.005342 -0.051157 1385.964002
*0.120561 0.019797 -0.054112 1385.977830*
*0.122637 0.031470 -0.051182 1385.977830*
0.113840 0.042271 -0.045493 1385.992829
Here is my code :
In the viewDidLoad method :
motionManager = [[CMMotionManager alloc] init];
motionManager.deviceMotionUpdateInterval = 0.01;
frequence = 100;
Then I have a method invoked by a button :
[motionManager startDeviceMotionUpdatesToQueue:[NSOperationQueue currentQueue]
withHandler: ^(CMDeviceMotion *motionData, NSError *error)
CMRotationRate rotation = motionData.rotationRate;
CMAcceleration acceleration = motionData.userAcceleration;
NSLog(@"rotation rate = [%f, %f, %f, %f]", rotation.x, rotation.y, rotation.z, motionData.timestamp);
NSLog(@"acceleration rate = [%f, %f, %f, %f]", acceleration.x, acceleration.y, acceleration.z, motionData.timestamp);
Any help appreciated,
Thanks for your time
Loïs

Oracle FAQ page: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#08_01
Well obviously that was really stupid.
I'm adding some queries to an older part of our code base and while reading through the documentation for one of the classes I found that we weren't using our normal Hibernate queries because we needed to ensure that we weren't sending Timestamps to Oracle. Apparently the Timestamp would be converted to a Date because the column in the database was of type DATE. This was causing problems because the DATE column's index was being ignored and the table contains millions of records.
Not sure I follow that logic.
If the value was going into the database then it would update the index.
From that only one of the following could be true.
1. It wasn't going into the database.
2. It was being truncated to a date.
The Oracle FAQ seems to indicate that this has been fixed in the 11.1 JDBC drivers. I know that I can use 11.1 JDBC drivers with a 10.2.0 database, but will it use the new 11.1 mappings for DATE and TIMESTAMP or the old 10.2.0 mappings? I would agree with your interpretation of the FAQ.
And I would then follow it up by testing both with the old driver and the new.

Similar Messages

  • HT201210 please,I need your help ! I was updating my iphone ios to ios4.2 and then problems begins when it shows that it needs to restore the factory software to I was trying to restore ,but that didn't happen it begins but then it shows unknown error 101

    please,I need your help ! I was updating my iphone ios to ios4.2 and then problems begins when it shows that it needs to restore the factory software to I was trying to restore ,but that didn't happen it begins restoring but then it shows unknown error 1015

    Stop being impatient.
    From the article that the question was posted from:
    Errors related to downgrading iOS
    The required resource cannot be found: This alert message occurs when your device has a newer version of iOS than what is available in iTunes. When troubleshooting a device that presents this alert message, go to Settings > General > About and check the version of iOS on the device. If it is newer than the latest released iOS version, the device may have a prerelease developer version of iOS installed.   Installing an older version of iOS over a newer version is not supported.
    Error 1015: This error is typically caused by attempts to downgrade the iPhone, iPad, or iPod touch's software. This can occur when you attempt to restore using an older .ipsw file. Downgrading to a previous version is not supported. To resolve this issue, attempt to restore with the latest iPhone, iPad, or iPod touch software available from Apple. This error can also occur when an unauthorized modification of the iOS has occurred and you are now trying to restore to an authorized, default state.
    You cannot downgrade.
    If you have a 3GS, you can only install iOS 6.1.3 which is the current version of iOS for the device.

  • DATE and TIMESTAMP problem - fixable with 11.1 JDBC Driver?

    I'm adding some queries to an older part of our code base and while reading through the documentation for one of the classes I found that we weren't using our normal Hibernate queries because we needed to ensure that we weren't sending Timestamps to Oracle. Apparently the Timestamp would be converted to a Date because the column in the database was of type DATE. This was causing problems because the DATE column's index was being ignored and the table contains millions of records.
    The Oracle FAQ seems to indicate that this has been fixed in the 11.1 JDBC drivers. I know that I can use 11.1 JDBC drivers with a 10.2.0 database, but will it use the new 11.1 mappings for DATE and TIMESTAMP or the old 10.2.0 mappings? Oracle FAQ page: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#08_01

    Oracle FAQ page: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#08_01
    Well obviously that was really stupid.
    I'm adding some queries to an older part of our code base and while reading through the documentation for one of the classes I found that we weren't using our normal Hibernate queries because we needed to ensure that we weren't sending Timestamps to Oracle. Apparently the Timestamp would be converted to a Date because the column in the database was of type DATE. This was causing problems because the DATE column's index was being ignored and the table contains millions of records.
    Not sure I follow that logic.
    If the value was going into the database then it would update the index.
    From that only one of the following could be true.
    1. It wasn't going into the database.
    2. It was being truncated to a date.
    The Oracle FAQ seems to indicate that this has been fixed in the 11.1 JDBC drivers. I know that I can use 11.1 JDBC drivers with a 10.2.0 database, but will it use the new 11.1 mappings for DATE and TIMESTAMP or the old 10.2.0 mappings? I would agree with your interpretation of the FAQ.
    And I would then follow it up by testing both with the old driver and the new.

  • Itunes not workin and the problem displays - m signature:   Problem Event Name:     BEX   Application Name:     iTunes.exe   Application Version:     10.5.3.3   Application Timestamp:     4f14cc3d   Fault Module Name:     QuickTime.qts_unloaded   Fault Mo

    i tunes not working and the problem its displaying is
      m signature:
      Problem Event Name:    BEX
      Application Name:    iTunes.exe
      Application Version:    10.5.3.3
      Application Timestamp:    4f14cc3d
      Fault Module Name:    QuickTime.qts_unloaded
      Fault Module Version:    0.0.0.0
      Fault Module Timestamp:    4cf45322
      Exception Offset:    706e1040
      Exception Code:    c0000005
      Exception Data:    00000008
      OS Version:    6.1.7601.2.1.0.256.1
      Locale ID:    1033
      Additional Information 1:    0a9e
      Additional Information 2:    0a9e372d3b4ad19135b953a78882e789
      Additional Information 3:    0a9e
      Additional Information 4:    0a9e372d3b4ad19135b953a78882e789
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt
      please help.

    im having this problem to ive uninstalled and installed but this still comes up!!
    Problem signature:
      Problem Event Name:    BEX
      Application Name:    iTunes.exe
      Application Version:    10.7.0.21
      Application Timestamp:    504d85d9
      Fault Module Name:    StackHash_0a9e
      Fault Module Version:    0.0.0.0
      Fault Module Timestamp:    00000000
      Exception Offset:    00000000
      Exception Code:    c0000005
      Exception Data:    00000008
      OS Version:    6.1.7601.2.1.0.768.3
      Locale ID:    5129
      Additional Information 1:    0a9e
      Additional Information 2:    0a9e372d3b4ad19135b953a78882e789
      Additional Information 3:    0a9e
      Additional Information 4:    0a9e372d3b4ad19135b953a78882e789

  • Hello friends, my itunes has stopped working. and the problem report stated the following: Fault Module Name:     KERNELBASE.dll   Fault Module Version:     6.1.7601.17514.................. please can anybody help me?hello friends, my itunes has stopped w

    Hello everybody> my itunes has stopped working and the problem report stated the following:
    Problem signature:
      Problem Event Name:    APPCRASH
      Application Name:    iTunes.exe
      Application Version:    10.5.3.3
      Application Timestamp:    4f14cc3d
      Fault Module Name:    KERNELBASE.dll
      Fault Module Version:    6.1.7601.17514
      Fault Module Timestamp:    4ce7b8f0
      Exception Code:    80000003
      Exception Offset:    0003381b
      OS Version:    6.1.7601.2.1.0.256.1
      Locale ID:    1033
      Additional Information 1:    0a9e
      Additional Information 2:    0a9e372d3b4ad19135b953a78882e789
      Additional Information 3:    0a9e
      Additional Information 4:    0a9e372d3b4ad19135b953a78882e789
    can anybody help me?

    Are you seeing a similar message when launching QuickTime Player?
    What security software is installed on the computer? Have you tried testing in an admin account or after uninstalling tthe security software?
    Use one of the following articles to guide you through removing iTunes and the related QuickTime files.
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7

  • PDF signature timestamp problem

    Hi, sorry if this post is slightly offtopic.
    We are trying to sign and timestamp pdf documents in java (using Apache PDFBox) and we are stuck with a problem for more than a week. The signature itself is good, Adobe Reader can validate it succesfully (after adding our self signed test root certificate to trusted certificates). The problem is with the timestamp. Adobe Reader says that the signature is timestamped, but the timestamp could not be verified. If I look at the Date/Time tab on the Signature Properties window the Timestamp Authority field says Not available. Older versions of Adobe Reader 9 displayed the Show Certificate button for the Timestamp Authority as enabled, and if I clicked it, the Reader crashed. In newer Reader 9 versions and in Reader X the button is disabled. It seems Reader recognises the timestamp but can't extract the TSA certificate.
    However if I sign the pdf with Acrobat X Pro or with iText (using the same private key and the same TSA) everything is perfect, the timestamp is validated, Timestamp Authority field shows the correct value, TSA certifiicate is OK.
    I analyzed the signatures and the timestamp tokens, but I could not find any significant difference between the good and wrong ones.
    I wanted to attach a working and a non-working sample but I didn't find how to do that.
    Could someone please give us some advice about what could cause something like this?
    Can Reader log the signature parsing/validating process to view what's wrong?
    Thanks in advance
    Csaba

    Hi,
    I had the same problem with the pdf signature timestamp…..
    The thing I was doing wrong was the SHA-1 hash sent to the timestamp server, more precisely I was sending the whole signature SHA-1 hash when I suppose to send the SHA-1 hash of the RSA encrypted hash of the digital signature (I think that in your case is the 256 hash starting from 1783).
    Hope this helps you,
    Corina

  • Timezone effects on Date and Timestamp fields in af:query component

    Hello,
    I'm working on an ADF application where time zone is configured as follows:
    * Dynamic View Layer time zone is configured in trinidad-config.xml file and bound to a session scoped value:
    <trinidad-config>
      <skin-family>fusionFx</skin-family>
      <time-zone>#{sessionScope.tz}</time-zone>
    </trinidad-config>* ADF BC time zone is configured in adf-config.xml file and bound to View Layer time zone:
    <adf-config>
      <user-time-zone-config xmlns="http://xmlns.oracle.com/adf/usertimezone/config">
        <user-timezone expression="#{adfFacesContext.timeZone.ID}"/>
      </user-time-zone-config>
    </adf-config>The problem here is that Dates and Timestamp values work as expected all over the application except for the af:query component. When displayed as af:inputDate in af:form, Dates and Timestamp values are NOT getting converted to the time zone (TZ) configured in trinidad-config.xml file, whereas TimestampTz and TimestampLtz are. However, when displayed in af:query component, Dates and Timestamp values are automatically converted to View Layer TZ after a search has been performed.
    For example, say View Layer TZ = US/Pacific and we enter 01/jun/2011 as a search criteria of type Date and then click on the Search button. The displayed value automatically changes to 25/nov/2011, that is, it gets converted to the WLS JVM time zone, which is set to Europe/London.
    Is conversion of Date and Timestamps in af:query component the expected behaviour or could this be a bug?
    Is there any way to avoid this conversion?
    Thanks in advance
    Version:
    ADF Business Components 11.1.1.59.23
    Java(TM) Platform 1.6.0_21
    Oracle IDE 11.1.1.4.37.59.23
    PMD JDeveloper Extension 4.2.5.3.0
    Repost on 26-nov-2011 9:29
    Repost on 28-nov-2011 15:10
    Edited by: Barbara Gelabert on 26-nov-2011 9:29
    Edited by: Barbara Gelabert on 28-nov-2011 15:10

    Hi,
    Thanks for your reply. This certainly seems promising. However, I am getting a connection error now.
    The following...
    jar_loaded = require 'ojdbc14.jar'
    puts "Oracle jar loaded? #{jar_loaded}"
    puts "Starting active record"
    require 'rubygems'
    gem 'activerecord'
    gem 'activerecord-oracle_enhanced-adapter'
    require 'activerecord'
    puts "Connecting to MXGN"
    ActiveRecord::Base.establish_connection(
    :adapter => 'oracle_enhanced',
    :host => 'THEHOST',
    :port => '1550',
    :database => 'THEDB',
    :username => 'THEUSER',
    :password => 'THEPASSWORD'
    ... produces
    Oracle jar loaded? true
    Starting active record
    Connecting to MXGN
    ERROR: ActiveRecord oracle_enhanced adapter could not load Oracle JDBC driver. Please install ojdbc14.jar library.
    ERROR: ActiveRecord oracle_enhanced adapter could not load Oracle JDBC driver. Please install ojdbc14.jar library.
    C:/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:76:in `establish_connection': Please install the oracle_enhanced adapter: `gem install activerecord-oracle_enhanced-adapter` (LoadError) (RuntimeError)
    from H:\sandbox\DBPlay\lib\main_enhanced.rb:12
    I'm confused. Am I missing the driver, or have I failed to setup the enhanced Oracle adapter?
    I have tried moving the jar to $JRUBY_HOME/lib too, but the result was the same.
    All help would be greatly appreciated.
    Many Thanks
    Adrian

  • Oracle ODBC driver and TIMESTAMP with timezone

    Does anyone know if it is possible to return data from a "TIMESTAMP WITH TIMEZONE" column using the Oracle ODBC driver and an ADO Recordset?
    I am using the Oracle driver version 10.2.0.2 and TIMESTAMP fields work fine.
    I can call Recordset->Open() with a query like "SELECT * FROM TABLE" when the table contains a column of type timestamp with timezone but when I execute a statement to see if there are results as in
    if (!(srcRecsetPtr->BOF && srcRecsetPtr->EndOfFile))
    my application throws an unhandled exception and exits. The exception is not a COM exception and I'm not sure how to get back additional information if that's possible.
    The only information I've been able to find in searching TechNet and MetaLink is that a workaround is to wrap the columns in a TO_CHAR or TO_DATE conversion first but that's not a good solution for my problem since I am executing user specified SQL which may join multiple tables.
    I've found one other note that says the documentation should be corrected and that these fields are NOT supported period (Bug #4011640).
    I've experimented with the Bind Timestamp as Date option in the ODBC connection and with various ALTER SESSION settings to attempt to change the NLS_TIMESTAMP_TZ_FORMAT but I have been unable to get past the problem.
    Any ideas are greatly appreciated.
    Thanks,
    Troy

    Hi Justin
    Thanks for your help.
    I tried what you mentioned and I could connect myself via SQL*Plus without passing a password and a login, Extern authentification seems to work and my user seems to be right configurated.
    But he problem goes on via ODBC. When I test connection in the ODBC Data Source Administrator of Windows XP, test fails and seems to forbid connection without userID and password. When I try to connect via ODBC in my program the same problem appears : "Unable to connect SQLSTATE=28000 [Oracle][ODBC][ORA]Ora-01017: Invalid username/password;logon denied" I could not connect in this way.. What's wrong ?

  • How to view both real data and timestamp informatio​n in TDM data viewer?

    Attached, I have a VI that uses NI-Scope (NI-5122) to digitize and store data.  I have added some TDMS functions in order to save waveform data in binary format ( our acquisition time is around 3 hours and the files become very large)  As you can see, I am using TDM file viewer to view the data, the problem I am having is that I can only see the voltages and not time stamps.  I am interested in viewing and analyzing timestamped data.  I do see that the graph contains both voltages and timestamps and idealy I would like to see both in the value tab.
    Please let me know what is the best way to see both sets of data. 
    Thanks!
    Attachments:
    niScopeFetchWDT_TDM1.vi ‏55 KB

    The TDMS file does preserve the timing information for a waveform, you can see it if you go to the 'Properties' tab.  The attributes are there to calculate the waveform timestamp data, however, it does not look like the code behind the TDMS file viewer supports displaying the timestamp values in a column on the 'Values' tab.  This seems like a good case for filing a product suggestion.  As for a work-around, if you are set on using a TDMS file and viewing the timing information you would require a custom version of a TDMS file viewer.
    -Bob
    -Bob

  • Count and timestamp logging messages: disabled

    Hi ,
    what does this setting "Count and timestamp logging messages: disabled" mean ? in "show logging" output.
    I do not see the number of message lines logged ( syslog ) increasing under the "show logging" output,
    Same is the case with the numbers in "Trap logging: level notifications, xxxx message line logged"
    This is happening on IOS , any idea why ?
    Thanks,

    Hello Vikram,
    If you do not have the time-stamp configured it would be more difficult to troubleshoot, lets explain this with an example:
    -One of your interfaces went down at 13:30 your local time, you have logging enabled without the time-stamp so you go to your syslog server and you look for that problem, in that case you will need to go to all the syslog messages database ( witch might be huge and the message you are looking for could be imposible to find) so if you have timestamp enable you will go directly to the 13:30 messages and find it so much easier.
    Here is another explanation I found for you:
    logging timestamp
    This command causes the firewall to add a time stamp to each Syslog message before it is sent. The firewall should have its clock set and time synchronized to a known and accurate source.
    Please rate helpful posts,
    Kind regards,
    Julio

  • Date and Timestamp not updating

    Following on from my previous posts, the date and timestamp of updated files are not being updated in RoboSource Control, i.e. the Modified column in the RoboSource Control Explorer. However, it looks like changes are being stored on the server when topics are checked in, as I can right-click a file in source control that I have changed, choose View, and see the amendments in the HTML.
    Basically, this means that source control isn't recognising that files have changed and therefore when someone tries to get the latest version it doesn’t think there is one because the date and time are the same as previous version.
    Has anyone experienced this behaviour before or know why the Modified column has suddenly stopped being updated?
    Thanks
    Jonathan

    After some digging and random Googling the following article seems to have fixed my issue .
    It seems that if you are running RoboSource Control on 64-bit machines, there are problems with checking in files.
    http://helpx.adobe.com/robohelp/kb/cant-check-files-robosource-control.html.

  • I am not able to launch FF everytime i tr to open it, it says FF has to submit a crash report, i even tried doing that and the report was submitted too, but stiil FF did not start, and the problem still persists, please help me solve this issue in English

    Question
    I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
    '''(in English)'''

    Hi Danny,
    Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
    but not 180, right?
    I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
    =COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
    or
    =SUM(IIF(Fields!TICKET_STATUS=4,1,0))
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • BOSD, Battery issues and Heating problem after iOS 8 upgrade

    i have upgraded my iPad mini to iOS 8. Ever since I upgraded to iOS 8 am facing blue screen issues and heating problem as well. This is really frustrating even the patch iOS 8.0.2 dint solve the problem. Are you guys listening our complaints. When will you fixing it.

    The same thing happened to me on my 2012 Subaru Outback.  I'm not sure this will help you since you have a Honda, but I'm posting this just in case.
    I paired the audio on my car with my iPhone 6.  However, when I turned the car off and back on again, the iPhone would not pair automatically.  I had to manually connect the iPhone with the car.  Turns out there are two separate bluetooth pairings on my car: one for phone which allows up to 5 devices and one for audio which allows only one device.  So I did the second bluetooth pairing for the phone (had already done the audio), and that fixed it.  YMMV

  • I am making code to try to make a game and my problem is that my code......

    I am making code to try to make a game and my problem is that my code
    will not let it change the hit everytime so im getting the first guy to hit 1 then next hits 8 and so on and always repeats.
    Another problem is that I would like it to attack with out me telling it how much times to attack. I am using Object oriented programming.
    Here is the code for my objects:
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.Random;
    import static java.lang.Math.*;
    import java.awt.*;
    import java.awt.color.*;
    class rockCrab {
         //Wounding formula
         double sL = 70;                                   // my Strength Level
         double bP = 1;                                   // bonus for prayer (is 1 times prayer bonus)
         double aB = 0;                                 // equipment stats
         double eS = (sL * bP) + 3;                         // effective strength
         double bD = floor(1.3 + (eS/10) + (aB/80) + ((eS*aB)/640));     // my base damage
         //Attack formula
         double aL = 50;                                   // my Attack Level
         double eD = 1;                                   // enemy's Defence
         double eA = aL / eD;                              // effective Attack
         double eB = 0;                                   // equipment bonus'
         double bA = ((eA/10) * (eB/10));                    // base attack
         //The hit formula
         double fA = random() * bA;
         double fH = random() * bD;
         double done = rint(fH - fA);
         //health formula
         double health = floor(10 + sL/10 * aL/10);
         rockCrab() {
         void attack() {
              health = floor(10 + sL/10 * aL/10);
              double done = rint(fH - fA);
              fA = random() * bA;
              fH = random() * bD;
              done = rint(fH - fA);
              System.out.println("Rockcrab hit" +done);
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.Random;
    import static java.lang.Math.*;
    import java.awt.*;
    import java.awt.color.*;
    class self {
         //Wounding formula
         double sL = 1;                                   // my Strength Level
         double bP = 1;                                   // bonus for prayer (is 1 times prayer bonus)
         double aB = 0;                                 // equipment stats
         double eS = (sL * bP) + 3;                         // effective strength
         double bD = floor(1.3 + (eS/10) + (aB/80) + ((eS*aB)/640));     // my base damage
         //Attack formula
         double aL = 1;                                   // my Attack Level
         double eD = 1;                                   // enemy's Defence
         double eA = aL / eD;                              // effective Attack
         double eB = 0;                                   // equipment bonus'
         double bA = ((eA/10) * (eB/10));                    // base attack
         //The hit formula
         double fA = random() * bA;
         double fH = random() * bD;
         double done = rint(fH - fA);
         //health formula
         double health = floor(10 + sL/10 * aL/10);
         self() {
         void attack() {
              health = floor(10 + sL/10 * aL/10);
              fA = random() * bA;
              fH = random() * bD;
              done = rint(fH - fA);
              System.out.println("You hit" +done);
    }Here is the main code that writes what the objects do:
    class fight {
         public static void main(String[] args) {
              self instance1 = new self();
              rockCrab instance2 = new rockCrab();
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
    }when the code is run it says something like this:
    you hit 1
    RockCrabs health is 9
    RockCrab hit 7
    your health is 38
    you hit 1
    RockCrabs health is 8
    RockCrab hit 7
    your health is 31
    you hit 1
    RockCrabs health is 7
    RockCrab hit 7
    your health is 24
    you hit 1
    RockCrabs health is 6
    RockCrab hit 7
    your health is 17
    my point is whatever some one hits it always repeats that
    my expected output would have to be something like
    you hit 1
    RockCrabs health is 9
    RockCrab hit 9
    your health is 37
    you hit 3
    RockCrabs health is 6
    RockCrab hit 4
    your health is 33
    you hit 2
    RockCrabs health is 4
    RockCrab hit 7
    your health is 26
    you hit 3
    RockCrabs health is 1
    RockCrab hit 6
    your health is 20
    Edited by: rade134 on Jun 4, 2009 10:58 AM

    [_Crosspost_|http://forums.sun.com/thread.jspa?threadID=5390217] I'm locking.

  • Remote and IR Problem

    A rather odd and annoying problem has recently been occuring on my MBP. A couple days ago my remote (after working without fail for over a year now) suddenly stopped working. Yesterday night and this morning it started working again but after a while it stopped again. I've read dozens of support articles which haven't really helped because there seems to be another problem.
    Most articles have stated that there is an option to disable the IR receiver in the "security" window under system preferences. When the IR and remote are not working this option disappears but when they are working the option is present. I have also tried replacing the battery without any result.
    I am now thinking that it might have something to do with heat buildup because it is mainly occuring after the laptop has been on for about a half hour, so I am going to try to borrow someone's fan.
    If anyone has any suggestions to solve this I would appreciate it if you could help. Thanks!
    MacBook Pro 1.83 GHz   Mac OS X (10.4.9)  

    check out this thread. Seems to be the same problem.
    http://discussions.apple.com/thread.jspa?messageID=4701905&#4701905

Maybe you are looking for

  • Find keyword used in Web Dynpro Application?

    Hi folks, I have a simple question with regards to Web Dynpro for ABAP: Is it possible to search in my application for a keyword that I have used? For e.g., I wish to search for the keyword "loop" to find out which parts of my program have this match

  • Pro vs Standard

    I'm using the trial of Acrobat Pro X and trying to decide if I need it or can get by with the Standard version.  When I look at the product comparison, the main difference for me is the inclusion of the Livecycle Designer with Pro.  I don't think the

  • GUI screwed up sometimes with Custom Look & Feel

    Hello, i've got a few problems with my JApplet. Im using a custom Look and Feel (Kunststoff, http://www.incors.org/index.php3 very nice) - my problem is that sometimes (often) my gui is screwed up - some parts like a JPane are not rendered in the cus

  • Change login background for Mac OS 10.7.4

    Lost my custom login background when I updated to Maac OS 10.7.4 - How do I change it back?

  • I'm getting the following error

    I keep receiving this error as a pop up & cannot connect to the Internet. another device on your network is using your computers ip address