Collection comparison

Hello pepole,
Two questions to you all:
1) Where can i find a comparison between java collections, like arraylist, array, list, vector - comparison of performance, memory usage etc.
2) In case i need this collection type:
adding in the end, sorted, synchronaized is not really need.
what would you use ?
bye ,
Dor

1. The 3rd edition of book "Thinking in Java" has smth about this.
(http://www.pythoncriticalmass.com/downloads/TIJ-3rd-edition4.0.zip). Also I found smth useful in book "Java Collections" by John Zukowski. But...I think the more interesting way is to write some comparative tests by youself ;-)
And...of course, read JavaDocs.

Similar Messages

  • Collective BOM Comparison

    Hi Experts,
    Is it possible to compare BOM collectively in a plant, we are having BOM usage-1(Production) and BOM usage -6(costing), for every finished good, and now I need to compare BOMs,
    I am aware of CS-14 BOM comparison, but here i need to enter individial materials one by one, is it possible to compare BOM collectively?
    Regards
    CS

    Hi Gaurav,
    Thanks for your reply, we have maintained two BOM'S for every finished good one with bom usage 1 for production and another with bom usage 6 for costing, with time there were changes in production bom's and these changes were not done in costing Bom's,
    Now we need to overwrite all production BOM's to costing BOM, now to do this i  need to know the differnece between production Bom and costing bom.
    I can compare Bom's one by one by using transaction CS14, but I am looking for an option for collective comparison basen on material plant and usage combination.
    Regards
    cs

  • Smart Collections / Text Filter - exact Meaning of Comparison Operator

    Can anybody explain to me (in technical or IT terms) what exactly the different comparison operators (contains, contains all, contains words, starts with, ends with, ...) are supposed to do?
    I got confused by doing the following:
    I have an original image with 2 virutal copies, one containing "Copy 1", the other one "Copy 2" in the Copy Name attribute.
    I was playing around with smart collections (and text filters as well), trying to identify all my VCs with the term "Copy 1" in the Copy Name attribute.
    I notice that Starts with or Ends with Copy 1 does not show any results (?)
    Contains Copy 1 will also show images with Copy 2, Copy 3, Copy 4 .... (seems to be "Copy OR 1")
    Contains all Copy 1 will also show images with Copy 10, Copy 11, Copy 12
    Contains words Copy 1 does not show any results (?)
    How can I search for an exact term (including spaces) in an attribute (like "Copy 1" in Google)?
    Thanks for your help.
    Beat Gossweiler
    Switzerland

    In Text filter you should be able to use Copy Name Contains All Copy 1+
    The + sign means Ends with.
    The same approach can be used with Smart Collections

  • Comparison insertion/search time between different Collection class

    Hi,
    Does someone know where I can find a clear an complete comparison between different JAVA class which implements interface Collection?
    I want to compare:
    - elements insertion time
    - elements search/removal time
    Thank you very much in advance
    Diego

    from wikipedia: Its purpose is to characterize a function's behavior for very large (or very small) inputs in a simple but rigorous way that enables comparison to other functions.
    meaning if I ask how quick an algorithm is you might say it completes in 10 seconds but the next time you run it it might take 8 seconds. It kind of depends on what else your computer is doing/ how fast your computer is or how much data you are putting through ie if the puter has little memory it might need to use virtual memory which will have an effect on your performance.
    Big O notation identifies how much work has to be carried out. The easiest example is a simple search of an array:
    for (int i = 0; i < array.length; i++) {
      if (array[i] == "weijewr") {
        return i;
    }Where n represents a number of elements:
    This takes O(n) (big Oh of N) as potentially you need to look at each element.
    if you were to write a standard bubble sort it would be O(n2) as potentially you need to iterate the array once for each element.

  • Planning 11 application comparison and BR collection

    1) Does anyone know how to compare 2 versions of the same Classic 11.1.1.3 Planning apps? Hiearchies, forms? Lets say, I have QA and DEV versions, and I want to see if they are in sync/identical? I remember that Ver 9 had Manage Models option in Administration menu that with some tricking was doing comparison of the two models (their file xtracts), but can't find anything like that in v 11.
    2) Anyone knows the way to easily export the code of BRs into a file? The export XML doesn't always have the readable code in it, so its not reliable. Any suggestions?
    Thanks,
    smilo

    For exporting the rules to a flat file have a read of :- Re: Exporting Hyperion Business Rules as Text files
    Deleting classic business rules has always been a pain, if only they developed a multi select, well it won't happen now because calc mangler is around.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to do comparison in a loop.

    Hi all,
      TYPES: BEGIN OF ZROUTE,
             VBELN TYPE VBELN,
             ROUTE TYPE ROUTE,
            END OF ZROUTE.
      DATA : IT_ZROUTE TYPE STANDARD TABLE OF ZROUTE,
             WA_ZROUTE TYPE ZROUTE.
          LOOP AT I_XVTTP_TAB INTO LW_XVTTP.
            WA_ZROUTE-VBELN = LW_XVTTP-VBELN.
            SELECT SINGLE ROUTE
                    INTO  WA_ZROUTE-ROUTE
                    FROM LIKP
                    WHERE VBELN = LW_XVTTP-VBELN
            APPEND WA_ZROUTE TO IT_ZROUTE.
         ENDLOOP.
    results from IT_ZROUTE
    vbeln    route
    1111     A
    2222     B
    I have some problem in with the code below. I tried to collect vbeln and route into IT_ZROUTE.
    However, after i've got the result, i want to do distiguish between the route.
    If route A ne route B, then display an error messages.
    My problem is, how do i compare the record by looping IT_ZROUTE?  if i set into a temporary variable, the value will always change and i have prb in doing the comparison. eg:
    loop it_zroute into wa_route.
       zroute = wa_route-route. "set into a variable
      if zroute = wa_route-route
       "display error message
      endif.
    endloop.
    Could anyone give me some tips to enhance my code? Really appreciate your help.

    Hi SW,
    You should never use SELECT statement inside LOOP statement as it will affect performance of the program. Use FOR ALL ENTRIES for the same.
    TYPES: BEGIN OF ZROUTE,
    VBELN TYPE VBELN,
    ROUTE TYPE ROUTE,
    END OF ZROUTE.
    DATA : IT_ZROUTE TYPE STANDARD TABLE OF ZROUTE,
    WA_ZROUTE TYPE ZROUTE.
    ************Addition STARTS***********
    data : I_XVTTP_TAB_temp like I_XVTTP_TAB occurs 0 with header line.
    data : begin of likp_itab occurs 0,
                vbeln like likp-vbeln,
                 route like likp-route,
              end of likp_itab.
    I_XVTTP_TAB_temp[] = I_XVTTP_TAB[].
    sort I_XVTTP_TAB_temp by vbeln.
    delete adjacent duplicates from I_XVTTP_TAB_temp comparing vebln.
    select vbeln
              route
        into table likp_itab
       for all entries in I_XVTTP_TAB_temp
    where vbeln eq I_XVTTP_TAB_temp-vbeln.
    if sy-subrc eq 0.
    sort likp_itab by vbeln.
    endif.
    ************Addition ENDS***************
    LOOP AT I_XVTTP_TAB INTO LW_XVTTP.
    WA_ZROUTE-VBELN = LW_XVTTP-VBELN.
    ****************Not required
    SELECT SINGLE ROUTE
    INTO WA_ZROUTE-ROUTE
    FROM LIKP
    WHERE VBELN = LW_XVTTP-VBELN
    ****************Not required
    read table likp_itab witj key vbeln = LW_XVTTP-VBELN binary search.
    if sy-subrc eq 0.
      WA_ZROUTE-ROUTE = likp_itab-route.
    endif.
    APPEND WA_ZROUTE TO IT_ZROUTE.
    *********Add
    clear wa_zroute.
    *********Add
    ENDLOOP.
    Please explain the later part again I am not clear with requirement.
    Regards,
    Anil Salekar

  • Gold standard plug ins or collections for elements 9?

    One more quick question, t  feel like I've already posted too many questions until I know enough to  start contributing back to the community...
    Looking to get some plug ins for ps/premiere elements 9...
    A) Photoshop elements 9:
    1 Anyone know of any GREAT comparisons/ buyers guides pitting similar plug ins against each other (maybe even like collections with each title compared)
    1b) Any opinions on Current/Latest 'Gold Standard' tools (head and shoulders above similar titles - kinda industry/user consensous choise of BEST, beyond individual preference even?)
    2) Are they  any HDR plug ins that work with photoshop elements 9 - if so, is there 1  or 2 'Gold Standard' titles that are heads and shoulders above the rest
    if not for elements are there any standalone programs for HDR?
    2b) Right now (till I build budget back after buying software and plug ins) my camera doesn't shoot RAW, does HDR even work with jpeg sources?
    Or does HDR even work with elements? Have to go to ps cs5 for that?
    B) Premiere Elements 9:
    1) Same as photoshop elements above, are there any 'Gold Standard' Plug in or stock content, ect collections way better than the rest?
    2) What type of and which titles would be great bets to add to a beginners set of video editing tools?
    ? Co pilot,(what/which) ect...?
    Sorry if dragging on, I've been at this for almost 30 hours, trying to gey everything setup and learning how/what to use - Time for BED!
    THANKS!

    Take a look at elements+
    http://elementsplus.net/
    or
    Elements XXL
    http://thepluginsite.com/products/elementsxxl/

  • How to trigger creation of collective orders

    Hi,
    How to trigger the creation of Collective orders.
    regards

    Hi,
    Collective Orders
    Use
    In a collective order, planned orders or production orders are linked to one another over several production levels. Each order in the collective order has its own order number. If subassemblies are produced directly for superior orders within a production process, without physically entering the warehouse, it is useful to have a representation via collective orders.
    The components for which separate production orders are created in the collective order are called directly produced components (see Creating Collective Orders)
    Prerequisites
    A collective order cannot be created for components that have one of the following indicators set:
    · Co-product
    · By-product
    · Alternative item with strategy 2
    · Alternative item with usage probability 0
    · Discontinued
    · Follow-up material
    · Intra material
    Features
    Collective orders offer the following advantages:
    · Integrated view of a production process
    Collective orders make it possible to represent different levels of the production process together in the system. The production process can be viewed as an integrated whole.
    · Separate order number for every order
    Every level in a collective order represents a separate production order/planned order. Every production order/planned order has its own order number. This enables you to process the entire collective order, a subtree in the collective order or an individual order.
    · No placements in storage or removals from storage between production levels
    Within a collective order stock movements only take place for the leading order (that is, the order that is at the highest production level) and not for directly produced components. This makes it easier to maintain the collective order in comparison with several individual orders. A further advantage is a more realistic representation of the costs of the production process, since subordinate orders can be directly assigned and settled to superior orders.
    · Business functions simultaneously for several orders
    Certain business transactions can be carried out simultaneously for several orders. Releasing an order that belongs to a collective order has the effect that all the hierarchically subordinate orders are released simultaneously.
    · Automatic change to dependent orders
    Changes to an order automatically affect dependent orders / components affecting orders. For example, if you change the order quantity in an order then
    ¡ the relevant quantity changes are automatically made to dependent orders
    ¡ the requirements quantity of the directly produced component is automatically changed.
    In the collective order, you also have the option of manufacturing directly produced material in a different plant to the planning plant.
    · Set status in leading order
    If you make changes in subordinate orders that have an affect on the status, then the system sets the corresponding status in the order header of the leading order in the collective order as follows:
    u2013 CFCO Confirmation in collective order
    u2013 GMCO Goods movements in collective order
    u2013 RLNE Release taken place in network
    In this way you are informed about changes in the whole collective order.
    · Reading master data
    You can copy the routing data and BOM data to the order again. You can find more information in Read master data.
    Example
    You want to produce a pump. The BOM for the pump contains a pressure regulating valve and a spiral casing. You want to enter these two components in separate production orders, but you do not want them to be posted to stock.
    You set the special procurement type to direct production in the material master record for the pressure regulating valve and the spiral casing, so that production occurs using a collective order.
    When you create a production order for the pump, a collective order is automatically created, which contains subordinate production orders for the pressure regulating valve and the spiral casing.
    Creation of Collective Orders
    Use
    Collective orders are only created if the special procurement type is set to direct production in the components for which the separate production orders are to be created (materials planning area in the material master).
    In the standard system, 52 is the special procurement type for direct production (that is, for components that are produced within a collective order).
    To create a collective order, you must use an order type with internal number assignment.
    Hope this helps.
    Regards,
    Tejas

  • Question regarding stacks, searches and smart collections

    Apologies if this is considered a 'basic' question - but I hope that someone can help me.
    I'm currently in the process of upgrading/migrating a reasonably large Photoshop Elements 6 catalog where I've made extensive use of hierarchical folder structures, keywords and star ratings to quickly locate photos using a range a different techniques.I've successfully upgrade/migrated the Photoshope Elements catalog into Lightroom 3 and as part of the verification that everything has come across OK - I've done some comparisons of catalog searches in Elements and Lightroom and seem to be getting some strange results which I'm not sure if this is simply how things work or if I'm doing something wrong. I think part of the issue is caused by the fact that Elements always does destructive edits - so I never edited original photos in Elements so made extensive use of copied photos and stacks - but this didn't seem to cause any issues as Elements seem to keep things straight.
    In Elements, the result of a query or Smart Collection might return 18 stacks of photos (with most of the stacks containing multiple photos) - but for most purposes Elements simply treated this as 18 seperate photos and simply ignored all of the photos under the top of the stacks. 
    Now in Lightroom I get different results depending on how the photos are identified. If I use either a keyword or rating search using the 'Right Hand' panel - I get a photo count returned which is always much higher than 18 but Lightroom seems to retain the stacks so only displays 18 different stacks,  However, if I put the same search criteria into a Lightroom Smart Collection - it retrives and displays ALL of the photos in the 18 stacks (so it displays 2-3 times more photos) and I can't seem to find a way to get the Smart Collection to honour these stacks. I know that I could probably alter each of my photo stacks and change the rating or keyword of all of the photos under the top of the stack - but trust me this is a huge amount of work!!
    Is this simply the way Lightroom works?  I can partially understand and accept the way direct keyword or rating searches work using the 'Right Hand' panel - although the photo counts are different from what I've got used to in Elements the way the photos are actually displayed is not that different. However, what really confuses me is the completely different way Smart Collections work when compared to the 'equivalent' direct query.  Have I missed something?  Or is this some form of technical issue/bug/future enhancement request?
    Also, on a slightly related issue - I've noticed that keywords with spaces (or other special characters) seem to cause issues for Lightroom - while Elements seems to cope with these OK. From the reading I've done it looks like one of the most common suggestions is to simply remove the spaces (..etc.) in the keywords - is that what most people would recommend??
    Any help, advice or other suggestions would be appreciated.
    Kind Regards .... Jerry

    I'm currently in the process of upgrading/migrating a reasonably large Photoshop Elements 6 catalog where I've made extensive use of hierarchical folder structures, keywords and star ratings to quickly locate photos using a range a different techniques
    Please tell us EXACTLY the steps you are using to move your PSE catalog to Lightroom.
    However, if I put the same search criteria into a Lightroom Smart Collection - it retrives and displays ALL of the photos in the 18 stacks (so it displays 2-3 times more photos) and I can't seem to find a way to get the Smart Collection to honour these stacks. I know that I could probably alter each of my photo stacks and change the rating or keyword of all of the photos under the top of the stack - but trust me this is a huge amount of work!!
    I believe this is how Lightroom was designed to work. Smart collections don't recognize that some photos are at the bottom of the stack.
    Also, on a slightly related issue - I've noticed that keywords with spaces (or other special characters) seem to cause issues for Lightroom - while Elements seems to cope with these OK. From the reading I've done it looks like one of the most common suggestions is to simply remove the spaces (..etc.) in the keywords - is that what most people would recommend??
    I have no trouble whatsoever using keywords that have spaces in them. I have keywords that are "New York", "New Jersey", "Union Pacific Railroad", etc. Special characters, such as a comma, will probably cause trouble. Exactly what are you doing where spaces in keywords are not working properly?

  • Javascript with collections

    I have a fuel receiving process that has three steps: PO, receiving, and invoicing. I am using collections to do all the handling. There is a parent child table set with the parent containing the PO #, date, etc. and the child containing the individual lines. Each line has fields for each of the three steps. The invoicing step actually shows a comparison of all the steps with the collection showing:
    line1: Fuel PO item 1
    line2: Fuel Receiving item 1
    line3: Fuel invoicing item 1
    line4: space
    line5: Fuel PO item 2
    Can I make an entry on line3 (item 1) also populate to line 7 (item 2), line 11 (item 3, etc.) - perhaps using JavaScript? Here's the report:
    select apex_item.DISPLAY_AND_SAVE(50, SEQ_ID) SEQ_ID,
        apex_item.DISPLAY_AND_SAVE(1, c001) RX_SUB_ID,
        apex_item.DISPLAY_AND_SAVE(2, c002) RX_ID,
        apex_item.DISPLAY_AND_SAVE(3, c003) TX_TYPE,
        apex_item.DISPLAY_AND_SAVE(4, c004) EMPTY1,
        CASE c003
            WHEN 'INVOICE' THEN apex_item.TEXT(5, c005, 8, 8)
            ELSE apex_item.DISPLAY_AND_SAVE(5, c005)
        END as GALS,
        CASE c003
            WHEN 'INVOICE' THEN apex_item.TEXT(6, c006, 8, 8)
            ELSE apex_item.DISPLAY_AND_SAVE(6, c006)
        END as PRC,
        CASE c003
            WHEN 'INVOICE' THEN apex_item.TEXT(7, c007, 8, 8)
            ELSE apex_item.DISPLAY_AND_SAVE(7, c007)
        END as OTHR,
        CASE c003
            WHEN 'INVOICE' THEN apex_item.TEXT(8, c008, 8, 8)
            ELSE apex_item.DISPLAY_AND_SAVE(8, c008)
        END as TAX,
        CASE c003
            WHEN 'INVOICE' THEN apex_item.TEXT(9, c009, 10, 10)
            ELSE apex_item.DISPLAY_AND_SAVE(9, c009)
        END as COST,
        CASE c003
            WHEN 'INVOICE' THEN apex_item.select_list_from_lov(10, c010, 'LOV_FUEL_TYPE', 0, 'NO')
            ELSE apex_item.DISPLAY_AND_SAVE(10, c010)
        END as FUEL_TYPE,
        CASE c003
            WHEN 'INVOICE' THEN apex_item.DATE_POPUP(11, NULL, to_date(c011, 'MM/DD/YYYY'),'MM/DD/YYYY',10,10)
            ELSE apex_item.DISPLAY_AND_SAVE(11, c011)
        END as DT,
        apex_item.DISPLAY_AND_SAVE(12, c012) RX_EMP,
        CASE c003
            WHEN 'INVOICE' THEN apex_item.TEXT(13, c013, 10, 27)
            ELSE apex_item.DISPLAY_AND_SAVE(13, c013)
        END as INVOICE,
        CASE c003
            WHEN 'INVOICE' THEN apex_item.select_list_from_lov(14, c014, 'LOV_FUEL_OVERRIDE', 0, 'NO')
            ELSE apex_item.DISPLAY_AND_SAVE(14, c014)
        END as APP_EMP,
        CASE c003
            WHEN 'INVOICE' THEN apex_item.DATE_POPUP(15, NULL, to_date(c015, 'MM/DD/YYYY'),'MM/DD/YYYY',10,10)
            ELSE apex_item.DISPLAY_AND_SAVE(15, c015)
        END as APP_DT,
        apex_item.DISPLAY_AND_SAVE(16, c016) EMPTY2,
        CASE c003
            WHEN 'INVOICE' THEN apex_item.TEXT(17, c017, 30, 250)
            ELSE apex_item.DISPLAY_AND_SAVE(17, c017)
        END as CMT,
        apex_item.DISPLAY_AND_SAVE(18, c018) RX_ENTRY_EMP,
        apex_item.DISPLAY_AND_SAVE(19, c019) RX_ENTRY_DT
      from APEX_COLLECTIONS
    where COLLECTION_NAME = 'FUEL_INV'Basically the report just checks to see if the entries relate to invoicing. If not, it locks them from change.

    I guess what I'm asking is: is there a simple way to identify the item names in APEX collections for use with JavaScript functions?

  • How to compare values in collection.

    Hi,
    I am using oracle 11g XE, I am doing a validation using bulk collect collection.
    DECLARE
    TYPE TEM IS TABLE OF VARCHAR2(1000);
    EM TEM;
    P_MAIL VARCHAR2(1000);
    BEGIN
    P_MAIL := UPPER('[email protected]');
    SELECT EMAIL BULK COLLECT INTO EM FROM
    SELECT UPPER(EMAIL_ID)   AS  EMAIL FROM SONARA_CONSULTANT_DETAILS
    UNION
    SELECT EMAIL_ID_2 AS  EMAIL FROM SONARA_CONSULTANT_DETAILS
    ) WHERE EMAIL IS NOT NULL;
      FOR I IN EM.FIRST..EM.LAST LOOP  
        IF  P_MAIL = EM(I) THEN    // Here i am comparing the mail id with collection but it always goes to INVALID
        DBMS_OUTPUT.PUT_LINE('VALID');       
         ELSE
         DBMS_OUTPUT.PUT_LINE('INVALID');       
        END IF;
      END LOOP;
    END;
    } Please suggest me how to do the comparison
    Thanks
    Sudhir

    It seems that you don't compare everywhere in uppercase, so for me this is rather a letter case problem in your string addresses. The following works for me
    DECLARE
        TYPE TEM IS TABLE OF VARCHAR2(1000);
        EM TEM;
        P_EMAIL VARCHAR2(1000) := '[email protected]';
    BEGIN
        WITH SONARA_CONSULTANT_DETAILS AS
            SELECT '[email protected]' AS emailAddr FROM DUAL UNION
            SELECT '[email protected]' AS emailAddr FROM DUAL UNION
            SELECT '[email protected]'  AS emailAddr FROM DUAL UNION
            SELECT '[email protected]' AS emailAddr FROM DUAL UNION
            SELECT '[email protected]' AS emailAddr FROM DUAL UNION
            SELECT '[email protected]' AS emailAddr FROM DUAL UNION
            SELECT '[email protected]' AS emailAddr FROM DUAL UNION
            SELECT '[email protected]' AS emailAddr FROM DUAL
        SELECT emailAddr BULK COLLECT INTO EM
        FROM SONARA_CONSULTANT_DETAILS;
        FOR indx IN EM.FIRST .. EM.LAST
        LOOP
            IF UPPER(P_EMAIL) = UPPER(EM(indx))
            THEN
                DBMS_OUTPUT.PUT_LINE('VALID');
            ELSE
                DBMS_OUTPUT.PUT_LINE('INVALID');
            END IF;
        END LOOP;
    END;
    /Which gives me the following result
    INVALID
    INVALID
    INVALID
    INVALID
    INVALID
    INVALID
    INVALID
    VALID
    PL/SQL procedure successfully completed.
    SQL> Regards,
    Dariyoosh

  • Order of Elements in Collections.

    Hi,
    Can anyone let me know which collection types maintain the order of the elements in which the elements are inserted.
    Also, as what does it mean if we say that a HashMap doesn't maintain the order of the elements ?
    How does the order change after the elements are inserted in the HashMap ?
    Thanks in advance.

    I thought I would follow up with the solution.
    The method I described above does work, but in order to make it work I had to find a way to make all elements in all collections appear in the same order. In order to do that, I needed a unique key for each object in the tree, that would be the same in both the original and the modified tree.
    In my case that was easy, b/c I get the original version from Hibernate and I make my modified version by copying it (also by serializing the original into memory and then deserializing it into my new "modified" working copy tree), so they both still contain the hibernate oids.
    The extra step I needed to do before serializing and comparing was to recurse through both trees (with Introspection) and replace all sets with a TreeSet and all lists with my own implementation of a sorted list.
    Now I can compare any tree of domain objects that extend from BaseDomainObject (they all do) by simply writing
    domainObjectTree1.autoEquals(domainObjectTree2, new String[] {"terminatorProperty1", "terminatorProperty2", ...})
    Terminator properties are basically properties which I set to null before running my comparison. This allows me to "cut off" branches of the tree that I don't want to be compared.

  • Collection to represent ol ul il structures in recursive function

    Hello
    Im trying to write a terminal based web-browser and have a little problem when it comes to presentation of <ul><ol><li> tags.
    Im using recursion to step through the tags and the main function looks something like this (just wrote down a simplified version) It reads an xhtml document.
    private boolean  inBody= false;
    private int numberOfB = 0;
    private int numberOfEm = 0;
    public void printNodeLeaves(Node N)
         switch (N.getNodeType())
    case Node.DOCUMENT_NODE:
    case Node.ELEMENT_NODE:
    String nName = N.getNodeName(); //F�r ut taggar som B,P,EM osv
    if (nName.equalsIgnoreCase("body")) inBody= true;
    if (nName.equalsIgnoreCase("b")){
      numberOfB++;
      //Print out boldtext
    if (nName.equalsIgnoreCase("p")) itw.newline(2);
    if (nName.equalsIgnoreCase("em")){
         numberOfEm++;          
         //Print out italic text                    
    //Recursion      
    NodeList children= N.getChildNodes();
    if (children != null)
        for (int i=0; i<children.getLength(); ++i){              
             printNodeLeaves(children.item(i));              
    if (nName.equalsIgnoreCase("b")){
         numberOfB--;
         if(numberOfB==0) // Turn of the bold
         if(numberOfEm>0) // Turn on the italic
    if (nName.equalsIgnoreCase("em")) {
         numberOfEm--;
         if(numberOfEm==0) //Turn of the italic
         if(numberOfB>0) //Turn on bold
    if (nName.equalsIgnoreCase("p")) itw.newline(2);
         break;
         case Node.TEXT_NODE:
         if (inBody){                   
             itw.print(N.getNodeValue().replaceAll("\n", " "));                    
    }My problem is when it comes to the lists, both <ul> and <ol> tags contains <il>, im looking for a way to represent
    the lists in some kind of collection, linkedlist maybe. I was thinking of making a class that contains a list and property that tells me if the list is a <ul> or <ol>. The problem is that a <ul> could containt a <ol> and vice verca, ant of course they must be able to be nested. Why i need the ul and the ol in the same collection is because <il> in a <ol> should be outprinted with the number first followed by a dott, and <ul> should have a * in front of each <il>.
    Anyone that have any thoughts on this?

    Odd question. Why do you need to represent them in a collection? Seems like they're probably as well organized as they will be in the DOM. You should just process nodes recursively and if the current node is a "ol" then each child should be displayed with an integer that counts up from 1. If you hit an "ul" while processing the "ol" it shouldn't matter, you should process it then continue processing the "ol".
    One suggestion:
    use:
    String nName = N.getNodeName().toLowerCase().intern();
    then do if(nName == "tagname")
    as is, you are converting each character to lower case and comparing everytime. If you internalize, then == will work and is a simple reference comparison.
    More about internalization:
    http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#19369

  • A collection of threads: FAQ's, intros and memorable discussions

    Welcome to the SDN Security Forum!
    In addition to the information accessible via the SDN Security Main Wiki and the SDN Security Forum Search and
    searching the SAP Service Marketplace (see the thread on OSS Note Search Techniques), this "sticky post" lists some threads from the forum as:
    - an introduction for new members / visitors on topics discussed in threads,
    - a collection of some threads which provided usefull answers to questions which are frequently asked,
    - a collection of some memorable threads if you feel like reading some security related material.
    - a collection of OSS notes which have been proven to be generally usefull to know about.
    The listed threads will be enhanced from time to time. Please feel welcome to contact me via the details in my SDN Business Card if you would like to suggest any threads for inclusion here.
    Keeping an eye on the SDN Security Homepage for relevant blogs (often there are security aspects to other blogs as well),
    the Security Area of the SAP Service Marketplace ("OSS" logon required) and subscription to the SAP Security Newsletter
    can also be generally recommended if you are interested in security.
    New!Also see SAP's Security Disclosure Guidelines and do not use SDN to report software bugs. Contact details are in the link.
    PS: When asking a question in the forum, please also provide sufficient information such that the question can be
    answered usefully, and when the question is answered please indicate which solution was found and close the thread.

    Identity Management
    CUA will never die! => Blog from SAP about CUA support myths.
    CUA information and advice needed!!! => There is a seperate dedicated forum for this now.
    User Management and Password Rules
    User Comparison => PFUD and "valid to" role assignments, and other search terms.
    Effect of Keeping User IDs => Why and how to avoid deleting user ID's.
    FORCE PASSWORD CHANGE => Think twice about updating SAP tables.
    ALEREMOTE ID locked by KRNL => Where did a (CaSe-sensitive) password come from and why did it fail?
    DDIC and changing ownership of Jobs => Restricting DDIC access and logging, by restricting it's use.
    Copy User Masters from 4.7 to ECC 6.0 => Old hats, new (easy) tricks and win a round of beers, instead of points
    Profile Parameter: login/password_logon_usergroup => Exceptions, development requests and analzing logon problems.
    Authorizations
    Trace => Contributing to SDN can enable a difference for everyone, depending on the reason code ...
    Security Design => Derived roles, role design and (potential) design errors.
    F110 - S_BTCH_ADM => S_BTCH_ADM vs. S_BTCH_JOB.
    How to securize SE16N => Be carefull with S_DEVELOP authorizations, regardless of S_TCODE.
    Giving authorization for img => Tcodes, activities and projects within SPRO.
    Role and Naming concpets => Important first step with lasting consequences.
    display access for the tcode SCC4 => Tweaking table auth groups with transaction SE54.
    No control over workbench tcode start => The "System => Status and F1 trick"; also see SAP note 1085326.
    Is SU24 only for removing security checks? => What the SU24 indicators are for.
    Effect of "changed' objects during upgrades => The rules of SAP note 113290.
    How to remove SPRO from SAP_ALL profile => The Neverending Story.
    How to create new org.level and further actions? => Reports for converting organizational level fields.
    Granting Authorization Group SC in S_TABU_DIS => New authorization object S_TABU_NAM to access individual tables.
    error while uploading roles from quality to production => Upload roles, or transport them.
    SUIM RSUSR010 does not return completed list of t-code. => Special SUIM reports explained by SAP guru Bernhard Hochreiter.
    Maintaining different values for Accounting Type (KOART) => A little bit of everything in PFCG which you need to know.
    Adding Object Mannully Vs. Adding Object in SU24 for Tranaction => When to use SU24 to make changes.
    Too many duplicate objects coming while adding Tcode through MENU => SU24, PFCG merge option and role design.
    Not add authorization objects that exist in role when adding transaction => Initial installation tuning of SU24.
    Do you give SAP_ALL and SAP_NEW to developer in Dev and QA environtment? => Developer type authorizations.
    Errors occurred during post-handling PRGN_AFTER_IMP_ACTGROUP_ACGR for ACGR => Solutions for profile name collisions.

  • Maintaining collection organisation when exporting images.

    I've read many times on this forum and elsewhere that photos should be organised into collections and by metadata rather than by putting them into folders and I've started doing this to some extent.
    At some point however I have to export photos from Lightroom to deliver them to clients. How do I maintain the organisation afforded by the collections on export?
    With folders it's relatively easy, I export photos as jpegs into a copy of the folders they're organised into, usually using LR2/TreeExporter.
    That plugin doesn;t work with collections howoever, so what do I do?

    johnbeardy wrote:
    Folders for storage, keywords and collections for organisation - that's the hard line position
    John
    But you have to have organised storage, otherwise it's a messy heap of folders/images and it will look like Apple did the organising!
    Not to mention I also use Bridge for times where it is better than LR and as collections are not interchangeable between the two apps.....
    Besides I will not rely on collections for organising long term until that info is able to be stored independent of catalogues in the XMP file.
    I've had to restart catalogues over too many times to solve LR issues or because of corrupted catalogues to trust any info trapped in there.
    But organised storage and organised keywords and organised collections is only a good thing. Belts, braces and masking tape!
    The big and rarely mentioned problem with keywords and collections is the huge amount of time and effort that is needed to do a thorough job of it.
    Organising folders is dead easy in comparison, so is in reality far more likely to be done and therefore be of actual use.
    I used to teach martial arts and would often get asked which one is best and my reply is 'the one you enjoy the most'. The reason being is that is the one you are likely to stick with and therefore learn the most from.

Maybe you are looking for