Search Results

Search found 2 results on 1 pages for 'longloop'.

Page 1/1 | 1 

  • System crashed while upgrading, now unable to recover. Please help

    - by longloop
    Yesterday while upgrading from 11.4 to 11.10, due to power cut my system crashed. Ubuntu is unable to boot. While booting I get two options in grub, one is for recovery mode and the other is for normal ubuntu booting (and others are also thr for mem check and booting to windows). When I try to boot it normally, it pauses booting while displaying ' Checking battery statues' . Though i am not using a laptop, I am on a desktop. And In recovery mode the menu has 4 options - resume boot, fsck , remount and root ( to goto shell prompt) . If I go to shell and type ' apt-get dist upgrade' , it shows - W: not using locking for read only lock file /var/lib/dpkg/lock E:unable to write to /var/cache/apt E:The package lists or status files could not be parsed or opened. Please instruct me to recover from this situation.

    Read the article

  • How long does it take to iterate through a long loop?

    - by Carl Rosenberger
    On a modern 64-Bit machine, how long do you think it takes to iterate through all the positive long numbers? Below is a code snippet in Java to demonstrate the idea. Without running the code yourself, how long do you think this code is going to run? How long will similar code run in other programming languages? public class LongLoop { public static void main(String[] args) { long startTime = System.currentTimeMillis(); for (long i = 0; i < Long.MAX_VALUE; i++) { // do nothing, just loop } long stopTime = System.currentTimeMillis(); long duration = stopTime - startTime; System.out.println("Time taken: " + duration + " milliseconds"); } }

    Read the article

1