Array processing question

Hello,
I am somewhat new to JNI technology and am getting a bit confused about array processing.
I am developing a C program that is called by a third party application. The third party application expects the C function to have a prototype similar to the following:
int read_content(char *buffer, int length)
It is expecting that I read "length" bytes of data from a device and return it to the caller in the buffer provided. I want to implement the device read operation in Java and return the data back to the C 'stub' so that it, in turn can return the data to the caller. What is the most efficient way to get the data from my Java "read_content" method into the caller's buffer? I am getting somewhat confused by the Get<Type>ArrayElements routines and this concepts of pinning, copying and releasing with the Release<Type>ArrayElements routine. Any advice would be helpful... particularly good advice :)
Thanks

It seems to me that you probably want to call the Java read_content method using JNI and have it return an array of bytes.
Since you already have a C buffer provided, you need to copy the data out of the Java array into this C buffer. GetPrimitiveArrayCritical is probably what you want:
char *myBuf = (char *)((*env)->GetPrimitiveArrayCritical(env, javaDataArray, NULL));
memcpy(buffer, myBuf, length);
(*env)->ReleasePrimitiveArrayCritical(env, javaDataArray, myBuf, JNI_ABORT);Given a Java array of bytes javaDataArray, this will copy length bytes out of it and into the C array named buffer. I used JNI_ABORT as the last argument to ReleasePrimitiveArrayCritical because you do not change the array. But you could pass a 0 there also, there would be no observable difference in the behavior.
Think of it as requesting and releasing a lock on the Java array. When you have no lock, the VM is free to move the array around in memory (and it will do so from time to time). When you use one of the various GetArray functions, this will lock the array so that the VM cannot move it. When you are done with it, you need to release it so the VM can resume normal operations on it. Releasing it also propagates any changes made back to the array. You cannot know whether changes made in native code will be reflected in the Java array until you commit the changes by releasing the array. But since you are not modifying the array, it doesn't make any difference.
What is most important is that you get the array before you read its elements and that you release it when you are done. That's all that you really need to know :}

Similar Messages

  • WAAS Application Requests - Process Question

    Non Technical Process Question
    We all have forms we have our users complete when a firewall rule or change is needed.  You may even have a similiar documents for when load balancers or DNS changes are required.  Does anyone have document they can share that outlines what pieces of information are needed for intergrating applications into WAAS?  What about ongoing changes?
    Source, destination and TCP port information is really a very small portion of the what needed to maintain a clean a defined methodolgy within the WAAS manager.  Does anyone have an example or can describe how you collect the initial information to set up WAAS but how do you keep track of changes that may be needed as the application charaterics change or the server farm expands horizontally?
    Thanks - Sam

    Sam,
    the general answer for detailed information on how to configure WAAS for certain applications is described here:
    http://www.cisco.com/en/US/docs/app_ntwk_services/waas/waas/v501/configuration/guide/policy.html
    In general, WAAS comes preconfigured for the most widly used applications in the industry.
    In order to understand, which configuration is necessary for a new application, one needs to understand the basic options WAAS offers.
    These are two options:
    1) Use an Application Optimizer (AO) if you need some dedicated protocol know how. ( e.g. (e)MAPI, CIFS, SSL, HTTP, ICA, to name some)
    2) Generic TCP traffic is optimized using TCP Flow Optimization (TFO), Data Redundancy Elemination (DRE) and Lempe Liv (LZ) compression.
    The in terms of processes, the question is:
    1) Is there a policy preconfigured for the new application?
         a) yes
              If an AO is used, does the AO need configuration? ( example: SSL AO requires certificates)
              Do we have specialities which require further fine tuning? ( Answer is mostly: no, Example: non-standard ports)
         b) no
              You define what you need for the application based on the protocol characteristics.
              If you have defined these characteristics you can choose one of the AOs, or define which of the "generic" options fit the traffic. For example, for traffic that is already compressed, it does not much benefit from LZ, so choosing only TFO and DRE. Another example is traffic that has not much of dublicate data, perhaps it does not benefit a lot from DRE, so you configure TFO only.
    Does that answer your question?
    Thanks,
    chris

  • Question related to my previous "background process" question.

    Hello Folks:
    Can I start a "Notification Service Subscriber" process through the
    normal startup procedure for other servers---i.e. by adding it to the
    config(ubb) file. If so, can I implement the background process as two
    different CORBA servers calling each other asynchronously to accomplish
    the work. Please let me know if there is any other way to accomplish
    what I have stated in the "background process" question.
    Thanks,
    Ram Ramesh
    678-358-3581

    Go to your forum preferences and set the email options.  You may also need to unsubscribe from forums / topics you are currently subscribed to.

  • Adding arrays - confusing question

    I am in the process of writing a java program where I have to add arrays. The question asks:
    This program asks you to assume that your computer has the very limited capability of being able to read and write only single-digit integers and to add together two integers consisting of one decimal digit each. Write a program that can read in two integers of up to 40 digits each, add these digits together, and display the result. Test your program using pairs of numbers of varying lengths. You must use arrays in this problem.
    I think I understand up to there is says"Write a program that can read in two integers of up to 40 digits each" from there I am lost.
    Can anyone help explain what is needed?
    This is what i have so far:
    import java.util.*;
    public class add
        public static void main(String[] args)
          Scanner in = new Scanner(System.in);
          int x = in.nextInt();
          int y = in.nextInt();
            int[] a = {x};
            int[] b = {y};
            int[] ab = new int[a.length + b.length];
            System.arraycopy(a, 0, ab, 0, a.length);
            System.arraycopy(b, 0, ab, a.length, b.length);
            System.out.println(Arrays.toString(ab));
    }

    Yeh, sorry about that didn't have the time to go ahead and drag some of the code over when I first found this forum, first thing I tried a quick compile and run just to see what problems I'd get and I got this runtime error of: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 7
         at java.lang.String.charAt(String.java:687)
         at Joseph_Ryan_P2.main(Joseph_Ryan_P2.java:36)
    I threw in some print statements to see how far it gets before the error occurs and it seems to be right before the for loop(see code below)
    In this program I'm reading in from a text file that will read two numbers from the same line that are seperated by a space and eventually add them, is the best way to do that by using a tokenizer or some sort of space delimiter? Or is there an easier way? If the tokenizer is best how would i go about that I haven't learned too much about them besides the fact that they exist so far.
    Thanks for any help you or suggestions you guys can give.
    //Joseph_Ryan_P2.java
    //Big Integer Program
    //Description:
    //     Design and implement a BigInteger class that can add and subtract integers with up to 25 digits. Your
    //     class should also include methods for input and output of the numbers.
    // Must Use Arrays
    import java.io.*;               //neccessary imported libraries
    import java.util.*;
    public class Joseph_Ryan_P2          
         public static void main(String[] args)          //the programs main method
              try
                   Scanner scan = new Scanner(new File("BigInts")); //Scanner to read in from plaintext file
              String numline = scan.next();
              int x=0;
              int [] big1 = new int [numline.length()];
              System.out.println(numline);
                   int [] big2 = new int [numline2.length()];
                   String numline2= scan.nextLine();
                   System.out.println(numline2);
              for(int i = numline.length() - 1; i >= 0; i++)
              char current = numline.charAt(i);
              int d = (int) current - (int) '0';
                   big1[i] = d;
              }//end for loop
              }//end try
              catch(FileNotFoundException exception)
    System.out.println("The file could not be found.");
    catch(IOException exception)
    System.out.println(exception);
    } //end catch statements
         }//end main
    }//end class

  • General Ledger - Revaluation/Translation Process Question

    Application Release Version: 11.5.10.2
    MRC: Not turned on for new entities. (See details below)
    My customer has been using oracle from around 2001 and went through a process at the end of 2008 to setup a new chart of accounts and approx 6 different companies with multiple entities for each across different functional currencies. (The initial setup for these entities was done prior to my joining and I have no supporting documentation on what decisions were made and why.)
    Setup info:
    Set of Books - 'Cumulative Translation Adjustment Account' defined as an 'Owners Equity Account'.
    Revaluation - Gains and Loss accounts using the same account number as 'Cumulative Translation Adjustment Account'. Accounts being revalued are accounts that have outstanding Payables and Receivables balances as well
    as our intercompany accounts that have outstanding balances. (Balances that need to be payed or received.)
    Question:
    My question refers to the revaluation and translation process for the new entites that have a different functional currency from the reporting currency. (All under the same chart of accounts structure.)
    For instance entity1 - Functional Currency = 'CAD' and has 'USD' transactions.
    I understand that at the period end we need to revalue the 'USD' transactions to there 'Current' worth in 'CAD' as exchange rates will fluctuate. But shouldn't the 'Difference', revaluation amounts, be pushed to the Unrealised FX Gains/Loss account, not the 'Cumulative Translation Adjustment Account'. (I think this is normally only used when a company is using MRC?)
    This obviously affects whether the period balance appears on the Balance Sheet or Income Statement report for the consolidated monthly report.
    Also should these 'Revaluation' journals ever be reversed or just left to accumulate?
    Then looking at the 'Translation' process, if value is pushed to the 'Cumulative Translation Adjustment Account' then the balance is translated based on the 'Average' period rate as the account is an 'Owners Equity Account', but this seems wrong for the 'Revaluation' balance to be converted at another rate?
    Any help on this subject will be greatly appreciated.

    Firstly, why would there be any difference between the total of customer/vendor sub-ledger balances and the balance on the reconciliation account(s)?  The posting to the reconciliation account is happening automatically right, when you are posting to a customer/vendor (basing on the reconciliation account assigned in the customer/vendor master)?  And system would not allow direct postings to reconciliation accounts, which eliminates the threat of reconciliation GL account going out of balance as compared to the sub-ledger accounts.
    However, you can run FBL3N or FS10N for the reconciliation account(s) and match it with the total balance on all customers/vendors using transaction FBL5N/FBL1N.

  • Snow Leopard Time Machine process question/possible problem

    For starters I want to say that I am not dealing with my own machine, but a friend's, so there's some missing information. Any help would be greatly appreciated!
    Ok, so my best friend bought a 15" MBP thru me during my short time as an Apple retail employee, which is how I got called in to "fix" it, although I'm still better with PCs than Macs. Anyway, it was purchased around December 2010, has at least Snow Leopard, intel i5 processor, 500 GB HD, not sure if 5000 or 7200 rpm, 4GB RAM. A day or so ago it started acting "weird" he says, like when closing google chrome the color wheel spun forever and took forever to close, and from then on every program acted the same; took forever to open and close. He said it was like there was some major process running in the background that was just using up all of the RAM and processor, leaving him with nothing to use for anything else. He shut it down and restarted it several times, but it acted the same. Sometimes he'd even have to force power it down. He then decided to do a wipe and restore with Time Machine. Thanks to google images I know for sure that he went thru all the bs with selecting what exactly to do, what restore to use, and where to install it, and that the transfer screen with the finder-to-fnder-like image and the progress bar appeared and completed fully before it automatically restarted itself. White screen with Apple logo appeared, he heard the boot up chime/BONG/WALL-E noise before the spinner wheel came up under the logo, which is where it stands now.
    The only question/concern is that it has been here for 10 hours, literally. Now the spinner is STILL spinning, that has not frozen that either of us are aware of, but both of us being so new to Macs we are completely unsure if it's ok. I did some online research and I've seen where people have had their macs freeze on boot up, but they usually don't chime; or it took like 14 hours to do the entire restore process, but they were significantly older and slower machines. Like I said, this could be status quo for this process, but I honestly do not know that. Feel free to just say "depending on the amount it's restoring, it could very well take that long, be patient" if that's the honest truth. I'm looking for verification.
    PS - his time machine backup is on an external USB hard drive, which is plugged in, and it's from November as he forgets to plug it in, but he has like photoshop and aperture, takes lots of pictures (yes we know those since November are gone), and honestly is on his MBP so much the only way I can think to describe it is that he literally uses it like a cheap whore.
    Thank you all!

    delete all drivers using the correct un-indtstall software, re-instalthe mac softeware and in stalll. GO TO SYSTEM PREFS, and select the printer and add the printer to the left side for install
    , then select that partictular printer.

  • Exception Processing Question -Reply

    I don't use Forte (yet--that's why I joined the mailing list), but since your
    question is a generic "engineering practices" question, I'll chime in. I do
    use exceptions both in C++ in Delphi, and have developed some opinions
    about how to use them:
    - Use exceptions for handling "behavior unexpected in the normal course
    of your algorithm". In other words, instead of returning error codes
    when something goes wrong, throw an exception.
    One example of this is in a parser: if you get an illegal token, just throw
    an exception.
    - When you need to make a choice based on a return status, don't throw
    an exception. In the parser example, if you get token 'A', you need to do
    one thing and if you get token 'B' you need to do another.
    - There's a fine distinction between "handling an error" and "making a
    choice", and there are cases where you could argue one way or the
    other. I'd say that an error throws an exception when it would normally
    terminate the normal flow of execution. For example, "out of memory" or
    "illegal token".
    - Catch exceptions at "high level" process start/end points, or where it is
    required to clean up resources held and rethrow.
    - Don't catch exceptions in every single method--it defeats the purpose.
    User Interfaces:
    - If your user-interface dictates a logical place to unwind no further,
    catch exceptions there. For example: In the Windows world most apps
    are a window with a menu. If you pull down and pick a menu item to
    execute a command, and that command throws an exception, the
    exception should be caught, a modal message box indicating the error
    should be presented, and then when the user clicks "ok", the program
    returns to its normal waiting state with the window intact.
    - If you have a modal dialog up, throwing an exception should either stop
    at the dialog's event loop or take the dialog down with it.
    I'd say that on-screen data validation should NOT use exceptions
    because "user typing invalid data" is expected behavior for a UI.
    Besides, the UI designer should be smart enough to deal with giving you
    a good model for data validation. OTOH, if you take the data out of the
    dialog and then pass the information as parameters to a function, and
    that function can't handle one of the parameter values, it should throw an
    exception.
    Nevertheless, if your dialog runs out of memory for some reason, it
    should throw an exception and the dialog should come down.
    Hope this helps.
    -- Conrad Herrmann
    Jerry Fatcheric <[email protected]> 07/24/96 03:29am >>>
    I have a toss up question for 50 points -
    We have finished the first phase of our project and have place
    exception processing in the places where we saw exceptions could be
    raise. But what about those other exceptional exceptions?
    Is this just good programming practice to have a high level generic
    exception handler (and what should it really do??) or is it critical.
    In addition, when handling data validation on specific widgets on a
    screen (e.g. the account number entered must be one of the existing
    10,000 valid ones), should this be handled via exception processing or
    should it just be handled with code in the event loop?
    Any opinions - please I don't want to hear the Forte Party line.
    I would like to hear opinions based upon real experience.
    Jerry Fatcheric
    Relational Options, Inc.
    Florham Park, New Jersey
    201-301-0200
    201-301-00377 (FAX) [email protected]

    We have finished the first phase of our project and have place
    exception processing in the places where we saw exceptions could
    be raise. But what about those other exceptional exceptions?
    Is this just good programming practice to have a high level
    generic exception handler (and what should it really do??) or
    is it critical.IMHO, you need to program for these ones that could occur because
    if you don't the exception will still happen except without
    your normal graceful (or standard) approach manner. I think it is good programming
    practice to trap on the ones you think can possible occur if they require
    something different in how they react. Otherwise, use of GenericException
    with a proper response is called for.
    >
    In addition, when handling data validation on specific widgets
    on a screen (e.g. the account number entered must be one of the
    existing 10,000 valid ones), should this be handled via exception
    processing or should it just be handled with code in the event loop?
    I use event loop processing because most of the time I am also
    keeping the user on the same widget after cancelling all events
    posted. So, in effect they are back where they started from.
    Any opinions - please I don't want to hear the Forte Party line.
    I would like to hear opinions based upon real experience.
    Jerry Fatcheric
    [email protected]@Sagesoln.com
    my 2 cents, or should I say my attempt at 50 points, Jerry.
    Len Leber
    ATG Partners

  • [BPM] Screenflow and Killing Interactive Process Questions

    Hi Guys,
    I have the following questions:
    1. How to kill an interactive activity? I tried to kill a process in an interactive activity via PAPI but it throws an exception:
    samplePAPI.activityAbort(target.getActivityName(), target.getId());
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
    faultSubcode:
    faultString: Operation exception.
    faultActor:
    faultNode:
    faultDetail:
         {http://bea.com/albpm/PapiWebService}OperationException:<message>Operation exception.</message>
    Operation exception.
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    2. How to close a custom JSP in a screenflow through javascript. I have a cancel button which once clicked it will close the window.
    I hope someone can help me out with this.
    Regards,

    Hi,
    Sory, but I'm still not sure, how ADF comunicates with BPM (I know that it uses EJB services and hwtaskflow.xml). But a still don't have an answers for follwowing questions:
    1) I know ADF quite good. Having method in data controls (in our case getTaskDetails()) we need to invoke it somehow. I don't see anywher invokation of this method.
    2) In generated task flow there is some managed beans and params - what is role of them ? Having over 50 task flows , do I need it in all of them. Where can I find description of those beans and params
    3) In our approach we use BPM , ADF RC for UI and Business Components to persist data into database. Only data from payload we need is ID of master-level row. My question is - do I have to generate data controls for all human task ?. In my my opinion it should be only one communication point between BPM and ADF but not the same for all pair human task --> task flow.
    All infomation I need from BPM is:
    - task ID
    - task flow name (to open apriopriate tab in my application)
    - available outcomes
    - to know is BPM operation is enabled
    Kuba

  • [Error ORABPEL-10039]: invalid xpath expression  - array processing

    hi,
    I am trying to process multiple xml elements
    <assign name="setinsideattributes">
    <copy>
    <from expression="ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')"/>
    <to variable="ssn"/>
    </copy>
    </assign>
    where iterator is a index variable .
    I am getting into this error .
    Error(48):
    [Error ORABPEL-10039]: invalid xpath expression
    [Description]: in line 48 of "D:\OraBPELPM_1\integration\jdev\jdev\mywork\may10-workspace\multixm-catch\multixm-catch.bpel", xpath expression "ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')" specified in <from> is not valid, because XPath query syntax error.
    Syntax error while parsing xpath expression "ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')", at position "77" the exception is Expected: ).
    Please verify the xpath query "ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')" which is defined in BPEL process.
    [Potential fix]: Please make sure the expression is valid.
    any information on how to fix this .
    thanks in advance

    check out this note here
    http://clemensblog.blogspot.com/2006/03/bpel-looping-over-arrays-collections.html
    hth clemens

  • Array Processing in ABAP

    Hi all,
    I am a total newbie in ABAP.
    I need to process an array in ABAP.
    If it was in .NET C#, it will be like this:
    String strArr = new String[5] { "A", "B", "C", "D", "E" };
    int index = -1;
    for (int i=0; i<strArr.length; i++)
       if (myData.equals(strArr<i>))
            index = i;
            break;
    Can someone please convert the above code into ABAP?
    Urgent. Please help. <REMOVED BY MODERATOR>
    THank you.
    Edited by: Alvaro Tejada Galindo on Feb 22, 2008 5:37 PM

    Hi,
    There is no concept of arrays in ABAP, we use internal tables to hold application data. U can use access internal tables with index.
    Read table itab index l_index this is same as u do in case of arrrays a(l_index)
    Instead use an Internal table to
    populate the values and read them ..
    say your Internal table has a field F1 ..
    itab-f1 = 10.
    append itab.
    clear itab.
    itab-f1 = 20.
    append itab.
    clear itab.
    itab-f1 = 30.
    append itab.
    clear itab.
    Now internal table has 3 values ...
    use loop ... endloop to get the values ..
    loop at itab.
    write :/ itab-f1.
    endloop.
    Also you can do this way:
    IT IS POSSIBLE TO DECLARE THE ONE -DIMENSIONAL ARRAY IN ABAP BY USING INTERNAL TABLES.
    EX.)
    DATA: BEGIN OF IT1 OCCURS 10,
    VAR1 TYPE I,
    END OF IT1.
    IT1-VAR1 = 10.
    APPEND IT1.
    IT1-VAR1 = 20.
    APPEND IT1.
    IT1-VAR1 = 30.
    APPEND IT1.
    LOOP AT IT1.
    WRITE:/ IT1-VAR1 COLOR 5.
    END LOOP.
    <REMOVED BY MODERATOR>
    Cheers,
    Chandra Sekhar.
    Edited by: Alvaro Tejada Galindo on Feb 22, 2008 5:38 PM

  • The arrays class question

    consider the code below
    int[] list = {2, 4, 7, 10};
    java.util.Arrays.fill(list, 7);
    java.util.Arrarys.fill(list, 1, 3, 8);
    System.out.print(java,util.Arrays.equals(list, list));i understand line 2, it gonna fill 7 into the array,so the output would be Line 2: list is {7, 7, 7, 7}
    my question is line 3, how come the output would be {7, 8, 8,7} what does 1 and 3 represent in a arrary?
    the line 4 output would be {7, 8,8,7} again why?
    Thank you guys whoever is gonna take to respond me questions

    zerogpm wrote:
    but which 2 lists were comparing ? since i have list list with the same name1) You're not comparing lists, you're comparing arrays.
    2) You're comparing a single array with itself.
    3) Objects, including arrays, do not have names. Classes, variables, and methods have names. Objects do not.

  • OLAP Universe creation process questions and proposals

    We have created an OLAP universe based on a BW-Query. The automatical creation of the OLAP universe does not produce a satisfying result.
    We are working with the latest available releases (BOE XI 3.1 SP2 and SAP Integration KIT SP2, SAP BI 7 EHP1).
    We have detected that all dimension objects store the name instead of the key field.
    Example:
    Customer Dimension Object (L01 Customer) = Customer Name
    Customer Key Detail Object (L01 Customer Key) = Customer Number
    Customer Name Detail Object (L01 Customer Name) = Customer Name
    This is not usable for end user because of the following reasons:
    1. The detail objects can not be used for merge dimensions, so it is not possible to merge on the supplier number.
    2. If you filter on the dimension object you will only see the text in the list of values (LOV) and it is not possible to edit the list of values in the universe to add the supplier number to the LOV as it is possible in relational universes
    3. If the user select the detail object always the dimension object in inserted into the report query
    4. The "Business Explorer" general setting "Display" of an InfoObject has no effect on the OLAP universe dimension object. If you change it to key always the text is shown. Even if you change the "ValueDisplay as" in the underlying BW Query to "key" is has no effect.
    5. The renaming of the L01 object to blank is not possible. You need to rename to " " and then remove on each object the blank.
    So we need to modify manually every universe to change the "detail key object" to a "dimension object" and the "detail name object" to reference the new "dimension object" with the key. This manual process has a huge work effort in time. Is there a better solution or enhancements planned in the next releases?
    Additionally there should be an option to disable the automatic creation of each characteristic as a subclass in the universe. A wizard should ask if a subclass should be created or not for each characteristic. Currently there are to many subclasses generated which were mostly not needed.

    Hi,
    First of all I would say u are lucky to start with SP2. Because whatever modifications you do in Universe those are retained.
    We had a big trouble in using BOXIR3.1 FP1.7.
    Anyways.. Back to your Questions and My asnwers for those:
    1. The detail objects can not be used for merge dimensions, so it is not possible to merge on the supplier number.
    Ans: True, Dimension object always shows Short text values by default. but if you can create the logic at SAP BI query level to map short text with keys then your problem will be solved.
    2. If you filter on the dimension object you will only see the text in the list of values (LOV) and it is not possible to edit the list of values in the universe to add the supplier number to the LOV as it is possible in relational universes.
    Ans: True u cannt edit LOV, but alternate solution to it is create the variable in SAP BI Query, that will appear as prompt in universe which will display the List of values with Key as well as Description.
    3. If the user select the detail object always the dimension object in inserted into the report query.
    Ans: Logically its correct, because Detail object is always associated with Dimension. Buit if you dont want that dimension in query you can remove that dimension by dragging back.
    4. The "Business Explorer" general setting "Display" of an InfoObject has no effect on the OLAP universe dimension object. If you change it to key always the text is shown. Even if you change the "ValueDisplay as" in the underlying BW Query to "key" is has no effect.
    Ans: In Query designer even if you ValueDisplay as "Key", but at Object level  if there is Text and Key associated for perticulat Infoobject, then so by default the dimension will show the Text and there will be seperate Detail object in universe for Key.
    5. The renaming of the L01 object to blank is not possible. You need to rename to " " and then remove on each object the blank.
    Ans: Yes this is a big trouble.
    Regards,
    Nisha

  • Copying arrays, performance questions

    Hello there
    The JDK offers several ways to copy arrays so I ran some experiments to try and find out which would be the fastest.
    I was measuring the time it takes to copy large arrays of integers. I wrote a program that allocates arrays of various sizes, and copy them several times using different methods. Then I measured the time each method took using the NetBeans profiler and calculated the frequencies.
    Here are the results I obtained (click for full size):  http://i.share.pho.to/dc40172a_l.png
    (what I call in-place copy is just iterating through the array with a for loop and copying the values one by one)
    I generated a graph from those values:  http://i.share.pho.to/049e0f73_l.png
    A zoom on the interesting part: http://i.share.pho.to/a9e9a6a4_l.png
    According to these results, clone() becomes faster at some point (not sure why). I've re-ran these experiments a few times and it seems to always happen somewhere between 725 and 750.
    Now here are my questions:
    - Is what I did a valid and reliable way to test performances, or are my results completely irrelevant? And if it's not, what would be a smarter way to do this?
    - Will clone be faster than arraycopy past 750 items on any PC or will these results be influences by other factors?
    - Is there a way to write a method that would copy the array with optimal performances using clone and arraycopy, such that the cost of using it would be insignificant compared to systematically using one method over the other?
    - Any idea why clone() can become faster for bigger arrays? I know arraycopy is a native method, I didn't try to look into what it does exactly but I can't imagine it's doing anything more complicating than copying elements from one location in the memory to another... How can another method be faster than that?
    (just reminding I'm copying primitives, not objects)
    Thanks!
    Message was edited by: xStardust! Added links, mr forum decided to take away my images

    yeh, everyone thinks that at some point. it relies,
    however, on you being perfect and knowing everything
    in advance, which you aren't, and don't (no offence,
    the same applies to all of us!). time and time again,
    people do this up-front and discover that what they
    thought would be a bottleneck, isn't. plus,
    the JVM is much smarter at optimizing code than you
    think: trust it. the best way to get good performance
    out of your code is to write simple, straightforward
    good OO code. JVMs are at a point now where they can
    optimize java to outperform equivalent C/C++ code
    (no, really) but since they're written by human
    beings, who have real deadlines and targets, the
    optimizations that make it into a release are the
    most common ones. just write your application, and
    then see how it performs. trust me on this
    have a read of
    [url=http://java.sun.com/developer/technicalArticles/I
    nterviews/goetz_qa.html]this for more info anda chance to see where I plagiarized that post from :-)
    Thanks for that link you gave me :)
    Was usefull to read.
    About time and money of programming, that is not really an issue for me atm since i'm doing this project for a company, but through school (it's like working but not for money).
    Of course it should not last entirely long but I got time to figure out alot of things.
    For my next project I will try to focus some more on building first, optimizing performance later (if it can be done with a good margin, since it seems the biggest bottlenecks are not the code but things outside the code).
    @promethuuzz
    The idea was to put collection objects (an object that handles the orm objects initialized) in the request and pass them along to the jsp (this is all done through a customized mvc model).
    So I wanted to see if this method was performance heavy so I won't end up writing the entire app and finding out halve of it is very performance heavy :)

  • TR Background processing question

    To All
    We currently receipt stock in MIGO and get a GR slip. Then we use LB10 to putaway using TO in Foreground. My question is what config do I need to set up to use TC in Background? What paperwork is generated to advise staff where to put stock if TO in Background is used? Is there a 'putaway' list when the background processing is selected.
    We currently have no other warehouse stock strategies. (No fixed bin management, no capacity check, etc)
    We currently use the material master default bin (which is printed on the GR slip) to suggest the putaway location.
    I want to get away from using TO in foreground to speed up putaway processing
    Regards
    Darren

    Darren,
    TO or TC or both ?
    For immediate TO creation:
    In config.
    LE \ WM \ Interfaces \ IM \ Define Movement Types
    In the second table, according to the parameters you want e.g. Movement Type, set 'A' in the 'Immediate' column
    Alternatively consider background generation (by prog. RLAUTA10) by setting per movement type.
    In config.
    LE \ WM \ Activities \ Transfers \ Set up Autom. TO creation
    And step through the settings.
    Regards,
    Nick

  • Array Module Question

    Hi,
    I am currently working on designing phase for an Array Module. We are planning to track the Array information and store it's content to database. Currently I am finalizing the data model and I have following question.
    --We need to track the Geneology of the Sample through out the whole system (Especially the results of Transfers). Is it better to have all that relationship in one flat table with columns for location (like PlateWell, GelLane…..) and columns for Content (Column like . LocationType  LocationId   ContentType ContentId) or is it better to store all the content of location as a ArrayType? Or is there any other option available in the Market?
    In the first case database rows for that table will increate very very fast plus to find out the geneology of the location in Array , I have to use Connect By Prior which will take good amount of time(Is there any other option available?). I don’t have much idea about second option but I think retrieval individual content is going to be a problem.
    Any help is really appreciated.
    Thanks in Advance
    Raj

    Made a complete example:
    String searchKey = "Juice";
    TreeMap tm = new TreeMap();
    tm.put("soda", "coke");
    tm.put("Juice", "orange");
    tm.put("SODA", "7-up");
    Set set = tm.entrySet();
    Iterator iterator = set.iterator();
    while( iterator.hasNext() ) {
    Map.Entry entry = (Map.Entry)iterator.next();
    if(entry.getKey().equals(searchKey)){
    System.out.println("searchKey '"+searchKey+"' value is: "+entry.getValue());
    What do you think? Anything obvious that can be improved?

Maybe you are looking for