Selection Sort type iteration with LinkedList

Hi,
It seems like Java's ListIterator isn't especially great for doing a "compare every element to every other element" traversion (like the type used in selection sort).
For example, this code works fine:
for(ListIterator<T> i = list.listIterator(); i.hasNext();) {
     T a = i.next();
     for(ListIterator<T> j = list.listIterator(j.nextIndex()); j.hasNext();)
          compare(a, j.next());
}But LinkedList.listIterator(int) is a really poor choice because the iterator has to start at one end and make its way towards the middle before it's returned. So it's not very fast.
I would do this:
for(ListIterator<T> i = list.listIterator(); i.nextIndex() < list.size()-1;) {
     T a = i.next();
     ListIterator<T> j = i.clone();
     for(j.next(); j.hasNext();)
          compare(a, j.next());
}except that ListIterator.clone() isn't defined. There's also no copy constructor like in C++.
Any ideas?

Another reason not to use iterators. I don't know
what those "structural modifications" are but they
are likely to make the iterators fail via
ConcurrentModificationException.
Yeah, I figured that one out pretty quickly.
And just another comment: you seem to be allowing
your brain to be fogged by the idea of choosing the
fastest method. The result of this is that you don't
get any working methods at all. Don't optimize yet.That's valid. I actually have it working now, but based on the (minimal) experience I've had I always pick the most appropriate collection and then work it out from there.
Something inside me dies whenever I see remove(0) called on a long ArrayList.

Similar Messages

  • SAP std pgm to re-trigger selected output types associated with sales order

    Hi,
    Can anyone help me providing the standard SAP Program which will do repeat output action for different output types associated to the sales order.
    Output Type
    ZA00
    ZA01
    ZA10
    ZA11
    ZML0
    ZRN0
    ZSA0
    ZSA1.
    Thanks,
    Ramya Sanjana

    Hello Ramya Sanjana,
    it's MAXDB/liveCache forum.
    -> Do you have the MAXDB/liveCache issues?
    -> What is the version of your system? SCM?
    Regards, Natalia Khlopina

  • AAAGGGHH!!! Selection sort with external file!

    Hi, i am trying to sort marks from an external file in ascending order, using a selection sort via an existing class StudentMark.
    However, i am receiving 1 error when i compile it!!!!
    code below:
    import java.io.*;
    import java.util.*;
    class sort
         // method to display the contents of an array
         static StudentMark data[];
         static void displayData(int[] data)
              try
                   data = StudentMark.loadMarks();
                   for (int index=0; index != data.length; index++)
                        System.out.println(data[index]+"\t");
              catch(Exception e)
                   System.out.println(e.getMessage());
         static int positionOfLargest(int[] data, int limit)
         // method to return the position of the largest item
         // in the data with bounds 0..limit
              int largest = data[0];
              int indexOfLargest = 0;
              for (int index=1; index <= limit; index++)
                   if (data[index]> largest)
                        largest = data[index];
                        indexOfLargest = index;
              return indexOfLargest;
         public static void selectionSort(int[] data)
         // method to sort the contents of an data into ascending order
              int temporary;
              int position;
              int size=data.length;
              for (int index=size-1; index > 0; index--)
                   position=positionOfLargest(data, index);
                   // swap numbers
                   if (index != position)
                        temporary = data[index];
                        data[index] = data[position];
                        data[position] = temporary;
         public static void main(String[] args)
              int[] data;
              System.out.println("numbers before being sorted\n");
              displayData(data);
              selectionSort(data);
              System.out.println("numbers after being sorted\n");
              displayData(data);
    the error is: sort.java:14: incompatible types -                data = StudentMark.loadMarks();
    ^
    Can anyone see what i am doing wrong??
    Thanks!!

    static StudentMark data[];
    data = StudentMark.loadMarks();the error message "incompatible types" means that the type of data and the return type of StudenMark.loadMarks() are not compatible.
    in case of we don't know the return type of StudentMark.loadMarks() i could only guess:
    class StudentMark {
      public static StudentMark[] loadMarks() {
    }if you used that kind of method declaration you should change your declatation of the variable data:
    public static StudentMark[] data;then your codeline 14 shouldn't be a problem any longer.
    StudentMark[] data and StudentMark data[] ARE different!
    hope it helps.

  • The type Iterator is not generic; it cannot be parameterized with arguments

    Hi all, i have a problem, and i think is a JRE problem
    The error is the following:
    If i share a Web JSF Exadel project enterely, with the .classpath, the .project,
    ect everything go ok. I can Check out the project
    and work with it without problems.
    But if i share only the JavaSource and the Webcontent of the same project
    and the other files and folders like the .classpath, the .project, the ant folder,
    ect are added to the subversion then appear the problem. When i Check out the project and build it (not with shift-alt-x Q but with the Build Project option of the Projec Menu in Eclipse)
    appear an strange error that say: "The type Iterator is not generic; it cannot be parameterized with arguments <E>".
    If i build the project using the build.xml file that came with the project everything is ok, but when i run the project into the Exadel the error
    appear againt.
    The error appear with all the eclipse versions from 3.1 to 3.3 and with all the ExadelStudio Pro versions from 3.5 to 4.0.4 and with the JRE versions 1.5.0_05 and 1.6.0_02
    Any idea will be very appreciated.

    Hi, i think i found a clue to discover the mistery, i deployed the same .war in the ExadelStudio Pro 3.5.1 tomcat and in the ExadelStudio Pro 4.0.1(and 4.0.4) tomcat in the first one everythink work fine but in the second i get the error i described above.
    The ExadelStudio Pro 3.5.1 use Tomcat 5.0 and ExadelStudio Pro 4.0.1 and 4.0.4 use Tomcat 5.5
    There are some problem with the new versions of Tomcat?
    Something related to the use of an old version of the JVM by default?
    There are some problem with the jdk1.5, something related to the posibility that i can't mix code compiled with an old version of jdk with code compiled with the jdk1.5?
    Any suggestion will be very appreciated

  • How to select paper type for Canon iP5000 with Leopard and Photoshop CS3.

    I have printed photographs quite happily for years on my iP5000 using PS7 and 10.X. However since installing Leopard and switching to PS CS3 I am unable to select paper type (glossy, matt, etc). Is this a 10.5 problem, or as I suspect a CS3 problem. Any suggestions would be appreciated.
    I can select paper type in other applications.

    I don't know if it is the same for your printer but with my Canon MP600 I experienced the same problem until I came across the fact that when Print is clicked there is a Blue Triangle on the right of the dialogue. Click this and the paper type etc is displayed.

  • Selection Sorting of Data type (Char)

    public class CharSortTest {
        public static void main(String[] args) {
            char[] letters = {'j', 'a', 'z', 'y', 'x'};
            char min = 0;
            char swap = 0;
            for (int x = 0; x <= letters.length - 1; x++) {
                min = letters[x];
                for (int i = x + 1; i <= letters.length - 1; i++) {
                    if (letters[i] < min) {
                        min = letters;
    if (letters[x] != min) {
    swap = letters[x];
    letters[x] = min;
    min = swap;
    for (int p = 0; p <= letters.length - 1; p++) {
    System.out.println(letters[p]);
    }output:a
    a
    x
    x
    xi followed the logic of selection sorting.. i even checked the integer values of each character in my array
    but why is my program not sorting                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    vajj wrote:
    public class CharSortTest {
    i followed the logic of selection sorting..Obviously you didn't.
    Put in print statements at each step so you can see exactly what's happening--varaibles' values, code paths being followed, etc.

  • Selection Sort using Linked Lists

    As the subject says, I'm trying to implement a selection sort method on a linked list structure. I've already created a bubble sort, but I can't seem to get this method to work correctly. The Node and LinkedList classes were written by me, and I know they work correctly (because of the other methods work right).
    public void selectionSort(LinkedList list) {
            int iterationsINNER = 1, iterationsOUTER = 1, swaps = 0, comparisons = 1;
            if(list.isEmpty())
                System.out.println("List is currently empty.");
            else if (list.size() == 1)
                System.out.println("List is already sorted.");
            else {
                Node pointer = list.getFirst();
                Node current;
                boolean exchangeMade;
                while (pointer.getNext().getNext() != null) {
                    current = pointer;
                    exchangeMade = false;
                    iterationsOUTER++;
                    while (current.getNext() != null && !exchangeMade) {
                        if(current.getNext().getData() < pointer.getData()) {
                            int temp = pointer.getData();
                            pointer.setData(current.getNext().getData());
                            current.getNext().setData(temp);
                            exchangeMade = true;
                            iterationsINNER++;
                            swaps++;
                            comparisons++;
                        current = current.getNext();
                    pointer = pointer.getNext();
              //  System.out.println("Comparisons: " + comparisons + " \nSwaps: " + swaps + " \nIterations: " + iterationsINNER+iterationsOUTER);
        }For instance, if I run this bit of code...
    LinkedList list = new LinkedList();
            list.insert(5);
            list.insert(29);
            list.insert(2);
            list.insert(1);
            list.insert(13);
            list.insert(8);
            list.insert(30);
            list.insert(3);
            sort.selectionSort(list);
            list.print();The output is...
    1
    8
    13
    3
    2
    29
    30
    5
    Anyone have any idea what is going wrong, or is anymore information needed?
    PS: I also need to create a insertion sort method with this, and I've been told I need to reverse the list for the insertion sort to work correctly. Any tips on how to implement this method too? :)

    I've changed it up a bit, and it works, but is this still a bubble sort? I've tried uncommenting that section that keeps track of the iterations and such, but I know they can't be right. Does this look correct? I basically just removed that boolean check...
    public void selectionSort(LinkedList list) {
            int iterationsINNER = 1, iterationsOUTER = 1, swaps = 0, comparisons = 1;
            if(list.isEmpty())
                System.out.println("List is currently empty.");
            else if (list.size() == 1)
                System.out.println("List is already sorted.");
            else {
                Node pointer = list.getFirst();
                Node current;
                while (pointer.getNext() != null) {
                    current = pointer;
                    iterationsOUTER++;
                    while (current.getNext() != null) {
                        comparisons++;
                        if(current.getNext().getData() < pointer.getData()) {
                            int temp = pointer.getData();
                            pointer.setData(current.getNext().getData());
                            current.getNext().setData(temp);
                            iterationsINNER++;
                            swaps++;
                        current = current.getNext();
                    pointer = pointer.getNext();
                System.out.println("Comparisons: " + comparisons + " \nSwaps: " + swaps + " \nIterations: " + iterationsINNER+iterationsOUTER);
        }And no, I tried and I don't get a NullPointerException if I have a list of 2.
    Edited by: birdboy30 on Dec 3, 2007 7:23 PM

  • Selection Sort Algorithm

    I'm trying to implement a selection sort method with linked lists, but I just can't seem to get it to work correctly.
    public void selectionSort(LinkedList list) {
            int iterationsINNER = 1, iterationsOUTER = 1, swaps = 0, comparisons = 1;
            if(list.isEmpty())
                System.out.println("List is currently empty.");
            else if (list.size() == 1)
                System.out.println("List is already sorted.");
            else {
                Node pointer = list.getFirst();
                Node current;
                boolean exchangeMade;
                while (pointer.getNext() != null) {
                    current = pointer;
                    exchangeMade = false;
                    iterationsOUTER++;
                    while (current.getNext() != null && !exchangeMade) {
                        if(current.getNext().getData() < current.getData()) {
                            int temp = current.getData();
                            pointer.setData(current.getNext().getData());
                            current.getNext().setData(temp);
                            exchangeMade = true;
                            iterationsINNER++;
                            swaps++;
                            comparisons++;
                        current = current.getNext();
                    pointer = pointer.getNext();
              //  System.out.println("Comparisons: " + comparisons + " \nSwaps: " + swaps + " \nIterations: " + iterationsINNER+iterationsOUTER);
        }If I test it with this code...
            LinkedList list = new LinkedList();
            list.insert(5);
            list.insert(29);
            list.insert(2);
            list.insert(1);
            list.insert(13);
            list.insert(8);
            list.insert(30);
            list.insert(3);
            sort.selectionSort(list);
            list.print();I get this as my output...
    8
    13
    1
    2
    29
    5
    30
    30

    Please clarify one thing for me:
    Is the Node class, something you made, or is it in the Java class library (there's quite a few named Node in there)? let me know....
    also, the LinkedList class has a generic type attached to it. Meaning you can store any data type in the LinkedList, but you have to specify what you want.
    example:
    LinkedList<String> strings = new LinkedList<String>();since the list is a parameter you don't have to initialize it, however you still need to specify what data type you're dealing with. I'd use "LinkedList<Object>" if you're not sure what type a user of this method may select, but it looks like you're gonna want to use "LinkedList<Node>".

  • Select Sorting in prompt level

    I have below requirement from user.
    Prompts:     Loan Id
              Loan Type
              Sort by Account Number/Sale Type
    Basically when user run the report, it should prompt below three fields.
    Loan Id
    Loan Type
    Sort order with a drop down list which has values Account Number/ Sale Type.
    i.e., user should be able to select sort order he wants for both Account Number/ Sale Type before running the report at
    prompt level.
    Does anyone know the best way to accomplish this?.
    Thanks,
    ven
    Edited by: Ven Men on Jan 21, 2009 8:32 PM

    Hi Deb,
    Thanks for your reply. I need little more clarification from you regarding Ascending/Descending and group by.
    Please see my comments below.
    1) Created a prompt at the universe level where users can choose their sorting option, ie. Ascending or Descending.
        How did you create this. What I did is I created a derived table in Universe with below code.
       "Select distinct table.Account_Number from table order by 1". It just does only Ascending.
       Then I created a prompt, called Sort_Order, in designer as 
       '1'!=@Prompt('Sort_Order','A',{'Account_Number'},mono,Not_Persistent))
      It is not parsed with a Parsing Result as Parse failed: Exception: DBD, ORA-00903: invalid table     name   State: N/A
    Since I am not taking this value from database table, I went ahead and created this prompt and exported universe.
      What I understood from your point is I need to create two different prompts, once for Ascending and one for Descending. Please
      let me know if I am going wrong.
    2) In the WebI report, create two variables, one for Ascending and Descending. The formulas would be something like:
       cv_Ascending: if(userresponse("Sort order prompt text here")="Ascending";MyField)
       cv_Descending: if(userresponse("Sort order prompt text here")="Descending";MyField)
       I created variable as Sort_Act_Num =if(UserResponse("Sort_Order") = "Account_Number"; [Account Number]; 0).  This just sorts in Ascending order only and when I want to change it to descending, it is not working.
    3) Put the cv_Ascending variable in column one set to sort ascending and put cv_Descending variable in column two set to sort descending. (The column with the value that isn't selected is always null so it's sorted on nothing)
    4) Since you can't really "hide" columns in WebI, you have to fake it. Set the font color to white (or whatever color your background is) and the width to zero (0) - unfortunately, it won't let you set it to 0, it will default to .02. Turn off the borders. The columns will in effect be "hidden" and disappear.
    I've done the same thing with grouping, by creating a variable and using it as a section break. Works like a charm.
    For grouping, do I need to create any prompts or variables in designer level? Also in report level, is the code same as above to create variable for grouping.
    Please let me know..
    Thanks,
    Ven Men

  • Sorting a vector using the selection sort method

    I have to write a program that sorts a Vector using the selection sort algorithm. Unfortunately the textbook only has about 2 pages on vectors so needless to say I'm pretty clueless on how to manipulate vectors. However I think I'm on the right path, however I'm stuck on one part as shown in the code below.     
    private static void  selectionSort(Vector parts)
          int index;
            int smallestIndex;
            int minIndex;
            int temp = 0;
            for (index = 0; index < parts.size() - 1; index++)
              smallestIndex = index;
              for (minIndex = index + 1; minIndex < parts.size(); minIndex++)
               if (parts.elementAt(minIndex) < parts.elementAt(smallestIndex))  // this is where I'm having trouble
                  smallestIndex = minIndex;
                parts.setElementAt(temp, smallestIndex);
                parts.setElementAt(smallestIndex, index);
                parts.setElementAt(index, temp); if (parts.elementAt(minIndex) < parts.elementAt(smallestIndex))
    is returning "ProcessParts3.java:51: operator < cannot be applied to java.lang.Object,java.lang.Object"
    Here is the full program:
    import java.util.*;
    import java.io.*;
    public class ProcessParts3
         static Vector parts;
         public static void main(String[] args)
              loadVector();
         private static void loadVector()
         try
              Scanner fileIn = new Scanner(new File("productionParts.txt"));
              parts = new Vector();
              String partIn;
              while (fileIn.hasNext())
                   partIn = fileIn.nextLine();
                        parts.addElement(partIn.trim());
              selectionSort(parts);
                   for (int i = 0; i < parts.size(); i ++)
                   System.out.println(parts.elementAt(i));
         catch(Exception e)
              e.printStackTrace();
         private static void  selectionSort(Vector parts) //from this part down I'm responsible for the coding, everything
                                                               // everything above this was written by the teacher
                 int index;
            int smallestIndex;
            int minIndex;
            int temp = 0;
            for (index = 0; index < parts.size() - 1; index++)
                smallestIndex = index;
                for (minIndex = index + 1; minIndex < parts.size(); minIndex++)
                    if (parts.elementAt(minIndex) < parts.elementAt(smallestIndex))
                        smallestIndex = minIndex;
                parts.setElementAt(temp, smallestIndex);
                parts.setElementAt(smallestIndex, index);
                parts.setElementAt(index, temp);
    }Edited by: SammyP on Nov 27, 2009 11:43 AM

    SammyP wrote:
    I have to write a program that sorts a Vector using the selection sort algorithm...Hmmm.... Your teacher is, in my humble opinion, a bit of a tard.
    1. Vector is basically deprecated in favor of newer implementations of the List interface which where introduced in [the collections framework|http://java.sun.com/docs/books/tutorial/collections/index.html] with Java 1.5 (which became generally available back in May 2004, and went end-of-support Oct 2009). ArrayList is very nearly a "drop in" replacement for Vector, and it is much better designed, and is marginally more efficient, mainly because it is not syncronised, which imposes a small but fundamentally pointless overhead when the collection is not being accessed across multiple threads (as is the case in your program).
    2. Use generics. That "raw" Vector (a list of Objects) should be a genericised List<String> (a list of Strings)... because it's compile-time-type-safe... mind you that definately complicates the definition of your static sort method, but there's an example in the link... Tip: temp should be of type T (not int).
    Note that String implements [Comparable<String>|http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html], so two String's can safely be compared using the compareTo method... In Java the mathematical operators (<, >, &#43;, -, /, &#42;, etc) are only applicable to the primitive types (byte char, int, float, etc)... The Java Gods just chose to muddy the waters (especially for noobs) by "overloading" the &#43; operator for String (and String only) to enable succinct, convenient string-concatenation... which I personally now see as "a little bit of a mistake" on there part.
         private static void  selectionSort(Vector parts)  {
    int index, smallestIndex, minIndex, temp = 0;
    for (index = 0; index < parts.size() - 1; index++) {
    smallestIndex = index;
    for (minIndex = index + 1; minIndex < parts.size(); minIndex++) {
    if (parts.elementAt(minIndex) < parts.elementAt(smallestIndex)) {
    smallestIndex = minIndex;
    parts.setElementAt(temp, smallestIndex);
    parts.setElementAt(smallestIndex, index);
    parts.setElementAt(index, temp);
    }3. ALLWAYS use {curly braces}, even when not strictly necessary for correctness, because (a) they help make your code more readable to humans, and also (b) if you leave them out, you will eventually stuff it up when you insert a line in the expectation that it will be part of the if statement (for example) but you forgot to also add the now mandatory curly-braces... This is far-too-common source of bugs in noob-code. Almost all professionals, nearly allways allways use curly braces, most of the time ;-)
    4. Variable names should be meaningful, except (IMHO) for loop counters... Ergo: I'd rename index plain old i, and minIndex to plain old j
        for ( int i=0; i<list.size()-1; ++i) {
          int wee = i; // wee is the index of the smallest-known-item in list.
          for ( int j=i+1; j<list.size(); ++j ) {Cheers. Keith.
    Edited by: corlettk on 28/11/2009 09:49 ~~ This here fraggin forum markup friggin sucks!

  • Selection Sort troubles

    I am doing a practice exercise involving a Selection Sort. I keep getting 2 errors when I compile and not sure what to do to fix them. Thanks in advance for your help! Here are the two errors:
    SortArray.java:79: illegal start of expression
         private void swapEm ( int indexCheck, int min ){
            ^
    SortArray.java:67: cannot resolve symbol
    symbol  : method swapEm  (int,int)
    location: class SortArray
               swapEm( indexCheck, min );
                     ^Here is my code:
    import java.lang.Math.*;
    public class SortArray {
         * Main method for program.
         * @param  args
        public static void main ( String args[] ){
         int array[] = new int [25]; //variable for array
          * For loop to populate the array with numbers ranging
          * from 0-100 inclusively and then
          * printing them out on the screen.
         for ( int index = 0; index < array.length; index ++ ){
             array[index] =( ( int ) ( Math.random() * 101 )  );
             System.out.println( array[index] );
          * For loop that iterates through array and sorts the array
          * in ascending order.
         int min;
         for ( int indexCheck = 0; indexCheck <  array.length -1;
               indexCheck ++ ){
             min = indexCheck;
             for ( int index = indexCheck + 1; index < array.length;
               index ++ ){
              if ( array[index] < min ){
                   min = array[index];
               swapEm( indexCheck, min );
          * Swaps the values of the array to put them in order.
          * @param one a value of type 'int'
          * @param two a value of type 'int'
         private void swapEm ( int indexCheck, int min ){
             int temp = array[indexCheck];
             array[indexCheck] = array[min];
             array[min] = temp;
         System.out.println();
         for ( int intCounter = 0; intCounter < array.length;
               intCounter ++ ){
             System.out.println( array[intCounter] );
    }//SortArray.java

    This is how i would do it:
    for ( int index = 0; index < array.length; index ++ ){
                   array[index] =( ( int ) ( Math.random() * 101 )  );
                   System.out.println( array[index] );
              System.out.println("-----------");
              /* To sort the array in ascending order
              for (int i=0; i<25; i++) {
                   for (int j=i+1; j<25; j++) {
                        if (array[i] > array [j]) {
                             int temp = array;
                             array[i] = array [j];
                             array[j] = temp;
              for (int i=0; i<25; i++)
                   System.out.println ("" + array[i]);
    All inside your main() method, without even using other methods.
    Calin

  • How to create Mysql like table with LinkedList or LinkedHashMap

    Is it possible to create a class which can create tables like Mysql tables? Take the following table as an example,
    0, LastName0, FirstNam0, Ag0, Phon0
    1, LastName1, FirstNam1, Ag1, Phon1
    2, LastName2, FirstNam2, Ag2, Phon2
    It's very easy to create a table in MySql with the following data. Now what if I want to create a table in the memory, so I can retrieve or SORT it whichever way I want. I might want to sort it by lastname or by phone number.
    Is it possible to do that with LinkedList or LinkedHashMap?

    1. Create a class with the fields lastName, firstName, age, phone of appropriate types
    2. Create objects of this and put in some type of a collections (ArrayList, Vector)
    3. Sort it using Collections.sort. Use a Comparator that compares the fields of interest

  • Since changing our computer I have been unable to download ebooks to my Reader Library I get a message Some file types associated with EPUB files are not associated with Reader Library; Waterstones suggest that I may have accidentally created a new Adobe

    When I try to download them from the Waterstones website I get a message saying:
    ‘Some file types associated with EPUB files are not associated with Reader Library.  Do you want to associate them now?  When I reply yes I get another message; ‘Configuration error unable to update EPUB files check network firewall and try again’.
    The ‘books’ are saved in the Download directory and I can’t transfer them from there to my E-Reader. I have not had any problems before, it was very simple; I saved the download and it automatically went into the Reader Library.
    I contacted HP and they said it is a software error and suggested I contact Waterstones.  I contacted Waterstones Customer Support and got the following response:
    As the error message is specifically mentioning the firewall it does sound like something in the firewall settings is stopping the download from taking place correctly. However, the files should not be being saved to the Download folder. It would be worth trying again by going to your Digital Order History on your Waterstones.com account and pressing the download button, and then making sure to press "Open" not "Save". When you press Open rather than Save it should give the option to open the file with Adobe Digital Editions. If the firewall message still comes up then I'm afraid something is blocking it on your end.
    If the above "Open" download method works but you then still get an error message it could possibly be that you have accidentally created a new Adobe ID when setting up on the new computer, rather than signing in with your old Adobe ID. It would be worth trying the aforementioned download technique again first, but if problems did still persist it would be worth calling Adobe themselves on 0207 365 0735, as they should be able to sort out any account issue.
      In response to the first para of Waterstones email I already do what they suggest I do press ‘Open’ not ‘Save’ but I don’t get the open with Adobe Digital Editions (we have installed Adobe Digital Editions on the new computer. Waterstones say we may have ‘accidentally created a new Adobe ID when setting up the new computer’ does that mean that we shouldn’t have installed Adobe Digital Editions on the new computer as it would have already been there? How do I sign in with my old Adobe ID? 

    Hi all after attampting to get some supoport from adobe by phone.... nice people infurating policys as far as support for digital editions or DRM is conserned... However I got no where with support.
    I ended up instaling Digital editions on my desktop PC and going through the motions of registering and borrowing a book then returning it. Then I trying on my iPad, Bluefire worked, Over drive did not so I completely removed Overdrive and reinstalled and re registered. all working now.
    Maybe some one at adobe did something. Maybe the install of the adobe DE client on a PC corrected what ever was out of wack with my account. Mayby the server that my account lives on did a scan disk and corrected a bad clustrer.
    What ever happend My account is actiove and working again. hope this helps others.

  • Performance with LinkedList in java

    Hello All,
    Please suggest me any solution to further improve the performance with List.
    The problem description is as follows:
    I have a huge number of objects, lets say 10,000 , and need to store the objects in such a collection so that if i want to store an object at some particular index i , I get the best performance.
    I suppose as I need indexed based access, using List makes the best sense as Lists are ordered.
    Using LinkedList over ArrayList gives the better performance in the aforementioned context.
    Is there are way I can further improve the performance of LinkedList while solving this particular problem
    OR
    Is there any other index based collection using that i get better performance than LinkedList?
    Thanks in advance

    The trouble with a LinkedList as implemented in the Java libraries is that if you want to insert at index 100, it has no option but to step through the first 100 links of the list to find the insert point. Likewise is you retrieve by index. The strength of the linked list approach is lost if you work by index and the List interface gives no other way to insert in the middle of the list. The natural interface for a linked list would include an extended Iterator with methods for insert and replace. Of course LinkedLists are fine when you insert first or last.
    My guess would be that if your habitual insertion point was half way or more through the list then ArrayList would serve you better especially if you leave ample room for growth. Moving array elements up is probably not much more expensive, per element, than walking the linked list. Maybe 150% or thereabouts.
    Much depends on how you retrieve, and how volatile the list is. Certainly if you are a read-mostly situation and cannot use an iterator then a LinkedList won't suit.

  • Report MB5B for selected movement types

    Dear All,
    When I am executing report for selected movement types , system givivng me message below " Movment type is reset"
    After continuing that Movement type field turns BLANK, and report is executed with considering all movement types.
    If there is a way for executing MB5B report for selected movement types, please suggest.
    Thanx..

    Hai,
    1.The MB5B report will show the stock on posting date with all movements like Goods recipt from Purchase, production order, stock transport order, & goods issue due to consumption posting, stock transfers & transfer posting.
    2. This is designed to see the Opening balane+Goods receipt - goods issue = closing balance.
    3.You can't take report only for particulat movement type.
    4.If u want to get the details as per the movement type, then use MB51 report.

Maybe you are looking for

  • How to select multiple iphoto card design under one shipment?

    Hi All, I have designed 4 different invitation cards. I wonder if i can multiple select 4 of these design under one shipment, so i can save a lot of shipping cost. Please share your experiences. Thanks. Regards, Wymond

  • Unstable system with two 20" monitors

    I recently picked up a new 20" cinema display dor my Dual 1.8 G5 with 1.5 Gigs RAM and the stock GeForce FX 5200, and now the computer keeps crashing. I used to run a clear-type 20" and a little 15" CRT monitor, now I'm using the two 20s. What kind o

  • Red Flashing Light on ImageCLASS8280Cw

    I've just unpacked my MF8280Cw, pulled the strips from the cartridges, and added paper to the paper drawer.   The red error light continues to flash - all this prior to attempting to connect the printer to a PC. There doesn't appear to be a paper jam

  • Creation of Tab pages in a form in C#

    Hi Experts, I would like to create an 2-3 diffetent tab pages in a single form in SAP B1.(like as we have differrent tabs in a windows) I am quit new to this, can any one help me here providing the keywords, function ect.. It wold be really helfull i

  • Black Screen Flickering in Photoshop

    Hello everyone, To my dismay I just noticed a black flickering on my screen when I was using Photoshop CC. It was when I was zoomed in on the image but I noticed that it streched the who screen length. I'm hoping it is just a photoshop issue and not