Quick help on Queue adding

I'm doing a radixsort program and I need to add the elements off each queue into the master queue. I commented where I need the code. If someone could show me a loop idea or some code that can help I'd appreciate it. Thanks in advanced.
Code:
import java.util.*;
public class RadixSort {
     private int numberOfDigits = 3;
     public  Queue<Integer> radix(Queue<Integer> masterQ) {
          Queue<Integer> Q = new LinkedList(masterQ);
          Queue<Integer> q0 = new LinkedList<Integer>();
           Queue<Integer> q1 = new LinkedList<Integer>();
           Queue<Integer> q2 = new LinkedList<Integer>();
           Queue<Integer> q3 = new LinkedList<Integer>();
           Queue<Integer> q4 = new LinkedList<Integer>();
           Queue<Integer> q5 = new LinkedList<Integer>();
           Queue<Integer> q6 = new LinkedList<Integer>();
           Queue<Integer> q7 = new LinkedList<Integer>();
           Queue<Integer> q8 = new LinkedList<Integer>();
           Queue<Integer> q9 = new LinkedList<Integer>();
          int x = Q.poll();
          for (int i = 0; i < numberOfDigits; i++) {
               while ( ! Q.isEmpty()) {
                    int n = 1;
                    if (getDigit(x, n) == 0)
                         q0.offer(x);
                    else if (getDigit(x, n) == 1)
                         q1.offer(x);
                    else if (getDigit(x, n) == 2)
                         q2.offer(x);
                    else if (getDigit(x, n) == 3)
                         q3.offer(x);
                    else if (getDigit(x, n) == 4)
                         q4.offer(x);
                    else if (getDigit(x, n) == 5)
                         q5.offer(x);
                    else if (getDigit(x, n) == 6)
                         q6.offer(x);
                    else if (getDigit(x, n) == 7)
                         q7.offer(x);
                    else if (getDigit(x, n) == 8)
                         q8.offer(x);
                    else q9.offer(x);
               // PROBLEM HERE
               //HOW DO I ADD EACH QUEUE INTO MASTER QUEUE???
               n++;
     public  int getDigit(int num, int place) {
          num = num / place;
          int newNum = num % 10;
          return newNum;
}

I don't know how to position in Queues since it is not an array. I realize that if this was an array I'd be done. But I'm restricted to using Queues.
Thanks

Similar Messages

  • Hiding Quick Help Link and Force Display Explanation Message

    Hi,
    We are using the Talent Profile window in Talent Management and have added custom help text in the explanation hierarchy elements for each view using Floorplan manager configuration. The requirement is for this help text to always be shown when the user views the screen. Also immediately to the right of the explanation text is a link "Hide Quick Help". We would like to Hide/remove that link from the screen so that the users will not accidentally hide the help text in the explanation UI element. Now I have searched the forums here and saw threads such as Show explanation by defaul ("Display Quick Help")? and How to hide Display Quick Help and More Field Help and others. I have tried using the application parameters WDDISABLEUSERPERSONALIZATION and WDHIDEMOREFIELDHELPASDEFAULT.The setting WDDISABLEUSERPERSONALIZATION = X successfullyremoved the personalization options from the context menu. I tried WDHIDEMOREFIELDHELPASDEFAULT and if the user had previously selected "Hide Quick Help", setting this parameter to either X or space did not bring up the Explanation text when that user closed out of and then re-entered the application. Does anyone know how to force this text to display regardless of what the user previously selected?
    Also I am at a lost as to how to get rid of the link "Hide Quick Help". Any help will be appreciated.
    Thanks,
    Gregg

    Hi,
    Was a solution found for this. I also have this request and the setting WDHIDEMOREFIELDHELPASDEFAULT does not solve this.
    Thanks,
    Sherri

  • Need some quick help - fairly urgent!

    I've just taken over a new job and have been the task of finishing the new brochure for Christmas, there's not a lot to do but a lot of the measurements need changing
    This is the layout I'm dealing with..
    All the boxes have been made in Illustrator
    The text has been done in In'Design and it seems every piece of text is it's own box if that makes sense
    My question is, if I select the whole specification box - copy, paste it into Adobe Illustrator and change the text there, then paste the edited box back into In-Design, will I lose quality when it gets printed?
    I'm worried if I do it this way it may come out blurred? Or am I just worrying about nothing?

    I couldn't find an Illy file in the end and have ended up creating tables in ID to replicate what was already there!
    Didn't take very long and I guess if I didn't do it now, I'd come across the same situation next time!
    Date: Wed, 30 Nov 2011 08:48:07 -0700
    From: [email protected]
    To: [email protected]
    Subject: Need some quick help - fairly urgent!
        Re: Need some quick help - fairly urgent!
        created by Peter Spier in InDesign - View the full discussion
    There certainly are viable "quick fix" solutions proposed here, and if the dealine is looming and this file never needs to be touched again I might be tempted, but they are only postponing the pain for a file that needs periodic updates, and I wouldn't waste effort on them, myself, when that time can be put toward a proper rebuild now if that's the ultimate goal.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4054725#4054725
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4054725#4054725. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in InDesign by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Help- I have added a field in my tabular form and now i get an error in mul

    Help- I have added a field in my tabular form and now i get an error in muli update form; Here is the error, how do I go in to change the process, adding the extra field??
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "F10F6D7EC4CF938382C6DC2EE22800F6", item checksum = "90E47F32E95B71B7A9D47A1311063445"., update "CAPRS"."CONTRACT_ERRORS" set "ID" = :b1, "CONTR_NUM" = :b2, "REPT_MONTH_CD" = :b3, "REPT_FISCAL_YEAR" = :b4, "REPORT_FAC_CAGE_CD" = :b5, "END_ITEM_NUM" = :b6, "END_ITEM_DESC" = :b7, "WSSC" = :b8, "WBS_CD" = :b9, "WPC_CD" = :b10, "CONTR_CLIN" = :b11, "CO
         Error      Unable to process update.

    Hi,
    I believe the error is due to the checksum process which doesn't have that additinoal field's information. You can try creating the form again with the additional field, or if needed you can go with the Manual tabular form.
    Thanks,
    Manish

  • Need Some Quick Help w/Digital Frame for Xmas Gift Please...

    Have a Kodak digital picture frame. I don't understand the architecture of using the SD or USB cards w/the frame. I bought a 1 and 2-gb SD card. When copying my photos to the cards (112 of them), I get about 92 on the 1-gb card and it says full, but still shows most of the disk available, but also says is full so only about 92 photos goes on there. So I try the 2-gb SD card, and exactly the same amount of photos fit??? Why - it is twice as big??? I tried reformatting it to Macintosh but that only made the frame not recognize it, and when I formatted it back to MS-DOS, the frame still does not recognize it...Question one...Why the 1 and 2 gb SD cards hold only the same amount of pictures and how can I get it formatted back to be read by the camera...and can I fill 112 pictures on??? So then I thought maybe a USB stick would work. Bought a 2-gb Lenar Firefly stick and whoa and behold the exact same thing happens...I get about 92 pictures. So I figured which 92 pictures I wanted and selected all the card contents, moved to trash and deleted the pictures, then went back and picked only the 92 pictures I wanted and copied to stick and all show that they are there, but when I go to play them on the frame the old pictures I had on there before are there and not just the 92 new ones. How do I get rid of everything on the disk and get the pictures onto it that I want...I am afraid to erase or format it in any way because the frame probably won't recognize it again. Also, there is one picture that says "Bad file" and I have no idea which picture this is...and can't get rid of it because when I move them all to trash and put the new pictures on the stick that one is still there????? On the stick, I have like 130 MB (112 Pictures). When copied it says 92 pictures with 1.76 GB available...why is this and why can't I copy pictures to that space??? Can someone explain this to me and advise me what I can do, how do I reformat it so recognized also??? Also, I have songs copied to the frame's internal memory, but can't figure out how to play the pictures and also music at the same time????? Thanks so much for any quick help and thorough explanation so I can get this wrapped and sent. Merry Christmas! Gary

    I also have a Kodak picture frame and had the same problem with my SD card. Two things I learned.
    1-Even though you can't see them on the card - there are hidden files. You can see them - use this procedure.
    http://www.tech-recipes.com/rx/3104/os-x-show-hidden-files-and-folders-in-mac-os -x-finder/
    2-The other item I learned is that you must drag and drop the files and then empty your trash. While the reader is connected to the machine.
    Doing these two items will clear your card to full capacity.
    As far as the "bad file" I am still working on that one. I have little movie clips on my card and believe that may be causing this view..so your music may be causing this message. Start with just the pictures only and see if you can load them onto the frame.

  • Need a quick help on Pro*C

    Hi All,
    I need a quick help on Pro*C. Here's the details on the same:
    - My program takes one input file as parameter. Lets assume argv[2] is the name of the inputfile, which is my input parameter as well.
    - ps_filename = argv[2]; I'm copying argv[2] i.e. filename in a variable called ps_filename
    - Now this inputfile can be of two types, say type A_yyyymmddhhmmss.dat and B_yyyymmddhhmmss.dat.
    - Therefore for every run I'll have one of this value as input parameter which will be copied into the ps_filename.
    - Now I need to call two different functions based on the inputfile i.e. if ps_filename like 'A%' then call func A() else call func B();
    But in ProC/C there is no provision to use like operator.
    Therefore my question is how can I have ps_filename like 'A%' in C?
    Can anyone please help me to solve this issue?
    Hope to get your co-operation.
    Thanks & Regards,
    Debabrata

    debabratas wrote:
    Therefore my question is how can I have ps_filename like 'A%' in C?Hello, why don't you just substring on the first character, and if that's an 'A', then LIKE 'A%' will also hold.
    For example, in Pro*C:
    if (substr(ps_filename,1,1) == 'A') {
    ..

  • Show explanation by defaul ("Display Quick Help")?

    If I put an explanation element on a web dynpro view, and if I use the design "Emphasized",  it is disabled by default. To see it, users have to right click and select "Display Quick Help".
    Is there a way to display, not hide, such an explanation by default?

    You can use the following code in WDDOMODIFYVIEW. It will never let user disable the quick help.
    DATA api_main2        TYPE REF TO if_wd_view_controller.
       DATA component        TYPE REF TO if_wd_component.
       DATA application      TYPE REF TO if_wd_application.
       api_main2 = wd_this->wd_get_api( ).
       component = api_main2->get_component( ).
       application = component->get_application( ).
       application->set_show_explanation( abap_true ).
    -Manish

  • I need help deleting and adding text

    i need help deleting and adding text, can soneone help
    Adobe Photoshop Elements 10

    You should delete your phone number from the topic line.
    Spambots search these forums for contact info.
    You don't want to get even more telemarketing/scam calls than you probably already get.
    It seems like the "Do Not Call" lists are ignored these days.
    Message was edited by: Bo LeBeau       Looks like someone already took care of this.

  • Show "Quick Help" in WebDynpro application as default

    Hi all,
    What I want:
    I want to create a default setting for my application to always display the quick help ("Soforthilfe" in German).
    I thought this should be done easily, but it seems that this is not the case!
    What I did:
    Opened application in Config Mode (via URL-parameter SAP-CONFIG-MODE=X) and activated quick help in context menu.
    -> This should place the setting for all users, which do not have their own setting for the quick help. BUT it did not! (Even after I deleted the user settings.)
    Can anyone help me with that?
    Kind Regards,
    Robert

    Hi Lina,
    Your question doesn't belong to this forum.
    Please put it in Forum for Web dynpro ABAP under section "Application server". It will help you to get the solution to your problem.
    Regards,
    Vaibhav

  • Quick help needed on reversing the Journals

    Hi Gurus
    While importing the data from the GL_INTERFACE the REFERENCE_21 …. REFERENCE _30 are moved to REFERENCE_1 through REFERENCE_10 in the GL_JE_LINES table and the GL_IMPORT_REFERENCES table..
    When reversing a posted entry all the 10 reference fields(REFERENCE_1 through REFERENCE_10) are not copied into the new reversed GL line. Only REFERENCE _2, REFERENCE _3 and REFERENCE _5 are copied in GL_JE_LINES table.
    Is there any setup, which allows the JE reversal to populate all the reference fields in the reversed line in GL_JE_LINES table?
    Any quick help is appreciated.
    Thanks
    Isaac

    Hi all,
    I could able to get the solution for this problem.
    Oracle provides Patch 5136186 to resolve this issue in 11.5.9 and 11.5.10.
    Thanks
    Isaac

  • MOVED: not seeing SATA HD, quick help plz

    This topic has been moved to AMD64 nVidia Based board.
    not seeing SATA HD, quick help plz

    Quote from: Cavalyr on 09-April-05, 17:49:44
    last thing i did before this problem started was install nTune and was running one of the things it has
    What is ntune?

  • Plugin Help Desk Queue

    We are using the Help Desk Queue to customize views for the Help Desk and have an issue. We have two admins for our Spiceworks site, myself and John. John set up the Help Desk Queue and has the ability to add/edit/delete views. I can view them, but do not have the ability to edit nor add new views. Is there somewhere else I need to be given permissions to modify plug-ins?
    This topic first appeared in the Spiceworks Community

    I had this problem also.  After contacting Cisco, they informed me that the Help Desk Administrator role doesn't have the authority to make chages to accounts that have higher privileges such as System Administrators and Help Desk administrators.
    Basically, the Help Desk role can only make changes to users.

  • HT1349 Since I switch to iCloud, I cannot sent emails from my iPhone. Any quick help? I don't have time to go through the Apple web of "Solutions" thanks in advance! Anyone! Thanks.

    Since I switched to iCloud, I cannot sent emails from my iPhone. Any quick help? I don't have time to go through the Apple web of "Solutions" thanks in advance! Anyone! Thanks.

    You can't send emails? Do you receive an error message when you try to send them? Have you done ANY troubleshooting on the device at all? If you don't have time to try things yourself, it will almost certainly take longer to try it in here.

  • Quick help needed (putting text on a .mov)

    OK, I have never used this program before and I am looking for a quick solution:
    After importing a film in .mov format the text looks fuzzy and awful. The text is simply white on a black background. The whole film has been imported and shows up as one clip.
    Can I make a still picture in Photoshop with the text and put it on top of the part with the fuzzy text in iMovie? How would I go about that? Is there another way to put clean looking text over the old fuzzy one?
    Thanks in advance for any help!

    If the text track was created using QuickTime Pro and then converted to "video" the results will vary greatly and the quality will never be the same as the QuickTime version.
    QuickTime text tracks are vector graphics (scale without distortion) and they look clear, clean and crisp.
    But when you "convert" them to "video" they not only lose the vector graphics but get rendered with some ugly results.
    Many QuickTime users are not aware that text tracks can even be converted to "video" format.
    I started with a Karaoke style QuickTime file with MIDI instruments:
    http://homepage.mac.com/kkirkster/.Public/blackbird_text.qtl
    Then I converted it to "video" and added a varying color background to show the quality degradation:
    http://homepage.mac.com/kkirkster/.Public/blackbird.qtl
    The MIDI audio was also converted to AAC audio which balloons the file size from 9 KB's to nearly 4 MB's.
    Basic results?
    Don't convert text to video.
    Add text tracks after export from iMovie using QuickTime Pro if the files will be viewed on a computer or served from the Web:
    http://homepage.mac.com/kkirkster/Lemon_Trees/
    As an example.

  • Help!! adding new pages to doc with logo!!!

    I've posted various questions for a couple hours now, none are answered.  Is everyone sleeping or does no one know how to use Pages??  I'm near tears and I've read the manual about 10 times and don't understand it.  I've tried to Google it but I'm not even sure what exactly to Google.
    I have an 18 page document in Pages.  It's just a plain old word processing document.  A list of Gluten Free restaurants in my area.  I add new restaurants to this list all the time so it needs to re-order itself as it does as a plain word processing document.
    I want to brand it more so I'm putting my logo and a little design in the bottom left corner of each page, or at least thats how I'd like it to look.
    So I set up page one, saved it as a template, captured it, done everything I can think of. But when I copy the document and paste it into the text boxt on the first page of the new document with the little logo on the page, all the subsequent pages do NOT have that logo on them.  Just the first page. 
    IF I set up 18 pages with the logo, and then paste it just adds 17 blank pages after that first page with the logo.  And those 17 pages that I set up prior to pasting are after the pages it added after the paste that have no logo.
    How do it get this to add a page with the logo in the corner??
    So when I add 5 new restaurants and it has to add a page to fit them it it will have that logo.  This can't be that hard to do.  I need the doucment to automatically add new pages when text is add and those pages need to have the logo,
    Please help me!!!
    Susan

    I'm sorry you think that Peter and it isn't true.  Maybe you are testy because its 2 am.
    I spent hours trying to figure it out on my own.  I looked all over these forums, I Googled it, I went to other Apple tips and forums I am familar with, went thru the manual.  I tried a lot of places first so I really don't think I'm demanding and I'm sorry if I came off that way. 
    I was just super frustrated.  Not being very computer savvy can be super frustrating, often I find what I "think" might be the answer for something I'm looking for and I can't even understand the answer.  I try, I follow the steps but some of the terms I don't know and then have to google and follow more steps and blah blah. 
    I'm sorry but I didn't just come here without doing research first for the answer, so its not fair to say I expected others to do the work for me.  I did try.  I agree the information here us beyond useful, I never could have done anything without out in the past, I've used it many times.  But you can shoot the messenger if you want but the response time does seem slower.  Not sure why you take that personally. 
    I'm sorry to **** you off so much. 

Maybe you are looking for