Is there a faster way to figure out what a negative number in base 8 is?

Hi,
Altough I know that using base 8 in java is rare, I am still curious about ways to convert from a negative decimal number into a base 8 number.
For example, when we want to find out the negative representation of -11 (base 10) in base 8 . I would first convert -11 into the 2's complement representation of base 2 first (i.e. 11 in binary is 00001011; -11 two's complement is then 11110101). I then convert this into base 8 (365). Is there a faster way for this?
I hope i am not confusing everybody.
Thank you.
- nygrl

Octal values from 0 to Integer.MAX_VALUE is
between 0 and 17777777777, and those from
Integer.MAX_VALUE to -1 is from 20000000000 to
37777777777.correction:
Octal values from 0 to Integer.MAX_VALUE is between 0 and 17777777777, and those from Integer.MIN_VALUE to -1 is from 20000000000 to 37777777777.

Similar Messages

  • My hard drive suddenly went from 52 gigs free to 22 gigs- is there any way to figure out what happened?

    my hard drive suddenly went from 52 gigs free to 22 gigs- is there any way to figure out what happened?

    Perhaps this may be of help...
    Where did my Disk Space go?

  • Does anyone know if there's any way to find out what files in my Library

         Does anyone know if there's any way to find out what files in my Library I can delete? I just cleaned off my HD onto a media drive as a back up so all my movies documents and photos are gone but my Library seems to be a huge space hog eating sixty gigs of space and I do have alot of apps but they don't take up a third of that space... Any ideas how I can figure out what is wasting all this space? I had Spring Cleaning once but found it to be rather confusing as to what was essential to the OS and what not...
    Thanks,
    Matt

    Get free OmniDisk Sweeper. I can't imagine how you could have sixty GB in that folder. My entire ~Library isn't even 1GB. Are you sure you're not talking about your entire Home folder?
    Can you post a screenshot of the contents of that folder.
    Check again. Are you sure you moved all the Movies etc. out? Could have left duplicates of everything behind when you did this.
    Message was edited by: WZZZ

  • How do i figure out what my serial number is for adobe photoshop elements so i can download it?

    How do i figure out what my serial number is for adobe photoshop elements so i can download it?

    See this:
    Find your serial number quickly

  • HT204347 Serial number for macbook pro (stolen - any way to find out what the serial number of it was ? I didn't keep a note of it and don't have the original receipt / box.... thanks :)

    Macbook pro laptop stolen - any way to find out what the serial number of it was ? I didn't keep a note of it and don't have the original receipt / box.... thanks

    The only other way would be through Apple, assuming you bought it at an Apple store or at least registered it. Stop by the store or call their support number.

  • Is there a way to figure out what takes up a lot of memory using Spotlight?

    My 80 GB iMac apparently has 70 of the gigabytes used by various things on the computer, but I am at a loss as to what. My pictures take up about 15 GB and my music about the same, but even with that amount, I can't figure out where the other 50 have gone. I'm thinking there might be something like a large movie I created long ago hidden somewhere but it's not in any obvious place. I was wondering if anyone knows of a way to search for files by size using a method that would perhaps list what is the biggest and therefore taking up all this space because I am almost out of disk... Thanks.
    iMac   Mac OS X (10.4.6)  

    You can use WhatSize to tell you what is using up the space on your hard disk.
    (11787)

  • Is there a way to figure out what the current thread is?

    I've got the following snippet of code:
    // create a new thread. If the current thread is not this new thread, return
    Thread CountDownThread = new Thread("CountDownThread");
    CountDownThread.start();
    if (/*CURRENT THREAD*/.getName() != CountDownThread.getName()) {
         System.out.println ("I'm not CountDownThread. I'm leaving.");
         return;
    // current thread should be new thread. Therefore start the countdown
    CurrTime = InitTime;
    while(CurrTime.charAt(0) != '-') {      // go until current time is negative
         CurrTime = C.countDown();       // returns the current time based on the difference between the initial and elapsed time
         setText(CurrTime);                   // display current time in JLabel
    C.reset();
    setText(C.getCurrTime());What I'm trying to do is get a clock (C) to count down and display the time remaining in a JLabel (this snippet is taken from a method within that very JLabel which I'm extending from javax.swing.JLabel). While it's counting down, I'd like for the program to go off and do other things. Therefore, I'm trying to create a new thread that carries out the task of counting down while the original/main thread moves on to do other things.
    Please have a look at the above code and tell me if I'm on the right track. The one thing I don't know how to do is figure out how to tell which thread the current thread is. I'm assuming that both the new thread and original/main one will execute the if statement, the new one after it returns from start() (which I haven't defined). The original/main one will detect that it is not the new thread and return, whereas the new thread will and go on to the while loop. In the while loop, it will count down the clock until it reaches 0, after which point it will reset it and die.
    If I'm on the right track, all I need to know is how to detect which thread is currently executing. If I'm not on the right track, what would be the best way to do this?

    What? No! No Thread terminates on the return of start(). Those two events are unrelated!Uh... I think you misunderstood what I said.
    I didn't say that CountDownThread terminates upon returning from start() (which is what it sounds like you interpreted from me); I said that the thread that CountDownThread creates terminates once CountDownThread returns from start() (i.e. like any other local variable/object). This, of course, assumes that CountDownThread has a Runnable object on which to call its run() method (am I right?), in which case my code above doesn't create a new thread at all (i.e. CountDownThread.start() is executed within the main/original thread) - am I right?
    No, run() doesn't call start()! That would be stupid.Again, you misunderstood. I shouldn't need to explain this one. A simple reference to an ordinary dictionary on the words 'former' and 'latter' should suffice :)
    Anyway, all joking aside, I have now improved my code and it works! Here's what it looks like:
    ClockJLabel.java
    package MazeMania.clock;
    public class ClockJLabel extends javax.swing.JLabel {
    private Clock C;
    private ClockJLabelsRunnable CJLR;
    public ClockJLabel() {
      C = new Clock();
      CJLR = new ClockJLabelsRunnable();
      setText(C.getCurrTime()); // should be 00:00:00:00
      setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
      // need to figure out how to set the size so that it sticks
      setForeground(new java.awt.Color(255, 0, 0));
      setBackground(new java.awt.Color(0, 0, 0));
      setOpaque(true);
    // starts the clock counting up indefinitely from 0
    public void start() {
      (new Thread(new Runnable() {
        public void run() {
         while(true) setText(C.getElapsedTime());
       })).start();
      //System.out.println("Started clock...");
    // starts the clock counting down from an initial time and runs this count down in a separate thread
    public void countDown(String InitTime) {
      // initialize the clock
      try {C.initClock(InitTime);}
      catch(java.text.ParseException PE) {
       System.out.println(PE.getMessage());
      // initialize JLabel's display
      setText(C.getCurrTime());
      // prepare Runnable and give it to new Thread. New Thread starts count down.
      CJLR.task = CJLR.COUNTDOWN;
      CJLR.CJL = this;
      Thread CountDownThread = new Thread(CJLR);
      CountDownThread.start();
    public Clock getClock() {
      return C;
    }ClockJLabelsRunnable
    package MazeMania.clock;
    import java.lang.Runnable;
    class ClockJLabelsRunnable implements Runnable {
    public static int COUNTDOWN = 1;
    public static int COUNTUP = 2;
    // NOTE: this Runnable doesn't test for the proper setting of these variables
    public int task = 0;
    public ClockJLabel CJL = null;
    public void run() {
      Clock C = CJL.getClock();
      while(C.countDown().charAt(0) != '-') {CJL.setText(C.getCurrTime());}
      C.reset();
      CJL.setText(C.getCurrTime());

  • I want to cancel the plan, and there is no way to figure out how!!!!

    I have the photography adobe pack contracted which is about being able to use photoshop and lightroom for 12'29€. I'm in the first 30 days of payment, and i've seen another plan that is more interesting for me, but first i need to cancel this one.
    The problem is that I don't get to know how to cancel it, i cannot find the way.
    I would be very thankful if anyone could help me figure out how to do it.
    Thank you.

    Cancel http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

  • Is there any way to figure out what this transport error is about?

    HI,
    I am getting the following transport error from the log:                      
    u201C R3TRROUT4BHOQZTDNV4U6BLY12MUXO6C6 not found; object also deleted in target Systemu201D                                                                   
    Following the information on this site, I looked through all the tables listed under RSUPD* but could not locate R3TRROUT4BHOQZTDNV4U6BLY12MUXO6C6
    Also, following the help to see RSA1 -> Update rules -> Extras -> Object Data Directory, it shows the update rules was no local.
    The only unique thing about this particular Update Routine, is that the rule source fields include one new field zfield which was an enhancement to 2lis-02_scl. When the Update Rule was transported to Quality, the three fields from the 2LIS, including the zfield (which were mapped in Dev) do not how up in test and hence the transformation becomes u201CXu201D
    The model is:     Infosource (from R3) --> Transformation  ODS
    The transport of the Transformation to Quality ends with warning but when you go to Quality to check, all the 4 Update Rules in the Transformation were ok, except that the 4th update rule, which automatically becomes u201CXu2019 (No Transformation).
    Thanks

    Hi,
    When i try to collect the transformation in Transport connection, I get the following:
    Object '4BHOQZTDNV4U6BLY12MUXO6C6' (ROUT) of type 'Routine' is not availab
    in version 'A'
         Message no. RSO252
    Diagnosis
         You wanted to generate an object with the name
         '4BHOQZTDNV4U6BLY12MUXO6C6' (in transport request ROUT) of type
         'Routine' (TLOGO). This is, however, not available in the BW Repositor
         database. It does not exist in the requested version A. If the version
         is 'D' then it is possible that an error arose during the delivery or
         installation. If the version is 'A' then the Object was either not
         created or not activated.
    System Response
         The object was not taken into account in the next stage of processing.
    But I Can't find it to remove or activate.
    Any more hints?

  • How can i figure out what my pin number is?

    i need my pin number but don't remember what it is how can I figure this out?

        josh0921, I know that being without your PIN can be quite the hassel. Just to be sure, are you referring to your billing account password or are you referring to a PIN used to unlock the device? If this is regarding your billing PIN when calling into customer service that cannot be changed, but can certainly be updated after completeing secondary verification over the phone. If you need to reach out customer service you can give them a call at 800-922-0204.  http://vz.to/XNtW61
    AdamG_VZW
    Follow us on Twitter @VZWSupport

  • Is there a way to find out what other devices are using my apple ID?

    I have recently discovered that someone is purchasing apps on using my apple id account i have managed to view a statement through the Mac computer but that only tells me what the purchase is, how many there are and how much it totals to. I wanted to know whether there was a way to find out what device i.e. iphone or ipad they are being purchased from? any help would be great!

    i am but i have looked though their apps on their device and they have no downloaded some of the apps that have been purchsed on my account?

  • Figuring out what card I have.

    Ok, so I managed to navigate the main MSI site and followed the link to figure out what my product number is.  However, unless I'm requesting an RMA, this information seems useless to me.  I cannot click somewhere on the driver page to determine what card I have based on the product number.  Am I just missing something?  I've got an MS-8822-040.

    http://www.msi.com.tw/program/search/ser/SerConProRes.php?keyword=ms-8822&kind=

  • Is there a way to figure out the name behind an Apple ID?

    Is there a way to figure out the name behind an Apple ID?  My oganization uses an iPad as a kiosk.  Somone accessed the iPad, changed the Apple ID associated with iTunes, downloaded a game and set a password to lock up the whole iPad.  We had to completely restore the iPad in order to access it.  When I tried to upload a new app, a different Apple ID popped up, and I'm assuming it was the person who locked the iPad and downloaded the game.  I would like to figure out who owns that account, just so we can not allow that person access to the iPads anymore.
    Is there a way to do this?

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    Perhaps with a court order because the person committed a criminal act. Otherwise it is doubtful that Apple would violate the privacy of a client/account holder just on your word.

  • Is there a fast way to wrap unstructured text into [Para] tags?

    I'm trying out my new Frame 12 by trying to produce an ebook in several formats. I'm using the out-of-copyright Agatha Christie's A MYSTERIOUS AFFAIR AT STYLES.
    Is there a fast way to wrap each paragraph with a [Para] tag?
    Thanks in advance.

    Wow, Russ, leave it to an FDK programmer to want to write a script or plugin to solve every problem! And FM does indeed have native functionality that addresses this situation. The conversion tables (see the Structured Application Developer Reference) that you mention in passing were designed to handle exactly this situation. Except that a conversion table operates on an unstructured rather than a partially structured document. So, all TdeV1 need do is:
    1. Create a new document from the chosen sample.
    2. Delete all content, including the root element.
    3. Paste the original, unstructured paragraphs.
    4. Use StructureTools > Generate Conversion Table to create a new coversion table.
    5. Complete the table as follows:
    Wrap this object or object
    In this element
    With this qualifier
    P:
    Para
    Para+
    Section
    Section
    Chapter
    6. Save the conversion table but leave it open.
    7. In the original document, use StructureTools > Utiltities > Structure Current Document.
    8. Create the needed Head elements for the Chapter and Section.
    Another alternative, available since FM 11, is Smart Paste. Recall that Smart Paste allows the user to copy material from web pages and Microsoft Office products such as Word and paste it into FM. Yes, in general, there is a significant amount of setup to prepare for using Smart Paste. However, Smart Paste is supported out of the box for DITA. So TdeV1 could do the following:
    1. If the content originated in Word, open the Word document and copy the paragraphs to the clipboard.
    2. Use DITA > New DITA File > New <topic> to create a new DITA document.
    3. Click in the <body> element to set an insertion point within that element.
    4. Use Edit > Smart Paste. FM will paste the content, converting each paragraph to a <p>.
    5. Copy the resulting <p> elements to the clipboard.
    6. Paste the <p> elements into the actual document.
    7. Select the <p> elements and use the Element Catalog (or Ctrl-3 to bring up the Smart Catalog for changing elements) to change them to <Para> elements.
    However the structured document is created, while this sample template is appropriate for initial experimentation with structured FM, it is intended for technical material and not optimal for fiction. To get the most out of a structured document for production work, it's almost always necessary to define elements and attributes appropriate to the particular project.
        --Lynne

  • Is there a faster way to sync?

    Hello.
    I had some issues with my Apple TV and MAcBook syncing yesterday and I had to pair my computer again, and the content of Apple TV was erased. So now I have to sync everything again but its taking hours (I think even days). My internet connection might be causing some slow syncing.
    Is there a faster way to sync for the first time? (I guess just to transfer around 50 GB of info into apple TV, and then, wireless works out just fine)
    I left my computer all night syncing and it only did around 11 GB, after that, it went into sleep and stopped syncing.
    Cheers and thanks...
    IA

    your internet connection have nothing to do with the sync'ing between your computer and atv
    you don't even have to have an internet connection to sync
    you can try using eathernet rather then wifi but not sure how much it would help
    really the bottleneck seem to be located elsewhere i suspect

Maybe you are looking for

  • Problems after upgrading ASA from 8.4.5 to 9.1.1

    Hi, We are having problem with behavior of nat statement after upgrading ASA. Here are results of packet tracer in our testing environment: object network onBK028VRRP host 1.1.1.111 object network onSIEMServers host 1.1.1.1 object service osSyslog se

  • Problem importing photos with OS 10.4.6

    I have two PowerMacs G5, one first gen G5 1.8 GHz and a Dual 1.8 GHz. I can easily download from iPhotos or directly on my HP 735 Photosmart pictures that I take when using my Dual G5. But on the other computer the photos get corrupted and are theref

  • Issue with Audio Playback and Uninterrupted Playback in MPE (Hardware Mode)

    I'm currently using Adobe Premiere Pro CS6 with the latest update (6.0.1). I'm encountering a very serious problem where the audio from my video clips mute sudddenly when I'm editing and playing back. This happens when other music or audio in the aud

  • I don't see my iCloud icon

    Newbe can't find the iCloud icon on the main screen.  What did I not do correctly?

  • Web Services - RFC

    Hi Guys, I have to work and configure the scenario from Websrvices to SAP. Can anyone let me know the process and steps to setup / Configure the scenario for  Web services --> RFC. Thanks a lot in Advance. Regards, Kittu.